A data processing method and device based on a data processing system
By deploying caching plugins in edge computing nodes and leveraging existing long-connection reuse mechanisms, the problem of limited network bandwidth in edge computing clusters is solved, enabling efficient data transmission and timely data acquisition for functional components, thereby improving the reliability of data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIBABA (CHINA) CO LTD
- Filing Date
- 2023-03-20
- Publication Date
- 2026-06-09
AI Technical Summary
In edge computing scenarios, the limited network bandwidth of edge computing clusters leads to insufficient bandwidth for a large number of long-lived listening connections. This causes these long-lived listening connections to frequently time out and be disconnected by the central server, preventing functional components from obtaining updated data in a timely manner and affecting their normal operation.
By deploying caching plugins in edge computing nodes and leveraging existing long-lived listening connection reuse mechanisms, we can avoid repeatedly establishing new long-lived listening connections, associate listening requests with existing long-lived listening connections, and ensure efficient data transmission.
This reduces the number of long-lived listening connections, improves bandwidth utilization, lowers the likelihood of long-lived listening connections being disconnected, ensures that functional components can obtain updated data in a timely manner, and improves the efficiency and reliability of data processing.
Smart Images

Figure CN116455976B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method and apparatus based on a data processing system. Background Technology
[0002] In edge computing scenarios, edge computing clusters often exist at the edge, containing a large number of edge computing nodes (which can be physical machines, etc.). Each edge computing node deploys a large number of functional components. Edge computing scenarios also involve a central server (for specific scenarios, please refer to...). Figure 1 As shown in the figure, a large number of edge computing nodes often need to interact with the central server.
[0003] For example, the central server contains the data needed by each functional component in the edge computing nodes to perform its functions. Thus, after a functional component is started in the edge node, it can operate to perform its function. In the scenario where a functional component is working, it needs to obtain some data from the central server and then works based on this data to achieve its function. Therefore, each functional component has a need to obtain the data it needs from the central server to perform its function. Summary of the Invention
[0004] This application discloses a data processing method and apparatus based on a data processing system.
[0005] Firstly, this application discloses a data processing method based on a data processing system. The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has a docking plugin, and at least one edge computing node deploys a caching plugin, or a caching plugin is deployed in middleware included in the data processing system. The docking plugins dock with the caching plugins, and the caching plugins dock with the central server. The method is applied to the caching plugin and includes: receiving a listening request routed by the docking plugin, the listening request being used to listen for update events of target type data in the central server, the listening request being transmitted to the docking plugin by a first functional component in the edge computing node; determining whether a long-lived listening connection for target type data exists between the caching plugin and the central server; if a long-lived listening connection for target type data exists, associating the listening request with the long-lived listening connection; if the update event is detected based on the long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, transmitting the updated target type data to the docking plugin according to the listening request associated with the long-lived listening connection, so that the docking plugin receives the updated target type data and transmits the updated target type data to the first functional component.
[0006] In an optional implementation, the method further includes: in the absence of a long-lived listening connection for the target type of data, establishing a long-lived listening connection for the target type of data between the caching plugin and the central server for the listening request; and in the case where the update event is detected based on the established long-lived listening connection and the updated target type of data is obtained from the central server through the established long-lived listening connection, transmitting the updated target type of data to the docking plugin according to the listening request targeted by the established long-lived listening connection.
[0007] In an alternative implementation, the method further includes caching the updated target type data in a caching plugin.
[0008] In an alternative implementation, the method further includes: deleting the data of the target type before the update from the cache plugin if the cache plugin already caches the data of the target type before the update.
[0009] In an optional implementation, associating the listening request with the long-lived listening connection includes: storing in the caching plugin the association between the request identifier of the listening request and the connection identifier of the long-lived listening connection for the target type of data; correspondingly, the step of passing the updated target type of data to the docking plugin according to the listening request associated with the long-lived listening connection includes: obtaining the request identifier in the association according to the connection identifier of the long-lived listening connection; and passing the updated target type of data to the docking plugin according to the listening request corresponding to the request identifier in the association.
[0010] In one optional implementation, determining whether a long-lived listening connection for the target data type exists between the caching plugin and the central server includes: searching for the connection identifier corresponding to the target type in the mapping relationship between the connection identifier of the long-lived listening connection and the type targeted by the long-lived listening connection in the caching plugin; if the connection identifier corresponding to the target type is found in the mapping relationship, determining that a long-lived listening connection for the target data type exists between the caching plugin and the central server; the target type and the connection identifier corresponding to the target type are stored in the mapping relationship when a long-lived listening connection for the target data type was previously established between the caching plugin and the central server; or, if the connection identifier corresponding to the target type is not found in the mapping relationship, determining that a long-lived listening connection for the target data type does not exist between the caching plugin and the central server.
[0011] In an optional implementation, the listening request also carries authentication information; after receiving the listening request from the docking plugin route, the method further includes: extracting the authentication information carried in the listening request; determining whether the listening request is a legitimate request based on the authentication information; and if the listening request is a legitimate request, determining whether there is a long-lived listening connection for the target type of data between the cache plugin and the central server.
[0012] In an optional implementation, the method further includes: receiving a query request for routing to the docking plugin; the query request is passed from a second functional component in the edge computing node to the docking plugin; the query request carries a target type and is used to actively request updated target type data; searching for updated target type data in a cache plugin; and returning the updated target type data found in the cache plugin to the docking plugin according to the query request, so that the docking plugin receives the updated target type data found in the cache plugin and passes the updated target type data found in the cache plugin to the second functional component.
[0013] Secondly, this application discloses a data processing method based on a data processing system. The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has a docking plugin, and at least one edge computing node deploys a caching plugin, or a caching plugin is deployed in middleware included in the data processing system. The docking plugins interface with the caching plugins, and the caching plugins interface with the central server. The method is applied to the docking plugin, and the method includes: receiving a listening request transmitted by a first functional component in the edge computing node; the listening request is used to listen for update events of target type data in the central server; routing the listening request to the caching plugin; enabling the caching plugin to receive the listening request; determining whether there is a long-lived listening connection for target type data between the caching plugin and the central server; if there is a long-lived listening connection for target type data, associating the listening request with the long-lived listening connection; if the update event is detected based on the long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, transmitting the updated target type data to the docking plugin according to the listening request associated with the long-lived listening connection; receiving the updated target type data; and transmitting the updated target type data to the first functional component.
[0014] Thirdly, this application discloses a data processing apparatus based on a data processing system. The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin, and at least one edge computing node deploys a caching plugin, or a caching plugin is deployed in middleware included in the data processing system. The interface plugins interface with the caching plugins, and the caching plugins interface with the central server. The apparatus is applied to the caching plugins and includes: a first receiving module for receiving listening requests from the interface plugin routing. The listening request is used to listen for update events of target type data in the central server. The listening request is sent by a first functional component in the edge computing node to the interface plugin. The interface plugin transmits the following: a first determining module, used to determine whether there is a long-lived listening connection for target type data between the caching plugin and the central server; an association module, used to associate the listening request with the long-lived listening connection if such a connection exists; and a first transmitting module, used to transmit the updated target type data to the interface plugin according to the listening request associated with the long-lived listening connection when the update event is detected based on the long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, so that the interface plugin receives the updated target type data and transmits the updated target type data to the first functional component.
[0015] In an optional implementation, the apparatus further includes: an establishment module, configured to establish a long-lived listening connection for the target type of data between the caching plugin and the central server for the listening request in the absence of a long-lived listening connection for the target type of data; and a second transmission module, configured to transmit the updated target type of data to the docking plugin according to the listening request targeted by the established long-lived listening connection when the update event is detected based on the established long-lived listening connection and the updated target type of data is obtained from the central server through the established long-lived listening connection.
[0016] In an alternative implementation, the apparatus further includes a caching module for caching updated target type data in a caching plugin.
[0017] In an alternative implementation, the apparatus further includes a deletion module for deleting the data of the target type before the update from the cache plugin if the cache plugin caches the data of the target type before the update.
[0018] In an optional implementation, the association module includes: a storage unit for storing in the cache plugin the association between the request identifier of the listening request and the connection identifier of the long-lived listening connection for the target type of data; correspondingly, the first transmission module includes: an acquisition unit for acquiring the request identifier in the association based on the connection identifier of the long-lived listening connection; and a transmission unit for transmitting the updated target type of data to the docking plugin based on the listening request corresponding to the request identifier in the association.
[0019] In one optional implementation, the first determining module includes: a lookup unit, used to look up the connection identifier corresponding to the target type in the mapping relationship between the connection identifier of the long-lived listening connection in the caching plugin and the type targeted by the long-lived listening connection; a first determining unit, used to determine that there is a long-lived listening connection for data of the target type between the caching plugin and the central server if the connection identifier corresponding to the target type is found in the mapping relationship; the target type and the connection identifier corresponding to the target type are stored in the mapping relationship when a long-lived listening connection for data of the target type is previously established between the caching plugin and the central server; or, a second determining unit, used to determine that there is no long-lived listening connection for data of the target type between the caching plugin and the central server if the connection identifier corresponding to the target type is not found in the mapping relationship.
[0020] In an optional implementation, the listening request also carries authentication information; the device further includes: an extraction module for extracting the authentication information carried in the listening request; a second determination module for determining whether the listening request is a legitimate request based on the authentication information; the first determination module is further used to: if the listening request is a legitimate request, determine whether there is a long-lived listening connection for data of the target type between the cache plugin and the central server.
[0021] Fourthly, this application discloses a data processing apparatus based on a data processing system. The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin, and at least one edge computing node has a caching plugin deployed thereon or in middleware included in the data processing system. The interface plugins interface with the caching plugins, and the caching plugins interface with the central server. The apparatus is applied to the interface plugins and includes a second receiving module for receiving a listening request transmitted by a first functional component in the edge computing node. The listening request is used to listen for update events of target type data in the central server. A routing module is used to route the listening request to the caching plugin, so that the caching plugin can receive the listening request; determine whether there is a long-lived listening connection for the target type of data between the caching plugin and the central server; if there is a long-lived listening connection for the target type of data, associate the listening request with the long-lived listening connection; if the update event is detected based on the long-lived listening connection and the updated target type of data is obtained from the central server through the long-lived listening connection, transmit the updated target type of data to the docking plugin according to the listening request associated with the long-lived listening connection; a third receiving module is used to receive the updated target type of data; a third transmitting module is used to transmit the updated target type of data to the first functional component.
[0022] Fifthly, this application discloses a data processing system, which includes at least a central server and multiple edge computing nodes. Each edge computing node has a docking plugin, and at least one edge computing node deploys a caching plugin, or a caching plugin is deployed in middleware included in the data processing system. The docking plugins interface with each other, and the caching plugins interface with the central server. The docking plugin is used to receive a listening request transmitted by a first functional component in the edge computing node and route the listening request to the caching plugin. The listening request is used to listen for update events of target type data in the central server. The caching plugin is used to receive the listening request routed by the docking plugin; determine whether there is a long-lived listening connection for target type data between the caching plugin and the central server; if there is a long-lived listening connection for target type data, associate the listening request with the long-lived listening connection; if the update event is detected based on the long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, transmit the updated target type data to the docking plugin according to the listening request associated with the long-lived listening connection; the docking plugin is used to receive the updated target type data and transmit the updated target type data to the first functional component.
[0023] Sixthly, this application discloses an electronic device comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to perform the methods shown in any of the foregoing aspects.
[0024] In a seventh aspect, this application discloses a non-transitory computer-readable storage medium that, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the methods shown in any of the foregoing aspects.
[0025] Eighthly, this application discloses a computer program product in which, when the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the methods shown in any of the foregoing aspects.
[0026] Compared with the prior art, this application has the following advantages:
[0027] In this application, the docking node receives a listening request from the first functional component in the edge computing node and routes the listening request to the caching plugin. The caching plugin receives the listening request routed by the docking plugin. The listening request is used to listen for update events of target type data in the update center server. The caching plugin determines whether a long-lived listening connection for the target type data exists between the caching plugin and the center server. If a long-lived listening connection for the target type data exists, it is not necessary to establish a new long-lived listening connection for the target type data between the caching plugin and the center server in real time for the listening request. Instead, the listening request can be associated with an existing long-lived listening connection for the target type data, allowing the listening request to reuse the existing long-lived listening connection for the target type data. This avoids increasing the number of long-lived listening connections for the target type data between the caching plugin and the center server, thereby preventing an excessive number of long-lived listening connections between the caching plugin and the center server. Consequently, it avoids very low bandwidth for each long-lived listening connection due to an excessive number of long-lived listening connections, thus minimizing the possibility of the long-lived listening connection being disconnected by the center server.
[0028] In addition, when an update event is detected based on a long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, the updated target type data can be passed to the docking plugin according to the listening request associated with the long-lived listening connection. This allows the docking plugin to pass the updated target type data to the first functional component, thereby enabling the first functional component to obtain the updated target type data. This ensures that the first functional component can obtain the updated target type data in a timely manner. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of a current scenario.
[0030] Figure 2 This is a structural block diagram of a data processing system according to this application.
[0031] Figure 3 This is a structural block diagram of a data processing system according to this application.
[0032] Figure 4 This is a structural block diagram of a caching plugin of this application.
[0033] Figure 5 This is a flowchart of the steps of a data processing method based on a data processing system according to this application.
[0034] Figure 6 This is a flowchart of the steps of a data processing method based on a data processing system according to this application.
[0035] Figure 7 This is a structural block diagram of a data processing device based on a data processing system according to this application.
[0036] Figure 8 This is a structural block diagram of a data processing device based on a data processing system according to this application.
[0037] Figure 9 This is a structural block diagram of a device according to this application. Detailed Implementation
[0038] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0039] In this process, the central server may sometimes update the data required by the functional components in the edge computing nodes to perform their functions, based on the actual situation. Correspondingly, the functional components in the edge computing nodes often need to work based on the updated data to make their functions more accurate or complete.
[0040] To ensure that functional components can promptly receive and adapt the updated data after it is updated on the central server, an interface plugin can be configured in the edge computing node. This plugin interfaces with the central server. Functional components in the edge computing node can send listening requests to the interface plugin for this data. The interface plugin can then establish a long-lived listening connection with the central server to monitor for update events from the central server. Once an update event is detected, the interface plugin can retrieve the updated data from the central server and return it to the functional components, enabling them to receive and adapt the updated data for their operations.
[0041] Listening to requests can include watch requests, and listening to long-lived connections can include watch long-lived connections.
[0042] However, the inventors discovered that in some edge computing scenarios, the network bandwidth of the edge computing cluster is very small, especially when the number of edge computing nodes in the cluster is very large and the number of functional nodes on each edge computing node that "need to monitor whether the data they need to use during operation is updated in the central server" is very large. This results in a large number of monitoring requests being initiated within the edge computing cluster. For example, each interface plugin on an edge computing node needs to establish a long-lived monitoring connection between the interface node and the central server for each functional component's monitoring request. This leads to a large number of long-lived monitoring connections between each edge computing node and the central server. Furthermore, due to the limited network bandwidth of the edge computing cluster, the bandwidth of each long-lived monitoring connection is very low. Consequently, the speed at which the interface plugin obtains updated data from the central server through these long-lived monitoring connections is very slow, time-consuming, and often times out. In cases of timeout, the central server will actively disconnect the long-lived monitoring connection, preventing the interface plugin from obtaining the updated data from the central server, and thus preventing the functional components from obtaining the updated data. Consequently, the functional components cannot use the updated data during operation.
[0043] Therefore, we can avoid the central server from actively disconnecting the long-lived listening connection as much as possible.
[0044] To achieve the goal of "avoiding the central server from actively disconnecting the long-lived listening connection as much as possible", we can increase the speed at which we obtain updated data from the central server by listening to the long-lived connection and reduce the time spent to avoid timeouts as much as possible.
[0045] To achieve the goal of "maximizing the speed at which updated data can be retrieved from the central server by listening to long-lived connections and minimizing the time spent to avoid timeouts as much as possible," the bandwidth of long-lived connections can be increased. For example, when the network bandwidth of the edge computing cluster is very limited, the bandwidth of long-lived connections can be increased.
[0046] To achieve the goal of "increasing the bandwidth of long-lived listening connections when the network bandwidth of the edge computing cluster is very small", the solution proposed in this application is proposed.
[0047] Before introducing the solution of this application, the technical terms that may be involved in this application will be explained.
[0048] Edge computing: It provides computing services closer to the scene by using network, computing, storage or application management capabilities on the side closer to the data, objects, and users.
[0049] The list-watch mechanism is a resource acquisition mechanism natively supported by Kubernetes. It ensures data consistency by pulling all resources and listening for change events.
[0050] Read-write separation: The process of acquiring resources is split into two operations: writing to the cache and reading from the cache, so that the two actions do not affect each other.
[0051] See Figure 2 and 3 This paper illustrates a data processing system according to the present application, which includes at least a central server and multiple edge computing nodes.
[0052] Each edge computing node has a docking plug-in.
[0053] At least one edge computing node has a caching plugin deployed, or the data processing system also includes middleware with a caching plugin deployed.
[0054] The caching plugin and the integration plugin are independent of each other.
[0055] The interface plugin connects with the caching plugin, and the caching plugin connects with the central server.
[0056] Functional components are also deployed in edge computing nodes.
[0057] In one example, when a functional component in an edge node needs to interact with the central server, the functional component can interact with the central server sequentially through the docking plugin and the caching plugin in the edge computing node where the functional component is located (which may or may not be located in the edge computing node where the functional component is located).
[0058] Integration plugins can include: Yurthub, etc.
[0059] Caching plugins can include edge-APISerber-Proxy, etc.
[0060] Functional components may include: CoreDNS, Hybrinet, and KubeProxy, etc.
[0061] Where possible, the docking plug-ins in each edge computing node can also have the ability to directly interface with the central server.
[0062] In one example, see Figure 3 One of the multiple edge computing nodes has a caching plugin deployed on it, while the other edge computing nodes do not.
[0063] Each edge computing node's interface plugin can interface with the caching plugin within that edge computing node. The caching plugin can then interface with the central server.
[0064] Each edge computing node also deploys functional components. Each functional component can obtain data from the central server through the interface plugins and caching plugins in its respective edge computing node.
[0065] In this application, among multiple edge computing nodes, a master node can be elected from among the multiple edge computing nodes through a master election mechanism, with the other nodes serving as slave nodes. Then, a caching plugin is deployed on the master node.
[0066] In one approach, all edge computing nodes have identical system resources, such as being the same type of physical machine. However, the master node deploys a caching plugin, which consumes system resources on the master node, such as memory, CPU (Central Processing Unit), and storage. The caching plugin, on the other hand, does not consume system resources on slave nodes. This can lead to a situation where the master node's system resources are fully utilized while the slave nodes' resources are idle. A fully utilized master node will prevent its functional components and the caching plugin from functioning properly, while idle slave nodes result in wasted resources. Therefore, the resource allocation in this approach is unreasonable. Furthermore, this approach does not allow for individual resource configuration for the caching plugin.
[0067] Therefore, in another approach, for example, after electing a master node and deploying the caching plugin on the master node, more system resources (such as memory and CPU resources) can be configured on the master node according to the actual situation to improve the performance of the caching plugin and avoid the system resources of the master node being fully occupied as much as possible, so as to avoid the functional components and caching plugin in the master node from failing to work properly.
[0068] Alternatively, multiple edge computing nodes can be logically combined into a distributed system. After electing a master node and deploying a caching plugin on the master node, logically, a portion of the system resources from each of the multiple slave nodes can be allocated to the caching plugin to improve the utilization of system resources.
[0069] In another example, see Figure 4 The caching plugin is not deployed in any of the edge computing nodes. Instead, it is deployed on a physical machine that is independent of the central server and each edge computing node. Logically, this physical machine can be regarded as middleware between the multiple edge computing nodes and the central server.
[0070] In this example, the caching plugin is not constrained by the resources of each edge computing node. It can allocate more system resources (such as memory resources and CPU resources) to the physical machine according to the actual situation to improve the performance of the caching plugin.
[0071] In another embodiment, the multiple edge computing nodes can be a subset of edge nodes in a node cluster. For example, if the node cluster includes a large number of edge computing nodes, the large number of edge computing nodes in the node cluster can be divided into multiple parts, each part including multiple edge nodes, and the number of multiple edge computing nodes in each part is less than the number of edge computing nodes in the large number of edge computing nodes in the node cluster.
[0072] A node pool can be formed by multiple edge computing nodes. A node pool includes multiple edge computing nodes. By dividing the node cluster into several parts, several node pools can be obtained.
[0073] Each node pool can be equipped with a different cache plugin; that is, a cache plugin can be dedicated to serving multiple edge computing nodes in a node pool.
[0074] In one embodiment, the caching plugins corresponding to each node pool can be connected to the central server respectively.
[0075] Alternatively, in another embodiment, among the cache plugins corresponding to each node pool, some cache plugins can interface with the central server, while other cache plugins can interface with the first part of the cache plugins. In this way, the number of cache plugins that interface with the central server can be reduced.
[0076] For example, in one instance, among the cache plugins corresponding to each node pool, one cache plugin can interface with the central server, while other cache plugins besides that one cache plugin can interface with that one cache plugin. In this way, the number of cache plugins that interface with the central server can be reduced.
[0077] If a plugin interfaces with the central server, statistics show that there are many long-lived listening connections between the plugin and the central server. Each long-lived connection requires a portion of bandwidth. Since the total bandwidth on the edge side is limited, and if there are many caching plugins interfaced with the central server, the overall bandwidth of each long-lived connection may be very low, which may lead to the long-lived connection being disconnected by the central server.
[0078] In this embodiment, the number of caching plugins that interface with the central server is reduced, thereby reducing the number of long connections. This increases the bandwidth of each long connection being monitored, and thus minimizes the possibility of long connections being disconnected by the central server.
[0079] In this application, when a new node pool (comprising multiple edge computing nodes) is established, a caching plugin can be deployed in the new node pool (either in the first edge computing node started in the new node pool, or in middleware independent of the multiple edge computing nodes). The caching plugin can interface with the central server and register its information with the central server so that the central server can be aware that a caching plugin exists in the new node pool. After other edge computing nodes in the new node pool start up, they will first directly connect to the central server. The central server will then notify other edge computing nodes in the new node pool that a caching plugin exists in the new node pool and its address. After that, other edge computing nodes in the new node pool can interface with the caching plugin in the new node pool through its address.
[0080] Alternatively, after the caching plugin registers its information in the central server, it can start up successfully and work normally. Other edge computing nodes in the new node pool and newly expanded edge computing nodes can listen for the successful start of the caching plugin. Then, other edge computing nodes in the new node pool and newly expanded edge computing nodes can connect with the caching plugin in the new node pool.
[0081] In one example Figure 4 The structure of the caching plugin is shown. The caching plugin includes:
[0082] LoadBalancer: Used to connect to the central server.
[0083] Resource Listening Pool: Responsible for managing the established long-lived listening connections with the central server, and synchronously writing the update data involved in the update event into the cache, and notifying multiple downstream listening requests that are currently listening.
[0084] Persistent caching: Responsible for persistently caching all data obtained from the central server, serving list query requests from downstream servers.
[0085] HTTPS server: Responsible for parsing requests from integrated plugins and extracting information such as permissions and parameters.
[0086] See Figure 5 This application illustrates a data processing method based on a data processing system, which is applied to a caching plugin. The method includes:
[0087] In step S101, a listening request for the docking plugin route is received. This listening request is used to listen for update events of the target type of data in the update center server. The listening request is passed from the first functional component in the edge computing node to the docking plugin.
[0088] In this application, the edge computing node where the first functional component is located is one of multiple edge computing nodes. When the first functional component is working, it needs to obtain target type data from the central server. In addition, sometimes the central server updates the target type data in the central server, and the updated target type data is obtained. After that, the updated target type data is located in the central server. Furthermore, when the central server updates the target type data in the central server, the first functional component often needs to obtain the updated target type data in a timely manner so that the first functional component can use the updated target type data when working later, so that the functions implemented by the first functional component are more accurate or complete.
[0089] In order for the first functional component to receive the updated target type data in a timely manner, it can listen for update events of the target type data in the update center server. When an update event is detected, it means that the center server has updated the target type data in the center server and received the updated target type data, and needs to provide the updated target type data to the first functional component in a timely manner.
[0090] To this end, the first functional component can submit a listener request to the interface plugin to listen for update events of the target type of data in the update center server. After receiving the listener request, the interface plugin can route the listener request to the caching plugin so that the caching plugin receives the listener request.
[0091] In step S102, it is determined whether there is a long-lived listening connection between the cache plugin and the central server for the target type of data.
[0092] Listening to long-lived connections can include TCP (Transmission Control Protocol) connections, etc.
[0093] In this application, a mapping relationship between the connection identifier for listening to long-lived connections and the type targeted by the long-lived connections is cached. For example, the mapping relationship between the connection identifier for listening to long-lived connections and the type targeted by the long-lived connections is stored in the cache plugin.
[0094] Historically, whenever a long-lived listening connection for a certain type of data is established between the caching plugin and the central server, the connection identifier and the type of the established long-lived listening connection can be stored in the mapping relationship. When the long-lived listening connection for that type of data between the caching plugin and the central server is disconnected, the connection identifier and the type of the disconnected long-lived listening connection can be deleted from the mapping relationship.
[0095] Accordingly, whenever a long-lived listening connection for data of a target type is established between the caching plugin and the central server, the connection identifier and target type of the established long-lived listening connection can be stored in the mapping relationship. When the long-lived listening connection for data of a target type between the caching plugin and the central server is disconnected, the connection identifier and target type of the disconnected long-lived listening connection can be deleted from the mapping relationship.
[0096] Thus, in this step, the connection identifier corresponding to the target type can be found in the mapping relationship between the connection identifier of the long-lived connection being listened to and the type targeted by the long-lived connection in the caching plugin.
[0097] If the connection identifier corresponding to the target type is found in this mapping relationship, it can be determined that there is a long-lived listening connection for data of the target type between the caching plugin and the central server. The target type and its corresponding connection identifier are stored in the mapping relationship after the long-lived listening connection for data of the target type between the caching plugin and the central server was previously established.
[0098] Alternatively, if no connection identifier corresponding to the target type is found in the mapping relationship, it can be determined that there is no long-lived listening connection for data of the target type between the cache plugin and the central server.
[0099] The connection identifier for listening to long-lived connections can include the port number involved in the long-lived connection listening, and different long-lived connections have different connection identifiers.
[0100] Types can be represented as strings, etc.
[0101] In the case of a persistent listening connection for data of the target type, in step S103, the listening request is associated with the persistent listening connection for data of the target type.
[0102] In one example, the association between the request identifier of a listening request and the connection identifier of a long-lived listening connection for the target data type can be stored in the caching plugin.
[0103] The request identifier for a listening request can include the ID of the listening request, and different listening requests have different request identifiers.
[0104] In this application, when there is a persistent listening connection for data of the target type, it is not necessary to establish a persistent listening connection for the target type between the caching plugin and the central server for the listening request. Instead, the listening request can be associated with a persistent listening connection for the target type, so that the listening request can reuse the existing persistent listening connection for the target type. This avoids increasing the number of persistent listening connections for the target type between the caching plugin and the central server, thereby avoiding an excessive number of persistent listening connections for the target type between the caching plugin and the central server. This also avoids the bandwidth of each persistent listening connection being very low due to an excessive number of persistent listening connections, and thus minimizes the possibility of the persistent listening connection being disconnected by the central server.
[0105] After performing step S103, step S104 can be performed.
[0106] In step S104, if an update event is detected based on the long-connection and the updated target type data is obtained from the central server through the long-connection, the updated target type data is transmitted to the docking plugin according to the listening request associated with the long-connection.
[0107] In this step, if the caching plugin detects an update event based on the long-connection listening, it determines that the central server has updated the data of the target type in the central server and obtained the updated data of the target type. Thus, the caching plugin can obtain the updated data of the target type from the central server by listening to the long-connection.
[0108] For example, a caching plugin can send a retrieval request to the central server via a persistent listening connection. This request retrieves the updated target type data corresponding to the update event. The central server can receive the retrieval request via the persistent listening connection and then send the updated target type data corresponding to the update event to the caching plugin. The caching plugin can then receive the updated target type data corresponding to the update event from the central server via the persistent listening connection.
[0109] Subsequently, since the updated target type data is obtained from the central server through a long-lived listening connection, the caching plugin can obtain the connection identifier of the long-lived listening connection, and then obtain the request identifier of the aforementioned association (the association mentioned in step S103) based on the connection identifier of the long-lived listening connection. Then, it can transmit the updated target type data to the docking plugin according to the listening request corresponding to the request identifier.
[0110] Upon receiving updated target type data, the docking plugin can pass the updated target type data to the first functional component, so that the first functional component can obtain the updated target type data.
[0111] In the absence of a persistent listening connection for the target data type, in step S105, a persistent listening connection for the target data type is established between the caching plugin and the central server for the listening request.
[0112] In the absence of a persistent listening connection for the target data type, a persistent listening connection for the target data type can be established between the caching plugin and the central server for listening requests in order to listen for update events.
[0113] In this application, a mapping relationship is cached between the connection identifiers for listening to long-lived connections and the types targeted by listening to long-lived connections.
[0114] Accordingly, after establishing a long-lived listening connection between the caching plugin and the central server for the target type of data in response to the listening request, the connection identifier and target type of the established long-lived listening connection can be stored in this mapping relationship.
[0115] If the long-lived listening connection for the target type between the cache plugin and the central server is disconnected later, the connection identifier and target type of the disconnected long-lived listening connection can be deleted from this mapping relationship.
[0116] After performing step S105, step S106 can be performed.
[0117] In step S106, if an update event is detected based on the established long-lived listening connection and the updated target type data is obtained from the central server through the established long-lived listening connection, the updated target type data is transmitted to the docking plugin according to the listening request targeted by the established long-lived listening connection.
[0118] For details of this step, please refer to the description of step S104, which will not be elaborated here.
[0119] In this application, the docking node receives a listening request from the first functional component in the edge computing node and routes the listening request to the caching plugin. The caching plugin receives the listening request routed by the docking plugin. The listening request is used to listen for update events of target type data in the update center server. The caching plugin determines whether a long-lived listening connection for the target type data exists between the caching plugin and the center server. If a long-lived listening connection for the target type data exists, it is not necessary to establish a new long-lived listening connection for the target type data between the caching plugin and the center server in real time for the listening request. Instead, the listening request can be associated with an existing long-lived listening connection for the target type data, allowing the listening request to reuse the existing long-lived listening connection for the target type data. This avoids increasing the number of long-lived listening connections for the target type data between the caching plugin and the center server, thereby preventing an excessive number of long-lived listening connections between the caching plugin and the center server. Consequently, it avoids very low bandwidth for each long-lived listening connection due to an excessive number of long-lived listening connections, thus minimizing the possibility of the long-lived listening connection being disconnected by the center server.
[0120] In addition, when an update event is detected based on a long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, the updated target type data can be passed to the docking plugin according to the listening request associated with the long-lived listening connection. This allows the docking plugin to pass the updated target type data to the first functional component, thereby enabling the first functional component to obtain the updated target type data. This ensures that the first functional component can obtain the updated target type data in a timely manner.
[0121] Accordingly, see Figure 6 This application illustrates a data processing method based on a data processing system, which is applied to an interface plug-in. The method includes:
[0122] In step S201, a listening request is received from the first functional component in the edge computing node; the listening request is used to listen for update events of target type data in the update center server.
[0123] In step S202, the listening request is routed to the caching plugin to enable the caching plugin to receive the listening request; it is determined whether there is a long-lived listening connection for the target type of data between the caching plugin and the central server; if there is a long-lived listening connection for the target type of data, the listening request is associated with the long-lived listening connection for the target type of data; if an update event is detected based on the long-lived listening connection and the updated target type of data is obtained from the central server through the long-lived listening connection, the updated target type of data is transmitted to the docking plugin according to the listening request associated with the long-lived listening connection.
[0124] In step S203, the updated target type data is received.
[0125] In step S204, the updated target type data is passed to the first functional component.
[0126] In this application, the docking node receives a listening request from the first functional component in the edge computing node and routes the listening request to the caching plugin. The caching plugin receives the listening request routed by the docking plugin. The listening request is used to listen for update events of target type data in the update center server. The caching plugin determines whether a long-lived listening connection for the target type data exists between the caching plugin and the center server. If a long-lived listening connection for the target type data exists, it is not necessary to establish a new long-lived listening connection for the target type data between the caching plugin and the center server in real time for the listening request. Instead, the listening request can be associated with an existing long-lived listening connection for the target type data, allowing the listening request to reuse the existing long-lived listening connection for the target type data. This avoids increasing the number of long-lived listening connections for the target type data between the caching plugin and the center server, thereby preventing an excessive number of long-lived listening connections between the caching plugin and the center server. Consequently, it avoids very low bandwidth for each long-lived listening connection due to an excessive number of long-lived listening connections, thus minimizing the possibility of the long-lived listening connection being disconnected by the center server.
[0127] In addition, when an update event is detected based on a long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, the updated target type data can be passed to the docking plugin according to the listening request associated with the long-lived listening connection. This allows the docking plugin to pass the updated target type data to the first functional component, thereby enabling the first functional component to obtain the updated target type data. This ensures that the first functional component can obtain the updated target type data in a timely manner.
[0128] In one embodiment of this application, authentication is sometimes required when requesting the monitoring center server to update data of a target type and when requesting to retrieve data from the center server. For example, authentication is required to verify the validity of the request. Only if the request is valid will the monitoring center server be allowed to update data of the target type and will the retrieval of data from the center server be permitted.
[0129] Previously, the central server authenticated requests. However, this application includes a caching plugin. Thus, for easier authentication, the caching plugin can perform the authentication, decoupling the central server from the authentication process. This simplifies the central server, reduces its load, and avoids the authentication process consuming excessive network resources.
[0130] For example, the listening request also carries authentication information.
[0131] After receiving a listening request from the interfacing plugin's route, the caching plugin can extract the authentication information carried in the listening request. Based on the authentication information, it determines whether the listening request is legitimate. If the listening request is legitimate, step S102 is executed: determining whether a long-lived listening connection for the target data type exists between the caching plugin and the central server. Alternatively, if the listening request is illegitimate, the process ends.
[0132] The method for determining whether a listening request is a legitimate request based on authentication information can refer to existing methods, and this application does not limit it.
[0133] Authentication information may include a token and optional query parameters.
[0134] Furthermore, in another embodiment of this application, when the cache plugin obtains updated target type data from the central server, the updated target type data can be cached in the cache plugin.
[0135] Thus, when a second functional component (which can be one of the functional components in one of multiple edge computing nodes) needs to obtain updated target type data from the central server, the second functional component can initiate a query request to the docking plugin (which can be the docking plugin in the edge computing node where the second functional component is located). (The second functional component may not have initiated a listening request for the target type data. In this case, if the second functional component needs to obtain the updated target type data, it needs to initiate a query request to obtain the updated target type data through the query request.) The query request is used to actively request the updated target type data. For example, the query request can carry the target type, and the type can be represented in the form of a string.
[0136] After receiving the query request from the second functional component, the integration plugin can route the query request to the caching plugin.
[0137] After receiving a query request, the caching plugin can first search for the updated target type data in the caching plugin. For example, it can first search for the updated target type data in the caching plugin based on the target type carried in the query request, and if the updated target type data can be found in the caching plugin, it can then return the updated target type data found in the caching plugin to the interface plugin based on the query request.
[0138] The docking plugin can receive the updated target type data found in the cache plugin and pass it to the second functional component so that the second functional component can obtain the updated target type data.
[0139] In this embodiment, since the caching plugin can obtain the updated target type data cached in the caching plugin, and provide the cached updated target type data to the second functional component through the docking plugin, the caching plugin does not need to obtain the updated target type data from the central server in real time, thereby saving bandwidth, for example, saving bandwidth between the edge side and the central side.
[0140] In other words, for a query request received by the caching plugin (e.g., a query request passed from one of the functional components of one of multiple edge computing nodes to the caching plugin through a docking plugin located in that edge node), the caching plugin can first look up the data on the type of the query request in the caching plugin. If the caching plugin already caches the data on the type of the query request, then it can find the data in the caching plugin and return it, allowing the initiator of the query request to obtain the data on the type of the query request. In this way, the caching plugin does not need to obtain the data on the type of the query request from the central server in real time, thereby saving bandwidth, for example, saving bandwidth between the edge side and the central side.
[0141] Furthermore, if the cache plugin caches data of the target type before the update, the data of the target type before the update is often no longer used by the functional components. Therefore, the data of the target type before the update can also be deleted in the cache plugin to save storage space.
[0142] In another embodiment, a network outage at the edge may cause a disconnect between the edge and the central server. For example, the caching plugin may lose connection with the central server, and each edge computing node may lose connection with the central server. In this case, the caching plugin will also be unable to retrieve new data from the central server and will be unable to cache new data within the caching plugin.
[0143] However, this application introduces a read-write separation strategy for the cache plugin. Although it is not possible to write data (cache data) in the cache plugin, it does not affect the reading of data in the cache plugin. This allows the cache plugin to obtain the updated target type data cached in the cache plugin and provide the updated target type data cached to the second functional component through the docking plugin. In this way, the cache plugin does not need to obtain the updated target type data from the central server in real time, thereby saving bandwidth, for example, saving bandwidth between the edge side and the central side.
[0144] Because the edge server is offline, the central server can update its data, but the caching plugin cannot immediately retrieve the updated data from the central server. However, once the edge server regains network access, it will gradually receive updated data through update events monitored by listening requests and active data retrieval by query requests. This updated data will then be cached in the caching plugin to ensure that the data on the central server and in the caching plugin remain as consistent as possible. Query requests can include list requests, etc.
[0145] During the network outage at the edge, the functional components in multiple edge computing nodes can still submit listening and query requests to the cache plugin through the docking plugin.
[0146] For listening requests, the caching plugin can cache the listening requests. After the edge side is connected to the network, the caching plugin can establish long-lived listening connections between the caching plugin and the central server for each listening request, which are for the type of data requested by each listening request.
[0147] As mentioned earlier, for query requests, the caching plugin can look up the data of the type of request required by the query request in the cache plugin. If the data of the type of request required by the query request is found in the cache, the caching plugin can directly pass the data of the type of request required by the query request to the initiator of the query request through the interface plugin.
[0148] Therefore, it is clear that a network outage on the edge side will not cause the edge computing nodes on the edge side to fail.
[0149] In this application, different functional components in the same edge computing node need to use different types of data when working, and the central server stores the various types of data that each functional component in each edge computing node needs to use when working.
[0150] This solution is technically applicable to all types of data stored in the central server; that is, it is not technically limited to the target data type. Therefore, the scope of application of this application is broader.
[0151] Of course, it is understandable that, depending on actual needs, certain types of data may be excluded from this solution.
[0152] For example, in one instance, the data cached by the caching plugin is intended for use by each of the multiple edge computing nodes, serving a reuse function. Additionally, the long-lived listening connection established by the caching plugin for a specific type of data is maintained by each edge computing node for listening requests for that type of data, also serving a reuse function.
[0153] In other words, for a type of data cached by the caching plugin, each edge computing node in multiple edge computing nodes often needs to use this type of data, thus achieving a reuse function. In addition, the long-lived listening connection established by the caching plugin for this type of data is reused for the listening requests of each edge computing node for this type of data, thus achieving a reuse function.
[0154] However, the inventors discovered a situation where a certain functional component in any edge computing node needs to obtain a certain type of data from the central server. However, this type of data is only related to this edge computing node and not to other edge computing nodes. In other words, only the functional component in this edge computing node will use this type of data, while the functional components in other edge computing nodes will not use this type of data.
[0155] It is evident that, on the one hand, after the functional component in the edge computing node obtains data of this type through the caching plugin, if the data of this type is cached in the caching plugin, then since the functional components in other edge computing nodes will not use the data of this type, the functional components in other edge computing nodes will not actively retrieve the cached data of this type from the caching plugin. It is clear that the data of this type cached in the caching plugin does not serve the purpose of reuse and also occupies storage space.
[0156] On the other hand, if the functional component in the edge computing node sends a listening request for data of that type to the caching plugin, and the caching plugin establishes a long listening connection for that type of data between the caching plugin and the central server in response to the listening request, then since the functional components in other edge computing nodes do not use this type of data, the listening requests of the functional components in other edge nodes will not be associated with the long listening connection. It can be seen that the reuse function is not achieved, and maintaining the long listening connection also consumes the system resources of the caching plugin.
[0157] Therefore, for this type of data to be obtained by the functional component in the edge computing node, it is not necessary to go through the caching plugin.
[0158] After receiving a listening request from the functional component in the edge computing node, the docking plugin in the edge computing node can directly establish a long-lived listening connection between the docking plugin in the edge computing node and the central server for that type of data.
[0159] Alternatively, after receiving a query request submitted by the functional component in the edge computing node, the docking plugin in the edge computing node can directly interact with the central server to obtain data of that type from the central server and pass the data of that type to the functional component in the edge computing node.
[0160] Thus, in this application, the types of data that can be obtained directly from the central server without using a caching plugin can be statistically analyzed in advance, and the statistically analyzed types are recorded in the type list of the docking plugins in each edge computing node.
[0161] Thus, after the interface plugin receives a listening request (which carries the type of data it targets, which can be represented by a string, etc.) from a functional component in the edge computing node, it can determine whether the type of the data targeted by the listening request is in the interface plugin's type list. If the type of the data targeted by the listening request is not in the interface plugin's type list, the listening request is then routed to the caching plugin for processing. Alternatively, if the type of the data targeted by the listening request is in the interface plugin's type list, the interface plugin can directly establish a long-lived listening connection between the interface plugin and the central server for that type of data, instead of routing the listening request to the caching plugin.
[0162] After the interface plugin receives a query request (which carries the type of data the query request targets, which can be represented by a string, etc.) from a functional component in the edge computing node, it can determine whether the type of data the query request targets is in the interface plugin's type list. If the type of data the query request targets is not in the interface plugin's type list, the query request is then routed to the caching plugin for processing. Alternatively, if the type of data the query request targets is in the interface plugin's type list, the interface plugin can avoid routing the query request to the caching plugin and directly send a query request to the central server to obtain the data of that type directly from the central server.
[0163] In another embodiment, for any given edge computing node, among the multiple functional components within that edge computing node, the functional component that needs to obtain data corresponding to the type from the type list in the interface plugin of that edge computing node is also specific. Thus, the types of data that can be obtained directly from the central server without going through a caching plugin can be pre-counted, and the component identifiers of the functional components that need to obtain data corresponding to that type can be counted. These component identifiers are then recorded in the identifier list of the interface plugins in each edge computing node. Different functional components have different component identifiers.
[0164] Thus, after the interface plugin receives a listening request (carrying the component identifier of the functional component) from a functional component in the edge computing node, it can determine whether the component identifier of the functional component carried in the listening request is in the interface plugin's identifier list. If the component identifier of the functional component carried in the listening request is not in the interface plugin's identifier list, the listening request is then routed to the caching plugin for processing. Alternatively, if the component identifier of the functional component carried in the listening request is in the interface plugin's identifier list, the interface plugin may not route the listening request to the caching plugin, but can directly establish a long-lived listening connection between the interface plugin and the central server for the type of data requested in the listening request.
[0165] After the docking plugin receives a query request (carrying the component identifier of the functional component) from a functional component in the edge computing node, it can determine whether the component identifier is in the docking plugin's identifier list. If the component identifier is not in the docking plugin's identifier list, the query request is then routed to the caching plugin for processing. Alternatively, if the component identifier is in the docking plugin's identifier list, the docking plugin can avoid routing the query request to the caching plugin and directly send the query request to the central server to obtain the requested data directly from the central server.
[0166] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by this application.
[0167] Reference Figure 7This application discloses a data processing apparatus based on a data processing system. The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin. At least one edge computing node has a caching plugin deployed, or a caching plugin is deployed in middleware included in the data processing system. The interface plugins interface with each other, and the caching plugins interface with the central server. The apparatus is applied to the caching plugin, and the apparatus includes:
[0168] The first receiving module 11 is used to receive the listening request of the docking plug-in route. The listening request is used to listen for the update event of the target type data in the update center server. The listening request is transmitted from the first functional component in the edge computing node to the docking plug-in.
[0169] The first determining module 12 is used to determine whether there is a long-lived listening connection for data of the target type between the cache plugin and the central server.
[0170] The association module 13 is used to associate the listening request with the long-lived listening connection when there is a long-lived listening connection for data of the target type.
[0171] The first transmission module 14 is used to transmit the updated target type data to the docking plugin according to the listening request associated with the listening long connection when the update event is detected based on the listening long connection and the updated target type data is obtained from the central server through the listening long connection, so that the docking plugin receives the updated target type data and transmits the updated target type data to the first functional component.
[0172] In an alternative implementation, the apparatus further includes:
[0173] A module is established to create a long-lived listening connection between the caching plugin and the central server for the target type of data in the absence of a long-lived listening connection for the target type of data.
[0174] The second transmission module is used to transmit the updated target type data to the docking plugin according to the listening request targeted by the established listening long connection when the update event is detected based on the established listening long connection and the updated target type data is obtained from the central server through the established listening long connection.
[0175] In an alternative implementation, the apparatus further includes:
[0176] The caching module is used to cache updated data of the target type in the caching plugin.
[0177] In an alternative implementation, the apparatus further includes:
[0178] The delete module is used to delete the data of the target type before the update from the cache plugin if the cache plugin already contains data of the target type before the update.
[0179] In one optional implementation, the associated module includes:
[0180] A storage unit is used to store in the cache plugin the association between the request identifier of the listening request and the connection identifier of the long-lived listening connection for the target type of data;
[0181] Accordingly;
[0182] The first transmission module includes:
[0183] The acquisition unit is used to obtain the request identifier in the association relationship based on the connection identifier of the long-lived connection being monitored;
[0184] The transmission unit is used to transmit updated target type data to the docking plugin according to the listening request corresponding to the request identifier in the association relationship.
[0185] In one optional implementation, the first determining module includes:
[0186] The lookup unit is used to find the connection identifier corresponding to the target type in the mapping relationship between the connection identifier of the long-lived connection being listened to and the type of the long-lived connection being listened to in the caching plugin.
[0187] The first determining unit is used to determine, when the connection identifier corresponding to the target type is found in the mapping relationship, that there is a long-lived listening connection for data of the target type between the cache plugin and the central server; the target type and the connection identifier corresponding to the target type are stored in the mapping relationship when the long-lived listening connection for data of the target type between the cache plugin and the central server was previously established.
[0188] or,
[0189] The second determining unit is used to determine that there is no long-lived listening connection for data of the target type between the cache plugin and the central server when no connection identifier corresponding to the target type is found in the mapping relationship.
[0190] In one optional implementation, the listening request also carries authentication information;
[0191] The device further includes:
[0192] The extraction module is used to extract the authentication information carried in the monitoring request;
[0193] The second determining module is used to determine whether the monitoring request is a legitimate request based on the authentication information;
[0194] The first determining module is further configured to: determine whether there is a long-lived listening connection for data of the target type between the cache plugin and the central server when the listening request is a legitimate request.
[0195] In an alternative implementation, the apparatus further includes:
[0196] The fourth receiving module is used to receive query requests for routing from the docking plugin. The query request is transmitted from the second functional component in the edge computing node to the docking plugin. The query request carries the target type and is used to actively request the updated target type data.
[0197] The lookup module is used to find updated data of the target type in the cache plugin;
[0198] The return module is used to return the updated target type data found in the cache plugin to the docking plugin according to the query request, so that the docking plugin can receive the updated target type data found in the cache plugin and pass the updated target type data found in the cache plugin to the second functional component.
[0199] In this application, the docking node receives a listening request from the first functional component in the edge computing node and routes the listening request to the caching plugin. The caching plugin receives the listening request routed by the docking plugin. The listening request is used to listen for update events of target type data in the update center server. The caching plugin determines whether a long-lived listening connection for the target type data exists between the caching plugin and the center server. If a long-lived listening connection for the target type data exists, it is not necessary to establish a new long-lived listening connection for the target type data between the caching plugin and the center server in real time for the listening request. Instead, the listening request can be associated with an existing long-lived listening connection for the target type data, allowing the listening request to reuse the existing long-lived listening connection for the target type data. This avoids increasing the number of long-lived listening connections for the target type data between the caching plugin and the center server, thereby preventing an excessive number of long-lived listening connections between the caching plugin and the center server. Consequently, it avoids very low bandwidth for each long-lived listening connection due to an excessive number of long-lived listening connections, thus minimizing the possibility of the long-lived listening connection being disconnected by the center server.
[0200] In addition, when an update event is detected based on a long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, the updated target type data can be passed to the docking plugin according to the listening request associated with the long-lived listening connection. This allows the docking plugin to pass the updated target type data to the first functional component, thereby enabling the first functional component to obtain the updated target type data. This ensures that the first functional component can obtain the updated target type data in a timely manner.
[0201] Reference Figure 8 This application discloses a data processing apparatus based on a data processing system. The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin. At least one edge computing node has a caching plugin deployed, or a caching plugin is deployed in middleware included in the data processing system. The interface plugins interface with the caching plugins, and the caching plugins interface with the central server. The apparatus is applied to the interface plugins and includes:
[0202] The second receiving module 21 is used to receive a listening request transmitted by the first functional component in the edge computing node; the listening request is used to listen for update events of target type data in the update center server.
[0203] Routing module 22 is used to route the listening request to the caching plugin; so that the caching plugin receives the listening request; determine whether there is a long-lived listening connection for the target type of data between the caching plugin and the central server; if there is a long-lived listening connection for the target type of data, associate the listening request with the long-lived listening connection; if the update event is detected based on the long-lived listening connection and the updated target type of data is obtained from the central server through the long-lived listening connection, transmit the updated target type of data to the docking plugin according to the listening request associated with the long-lived listening connection;
[0204] The third receiving module 23 is used to receive updated target type data;
[0205] The third transmission module 24 is used to transmit updated target type data to the first functional component.
[0206] In this application, the docking node receives a listening request from the first functional component in the edge computing node and routes the listening request to the caching plugin. The caching plugin receives the listening request routed by the docking plugin. The listening request is used to listen for update events of target type data in the update center server. The caching plugin determines whether a long-lived listening connection for the target type data exists between the caching plugin and the center server. If a long-lived listening connection for the target type data exists, it is not necessary to establish a new long-lived listening connection for the target type data between the caching plugin and the center server in real time for the listening request. Instead, the listening request can be associated with an existing long-lived listening connection for the target type data, allowing the listening request to reuse the existing long-lived listening connection for the target type data. This avoids increasing the number of long-lived listening connections for the target type data between the caching plugin and the center server, thereby preventing an excessive number of long-lived listening connections between the caching plugin and the center server. Consequently, it avoids very low bandwidth for each long-lived listening connection due to an excessive number of long-lived listening connections, thus minimizing the possibility of the long-lived listening connection being disconnected by the center server.
[0207] In addition, when an update event is detected based on a long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, the updated target type data can be passed to the docking plugin according to the listening request associated with the long-lived listening connection. This allows the docking plugin to pass the updated target type data to the first functional component, thereby enabling the first functional component to obtain the updated target type data. This ensures that the first functional component can obtain the updated target type data in a timely manner.
[0208] This application also provides a non-volatile readable storage medium storing one or more modules (programs). When these modules are applied to a device, they enable the device to execute the instructions for the method steps in this application.
[0209] This application provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause an electronic device to perform one or more methods as described in the above embodiments. In this application, the electronic device includes a server, a gateway, sub-devices, etc., and the sub-devices are devices such as Internet of Things (IoT) devices.
[0210] Embodiments of this disclosure can be implemented as an apparatus with any suitable hardware, firmware, software, or any combination thereof, configured as desired. This apparatus may include electronic devices such as servers (clusters) and terminal devices such as IoT devices.
[0211] Figure 9An exemplary apparatus 1300 is schematically shown that can be used to implement the various embodiments of this application.
[0212] In one embodiment, Figure 9 An exemplary device 1300 is shown, which includes one or more processors 1302, a control module (chipset) 1304 coupled to at least one of the processors 1302, a memory 1306 coupled to the control module 1304, a non-volatile memory (NVM) / storage device 1308 coupled to the control module 1304, one or more input / output devices 1310 coupled to the control module 1304, and a network interface 1312 coupled to the control module 1304.
[0213] Processor 1302 may include one or more single-core or multi-core processors, and processor 1302 may include any combination of general-purpose processors or special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In some embodiments, device 1300 can function as a server device such as a gateway in the embodiments of this application.
[0214] In some embodiments, apparatus 1300 may include one or more computer-readable media (e.g., memory 1306 or NVM / storage device 1308) having instructions 1314 and one or more processors 1302 that are combined with the one or more computer-readable media and configured to execute the instructions 1314 to implement the module and thus perform the actions in this disclosure.
[0215] In one embodiment, the control module 1304 may include any suitable interface controller to provide any suitable interface to at least one of the processors 1302 and / or any suitable device or component communicating with the control module 1304.
[0216] The control module 1304 may include a memory controller module to provide an interface to the memory 1306. The memory controller module may be a hardware module, a software module, and / or a firmware module.
[0217] Memory 1306 may be used, for example, to load and store data and / or instructions 1314 for device 1300. In one embodiment, memory 1306 may include any suitable volatile memory, such as suitable DRAM. In some embodiments, memory 1306 may include double data rate quad synchronous dynamic random access memory (DDR4 SDRAM).
[0218] In one embodiment, the control module 1304 may include one or more input / output controllers to provide interfaces to the NVM / storage device 1308 and (one or more) input / output devices 1310.
[0219] For example, NVM / storage device 1308 may be used to store data and / or instructions 1314. NVM / storage device 1308 may include any suitable non-volatile memory (e.g., flash memory) and / or may include any suitable (one or more) non-volatile storage devices (e.g., one or more hard disk drives (HDDs), one or more optical disc drives (CDs), and / or one or more digital universal optical disc (DVD) drives).
[0220] NVM / storage device 1308 may include storage resources that are physically part of a device on which device 1300 is mounted, or that can be accessed by the device without needing to be part of the device. For example, NVM / storage device 1308 may be accessed via a network via one or more input / output devices 1310.
[0221] One or more input / output devices 1310 may provide an interface for device 1300 to communicate with any other suitable device. Input / output devices 1310 may include communication components, pinyin components, sensor components, etc. Network interface 1312 may provide an interface for device 1300 to communicate via one or more networks. Device 1300 may wirelessly communicate with one or more components of a wireless network according to any of one or more wireless network standards and / or protocols, such as accessing wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, etc., or combinations thereof.
[0222] In one embodiment, at least one of the processors 1302 may be logically packaged with one or more controllers (e.g., memory controller modules) of the control module 1304. In one embodiment, at least one of the processors 1302 may be logically packaged with one or more controllers of the control module 1304 to form a system-in-package (SiP). In one embodiment, at least one of the processors 1302 may be integrated with the logic of one or more controllers of the control module 1304 on the same die. In one embodiment, at least one of the processors 1302 may be integrated with the logic of one or more controllers of the control module 1304 on the same die to form a system-on-a-chip (SoC).
[0223] In various embodiments, device 1300 may be, but is not limited to, a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.). In various embodiments, device 1300 may have more or fewer components and / or different architectures. For example, in some embodiments, device 1300 includes one or more cameras, a keyboard, a liquid crystal display (LCD) screen (including a touchscreen display), a non-volatile memory port, multiple antennas, a graphics chip, an application-specific integrated circuit (ASIC), and a speaker.
[0224] This application provides an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform one or more methods as described in this application.
[0225] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0226] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0227] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable information processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0228] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable information processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0229] These computer program instructions can also be loaded onto a computer or other programmable information processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0230] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0231] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the element.
[0232] The data processing method and apparatus based on the data processing system provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A data processing method based on a data processing system, characterized in that, The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin. At least one edge computing node has a caching plugin deployed, or a caching plugin is deployed in the middleware included in the data processing system. The interface plugins interface with each other, and the caching plugins interface with the central server. The method is applied to a caching plugin, and the method includes: Receive listening requests from the docking plugin route. The listening requests are used to listen for update events of target type data in the update center server. The listening requests are passed from the first functional component in the edge computing node to the docking plugin. Determine if a persistent listening connection exists between the caching plugin and the central server for the target data type. In the presence of a persistent listening connection for data of the target type, associate the listening request with the persistent listening connection; When the update event is detected based on the long-lived listening connection and the updated target type data is obtained from the central server through the long-lived listening connection, the updated target type data is transmitted to the docking plugin according to the listening request associated with the long-lived listening connection, so that the docking plugin receives the updated target type data and transmits the updated target type data to the first functional component.
2. The method according to claim 1, characterized in that, The method further includes: In the absence of a persistent listening connection for data of the target type, a persistent listening connection for data of the target type is established between the caching plugin and the central server for the listening request. If the update event is detected based on the established long-lived listening connection and the updated target type data is obtained from the central server through the established long-lived listening connection, the updated target type data is transmitted to the docking plugin according to the listening request targeted by the established long-lived listening connection.
3. The method according to claim 1 or 2, characterized in that, The method further includes: The updated target type data is cached in the caching plugin.
4. The method according to claim 3, characterized in that, The method further includes: If the cache plugin contains data of the target type before the update, delete the data of the target type before the update from the cache plugin.
5. The method according to claim 1, characterized in that, The association of the listening request with the long-lived listening connection includes: The caching plugin stores the association between the request identifier of the listening request and the connection identifier of the long-lived listening connection for the target type of data; Accordingly; The step of passing updated target type data to the docking plugin according to the listening request associated with the listening long connection includes: Obtain the request identifier in the association based on the connection identifier of the long-lived connection being monitored; The updated target type data is transmitted to the docking plugin according to the listening request corresponding to the request identifier in the association relationship.
6. The method according to claim 1, characterized in that, The process of determining whether a long-lived listening connection exists between the caching plugin and the central server for the target data type includes: In the mapping relationship between the connection identifier of the long-lived connection being monitored and the type of the long-lived connection being monitored in the caching plugin, find the connection identifier corresponding to the target type; If the connection identifier corresponding to the target type is found in the mapping relationship, it is determined that there is a long-lived listening connection for data of the target type between the cache plugin and the central server; the target type and the connection identifier corresponding to the target type are stored in the mapping relationship when the long-lived listening connection for data of the target type between the cache plugin and the central server was previously established. or, If no connection identifier corresponding to the target type is found in the mapping relationship, it is determined that there is no long-lived listening connection for data of the target type between the cache plugin and the central server.
7. The method according to claim 1, characterized in that, The monitoring request also carries authentication information; After receiving the listening request for the docking plugin route, the process also includes: Extract the authentication information carried in the monitoring request; Determine whether the monitoring request is a legitimate request based on the authentication information; If the listening request is a legitimate request, then determine whether there is a long-lived listening connection between the caching plugin and the central server for the target type of data.
8. The method according to claim 3, characterized in that, The method further includes: Receive query requests from the docking plugin route; the query request is passed from the second functional component in the edge computing node to the docking plugin; the query request carries the target type and is used to actively request the updated target type data; Find the updated target type data in the cache plugin; The system returns the updated target type data found in the cache plugin to the docking plugin based on the query request, so that the docking plugin can receive the updated target type data found in the cache plugin and pass the updated target type data found in the cache plugin to the second functional component.
9. A data processing method based on a data processing system, characterized in that, The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin. At least one edge computing node has a caching plugin deployed, or a caching plugin is deployed in the middleware included in the data processing system. The interface plugins interface with each other, and the caching plugins interface with the central server. The method is applied to docking plug-ins, and the method includes: Receive a listening request transmitted by the first functional component in the edge computing node; the listening request is used to listen for update events of target type data in the update center server; The listening request is routed to the caching plugin to enable the caching plugin to receive the listening request. It is determined whether a long-lived listening connection for the target data type exists between the caching plugin and the central server. If a long-lived listening connection for the target data type exists, the listening request is associated with the long-lived listening connection. If the update event is detected based on the long-lived listening connection and the updated target data type is obtained from the central server through the long-lived listening connection, the updated target data type is transmitted to the interface plugin according to the listening request associated with the long-lived listening connection. Receive updated data of the target type; Pass the updated target type data to the first functional component.
10. A data processing system, characterized in that, The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin. At least one edge computing node has a caching plugin deployed, or a caching plugin is deployed in the middleware included in the data processing system. The interface plugins interface with each other, and the caching plugins interface with the central server. The docking plugin is used to receive listening requests transmitted by the first functional component in the edge computing node and route the listening requests to the caching plugin; the listening requests are used to listen for update events of target type data in the update center server; The caching plugin is used to receive listening requests from the docking plugin route; determine whether there is a long-lived listening connection for the target type of data between the caching plugin and the central server; if there is a long-lived listening connection for the target type of data, associate the listening request with the long-lived listening connection; if the update event is detected based on the long-lived listening connection and the updated target type of data is obtained from the central server through the long-lived listening connection, the updated target type of data is transmitted to the docking plugin according to the listening request associated with the long-lived listening connection. The docking plugin is used to receive updated target type data and pass the updated target type data to the first functional component.
11. A data processing device based on a data processing system, characterized in that, The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin. At least one edge computing node has a caching plugin deployed, or a caching plugin is deployed in the middleware included in the data processing system. The interface plugins interface with each other, and the caching plugins interface with the central server. The device is used in a caching plugin, and the device includes: The first receiving module is used to receive listening requests from the docking plugin routing. The listening requests are used to listen for update events of target type data in the update center server. The listening requests are transmitted from the first functional component in the edge computing node to the docking plugin. The first determination module is used to determine whether there is a long-lived listening connection between the cache plugin and the central server for data of the target type. The association module is used to associate the listening request with the long-lived listening connection when there is a long-lived listening connection for data of the target type. The first transmission module is used to transmit the updated target type data to the docking plugin according to the listening request associated with the listening long connection when the update event is detected based on the listening long connection and the updated target type data is obtained from the central server through the listening long connection, so that the docking plugin receives the updated target type data and transmits the updated target type data to the first functional component.
12. A data processing device based on a data processing system, characterized in that, The data processing system includes at least a central server and multiple edge computing nodes. Each edge computing node has an interface plugin. At least one edge computing node has a caching plugin deployed, or a caching plugin is deployed in the middleware included in the data processing system. The interface plugins interface with each other, and the caching plugins interface with the central server. The device is used for docking plugs, and the device includes: The second receiving module is used to receive a listening request transmitted by the first functional component in the edge computing node; the listening request is used to listen for update events of target type data in the update center server; The routing module is used to route the listening request to the caching plugin so that the caching plugin can receive the listening request; determine whether there is a long-lived listening connection for the target type of data between the caching plugin and the central server; if there is a long-lived listening connection for the target type of data, associate the listening request with the long-lived listening connection; if the update event is detected based on the long-lived listening connection and the updated target type of data is obtained from the central server through the long-lived listening connection, transmit the updated target type of data to the docking plugin according to the listening request associated with the long-lived listening connection. The third receiving module is used to receive updated target type data; The third transmission module is used to transmit updated target type data to the first functional component.
13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the steps of the method as claimed in any one of claims 1 to 9 when executing the program.
14. A computer-readable storage medium, characterized in that, A computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as claimed in any one of claims 1 to 9.