Data sharing method and system based on flexible configuration
By using cross-node communication services and shared routing keys for data broadcast screening in the Internet of Things, the problems of low data linkage efficiency and resource waste in the Internet of Things are solved, enabling flexible and efficient data sharing to adapt to the needs of different business scenarios.
Patent Information
- Application Number
- CN202410679548.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing IoT configuration, the degree of standardization of data linkage is low and cannot adapt to the needs of different business scenarios, resulting in low efficiency of data linkage. In addition, the secondary development solution has high technical requirements for users, high management and maintenance costs, and cannot meet the needs of scene changes and changes. The need to share data changes results in data garbage or resource waste.
By establishing a cross-node communication service between the edge computing nodes of the data sharing source device and the target device, and using preset data sharing configurations and shared routing keys for data broadcast and filtering, flexible data sharing between different devices is achieved and data is reduced. processing volume and avoid wasting resources.
It improves the flexibility and efficiency of data sharing, reduces shared data waste, reduces resource waste, adapts to the needs of different business scenarios, and simplifies user technical requirements and management and maintenance costs.
Smart Images

Figure CN118612237A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data sharing method and system based on flexible configuration. Background Art
[0002] In the Industrial Internet of Things, data linkage is an effective solution to break down information silos and improve the timeliness of data synchronization and business operations.
[0003] In the existing IoT configuration, due to the different complexities of industrial Internet scenarios, the requirements for data linkage are becoming increasingly higher. However, the existing solutions for writing standard linkage data through program code have a low degree of standardization and cannot adapt to the data linkage needs of different business scenarios. At the same time, the business data required for data linkage is wide, resulting in low efficiency of data linkage.
[0004] In the prior art, program code is used to write standard shared data, fix point-to-point data sharing linkage information, and secondary development solutions are used to write shared data into the program for application based on business needs. The above solutions not only use program code to write standard shared data, but also fail to meet application needs of scene changes and shared data changes. In addition, when the shared data is less than the application needs, it cannot be used or is downgraded, resulting in data garbage or resource waste when the shared data exceeds the application needs. When the secondary development solution is used, when the scene or application needs change with the business or time, secondary development adjustments are required, which not only has high technical requirements for users, but also has high management and maintenance costs. Summary of the invention
[0005] In order to solve the above technical problems, the present invention discloses a data sharing method and system based on flexible configuration, which is used to improve the flexibility of data sharing, while reducing the amount of business data that needs to be processed during data sharing, improving the efficiency of data sharing, and reducing resource waste.
[0006] In order to achieve the above objectives, in a first aspect, the present invention discloses a data sharing method based on flexible configuration, comprising:
[0007] Sending the preset data sharing configuration to the data sharing source device and the data sharing target device respectively through a first edge computing node corresponding to the data sharing source device and a second edge computing node corresponding to the data sharing target device;
[0008] According to the data sharing configuration, reporting the first shared routing key of the data sharing target device to the second edge computing node, and then reporting the shared data configured by the data sharing source device according to the shared routing key to the first edge computing node;
[0009] The shared data is broadcast to the second edge computing node through the cross-node communication service preset in the second edge computing node and the first edge computing node, and the first shared routing key is used to determine whether the shared data is the shared data to be processed by the data sharing target device. If so, the shared data is sent to the data sharing target device.
[0010] A data sharing method based on flexible configuration disclosed in the present invention first configures the sharing configuration of each terminal device in advance, that is, determines which device is a shared data sending device and which device is a shared data receiving device. Through the shared configuration, the sharing needs between different devices are realized, and the flexibility of data sharing is improved. At the same time, based on the fact that different devices may belong to different edge computing services, the present invention sets cross-node communication services in different edge computing nodes, so that different edge computing nodes can communicate with each other, thereby realizing cross-regional data sharing and improving the flexibility of data sharing.
[0011] Furthermore, after the sharing configuration is sent through the edge computing node corresponding to the device, the data source device used to send the shared data configures the shared data according to the shared routing key, and sends the shared data to the corresponding first edge computing node, while the data sharing target device used to receive the shared data registers the corresponding shared routing key in the corresponding second edge computing node. After the edge computing node communicates and obtains the shared data sent by the data sharing source device, the first shared routing key saved by the second edge computing node is used to determine whether the shared data is data that can be processed by the data sharing target device, thereby realizing data screening, reducing the data processing amount of the device and avoiding resource waste.
[0012] As a preferred example, the first edge computing node corresponding to the data sharing source device and the second edge computing node corresponding to the data sharing target device respectively send the preset data sharing configuration to the data sharing source device and the data sharing target device, including:
[0013] The data sharing configurations corresponding to the data sharing source device and the data sharing target device are configured respectively through the cloud; wherein the data sharing configurations include a plurality of first shared measurement points corresponding to each of the plurality of data sharing source devices, a plurality of second shared measurement points corresponding to each of the plurality of data sharing target devices, and a shared routing key corresponding to each of the plurality of data sharing target devices;
[0014] Sending the data sharing configuration to the first edge computing node and the second edge computing node respectively through the cloud and an MQTT link preset between the cloud and the edge computing node;
[0015] By presetting an MQTT link between the edge computing node and the device and the first edge computing node and the second edge computing node, the data sharing configuration is sent to each of the data sharing source devices and each of the data sharing target devices respectively.
[0016] The present invention realizes accurate sharing of data of measuring points and reduces shared data garbage by performing sharing configuration of measuring points of different devices in the cloud. At the same time, different measuring points of different devices are configured to realize flexible configuration of shared data and its sending end, thereby improving the flexibility and application scenarios of data sharing.
[0017] As a preferred example, in the step of reporting the first shared routing key of the data sharing target device to the second edge computing node according to the data sharing configuration, and then reporting the shared data of the data sharing source device configured according to the shared routing key to the first edge computing node, including:
[0018] According to the data sharing configuration, the data sharing target device registers the first shared routing key to the second edge computing node through the MQTT link, and saves the corresponding relationship between the first shared routing key and the data sharing target device through the second edge computing node;
[0019] According to the data sharing configuration, the data sharing source device configures the first shared data to be reported by assembling the shared routing key into the topic of the MQTT message to generate the data to be reported, and uses the data to be reported as the shared data;
[0020] Through the MQTT link, the data sharing source device reports the shared data to the first edge computing node.
[0021] The present invention builds an MQTT link between the edge computing node and the device, and realizes unified management of devices under different nodes through the MQTT link, thereby improving the efficiency of data sharing. At the same time, the present invention sets the shared routing key to filter the reported shared data through the shared routing key to obtain the shared data that needs to be processed by the data sharing target device, thereby reducing data garbage and avoiding waste of resources.
[0022] As a preferred example, broadcasting the shared data to the second edge computing node by using a cross-node communication service preset in the second edge computing node and the first edge computing node includes:
[0023] The shared data is saved by a first message queue preset on the first edge computing node;
[0024] The shared data is broadcast from the first edge computing node to the second edge computing node by connecting the first message queue with a cross-node communication Agent service preset on the second edge computing node.
[0025] The present invention constructs message buses corresponding to different nodes by respectively deploying independent message queues in different nodes and cross-node communication Agent services connecting message queues of different nodes, realizes cross-node data sharing between different nodes through the message bus, and improves the flexibility of data sharing.
[0026] As a preferred example, judging whether the shared data is the shared data to be processed by the data sharing target device by using the first shared routing key includes:
[0027] According to the first edge computing node, broadcasting the shared data configured by each data sharing source device in a plurality of data sharing source devices to a second edge computing node corresponding to each data sharing target device in a plurality of data sharing target devices;
[0028] The second edge computing node corresponding to each data sharing target device receives multiple shared data sent by the multiple data sharing source devices, and matches and determines the multiple shared data through the first shared routing key, and screens and determines the multiple shared data to be processed by each data sharing target device.
[0029] The present invention utilizes the edge computing node to enable the shared source device and the shared target device to present a many-to-many relationship when sharing data, that is, one source device can share data to multiple target devices, and one target device can also accept shared data sent by multiple source devices, thereby improving the flexibility of sharing through a many-to-many configuration.
[0030] In a second aspect, the present invention discloses a data sharing system based on flexible configuration, including a configuration sharing module, a routing registration module and a data sharing module;
[0031] The configuration sharing module is used to send the preset data sharing configuration to the data sharing source device and the data sharing target device respectively through the first edge computing node corresponding to the data sharing source device and the second edge computing node corresponding to the data sharing target device;
[0032] The routing registration module is used to report the first shared routing key of the data sharing target device to the second edge computing node according to the data sharing configuration, and then report the shared data configured by the data sharing source device according to the shared routing key to the first edge computing node;
[0033] The data sharing module is used to broadcast the shared data to the second edge computing node through a cross-node communication service preset in the second edge computing node and the first edge computing node, and determine whether the shared data is the shared data to be processed by the data sharing target device through the first shared routing key. If so, the shared data is sent to the data sharing target device.
[0034] The present invention discloses a data sharing system based on flexible configuration. First, the sharing configuration of each terminal device is configured in advance, that is, which device is a shared data sending device and which device is a shared data receiving device. Through the shared configuration, the sharing needs between different devices are realized, and the flexibility of data sharing is improved. At the same time, based on the fact that different devices may belong to different edge computing services, the present invention sets cross-node communication services in different edge computing nodes, so that different edge computing nodes can communicate with each other, thereby realizing cross-regional data sharing and improving the flexibility of data sharing.
[0035] Furthermore, after the sharing configuration is sent through the edge computing node corresponding to the device, the data source device used to send the shared data configures the shared data according to the shared routing key, and sends the shared data to the corresponding first edge computing node, while the data sharing target device used to receive the shared data registers the corresponding shared routing key in the corresponding second edge computing node. After the edge computing node communicates and obtains the shared data sent by the data sharing source device, the first shared routing key saved by the second edge computing node is used to determine whether the shared data is data that can be processed by the data sharing target device, thereby realizing data screening, reducing the data processing amount of the device and avoiding resource waste.
[0036] As a preferred example, the configuration sharing module includes a configuration unit and a sending unit;
[0037] The configuration unit is used to configure the data sharing configurations corresponding to the data sharing source device and the data sharing target device respectively through the cloud; wherein the data sharing configuration includes a plurality of first shared measurement points corresponding to each of the plurality of data sharing source devices, a plurality of second shared measurement points corresponding to each of the plurality of data sharing target devices, and a shared routing key corresponding to each of the plurality of data sharing target devices;
[0038] The sending unit is used to send the data sharing configuration to the first edge computing node and the second edge computing node respectively through the cloud and the MQTT link preset between the cloud and the edge computing node; and send the data sharing configuration to each data sharing source device and each data sharing target device respectively through the MQTT link preset between the edge computing node and the device and the first edge computing node and the second edge computing node.
[0039] The present invention realizes accurate sharing of data of measuring points and reduces shared data garbage by performing sharing configuration of measuring points of different devices in the cloud. At the same time, different measuring points of different devices are configured to realize flexible configuration of shared data and its sending end, thereby improving the flexibility and application scenarios of data sharing.
[0040] As a preferred example, the routing registration module includes a registration unit and a data configuration unit;
[0041] The registration unit is used for registering the first shared routing key to the second edge computing node through the MQTT link by the data sharing target device according to the data sharing configuration, and saving the corresponding relationship between the first shared routing key and the data sharing target device through the second edge computing node;
[0042] The data configuration unit is used to configure the first shared data to be reported by the data sharing source device according to the data sharing configuration by assembling the shared routing key into the topic of the MQTT message to generate the data to be reported, and use the data to be reported as the shared data; through the MQTT link, the data sharing source device reports the shared data to the first edge computing node.
[0043] The present invention builds an MQTT link between the edge computing node and the device, and realizes unified management of devices under different nodes through the MQTT link, thereby improving the efficiency of data sharing. At the same time, the present invention sets the shared routing key to filter the reported shared data through the shared routing key to obtain the shared data that needs to be processed by the data sharing target device, thereby reducing data garbage and avoiding waste of resources.
[0044] As a preferred example, the data sharing module includes a node unit and a communication unit;
[0045] The node unit is used to save the shared data through a first message queue preset on the first edge computing node;
[0046] The communication unit is used to broadcast the shared data from the first edge computing node to the second edge computing node by connecting the first message queue and the cross-node communication Agent service of the second message queue preset on the second edge computing node.
[0047] The present invention constructs message buses corresponding to different nodes by respectively deploying independent message queues in different nodes and cross-node communication Agent services connecting message queues of different nodes, realizes cross-node data sharing between different nodes through the message bus, and improves the flexibility of data sharing.
[0048] In a third aspect, the present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data sharing method based on flexible configuration as described in the first aspect is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 : A flow chart of a data sharing method based on flexible configuration provided by an embodiment of the present invention;
[0050] Figure 2 : A structural diagram of a data sharing system based on flexible configuration provided by an embodiment of the present invention;
[0051] Figure 3 : A flow chart of a data sharing method based on flexible configuration provided by another embodiment of the present invention;
[0052] Figure 4 : A configuration diagram of a shared measurement point provider provided by another embodiment of the present invention;
[0053] Figure 5 : A configuration diagram of a shared measurement point user provided by another embodiment of the present invention;
[0054] Figure 6 : A schematic diagram of a data sharing configuration architecture provided by another embodiment of the present invention;
[0055] Figure 7 : A schematic diagram of cross-node communication provided by another embodiment of the present invention;
[0056] Figure 8 : A schematic diagram of another cross-node communication provided by another embodiment of the present invention;
[0057] Fig. 9 : A schematic diagram of synchronization timing of cloud-edge-terminal shared data configuration provided by another embodiment of the present invention;
[0058] Fig.10: A schematic diagram of inter-device cross-node broadcast communication provided in yet another embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] Embodiment 1
[0061] This embodiment provides a data sharing method based on flexible configuration. For the specific implementation process of the sharing method, please refer to Figure 1 , mainly including steps 101 to 103, the steps include:
[0062] Step 101: Send a preset data sharing configuration to the data sharing source device and the data sharing target device respectively through a first edge computing node corresponding to a data sharing source device and a second edge computing node corresponding to a data sharing target device.
[0063] In this embodiment, this step mainly includes: configuring the data sharing configuration corresponding to the data sharing source device and the data sharing target device respectively through the cloud; wherein the data sharing configuration includes a plurality of first shared measurement points corresponding to each of the plurality of data sharing source devices, a plurality of second shared measurement points corresponding to each of the plurality of data sharing target devices, and a shared routing key corresponding to each of the data sharing target devices; sending the data sharing configuration to the first edge computing node and the second edge computing node respectively through the cloud and the MQTT link preset between the cloud and the edge computing node; sending the data sharing configuration to each of the data sharing source devices and each of the data sharing target devices respectively through the MQTT link preset between the edge computing node and the device and the first edge computing node and the second edge computing node.
[0064] In this embodiment, this step realizes accurate sharing of data at the measuring points and reduces shared data garbage by configuring the shared measuring points of different devices in the cloud. At the same time, different measuring points of different devices are configured to realize flexible configuration of shared data and its sending end, thereby improving the flexibility and application scenarios of data sharing.
[0065] Step 102: According to the data sharing configuration, the first shared routing key of the data sharing target device is reported to the second edge computing node, and then the shared data configured according to the shared routing key of the data sharing source device is reported to the first edge computing node.
[0066] In this embodiment, this step mainly includes: according to the data sharing configuration, the data sharing target device registers the first shared routing key to the second edge computing node through the MQTT link, and saves the correspondence between the first shared routing key and the data sharing target device through the second edge computing node; according to the data sharing configuration, the data sharing source device configures the first shared data to be reported by assembling the shared routing key into the topic of the MQTT message to generate the data to be reported, and uses the data to be reported as the shared data; through the MQTT link, the data sharing source device reports the shared data to the first edge computing node.
[0067] In this embodiment, this step builds an MQTT link between the edge computing node and the device, and unified management of devices under different nodes is achieved through the MQTT link, thereby improving the efficiency of data sharing. At the same time, the present invention sets the shared routing key to filter the reported shared data through the shared routing key to obtain the shared data that needs to be processed by the data sharing target device, thereby reducing data garbage and avoiding waste of resources.
[0068] Step 103: Broadcast the shared data to the second edge computing node through the cross-node communication service preset in the second edge computing node and the first edge computing node, and determine whether the shared data is the shared data to be processed by the data sharing target device through the first shared routing key. If so, send the shared data to the data sharing target device.
[0069] In this embodiment, this step mainly includes: saving the shared data through a first message queue preset on the first edge computing node; broadcasting the shared data from the first edge computing node to the second edge computing node through a cross-node communication Agent service connecting the first message queue with a second message queue preset on the second edge computing node.
[0070] Furthermore, according to the first edge computing node, the shared data configured for each of the several data sharing source devices are broadcast to the second edge computing node corresponding to each of the several data sharing target devices; according to the second edge computing node corresponding to each of the data sharing target devices, multiple shared data sent by the several data sharing source devices are received, and matching judgment is performed on the multiple shared data through the first shared routing key, and the several shared data to be processed by each of the data sharing target devices are screened and determined.
[0071] In this embodiment, this step builds message buses corresponding to different nodes by deploying independent message queues in different nodes and cross-node communication Agent services that connect the message queues of different nodes. Cross-node data sharing between different nodes is achieved through the message bus, thereby improving the flexibility of data sharing.
[0072] On the other hand, this embodiment also discloses a data sharing system based on flexible configuration. For the specific structure of the system, please refer to Figure 2 , mainly including a configuration sharing module 201, a routing registration module 202 and a data sharing module 203.
[0073] The configuration sharing module 201 is used to send the preset data sharing configuration to the data sharing source device and the data sharing target device respectively through the first edge computing node corresponding to the data sharing source device and the second edge computing node corresponding to the data sharing target device.
[0074] The routing registration module 202 is used to report the first shared routing key of the data sharing target device to the second edge computing node according to the data sharing configuration, and then report the shared data configured by the data sharing source device according to the shared routing key to the first edge computing node.
[0075] The data sharing module 203 is used to broadcast the shared data to the second edge computing node through the cross-node communication service preset in the second edge computing node and the first edge computing node, and determine whether the shared data is the shared data to be processed by the data sharing target device through the first shared routing key. If so, the shared data is sent to the data sharing target device.
[0076] In this embodiment, the configuration sharing module 201 includes a configuration unit and a sending unit.
[0077] The configuration unit is used to configure the data sharing configurations corresponding to the data sharing source device and the data sharing target device respectively through the cloud; wherein the data sharing configuration includes a plurality of first shared measurement points corresponding to each of a plurality of data sharing source devices, a plurality of second shared measurement points corresponding to each of a plurality of data sharing target devices, and a shared routing key corresponding to each of the data sharing target devices.
[0078] The sending unit is used to send the data sharing configuration to the first edge computing node and the second edge computing node respectively through the cloud and the MQTT link preset between the cloud and the edge computing node; and send the data sharing configuration to each data sharing source device and each data sharing target device respectively through the MQTT link preset between the edge computing node and the device and the first edge computing node and the second edge computing node.
[0079] In this embodiment, the routing registration module 202 includes a registration unit and a data configuration unit.
[0080] The registration unit is used to register the first shared routing key to the second edge computing node through the MQTT link according to the data sharing configuration, and save the corresponding relationship between the first shared routing key and the data sharing target device through the second edge computing node.
[0081] The data configuration unit is used to configure the first shared data to be reported by the data sharing source device according to the data sharing configuration by assembling the shared routing key into the topic of the MQTT message to generate the data to be reported, and use the data to be reported as the shared data; through the MQTT link, the data sharing source device sends the shared data to the first edge computing node.
[0082] In this embodiment, the data sharing module 203 includes a node unit and a communication unit.
[0083] The node unit is used to save the shared data through a first message queue preset on the first edge computing node.
[0084] The communication unit is used to broadcast the shared data from the first edge computing node to the second edge computing node by connecting the first message queue and the cross-node communication Agent service of the second message queue preset on the second edge computing node.
[0085] In addition to the above method and system, this embodiment further discloses a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, a data sharing method based on flexible configuration described in this embodiment is implemented.
[0086] The present embodiment provides a data sharing method and system based on flexible configuration. First, the sharing configuration of each terminal device is configured in advance, that is, which device is the shared data sending device and which device is the shared data receiving device. Through the shared configuration, the sharing needs between different devices are realized, and the flexibility of data sharing is improved. At the same time, based on the fact that different devices may belong to different edge computing services, the present invention sets cross-node communication services in different edge computing nodes, so that different edge computing nodes can communicate with each other, thereby realizing cross-regional data sharing and improving the flexibility of data sharing.
[0087] Furthermore, after the sharing configuration is sent through the edge computing node corresponding to the device, the data source device used to send the shared data configures the shared data according to the shared routing key, and sends the shared data to the corresponding first edge computing node, while the data sharing target device used to receive the shared data registers the corresponding shared routing key in the corresponding second edge computing node. After the edge computing node communicates and obtains the shared data sent by the data sharing source device, the first shared routing key saved by the second edge computing node is used to determine whether the shared data is data that can be processed by the data sharing target device, thereby realizing data screening, reducing the data processing amount of the device and avoiding resource waste.
[0088] Embodiment 2
[0089] This embodiment further provides a data sharing method based on flexible configuration. For the specific implementation process of the sharing method, please refer to Figure 3 , mainly including steps 301 to 304, the steps are mainly:
[0090] Step 301: Perform data sharing configuration based on the cloud, and send the data sharing configuration to the data sharing source device and the data sharing target device through the edge computing node.
[0091] In this embodiment, the step is: respectively configure the data sharing configurations corresponding to the data sharing source device and the data sharing target device through the cloud, and respectively send the data sharing configurations to the first edge computing node and the second edge computing node through the cloud and the MQTT link preset between the cloud and the edge computing node, and then transmit the data sharing configurations to the data sharing source device and the data sharing target device through the edge computing node.
[0092] Specifically, in order to open up the business data communication link between edge servers independently deployed and running in edge scenarios, the shared configuration of the measurement point data in the cloud is synchronized to the edge, so as to realize the ability of the edge servers to share the measurement point data of the access devices under them according to the configuration, wherein different devices correspond to different edge computing nodes, and the present embodiment first configures the shared configuration of different devices corresponding to different edge servers, i.e., edge computing nodes, in the cloud. In this shared configuration, the terminal device can determine whether it is a shared data sender or a shared data receiver according to the configuration, or the terminal device can be both a shared data sender and a shared data receiver, wherein the shared configuration includes a provider configuration, i.e., a shared data sender, and a user configuration, i.e., a shared data receiver, and the configuration is related to the business, wherein the provider is configured to set the measurement point as a shared measurement point when editing the measurement point in the device. For details, please refer to Figure 4 and Figure 5 , which is a configuration diagram of a shared measuring point provider and user provided in this embodiment. After the setting is completed, the configuration is sent to the gateway. The gateway is required to share the remote sensing value of the measuring point. When the user is configured as which shared measuring point the user needs to use, that is, to receive the shared data sent by the shared sending device, the value of which shared measuring point needs to be configured. After being sent to the gateway, the reverse registration informs the edge server, that is, the edge computing node, which shared measuring points need to wait for signals. During this period, according to the shared configuration, one shared measuring point can share data to multiple user devices, and one user device can also receive shared data sent by multiple shared measuring points.
[0093] Specifically, refer to Figure 6 The cloud and the edge server are connected in communication via an MQTT link. After data sharing configuration is performed on the cloud, the data sharing configuration is sent to the edge server via the MQTT link. The edge server and the device are connected in communication via an MQTT link, and the data sharing configuration is sent to the terminal device. In this embodiment, one device may correspond to multiple edge servers. Specifically, in order to distinguish the connection relationship between the edge server and the device, multiple edge computing nodes for sharing data corresponding to the shared source device are set as the first edge computing nodes, and multiple edge computing nodes for receiving shared data corresponding to the shared target device are set as the second edge computing nodes.
[0094] Step 302: According to the data sharing configuration, the data sharing target device registers a routing key to the second edge computing node, and the data sharing source device then assembles the shared routing key to report the shared data to the first edge computing node.
[0095] In this embodiment, the steps are: according to the data sharing configuration, the data sharing target device registers the first shared routing key to the second edge computing node through the MQTT link, and saves the correspondence between the first shared routing key and the data sharing target device through the second edge computing node; according to the data sharing configuration, the data sharing source device configures the first shared data to be reported by assembling the shared routing key into the topic in the MQTT message to obtain the shared data; through the MQTT link, the data sharing source device sends the shared data to the first edge computing node.
[0096] Specifically, refer to Figure 6 The cloud completes the data sharing configuration by defining the source device, target device, and shared routing key, and then sends it to the source device and target device through the cloud-edge link. After receiving the data sharing configuration, the target device registers the shared routing key to the target node and sends the shared routing key to the edge computing node through the MQTT link. The edge computing node records the correspondence between the device and the shared routing key in the database. When the source device reports the data to be shared, it will combine the data according to the shared routing key configuration (assemble the shared routing key into the MQTT topic) and send it to the edge server. The synchronization timing of the cloud-edge shared data configuration can be referred to. Fig. 9 .
[0097] Further, see Figure 6 and Fig. 9 , the edge computing server may transmit information through the gateway when transparently transmitting the data sharing configuration to the terminal device. In this embodiment, the business gateway parses the measurement point configuration sent from the cloud, and parses out which measurement points are shared measurement points and the keys of the shared measurement points. The shared measurement points used are registered to the edge server. The business gateway of the shared measurement point provider sends the key and the collected measurement point value in real time. The user and the provider realize data intercommunication through the same key. At the same time, in order to avoid the mutual propagation of shared measurement point values between users, the business gateway can only share the value to the edge server when and only when the shared value is provided by the business gateway, and the business gateway is set to parse the user and provider of each shared measurement point. If the measurement point is provided by the business gateway or its lower-level device, the business gateway needs to share the measurement point value with the edge server and the user. If the measurement point value is only used within the business gateway, the value cannot be shared to the edge server.
[0098] Step 303: Broadcast the shared data from the first edge computing node to the second edge computing node according to the message queue and cross-node communication service preset in the edge computing node, and judge the shared data by the routing key preset in the second edge computing node.
[0099] In this embodiment, the step mainly includes: saving the shared data by a first message queue preset on the first edge computing node; broadcasting the shared data from the first edge computing node to the second edge computing node by connecting the first message queue with a cross-node communication Agent service of a second message queue preset on the second edge computing node.
[0100] Furthermore, during the data broadcasting process, according to the first edge computing node, the shared data configured by each of the plurality of data sharing source devices is broadcasted to the second edge computing node corresponding to each of the plurality of data sharing target devices;
[0101] The second edge computing node corresponding to each data sharing target device receives multiple shared data sent by the multiple data sharing source devices, and matches and determines the multiple shared data through the first shared routing key, and screens and determines the multiple shared data to be processed by each data sharing target device.
[0102] Specifically, in order to connect the message queue broker (such as RabbitMQ, RocketMQ, NSQ, etc.) independently deployed on the edge server and realize the unified message bus across the edge nodes, in this embodiment, Figure 7 As shown in the figure, in addition to deploying MQ Broker on each edge computing node, a client Agent service for cross-node communication is also deployed and run. It sends and receives data by connecting to MQ Broker on other nodes to achieve data interaction with other nodes. The specific implementation is as follows:
[0103] Based on the message queue Broker deployed on the edge server, a queue specifically used for inter-node communication (including queue name and necessary routing parameters) is designed. This queue is responsible for message forwarding between other nodes connected to this node.
[0104] A cross-node communication Agent service is deployed and run on each edge computing node. The service connects to the local MQ Broker and the MQ Broker of another node at the same time to connect and receive MQ messages from other nodes, and monitor, consume local MQ messages and forward them to agent services of other nodes (for example, the business module on edge server A needs to send a scheduling instruction to edge server B, the business module will send a message to the local MQ, the local cross-node communication Agent service receives the message and forwards it to edge server B, and the cross-node communication Agent on edge server B receives the message and forwards it to the business module for processing through the internal queue).
[0105] In this embodiment, after the edge server receives the shared data sent by the source device, it broadcasts the message to other nodes through the edge cross-node communication link. After receiving the broadcast message, other edge servers determine whether the shared data needs to be shared based on the shared routing key. If yes, it will be sent to the target device, otherwise it will be discarded. For details, please refer to Figure 8 .
[0106] In a specific implementation manner provided in this embodiment, refer to Fig.10 , which is a schematic diagram of a cross-node broadcast communication between devices provided in this embodiment, referring to Fig.10 First, source device A generates shared data according to the received shared routing key, i.e., sharekey assembly information, and sends the shared data to the edge server corresponding to the source device A. The shared data is sent to the message bus through the edge server, and then the message is broadcast to other edge computing servers through the message bus. Other edge computing servers determine whether the data is the shared data corresponding to the target device according to the saved shared routing key. If so, the message is sent to the target device.
[0107] This embodiment provides a data sharing method based on flexible configuration, which uses measurement point sharing configuration to flexibly solve the problems of diversity and change of shared data, and diversity, change, and accuracy of the shared data sender (also called provider, source device). It supports the configuration of whether each measurement point is shared. The measurement point configured for sharing is called a shared measurement point. The data of the shared measurement point is shared data, otherwise it is a non-shared measurement point and non-shared data. Accurate data sharing is achieved and shared data garbage is reduced. In different business scenarios, different measurement points of different devices are configured to be shared to achieve flexible configuration of shared data and its sender. The measurement point sharing configuration information is sent to the hardware device ends at all levels, and the device sends the shared data to the message bus of the edge server (also called edge engine) in real time according to the configuration information.
[0108] Use shared measurement point input configuration to flexibly solve the problem of diversity and changes in shared data acquisition terminals (also known as users, target devices). The configuration of each business function module supports device input configuration and shared measurement point input configuration. Different shared measurement points required for different function modules of different controllers are configured to achieve flexible configuration of shared data acquisition terminals. The shared measurement point input configuration information is sent to the hardware device terminals at all levels. The devices obtain the required shared data from the message bus of the edge server in real time according to the configuration information and apply it.
[0109] Through edge server broadcasting, the problem of cross-device and cross-space synchronization of shared data is solved. A unified, secure and reliable message bus is established between independently deployed and operated stand-alone edge computing nodes, and all nodes in the edge LAN are connected to the message bus. These nodes are located in different areas of the edge scene (such as different floors, different buildings, inside and outside the factory, etc.). The device sharing configuration set up in the cloud is sent to the edge computing node through the cloud-edge link, and is transparently transmitted to the terminal device. The terminal device reports the shared data to the edge computing node to which it is connected according to the cloud configuration. The edge computing node forwards the data to the message bus for broadcast according to the shared routing key (routing rules for message forwarding). The node that receives the broadcast message filters out the data that needs to be processed through the configuration and forwards it to its subordinate terminal devices, thereby realizing reliable sharing of data across nodes and spaces without going to the cloud.
[0110] Through multiple shared data, multiple shared data senders, multiple shared data acquisition terminals, and edge servers, the problem of diverse and changing shared data links can be flexibly solved. After the shared data, senders, and acquisition terminals are flexibly configured, the edge server is added to form a shared link for each data. According to the business scenario and application requirements, multiple shared data, multiple senders, and multiple acquisition terminals are configured to flexibly solve the personalized application requirements of one-to-one, one-to-many, many-to-one, and many-to-many real-time sharing of different data between senders and acquisition terminals, across devices, and across spaces.
[0111] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A data sharing method based on flexible configuration, characterized in that: include: Sending the preset data sharing configuration to the data sharing source device and the data sharing target device respectively through a first edge computing node corresponding to the data sharing source device and a second edge computing node corresponding to the data sharing target device; According to the data sharing configuration, reporting the first shared routing key of the data sharing target device to the second edge computing node, and then reporting the shared data configured by the data sharing source device according to the shared routing key to the first edge computing node; The shared data is broadcast to the second edge computing node through the cross-node communication service preset in the second edge computing node and the first edge computing node, and the first shared routing key is used to determine whether the shared data is the shared data to be processed by the data sharing target device. If so, the shared data is sent to the data sharing target device.
2. A data sharing method based on flexible configuration as claimed in claim 1, characterized in that: The method of sending a preset data sharing configuration to the data sharing source device and the data sharing target device respectively through a first edge computing node corresponding to the data sharing source device and a second edge computing node corresponding to the data sharing target device includes: The data sharing configurations corresponding to the data sharing source device and the data sharing target device are configured respectively through the cloud; wherein the data sharing configurations include a plurality of first shared measurement points corresponding to each of the plurality of data sharing source devices, a plurality of second shared measurement points corresponding to each of the plurality of data sharing target devices, and a shared routing key corresponding to each of the plurality of data sharing target devices; Sending the data sharing configuration to the first edge computing node and the second edge computing node respectively through the cloud and an MQTT link preset between the cloud and the edge computing node; By presetting an MQTT link between the edge computing node and the device and the first edge computing node and the second edge computing node, the data sharing configuration is sent to each of the data sharing source devices and each of the data sharing target devices respectively.
3. A data sharing method based on flexible configuration as claimed in claim 2, characterized in that: The step of reporting the first shared routing key of the data sharing target device to the second edge computing node according to the data sharing configuration, and then reporting the shared data configured by the data sharing source device according to the shared routing key to the first edge computing node includes: According to the data sharing configuration, the data sharing target device registers the first shared routing key to the second edge computing node through the MQTT link, and saves the corresponding relationship between the first shared routing key and the data sharing target device through the second edge computing node; According to the data sharing configuration, the data sharing source device configures the first shared data to be reported by assembling the shared routing key into the topic of the MQTT message to generate the data to be reported, and uses the data to be reported as the shared data; Through the MQTT link, the data sharing source device reports the shared data to the first edge computing node.
4. A data sharing method based on flexible configuration as claimed in claim 1, characterized in that: The broadcasting the shared data to the second edge computing node by using the cross-node communication service preset in the second edge computing node and the first edge computing node includes: The shared data is saved by a first message queue preset on the first edge computing node; The shared data is broadcast from the first edge computing node to the second edge computing node by connecting the first message queue with a cross-node communication Agent service preset on the second edge computing node.
5. A data sharing method based on flexible configuration as claimed in claim 1, characterized in that: The determining, by using the first shared routing key, whether the shared data is shared data to be processed by the data sharing target device includes: According to the first edge computing node, broadcasting the shared data configured by each data sharing source device in a plurality of data sharing source devices to a second edge computing node corresponding to each data sharing target device in a plurality of data sharing target devices; The second edge computing node corresponding to each data sharing target device receives multiple shared data sent by the multiple data sharing source devices, and matches and determines the multiple shared data through the first shared routing key, and screens and determines the multiple shared data to be processed by each data sharing target device.
6. A data sharing system based on flexible configuration, characterized in that: Including configuration sharing module, routing registration module and data sharing module; The configuration sharing module is used to send the preset data sharing configuration to the data sharing source device and the data sharing target device respectively through the first edge computing node corresponding to the data sharing source device and the second edge computing node corresponding to the data sharing target device; The routing registration module is used to report the first shared routing key of the data sharing target device to the second edge computing node according to the data sharing configuration, and then report the shared data configured by the data sharing source device according to the shared routing key to the first edge computing node; The data sharing module is used to broadcast the shared data to the second edge computing node through a cross-node communication service preset in the second edge computing node and the first edge computing node, and determine whether the shared data is the shared data to be processed by the data sharing target device through the first shared routing key. If so, the shared data is sent to the data sharing target device.
7. A data sharing system based on flexible configuration as claimed in claim 6, characterized in that: The configuration sharing module includes a configuration unit and a sending unit; The configuration unit is used to configure the data sharing configurations corresponding to the data sharing source device and the data sharing target device respectively through the cloud; wherein the data sharing configuration includes a plurality of first shared measurement points corresponding to each of the plurality of data sharing source devices, a plurality of second shared measurement points corresponding to each of the plurality of data sharing target devices, and a shared routing key corresponding to each of the plurality of data sharing target devices; The sending unit is used to send the data sharing configuration to the first edge computing node and the second edge computing node respectively through the cloud and the MQTT link preset between the cloud and the edge computing node; and send the data sharing configuration to each data sharing source device and each data sharing target device respectively through the MQTT link preset between the edge computing node and the device and the first edge computing node and the second edge computing node.
8. A data sharing system based on flexible configuration as claimed in claim 7, characterized in that: The routing registration module includes a registration unit and a data configuration unit; The registration unit is used for registering the first shared routing key to the second edge computing node through the MQTT link by the data sharing target device according to the data sharing configuration, and saving the corresponding relationship between the first shared routing key and the data sharing target device through the second edge computing node; The data configuration unit is used for, according to the data sharing configuration, the data sharing source device configures the first shared data to be reported by assembling the shared routing key into the topic of the MQTT message to generate the data to be reported, and uses the data to be reported as the shared data; Through the MQTT link, the data sharing source device reports the shared data to the first edge computing node.
9. A data sharing system based on flexible configuration as claimed in claim 6, characterized in that: The data sharing module includes a node unit and a communication unit; The node unit is used to save the shared data through a first message queue preset on the first edge computing node; The communication unit is used to broadcast the shared data from the first edge computing node to the second edge computing node by connecting the first message queue and the cross-node communication Agent service of the second message queue preset on the second edge computing node.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data sharing method based on flexible configuration described in any one of claims 1 to 5 is implemented.
