Method and system for data processing

EP4666179A4Pending Publication Date: 2026-05-06STREAM ANALYZE SWEDEN AB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
EP · EP
Patent Type
Applications
Current Assignee / Owner
STREAM ANALYZE SWEDEN AB
Filing Date
2024-02-16
Publication Date
2026-05-06

AI Technical Summary

Technical Problem

Conventional IoT systems face challenges in flexibility of functionality during design, deployment, and maintenance, particularly with legacy hardware, and struggle with performance and scalability due to limited hardware resources and real-time data processing requirements, as well as usability issues that require deep technical knowledge.

Method used

A system comprising edge computing devices and a central server that allows dynamic and interactive distribution of software functionality using a query language with platform-independent assembly code, enabling non-programmer users to deploy and manage IoT systems seamlessly across heterogeneous hardware environments, with features like interpreting software functions and machine learning capabilities.

Benefits of technology

The solution provides a massively scalable and flexible IoT system that can handle real-time data processing, reduce maintenance complexity, and allow non-technical users to manage and develop the system, improving usability and performance across diverse hardware configurations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SE2024050161_22082024_PF_FP
    Figure SE2024050161_22082024_PF_FP
Patent Text Reader

Abstract

System (100) comprising edge computing devices (ECD) with sensors (S) and a first central server (CS), wherein the central server (CS) is arranged to accept a query, the result of which comprises an endless stream of data objects calculated based on data measured by said sensor (S). The central server (CS) parses said query to produce a parsed query expression; produces an execution plan corresponding to the parsed query expression; and compiles at least part of the execution plan by converting said execution plan to corresponding platform-independent assembly code. The edge computing devices (ECD) receives the at least partly compiled execution plan, and an interpreting software function (ES) thereof runs both compiled and non-compiled parts thereof to produce a query result. The invention also relates to a method.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Method and system for data processing

[0002] The present invention relates to a method and a system for data processing. In particular, the present method and system relates to data processing in an Internet of things (loT) en- vironment comprising a plurality of physically separated edge devices and possibly one or several central devices, all such devices being interconnected for digital communication such as over the internet.

[0003] Further particularly, the present invention relates to a way of distributing and deploying software functionality across such a system.

[0004] More particularly, the present invention relates to the processing of data collected by such edge devices, and for producing processed data useful for automatically determining and performing various actions.

[0005] In loT applications, it is known to use more or less autonomous edge devices, that can be used as sensors and / or actors in an loT system. Such edge devices may be based on hardware and also more or less on software. For instance, such edge devices may be arranged with purpose-made hardware implementing certain logic, or be generally programmable, running operating systems such as FreeRTOS or Android©.

[0006] Normally, once such a system is installed, together with edge devices, the installation tends to be relatively static. For instance, in many conventional systems activities such as add-on installations, testing, simulations, functionality changes and so forth are time-consuming. Even in case edge devices can be configured using parameters or similar, their functionality may be limited to use cases envisioned by an installing operator.

[0007] Hence, one problem with conventional distributed loT systems is flexibility of functionality, both in terms of initial design, deployment and further development and updates. This is particularly true when dealing with existing and legacy hardware. Another problem is performance and scalability, in view of the massive amounts of measured data that many such systems need to handle. Often real time requirements are challenging, and available hardware resources at each edge component are often limited. Yet another problem is maintenance, including testing and simulating new or hypothetical operation scenarios.

[0008] Another problem is usability. It would be desirable for a system not to require deep knowledge in programming or of the technical details of the system to be able to deploy, use, develop and maintain it in a broad spectrum of applications.

[0009] It would hence be desirable to provide a massively scalable loT system, including a plurality of edge devices and possibly one or several central units, which offers improved flexibility in terms of functionality, both during design, deployment, further development and mainte- nance, and which is simple to deploy.

[0010] SE 2050998-0 A discloses a general configuration of a massively distributed system capable of achieving at least one of the above-described goals. However, it would be desirable to achieve a way to distribute software functionality across such a system that allows such functionality to deploy and be used seamlessly and quickly across any subpart of such a system even in case of heterogenous prerequisites in terms of hardware, operating systems and so forth. Such a system and method for distributing and deploying software functionality should also be capable of distributing and deploying software functionality on-the-fly, dynamically and interactively, by non-programmer users, for instance in the general ways described in the above-referred previous Swedish patent application. The present invention solves at least some of the above described problems. Hence, embodiments of the invention relate to a system comprising several edge computing devices and a first central server, each such edge computing device and each such central server in turn comprising a memory; a Central Processing Unit, CPU; and a digital communication interface, arranged to allow digital communication across a digital communica- tion network. Each of said edge computing devices may also comprise a sensor. The central server may be to arranged to accept, from a querying party and via said digital communication interface, a query the result of which comprises at least one stream of data objects, at least one of said streams being an endless stream of objects, calculated based on data measured by said sensor and provided continuously or intermittently over time and communi- cated via said digital communication interface, said endless stream having no defined end point at the time of querying.

[0011] The central server may be arranged to perform the following steps: a) parse said query to produce a parsed query expression; b) produce an execution plan corresponding to the parsed query expression; and c) compile at least part of the execution plan by converting said at least part of the execution plan to corresponding platform-independent assembly code, to thereby obtain an at least partly compiled execution plan.

[0012] At least one of said edge computing devices may be arranged to then receive, via said digital communication interface, the at least partly compiled execution plan.

[0013] Said at least one of said edge computing devices may be arranged with an interpreting software function, arranged to execute on said CPU of the edge computing device and to, by means of interpretation of at least part of said at least partly compiled execution plan, run both compiled and non-compiled parts of said at least partly compiled execution plan.

[0014] Each edge computing device may be arranged to, when run said at least partly compiled execution plan, produce a first result to said at least partly compiled execution plan and to communicate said first result via said digital communication interface. Said at least partly compiled execution plan may define a calculation to be performed based on a measured value from said sensor.

[0015] The edge computing device in question may be arranged to perform, as a part of said inter- pretation, said calculation.

[0016] The query may be defined according to a query language having a predetermined syntax, the syntax being arranged to define queries the results of which comprise at least one stream of data and to allow said query to be defined in terms of a calculation to be per- formed based on a measured value from said sensor.

[0017] The query language may be an object-oriented query language.

[0018] The parsing may comprise parsing the query into an equivalent abstract syntax tree, such as into an S-expression.

[0019] The parsing may be into a representation that is one or several of declarative; object-oriented; based on predicate logic, for instance employing multi-directional foreign functions; strongly typed; and relational.

[0020] The representation may be extensible by providing primitives for user-defined predicates, for instance in terms of multi-directional foreign functions where different implementations are provided depending on a known / unknown status of foreign function parameters. The step of compiling may comprise the central server transcribing at least part of the assembly code into platform-specific assembly code.

[0021] Any non-compiled parts of the execution plan may be run by the interpreting software function of the edge computing device interpreting the execution plan parts in question; whereas any compiled parts of the execution plan may be run by the interpreting software function of the edge computing device initiating their execution directly by the CPU of the edge computing device.

[0022] In the step of compiling, it may be the case that only, or at least, arithmetic parts of the execution plan are to be compiled.

[0023] The central server may be arranged to save the platform-independent assembly code for later re-use. The central server may be arranged to transcribe the saved platform-independent assembly code into platform-specific code of a different edge computing device.

[0024] Each sensor and / or edge computing device may be referable, according to said syntax, using a global namespace or set of properties.

[0025] Each edge computing device may be arranged to discard at least some, preferably all, measurement data measured by said sensor, instead of storing it in said memory, after having communicated said measurement data and / or a piece of information calculated based on said measurement data, such as said result, over said digital communication interface.

[0026] The system may further comprise a distributed or monolithic central server, in relation to which each of said edge computing devices has a client role, wherein all communication between individual edge computing devices may then take place via said central server. Said interpreting software function may comprise an external application programming interface, API, arranged to allow expressions in said query language to call external computer code and / or arranged to allow external computer code to call expressions in said query language. Said interpreting software function may comprise a machine learning function, arranged to define, train and execute a machine learning model such as a neural network. The memory of said edge computing device may comprise a defined and trained machine learning function which is referred to by the query interpreted by the interpreting software function executing on the edge computing device in question.

[0027] The interpreting software function in question may be arranged to train said defined machine learning function based on said result of said query.

[0028] Embodiments of the invention relate to a method for collecting data in a system, the system comprising several edge computing devices and a first central server, each such computing device and each such central server in turn comprising a memory; a Central Processing Unit, CPU; and a digital communication interface, arranged to allow digital communication across a digital communication network, each of said edge computing devices also comprising a sensor.

[0029] Said method may comprise the following steps: a) the central server accepting, from a querying party and via said digital communication interface, a query the result of which comprises at least one stream of data objects, at least one of said streams being an endless stream of objects, calculated based on data measured by said sensor and provided continuously or intermittently over time and communicated via said digital communication interface, said endless stream having no defined end point at the time of querying; b) the central server parsing said query to produce a parsed query expression; c) the central server producing an execution plan corresponding to the parsed query ex- pression, said execution plan defining a calculation to be performed based on a measured value from said sensor; d) the central server compiling at least part of the execution plan by converting said at least part of the execution plan to corresponding platform-independent assembly code; e) at least one of said edge computing devices receiving, via said digital communication in- terface, the at least partly compiled execution plan; and f) an interpreting software function of said at least one of said edge computing devices executing on said CPU of the edge computing device and running both compiled and noncompiled parts of said at least partly compiled execution plan to produce a first result to said at least partly compiled execution plan, the interpretation comprising the performance of said calculation.

[0030] In the following, the invention will be described in detail, with reference to exemplifying embodiments of the invention and to the enclosed drawings, wherein: Figure 1 shows a client device according to the present invention;

[0031] Figure 2 is an overview of a system according to the present invention, suitable for performing a method according to the present invention;

[0032] Figure 3 is an overview of a nameserver database configuration;

[0033] Figure 4a is a first overview of an architecture of an interpreting software function; Figure 4b is a second overview of an architecture of an interpreting software function, showing more details than Figure 4a of core functions of said interpreting software function; Figure 5 shows a federation of edge computing devices and central servers;

[0034] Figure 6 is a flowchart illustrating a first method;

[0035] Figure 7 is a flowchart illustrating a second method; Figure 8 is a flowchart illustrating a third method;

[0036] Figure 9 is a flowchart illustrating a fourth method;

[0037] Figure 10 illustrates an information flow in a system;

[0038] Figure 11a illustrates an exemplary full-engine edge computing device; and

[0039] Figures llb-d illustrate first, second and third exemplary thin-engine edge computing de- vices, respectively.

[0040] In the Figures, the same reference numerals are used to denote same or corresponding parts. The present invention relates to a system 100 as is generally shown in Figure 2, comprising several edge computing devices (EDC) 110, 120, 130, 140 of the general type shown in Figure 1. s Each such edge computing device EDC is a piece of computing hardware, comprising a respective sensor S, a memory M, a Central Processing Unit CPU and a digital communication interface IF.

[0041] The sensor S may be any type of sensor arranged to measure a parameter at the edge com- w puting device EDC in question. The parameter may represent a physical property at or near the edge computing device EDC, whereby the sensor may a light sensor; a camera sensor; a temperature sensor; a sound sensor; an electric or magnetic sensor, such as a current, voltage, impedance or magnetic field sensor; an orientation sensor, such as a gyro or an accelerometer; a pressure sensor; a chemical sensor, such as a pH sensor or a sensor for sensing is particular solid state, liquid and / or gaseous chemical substances; and so forth. The parameter may also represent a logical property available for reading by the edge computing device EDC, such as a settable gate; a push button; a logic state delivered by an auxiliary device; and so forth. 0 What is important in this context is that the sensor S is arranged to sense a certain condition at the "edge" location of the edge computing device EDC. That the computing device is an "edge" device means that it is physically located in a location where the sensed condition is relevant. The system 100 in general comprises a plurality of such edge computing devices EDC, each being located in a respective such physical location, the physical location for dif-5 ferent edge computing devices EDC generally being different. This means that the system 100 covers a plurality of such physical locations where such measurements can be performed by said edge computing devices ECD. This way, data sensed from a plurality of different physical locations can be concatenated in the ways described herein, by one or several central servers CS in contact with said edge computing devices, to form a total view of0 some type of situation involving said plurality of physical locations. Each central server CS may or may not also comprise a sensor S of the type described herein.

[0042] The sensor S may comprise an analogue to digital converter, to convert a sensed analogue value, such as a temperature, to a digital representation which may be fed to said CPU.

[0043] Of course, each edge computing device ECD may comprise more than one sensor S, of the same and / or different types. All such sensors are connected to the memory M, such as via a suitable digital communication bus, so that a computer software function executing on the CPU can access measurement values received from the sensor S in question.

[0044] Similarly, each edge computing device ECD may furthermore comprise one or several actuators A, such as light, movement, electrical or magnetic actuators, as the case may be. All such actuators A are connected to the memory M, such as via said digital communication bus, so that a computer software function executing on the CPU can impart actuation at the actuator A in question.

[0045] The memory M may be a RAM memory, and is preferably a digital memory interconnected to both the sensor S and the CPU. The CPU may be any suitable CPU, such as a single-core or multi-core CPU.

[0046] The edge computing device EDC may be a physically standalone, programmable device. It may be a general-purpose programmable device, or a programmable device which is hardware limited to particular uses. The important thing in this context is that it is programmable using machine code that can be fed into the memory M from an external source and executed by the CPU. Only by way of example, the edge computing device EDC may be a programmable sensor or a PC laptop computer.

[0047] The edge computing device EDC may comprise an operating system, arranged to execute on the CPU and provide higher-level services to computer software executing on the CPU within the environment provided by the operating system. Such an operating system is, however, not necessary in all embodiments of the present invention.

[0048] The digital communication interface IF may be any suitable digital wired or wireless inter- face, arranged to allow the edge computing device ECD to communicate with external devices. For instance, the interface may be an internet interface, such as a socket; or a serial interface.

[0049] In particular, as illustrated in Figure 2, the interface IF of each edge computing device ECD allows it to communicate digitally across a digital communication network NW, such as the internet, to which all system 100 devices are connected for communication.

[0050] In particular, one or several central servers CS, NS may be connected to said network NW for communication with the edge computing devices ECD. Each edge computing device ECD is connected to at least one, such as exactly one, such central server CS. The central servers

[0051] CS may in turn be connected in one or several hierarchies, such as in a tree structures wherein a leaf (or client) central server CS is connected to a parent (or server) central server CS. Figure 2 also shows a particular type of central server, namely a namespace server NS (see below).

[0052] That the server is "central" means that it defines a functionality which is logically centralized, in the sense that it is accessible at a single well-defined logical place. For instance, the central server may be a conventional standalone server, in the form of a single piece of hardware having computer software executing thereon. However, each central server may also be embodied as a distributed logical server, such as a defined server functionality reachable via an internet "cloud"-type functionality. Hence, several such central servers CS may actually partly or fully execute on a common hardware platform, as the case may be. Such design options are selected from the point of view of, for instance, system 100 scalability, performance, security and resilience. The present system 100 can be made very scalable, and may comprise at least 1000, such as at least 10000 or even at least 100000 connected edge computing devices ECD that are connected to one and the same system 100 in a way so that they can all communicate di- rectly or indirectly with each other across the network NW as described herein.

[0053] Each central server CS may serve at least 10 edge computing devices ECD, such as at least 100 edge computing devices ECD. Each central server CS may furthermore serve at the most 10000 edge computing devices ECD, such as at the most 1000 edge computing devices ECD.

[0054] It will become apparent from the present description that each edge computing device ECD can also refer to other edge computing devices ECD across the network NW. Hence, data may flow in a tree-like structure formed by the system 100 comprising one or several layers of edge computing devices ECD forming leaves and nodes close to leaves in said tree struc- ture, and also one or several layers of central servers CS further away from such leaves.

[0055] It should also be kept in mind that the interpreting software function ES described herein may be executed both on edge computing devices ECD and central servers CS, whereby both devices with their own sensors S and more centrally located devices that concatenate data streams rather than process data measured using own sensors can process queries of the type described herein.

[0056] Hence, according to the present invention each edge computing device ECD is arranged with a respective interpreting software function ES, illustrated in a simplified way in Figure 1. The interpreting software function ES is arranged to execute on the respective CPU of the edge computing device ECD in question, such as locally on the edge computing device ECD, such as entirely locally on the edge computing device ECD.

[0057] "Local execution", as used herein, means that the software code embodying the software function ES is loaded directly into the CPU of the edge computing device ECD and executed directly thereon, without any of the logic or calculation functionality taking place on CPUs of any external devices. Note that this does not rule out that data, in the sense of information, is communicated to and / or from the edge computing device ECD in question, which data may be used as a basis for the execution of the software function ES. For instance, the numeric working data product of one edge computing device ECD may be consumed by another edge computing device ECD to be used therein in further calculations. However, a "local execution" of a piece of software rules out a distributed execution, for instance in the sense that different calculations to be performed by the software function ES are performed in different threads executed on different, disjoint hardware devices. The present inventor foresees that individual edge computing devices ECD may be arranged to share some soft- ware function ES functionality, even in a distributed execution environment involving a subset of such edge computing devices ECD. This may include one edge computing device ECD delegating to other edge computing devices particular defined calculations, in particular queries pertaining to sensors of such called-upon edge computing devices ECD. In general, the present invention provides the greatest advantages in a hardware environment in which CPU-demanding calculations are performed as far out on the leaves (at the individual edge computing devices ECD) as possible, exploiting the CPU resources of all connected devices.

[0058] The software function ES is an interpreting software function. This means that it may accept information having a predetermined format, to step through the information in a particular order, and to interpret or execute one piece of said information at a time. Such information processed by the software function ES is herein denoted "computer code", and is received by the edge computing device ECD in question via its digital communication interface IF and stored in its memory M. The computer code in turn comprises definitions, statements and / or instructions that the interpreting software function ES parses, processes and exe- cutes. In this sense, a conventional Java virtual machine is an interpreting software function, albeit arranged to interpret Java code rather than computer code according to the present invention. The distinction to note here is the one between "interpreting" and "executing", where the latter implies loading binary machine-code instructions into a CPU for direct execution by the CPU, whereas the former implies the interpreting software interpreting the computer code and in turn instructing the CPU. Expressed differently, an interpreted language is a language that contains at least some aspect or aspects not expressed in a native, directly executable machine language of the used CPU, but that need to be decoded somehow by an interpreter to be executable by the CPU.

[0059] According to the present invention the received, stored and interpreted computer code is formatted according to a query language having a predetermined syntax. Herein, a "query language" is a language allowing a user to define queries onto a particular data set. For instance, conventional SQL is a query language, albeit not according to the present invention. Namely, the syntax of said query language is arranged to define queries the results of which are streams of data. As used herein, a "stream" of data is a set of data pieces having a time dimension, preferably a set of data pieces continuously produced, perhaps even in realtime. Hence, each such piece of data may be associated with, or comprise, a timing information, such as a time of measurement, a time of sending, a time of reception and so forth. For instance, the edge computing device ECD may comprise a clock, which may be arranged to provide a time associated with each sensor S measurement, such as before the measurement in question is processed by said software function ES.

[0060] In some embodiments of the present invention, each edge computing device ECD is ar- ranged to, when interpreting said computer code using said software function ES, produce a result to at least one query defined by said computer code. As mentioned, the result may be a stream of data. The edge computing device ECD is then further arranged to communicate the result in question, via its digital communication interface IF, to a querying device, such as a different edge computing device ECD or a central server CS. In general, the query- ing device may be any device, external to the edge computing device ECD, posing the query in question to the edge computing device ECD via its digital communication interface IF and thereafter receiving a response to the query. In some cases the response may also be returned to a different entity than the one posing the query, depending on the detailed system configurations. In particular, said syntax may be arranged to allow queries in general, and in particular the query now in question, to be defined in terms of a calculation to be performed based on a measured value from the sensor S of the edge computing device ECD in question. Hence, the query language-formatted computer code interpreted by the software function may comprise a properly formatted reference to a particular sensor S of the edge computing device ECD, whereby the interpretation involves reading a current value of the sensor S in question and using that read current value in one or several calculations based on the result of which the query result is determined. In some embodiments, it is the edge computing device ECD in question (the one on which the software function ES executes) that is arranged to perform, as a part of said interpretation, said calculation.

[0061] The system 100 according to the present invention may be designed so that it is self-con- tained in the sense that it is not dependent on other, external, systems for its operation.

[0062] Still, it may be designed to provide powerful extensibility mechanisms to enable tight integration with software on many different hardware platforms. One key aspect of this is the interpreting software function ES executing on each edge computing device ECD. Namely, this interpreting software function ES may be downloaded onto each individual edge com- puting device ECD and installed for execution on the respective CPU of the edge computing device ECD in question. Once downloaded and installed, the software function ES of each such edge computing device ECD can interpret said computer code as long as the computer code adheres to said well-defined syntax. In practice, the software function can be ported (translated) to be executable on many different hardware / software environments (such as different processor architectures and / or different operating systems). In this context, it is preferred that the interpreting software function ES is specifically adapted to each type of such hardware / software environments, but providing the corresponding (or even identical) interpreting functionality with respect to said syntax. The resulting agnosticism regarding environment, only requiring the software function ES to support certain predetermined functionality, enables a scale-down of the interpreting software function ES, so that it can run on edge computing devices ECD with very limited local hardware resources. On the other hand, the number of such small edge computing devices ECD can be very large, each running such a scaled-down interpreting software function ES.

[0063] At the same time, the system 100 allows for massive scale-up, by running many instances of the interpreting software function ES on different devices in parallel. In particular, the system 100 can be scaled up to run said interpreting software function ES in many copies on large multi-cores, clusters and clouds.

[0064] These concepts of scale-down and scale-up will now be briefly explained and exemplified. Regarding first scale-down, the present inventor has successfully configured the interpreting software function ES so that it implements a required "kernel" software functionality, which may in turn be scaled down to run directly on small devices with limited or no operating system support. By porting the interpreting software function ES to various such limited resources environments, the present system 100 can be made virtually agnostic to the hardware, operating system and communication infrastructure used, by the interpreting software function ES running on each respective edge computing device ECD implementing a predefined minimum such kernel software functionality. Hence, each such piece of interpreting software function ES can run completely stand-alone on a respective supported device or computer, forming an edge computing device ECD according to the present inven- tion.

[0065] For some types of hardware, the present inventor has managed to design such a kernel software functionality so that is does not require operating system support, but can run on bare metal. In fact, it has turned out that the smallest possible configuration of a kernel- only system K requires less than 100K RAM (transient memory) and only 200K persistent, non-transient memory such as flash memory. The kernel software functionality may be comprised as a part of the interpreting software function ES. For instance, the kernel software functionality may provide required interpretation functionality for a well-defined core part of said query language, including syntax parsing, while the rest of the software function ES, including non-required functions and similar, may add higher-level functionality.

[0066] In general, since different ones of said edge computing devices ECD may comprise different hardware configurations, the interpretation software function ES may be specifically adapted to the respective hardware configuration of each type of said different edge computing devices ECD, whereas said syntax may be identical for each of said different edge computing devices ECD.

[0067] In some embodiments, as illustrated in Figure 1, designed to offer tight integration of the interpreting software function ES with other (system 100 external) software running on the same edge computing device ECD, the interpreting software function ES may run as an embedded engine inside other embedding software systems ESS.

[0068] Regarding the scale-up, we turn to Figure 2 in which it is illustrated how very large numbers of such scaled-down edge computing devices ECD may be interconnected to form one single, distributed system 100, encompassing many different edge computing devices ECD and central servers CS.

[0069] To achieve this, each edge computing device ECD can be managed by a particular central server CS, that may itself run as a cloud service over network NW.

[0070] As mentioned above, the interpreting software function ES may be designed with a necessary kernel functionality, including computer code query syntax interpretation and interface IF communication support. For very limited hardware environments, only this kernel may constitute the entire interpreting software function ES. Then, various non-necessary addon functionality can be added, depending on the hardware limitations of the edge computing device ECD on which the software function ES is to execute and depending on the general system 100 configuration.

[0071] In some embodiments, each sensor S and / or edge computing device ECD is referable, ac- cording to the above mentioned syntax, using a global namespace or set of properties. For instance, each edge computing device ECD may be allotted a unique number or name, or a unique network NW address may be used as a unique identifier for each edge computing device ECD. Each sensor S of an edge computing device ECD may similarly be addressable using the same or a different identification standard. A simple example of such a name standard is "[ECD_NO].[SENSOR_NO]". Preferably, sensors of identical type may be denoted using the same sub name according to said name standard.

[0072] In the example shown in Figure 2, a system 100 globally-unique identity of each edge computing device ECD is registered with a respective central server CS running on some server in turn connected to the network NW; in a container or a PC; or even as a separate process on the same computer as the computer on which the edge computing device ECD interpreting software function ES executes. In the latter case, the central server CS and the edge computing device ECD actually run on the same hardware, but are logically and functionally separated. Each central server CS may serve several edge computing devices ECD, to achieve said tree structure with respect to data flow in the system 100. In general, however, the edge computing devices ECD and central servers CS discussed herein can all be embodied as discrete respective hardware entities, physically separated one from the other.

[0073] In Figure 2, there are two central servers CS running in the network NW, and four different edge computing devices ECD are registered.

[0074] The system may further in general comprise a central namespace server NS, which may be arranged with a database DB in turn comprising information defining names for each of said edge computing devices ECD. The database DB may be comprised in or connected to the namespace server NS. The database DB may comprise information regarding network address locations for each of said edge computing devices ECD. The database DB may further comprise metadata information regarding individual edge computing devices ECD, for instance concerning what types of sensors S are available at each such edge computing device ECD, what type and / or version of the interpreting software function ES is executed on each edge computing device ECD, numerical properties used when each edge computing device ECD delivers measurement values (such as what units are used), and so forth. This metadata may then be used to determine parameter values to use in the below-described query preprocessing performed by certain edge computing devices ECD.

[0075] In general, the namespace server NS may in itself be a central server CS of the above-described type, having additional namespace information processing functionality and arranged to serve system 100 actors with namespace-related information services and requests.

[0076] All edge computing devices ECD are interconnected by network NW via said central servers CS and, if used, at least one such namespace server NS.

[0077] As mentioned, different instances of the interpreting software function ES running on dif- ferent computers can communicate with central servers CS running on the same or some other computer. Each edge computing device ECD can communicate with the central server CS where it is registered. The serving central server CS in question can keep some metadata about each edge computing device ECD which it serves, and can forward data and streams to other central servers CS, such as for distribution to edge computing devices ECD served by such other central servers CS.

[0078] In general, all connected devices, and in particularthe edge computing devices ECD, can run independently from each other. In particular, an edge computing device ECD may not be required to be continuously connected with its central server CS, as long as the edge com- puting device ECD in question is registered with the central server CS in question. The actual digital communication of object streams between the edge computing device ECD and the central server CS in question may be started and finished only when so required. When there is no active communication going on the edge clients may be able to run autonomously. This functionality can be implemented as a part of the digital communication interface IF, and decreases network NW traffic to a minimum, allowing for massive scalability. Of course, heartbeats and similar keep-alive signals can be sent between devices to keep a registered connection active. However, even this type of periodic communication may be not necessary, since an edge computing device ECD which is not online will simply not respond to queries posed to it.

[0079] Hence, the system 100 comprises a set of interconnected peer devices, in turn comprising a plurality of devices selected from the following list: • The interpreting software function ES running as an embedded piece of software on some network NW connected device;

[0080] • A dedicated edge computing device ECD running the interpreting software function ES;

[0081] • A central server CS; and • A namespace server NS.

[0082] In practice the system 100 may comprise a massive number of such interconnected peer devices, in particular very many edge computing devices ECD. It is therefore desirable to be able to scale out the numbers of peers to handle extremely large numbers of edge compu- ting devices ECD, from tens of thousands up to billions. This can be handled by scaling out the number of edge computing devices ECD registered in each central server CS to thousands of edge computing devices ECD registered with each central server CS, and by defining a hierarchy of several hierarchy levels as described above. The system 100 of such interconnected peers should persist even when parts of the system 100 go down. To this end, the database DB of the nameserver NS may be a wrapped database, such as a wrapped relational database, as exemplified by Figure 3 using a per se conventional JDBC (Java DataBase Connectivity) wrapper.

[0083] In this particular example, the wrapper may be a plug-in to the interpreting software func- 5 tion ES that enables access to any relational database using a standard database interface, such as the JDBC interface. The database DB may hold the identifiers of all peers in the system 100, along with other metadata such as what kind of equipment is accessible through each edge computing device ECD, what kind of sensors S they access, and so forth. w It should be noted that it is also possible to implement a namespace server NS of the present type without a database backend, and in this case it is also possible for such a namespace server to persist its database. However, in order to scale to millions of interconnected peers in the system 100, it is preferred to use a wrapped database DB as described. is It is further understood that the namespace server NS and / or its database DB may be implemented as a defined server functionality executing in a distributed hardware environment.

[0084] As mentioned above, the central servers CS and the namespace server(s) NS can be config-0 ured to run on many different kinds of hardware configurations, and also in different software environments. In a simple case, they can each run on a regular PC. In more scalable configurations, each central server SC can run in a separate container (such as Docker, see and the namespace server NS, along with the relational database DB, can run on a dedicated cluster. With such a scale-out, if the number of edge computing devices5 ECD registered with each central server CS is 1000 and with two levels of central servers CS, up to about 109peers can be handled. The database DB will not be a bottleneck in such a configuration, as a limited amount of metadata per peer could be stored there.

[0085] In general, the interpreting software function SA provides general data analytics and infer-0 ence capabilities to the edge computing device ECD on which it is running. This functionality may generally be implemented in the same manner on different ported versions of the interpreting software function SA, so that the interpreting software function SA with respect to these functions is independent from the particular hardware / software environment in which it executes. In general, the functionality of the interpreting software function SA described herein can be implemented in a way making it agnostic to hardware, operating system and communication infrastructure of the device on which it runs. In an exemplifying embodiment, the kernel of the interpreting software function ES may be written in the computer language C99.

[0086] Figure 4a illustrates the main components of such an interpreting software function ES.

[0087] The core of the interpreting software function ES is the above-mentioned kernel. It provides the generic capabilities needed for real-time data stream analytics. In contains a computational engine, a data stream processor, and an inference engine. It may also comprise a main memory local database EDB (see Figure 1), which may be an object-oriented database and may further be comprised in the main memory M of the edge computing device ECD in question. Using such a locally provided database, and in particular an object-oriented database, in the edge computing device ECD, enables the use of a powerful query processer and optimizer where, for instance, analysis models and edge computing device ECD metadata may be stored and managed.

[0088] Furthermore, object-oriented data models describing metadata properties of the edge computing device ECD in question (such as information regarding the type or properties of edge computing device ECD sensors S, measurement units used the by edge computing device ECD, edge computing device ECD hardware specification or properties, and so forth) enable the requesting from an edge computing device ECD regarding information about edge computing device ECD properties, conversions of names and measurements, and so forth (so called "mediation"). Such requests can be made using said query language, and result in that the response to such a query language query depends on particular metadata information stored in the queried edge computing device ECD, or even in other edge computing devices ECD subqueried in a query cascade of the general type described herein. The kernel comprises said data stream interpretation functionality. In exemplifying embodiments, the kernel is tightly integrated with an interpreter for execution plans over digital data streams called SLOG (Streamed LOGic), and also with an interpreter for an extended subset of CommonLisp called aLisp (building on the conventional computer programming language family Lisp). In fact, the present inventor has discovered that building at least the kernel part of the interpreting software function ES in a computer programming language which is recursive and using functional notation, such as a Lisp language, provides a very efficient processing of the type of continuous queries processed by the present system 100 as described herein.

[0089] The upwards-facing arrows of Figure 4a indicate data streams. One or several sensors S of the edge computing device ECD in question and / or the respective interpreting software function ES of one or several other edge computing devices ECD produce incoming source data streams that are injected into the kernel shown in Figure 4a, which in turn transforms these incoming digital data streams into one or several new digital object streams for output from the edge computing device ECD in question.

[0090] Such a source data stream may be implemented as an access for the kernel to a raw sensor S interface on the edge computing device ECD on which the interpreting software function ES is running. A source stream can also be a data stream produced by a respective interpreting software function ES running on another connected edge computing device ECD, received via network NW, such as using the TCP communication protocol. For instance, such a source stream may be communicated in response to a continuous query posed by the interpreting software function ES receiving and consuming the source stream in question.

[0091] Analogously, the resulting object data streams may be sent to other central servers CS and edge computing devices ECD using the communication infrastructure (such as TCP) offered by network NW. This way, very large distributed systems 100 of peers of the present type can be configured, in which such peers produce object data streams for consumption by other peers as source data streams. On edge computing devices ECD, object stream data elements of calculated or received object data streams can be sent directly to actuators A mounted on the edge computing device ECD in question, and this way activate actuation of the actuator A in question.

[0092] In general, the system 100 and methods described herein are specifically designed for sim- pie and interactive development and deployment of applications that process and analyse real-time streams of data in distributed and mobile environments, allowing streams that are produced by sensors S on edge computing devices ECD to be analysed, processed and aggregated online, in real-time and interactively. An edge computing device can be, for instance, an Android unit, a PC desktop computer, a Raspberry Pi, or MCUs (Micro Controller unit) like MangOH Red or ARM M4. As described above, the interpreting software function ES, and in particular said kernel, can be designed to have a very small footprint (the present inventor has managed to slim the fully functional interpreting software function in test environments to total memory M footprints ranging from about 20kB to about 5MB, depending on configuration), and to be essentially hardware and operating system agnostic, as well as fully independent of any third party software.

[0093] The combination in each of the edge computing devices ECD of a respective main-memory M database EDB, a software-implemented computational engine, a software-implemented data stream processor, and a software-implemented inference engine allows the use of edge analytics directly on the edge computing devices ECD. This is in contrast to many conventional approaches, in which all measurement data is first uploaded from edge devices to a central server, and in which the central server then performs all the data processing centrally. The present approach instead allows for drastic data reduction by processing the data streams already in the edge computing devices ECD. This way, only aggregated analyses, such as population analyses, over collections of connected edge computing devices ECD need to be made centrally or semi-centrally, such as on different aggregation levels in said tree structure data flow. This way, the interpreting software function ES has a filtering capability, in other words it is arranged to filter out (discard) data from an available source data stream to produce an output object data stream containing less data per time unit than the source data stream. In some configurations, the interpreting software function ES can also assume a data stream server role, either when running on an edge computing device ECD or on a central server CS. In such a data stream server role, the interpreting software function ES is arranged to collect data from one or several connected edge computing devices ECS and to combine and forward the combined / processed data as an object data stream to other peers. For example, whenever the analysis model in some edge computing device ECD detects strong vibrations, by performing a computation over the latest readings from its accelerometer sensor, an object data stream containing the frequency spectrum of the vibrations along with the geographical position of the edge computing device ECD in question may be transmitted to a stream server running on a central server CS, which in turn is configured to receive similar information from a plurality of different connected edge computing devices ECD. If the stream server receives many such streams at the same time, from edge computing devices ECD in geographical positions close to each other, it may indicate an earthquake. The stream server may furthermore forward the received and possibly processed data to other connected system 100 peers or to an external system, such as for permanent central storage or batch analysis.

[0094] As mentioned above, the interpreting software function ES is arranged to interpret computer code formatted according to a well-defined query language syntax. Such a query language syntax can be selected to provide analysis of an available source data stream inter- actively and on a high and user-oriented level.

[0095] In particular, the query language may be a high-level object-oriented query language. The syntax may allow for different side effect free conditional logic-depending execution paths (such as "select-from-where" clauses), that are then interpreted and executed by said in- terpreting software function ES. The queries may be at least partly declarative in the sense that their interpretation and execution only result in searches of, and the performance of any calculations over, the database inside each respective edge computing device ECD, without updating these databases inside the edge computing devices ECD or changing the state of the device. However, it is preferred that the queries are at least partly non-declar- ative (see below).

[0096] In some embodiments, the query language may be designed to allow queries to have side effects such as updating databases, signalling actuators that change the state of the device, or sending messages to other edge computing devices ECD when such queries are loaded into the memory M of the edge computing device ECD on which the interpreting software function ES runs, and executed by the interpreting software function ES interpreting the query in question. In other words, when the interpreting software function ES executes on the edge computing device ECD in question and then interprets the loaded computer code, the programming embodied in the computer code, which may comprise the handling of states and / or side effects, is executed as a result of said interpretation.

[0097] Another term for a language being "declarative" is that it is "non-procedural". Hence, the present query language is preferably not non-procedural, but rather at least partly procedural. Providing the query language as a declarative / non-procedural query language allows users to specify, in an intuitive manner, desired results in terms of output data, rather than exactly what the edge computing device ECD should do in terms of calculations to achieve the desired results. However, at the same time defining the query language so that it has certain non-declarative / procedural elements allows for queries to have side-effects and include stateful functions. When processing streaming data, such procedural / non-declarative elements of the query language provides the possibility to extract information from state- changing sensors.

[0098] The following is an example of a declaratively defined object-oriented query that returns a stream of objects for a given stream of sensors readings from an accelerometer sensor S: select stream of absolute ( shakes ) from vector of number shakes , where shakes from accelerometer ( )

[0099] The query receives a set of acceleration readings as objects being 3D vectors shakes from a sensor accessed through the function accelerometer. It returns a stream of single numbers being the absolute values of the shakes objects. Here the function accelerometer ( ) is stateful because it returns a new value every time it is called. The interpreting software function ES may in general be aware of the fact that queries contain calls to stateful functions, and be arranged to take this into consideration when parsing and interpreting queries. This provides for more efficient processing of queries of said type. Whenever the accelerometer emits new vectors, the query computes and emits its absolute value. Functions can also be expressed by queries. For example, the absolute function may be defined as create function absolute (Vector of Number v) -> Number as select sqrt ( sum (v .A2 ) )

[0100] The query select sqrt ( sum (v .A2 ) ) takes a numeric vector object v as parameter and returns its absolute value. In some embodiments, the computer code is formatted according to an object-oriented query language, allowing users to specify computations, filters and / or transformations over data streams at each connected edge computing device ECD. In other words, the present query language may be an object-oriented query language. An object-oriented query language is a language supporting queries where variables are bound to objects of any kind (e.g. numbers, vectors, matrices, strings, records, key-value repositories, and so forth). Objects can even represent entire edge computing devices ECD making it possible to make queries over possibly large collections of edge computing devices ECD and edge computing device ECD internal databases EDB. In the code examples above, the variables shakes and v are bound to streams and vectors, respectively. This may be contrasted to relational query languages such as SQL, wherein variables in queries (SQL's select-statement) must be bound only to rows in tables. Such object-oriented query language may allow filtering out and transforming data objects of any kind.

[0101] The present query language may in addition contain procedural (stateful) functions where the database EDB or the state of the edge computing device ECD itself is updated by calling the function. The query processor of the interpreting software function ES then has to take into account that the order in which stateful functions inside the query are called is significant, since it will change the result. For example, database EDB accesses after a state change will produce different results than before.

[0102] It is noted that there exist procedural statements in, for instance, SQL, allowing manipulation of states and variables in the said sense. However, in SQL queries (i.e. select-from- where statements) this is not allowed. Hence, one important difference between the present query language and for instance SQL is that the present query language allows for use of variables and / or stateful functions in queries that are defined using the query language and said syntax.

[0103] The result of an object-oriented query may also be a stream of objects. Such computations and filters over real-time streaming data may be defined, for instance using such an object- oriented query language, as mathematical formulas and expressions, herein denoted "stream models". Such a stream model is a set of definitions of mathematical functions, filters, and other expressions, defined over a stream of data such as measurements. Using an object-oriented query language, the models can be specified on a very high level without the user needing a deep programming knowledge. Instead of writing detailed programs ex- pressing how to execute the models, it is instead possible to simply specify in the stream model what to do in terms of the final end result, and how that end result depends on any intermediate calculation results. The user needs not worry about details on how to efficiently implement algorithms that integrate large numbers of edge computing devices ECD and central servers CS to achieve a common goal in terms of data collection and processing. In some embodiments, the stream of objects in a function returning a stream is stateful, e.g. by originating in a sensor S on an edge computing device ECD or the environment, such as is the case for accelerometer above. The query processor of the interpreting software function ES may therefore be arranged to consider side effects of such stateful stream functions when optimizing and executing the query. The order of the objects of the object data stream produced by such a query may furthermore also be significant and a function using or used by such a query therefore becomes stateful.

[0104] In some embodiments, the computer code may be provided to the edge computing device ECD, via the interface IF, as plaintext (as opposed to compiled / objective / machine code). In some embodiments, however, the computer code may be precompiled and be provided to the edge computing device ECD in non-plaintext, compiled into binary instructions format of the edge computing device ECD (the compilation may then be performed in a central server CS or somewhere else where more CPU / memory resources are available than on the edge computing device ECD in question). In the latter case, it is possible to provide the interpreting software function ES in a simpler version, configured to read and execute precompiled computer code. This will result in a simpler interpreting software function ES. However, in some embodiments at least one, such as at least several, substantially all or possibly even all edge computing devices ECD still feature a respective interpreting software function ES which is arranged to interpret plaintext computer code of said syntax. Whether or not each particular edge computing device ECD accepts plaintext computer code may be specified in the metadata in the database DB for the edge computing device ECD or edge computing device ECD type in question, and a central server CS may be arranged to check this metadata setting and to selectively compile or not compile the computer code distrib- uted to each edge computing device ECD based on such metadata setting.

[0105] As mentioned above, the object data stream may be a stream of data objects, such as a stream of data objects wherein each data object represents the values of a respective tensor, which in turn may represent, for instance, a current physical state of a particular local environment sensed using one or several sensors S. However, the data objects can be any type of data object, rangingfrom simple alphanumeric numeric information such as measurement values (INTs, LONGs, CHARs, etc.), over more complex data structures according to a predetermined syntax (ARRAYS, LISTs, SETs, BAGs, RECORDS, etc.). Preferably, such data structure definitions form part of the syntax of the query language. In, for instance, embedded software systems ESS, the data objects may furthermore be references to complex data objects or pointers, such as references to data objects or callback functions.

[0106] In some embodiments, each of said objects is processed by a callback function, e.g. of an embedded software system ESS and / or as a part of said interface IF and being executed in a defined central server CS, such as in a client application program in a central server CS, or on the edge computing device ECD. The object in question may comprise a pointer, address or other identification of said callback function. In some embodiments, the object data stream is an endless stream of objects, calculated by the interpreting software function ES of the edge computing device ECD continuously or intermittently over time and delivered to a querying recipient via interface IF. The stream of objects may be communicated via said digital communication interface IF, for instance using callback functions, upon becoming available after said calculation or batchwise, as the case may be. Being an endless stream of objects, said calculation and delivery, for instance as invocation of callback functions, may be ongoing until something stops it, such as a request to stop the delivery of the result of the query or that the edge computing device ECD in question goes offline or breaks. Hence, as used herein, the term "endless stream" is intended to mean a stream of data objects that has no defined end point at the time of que- rying, but instead is arranged to produce results, for instance by callback functions, that keep on being generated (and in applicable cases the corresponding callback function or functions being invoked) until some circumstance arises that causes the generation to stop.

[0107] In other words, such circumstance may be at least partly unpredictable at the time of initiation of the endless stream, requiring some kind of finishing mechanism to be activated to stop the endless stream. In some embodiments, said syntax allows for different conditional logic-depending execution paths, interpreted and executed by said interpreting software function ES. For instance, a query defined in terms of said computer code may comprise IF-statements, WHILE loops and similar.

[0108] Hence, queries defined using said query language may be defined to continuously result in computations over and / or filtering out of measurements in a source data stream available at an edge computing device ECD receiving the query in question, and to deliver as a result an endless data stream. Herein, such a query is denoted a "continuous query". In some embodiments, the present system 100, using a query language allowing such continuous queries, allows users to interactively specify continuous queries for continuously analysing measurements flowing through edge computing devices ECD and central servers CS in realtime. As mentioned, the result of a continuous query is a real-time (endless) object stream of processed / filtered measurements. The result thereby can be distributed to a consumer, such as for display to a user, by a special system callback function.

[0109] A continuous query, in contrast to a non-continuous query, will as a response deliver a data stream that is not only dependent on the state of the queried database at the time of posing the query, but that may also change over time as the internal state of the queried database changes. This is, for instance, true for a continuous query posed to an edge computing device ECD, having an internal database EDB internal state changes of which may affect the values of a data stream produced in response to said continuous query or when continuously accessing the latest reading produced by a sensor. As an example to illustrate this aspect, a continuous query may be defined to return a stream of the position vectors of a particular edge computing device EDC, as measured every second at all times when the device EDC in question is sufficiently close to a given geo-position. In this example, the calculation involving a comparison between a measured geo-location to a predetermined geo-position is performed locally on the edge computing device EDC, which then sends the processed data as a continuous data stream to a querying peer. Both stream models and user data may be stored in each individual edge computing device ECD in its object-oriented in-memory database EDB, and similarly on each central server CS (in general, any central server CS may run the interpreting software function ES, and may also comprise such an object-oriented database EDB used by the interpreting software function ES running on the central server CS). Since data stream processing at each edge computing device ECD normally involves matching in real-time fast flowing stream objects against data in the local database EDB, the fact that the database EDB is an object-oriented database makes it possible to design the edge computing device ECD to be computationally fast in relation to its CPU power due to efficient data representation and processing. Another way of viewing this is that the object-orientation aspect of the database EDB makes it specifically adapted for efficient handling of the objects constituting the data streams the primary task of the interpretation software function ES is to process. As an example, to determine that the frequency spectrum of a measured vibration may later destroy a sensing edge computing device ECD due to material fatigue, the frequencies measured by a vibration sensor S on the edge computing device ECD in question may be matched against a local object-oriented database EDB at the edge computing device EDC of resonance frequencies of the edge computing device EDB itself. One important aspect of the interpreting software function ES is that it may be designed to allow the combination of object streams from several different edge computing devices ECD. In other words, the interpreting software function ES may support the interpretation of "fusion queries", that can be defined using said query language and are defined to reference several different available source streams. The interpreting software function ES is then arranged to, when interpreting such a fusion query, computationally combine said available object streams to produce a particular output object stream. An example of such a fusion query is a continuous query designed so that it, when interpreted on a particular edge computing device ECD, causes the latter to observe when several other edge computing devices EDC in a particular geographical area detect strong vibrations at the same time. user is then alerted when this fusion query produces a predetermined result, perhaps together with a visualization in real-time of the maximum or average magnitude of the observed vibrations. The user can then interactively send new queries on-the-fly to affected edge computation devices ECD to find out details of their causes.

[0110] The query language, and in particular its syntax, may allow a query to refer to information 5 received by a first (requesting) edge computing device 110 (see Figure 2) from a second (responding) edge computing device 120. Such reference makes use of the above-described global namespace, and may in particular use the services of the namespace server NS to find the responding edge computing device 120 on the network NW. The contact may then be mediated by one or several intermediate central servers CS between the requesting and w responding edge computing device ECD. To achieve this, it is preferred that the query language is an object-oriented query language, as described above, according to which variables can be bound to edge computing device ECD objects of different kinds and where subqueries to edge computing device ECD objects can be expressed. is Hence, a first query received bythe first edge computing device 110 may include a reference to the second edge computing device 120. When interpreting the first query, the interpreting software function ES running on the first edge computing device 110 will then, as a result of the reference to the second edge computing device 120, pose a second query to the second edge computing device 120, requesting the particular information specified by the0 first query. The interpreting software function ES running on the second edge computing device 120 will then, when interpreting the second query, return an object stream to the first edge computing device 110, which will be used by the interpreting software function ES running on the first edge computing device 110 to calculate a result to the first query, in the form of an object stream returned to the entity posing the first query to the first edge5 computing device 110. In other words, the interpreting software function ES executing on the first edge computing device 110 may be arranged to cause the first edge computing device 110 to query said information from the second edge computing device 120, as a consequence of the computer code-defined query referring to the second edge computing device 120. Instead of, or in addition to, the second edge computing device 120, the reference in the query posed to the first edge computing device 110 may be to a particular sensor S comprised in the second edge computing device 120, such as sensor S also being identified and reachable via said global namespace.

[0111] The query posed to the first edge computing device 110 may be a continuous query, as may be the case for the query posed to the second edge computing device 120 as a result of the former query. However, these two queries may be either continuous or non-continuous independently of each other, depending on the actual information sought and how the que- ries are defined.

[0112] Furthermore, the system 100 may further comprise a third edge computing device 130, which may but does not have to be of the same type as the second edge computing device 120, in terms of what type of sensors S are available in the device and so forth.

[0113] The interpreting software function ES running on the first edge computing device 110 may then be arranged to, as a consequence of a namespace referral in the query posed to the first edge computing device 110, pose a respective query both to the second edge computing device 120 and to the third edge computing device 130. The interpreting software func- tion ES running on the third edge computing device 130 may then be arranged to, in response to the query being received from the first edge computing device 110, generate a resulting object stream and to communicate this object stream to the first edge computing device 110 via the digital interface IF of the first edge computing device 110. Then, the interpreting software function ES running on the first edge computing device 110 may be arranged to perform its calculation defined in the query posed to the first edge computing device 110 using both the object stream received from the second edge computing device 120 and the object stream received from the third edge computing device 130. In general, a respective result of said queries made by the first edge computing device 110 may comprise an endless respective stream of objects received by the first edge computing device 110 from the second 120 or third 130 edge computing devices, calculated by the second 120 or third 130 edge computing device continuously or intermittently over time and communicated to the first edge computing device 110 via the digital communication interface IF of the first edge computing device 110.

[0114] The interpreting software function ES executing on the first edge computing device 110 is, in turn, arranged to cause the first edge computing device 110 to pose the query in question as a consequence of the query received by the first edge computing device 110. It is noted that the first query may comprise, as a part of its computer code definition, the second and third queries, or computer code making it possible for the interpreting software function ES executing on the first edge computing device 110 to formulate the second and third queries for communication to the second and third edge computing devices 120, 130. Then, the respective interpreting software function ES executing on the second and third edge computing devices 120, 130 will interpret the second and third computer code-defined query, respectively, and as a result deliver the respective data stream to the first edge computing device 110. Then, the second and / or third query may in turn be defined in a way referring to a fourth and subsequent edge computing device ECS and / or sensor in a corresponding manner, depending on the definition of the first query. Since the query language may support complex logic and / or contain stateful functions as discussed above, such subsequent queries may be dynamically defined on each interpreting edge computing device ECD, for instance based on parameters describing a local network NW neighbourhood to the edge computing device ECD in question or other updated parameter data. This way, a single query posed to the first edge computing device 110 can give rise to an automatically developing cascade of queries, potentially involving massive numbers of other edge computing devices ECD collecting, processing and communication streams of data that eventually reach the first edge computing device 110 for processing. This also provides a very powerful way for a user to automatically deploy distributed logic to a complex system of edge computing devices ECD by basically defining the desired result, using necessary specificity, in the first query. For instance, the first query may define any other edge computing devices ECD to involve based on parameter data defined in the first query, such as particular geographic areas of interest and / or particular types of sensors S to be used. Then, the interpretation of the query may perform the actual selection of secondary edge computing devices ECD based on such parameter values and current conditions.

[0115] 5 These mechanisms also allow the local computational power of each edge computation device ECD to be maximally exploited in a truly distributed calculation, while still providing a robust, flexible and user-friendly system 100 which can be tailored and updated on-the-fly and in real-time. For instance, in case a user wishes to see what impact an updated query has, the updated query can simply be pushed to the first edge computing device 110, which w will immediately start to interpret the updated query, including updated queries to the second 120 and third 130 edge computing devices and so on, as the case may be, ultimately producing an updated object stream back to the querying user. This updated object stream will then generally be available more or less immediately, or at least sufficiently fast so as to allow the user to perform such deployment as a part of an iterative development func- 15 tion, where the updated object stream constitutes feedback to the design process, in turn comprising several iteratively amended first query definitions.

[0116] With a similar goal, each edge computing device ECD may be arranged to filter out (discard) at least some, preferably substantially all, or even all, measurement data measured by the0 sensor(s) S of the edge computing device ECD in question, instead of storing the measurement data in its memory M, after having communicated such measurement data and / or a piece of information calculated based on the measurement data over the digital communication interface IF, such as based on an interpreted query. In other words, each edge computing device ECD may perform the measurement, perform query-defined calculations5 based on the measurement data and send the measurement data and / or the result of said calculations to a requesting party and thereafter purge the measurement data from the memory M. This way, an efficient data flow can be achieved throughout the system 100, without clogging the individual memories M of individual edge computing devices ECD. 0 As mentioned, a query of the type described herein may refer to a particular edge computing device ECD and / or to a particular sensor S of such an edge computing device ECD. However, the interpretation software function ES of a particular edge computing device ECD may also refer to a particular object stream being produced within another edge computer device ECD, such as in the form of a result from an internal calculation or, more commonly, a stream of preprocessed or raw measurement data from a particular sensor S comprised in the other edge computing device ECD.

[0117] In particular, the interpreting software function ES of the first edge computing device 110 may be arranged to accept a subscription request from an alpha edge computing device 140 for an object stream resulting from an individual query processed by the interpreting soft- ware function ES of the first edge computing device 110, in a context where the alpha edge computing device 140 did not pose the query in question to the first edge computing device 110. For instance, the first edge computing device 110 may calculate an endless stream of analysed vibration measurements from various other edge computer devices ECD, as a result of a particular query defined within the first edge computing device 110 or posed to the first edge computing device 110 from some other peer entity. Then, the alpha edge computing device 140 may post a subscription to the resulting endless stream by requesting such a subscription via the interface IF of the first edge computing device 110. Such a subscription may be continuous or time-limited, and may of course be cancelled by the alpha edge computing device 140 at any time.

[0118] As described above, each edge computing device ECD has a relationship to a particular central server CS, and the two communicate. It is generally preferred that this relationship is a client-server type relationship, wherein the edge computing device ECD assumes a client role and the central server CS assumes a server role. This is advantageous from a security point of view, and also for being able to handle edge computing devices with limited capabilities or resources.

[0119] Hence, each of said edge computing devices ECD can have a client role in relation to a particular respective one of said central servers CS. That the edge computing device ECD has a client role means, in this context, that before an edge computing device ECD and a central server CS have established a communication connection, the central server CS cannot connect to such an edge computing device ECD. This means that the central server CS in question is not allowed to contact the edge computing device ECD. In other words, the central server CS comprises no functionality, or is not allowed access to necessary credentials, for establishing a communication link with the edge computing device ECD on the initiative of the central server CS, at least not a communication link useful for sending or receiving computer code of the type described herein. On the other hand, an edge computing device ECD can establish communication contact with a serving central server CS, such as using credentials (login credentials, PKI key credentials, or similar) Hence, before digital communication contact has been established between the edge computing device ECD and the central server CS, it is always the edge computing device ECD that initiates communication with its central server CS, and never the other way around.

[0120] After such digital communication has been established between the edge computing device ECD and its serving central server CS to achieve said client / server relationship, both the edge computing device ECD and the central server CS can communicate with its counterpart in the client / server relationship, using digital communication protocols that may be conventional per se.

[0121] As discussed above, in some embodiments all communication between individual edge computing devices ECD (such as communication with other edge computing devices ECD and the below-described interactive GUI) takes place via at least one central server CS, whereby no direct contact is allowed between individual edge computing devices ECD. In some cases, at least one central server CS serving an edge computing device ECD needs to communicate with one or more intermediary central servers CS, such as higher-level central servers CS in said tree structure, in order to reach a central server CS serving another edge computing device ECD.

[0122] Using such network topology, a secure system is achieved, in which there is also no need to provide edge computing devices ECD with server functionality, saving valuable storage space. As described above, in some embodiments the interpreting software function ES running on the first edge computing device 110 is arranged to pose a query to the second edge computing device 120, whereby the interpreting software function ES running on the second edge computing device 120 is arranged to, in response thereto, generate a stream of s data objects and to communicate this stream to the first edge computing device 110 via the digital communication interface IF of the first edge computing device 110. Then, the interpreting software function ES of the first edge computing device 110 is arranged to perform a calculation using said received stream of data to calculate a particular result. w In such a case, the interpreting software function ES of the first edge computing device 110 may be arranged to perform a preprocessing of the stream of data objects received from the second edge computing device 120, which preprocessing then results in a preprocessed stream of data objects which then forms the stream that is finally used in said calculation performed by the first edge computing device 110. In particular, this preprocessing opera- 75 tion may be arranged to transform the received stream of data objects so that the data contained therein adheres to a predefined global data ontology.

[0123] In general, such a preprocessing may comprise at least one of a mapping of a name standard, said name standard being local to an edge computing device ECD, to a global name0 standard, such as a system 100 global name standard; a measurement unit conversion; a defined data format conversion; and the application of the results of a measurement data calibration to a measurement value.

[0124] One simple example is the case in which the second edge computing device 120 internally5 uses a different measurement unit than what is a correct measurement unit according to said global data ontology. However, the preprocessing may also be more elaborate, such as statistically treating measurement data received in an object stream from the second edge computing device 120 so that it is stripped from statistical outliers, and so forth. In other examples, the binary data representation of the received data may be transformed to fit0 the global data ontology. For instance, signed four-byte integer values may be transformed to unsigned four-byte integer values. The term "data ontology", as it is used herein, refers to a system of definitions and / or rules with respect to measured data, specifying how measurement data is to be represented in terms of measurement units, statistical and calibration consideration standards, binary rep- resentation, etc.

[0125] For instance, fusion queries (discussed above) require the integrated data streams to be comparable even though the involved object streams may represent the same or similar data in different ways. For example, the second edge computing device 120 may represent temperature in Fahrenheit while the third edge computing device 130 uses Celsius. To be able to combine such heterogeneous data streams from different edge computing devices ECD, the interpreting software function ES, and in particular the interpreting software function ES executing on the first edge computer device 110, may be arranged to allow mediator models to be defined as queries and functions that harmonize arriving such heterogeneous object streams by transforming them to a universal model (the global data ontology). Such mediator models may be defined locally in any edge computing device ECD forming a stream server that integrate data streams from different other edge computing devices ECD. In addition to the above provided examples, such mediation may also comprise the mapping of local names of sensors S to a universally known nomenclature and calibrations of local measurements.

[0126] Hence, in the case described above, in which the first edge computing device 110 also poses a query to the third edge computing device 130, the interpreting software function ES of the first edge computing device 110 may be arranged to perform another preprocessing, now of the stream of data objects received from the third edge computing device 130. This other preprocessing may result, similarly to the preprocessing of the data received from the second edge computing device 120, in a preprocessed stream of data which is used in the calculation performed by the first edge computing device 110 instead of the data actually received from the third edge computing device 130. In a way corresponding to the previ- ously described preprocessing, this preprocessing may also be arranged to transform the stream of data received from the third edge computing device 130 so that the data adheres to said global data ontology.

[0127] Each of these preprocessing activities may use defined parameter values to perform the preprocessing in question. Such parameter values may be different for different preprocessing operations, and in particular different between data received from different edge computing devices ECD. They may be of the general type discussed above, including measurement units used and so forth. Using such parameters, that may be globally or locally defined for individual edge computing devices ECD or for defined types of such edge com- puting devices ECD, and that may be provided by one or several central servers CS and / or stored in individual edge computing devices ECD, a common data ontology can be automatically imparted throughout the system 100 even in case the system 100 encompasses many different types of diverse edge computing devices ECD, without the user having to worry about these aspects when defining her queries.

[0128] In some embodiments, said preprocessing is performed based on metadata regarding the second edge computing device 120, or regarding a specific defined type of edge computing device ECD to which the second edge computing device 120 belongs, from which the pre- processed data stream in question is received. This metadata may then be defined via the digital communication interface IF of the first edge computing device 110. In other words, information necessary to perform the preprocessing in question, for instance said preprocessing parameters, are communicated over the digital communication interface IF of the first edge computing device 110. For instance, the first edge computing device 110 may query its central server CS for such parameters based on the global namespace identity of the second edge computing device 120, and then use received such parameters in the preprocessing of the received data stream.

[0129] In some embodiments, the digital communication interface IF of the fist edge computing device 110 may comprise at least one wrapper mechanism, arranged to transform a re- ceived stream of data from an external data format to a data format internal to said query language. In other words, the second 120 and / or 130 third edge computing device delivers said data streams to the first computing device 110 using a data format (such as a defined data structure or binary representation) which is not according to said global data ontology and / or not internal to said query language. Then, the wrapper mechanism of the first edge computing device 110 may transform the received data and wrap it into a data format di- 5 rectly acceptable to the interpreting software function ES running on the first edge computing device 110.

[0130] That the data format is "internal" to the query language means that it is according to a data definition provided as a part of the definition of said query language and directly useful by w an interpreting software function ES without further conversion.

[0131] It is understood that the corresponding mechanism can be applied when the first edge computing device 110 receives data from a system 100 external source, or when the first edge computing device 110 receives data from a source within the system 100 but not constitut- 15 ing an edge computing device ECD itself. As is understood, the query language may support query definitions in terms of data collected from such "external" sources. Then, a corresponding wrapper can be defined in relation to such a data source, which wrapper is arranged to transform the received data to a corresponding query language internal data representation. This principle may in particular apply to received streams of such data. 0

[0132] Hence, wrapper functionality of the above discussed type may be in the form of an API that enables mapping over incoming data stream objects as they arrive in order to inject them into the interpreting software function ES kernel so that the accessed data stream can be used in continuous queries defined using said query language. The wrappers themselves5 may be defined as query language functions that return object streams from wrapped data sources. The system 100 may comprise a library of predefined wrappers to interoperate with common data infrastructures, such as relational databases through JDBC and data processing systems through Kafka, Azure loT Hub, or MQTT. Using the infrastructure with wrappers, new such wrappers can easily be developed and deployed on-the-fly as new needs0 arise. In order to allow cooperation between the interpreting software function ES and peripheral computer code, such as computer code not being formed from said query language but being executing on the same edge computing device ECD as the interpreting software function ES, the interpreting software function ES may comprise an external Application Pro- gramming Interface (API), arranged to allow expressions in the present query language to call such external computer code and / or arranged to allow external computer code to call expressions in the query language. "External computer code", in this context, is intended to mean computer code not being part of the interpreting software function ES and not being computer code according to said query language, such as other software running on the same edge computing device hardware or other hardware in digital communication with the edge computing device ECD in question.

[0133] For instance, the system 100 may include a library of predefined query language function for performing various specific tasks such as math / stat computations, object stream filter- ing and transformation, signal processing, model and data management, and so forth. This library may be stored in one or several central servers CS or be bundled together with the interpreting software function ES in each or at least several edge computing devices ECD. The function library may be modular in the sense that it can be extended to cater for new user needs and that it is arranged so that users can define and deploy new user functions on-the-fly by simply pushing updated library information to concerned devices ECD.

[0134] However, existing algorithms and code libraries may be implemented in other programming languages, or for other reasons not be directly compatible with the interpreting software function ES. Such existing code can then be plugged into the system 100 as "foreign" query language functions (see Figure 4a), using programming language specific APIs provided by the interpreting software function ES. Such foreign functions can then be transparently used in queries and expressions defined using the present query language. For example, in case the interpreting software function ES is implemented in Lisp and in case it is desired to use code in the C programming language as a part of the calculation of query results in an edge computing device ECS, such a C language specific API may be employed so that the interpreting software function ES can make function calls directly to the C language implemented code, resulting in that the corresponding C code is executed as a result of the interpreting software function ES performs interpretation and processing of a query.

[0135] As Figure 4a illustrates, using the concepts of foreign functions and stream wrappers, the 5 interpreting software function ES can be arranged to be very extensible, in the sense that many different kinds of plug-ins can be added without changing other parts of the system 100.

[0136] "Analysis models" (Figure 4a) are models that specify transformations, filters, computations w and inferences over source data streams, producing object data streams as a result. Such analysis models may be specified by a user without requiring deep programming skills or detailed knowledge about the inner workings of the interpreting software function ES kernel to define such models. Furthermore, such analysis models may be defined using the same object-oriented query language as used to define queries of the present type (using is said syntax). Hence, an analysis model may be defined as a set of query language functions and / or continuous query definitions pushed out to the edge computing device ECD via interface IF and stored in local database EDB. Thereafter, the analysis model can be used, via an API of the interpreting software function ES running on the edge computing device ECD in question, in queries posed to the edge computing device ECD. 0

[0137] Still with reference to Figure 4a, "foreign functions" are functions implemented in any conventional programming language, such as C, Lisp or Java, to implement an external algorithm, such as a numerical, statistical and / or inference algorithms. Such foreign functions can be used as plug-ins, referred to in queries of the present type defined using said query5 language. Using a foreign function API of the interpreting software function ES, such functions can be referred to and accessed directly, via query language reference, from the interpreting software function ES without porting or modification in any other way. Such foreign functions may be precompiled and loaded into the local memory M during installation or at a later time, such as when needed. In particular, such foreign function algorithms can0 be used in analysis models of the above described type to filter and transform the incoming data streams into derived object streams. Furthermore, foreign functions can be granted access to the functionality provided by the interpreting software function ES, allowing very powerful addition of capabilities to the interpreting software function ES via such foreign functions, for example to access file sys- terns, operating system calls, inference engines or complex database managers forming part of the kernel functionality. The foreign function API may also include the mapping of foreign language data structures to a query language data structure, so that data can be accessed directly without need for data transformation. For instance, a C language data structure can be directly mapped to a corresponding query language data structure, based on individual mapping definitions (comprised in said API) regarding simple and complex data types.

[0138] In order to access incoming data streams in continuous queries, data stream wrappers may be implemented as functions defined partly (as foreign functions) or completely using said query language. For example, the query language can be arranged with standard sensor interfaces for commonly used sensors S, available as a part of said interpreting software function ES. Only one such data stream wrapper needs to be implemented for each kind of incoming data stream; once implemented for a certain stream kind, all such streams can be queried using continuous queries of the present type. Such a data stream wrapper may then be defined as a continuous query returning an object data stream. Such a query may be defined in the form of a function, accepting arguments, for example to represent the identity of the stream it wraps.

[0139] A data steam wrapper needs to physically access an external data stream and convert each of its arriving data stream elements to a suitable data format for efficient and flexible pro- cessing by the interpreting software function ES. Different streams often represent their elements using different data structures, and data stream wrappers of the present type will therefore usually convert such external data representations to a format already supported by the interpreting software function ES. However, in some cases binary data representations can be lifted directly into the interpreting software function ES, without any data transformation. This can be made by mapping such a binary data representation to an internal binary data format specifically adapted to correspond to the known binary data format output by the sensor S in question.

[0140] The interpreting software function ES may be arranged with a built-in library of built-in data stream wrappers for common infrastructures, such as for Kafka, Azure loT Hub, MQTT, CVS and JSON streams. In addition to this, additional wrappers may easily be downloaded, as needed, onto each edge computing device ECD and as a result form part of the interpreting software function ES effective immediately. Normally, data streams originating from sensors S will be endless (as described above). However, data streams can also be finite in some cases. As an example, there may be a special JDBC data stream wrapper available that handles the finite result from an SQL query passed as a wrapper function parameter through JDBC to a relational database. This wrapper may then be used for persisting peer metadata in the nameserver NS.

[0141] As mentioned above and as illustrated in Figure 4a, the interpreting software function ES may also be embeddable in a software environment present on the hardware on which the interpreting software function ES executes. This way, an embedding application or system may access object data streams produced through a continuous query API provided by the interpreting software function ES. The embedding application program or system may run in the same process and address space as the interpreting software function ES, such as when running an embedded interpreting software function ES on an edge computing device ECD having limited hardware resources. In another example, an interpreting software function ES running on a particular edge computing device ECD may act as a client to a central server CS running on some other computer or cluster communicated with via TCP or some other communication infrastructure. For instance, there may be such interfaces to embeddings defined for common infrastructures such as Kafka, MQTT, or Azure EventHub.

[0142] Figure 4b illustrates a hierarchy of component parts in an example of an edge computing device ECD of the present type. Deeper layers are independent from upper layers. "Local database" is the local primary database EDB which exists in each edge computing device ECD as described above. In this database EDB, stream models and temporary data is stored. The local database EDB is managed by the subsystem denoted "saStorage" via interface "sa_storage.h". On top of "saStorage", there are two independent interpreters ("SLOG" and "aLisp"). Module "Lisp-SLOG API" is the glue between these interpreters, making it possible to call "aLisp" from "SLOG" and vice versa.

[0143] "aLisp" is an interpreter for a subset of "CommonLisp" (a per se conventional dialect of the Lisp programming language), extended by functions required to implement the upper application layers in the edge computing device ECD, namely "sa_kernel". "CommonLisp" is a conventional, functional programming language in which all functions return different types of (finite) objects as result. The object returned from a function is stored in the primary memory EDB, which becomes a problem in case the result is too big. Note that Lisp code is data stored in the primary database EDB.

[0144] On the other hand, "SLOG" is a data stream interpreter of execution plans expressed in a language similar to programming languages such as Prolog. A "SLOG"-operator returns not an individual object, but instead the result is a handle to a stream of objects. The calling application sends a callback to the "SLOG", applying the callback to the elements of the resulting object stream. Hence, "SLOG" operators are so-called generators, in contrast to functions in "aLisp". Foreign object-oriented query language ("OSQL") functions may be implemented as foreign "SLOG" operators. A foreign "SLOG" operator (that is, a foreign query language function) returns a stream of resulting objects by iteratively calling a callback func- tion in the interpreting software IS as parameter.

[0145] External programs, such as in embedded software systems ESS, can call the edge computing device ECD kernel via API "CQ API". The calling application can execute as a separate process on the same computer, or from a different peer or even an external entity, via some suitable communication system such as TCP. The calling application can also be in the form of one or several application threads. Thereby, the kernel guarantees thread safety. Elements of object streams can be transferred to said ESS by the interpreting software IS invoking callback functions in the embedded software system ESS.

[0146] Again with reference to Figure 2, in some embodiments of the present invention the system 100 further comprises an interactive Graphical User Interface (GUI), allowing a user of the system 100 to visually view computer code of the present type, formatted according to said syntax. This viewed computer code is computer code stored in several different of said edge computing devices ECD, computer code which uses said syntax to define several different queries using said query language. Said several different queries may generally include in- terrelations between requesting 110 and responding 120, 130 edge computing devices defined by the queries in question as described above, also in complex query-defined cascad- ing / tree configurations of the type discussed.

[0147] However, even though the GUI may also be arranged to display said computer code as al- phanumeric text, in the embodiments now discussed the GUI is arranged to visualize said computer code using a visual notation system.

[0148] Namely, the query language may be isomorph to such a visual notation system, meaning that any query language computer code which follows said syntax will have a visual coun- terpart representation that can be visualized in said interactive GUI. This visual notation system may be based on graphical primitives that have a well-defined one-to-one mapping to a computer code counterpart representation and are graphically interconnected, such as using lines or arrows, in a way representing how entities, data, calculations and queries are interconnected as defined by the query or queries defined by said computer code.

[0149] The isomorphism may be arranged so that the visual representation is more abstract than the actual computer code, hiding certain detail of the computer code such as particular calculations performed on particular data. However, it is preferred that the isomorphism is complete, meaning that the computer code can be completely represented by the visual notation system, and computer code and visual representation can be translated one to the other and back with no loss of information. Furthermore, the interactive GUI may be arranged to allow said user to graphically and interactively, such as using a computer screen and a computer mouse; or a touchscreen, change / amend / define one or several of said queries using directly said visual notation sys- tern. For instance, the user may drag-and-drop individual edge computing devices ECD to define requesting and responding edge computing devices ECD, or may add queries, query parameters and logic using graphical primitives in said interactive GUI. It is noted here that, due to said isomorphism, such changes will always perfectly correspond to changes in the alphanumeric computer code which is graphically represented.

[0150] Then, the interactive GUI is arranged to, as a result of such changes, communicate said updated computer code to any concerned edge computing devices ECD, reflecting any updates made to the visual representation. This may mean that one or several edge computing devices ECD will be provided with updated queries; that one or several edge computing de- vices ECD are instructed that the previously loaded continuous query is no longer to be active; and / or that one or several edge computing devices ECD are provided with updated queries. This provision takes place in the way generally described herein, using corresponding central servers CS to automatically push out the updates in question to the edge computing devices ECD in question. Once updated, the concerned edge computing devices ECD may in general start using (interpreting) the loaded queries immediately. In particular in case such visually defined and loaded queries are continuous queries of the above-described type, this will result in that a change in the interactive GUI leads to an immediate and automatic full-scale deployment of computer logic at possibly large number of concerned edge computing devices ECD.

[0151] The system 100 may be configured so that the interpreting software function ES continuously provides the interactive GUI (such as via its respective central server CS) with updated status regarding the status and information flows of the interpreting software function ES, so that the interactive GUI is updated in real-time or near real-time regarding the current status of the query programming and information flow in the system 100. This way, the interactive GUI will be dynamically updated to show changed information flows based on queries initiating, running, stopping, and so forth. This means that, when the user changes the visual representation of the computer code using the interactive GUI, the changes are instantly translated into corresponding computer code and pushed to con- cerned edge computing devices ECD (possibly after automatic compilation of the computer code for very slimmed edge computing devices ECD). The pushed query information in turn gives rise to modified information flows of various kinds, that are immediately reflected, by the feedback information from the edge computing devices ECD in question, in the graphical GUI for the user to see.

[0152] The interactive GUI may be arranged to request, from each of the concerned edge computing devices ECD, computer code stored therein, and to provide said visual view based on computer code received from said edge computing devices ECD in response to this request. Figure 6 illustrates a method for collecting data in the system 100.

[0153] In a first step, the method starts.

[0154] In a subsequent step, at least a first 110 and a second 120 ones of the plurality of edge computing devices ECD comprised in the system 100 are provided with a respective interpreting software function ES of the general type discussed herein, arranged to execute on the CPU of the edge computing device ECD in question and to interpret computer code of the type discussed herein, received via the digital communication interface IF of the edge computing device ECD in question and stored in the memory M of the edge computing de- vice ECD in question. Said computer code is according to a query language of the present type, having a predetermined syntax in turn being arranged to define queries the results of which are streams of data.

[0155] In a subsequent step, a first one 110 of said edge computing devices ECD provides to a sec- ond one 10 of said edge computing devices ECD, via the digital communication interface of the second edge computing device 120, computer code of said type defining at least one query using said syntax.

[0156] In a subsequent step, said second edge computing device interprets the received computer code, the interpretation comprising the second edge computing device 120 performing a calculation based on a measured value from a sensor S of the second edge computing device, and the query being defined in terms of the calculation to be performed.

[0157] In a subsequent step, the second edge computing device produces a result to said at least one query.

[0158] In a subsequent step, the second edge computing device communicates said result via said digital communication interface IF of the second edge computing device 120 to said first edge computing device 110.

[0159] It is understood that, in this and in other embodiment examples, communication between edge computing devices ECD may in general take place via the respective digital communication interface IF of each of the involved edge computing devices ECD in the communication in question, and also via any involved intermediary central servers CS.

[0160] In a subsequent step, the method ends.

[0161] Figure 7 illustrates a method for collecting data in the system 100. Again, the system 100 comprises at least a first edge computing device 110 and a second edge computing device 120.

[0162] In a first step, the method starts.

[0163] In a subsequent step, at least said first 110 and second 120 edge computing devices are provided with a respective interpreting software function ES of the present type, arranged to execute on the CPU of the edge computing device in question ECD and to interpret computer code of the present type, which code is received via the digital communication interface IF of the edge computing device ECD in question and stored in the memory M of the edge computing device ECD in question, according to a query language of the present type having a predetermined syntax, said syntax being arranged to define queries the re- suits of which are streams of data.

[0164] In a subsequent step, a first interpreting software function ES of said type, executing on the first edge computing device 110, poses a first query of said type to the second edge computing device 120.

[0165] In a subsequent step, a second interpreting software function ES of said type, executing on the second edge computing device 120, in response to said first query being received by the second edge computing device 120, generates a second stream of data (the term "second stream of data" simply denoting a stream of data produced by the "second" edge compu- ting device 120). The second edge computing device 120 communicates this second stream of data back to the first edge computing device 110, via the digital communication interface IF of the first edge computing device ECD.

[0166] In a subsequent step, the first interpreting software function ES performs a preprocessing (a "second" preprocessing, denoted this way since it is performed on the "second" stream of data) of said second stream of data, resulting in a preprocessed second stream of data used in said first calculation. This second preprocessing transforms the second stream of data so that it adheres to a predefined global data ontology of the type described herein. In a subsequent step, the first interpreting software function ES performs a first calculation using said preprocessed second stream of data to calculate a first result.

[0167] In a subsequent step, the method ends. Figure 8 illustrates a method for collecting data in the system 100 comprising several edge computing devices ECD of the present type. In a first step, the method starts.

[0168] In a subsequent step, each of said plurality of edge computing devices ECD is provided with a respective interpreting software function ES of the type described herein, arranged to execute on the CPU of the edge computing device ECD in question and to interpret computer code, received via the digital communication interface IF of the edge computing device ECD in question and stored in the memory M of the edge computing device ECD in question, according to a query language of the present type, having a predetermined syntax being arranged to define queries sent from a respective requesting edge computing device ECD to one or several respective responding edge computing devices ECD, in terms of respective calculations to be performed by the responding edge computing devices ECD in question based on a measured value from a respective sensor S of the responding edge computing device ECD, the results of which queries are streams of data returned to the requesting edge computing device ECD. The query language is isomorph to a visual notation system of the type and in the way described above.

[0169] In a subsequent step, an interactive Graphical User Interface (GUI) of the type described above is provided, allowing a user of the system 100 to visually view computer code stored in several different of said edge computing devices ECD using said syntax and defining several queries using said query language, including interrelations between requesting and responding edge computing devices ECD defined by the queries in question, using said visual notation system. In a subsequent step, the user uses said interactive GUI to graphically and interactively change one or several of said queries using said visual notation system.

[0170] In a subsequent step, the interactive GUI as a result automatically communicates updated computer code of said type to any concerned edge computing devices ECD reflecting said changes to the queries. In a subsequent step, the method ends.

[0171] These methods, and / or other aspects of methods as described herein, can in general be combined freely.

[0172] In the following, the processing of queries in systems 100 of the type described herein will be described in closer detail.

[0173] Generally, a query is processed by transforming and translating the query into a so-called execution plan. An execution plan is an intermediate program that, for a given query or function definition, explicitly specifies how the query is to be processed to achieve a response to the query. Specifically, an execution plan specifies a particular sequence of steps used to access data, such as in a database, to process a query. Aspects specified by the execution plan may comprise an optimized order and / or selected strategies for accessing both system internals, external algorithms and / or data streams. For tuning the performance of queries, execution plans may be configured to be inspectable by query tuning experts, and therefore expressed on a high and human readable level. However, they are not designed for actually programming a query algorithm, i.e. making pro- grams; rather, an execution plan can be represented as a data structure in the main memory of the edge computing device ECD. It can also be presented graphically to a user in the above-discussed GUI.

[0174] In the present system 100, execution plans can express streamed computations, in other words descriptions of high-performance computations of numerical algorithms applied on possibly endless (and possibly also continuous) streams of data flowing through the system 100. In the example of the presently described system 100, the internal execution plan language in which execution plans are expressed can be the one called SLOG (Streamed LOGic). SLOG is a very simple, but powerful, procedural algebra to represent executable procedural code over streaming data for optimized OSQL. An internal execution plan language used to define execution plans in the system 100, such as SLOG, can have one of, any combination of several of, or all of, the following properties:

[0175] Streaming: Instead of producing complete data objects, like a regular programming lan- guage, the internal execution plan language can be configured to generate possibly endless streams of bindings of variables to objects of different kinds, including strings, numbers, vectors, arrays, and even other streams. This can be achieved by not constructing complete data structures as the result from queries, but rather producing bindings of variables bound to stream elements and passed to applications through callback functions.

[0176] Filtering: The internal execution language can be configured to provide powerful logic filtering of data objects. This can be achieved by providing predicate logic based operators as in Datalog or SQL. Computation: The internal execution language can be configured to allow for high performance of numerical computations by at least partly being compilable to assembly instructions supported by the relevant hardware. This can be achieved by providing the possibility to declare variables and functions used in the query language to use basic hardware-oriented datatypes and instructions such as functions over numbers, arrays, or strings.

[0177] Simplicity: The internal execution plan language can be defined in terms of a small number of primitives, such as less than 10 operators that are well suited for efficient filtering and efficient computation over data streams and where at least some of the operators, in particular numerical operators, can easily be compiled into corresponding assembly instructions supported by the hardware. In the particular case of SLOG, it can be described by only five operators which are used for defining increasingly complex composed operators involving both streamed logic filtering and numerical computations.

[0178] Abstract: As mentioned, the internal execution plan language may be configured not to allow a user to write a computer program in the internal execution plan language; rather internal execution plan language programs may be configured to be represented as data structures in an internal main memory database in the edge computing device ECD. Such execution plans can be generated by a query optimizer based on the query in question. When, for instance, an OSQL query or function definition is perceived as slow, advanced users can inspect the generated SLOG algebra expressions to identify any poor optimization decisions in order to reformulate the query or instruct the query optimizer how to improve the plan.

[0179] Extensible: The internal execution language may be extensible so that new kinds of filtering and computations over data streams can be added without changing the core of the system. For this, the internal execution plan language can be configured to support foreign functions, of the general type discussed above. Such foreign functions can be implemented in some conventional regular external programming language, for instance to extend SLOG with new operators. The programmer thereby uses an API of the edge computing device ECD in question, making it possible to make computations based on so far bound variables that iteratively emit (tuples of) new variable bindings, being bound by the foreign function thus generating a stream of variables bound to objects. The API can be configured to include the possibility to influence the query optimizer, e.g. by providing costs and sizes of the results produced by the foreign functions to guide the query optimizer to reorder and transform the operators to optimize the execution speed and data requirements.

[0180] Embeddable: The internal execution plan language may be configured so that functions expressed in the internal execution plan language can be called from conventional regular programming languages used by an embedded software system ESS. The result is then returned as an object stream by the system calling call-back functions in the said embedded software system ESS expressed is said regular programming language that access the objects bound to variables generated by the object stream. In said API, functions in the calling program are called back from the interpreting software function ES of the edge computing device ECD for each tuple of bound variables in the returned object stream. As will be described in detail below, fragments of one (e.g. each) individual execution plan can be compiled all the way into binary machine-specific instructions, whereas any remaining parts of the internal execution plan language program can be interpreted.

[0181] 5 Starting from a general point of view, and as was described above in relation to Figure 2, the system 100 can be highly distributed, comprising a federation of several central servers CS that manage a possibly very large number of edge computing devices ECD. The system 100 can be scaled out to handle large numbers of edge computer devices ECD by forming hierarchies of central servers CS with registered edge computing devices ECD. This is illus- w trated in the example provided in Figure 5.

[0182] Each edge computing device ECDA (and possibly also each central server CS) can be of one of several possible types. A "full engine" device ("Query processor") includes all the software modules needed for query processing; whereas a "thin engine" device ("Query exec- 75 utor") can only run execution plans already generated (processed) by a full engine device.

[0183] Herein, the term interpretation software IS is used to denote such software modules configured to run query code in the ways described herein.

[0184] Since small edge computing devices ECD may have limited resources, such as having at the0 most 1 MB RAM, or at the most 512 KB RAM, or at the most 256 KB RAM, or at the most 128 KB, or even at the most 64 KB RAM, for a thin engine device, such as device with no user data stored in the local database and having no query optimizer, for instance a device as illustrated in Fig lib, 11c, lid. This RAM may be a volatile (non-persistent) RAM memory, not including any non-volatile (persistent) memory such as flash memory. Small edge com-5 puting devices ECD may also have limited connectivity. As a result, they may not be able to process queries by themselves, and instead need to be configured as thin engines. Each such thin engine edge computing devices ECD may then be arranged to only be able to execute queries already optimized and compiled on a full engine device, such as on a different edge computing device ECD or a central server CS being a full engine-type device. Note that0 the streaming architecture of the operators used in the execution plans as in SLOG limits the amount of memory required substantially compared to materializing large query results; the latter often being impossible in small devices with limited memory. In some embodiments, central servers CS are always full engines, while edge computing devices ECD may be either full engines or thin engines. For thin engine edge computing devices ECD, the query processing can be made in a central server CS where it is registered. A full engine 5 device, such as the one generally shown in Fig. 11a, can be implemented using at the most

[0185] 100 MB RAM, or at the most 50 MB RAM, or at the most 20 MB RAM, or at the most 10 MB RAM, or even less than 5 MB of RAM, with the corresponding definition of "RAM" as above.

[0186] Having said this, it is understood that individual central servers CS and edge computing de- w vices ECD may run interpreting software functions ES that may or may not differ between any two entities in details, scope or functionality.

[0187] As will be described in the following, a query formulated in the present query language can be translated into a corresponding execution plan. This execution plan can then be compiled is into a device-independent binary code and / or into a device-dependent binary code. Depending on hardware prerequisites on each type of edge computing device ECD, the interpreting software function ES being executed on the edge computing device ECD in question can comprise various levels of functionality. 0 In the simplest case, for a thin-engine edge computing device ECD that has very limited hardware specifications, the interpretation software IS can be arranged to interpret and execute a pre-compiled device-independent binary code, entailing translating each such binary instruction into a corresponding device-specific machine code instruction. There may also be thin-engine edge computing devices ECD that can only execute precompiled device-5 specific binary code, but in that case the system 100 will also comprise edge computing devices ECD arranged to interpret code as opposed to merely executing it.

[0188] For thin-engine or full-engine edge computing devices ECD have more powerful hardware specifications, the interpretation software IS can, in addition to interpreting device-inde-0 pendent binary code of said type, also interpret and execute non-compiled execution plans. For full-engine edge computing device ECD have even more powerful hardware specifications, the interpretation software IS can, in addition to interpreting device-independent binary code and non-compiled execution plans, also interpret and run query-language queries of the present type.

[0189] The system 100 can comprise one or several of one or several of the above types of thin- engine and full-engine edge computing devices ECD.

[0190] Figures lla-lld provide an overview of various alternatives.

[0191] Figure 11a illustrates select parts of an exemplary full-engine edge computing device ECD. As explained above, the edge computing device ECD comprises an interface IF via which it can receive queries, non-compiled execution plans, machine-specific assembler code and / or machine-independent assembler code from peer edge computing devices ECD and / or central servers CS. After processing of queries, such as producing a compiled or noncompiled execution plan from a query, the edge computing device ECD can send the results of such processing to one or several peer edge computing devices ECD and / or central servers CS. The edge computing device ECD comprises the interpreting software function ES, that in turn comprises said interpreting software IS. The interpreting software IS, in turn, comprises a module 201 arranged to interpret non-compiled query language code of the present type, and possibly arranged to produce compiled and / or non-compiled execution plan code of the present type. Module 201 can hence interpret, run and possibly at least partly translate and / or compile an incoming query. The interpreting software IS also comprises a module 202, arranged to interpret and run non-compiled execution plan code (such as SLOG code). The interpreting software IS also comprises a module 203, arranged to interpret and run platform-independent assembler code (such as SLAP code, see below). The interpreting software IS also comprises a module 204, arranged to execute platform-specific assembler code, such as by invoking a loader. Since the code defining the query to be run by the edge computing device ECD can comprise elements from each of the code abstrac- tion layers (query language code, execution plan code, machine-independent assembler code, machine-specific assembler code), the modules 201, 202, 203, 204 can communicate among each other so that the correct module handles the correct part or parts of the query in question. Specifically, module 201 can be arranged to push execution plans to module 202 for processing; whereas module 202 can push assembler code to modules 203 and / or 204 for processing. Any work product, such as an execution plan or compiled parts, can be s distributed back, via interface IF, to other edge computing devices ECD and / or central servers CS.

[0192] Figure lib illustrates a first exemplary thin-engine client edge computing device ECD, not comprising the module 201, but instead arranged to process, using modules 202, 203, 204 w as described above, execution plans and machine-independent / machine-specific assembler code. Any compiled assembler code produced can be distributed back, via interface IF, to other edge computing devices ECD and / or central servers CS. Otherwise, the edge computing device ECD of Figure lib functions in the same manner as the one of Figure 11a. is Figure 11c illustrates a second exemplary thin-engine client edge computing device ECD, corresponding to that of Figure lib but not comprising module 202. The client edge computing device ECD of Figure 11c can hence interpret and run assembler code in modules 203 and 204, but not perform any compilation the results of which can be distributed back. 0 Figure lid is similar to Figure 11c, but illustrates a third exemplary thin-engine client edge computing device ECD that also does not comprise the module 203.

[0193] It may be the case that all queries and models cannot be or is not completely compiled into binary instructions, for instance for this reason, in some embodiments the respective inter-5 pretation software IS of all, at least most, or at least several, of the edge computing devices ECD is arranged to interpret execution plans that are at least not completely compiled, in order to interpret execution plan fragments that have not been translated into binary code. In such cases, the execution plan compiler (query processor) identifies the code fragments in an execution plan that it can compile, and then generates binary code for those compiled0 execution plan fragments while leaving the rest to the interpreter. The execution plans may thus, in such cases, contain both internal execution plan language code and pointers to binary code fragments.

[0194] Alternatively, in some embodiments the interpretation software IS of all, at least several, or at least one, of the edge computing devices ECD may not contain a query processor. Instead, a query executor for assembly code (such as SLAP code, again see below) may be provided, so as to interpret any compiled machine-independent assembly code forming part of the query passed to the device in question. In both these alternatives, some (but not all) thin engine edge computing devices ECD of the system 100 may also not be provided with an interpreting software function ES at all, but be arranged to only receive queries in the form of compiled, platform-specific binary code, invoked by a loader. main purpose of the presently described system 100 is to enable full interactivity for an operating user, such as via said GUI. All optimizations and compilations should be executed without delay after a query or function definition has been defined.

[0195] To achieve this, it is important that the compilation time is minimised, so as to guarantee immediate execution of defined or updated queries without any noticeable delays for the operating user.

[0196] Moreover, since memory is often very limited on thin engines, the generated code size should be minimized. Considering such thin engines' often slow processing speeds, the gen- erated code should also be as efficient as possible.

[0197] The compilation and optimization of queries should also take into consideration that both edge computing devices ECD and central servers CS in (a federation of) the system 100 may have different hardware and / or operating system architectures. Namely, the system 100 architecture should be able to handle distribution of the code to all different kinds of peers in a federation, and therefore it must be possible to ship code for different architectures around the federation in question.

[0198] Furthermore, some edge computing devices ECD and / or central servers CS may miss certain 5 functionality. For instance, some devices may not support the generation of binary code (as is the case, for instance, for OSX devices). The system 100 may then comprise functionality to compensate for such missing functionality in different edge computing devices ECD and / or central servers CS.

[0199] 10 Figure 9 illustrates the steps of a method for query processing in the system 100, the system 100 being arranged to perform said steps. As mentioned above, the method is also for distributing and deploying software functionality across the system 100.

[0200] Figure 10 illustrates the information flow and process from the point of view of acting entire ties (software modules of the interpreting software function ES of a central server CS) and data on which the acting entities operate.

[0201] It is noted that all intermediate representations of information indicated in Figure 9 are inspectable for tuning experts. 0

[0202] In a first step, the method starts.

[0203] In a subsequent step, if this has not already been performed, the interpreting software function ES of the presently described type can be provided to one or several central servers CS5 and / or one or several edge computing devices ECD.

[0204] In a subsequent step, a central server CS accepts, from a querying party and via said digital communication interface IF, a query of the present type. The querying party may be a different central server CS, an edge computing device ECD or any external entity using the API0 of the central server CS to pose said query. As noted above, the query is defined so that the results of the query in question are streams of data objects, at least one of which streams is an endless stream of objects as discussed above, calculated based on data measured by the sensor S of the an edge computing device ECD. The results may then be provided continuously or intermittently over time and communicated via said digital communication interface IF as will be described in the following.

[0205] In particular, the received query can be defined according to a query language of the present type, having a predetermined syntax, the syntax being arranged to define queries the results of which are streams of data and to allow said query to be defined in terms of a calculation to be performed based on a measured value from said sensor S.

[0206] The query language may be an OSQL (object-oriented) query language.

[0207] To illustrate the principles of the present invention, the following example is provided, in the form of an OSQL function whose task it is to find a stream containing the prime numbers smaller than n: create function primes ( Integer n) ->Stream of Integer m as select m where notany ( select factor from Integer factor where mod (m, factor ) = 0 and factor in range ( 2 , sqrt (m) ) ) and m in range ( 2 , n) Note that the select expression in the body does not state in what order functions and filters should be evaluated; it merely states desired properties of the resulting stream of integers. It is up to the query processor to automatically generate an optimized executable program that computes the stream of prime numbers. Furthermore, OSQL functions can be defined in terms of variables of arbitrary domains, such as integers, vectors, matrices, strings, etc., which facilitates definition of queries and functions involving numerical computations. An OSQL query is regarded as an anonymous (lambda) function without arguments, which is executed immediately after it is defined. For example, the following OSQL query (defined to find the stream of numbers between 1 and 10 whose square root is smaller than 10): select Stream of i from Integer i where i in range ( 1 , 10 ) and sqrt ( i ) < 10 can be processed by generating the following anonymous lambda function: create function lambda ( ) ->Stream of Integer as select i from Integer i where i in range ( 1 , 10 ) and sqrt ( i ) < 10, and then immediately calling lambda ( ) .

[0208] In a subsequent step, the interpreting software function ES of the central server CS parses the received query, to produce a parsed query expression.

[0209] The query received by the central server CS may be in textual (plaintext) format, or be easily transformed into such format, by for instance unpacking and / or decrypting the query.

[0210] The first step of query processing is hence to textually parse the query into an equivalent syntax for internal further processing. Such equivalent may be a so-called abstract syntax tree, for instance an S-expression.

[0211] An abstract syntax tree is generally a data tree representation of the abstract syntactic structure of text, such as source code, the text being written in a formal language. Each node of the tree denotes a construct occurring in the text. An S-expression (or "symbolic expression") is generally an expression in a like-named notation for nested list (tree-structured) data. In the usual parenthesized syntax of Lisp, an S- expression may be defined as: 1. an atom, or

[0212] 2. an expression of the form (x .y), where x and y are S-expressions.

[0213] 5 More concretely, an S-expression can be viewed as a Lisp program that can be immediately evaluated. The evaluation of the S-expression may result in the execution of at least some of, such as all of, the succeeding query processing steps described below to evaluate the originally received query. The use of S-expressions enables representing OSQL in Lisp code that can then immediately be executed or shipped to other peer devices for remote evalu- w ation (i.e. transmission of the executable software code from the central server CS to a remote computer entity for subsequent execution, and the subsequent returning of the results of the execution back to the central server CS).

[0214] An S-expression for (equivalent to) primes ( ) looks like this:

[0215] 15

[0216] (create-function primes ( ( integer n) ) ( ( stream of ( ( integer m) ) ) ) as (m) where ( and (notany ( select ( factor) foreac ( ( integer factor) ) 0 where ( and (= (mod m factor) 0 )

[0217] (= ( in ( range 2 ( sqrt m) ) ) factor) ) ) )

[0218] (= ( in ( range 2 n) ) m) ) )

[0219] In a subsequent step, the parsed query can be translated, by the interpreting software func-5 tion ES of the central server CS, into an equivalent query in a declarative object-oriented query representation based on predicate logic. A "declarative" representation is one that defines the logic of a computation without specifying its control flow. A "predicate" is a logics symbol which represents a property or a relation. For instance, in the first order formula P(a), the symbol P is a predicate which applies to the individual constant a. Similarly,0 in the formula R(a,b), R is a predicate which applies to the individual constants a and b.

[0220] Predicates may be interpreted as relations. For instance, in a standard semantics for first- order logic, the formula R(a,b) would be true on an interpretation if the entities denoted by a and b stand in the relation denoted by R. In some embodiments, the declarative object-oriented query representation may have strong typing of various kinds of objects, such as tensors, functions, data generators, and so forth. "Strongly typed" languages have strict typing rules that allow the compiler to deter- mine the type of an expression at compile time, in contrast to "weakly typed" (or "late binding") languages (such as Lisp and Python), where the type of each object has to be determined at run time. The present inventor has successfully used a declarative object-oriented query representation extending Datalog (a declarative logic programming language being a subset of Prolog). However, the bottom-up query processing of Datalog is not suitable for data streams since it materializes large data objects to produce full query results, while data streaming instead produces stream of variable bindings to small transient objects passed to callback functions in applications.

[0221] An exemplary extension of a conventional language such as Datalog is primitives for defining user-defined predicates in terms of multi-directional foreign functions (i.e. functions which may be called with several different function inverses depending on what arguments and results are bound or unbound, called binding patterns, in the form of foreign OSQL functions defined in some external programming language, such as Lisp, Lisp, or Java. See T. Risch, et. al., "Representing Matrices Using Multi-Directional Foreign Functions", published in Gray, et. al., "Functional Approach to Computing with Data", Springer, ISBN 3-540-00375-4, 2004.

[0222] For example, a call to the function sqrt (Real x) ->Real y in a query select sqrt ( 4 ) requires the computation of y as the square root of x=4, i.e. x is bound and y is unbound. However, in the query select x from Number x where sqrt (x) =2, y=2 is bound and x is computed as y2. In the query select sqrt ( ) =2, both x and y are bound and the query optimizer will then choose an execution plan testing the 22=4, which is cheaper than testing that 2 is the square root of 4.

[0223] In some embodiments, the declarative object-oriented query representation may require foreign function definitions to also correspond to an inverse foreign function definition, or support such definitions. Thus, using multi-directional foreign functions, a programmer has the option to implement not only the function in the chosen external language, but also its inverse. For example, the inverse of the foreign function sqrt(Real x)->Real r is r2. This may substantially improve the performance of queries using the foreign function, since it allows the query optimizer, in the subsequent step of defining the execution plan, the choice between the function and its inverse to bind variables. By defining inverses to functions, the query optimizer is given more choices for optimizing queries, since it can bind more variables by applying such inverses. Hence, the declarative query representation may include such a multi-directional (orat least bi-directional) function.

[0224] In some embodiments, the declarative object-oriented query representation may require or support the use associated cost functions (cost models) for foreign function definitions.

[0225] The present inventor has successfully used, for the present purposes, the logical query language ObjectLog (see Risch, et. al., "Main Memory Oriented Optimization of 00 Queries using Typed Datalog with Foreign Predicates", EEE Transactions on Knowledge and Data Engineering, Vol. 4, No. 6, December 1992), by extended this query language with streams and tensors.

[0226] In the presently described translation into an equivalent query, the interpreting software function ES of the central server CS may use type inference (in general, "inference" refers to the automatic detection of the type of an expression in a formal language) to determine the types of variables occurring in the parsed query. The internal use of a predicate logicbased representation of the above-described type enables powerful logic-based transformations in the subsequent definition of the execution plan. Such transformations may be used to simplify and optimize the logical query expression, to produce equivalent smaller and faster expressions. However, the predicate representation may not be sufficient by it- self for efficient query execution, so the subsequent query processing steps (of defining the execution plan) may be supplemented with information from the original query along with data statistics, and knowledge about functions such as statistics about their execution costs, sizes of results and how large percentage of possible input arguments produce non-empty results to automatically choose a good strategy for the execution plan. The ObjectLog representation of the above function definition looks like this: predicate primes ( Integer n, Integer m) locals Stream of Integer v7 where makestream ( ( lambda ( Integer ml , Integer factor) locals Real v3 , Integer v6 where mod (ml , factor, 0 ) and sqrt (ml , v3 ) and cast_integer (v3 , v6 ) and range ( 2 , v6, factor) ) , m, v7 ) and notany (v7 ) and range ( 2 , n, m) ;

[0227] ObjectLog is a relational language (a type of programming language in which the program- ming logic is composed of relations and the output is computed based on the query applied) in which predicates p(vi,...,vn) are defined without specifying which variables vi are inputs and which variables vi are outputs. Thus, ObjectLog is a purely logical representation of a query definition, which is well suited for logical transformations and simplifications before the subsequent query optimization steps take place (to define the execution plan, see be- low). By contrast, OSQL is both a relational and a functional query language where OSQL functions are defined in terms of declarative queries ("select" expressions) where the inputs and outputs of the functions are indicated by the -> notation in the functions' head. In OSQL, functions are defined with a logical direction and producing results based on bound arguments. This is not the case in an ObjectLog relation, where it is not specified what variables are bound. In order to run an ObjectLog program from a given OSQL query, additional knowledge is required regarding what variables are bound in the OSQL query. Additional information can also include inverses of functions and cost models for foreign functions. It is realised that ObjectLog is one possible example of a useful relational language, and that other relational languages having one or more of the properties described here in relation to ObjectLog can be used instead.

[0228] As a simple example of an ObjectLog representation of a parsed query, assume the follow- ing query, defined to find the integers between 1 and 1,000,000 whose square root is 4: select Stream of x from Integer x where x in range ( 1 , 1000000 ) and sqrt (x) =4

[0229] Without knowing that the inverse of y=sqrt(x) is x=y2, the entity processing the query will have to test for a million values of x whether sqrt(x)=4. By knowing the inverse, a single multiplication 2*2 can be performed instead, which is more than a million times faster.

[0230] In the above-discussed prime number example, the ObjectLog compiler may perform type checking and unfold nested function calls into conjunctive predicates. Furthermore, it may generate a binding of the variable v7 to a stream of integers represented by an anonymous lambda predicate applied on the parameters m and v7. Anonymous lambda predicates and functions are not specific for ObjectLog, but can also be used in other examples. Here it is noted that testing the predicate mod (n, factor, o ) requires the variables n and f ctor to be known, and calling makestream (pred, arg, b) to define the stream b of integers as the set of possible bindings of v in pred ( arg, v) requires m to be bound, so the predicate definition cannot be executed as it looks. The query optimizer will, however, produce an executable program in the form of an execution plan.

[0231] Namely, in a subsequent step the interpreting software function ES of the central server CS can produce an execution plan corresponding to the above-discussed parsed (and possibly compiled) query expression, whereby the execution plan defines at least one calculation to be performed based on a measured value from the sensor S of the edge computing device ECD. It is understood that this definition may be explicit (e.g. explicitly referring the sensor S and / or the edge computing device ECD in question) or implicit (i.e. the identity of the sensor S being inferred from other information in the query or externally provided to the central server CS and / or the edge computing device ECD, or dynamically determined on- the-fly, at run-time, based on current parameter values).

[0232] To this end, SLOG (as characterised above) can be used, or an alternative internal execution plan language with one or more of the above-described properties can be used.

[0233] As explained above, the non-procedural logic-based query representations do not specify what algorithms (i.e. foreign functions) to use and in what order the elements of the result stream or set is produced. In this and in other situations, therefore, responding to a query or calling a function requires the query optimizer of the interpreting software function ES of the central server CS to choose a good execution strategy.

[0234] Cost-based query optimization (the practise of determining a most efficient way to execute a given query by considering a set of possible query plans) is useful for the present purposes to produce an execution plan based on data statistics and other knowledge about operators in queries and data stored in a memory database of the central server CS. Query optimization is used for producing an efficient and executable execution plan. This may be important, since a poor execution plan may be thousands of times slower than the optimal or even not executable.

[0235] As described above, the execution plan may be expressed using said internal execution plan language, which in particular for OSQL queries can be SLOG. Hence, for a given OSQL function, the query optimizer of the central server's CS interpreting software function ES can generate an optimized stream generator in SLOG that implements the function in question. The optimization can be guided by (based on) a query cost model that estimates the cost of calling a stream generator based on optimization metrics of the operators and algorithms used in it. A stream generator is a predicate extended with binding annotations indicating what variables are inputs and outputs in a predicate, respectively. When executed, a stream generator will generate a stream of bindings for the output variables, given that the input variables are known. For example, the function primes(lnteger n)->Stream of Integer m will produce a stream of bindings of variable m to prime numbers smaller than n. SLOG is an example of a very simple but powerful language for representing execution plans for OSQL as stream generators. It has only five built-in operators, namely "call" (call to foreign stream generator), "funcall" (foreign function call), "and" (conjunction), "or" (union), and "or!" (conditional union). In addition to the five system operators, the user can implement stream generators by APIs to some external programming languages. The system may comprise and support a library of predefined stream generators that can be used directly by the programmer. The following are some examples of SLOG algebra expressions generated for some exemplary OSQL queries.

[0236] The following stream generator is produced for function primes ( ) by the query optimizer: primes-! ( Integer n, Integer m) <- locals (Bag of Integer v6 ) call ( range — +, 2 , n, m) and funcall (makebag, ( lambda-! ( Integer ml , Integer factor) <- locals (Real v2 , Integer v5 ) funcall ( sqrt , ml , v2 ) and funcall ( cast_integer, v2 , v5 ) and call ( range — +, 2 , v5 , factor) and funcall (mod, ml , factor, 0 ) ) , m, v6 ) and funcall (notany, v6 )

[0237] Here, the test funcall (notany, v6 ) calls the foreign function notany (v6 ) that succeeds when it returns true if the bag v6 is empty.

[0238] Here, a stream generator in the SLOG execution plan is generated by annotating the previ- ous ObjectLog predicate with a binding pattern that indicates that the parameter n must be bound for it to be applicable and produces a stream of bindings to m. A binding pattern is a string where a indicates that a variable has to be bound to some value and a '+' indicates that the variable is going to be bound by invoking the stream generator. In general, SLOG stream generators produce zero, one or several bindings of unbound variables for the given bound ones. For example, the invocation of range — + ( 2 , v5 , factor) when v5 is bound to 3 generates an object stream of bindings of variable factor to each of the integers 2 and 3. A common case is stream generators generating a single value, called foreign functions. For example, the foreign function sqrt (x) computes the positive square root of x, and the foreign function call funcall ( sqrt , mi , v2 ) binds v2 to 2 if mi is bound to 4.

[0239] Queries may produce anonymous (lambda) stream generators, for example: lambda! ( Integer i ) <- call ( range — !, 1 , 10 , i ) and funcall ( less , i , 5 )

[0240] Hence, as a result of this step an execution plan is established, being equivalent to the query received (defined using said query language), the execution plan defining an efficient way to produce a response to (a result for) the query.

[0241] In a subsequent step, a part of the interpreting software function ES of the central server CS being an internal language compiler may then compile at least part of the resulting exe- cution plan by converting said at least part of the execution plan to corresponding platformindependent assembly code ("assembly program", defined in an assembly program language).

[0242] It is noted herein that the term "assembly program language" refers to a symbolic machine code language generally using one statement per machine instruction. However, the assembly program may be defined in a platform-independent manner, independent of specific hardware and / or operating system requirements or functionality that may exist on the edge computing device ECD that is to execute the corresponding binary machine code (see below). The assembly program can be defined as binary or plaintext code. The assembly pro- gram can be translated into binary code for a specific computer architecture by a binary code generator for the specific computer architecture. In some embodiments, at least part of the resulting execution plan is, however, not compiled, but kept as non-assembly, non-binary code to be interpreted by the interpreting software function ES of the edge computing device ECD. As a result of the compilation into assembler code, the performance of an execution plan produced in the general way described above, by the query optimizer, is further improved. Continuing the example using SLOG as the internal execution plan language, the SLOG compiler translates SLOG stream generators of the above-described type into an assembly program language called SLAP (SLog AssemblyProgram).

[0243] In general, a machine-independent assembly language can be used as the assembly program language. SLAP is an example of such machine-independent assembly language. When compiling execution plans into such an assembly language, some further code generation optimizations methods can be applied to improve execution speed and minimize code size, such as removing unnecessary jumps, optimizing register allocations, peephole optimization, and dead code elimination.

[0244] In some embodiments, where there is no binary code generator implemented for some computer architecture or if it is not allowed to generate binary code for some architecture (such as OSX), an abstract code (e.g. SLAP) interpreter of the interpreting software IS can be used to interpret the assembly program.

[0245] In some embodiments, the internal execution plan language is of a type that the interpreter function of the edge computing device ECD can directly interpret in case internal execution plan language statements are not compiled. This is, for instance, the case in the exemplary system 100 described herein, using SLOG as the internal execution plan language and SLAP as the assembly program language.

[0246] Hence, the established execution plan, defined using the internal execution plan language, needs not be completely compiled into the assembly program language, since it can also be directly interpreted by the interpreting software function ES. Therefore, the (e.g. SLOG) compiler can generate (e.g. SLAP) assembly program language code fragments for the (e.g. SLOG) expressions that it can compile (into e.g. SLAP), while the interpreting software function ES handles the remaining (e.g. SLOG) code, that cannot be further compiled orforwhich compilation is deemed not to pay off, by interpretation.

[0247] For example, the compiler may be configured not to compile objects whose types cannot be statically determined; and / or operations and operations that the compiler does not support, such as string operations, iterations over bags and streams, data conversions etc., as the case may be. Normally, it does not pay off to compile costly operations not supported by machine instructions, such as FFT (Fast Fourier Transform); image recognition; and advanced numerical array computations. Hence, such operators are instead implemented as interpreted calls to regular foreign functions.

[0248] Continuing the above example of primes, the SLOG code with SLAP code fragments will look like this: primes-! ( Integer n, Integer m) <- locals (Bag of Integer v6 ) call ( slap — +, <codel>, n, m) and funcall (makebag, ( lambda-! ( Integer ml , Integer factor) <- call ( slap — +, <code2>, ml , factor) ) , m, v6 ) and funcall (notany (v6 ) )

[0249] Since the SLOG code in the body of the inner anonymous (lambda) stream generator con- tains only defined types (Integer and Real), and only arithmetic operations, it can be fully compiled into SLAP code in <code2>. The SLAP code in <codei> implements a loop producing the integers between 2 and n.

[0250] In a subsequent step, a binary code assembler part of the interpreting software function ES of the central server CS may transcribe at least part of the assembly program into platformspecific binary code. This process of transcribing may completely be comprised of a simple statement-by-statement translation of the assembly statements of the produced platform- independent assembly program into the corresponding platform-specific binary statements for the particular hardware / operating system platform that the execution plan is intended to be executed on. Hence, the binary code assembler (such as a SLAP assembler) of the interpreting software function ES of the central server CS may produce binary codes (statements) for one or several of the target architectures supported by the system 100, so as to produce a code bundle of binary codes for different architectures. Both the platform-specific code bundles and the platform-independent (SLAP) code can be saved in the database of the central server CS for later re-use. To produce platform-specific binary code for different kinds of edge computing devices ECD, specific binary assemblers, such a specific SLAP binary assemblers, can be made available for each supported target architecture. A code bundle can also contain several kinds of assembled binary machine code, which is then called from (executed as initiated by) the interpreter on the target machine (the edge computing device ECD in question) at run time.

[0251] The machine-specific binary code can be assembled on the fly into the target machine architecture and saved in the database of the central server CS in direct connection to when the code is (to be) sent to an edge computing device ECD for query processing. If the code is executed in a central server CS, it can be immediately assembled to the native machine code of the central server CS.

[0252] As an alternative to binary code, the binary code assembler may also produce platformspecific assembly program code. In this case, such assembly code can be efficiently byte code interpreted in edge computing devices ECD the machine architectures of which do not allow just-in-time compilation. This is for example the case for OSX.

[0253] Continuing with the SLOG / SLAP example, the following are illustrative statements in different platform-specific formats (apart from the first line, showing the corresponding plat- form-independent SLAP statement): dadd D2 , D3 ; SLAP assembly instruction addsd xmm2 , xmm3 ; Intel x86-64 assembly instruction fadd D2 , D3 ; ARM Aarch64 assembly instruction The binary code assembler can allocate the available registers of the target architecture, place the rest of the operands on the stack (SLAP typically has more registers than physical devices), and transcribe each instruction one-to-one.

[0254] Any parts of the execution plan that is not compiled into assembly code and / or that is not transcribed into platform-specific assembly / binary code can be interpreted by the edge computing device ECD interpreting software function ES. Any compiled and transcribed binary code parts of the execution plan can instead be directly executed by the processor of the edge computing device ECD. In case the entire execution plan can be compiled into assembler, there is even no need for an execution plan interpreter on the edge computing device ECD, which saves storage space (both RAM and flash) on the edge computing device ECD. In such cases, the central server CS may determine whether a particular query definition needs the execution plan language interpreter function to be installed on the edge computing device ECD in order to run a given query or calling a function, and, if this is the case, initiate the automatic downloading and installation of such function on the edge computing device ECD in question if not already installed.

[0255] In some embodiments, at least for one, such as several, edge computer devices ECD in the system 100, the edge computing device ECD in question is capable of both interpreting the internal execution plan language code and executing at least one of compiled assembly code and transcribed binary code. Furthermore, in some embodiments at least part of the execution plan definition is compiled whereas at least part of the execution plan is not compiled. In a subsequent step, at least one of the edge computing devices ECD can then receive, via its digital communication interface IF, the at least partly compiled execution plan produced as described above. In a subsequent step, the interpreting software function ES of said at least one of said edge computing devices ECD, executing on the CPU of the edge computing device ECD in question, runs both any compiled and any non-compiled parts of said at least partly compiled execution plan, as the case may be, to produce a first result to said at least partly compiled execution plan. The interpretation comprises the performance of the above-described cal- culation based on the measured sensor S data.

[0256] From the above it is clearthat this running may be performed on one single edge computing device ECD; on several edge computing devices ECD in parallel; and / or in a multi-layered set of edge computing devices ECD reporting to each other according to a tree structure of such edge computing devices ECD. Typically, this will be defined directly in the parsed query.

[0257] As has been illustrated and explained above, any non-compiled parts of the execution plan are run by the interpreting software function ES of the edge computing device ECD interpreting the execution plan parts in question; whereas any compiled parts of the execution plan are run by the interpreting software function ES of the edge computing device ECD initiating their execution directly by the CPU of the edge computing device ECD.

[0258] In a subsequent step, the edge computing device ECD communicates the result of the run execution plan (the first result, which is then an endless stream of objects as described above) via its digital communication interface IF to the central server CS.

[0259] In a subsequent step, the central server CS, in reaction to the reception of this result from the edge computing device ECD, communicates the results of the query, or a secondary result being calculated based upon the results received from the edge computing device ECD, to the querying party in question. This then constitutes a response to the posed query. In alternative embodiments, the edge computing device ECD may communicate the results to a different entity, such as a different central server CS or a different edge computing device, as may be specified (or implied) as a part of the query. Correspondingly, in case the central server CS receives the results, it may provide the querying entity with the results (or the secondary results) to a different entity than the querying one.

[0260] The system 100 may be configured so that any system peer edge computing devices ECD and / or central servers CS that receives a query from any entity can request immediate full query processing of such received query by its parent central server CS. The parent central server CS will then, in response to such request, perform the steps described above to produce an at least partly compiled execution plan that is shipped back to the requesting child entity. This shipped execution plan can then contain only the platform-specific binary code for the particular hardware and / or operating system of the requesting child entity (along with any non-compiled parts of the execution plan). It can also contain platform-independ- ent binary code as described above. The parent central server CS may be configured to store the compiled and non-compiled parts of the execution plan in its database for later use by similarly or differently configured edge computing devices ECD.

[0261] The present system 100 can generally be designed to minimize unnecessary work and to keep thin engines (edge computing devices ECD) as simple as possible. This can be achieved while keeping the possibility of full functionality for full engines. Also, by sending queries for optimization and compilation to some other peer in the federation producing an execution plan and / or binary code for execution on the peer, thin engines can be operated using a broad functionality spectrum.

[0262] Hence, the internal language compiler can be configured to only or at least compile arithmetic parts of the internal-language execution plan and to leave remaining predicates as they are for the interpreting software function ES to interpret at the edge computing device ECD. The internal language compiler can hence be configured to replace the compiled pred- icates with one CODE object per group of adjacent predicates. In some embodiments, the internal language compiler can be configured to compile the execution plan into the platform-independent assembly program and thereafter to save the assembly program, such as in the database of the central server CS. Then, in case an additional edge computing device ECD is called upon to process the same query, or part of the query, the saved assembly program can be quickly transcribed, by the same or a different central server CS, into binary code specific to whatever hardware and / or operating system platform the additional edge computing device ECD has. The saved assembly program (such as SLAP code) can be stored in a shared manner in the system 100, such as shared among peer central servers CS for re-use on a system 100 wide level. This saves the internal Ian- guage compiler from having to compile the same execution plan several times for different machine architectures; the transcribing is typically much fasterthan the compiling. The plat- form-independent assembly program can also be interpreted on one or several edge computing devices ECD as described above. Furthermore, using the above-described methodology, the central server CS may be configured to only transcribe the platform-independent assembly program into platform-specific machine code when necessary, and then to retain (cache) the resulting platform-specific binary code for later re-use. Since transcribing typically is a very inexpensive operation, it can be configured to be performed on the fly, such as even while (as a part of the) sending the execution plan to a peer central server CS or to an edge computing device ECD.

[0263] Also, the platform-independent assembly language, such as SLAP code, can easily be made portable and efficient both in code size and interpretation time, for easy sharing among peer central servers CS for re-use and deployment at various edge computing devices ECD.

[0264] In case the platform-independent assembly program is interpreted by the interpreting software function ES at the edge computing device ECD (which is also possible in some embod- iments), such interpretation is typically faster than the interpretation of the internal execution plan language, at least in case it represents several predicates. In some embodiments the assembly program contains one or several special instructions arranged to, when invoked, call the interpreter for internal language code that cannot be, or is not, translated into binary code. For example, it may be necessary to call the interpreter when starting the processing of a new stream. This makes it possible to eliminate parts or all of the interpreter for the execution language on small edge computing devices ECD.

[0265] Hence, the interpreting software function ES of each edge computing device ECD can be configured to interpret the internal execution plan language and / or the assembly language, as the case may be.

[0266] A full engine may hence be provided with, and handle, code (corresponding to the query or part of the query) defined in the internal execution plan language; in the assembly language; and / or in the platform-specific binary code, and can then handle each of these instances by its locally installed and executing interpretating software function ES. To the contrary, a thin engine may be configured to always only receive respective platform-specific binary code. In the latter case no interpreter for the execution language is needed.

[0267] All parsed, compiled, optimised and transcribed code may be cached and / or shared among different central servers CS, for re-use. As an example, when adding a new target architecture for edge computing devices ECD, it is straightforward to implement a transcriber backend for this new target architecture. As all code optimizations are done on a higher level (when defining the execution plan), the transcription can be performed centrally and thereafter automatically be disseminated to all concerned devices, such as on the fly when needed.

[0268] As mentioned, thin engine edge computing devices ECD may be configured not to include query processing algorithms, and their interpreting software function ES can as such then not define but only execute optimized and compiled execution plans as illustrated in Figure 10 (the interpreting software function ES then only comprises an internal execution plan language interpreter and downstream components, or in some embodiments only downstream components). In the example of SLOG discussed above, the internal execution plan language interpreter may be a SLOG interpreter, available on thin engine edge computing devices ECD and configured to handle SLOG primitives for which the SLOG compiler cannot generate assembly code. For thin engine edge computing devices ECD, the execution plan can generally contain pointers to binary code fragments that are invoked by the internal execution plan language interpreter when encountered in the execution plan, and therefore such thin engine edge computing devices ECD can also handle such pointed-to binary code comprised in the interpreted execution plan. There may be computer architectures for which no binary code generator (such as no SLAP binary code generator) is implemented, or computers for which it is not allowed for platform reasons to dynamically generate binary code, e.g. in OSX devices. To handle this, the system 100 can also comprise a assembly program (such as SLAP) byte code interpreter as part of an interpreting software function ES on at least some edge computing devices ECD, that interprets assembly program instructions on computers where the assembly program language cannot be transcribed into binary code. This is also illustrated in Figure 10. In this case the execution plan may contain pointers to code fragments represented as platformindependent assembly language instructions, for which the internal execution plan language interpreter can call the assembly program interpreter of the interpreting software function ES.

[0269] Above, preferred embodiments have been described. However, it is apparent to the skilled person that many modifications can be made to the disclosed embodiments without departing from the basic idea of the invention.

[0270] For instance, the edge computing devices ECD may take many different forms in terms of hardware and software platforms. Since the interpreting software function ES is easily ported and can run in a way essentially independent from the details of its environment (much like Java code), it can be deployed and operated on nearly any general-purpose pro- grammable hardware which is connected to a computer network such the internet in at least one of the forms described above. One and the same system 100 may comprise many different types of edge computing devices ECD without having to take special consideration to other things than hardware limitations of each edge computing device ECD.

[0271] In some embodiments the device is only intermittently connected to a computer network, in which case the installation of the execution plans are delayed until when the device is later connected to the network.

[0272] In some embodiments, the device may be connected to the internet only when the (compiled) execution plans are installed on the device. The execution plans are after that run autonomously without connecting to the network again.

[0273] The above description describes numerous different embodiments. In general, all embodiments are freely combinable as long as nothing else is said and as long as they are compatible. This should frequently be the case.

[0274] As an example, edge computing devices EDC and / or central servers CS may pose queries to each other in tree structures, as described herein. In such cases, each pair of querying entity and queried entity may act as a respective central server CS in relation to a respective edge computing device EDC in terms of the parsing, compiling, optimisation and transcribing of query code as also described herein. Such querying can hence take place in multiple layers of devices.

[0275] Hence, the invention is not limited to the described embodiments, but can be varied within the scope of the enclosed claims.

Claims

C L A I M S1. System (100) comprising several edge computing devices (ECD) and a first central server (CS), each such edge computing device (ECD) and each such central server (CS) in turn comprising a memory (M); a Central Processing Unit, CPU; and a digital communication interface (IF), arranged to allow digital communication across a digital communication network (NW), each of said edge computing devices (ECD) also comprising a sensor (S), wherein the central server (CS) is arranged to accept, from a querying party and via said digital communication interface (IF), a query the result of which comprises at least one stream of data objects, at least one of said streams being an endless stream of objects, calculated based on data measured by said sensor (S) and provided continuously or inter- mittently over time and communicated via said digital communication interface (IF), said endless stream having no defined end point at the time of querying, c h a r a c t e r i s e d i n that the central server (CS) is arranged to perform the following steps: a) parse said query to produce a parsed query expression; b) produce an execution plan corresponding to the parsed query expression; and c) compile part of the execution plan, leaving at least part of the execution plan non-compiled, by converting said at least part of the execution plan to corresponding platform-independent assembly code, to thereby obtain a partly compiled execution plan, in that at least one of said edge computing devices (ECD) is arranged to then receive, via said digital communication interface (IF), the partly compiled execution plan, in that said at least one of said edge computing devices (ECD) is arranged with an interpreting software function (ES), arranged to execute on said CPU of the edge computing device (ECD) and to, by means of interpretation of at least part of said partly compiledexecution plan, run both compiled and non-compiled parts of said partly compiled execution plan; in that each edge computing device (ECD) is arranged to, when running said partly compiled execution plan, produce a first result to said partly compiled execution plan and to com- municate said first result via said digital communication interface (IF), in that said partly compiled execution plan defines a calculation to be performed based on a measured value from said sensor (S), and in that the edge computing device (ECD) in question is arranged to perform, as a part of said interpretation, said calculation.

2. System (100) according to claim 1, wherein the query is defined according to a query language having a predetermined syntax, the syntax being arranged to define queries the results of which comprise at least one stream of data and to allow said query to be defined in terms of a calculation to be performed based on a measured value from said sensor (S).

3. System (100) according to claim 1 or 2, wherein the query language is an object-oriented query language.

4. System (100) according to any preceding claim, wherein the parsing comprising parsing the query into an equivalent abstract syntax tree, such as into an S-expression.

5. System (100) according to any preceding claim, wherein the parsing is into a representation that is one or several of declarative; object-oriented; based on predicate logic, for instance employing multi-directional foreign functions; strongly typed; and relational.

6. System (100) according to claim 5, wherein the representation is extensible by providing primitives for user-defined predicates, for instance in terms of multi-directional foreign functions where different implementations are provided depending on a known / un- known status of foreign function parameters.

7. System (100) according to any preceding claim, wherein step c comprises the central server (CS) transcribing at least part of the assembly code into platform-specific assembly code.5 8. System (100) according to any preceding claim, wherein any non-compiled parts of the execution plan are run by the interpreting software function (ES) of the edge computing device (ECD) interpreting the execution plan parts in question; whereas any compiled parts of the execution plan are run by the interpreting software function (ES) of the edge computing device (ECD) initiating their execution directly by the CPU of the edge w computing device (ECD).

9. System (100) according to any preceding claim, wherein, in step c, only or at least arithmetic parts of the execution plan are compiled. is 10. System (100) according to any preceding claim, wherein the central server (CS) is arranged to save the platform-independent assembly code for later re-use.

11. System (100) according to claim 10, wherein the central server (CS) is arranged to transcribe the saved platform-independent assembly code into platform-specific code of0 a different edge computing device (ECD).

12. System (100) according to any preceding claim, wherein each sensor (S) and / or edge computing device (ECD) is referable, according to said syntax, using a global namespace or set of properties.

513. System (100) according to any preceding claim, wherein each edge computing device (ECD) is arranged to discard at least some, preferably all, measurement data measured by said sensor (S), instead of storing it in said memory (M), after having communicated said measurement data and / or a piece of information calculated based on said measurement0 data, such as said result, over said digital communication interface (IF).

14. System (100) according to any preceding claim, wherein the system (100) further comprises a distributed or monolithic central server (CS), in relation to which each of said edgecomputing devices (ECD) has a client role, and wherein all communication between individual edge computing devices (ECD) takes place via said central server (CS).

15. System (100) according to any preceding claim, wherein said interpreting software 5 function (ES) comprises an external Application Programming Interface, API, arranged to allow expressions in said query language to call external computer code and / or arranged to allow external computer code to call expressions in said query language.

16. System (100) according to any preceding claim, wherein said interpreting software w function (ES) comprises a machine learning function, arranged to define, train and execute a machine learning model such as a neural network.

17. System (100) according to claim 16, wherein the memory (M) of said edge computing device (ECD) comprises a defined and trained machine learning function which is referred is to by the query interpreted by the interpreting software function (ES) executing on the edge computing device (ECD) in question.

18. System (100) according to claim 16 or 17, wherein the interpreting software function (ES) in question is arranged to train said defined machine learning function based on said0 result of said query.

19. Method for collecting data in a system (100), the system (100) comprising several edge computing devices (ECD) and a first central server (CS), each such computing device (ECD) and each such central server (CS) in turn comprising a memory (M); a Central Pro-5 cessing Unit, CPU; and a digital communication interface (IF), arranged to allow digital communication across a digital communication network (NW), each of said edge computing devices (ECD) also comprising a sensor (S), c h a r a c t e r i s e d i n that the method comprises the steps a) the central server (CS) accepting, from a querying party and via said digital communi-0 cation interface (IF), a query the result of which comprises at least one stream of data objects, at least one of said streams being an endless stream of objects, calculated based on data measured by said sensor (S) and provided continuously orintermittently over time and communicated via said digital communication interface (IF), said endless stream having no defined end point at the time of querying; b) the central server (CS) parsing said query to produce a parsed query expression; c) the central server (CS) producing an execution plan corresponding to the parsed query expression, said execution plan defining a calculation to be performed based on a measured value from said sensor (S); d) the central server (CS) compiling part of the execution plan, leaving at least part of the execution plan non-compiled, by converting said at least part of the execution plan to corresponding platform-independent assembly code, to thereby obtain a partly compiled execution plan; e) at least one of said edge computing devices (ECD) receiving, via said digital communication interface (IF), the partly compiled execution plan; and f) an interpreting software function (ES) of said at least one of said edge computing devices (ECD) executing on said CPU of the edge computing device (ECD) and, by means of interpretation of at least part of said partly compiled execution plan, running both compiled and non-compiled parts of said partly compiled execution plan to produce a first result to said partly compiled execution plan, the interpretation comprising the performance of said calculation.

Citation Information

Patent Citations

  • Method and system for data processing

    WO2022045943A1

  • System and method for processing data

    WO2025127987A1