CUSTOMIZING A SOFTWARE APPLICATION RUNNING ON A GATEWAY
Patent Information
- Application Number
- DE502019011858
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-12-12
- Filing Date
- 2019-12-04
- Publication Date
- 2024-08-29
- Estimated Expiration
- 2039-12-04
AI Technical Summary
Current methods for data transmission from local networks to cloud networks in IoT systems are inefficient due to fluctuations in bandwidth and data size, and existing Quality of Service (QoS) concepts do not adequately address the needs of software applications, particularly in managing complex work states and handling different types of data.
A method using machine learning, specifically reinforcement learning (Q-learning), to customize the behavior of software applications running on gateways, where the gateway's environment states and actions are evaluated for quality values, allowing the gateway to execute actions with higher quality values, and a trained model is used to simplify calculations, reducing the computational burden on the gateway.
This approach enables adaptive data transmission that optimizes quality of service by autonomously learning the best actions based on environmental states, improving data transmission efficiency and handling fluctuations in local network conditions, thereby enhancing overall system performance.
Description
FIELD OF THE INVENTION
[0001] The present invention relates to a method for adapting a first software application that is executed on a gateway and controls the data transmission of the gateway, wherein the gateway connects one or more devices of a local network to a cloud network.
[0002] The present invention is used in particular in connection with the so-called Internet of Things (IoT). STATE OF THE ART
[0003] The so-called Internet of Things (IoT) comprises a network of physical devices, such as sensors or actuators. These devices are equipped with electronics, software, and a network connection that enables them to connect and exchange data. Platforms allow users to connect their devices and physical data infrastructure—their local network—to the digital world, i.e., to another network, usually a cloud network.
[0004] The cloud network can consist of several different cloud platforms, typically offered by different providers. A cloud platform provides IT infrastructure, such as storage space, computing power, or application software, as a service over the internet. The local network, including local computing resources, is also referred to as the edge. Computing resources at the edge are particularly suitable for decentralized data processing.
[0005] The devices, or rather their local network, are typically connected to the cloud network via so-called gateways, which comprise the so-called backend and provide backend services. A gateway is a hardware and / or software component that establishes a connection between two networks. Data from the devices in the local network must then be reliably transmitted via the gateway to the backend services of the other network. This is complicated by fluctuations in the bandwidth of the local network and fluctuations in the data size and transmission speed. A static method for transmitting data from the local network via the gateway to the cloud network typically does not take this into account.
[0006] Fundamentally, there are different methods by which IoT devices can be connected to each other and / or to the cloud network: device-to-device, device-to-cloud, and device-to-gateway. The present invention primarily relates to the method in which the device is connected to a gateway of the local network, but could also be applied to the other methods.
[0007] With the device-to-gateway method, one or more devices connect to the cloud network or cloud services, such as back-end services, via an intermediate device, the gateway. The gateway often uses its own application software for this purpose. The gateway can also provide other functionalities, such as a security application or data and / or protocol translation. The application software can be an application that pairs with the device on the local network and establishes the connection to a cloud service.
[0008] Gateways typically support preprocessing of device data, which typically involves aggregation or compression of data, as well as buffering of data to cope with interruptions in the connection to the back-end services. Managing complex work states at the gateway, such as transferring different data types during batch file transfers or the transfer of time-critical data, as well as random fluctuations in the local network, is currently not well supported.
[0009] There are network-level concepts for improving the quality of service (QoS) of the network. However, these QoS concepts operate at the network level and not at the software application level. Therefore, they cannot address the needs of software applications.
[0010] US 2013 / 122885 A1 discloses a system in which a base station optimizes radio network parameters such as intercell interference or resource allocation using confirmatory learning.
[0011] In TRAN THE ANH ET AL: "Deep Reinforcement Learning for Time Scheduling in RF-Powered Backscatter Cognitive Radio Networks", ARXIV.ORG, CORNELL UNIVERSITY LIBRARY, 201 OLIN LIBRARY CORNELL UNIVERSITY ITHACA, NY 14853, October 3, 2018, machine learning is disclosed for optimizing a radio network, in particular an RF-powered backscatter cognitive radio network. PRESENTATION OF THE INVENTION
[0012] It is therefore an object of the invention to provide a method with which data transmission applications running on a gateway can adapt their behavior.
[0013] This object is achieved by a method according to claim 1. Claim 1 relates to a method for adapting a first software application that is executed on a gateway and controls the data transmission of the gateway, wherein the gateway connects one or more devices of a local network to a cloud network. that by means of a second software application, machine learning is carried out on the basis of at least one state of the environment of the gateway and of at least one possible action of the gateway, that the result of the machine learning contains at least one quality value of a pairing of the state of the environment of the gateway and the action of the gateway, and that the first software application carries out those actions of the gateway which, for a given state of the environment of the gateway, have a higher quality value than other actions.
[0014] The invention therefore provides machine learning to control a gateway function.
[0015] The invention provides that the second software application comprises a method for confirmatory learning, wherein feedback in the form of a reward is provided for each pairing of the state of the environment of the gateway and the action of the gateway.
[0016] Reinforcement learning, also known as reinforcement learning (RL), refers to a set of machine learning methods in which an agent independently learns a strategy to maximize received rewards. Instead of being shown which action is best in which situation, the agent receives a reward, which can also be negative, at specific times. Based on these rewards, the agent approximates a utility function—here, a quality function (or quality values)—that describes the value of a particular state or action.
[0017] In particular, it can be provided that the second software application comprises a method for Q-learning.
[0018] In one embodiment of the invention, the data on the state of the gateway's environment is clustered before confirmatory learning. This can simplify confirmatory learning.
[0019] In one embodiment of the invention, Q-learning is performed using a model that is trained on a cloud platform in the cloud network using the current data of the gateway's environment. A trained model is made available to the gateway on demand. This eliminates the additional burden of Q-learning computations on the gateway.
[0020] The model can include a neural network whose learning properties, such as learning speed, can be well defined via parameters.
[0021] One embodiment of the invention is that the first software application comprises a first controller which does not take the result of the machine learning into account, and a second controller which takes the result of the machine learning into account, wherein the second controller is used as soon as quality values from the machine learning are available, in particular as soon as a trained model, as described above, is available.
[0022] Since the method according to the invention is carried out on or with one or more computers, the invention also encompasses a corresponding computer program product, which in turn comprises instructions that, when executed by a gateway, cause the gateway to execute all steps of the method according to the invention. The computer program product can, for example, be a data storage medium on which a corresponding computer program is stored, or it can be a signal or data stream that can be loaded into the processor of a computer via a data connection.
[0023] The computer program can therefore initiate or carry out the following steps: that by means of a second software application, machine learning is carried out on the basis of at least one state of the environment of the gateway and of at least one possible action of the gateway, that the result of the machine learning contains at least one quality value of a pairing of the state of the environment of the gateway and the action of the gateway, and that the first software application carries out those actions of the gateway which, for a given state of the environment of the gateway, have a higher quality value than other actions.
[0024] If the second software application is not running on the gateway, the computer program will cause the second software application to run on another computer, such as a cloud platform in the cloud network. SHORT DESCRIPTION OF THE CHARACTERS
[0025] For further explanation of the invention, reference is made in the following part of the description to the figures, from which further advantageous details and possible areas of application of the invention can be seen. Fig. 1 a schematic representation of the functional principle of confirmatory learning, Fig. 2 a simplified model of the Internet of Things, Fig. 3 a table with possible combinations of states of the gateway's environment, Fig. 4 a table with states of the gateway's environment and possible actions of the gateway, Fig. 5 a table with clustering of the data from Fig. 4 , Fig. 6 a neural network for confirmation learning, Fig. 7 a possible simplex architecture for confirmation learning. WAYS OF IMPLEMENTING THE INVENTION
[0026] Fig. 1 shows the working principle of confirmation learning. Here, confirmation learning is used to control the behavior of devices that are part of a local network and participate in the Internet of Things. S denotes a set of states of the environment E. A denotes a set of actions of an agent Ag. Pa(S t , S t +1) denotes the probability of the transition from state S t to state S t+1 while agent Ag performs action A t. R t+1 denotes the immediate reward after the transition from state S t to state S t+1 by action A t .
[0027] Gateway G now represents agent A, which interacts with its environment E. Environment E includes other devices connected to gateway G that transmit data at regular or irregular intervals, the network interface, and the connectivity to the cloud-based back-end services. All of these factors introduce uncertainties and pose challenges in managing the workload and potential performance limitations or outages.
[0028] The set of states of the environment E includes, for example, the current state of the local network, the rate of data arriving at gateway G from neighboring devices of the local network, the types of data streams arriving at gateway G from neighboring devices of the local network. According to the invention, the set of states of the environment E includes state data of the agent Ag, i.e., the gateway G, such as the current utilization of the resources of the gateway G (CPU, memory, queue, etc.).
[0029] The set A of actions of the agent Ag, i.e. the gateway G, can include the following: Receive data from a connected device Add to queue Reprioritize an item in the queue Process a request Compress data Split data Transform specific data Store data in a buffer Transfer data to a back-end service
[0030] The reward is defined based on a minimization of certain metrics, which can include The average waiting time until an action by the gateway, G, is the queue length. According to the invention, the metrics include at least the average slowdown of a work order with J = C / T, where C is the processing time of the work order (i.e., the time from receipt of the work order to completion) and T is the ideal duration of the work order.
[0031] In Fig. 2 A simplified model of the Internet of Things is shown. Only one device D of the local network is shown. The device D has no direct connection to the cloud network CN, but is connected to the gateway G and transmits data streams to it via an input interface I. The gateway G has two processor units C1, C2 that can operate in parallel. The gateway G is connected to the cloud network CN via an output interface N, e.g., to a specific cloud platform within it. The output interface N can be a wireless internet access point and is therefore susceptible to fluctuations in connection quality or data throughput. The cloud platform receives data streams from the gateway G and performs further actions on them, such as storing, analyzing, and visualizing them.
[0032] If one concentrates only on the essential components input interface I and processor units C1, C2 to model the workload and the environment E of the gateway G, and uses only three concrete possible states L-low, M-medium and H-high, then there are 3 3< = 27 states for the model, which are shown in the table of Fig. 3 are shown.
[0033] The Boolean value 1 means that a specific state exists. To handle all possible states, rules must be established. However, depending on the current state of the environment E, rigid rules can also result in suboptimal or undesirable solutions. The present invention provides that certain actions are derived from the current state, and that the agent at the gateway G autonomously learns over time what the best action is by providing a reward for the actions.
[0034] In the table of Fig. 4 A practical example of states and possible actions is shown. Aggregation is performed to make the states of device G and the local network more visible. For processor units C1 and C2, aggregation to C is performed as follows: C = 0,5 * Wert C1 ,L * 0,1 + Wert C1 ,M * 0,5 + Wert C1 , H + 0,5 * Wert C2 ,L * 0,1 + Wert C2 ,M * 0,5 + Wert C2 , H
[0035] The function Value(x,y) retrieves the value 0 or 1 from the corresponding column in the table of Fig. 3 The overall state C of the processor units C1, C2 is a weighted sum of the individual states. The overall state N of the network of the output interface N, to which the gateway G represents the interface, is derived in a similar way based on the possible states L-low, M-medium, and H-high.
[0036] The overall state O of the gateway G is derived as follows: O = MAX(C, N), i.e. the maximum of the entries in column C and column N is used.
[0037] The table in Fig. 4 shows by way of example that the agent Ag, i.e. the gateway G, can derive actions A from a certain state S, which take into account the computing capacity and the data transmission to the back-end services. The value or quality of this action A can be learned over time by receiving a reward. The actions in Fig. 4 for the processor units C1, C2 (second to last column) and for the output interface N: no restrictions, perform caching, perform compression, reduce operations, reduce dispatching, reboot interface, process / send only vital data, stop inbound traffic
[0038] To determine the quality Q of a combination of a state S and an action A, so-called Q-learning is used: Q(S t , A t ) is assigned to 1 − α Q S t , A t + α R t + γ max a Q S t + 1 , a Q(S t , A t ) is the old (at time t) quality value for the pair of values (S t , A t ). α is the learning rate with (0 < α ≤ 1). R t is the reward received for the current state S t. γ is a discount factor. max a (Q(S t+1 , a)) is an estimate of an optimal future (at time t+1) quality value, where a is an element of A, i.e., a single action from a set of actions A.
[0039] Finally, a Q-function Q(S t , A t ) is obtained depending on different sets A,S of states and actions.
[0040] In Fig. 5 shows how the data from Fig. 4 can be grouped (clustered), for example, to calculate the estimate of an optimal future quality value. Clustering methods can be used, for example, the k-means algorithm or hierarchical clustering methods. The formation of clusters, in this case Cluster 1, ... to Cluster X, can be carried out, for example, based on similar values in column N, or also in columns C and N.
[0041] The above-mentioned quality of a combination of a set S of states and a set A of actions would now have to be calculated in real time by the gateway G, which is sometimes difficult due to the limited capacity of the hardware of the gateway G, the current workload of the gateway G, and the number of states to be considered. Instead, a function approximation can be performed, which is Fig. 6 is represented using a neural network.
[0042] A so-called deep neural network (DNN) is trained offline, i.e., outside of the normal operation of the gateway G, and then instantiated by the agent Ag, i.e., the gateway G, during the normal operation of the gateway G. This allows the deep neural network (DNN) to make a recommendation for an action a based on the current state s of the environment E. This method is much faster and requires less computation at the gateway G. A recommendation can be generated in a matter of a few milliseconds.
[0043] During training of the Deep Neural Network (DNN), which takes place offline, i.e., not when agent Ag is operating as gateway G, agent Ag selects an action a based on a random distribution π, where π is a function of an action a and a state s, and the function value is (0 < π(s; a) ≤ 1). Agent Ag performs this action a on the environment E. As a result, agent Ag observes a state s of the environment E, reads it in, and passes it to the Deep Neural Network (DNN). The reward r resulting from action a is fed back to the Deep Neural Network (DNN), which then learns, via backpropagation, which combinations of a specific state s and a specific action a result in the greatest possible reward r. The learning result is a correspondingly improved estimate of the quality, i.e., the Q-function.The longer the agent Ag is trained using the environment E, the better the estimated Q-function approximates the true Q-function through backpropagation.
[0044] A possible architecture for confirmatory learning using deep learning, thus deep reinforcement learning, is presented in Fig. 7 Shown are the gateway G and a cloud platform CP of the cloud network CN (see Fig. 2 ). A well-known simplex system architecture is used, which includes a standard controller (SC) and an advanced controller that uses confirmatory learning, thus referred to as the RL agent (RL_A). The standard controller (SC) determines the time of data transmission and executes the transmission, but without optimization. The RL agent (RL_A) applies learning methods, such as the confirmatory learning described above, to optimize data transmission.
[0045] Initially, the gateway G works with the standard controller SC. In a cloud platform CP, a so-called device shadow DS of the gateway G is provided, on which the model, for example the deep neural network DNN from Fig. 6, is trained using a training module TM. The model is trained using actual data AD from gateway G and the actual configuration of gateway G. The trained model is stored in a model memory, designated Mod here, and the RL agent RL_A is informed of the presence of a model. The RL agent RL_A loads the model from the model memory Mod, and the decision module DM of gateway G has the option of switching from the standard controller SC to the RL agent RL_A in order to improve the behavior of gateway G regarding data transmission. List of reference symbols:
[0046] ASet of actions of an agent Ag aAction ADData of the gateway G AgAgent CNCloud network CPCloud platform DDevice of the local network DMDecision module DNNDeep Neural Network DSDevice Shadow EEnvironment GGateway IInput interface ModStorage for models NOutput interface rReward RL_ARL Agent SSet of states sState SCStandard controller TMTraining module
Claims
1. Method for adapting a first software application that is executed in a gateway (G) and controls the data transmission of the gateway, said gateway connecting one or more devices (D) of a local network to a cloud network (CN), - wherein machine learning is carried out by means of a second software application on the basis of at least one state (s, S) of the environment (E) of the gateway (G) and also of at least one possible action (a, A) of the gateway (G), - wherein the result of the machine learning contains at least one quality value of a pairing of state (s, S) of the environment of the gateway and action (a, A) of the gateway, and - wherein the first software application carries out those actions (a, A) of the gateway that, for a given state (s, S) of the environment of the gateway, have a higher quality value than other actions, wherein the second software application comprises a method for confirmation learning, and for each pairing of state (s) of the environment of the gateway and action (a) of the gateway there is an acknowledgement in the form of a reward (r), wherein the reward takes place on the basis of the minimisation of specific metrics and the metrics at least comprise the average slowing down of a job relative to the ideal duration of the job and the load of the resources of the gateway at that particular moment is used as the state of the environment (E) of the gateway (G).
2. Method according to claim 1, characterised in that the second software application comprises a method for Q learning.
3. Method according to claim 2, characterised in that the data about the state (s, S) of the environment of the gateway (G) is grouped into clusters before the reinforcement learning.
4. Method according to claim 2 or 3, characterised in that the Q learning is done with the aid of a model, which is trained on a cloud platform (CP) in the cloud network (CN) with the current data (AD) of the state (s, S) of the environment (E) of the gateway (G), and a trained model is made available to the gateway if required.
5. Method according to claim 4, characterised in that the model comprises a neural network.
6. Method according to one of claims 1 to 5, characterised in that the first software application comprises a first controller, which does not take account of the result of the machine learning, and also a second controller, which does take account of the result of the machine learning, wherein the second controller is employed as soon as quality values are available from the machine learning, in particular as soon as a trained model according to claim 4 is available.
7. Computer program product, comprising instructions that, when the program is executed by a gateway, cause said gateway to carry out all steps of the method according to one of claims 1 to 6.
