Data interaction method and device, computer equipment, readable storage medium and program product
By implementing a multi-level and two-way security verification mechanism between the cloud and edge clusters, the problem that the data interaction mechanism in the substation monitoring system cannot achieve secure transmission is solved, and a safe and reliable data interaction is achieved.
Patent Information
- Application Number
- CN202411565958.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-07
AI Technical Summary
In the prior art, the data interaction mechanism of the substation monitoring system cannot achieve secure data transmission, and there are problems such as dispersed equipment, large data transmission delay, and low reliability.
By implementing a multi-level, two-way security verification mechanism between the cloud and edge clusters, including multiple verifications of authentication request messages, authentication confirmation messages and authentication response messages, ensuring the security of data interaction.
It realizes secure data interaction between the cloud and edge clusters, improves the reliability and security of data transmission, and solves the problems of large delay and low reliability of data transmission.
Smart Images

Figure CN119583108A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of cloud computing, and in particular to a data interaction method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] With the rapid development of power systems, substation monitoring systems have gradually evolved from traditional local monitoring to cloud-edge collaboration. This trend is mainly to address issues such as decentralized equipment, large data transmission latency, and low reliability. The cloud-edge collaborative architecture mainly includes edge clusters consisting of cloud, edge computing nodes, and substation monitoring terminals, which are responsible for data storage, analysis, big data processing, real-time data processing, analysis and response, and data acquisition and control.
[0003] In the related technologies, data storage, analysis and processing are mainly achieved by building cloud and substation monitoring systems. Although the related technologies have solved the problem of substation monitoring to a certain extent, the existing interaction mechanism design still cannot achieve secure data transmission. Summary of the invention
[0004] Based on this, it is necessary to provide a data interaction method, device, computer equipment, computer-readable storage medium and computer program product that can safely perform data interaction in response to the above technical problems.
[0005] In a first aspect, the present application provides a data interaction method, which is applied to the cloud, and the method includes:
[0006] Receive the authentication request message sent by the edge cluster;
[0007] Performing a first verification on the authentication request message, and sending an authentication response message to the edge cluster if the authentication request message passes the first verification;
[0008] Receive an authentication confirmation message sent by the edge cluster, perform a second verification on the authentication confirmation message, and interact with the edge cluster if the authentication confirmation message passes the second verification; the authentication confirmation message is sent by the edge cluster after performing a third verification on the authentication response message and passing the third verification.
[0009] In one embodiment, the data interaction with the edge cluster includes:
[0010] Receiving a data interaction message sent by the edge cluster;
[0011] If there is a segmentation identifier in the data interaction message, splicing the data interaction message according to the segmentation identifier to obtain a data splicing message;
[0012] The data splicing message is parsed to obtain a target data message.
[0013] In one embodiment, parsing the data splicing message to obtain the target data message includes:
[0014] If there is an encryption identifier in the data splicing message, the data splicing message is decrypted according to a preset decryption algorithm; the preset decryption algorithm is determined after the cloud and the edge cluster negotiate a key in advance;
[0015] If a compression mark exists in the data splicing message, the data splicing message is decompressed according to a preset decompression algorithm.
[0016] In one of the embodiments, before receiving the authentication request message sent by the edge cluster, the method further includes:
[0017] Sending a synchronization message to the edge cluster; the synchronization message is used to initiate a communication connection request;
[0018] Receiving a synchronization confirmation message sent by the edge cluster; the synchronization confirmation message is sent by the edge cluster after receiving the synchronization message;
[0019] A confirmation message is sent to the edge cluster to establish a communication connection with the edge cluster.
[0020] In one embodiment, the method further comprises:
[0021] If the authentication request message fails the first verification or the authentication confirmation message fails the second verification, the communication connection with the edge cluster is disconnected.
[0022] In a second aspect, the present application provides a data interaction method, which is applied to an edge cluster, and the method includes:
[0023] Send an authentication request message to the cloud;
[0024] receiving an authentication response message sent by the cloud, and performing a third verification on the authentication response message; the authentication response message is sent by the cloud after performing a first verification on the authentication request message and the authentication request message passes the first verification;
[0025] When the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud to perform data exchange with the cloud.
[0026] In one embodiment, the method further comprises:
[0027] Receiving a container installation command sent by the cloud;
[0028] Extract resource configuration parameters from the container installation command, and configure and install the target container according to the resource configuration parameters;
[0029] When the target container is installed, an installation response message is sent to the cloud.
[0030] In one embodiment, before the data interaction with the cloud, the process includes:
[0031] Sending a notification message to the cloud platform; the notification message is used to prompt the cloud platform to prepare for data interaction;
[0032] Receive a response confirmation message sent by the cloud platform; the response confirmation message is sent by the cloud platform after confirming the sent notification message; the response confirmation message is used to prompt the edge cluster to start data interaction.
[0033] In a third aspect, the present application provides a data interaction device, which is applied to the cloud, and the device includes:
[0034] A first receiving module, used to receive an authentication request message sent by an edge cluster;
[0035] A first verification module, configured to perform a first verification on the authentication request message, and send an authentication response message to the edge cluster if the authentication request message passes the first verification;
[0036] The first interaction module is used to receive the authentication confirmation message sent by the edge cluster, perform a second verification on the authentication confirmation message, and interact with the edge cluster for data if the authentication confirmation message passes the second verification; the authentication confirmation message is sent by the edge cluster after performing a third verification on the authentication response message and passing the third verification.
[0037] In a fourth aspect, the present application provides a data interaction device, the device comprising:
[0038] A second sending module, used to send an authentication request message to the cloud;
[0039] A third verification module, used to receive the authentication response message sent by the cloud, and perform a third verification on the authentication response message; the authentication response message is sent by the cloud after performing a first verification on the authentication request message and the authentication request message passes the first verification;
[0040] The second interaction module is used to send an authentication confirmation message to the cloud and perform data interaction with the cloud when the authentication response message passes the third verification.
[0041] In a fifth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.
[0042] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.
[0043] In a seventh aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the method in any one of the above embodiments when executed by a processor.
[0044] The above-mentioned data interaction method, apparatus, computer device, computer-readable storage medium and computer program product ensure the security of data interaction between the cloud and the edge cluster through a multi-level, two-way security verification mechanism by performing a first verification on the authentication request message, a second verification on the authentication confirmation message and a third verification on the authentication response message. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0046] Figure 1 An application environment diagram of a data interaction method in an embodiment;
[0047] Figure 2 A schematic diagram of a flow chart of a data interaction method in an embodiment;
[0048] Figure 3 A schematic diagram of a message structure in an embodiment;
[0049] Figure 4 This is a schematic diagram of a domain control structure in another embodiment;
[0050] Figure 5 A schematic diagram of a TCP connection in an embodiment;
[0051] Figure 6 is a flow chart of a data interaction method in another embodiment;
[0052] Figure 7 is a flowchart of a data interaction method in yet another embodiment;
[0053] Figure 8 1 is a schematic diagram of data transmission in an embodiment;
[0054] Fig. 9 A schematic diagram of data interaction in one embodiment;
[0055] Fig.10 is a structural block diagram of a data interaction device in one embodiment;
[0056] Fig.11 It is a structural block diagram of a data interaction device in another embodiment;
[0057] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] The data interaction method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the edge cluster 102 communicates with the cloud 104 through the network. The data storage system can store the data that the cloud 104 needs to process. The data storage system can be integrated on the cloud 104, or it can be placed on the cloud or other network clouds. The edge cluster sends an authentication request message to the cloud, and after the cloud receives the authentication request message sent by the edge cluster, it performs a first verification on the authentication request registration. In the case where the authentication request passes the first verification, an authentication response message is sent to the edge cluster. The edge cluster receives the authentication response message sent by the cloud, and performs a third verification on the authentication response message. In the case where the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud platform cloud. Receive the authentication confirmation message sent by the edge cluster, perform a second verification on the authentication confirmation message, and interact with the edge cluster when the authentication confirmation message passes the second verification. Among them, the edge cluster 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. The portable wearable device may be a smart watch, a smart bracelet, a head-mounted device, etc. The head-mounted device may be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc. The cloud 104 may be an independent physical cloud, or a cloud cluster or distributed system composed of multiple physical clouds, or a cloud that provides cloud computing services.
[0060] In an exemplary embodiment, Figure 2 As shown, a data interaction method is provided, which is applied to Figure 1 The cloud 104 in FIG. 1 is taken as an example to illustrate, including the following steps 202 to 206. Among them:
[0061] Step S202: Receive an authentication request message sent by the edge cluster.
[0062] Optionally, when the edge cluster needs to interact with the cloud for data, it needs to send an authentication request message to the cloud.
[0063] Optionally, the APDU (Application Protocol Data Unit) used in the message in this application adopts the "protocol header + ASDU (Application Service Data Unit) + signature" structure. Each APDU can carry 1 ASDU, such as Figure 3 shown.
[0064] The protocol header length is fixed at 32 bytes, and the content is shown in Table 1.
[0065] Table 1
[0066]
[0067] The control domain is Figure 4 As shown, Figure 4 The control domain structure diagram in one embodiment is shown in FIG. The flag bits in the control domain include an ASDU successor flag, a compression flag bit, an authentication flag bit, and a signature flag bit, and the others are reserved.
[0068] When the encrypted message flag is 1, it means that the message is an encrypted message after negotiation, and the JSON message content needs to be decrypted first. At this time, the compression flag is not started.
[0069] When the ASDU continuation flag is 1, it means that the ASDU part of the APDU is only one segment and has not been transmitted completely. The segment IDs of multiple segments split and sent by the same ASDU should be the same.
[0070] The authentication flag bit must be set to 1 in the authentication frame during the authentication process after the communication connection is established, and set to 0 at other times. The compression flag is not enabled for the authentication service data.
[0071] When the signature flag is 1, it means that the APDU frame tail has a signature field and the signature needs to be verified; when the signature flag is 0, it means that there is no signature field at the end of the APDU frame and the signature does not need to be verified.
[0072] Exemplarily, the authentication request message is shown in Table 2.
[0073] Table 2
[0074]
[0075] Step S204: Perform a first verification on the authentication request message, and if the authentication request message passes the first verification, send an authentication response message to the edge cluster.
[0076] Among them, the first verification is the cloud's verification method for the authentication request message. Optionally, the first verification can be identity authentication, verifying the identity information in the authentication request message, such as ID, user name, etc., to ensure that the authentication request message comes from a known or expected device or user. Optionally, the first verification can also be a timestamp check to verify whether the timestamp of the message is within a reasonable time range to prevent replay attacks. Optionally, the first verification can also be an ACL (access control list) check to check whether the authentication request message complies with the preset access control policy.
[0077] The authentication response message is a response message sent by the cloud to the edge cluster after the cloud performs a first verification on the authentication request message.
[0078] Optionally, the authentication response message is as shown in Table 3.
[0079] Table 3
[0080]
[0081] Step S206, receiving the authentication confirmation message sent by the edge cluster, performing a second verification on the authentication confirmation message, and interacting with the edge cluster when the authentication confirmation message passes the second verification; the authentication confirmation message is the edge cluster performing a third verification on the authentication response message, and is sent when the authentication response message passes the third verification.
[0082] In this embodiment, after receiving the authentication response message, the edge cluster performs a third verification on the authentication response message, and sends an authentication confirmation message to the cloud if the authentication response message passes the third verification. After the edge cluster successfully verifies the authentication response message, it can interact with the cloud. The cloud also needs to perform a second verification on the authentication confirmation message, and if the authentication confirmation message passes the second verification, it interacts with the edge cluster.
[0083] Optionally, the second verification may be to verify the signature in the authentication confirmation message to ensure the authenticity and completion of the message.
[0084] Optionally, the third verification may be a session identifier verification, which verifies whether the session identifier or token in the authentication response is valid and can be used for subsequent communications.
[0085] Exemplarily, the authentication confirmation message may be as shown in Table 4.
[0086] Table 4
[0087]
[0088] In the above data interaction method, by performing a first verification on the authentication request message, a second verification on the authentication confirmation message, and a third verification on the authentication response message, a multi-level, two-way security verification mechanism ensures the security of data interaction between the cloud and the edge cluster.
[0089] In one of the embodiments, data interaction with an edge cluster includes: receiving a data interaction message sent by the edge cluster; if a segmentation identifier exists in the data interaction message, splicing the data interaction message according to the segmentation identifier to obtain a data splicing message; parsing the data splicing message to obtain a target data message.
[0090] When the cloud receives the data interaction message, if there is a segmentation mark in the protocol header, the data message is spliced according to the segmentation mark to obtain a complete ASDU message, that is, a data splicing message. After obtaining the data splicing message, the data splicing message is further parsed to determine whether the data splicing message needs to be decoded and / or compressed, and the data splicing message is decoded and / or compressed to obtain the target data message.
[0091] Optionally, each segmented message will include some metadata, such as sequence number, offset, length or total length, etc., to indicate the segmentation of the message. The cloud sorts the received segmented messages in the correct order according to the segment identifier, that is, the sequence number and offset. While waiting for all segmented messages to arrive, the received segmented messages can be temporarily stored in a specific storage area. Before splicing, the cloud also needs to check whether all segmented data has been received. This is achieved by checking the continuity of the sequence number or comparing the received message length with the total length. In the sorted order, the contents of each segmented message are connected in sequence.
[0092] Optionally, if there is overlap between segmented messages, that is, two messages have part of the same content, it is necessary to determine how to handle these overlapping parts according to the specific protocol.
[0093] Optionally, after the splicing is completed, it is also necessary to check whether the length of the spliced data is consistent with the expectation, or use methods such as checksum to verify the integrity of the data.
[0094] Optionally, the process of the edge cluster sending data interaction messages to the cloud can be to organize the complete ASDU structure before compression and / or encryption, then compress / encrypt the ASDU pair, and then segment the complete ASDU structure and send it to the cloud.
[0095] In the above embodiment, for large data transmission, the large data packet is divided into multiple small data interaction messages, which can ensure the continuity of data transmission in the network and avoid packet loss.
[0096] In one of the embodiments, the data splicing message is parsed to obtain a target data message, including: if there is an encryption mark in the data splicing message, the data splicing message is decrypted according to a preset decryption algorithm; the preset decryption algorithm is determined after the cloud and the edge cluster have pre-negotiated a key; if there is a compression mark in the data splicing message, the data splicing message is decompressed according to a preset decompression algorithm.
[0097] Optionally, the cloud and edge cluster will negotiate keys in advance so that both parties can identify data interaction messages according to the preset encryption method and key.
[0098] For example, if the edge cluster has the encryption function enabled, it is necessary to initiate key negotiation to the cloud. The key negotiation message may be as shown in Table 5.
[0099] Table 5
[0100]
[0101] Exemplarily, the cloud responds to the security negotiation message sent by the edge cluster and sends a key response message to the edge cluster. The key negotiation message may be as shown in Table 6.
[0102] Table 6
[0103]
[0104] In this embodiment, after key negotiation is completed, the DH (Diffie-Hellman Key Exchange) algorithm is used to calculate the session key, and the SM4 (SM4 Encryption Algorithm) algorithm is used to encrypt and transmit subsequent messages.
[0105] Optionally, the compression algorithm and the decompression algorithm may be negotiated between the cloud and the edge cluster according to the methods described in the above embodiments, which will not be repeated here.
[0106] Optionally, if there is an encryption identifier in the data splicing message, it is decrypted according to the decryption algorithm negotiated between the cloud and the edge cluster to obtain the target data message.
[0107] Optionally, if there is a compression mark in the data splicing message, it is decrypted according to the decompression algorithm preset by the cloud and edge cluster to obtain the target data message.
[0108] Optionally, if both an encryption identifier and a compression identifier exist in the data splicing message, the data splicing message is decrypted and decoded according to a decryption and decompression algorithm.
[0109] In the above embodiment, encrypting the data interaction message can prevent the message data from being interpreted by an unauthorized third party during the transmission process; decompressing the data interaction message can reduce the amount of transmitted data to save bandwidth resources.
[0110] In one of the embodiments, before receiving the authentication request message sent by the edge cluster, it also includes: sending a synchronization message to the edge cluster; the synchronization message is used to initiate a communication connection request; receiving a synchronization confirmation message sent by the edge cluster; the synchronization confirmation message is sent by the edge cluster after receiving the synchronization message; sending a confirmation message to the edge cluster to establish a communication connection with the edge cluster.
[0111] In this embodiment, the cloud establishes a TCP connection with the edge cluster to enable the cloud and the edge cluster to communicate.
[0112] Combination Figure 5 , Figure 5 The following is a schematic diagram of a TCP connection in an embodiment. First, the cloud sends a synchronization message, namely TCP SYN, to the edge cluster. This is the first message sent during the TCP connection establishment process and is used to initiate a connection request. SYN stands for "Synchronize Sequence Number" and is used to synchronize the sequence number and the initial sequence number.
[0113] After receiving the synchronization message, the edge cluster responds to the synchronization message and sends a synchronization confirmation message to the cloud, that is, TCP SYN+ACK. When the party that receives the SYN request sends the SYN+ACK message, it synchronizes its own sequence number and confirms that it has received the other party's SYN request.
[0114] After receiving the synchronization confirmation message, the cloud will reply with a confirmation message, that is, an ACK message, to confirm that it has received the other party's SYN+ACK message. This message marks the completion of the three-way handshake process of the TCP connection and the connection is officially established.
[0115] In the above embodiment, the cloud and the edge cluster establish a TCP connection through a three-way handshake process.
[0116] In one of the embodiments, the method further includes: if the authentication request message fails the first verification or the authentication confirmation message fails the second verification, disconnecting the communication connection with the edge cluster.
[0117] If the cloud performs a first verification on the authentication request message and the authentication request message fails the first verification, or if the cloud performs a second verification on the authentication confirmation message and the authentication confirmation message fails the second verification, the communication connection with the edge cluster is disconnected to ensure data security in the cloud.
[0118] Optionally, the cloud directly closes the TCP connection with the edge cluster and sends a TCP RST packet to the edge cluster. After receiving the RST packet, the edge cluster immediately stops all communications related to the connection.
[0119] Optionally, after the cloud sends a RST packet and the edge cluster receives the RST packet, both the edge cluster and the cloud will immediately release resources related to the connection, such as closing the socket and clearing the connection status.
[0120] In the above embodiment, the cloud can ensure the security of the cloud by actively closing the TCP connection with the edge cluster.
[0121] In an exemplary embodiment, Figure 6 As shown, a data interaction method is provided, which is applied to Figure 1 Taking the edge cluster 102 in FIG. 1 as an example, the method includes the following steps 602 to 606. Among them:
[0122] Step S602: Send an authentication request message to the cloud.
[0123] The edge cluster needs to interact with the cloud for data, and sends an authentication request message to the cloud. The structure of sending the authentication request message can refer to the description in the above embodiment, and will not be repeated here.
[0124] Step S604, receiving the authentication response message sent by the cloud, and performing a third verification on the authentication response message; the authentication response message is the first verification performed by the cloud on the authentication request message, and is sent when the authentication request message passes the first verification.
[0125] The cloud performs a first verification on the authentication request message, and sends an authentication response message to the edge cluster if the authentication request message passes the first verification. After the edge cluster receives the authentication response message sent by the cloud, it performs a third verification on the response message. The specific verification process can refer to the contents recorded in the above embodiment, and will not be repeated here.
[0126] Step S206: When the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud to exchange data with the cloud.
[0127] When the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud. At this time, the edge cluster passes the verification of the cloud and can interact with the cloud for data.
[0128] Optionally, if the cloud fails the third verification of the authentication confirmation, the cloud side fails the verification. If the edge cluster sends a data interaction message to the cloud, the cloud side does not accept the data interaction message, and the data interaction between the two fails.
[0129] Optionally, if the data interaction between the two fails, the edge cluster can send an authentication request message to the cloud again to interact with the cloud.
[0130] Optional, combined Figure 7 As shown, Figure 7 Schematic diagram of data interaction in one embodiment. In the present application, the cloud actively sends data to the edge cluster, the edge cluster actively sends data to the cloud, or the edge cluster actively sends data to the cloud.
[0131] In the above embodiment, by performing a first verification on the authentication request message, a second verification on the authentication confirmation message, and a third verification on the authentication response message, a multi-level, bidirectional security verification mechanism ensures the security of data interaction between the cloud and the edge cluster.
[0132] In one of the embodiments, the method further includes: receiving a container installation command sent by the cloud; extracting resource configuration parameters from the container installation command, configuring and installing the target container according to the resource configuration parameters; and when the target container is installed, sending an installation response message to the cloud.
[0133] Optionally, the cloud platform sends a message containing a container installation command to the edge cluster. This command usually contains the configuration parameters of the target container and related resource allocation requirements. The edge cluster parses the container installation command received from the cloud and extracts the resource configuration parameters. The resource configuration parameters may include CPU, memory, storage, network configuration, etc. After extracting these parameters, the edge cluster configures the hardware resources according to these parameters to ensure that the target container can run as expected. After completing the resource configuration, the edge cluster will perform the installation and deployment of the container. This process may include downloading the container image, allocating the required system resources, setting up the network and storage, etc. After all configurations are completed, the target container is installed and started to ensure that it can run normally as required. When the target container is installed and successfully started, the edge cluster sends an installation response message to the cloud platform.
[0134] Optionally, the platform sends a container installation command, and its field description is shown in Table 7.
[0135] Table 7
[0136]
[0137] Optionally, after receiving the container installation command, the edge cluster installs a new container and responds to the container installation command. After the container is successfully installed, it automatically starts and runs. After the substation edge cluster is restarted, the container automatically runs. The field description is shown in Table 8.
[0138] Table 8
[0139]
[0140] Optionally, the edge cluster can proactively report container alarm events to the platform, and the platform does not need to respond. The field description is shown in Table 9.
[0141] Table 9
[0142]
[0143] Device resource alarm events, as shown in Table 10.
[0144] Table 10
[0145]
[0146] In the above embodiment, container deployment can be completed efficiently through automated command parsing, resource configuration and installation processes. In addition, the edge cluster can flexibly adjust the deployment strategy according to different resource configuration requirements to adapt to various application scenarios.
[0147] In one of the embodiments, before data interaction with the cloud, it includes: sending a notification message to the cloud platform; the notification message is used to prompt the cloud platform to prepare for data interaction; receiving a response confirmation message sent by the cloud platform; the response confirmation message is sent by the cloud platform after confirming the sending of the notification message; the response confirmation message is used to prompt the edge cluster to start data interaction.
[0148] Optionally, the edge cluster first sends a notification message to the cloud platform. The purpose of this message is to notify the cloud platform that the edge cluster is ready to start data interaction. The notification message usually contains the status information of the edge cluster, the type of operation to be performed, etc., prompting the cloud platform to prepare to receive or process data.
[0149] Optionally, after receiving the notification message, the cloud platform will make corresponding preparations, such as allocating resources and configuring the network, to ensure that it can smoothly receive and process data from the edge cluster. This notification mechanism helps the cloud platform and the edge cluster synchronize before data interaction, avoiding data loss or transmission errors due to insufficient preparation.
[0150] Optionally, after the cloud platform completes the preparation work, it will send a response confirmation message to the edge cluster, indicating that it is ready for data exchange. This confirmation message is a response to the notification message sent by the edge cluster, confirming that both parties are synchronized and the cloud platform is ready to receive data.
[0151] Optionally, after receiving the response confirmation message from the cloud platform, the edge cluster will start actual data interaction with the cloud platform. At this point, data transmission and processing can proceed smoothly under the coordination of both parties. Through this response confirmation mechanism, the edge cluster can ensure that the cloud platform is ready to receive data, avoiding data transmission when the cloud platform is not ready, thereby improving the reliability and effectiveness of data interaction.
[0152] Optional, combined Figure 8 As shown, Figure 8 FIG. 1 is a schematic diagram of data transmission in an embodiment. It should be noted that the local side in the figure is an edge cluster and the opposite side is a cloud platform. In other embodiments, the local side may also be a cloud platform and the countermeasure may be an edge cluster. The data brief is a notification message and the response confirmation is a response confirmation message.
[0153] Push the file on this side to the known path on the other side. First push the data brief to the other side, and then push the data content after the other side responds and confirms success; if the other side fails to confirm, it means that the data cannot be received at present and the data content should not be pushed; after receiving each frame of data content, the other side sends a confirmation of the data content of this frame; when the data has not been transmitted, if one party has not received the other party's data content confirmation frame after sending the push data content, or the other party has not continued to send the push data content frame after one party sends the data content confirmation frame, then the data handle is directly closed after a period of time (recommended value 3 minutes) or the communication connection has been interrupted, and this data transmission fails. There is no need to consider breakpoint resumption when pushing data to the other side.
[0154] Optionally, the structure of the notification message may be as shown in Table 11.
[0155] Table 11
[0156]
[0157] Optionally, the structure of the response confirmation message can be as shown in Table 12.
[0158] Table 12
[0159]
[0160] Optionally, the structure of the data content push message may be as shown in Table 13.
[0161] Table 13
[0162]
[0163] Optionally, the structure of the data content confirmation message may be as shown in Table 14.
[0164] Table 14
[0165]
[0166] In the above embodiment, through notification messages and response confirmation messages, the cloud platform and the edge cluster can perform effective synchronization before data interaction to ensure that both parties are in a ready state and reduce errors and data loss in communication.
[0167] In an exemplary embodiment, the data interaction methods in the above embodiments are applied to a substation monitoring system, wherein the cloud is responsible for data storage and analysis, big data processing and remote management, and the edge substation monitoring cluster is responsible for data collection, control and local management.
[0168] The interactive interface supports a variety of communication interfaces to ensure the efficiency and stability of data transmission: Wired network interface: 100 / 1000Mbit / s full-duplex Ethernet port to ensure high-speed and stable data transmission. Wireless network interface: supports Wi-Fi, 4G / 5G and other wireless communication methods to meet the flexible deployment requirements in different scenarios.
[0169] Combination Fig. 9 As shown, Fig. 9 Schematic diagram of data interaction in one embodiment. The interaction process between the substation cluster and the cloud mainly includes TCP connection confirmation, authentication confirmation, key negotiation process and data interaction. Among them, authentication confirmation refers to the three-way verification process between the cloud and the substation edge cluster. Among them, TCP connection confirmation, authentication confirmation, key negotiation process and data interaction can refer to the contents recorded in any of the above embodiments, and will not be repeated here.
[0170] In the above embodiment, the edge cluster is responsible for real-time data processing and analysis, and the cloud platform is responsible for data storage, analysis, and big data processing. Through cloud-edge collaboration, the system can quickly respond to and process data locally, reducing the delay in data transmission and improving the reliability of the system. In addition, authentication confirmation also improves the security of data interaction between the cloud and the substation cluster.
[0171] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0172] Based on the same inventive concept, the embodiment of the present application also provides a data interaction device for implementing the data interaction method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data interaction device embodiments provided below can refer to the limitations on the data interaction method above, and will not be repeated here.
[0173] In an exemplary embodiment, Fig.10As shown, a data interaction device is provided, including: a first receiving module 100, a first verification module 200 and a first interaction module 300, wherein:
[0174] The first receiving module 100 is used to receive an authentication request message sent by the edge cluster;
[0175] A first verification module 200, configured to perform a first verification on the authentication request message, and send an authentication response message to the edge cluster if the authentication request message passes the first verification;
[0176] The first interaction module 300 is used to receive the authentication confirmation message sent by the edge cluster, perform a second verification on the authentication confirmation message, and interact with the edge cluster when the authentication confirmation message passes the second verification; the authentication confirmation message is the edge cluster performing a third verification on the authentication response message, and is sent when the authentication response message passes the third verification.
[0177] In one embodiment, the first interaction module includes:
[0178] The interaction message receiving unit is used to receive the data interaction message sent by the edge cluster.
[0179] The splicing unit is used to splice the data interaction messages according to the segment identifiers to obtain data splicing messages if there are segment identifiers in the data interaction messages.
[0180] The parsing unit is used to parse the data splicing message to obtain the target data message.
[0181] In one embodiment, the parsing unit includes:
[0182] The decryption subunit is used to decrypt the data splicing message according to a preset decryption algorithm if there is an encryption identifier in the data splicing message; the preset decryption algorithm is determined after the cloud and the edge cluster have pre-negotiated the key.
[0183] The decompression subunit is used to decompress the data splicing message according to a preset decompression algorithm if there is a compression mark in the data splicing message.
[0184] In one embodiment, the above device further comprises:
[0185] The synchronization message sending module is used to send synchronization messages to the edge cluster; the synchronization message is used to initiate a communication connection request.
[0186] The confirmation message receiving module is used to receive the synchronization confirmation message sent by the edge cluster; the synchronization confirmation message is sent by the edge cluster after receiving the synchronization message.
[0187] The communication connection establishment module is used to send a confirmation message to the edge cluster and establish a communication connection with the edge cluster.
[0188] In one embodiment, the above device further comprises:
[0189] The connection disconnection module is used to disconnect the communication connection with the edge cluster if the authentication request message fails the first verification or the authentication confirmation message fails the second verification.
[0190] In an exemplary embodiment, Fig.11 As shown, a data interaction device is provided, including: a second sending module, a third verification module and a second interaction module, wherein:
[0191] The second sending module 400 is used to send an authentication request message to the cloud;
[0192] The third verification module 500 is used to receive the authentication response message sent by the cloud and perform a third verification on the authentication response message; the authentication response message is the first verification performed by the cloud on the authentication request message, and is sent when the authentication request message passes the first verification;
[0193] The second interaction module 600 is used to send an authentication confirmation message to the cloud and perform data interaction with the cloud when the authentication response message passes the third verification.
[0194] In one embodiment, the above device further comprises:
[0195] The command receiving module is used to receive the container installation command sent by the cloud.
[0196] The container installation module is used to extract resource configuration parameters from the container installation command, and configure and install the target container according to the resource configuration parameters.
[0197] The installation response module is used to send an installation response message to the cloud after the target container is installed.
[0198] In one embodiment, the above device further comprises:
[0199] The notification message sending module is used to send notification messages to the cloud platform; the notification message is used to prompt the cloud platform to prepare for data interaction.
[0200] The interactive response module is used to receive the response confirmation message sent by the cloud platform; the response confirmation message is sent by the cloud platform after confirming the sent notification message; the response confirmation message is used to prompt the edge cluster to start data interaction.
[0201] Each module in the above data interaction device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0202] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store metadata. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data interaction method is implemented.
[0203] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0204] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: receiving an authentication request message sent by an edge cluster; performing a first verification on the authentication request message, and sending an authentication response message to the edge cluster when the authentication request message passes the first verification; receiving an authentication confirmation message sent by the edge cluster, performing a second verification on the authentication confirmation message, and interacting with the edge cluster when the authentication confirmation message passes the second verification; the authentication confirmation message is a third verification performed by the edge cluster on the authentication response message, and is sent when the authentication response message passes the third verification.
[0205] In one embodiment, when the processor executes the computer program, the following steps are also implemented: receiving a data interaction message sent by the edge cluster; if there is a segmentation identifier in the data interaction message, splicing the data interaction message according to the segmentation identifier to obtain a data splicing message; parsing the data splicing message to obtain a target data message.
[0206] In one embodiment, the processor also implements the following steps when executing the computer program: if there is an encryption mark in the data splicing message, the data splicing message is decrypted according to a preset decryption algorithm; the preset decryption algorithm is determined after the cloud and the edge cluster conduct key negotiation in advance; if there is a compression mark in the data splicing message, the data splicing message is decompressed according to a preset decompression algorithm.
[0207] In one embodiment, when the processor executes the computer program, the following steps are also implemented: sending a synchronization message to the edge cluster; the synchronization message is used to initiate a communication connection request; receiving a synchronization confirmation message sent by the edge cluster; the synchronization confirmation message is sent by the edge cluster after receiving the synchronization message; sending a confirmation message to the edge cluster to establish a communication connection with the edge cluster.
[0208] In one embodiment, when the processor executes the computer program, the following steps are further implemented: if the authentication request message fails the first verification or the authentication confirmation message fails the second verification, the communication connection with the edge cluster is disconnected.
[0209] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: sending an authentication request message to the cloud; receiving an authentication response message sent by the cloud, and performing a third verification on the authentication response message; the authentication response message is a first verification performed by the cloud on the authentication request message, and is sent when the authentication request message passes the first verification; when the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud to interact with the cloud.
[0210] In one embodiment, when the processor executes the computer program, the following steps are also implemented: receiving a container installation command sent by the cloud; extracting resource configuration parameters from the container installation command, configuring and installing the target container according to the resource configuration parameters; and when the target container is installed, sending an installation response message to the cloud.
[0211] In one embodiment, when the processor executes the computer program, the following steps are also implemented: sending a notification message to the cloud platform; the notification message is used to prompt the cloud platform to prepare for data interaction; receiving a response confirmation message sent by the cloud platform; the response confirmation message is sent by the cloud platform after confirming the sending of the notification message; the response confirmation message is used to prompt the edge cluster to start data interaction.
[0212] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: receiving an authentication request message sent by an edge cluster; performing a first verification on the authentication request message, and sending an authentication response message to the edge cluster when the authentication request message passes the first verification; receiving an authentication confirmation message sent by the edge cluster, performing a second verification on the authentication confirmation message, and interacting with the edge cluster when the authentication confirmation message passes the second verification; the authentication confirmation message is a third verification performed by the edge cluster on the authentication response message, and is sent when the authentication response message passes the third verification.
[0213] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a data interaction message sent by the edge cluster; if there is a segmentation identifier in the data interaction message, splicing the data interaction message according to the segmentation identifier to obtain a data splicing message; parsing the data splicing message to obtain a target data message.
[0214] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if there is an encryption mark in the data splicing message, the data splicing message is decrypted according to a preset decryption algorithm; the preset decryption algorithm is determined after the cloud and the edge cluster have pre-negotiated the key; if there is a compression mark in the data splicing message, the data splicing message is decompressed according to a preset decompression algorithm.
[0215] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sending a synchronization message to the edge cluster; the synchronization message is used to initiate a communication connection request; receiving a synchronization confirmation message sent by the edge cluster; the synchronization confirmation message is sent by the edge cluster after receiving the synchronization message; sending a confirmation message to the edge cluster to establish a communication connection with the edge cluster.
[0216] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the authentication request message fails the first verification or the authentication confirmation message fails the second verification, the communication connection with the edge cluster is disconnected.
[0217] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: sending an authentication request message to the cloud; receiving an authentication response message sent by the cloud, and performing a third verification on the authentication response message; the authentication response message is a first verification performed by the cloud on the authentication request message, and is sent when the authentication request message passes the first verification; when the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud to interact with the cloud for data.
[0218] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a container installation command sent by the cloud; extracting resource configuration parameters from the container installation command, configuring and installing the target container according to the resource configuration parameters; and when the target container is installed, sending an installation response message to the cloud.
[0219] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sending a notification message to the cloud platform; the notification message is used to prompt the cloud platform to prepare for data interaction; receiving a response confirmation message sent by the cloud platform; the response confirmation message is sent by the cloud platform after confirming the sending of the notification message; the response confirmation message is used to prompt the edge cluster to start data interaction.
[0220] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: receiving an authentication request message sent by an edge cluster; performing a first verification on the authentication request message, and sending an authentication response message to the edge cluster if the authentication request message passes the first verification; receiving an authentication confirmation message sent by the edge cluster, performing a second verification on the authentication confirmation message, and interacting with the edge cluster if the authentication confirmation message passes the second verification; the authentication confirmation message is a third verification performed by the edge cluster on the authentication response message, and is sent if the authentication response message passes the third verification.
[0221] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a data interaction message sent by the edge cluster; if there is a segmentation identifier in the data interaction message, splicing the data interaction message according to the segmentation identifier to obtain a data splicing message; parsing the data splicing message to obtain a target data message.
[0222] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if there is an encryption mark in the data splicing message, the data splicing message is decrypted according to a preset decryption algorithm; the preset decryption algorithm is determined after the cloud and the edge cluster have pre-negotiated the key; if there is a compression mark in the data splicing message, the data splicing message is decompressed according to a preset decompression algorithm.
[0223] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sending a synchronization message to the edge cluster; the synchronization message is used to initiate a communication connection request; receiving a synchronization confirmation message sent by the edge cluster; the synchronization confirmation message is sent by the edge cluster after receiving the synchronization message; sending a confirmation message to the edge cluster to establish a communication connection with the edge cluster.
[0224] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: if the authentication request message fails the first verification or the authentication confirmation message fails the second verification, the communication connection with the edge cluster is disconnected.
[0225] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: sending an authentication request message to the cloud; receiving an authentication response message sent by the cloud, and performing a third verification on the authentication response message; the authentication response message is a first verification performed by the cloud on the authentication request message, and is sent when the authentication request message passes the first verification; when the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud to interact with the cloud.
[0226] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving a container installation command sent by the cloud; extracting resource configuration parameters from the container installation command, configuring and installing the target container according to the resource configuration parameters; and when the target container is installed, sending an installation response message to the cloud.
[0227] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sending a notification message to the cloud platform; the notification message is used to prompt the cloud platform to prepare for data interaction; receiving a response confirmation message sent by the cloud platform; the response confirmation message is sent by the cloud platform after confirming the sending of the notification message; the response confirmation message is used to prompt the edge cluster to start data interaction.
[0228] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0229] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0230] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data interaction method, characterized in that: Applied to the cloud, the method includes: Receive the authentication request message sent by the edge cluster; Performing a first verification on the authentication request message, and sending an authentication response message to the edge cluster if the authentication request message passes the first verification; Receive an authentication confirmation message sent by the edge cluster, perform a second verification on the authentication confirmation message, and interact with the edge cluster if the authentication confirmation message passes the second verification; the authentication confirmation message is sent by the edge cluster after performing a third verification on the authentication response message and passing the third verification.
2. The data interaction method according to claim 1, characterized in that: The data interaction with the edge cluster includes: Receiving a data interaction message sent by the edge cluster; If there is a segmentation identifier in the data interaction message, splicing the data interaction message according to the segmentation identifier to obtain a data splicing message; The data splicing message is parsed to obtain a target data message.
3. The data interaction method according to claim 2, characterized in that: The step of parsing the data splicing message to obtain a target data message includes: If there is an encryption identifier in the data splicing message, the data splicing message is decrypted according to a preset decryption algorithm; the preset decryption algorithm is determined after the cloud and the edge cluster negotiate a key in advance; If a compression mark exists in the data splicing message, the data splicing message is decompressed according to a preset decompression algorithm.
4. The data interaction method according to claim 1, characterized in that: Before receiving the authentication request message sent by the edge cluster, the method further includes: Sending a synchronization message to the edge cluster; the synchronization message is used to initiate a communication connection request; Receiving a synchronization confirmation message sent by the edge cluster; the synchronization confirmation message is sent by the edge cluster after receiving the synchronization message; A confirmation message is sent to the edge cluster to establish a communication connection with the edge cluster.
5. The data interaction method according to claim 4, characterized in that: The method further comprises: If the authentication request message fails the first verification or the authentication confirmation message fails the second verification, the communication connection with the edge cluster is disconnected.
6. A data interaction method, characterized in that: Applied to an edge cluster, the method includes: Send an authentication request message to the cloud; receiving an authentication response message sent by the cloud, and performing a third verification on the authentication response message; the authentication response message is sent by the cloud after performing a first verification on the authentication request message and the authentication request message passes the first verification; When the authentication response message passes the third verification, an authentication confirmation message is sent to the cloud to perform data exchange with the cloud.
7. The data interaction method according to claim 4, characterized in that: The method further comprises: Receiving a container installation command sent by the cloud; Extract resource configuration parameters from the container installation command, and configure and install the target container according to the resource configuration parameters; When the target container is installed, an installation response message is sent to the cloud.
8. The data interaction method according to claim 1, characterized in that: Before the data interaction with the cloud, the following steps are included: Sending a notification message to the cloud platform; the notification message is used to prompt the cloud platform to prepare for data interaction; Receive a response confirmation message sent by the cloud platform; the response confirmation message is sent by the cloud platform after confirming the sent notification message; the response confirmation message is used to prompt the edge cluster to start data interaction.
9. A data interaction device, characterized in that: Applied to the cloud, the device comprises: A first receiving module, used to receive an authentication request message sent by an edge cluster; A first verification module, configured to perform a first verification on the authentication request message, and send an authentication response message to the edge cluster if the authentication request message passes the first verification; The first interaction module is used to receive the authentication confirmation message sent by the edge cluster, perform a second verification on the authentication confirmation message, and interact with the edge cluster for data if the authentication confirmation message passes the second verification; the authentication confirmation message is sent by the edge cluster after performing a third verification on the authentication response message and passing the third verification.
10. A data interaction device, characterized in that: The device comprises: A second sending module, used to send an authentication request message to the cloud; A third verification module, used to receive the authentication response message sent by the cloud, and perform a third verification on the authentication response message; the authentication response message is the cloud performing a first verification on the authentication request message, and is sent when the authentication request message passes the first verification; The second interaction module is used to send an authentication confirmation message to the cloud and perform data interaction with the cloud when the authentication response message passes the third verification.
Citation Information
Patent Citations
Authentication method integrating mac authentication and web authentication
CN104735050A
Message processing method, apparatus, system and device and computer-readable storage medium
CN109246148A
Data transmission method and system based on NB-IoT communication, and medium
CN111935712A
Encryption authentication method based on general service protocol of power system
CN115801323A
Access method, device and system based on zero-trust single packet authentication
CN116708039A