Is there a solution to verifying a transformation of raw values on the blockchain available?
Example: You have a (private, permissioned) blockchain solution to verify how many apples you have in your storage. New apples arrive randomly every 1 to 5 minutes. Same is for outgoing apples.
After every hour that passed you want to calculate the apples that have arrived within the last hour. After every day you want to calculate the average apples that arrived per hour.
Does Ethereum (and others) solve this with Smart Contracts? What are alternative approaches?
To make it a bit more complex: let's assume the transformation itself is very complex and cannot be stored in a smart contract - like using a neuronal network that can not be replicated across all nodes. How can the other nodes confirm the transformation was done correctly and is trustworthy and store the result only on the blockchain?