Data transmission method, apparatus, device, medium, and program product
By introducing a data thread identifier (device physical address hash + session timestamp) into the "device-edge-cloud" architecture, the problems of unclear data ownership and insufficient security in data transmission are solved, and the traceability and security of data flow are realized, which is suitable for the complex environment of intelligent manufacturing and engineering machinery construction scenarios.
Patent Information
- Application Number
- CN202611482675.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-22
- Publication Date
- 2026-11-24
AI Technical Summary
In the intelligent manufacturing and construction machinery scenarios of the Industrial Internet, existing technologies cannot effectively solve the problem of cross-node data association under the "end-edge-cloud" three-level architecture, resulting in discontinuous and incomplete data transmission, which cannot meet the stringent requirements of industrial-grade data transmission, and also has problems such as data confusion and insufficient security.
By introducing a data thread identifier (device physical address hash + session timestamp) that runs through the end-side cache, edge transmission, and cloud reception, a unique association is established across the entire link. Through the collaborative operation of edge computing nodes and the cloud, accurate differentiation and traceability of device data are achieved, ensuring the traceability and security of the data flow process.
It achieves unique association of all three levels of nodes across the entire link, eliminates the problem of unclear data ownership, ensures the traceability and security of the data flow process, adapts to the data transmission needs in complex environments, and improves the integrity and real-time performance of data transmission.
Smart Images

Figure CN123164170A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of tunnel construction technology, and more specifically, to a data transmission method, apparatus, equipment, medium, and program product. Background Technology
[0002] With the deep penetration of the Industrial Internet, remote data acquisition and management have become a core foundation for improving production efficiency and ensuring operational safety in both smart manufacturing and construction machinery scenarios. However, both scenarios face complex environmental challenges: smart manufacturing scenarios emphasize data real-time performance and equipment collaboration, while construction machinery sites are affected by terrain obstruction, electromagnetic interference, frequent mobile operations, large network fluctuations, frequent network outages, and harsh equipment operating conditions, posing a double challenge to data integrity and continuous transmission.
[0003] Under the current "device-edge-cloud" three-tier architecture, edge devices, edge computing nodes, and cloud platforms operate independently, lacking an effective cross-node data association mechanism. During normal transmission, data generated by the same device at different times or in different sessions cannot establish a unified traceability link between the three-tier nodes, making it difficult to meet the stringent requirements of industrial-grade data transmission and hindering the in-depth implementation of smart manufacturing and the advancement of smart construction site construction. Summary of the Invention
[0004] In view of this, this application provides a data transmission method, apparatus, device, medium, and program product.
[0005] One aspect of this application provides a data transmission method applied to an edge computing node, comprising: upon detecting that a device has been started, initiating a session request to the cloud including the device's physical address hash value, device identifier, and session timestamp, and receiving a data thread identifier generated by the cloud, wherein the data thread identifier is generated based on the device's physical address hash value and session timestamp; binding the data thread identifier with the device identifier and synchronizing it to the device-side database; in response to receiving device data uploaded by the device, adding an identifier header to the device data based on the data thread identifier, device identifier, device data collection timestamp, and a checksum generated based on the device data to obtain encapsulated data; and uploading the encapsulated data to the cloud.
[0006] Another aspect of this application provides a data transmission method applied in the cloud, comprising: responding to receiving a session request initiated by an edge computing node upon detecting that a device has been started, including a device physical address hash value, a device identifier, and a session timestamp of the started device; generating a data thread identifier based on the device physical address hash value and the session timestamp; sending the data thread identifier to the edge computing node so that the edge computing node can bind the data thread identifier with the device identifier and synchronize it to the device-side database; and receiving encapsulated data uploaded by the edge computing node, wherein the encapsulated data is obtained by the edge computing node adding an identifier header to the device data uploaded by the device side based on the data thread identifier, the device identifier, the device data collection timestamp, and a checksum generated based on the device data.
[0007] Another aspect of this application provides a data transmission apparatus for use in an edge computing node, comprising: a first session request module, configured to, upon detecting that a device has been started, initiate a session request to the cloud including a device physical address hash value, a device identifier, and a session timestamp of the started device, and receive a data thread identifier generated by the cloud, wherein the data thread identifier is generated based on the device physical address hash value and the session timestamp; a binding synchronization module, configured to bind the data thread identifier to the device identifier and synchronize it to the device-side database; an identifier header encapsulation module, configured to, in response to receiving device data uploaded by the device, add an identifier header to the device data based on the data thread identifier, the device identifier, the device data acquisition timestamp, and a checksum generated based on the device data, to obtain encapsulated data; and an encapsulated data upload module, configured to upload the encapsulated data to the cloud.
[0008] Another aspect of this application provides a data transmission apparatus for use in the cloud, comprising: a second session request module, configured to respond to receiving a session request from an edge computing node that detects the device has been started, including a device physical address hash value, a device identifier, and a session timestamp, and generating a data thread identifier based on the device physical address hash value and the session timestamp; a data thread identifier sending module, configured to send the data thread identifier to the edge computing node so that the edge computing node can bind the data thread identifier with the device identifier and synchronize it to the device-side database; and an encapsulated data receiving module, configured to receive encapsulated data uploaded by the edge computing node, wherein the encapsulated data is obtained by the edge computing node adding an identifier header to the device data uploaded by the device side based on the data thread identifier, the device identifier, the device data collection timestamp, and a checksum generated based on the device data.
[0009] Another aspect of this application provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method of this application.
[0010] Another aspect of this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the data transmission method of this application.
[0011] Another aspect of this application provides a computer program product including computer-executable instructions that, when executed, implement the data transmission method of this application.
[0012] According to the above technical solution of this application, a data thread identifier (device physical address hash + session timestamp) is introduced to run through the entire link of end-side caching, edge-side transmission, and cloud reception, so as to realize the unique association of the three-level nodes in the entire link. This fundamentally eliminates the problem of unclear data ownership caused by each node acting independently. Thus, regardless of device restart or session reconstruction, the cloud can accurately distinguish the data source of different devices and different time periods through the data thread identifier, ensuring that the data flow process is traceable and not confused. Attached Figure Description
[0013] The above and other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0014] Figure 1A This diagram schematically illustrates a three-tier "end-edge-cloud" system architecture for which data transmission methods can be applied according to embodiments of this application.
[0015] Figure 1B This illustration schematically shows the deployment diagram of each level of "end-edge-cloud" modules according to an embodiment of this application;
[0016] Figure 2 A flowchart illustrating a data transmission method applied to an edge computing node and the cloud according to an embodiment of this application is shown schematically.
[0017] Figure 3 This illustration shows a schematic diagram of the message structure of a single frame of encapsulated data according to an embodiment of this application;
[0018] Figure 4 This illustration schematically shows a flowchart of the alignment of breakpoint information recording with cloud synchronization according to an embodiment of this application;
[0019] Figure 5 This schematically illustrates the overall flowchart of remote data resumption after network outage according to an embodiment of this application;
[0020] Figure 6A A block diagram schematically illustrates a data transmission apparatus applied to an edge computing node according to an embodiment of this application;
[0021] Figure 6B This schematically illustrates a block diagram of a data transmission apparatus applied to the cloud according to an embodiment of the present application;
[0022] Figure 7 A block diagram of an electronic device suitable for implementing a data transmission method according to an embodiment of this application is shown schematically. Detailed Implementation
[0023] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0024] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0025] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0026] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0027] In the embodiments of this application, the collection, updating, analysis, processing, use, transmission, provision, disclosure, and storage of data (e.g., including but not limited to user personal information) comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. In particular, necessary measures have been taken to prevent unauthorized access to user personal information data and maintain information security.
[0028] In the embodiments of this application, the user's authorization or consent was obtained before obtaining or collecting the user's personal information.
[0029] The current "device-edge-cloud" three-tier architecture has significant shortcomings in core dimensions such as the division of labor and collaboration among the three-tier nodes, resource allocation, and security protection. These are detailed below.
[0030] (1) The division of labor among the three-level nodes is unclear, and the value of edge computing nodes (hereinafter referred to as edge) is not realized: In the relevant "end-edge-cloud" architecture, the edge only undertakes the data forwarding function and is not configured with local computing and caching resources, thus becoming a "transfer station"; the device end (hereinafter referred to as end) only passively collects data and has no local fault-tolerant storage capability; the cloud excessively centralizes the processing of all tasks (including real-time data parsing and simple verification), resulting in redundant transmission links, high latency, and easy cloud congestion.
[0031] (2) Low accuracy of breakpoint recording and lack of session coordination: Most solutions only record the network disconnection time, without being accurate to the specific data frame. When resuming transmission, duplicates or omissions are likely to occur. At the same time, the three-level nodes lack a unified identification linkage mechanism. The end side only contains the device identifier (ID), and the edge side does not have a session identifier. The cloud cannot distinguish "data from different sessions of the same device". After multiple devices coordinate or frequent disconnection and reconnection, data confusion is likely to occur, which cannot meet the requirements of accurate transmission.
[0032] (3) Rigid data transmission and organization strategies: Normal transmission either involves single-frame transmission, resulting in bandwidth redundancy, or packet transmission, which sacrifices real-time performance; the fixed fragmentation strategy for resuming transmission after network outages is not combined with dynamic adjustment of side load and network bandwidth, which is difficult to adapt to the real-time collaborative needs of intelligent manufacturing and cannot cope with the problem of large network fluctuations in construction site scenarios.
[0033] (4) Insufficient data transmission security protection: Most related technologies use plaintext or weak encryption for transmission, and some solutions carry data parsing information at the edge or during transmission. For construction site scenarios, the complex flow of personnel makes it easier for data to be leaked, tampered with or illegally injected. For smart manufacturing scenarios, the risk of core production data leakage is also prominent, and neither can meet the information security requirements.
[0034] (5) Low efficiency of historical data indexing and querying: When resuming transmission after network interruption, the relevant technologies lack efficient cross-node indexing mechanisms, and the historical database on the query end needs to be fully scanned; especially in the scenario of massive real-time data of construction machinery on construction sites and continuous production data of intelligent manufacturing, locating and extracting missing data takes a long time and cannot support efficient transmission.
[0035] In summary, the core flaw in remote data recovery technology for disconnected industrial equipment and construction machinery is not the inherent flaw in the "edge-cloud" three-tier architecture itself, but rather in its inefficient division of labor and collaboration, unbalanced resource allocation, and lack of security mechanisms—all issues stemming from flawed implementation logic. This results in compromised data transmission integrity, real-time performance, and security, severely hindering the digital transformation of related scenarios.
[0036] Therefore, there is an urgent need to propose a remote data transmission scheme that optimizes the division of labor among the three-level nodes and strengthens collaborative linkage.
[0037] In view of this, this application provides a data transmission method for both the edge and cloud sides, including: when an edge computing node detects that a device has been started, it initiates a session request to the cloud, including the device's physical address hash value, device identifier, and session timestamp; the cloud generates a data thread identifier based on the device's physical address hash value and session timestamp, and sends the data thread identifier to the edge computing node; the edge computing node receives the data thread identifier generated by the cloud, binds the data thread identifier to the device identifier, and synchronizes it to the device's database; in response to receiving device data uploaded by the device, the edge computing node adds an identifier header to the device data based on the data thread identifier, device identifier, device data collection timestamp, and a checksum generated based on the device data to obtain encapsulated data, and uploads the encapsulated data to the cloud; the cloud receives the encapsulated data uploaded by the edge computing node.
[0038] The following detailed description, in conjunction with the accompanying drawings and embodiments, further illustrates the specific implementation process, hardware configuration, and system operation logic of the present invention, ensuring that the technical solution is feasible and reproducible, and applicable to various scenarios involving the resumption of remote data transmission after network outages for industrial equipment. This implementation strictly follows the "device-edge-cloud" three-level architecture optimization logic, highlighting the core division of labor of "edge-cloud collaboration as the main driver, and precise cooperation from the device side."
[0039] Figure 1A The diagram illustrates a three-tiered "end-edge-cloud" system architecture for which data transmission methods can be applied according to embodiments of this application. It should be noted that Figure 1 is merely an example of a system architecture applicable to embodiments of this application, intended to help those skilled in the art understand the technical content of this application, but does not imply that embodiments of this application cannot be used in other devices, systems, environments, or scenarios.
[0040] Figure 1BThe diagram illustrates the deployment of modules at each level of the "end-edge-cloud" architecture according to an embodiment of this application.
[0041] like Figure 1A As shown, the system architecture 100 according to this embodiment may include a terminal 110, an edge 120, and a cloud 130.
[0042] The network between the end-side 110 and the edge-side 120 can be a local area network (LAN), and the network between the edge-side 120 and the cloud 130 can be a wide area network (WAN). The LAN / WAN, as the medium for providing communication links, can include various connection types, such as wired and / or wireless communication links, etc.
[0043] End-side 110 can be industrial equipment, such as Figure 1B As shown, it independently possesses a real-time data interface 111, supporting protocols such as Modbus Transmission Control Protocol (TCP), OPC Unified Architecture (OPCUA), TCP, User Datagram Protocol (UDP), and Message Queuing Telemetry Transport (MQTT); it is authorized to develop a historical database / file 112, namely the aforementioned device-side database, for caching device data during network outages. It also completes the configuration of device data acquisition and local backup capabilities.
[0044] Side 120 can be various electronic devices with a display screen and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers, or devices such as servers without a display screen. For example... Figure 1B As shown, the edge 120 can be equipped with a communication module 121, a data acquisition and processing module 122, a dynamic transmission control module 123, a breakpoint recording module 124, a real-time caching module 125, an offline caching module 126, an offline data resume module 127, and an edge security and processing module 128; and configured with industrial-grade hardware to support localized computing, caching, and security processing.
[0045] like Figure 1B As shown, the cloud 130 can deploy a device management module 131, a session management module 132, a type and parameter management module 133, a resume scheduling and retransmission module 134, a load balancing module 135, a breakpoint alignment module 136, and a cloud security and processing module 137; it can build a primary and backup node cluster to support global decision-making, security verification and resource scheduling, and reduce hardware investment.
[0046] Edge 120 and Cloud 130 can be servers providing various services, such as a backend management server (for example only) supporting data transmitted by uplink nodes (edge 120's uplink node is edge 110, and Cloud 130's uplink node is edge 120) and / or downlink nodes (edge 120's downlink node is Cloud 130). The backend management server can analyze and process received requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the uplink and / or downlink nodes.
[0047] It should be noted that the data transmission method provided in this application embodiment can generally be executed by the edge device 120 or the cloud device 130. Correspondingly, the data transmission device provided in this application embodiment can generally be located in the edge device 120 or the cloud device 130. The data transmission method provided in this application embodiment can also be executed by a server or server cluster that is different from the edge device 120 and / or the cloud device 130 but capable of communicating with it. Correspondingly, the data transmission device provided in this application embodiment can also be located in a server or server cluster that is different from the edge device 120 and / or the cloud device 130 but capable of communicating with it. Alternatively, the data transmission method provided in this application embodiment can also be executed by other terminal devices that are different from the edge device 120 and / or the cloud device 130. Correspondingly, the data transmission device provided in this application embodiment can also be located in other terminal devices that are different from the edge device 120 and / or the cloud device 130.
[0048] For example, a session request could originally be initiated by edge device 120 to cloud device 130. Then, edge device 120 can execute the data transmission method provided in this embodiment locally. Alternatively, it can send the session request information to other terminal devices, servers, or server clusters, and have the other terminal devices, servers, or server clusters that receive the drawing request execute the data transmission method provided in this embodiment.
[0049] It should be understood that the number of edges, ends, and clouds in Figure 1 is merely illustrative. Depending on implementation requirements, there can be any number of edges, ends, and clouds.
[0050] The following describes in detail the specific implementation process of the data transmission method applied to the side 120 and cloud 130 as shown in Figure 1, using specific embodiments.
[0051] Figure 2 A flowchart illustrating a data transmission method applied to an edge computing node and the cloud according to an embodiment of this application is shown schematically.
[0052] According to embodiments of this application, during edge deployment, a unique device identifier, data type label, and device type identifier can be pre-configured, along with localized computing and caching resources. The device identifier may be, for example, a device ID. Data type labels may include, for example, labels such as "device operating parameters," "environmental monitoring data," and "log data," and are not limited to these. Device type identifiers may include, for example, labels such as "customized device" and "standard device," and are not limited to these.
[0053] like Figure 2 As shown, the method includes operations S201 to S205.
[0054] In operation S201, when the edge computing node detects that the device has been started, it initiates a session request to the cloud, which includes the device's physical address hash value, device identifier, and session timestamp.
[0055] According to embodiments of this application, the device physical address hash value can be obtained by hashing the device physical address (hereinafter referred to as MAC). Each device has a unique device identifier. The session timestamp can be determined based on the time information of initiating the session.
[0056] In operation S202, on the cloud, in response to receiving a session request, a data thread identifier is generated based on the device physical address hash value and the session timestamp, and the data thread identifier is sent to the edge computing node.
[0057] According to an embodiment of this application, in response to receiving a session request, the cloud session management module can first verify the legality of the device identifier based on the device whitelist. Then, if the verification is valid, it generates a data thread identifier based on the device physical address hash value and the session timestamp and feeds it back to the edge.
[0058] In operation S203, at the edge computing node, the data thread identifier is bound to the device identifier and synchronized to the device-side database.
[0059] According to an embodiment of this application, after receiving a session request initiated by the edge, the cloud can allocate a 16-byte data thread ID (device MAC hash + session timestamp) and synchronize it to the edge. The edge data acquisition and processing module can bind the data thread ID to the edge device ID and synchronize it to the edge historical database / file, forming a unique association identifier across the entire "edge-cloud" three-level chain. Specifically, the edge carries this data thread ID when uploading data; the cloud can trace back to the corresponding device, session, and edge cache path through this data thread ID. As a unique identifier spanning the three levels of nodes, the data thread ID ensures that all data across the entire chain—edge cache, edge upload, and cloud storage—is based on the same session context, fundamentally eliminating data confusion in multi-device, multi-session scenarios and achieving accurate data ownership and end-to-end traceability.
[0060] Based on the above embodiments, node pre-configuration and session establishment can be completed. After the session is established, three-level node time synchronization calibration can also be performed.
[0061] For example, after a session is established, the cloud can send the Coordinated Universal Time (UTC) reference time T0 to the edge. The edge uses this to calibrate its local clock and can report the clock drift to the cloud, for example, every 30 seconds (an adjustable preset time interval).
[0062] In operation S204, at the edge computing node, in response to receiving device data uploaded by the device, an identifier header is added to the device data based on the data thread identifier, device identifier, device data collection timestamp, and checksum generated based on the device data to obtain encapsulated data, which is then uploaded to the cloud.
[0063] According to an embodiment of this application, the edge data acquisition and processing module can acquire edge device data frame by frame at a preset period, associate it with dual identifiers, add an identifier header containing "data thread ID + device ID + acquisition timestamp + 16-bit Cyclic Redundancy Check (CRC16) checksum", and upload it to the cloud in real time after completing local preprocessing. The checksum is obtained by performing CRC calculation on the device data including the acquisition timestamp. Its core function is to prevent data from being tampered with or damaged during transmission. Upon receiving the data, the cloud will recalculate the checksum and compare it with the carried value to verify data integrity.
[0064] According to embodiments of this application, the edge can also be configured with an industrial-grade solid-state drive (SSD) to cache normally transmitted data (the duration is configurable). For example, data can be cached for a fixed preset duration (such as the last hour) for fault tolerance and retransmission. At the same time, the end can have built-in local storage media to synchronously cache critical data, forming a dual backup of "edge-end" to avoid data loss, and a normal transmission closed loop of "end-edge-cloud" three-level collaboration.
[0065] For example, in the process of single-frame acquisition, encapsulation and transmission, during normal transmission, the real-time data interface on the end side acquires device data according to a preset period and transmits it to the edge side through the interface; after receiving the device data, the edge side communication module forwards it frame by frame to the data acquisition and processing module. The data acquisition and processing module removes redundant fields from the device data of each frame and adds an identifier header of "device ID + data thread ID + acquisition timestamp + CRC16 check code" to complete the encapsulation and obtain the encapsulated data.
[0066] Figure 3 The illustration shows a schematic diagram of a message structure for a single frame of encapsulated data according to an embodiment of this application.
[0067] like Figure 3 As shown, the single-frame encapsulated data 300 may include a data thread ID, a device ID, a collection timestamp, a CRC16 checksum, and a data body. The data body carries the device data.
[0068] By using a "lightweight single-frame encapsulation + localized redundancy removal" design, normal transmission latency can be effectively reduced.
[0069] The encapsulated data is uploaded to the cloud in real time via the edge communication module, while the edge real-time caching module can cache, for example, nearly 1 hour of encapsulated data for fault tolerance and resending.
[0070] When transmitting encapsulated data frame by frame in an established session, each frame of encapsulated data can carry two pieces of time information: a collection timestamp and a monotonically increasing frame sequence number within the same session. The cloud uses the frame sequence number to verify timing, and if skipped numbers or reverse order are found, it is repaired in conjunction with a clock drift table.
[0071] When operating the S205, in the cloud, it receives encapsulated data uploaded by edge computing nodes.
[0072] According to embodiments of this application, after receiving encapsulated data, the cloud can track the reception status of a single frame of data through the data thread ID. For example, the cloud session management module can quickly match the corresponding device and session through the data thread ID, and the cloud security and processing module verifies the CRC16 checksum to confirm data integrity. After confirmation, the cloud session management module updates the session status table and records the last received frame sequence number and reception time.
[0073] The cloud-based session management module can also provide real-time feedback on the reception status to the edge, including success, missing, and exception statuses. The edge-side real-time caching module synchronously caches the uploaded encapsulated data locally (caching duration is configurable, defaulting to approximately 1 hour) for fault tolerance and retransmission.
[0074] Through the above embodiments of this application, a data thread identifier (device MAC hash + session timestamp) is introduced to run through the entire link of end-side caching, edge-side transmission, and cloud reception, realizing a unique association of three-level nodes throughout the entire link. This fundamentally eliminates the problem of unclear data ownership caused by each node acting independently. Thus, regardless of device restart or session reconstruction, the cloud can accurately distinguish the data source of different devices and different time periods through the data thread identifier, ensuring that the data flow process is traceable and not confused.
[0075] To optimize network outage resumption capabilities, a frame-level data breakpoint recording system can be constructed. The basic principle is as follows: upon detecting a network outage, the edge device, based on the data thread ID, coordinates with the terminal device to synchronously record key information such as the network outage timestamp, the last transmitted frame sequence number, and the data thread ID. This information is encapsulated into a network outage event packet and cached on both the edge and terminal devices for dual storage. The cloud device matches the device and session using the data thread ID, recording the corresponding breakpoint information. This forms a three-level frame-level alignment between the terminal, edge, and cloud, ensuring that breakpoint information is not lost and is traceable. A detailed explanation follows.
[0076] According to an embodiment of this application, in an edge computing node, in response to the detection of a network interruption signal, the network disconnection timestamp and the last transmitted frame sequence number can be recorded according to the device identifier and data thread identifier to generate breakpoint information; the breakpoint information is cached in real time to the edge computing node, synchronized to the device-side database, and reported to the cloud.
[0077] For example, the edge communication module detects network connectivity through a dual network outage detection mechanism that combines network status monitoring and transmission timeout determination to obtain network interruption signals. When three consecutive transmission timeouts occur or the edge ping (network connectivity test) fails to reach the cloud, the network outage handling process is immediately triggered, namely, the three-level breakpoint information collection and reporting alignment.
[0078] Specifically, after a network outage, the edge-side breakpoint recording module records the network outage timestamp, the last transmitted frame sequence number, and other information based on the "device ID + data thread ID" to form breakpoint information. This information is synchronized to the end-side historical database / file to trigger data caching. At the same time, the breakpoint information is stored in the edge-side offline cache module, forming a "edge-end" dual backup. The edge-side communication module continuously attempts to report breakpoint information to the cloud-side breakpoint alignment module. After receiving the information, the cloud-side resume transmission scheduling and retransmission module matches the device and session using the data thread ID, records the breakpoint information, and completes the "edge-cloud" dual-end frame-level breakpoint alignment.
[0079] Figure 4The flowchart illustrating the alignment of breakpoint information recording with cloud synchronization according to an embodiment of this application is shown in the illustration.
[0080] like Figure 4 As shown, the method includes operations S401 to S408.
[0081] The operation of S401 was triggered by a network outage.
[0082] When operating S402, the edge communication module detects network outages: ① Edge-to-cloud disconnection (transmission timeout / ping failure); ② Edge-to-end disconnection (no data received from the end side).
[0083] When operating S403, the edge breakpoint recording module records complete breakpoint information: the timestamp of the network disconnection (accurate to the second), the data thread ID, the device ID, the sequence number of the last successfully transmitted frame, and the network disconnection location identifier (edge-end disconnection / edge-cloud disconnection).
[0084] When operating S404, the side-side offline cache module stores: breakpoint information + data to be resumed (side-side cache only).
[0085] In operation S405, determine whether edge-cloud communication has been restored. If yes, execute operations S406 to S407; if no, execute operation S408, and continue executing operation S405.
[0086] When operating S406, the side communication module reports breakpoint information to the cloud breakpoint alignment module.
[0087] When operating S407, the cloud breakpoint alignment module stores complete breakpoint information, completing edge-cloud dual-end breakpoint alignment.
[0088] When operating S408, the edge communication module continuously polls to detect the edge-cloud communication status.
[0089] Through the above embodiments of this application, when the network is disconnected, frame-level breakpoint information (network disconnection timestamp, last transmitted frame sequence number) is recorded based on "device ID + data thread ID", forming a three-level frame-level breakpoint alignment of edge-cloud-end. The breakpoint recording is accurate to the data frame, which helps to reduce duplication or omission during resume transmission and achieve accurate frame-level resume transmission.
[0090] According to embodiments of this application, a pre-disconnection prediction and pre-caching mechanism can also be configured. In this case, the cloud can receive a buffer reservation notification sent by the edge device after a pre-disconnection warning, reserving a data receiving buffer for the corresponding device session.
[0091] For example, the side-side communication module can not only detect existing network outages but also predict impending ones. It monitors three metrics in real time: packet loss rate, Round-Trip Time Jitter (RTT), and Received Signal Strength Indication (RSSI). An alert is triggered if any of the following conditions are met: packet loss rate exceeding 15% for 5 consecutive seconds, RTT exceeding the baseline by 200% and continuing to rise, or signal strength falling below -85dBm and continuously decreasing.
[0092] After an alert is issued, a pre-caching mode is entered, based on the edge-side dynamic transmission control module: log uploads are paused to release bandwidth; core data sampling frequency is increased to the highest level; writing to the edge-side local storage is accelerated to ensure that data is completely written to disk 30 seconds before network outage; and a buffer is reserved in the cloud. Actual testing shows that this can reduce the data loss rate during network outages from 8%-15% to below 0.5%.
[0093] After network outage recovery, the data fragmentation and resume transmission process can be designed based on the following principles: The edge device accurately extracts missing data from the endpoint historical database based on three-level aligned breakpoint information. It then uses a dynamic time window (adjustable from 5 to N seconds) to divide the missing data into at least one fragment based on its own load and network bandwidth. Each fragment is assigned an identifier header containing "Data Thread ID + Device ID + Window Timestamp + Number of Frames in Fragment + CRC32 Checksum". The "Data Thread ID + Device ID + Window Timestamp" form a three-level index, used to map the storage path or query conditions of the corresponding data in the endpoint's local historical database. The fragments are sorted by weight in the order of "Device Operating Parameters > Environmental Monitoring Data > Log Data" and then uploaded to the cloud after lossless compression. Detailed explanation follows.
[0094] According to an embodiment of this application, at the edge computing node, in response to detecting a network recovery signal, a resume request including breakpoint information recorded by the edge computing node is initiated to the cloud; at the cloud, the breakpoint information recorded in the cloud is aligned with the breakpoint information recorded by the edge computing node, and the range of missing data is fed back to the edge computing node; the edge computing node extracts the missing data from the device-side database and / or the cached data of the edge computing node according to the range of missing data, and divides the missing data into at least one fragment according to the fragment window duration dynamically adjusted by the load of the edge computing node, and adds a fragment identifier header to the fragment according to the data thread identifier, device identifier, window timestamp, number of frames in the fragment, and check code calculated based on the fragment, to obtain encapsulated fragments, and finally uploads the encapsulated fragments to the cloud.
[0095] For example, after the edge communication module detects network recovery, it sends a ready signal to the offline data resumption module. The edge offline data resumption module then initiates a resumption request to the cloud-based resumption scheduling and retransmission module, carrying breakpoint information. The cloud provides feedback on its recorded breakpoints, aligning the missing data range with the edge module to determine the missing data. Simultaneously, the edge dynamic transmission control module can adjust the segmentation window duration based on its preset CPU and memory load, such as setting it to 5 seconds for load <30% and extending it to 10 seconds for load >70%.
[0096] Take the example of a tunnel boring machine (TBM) device that resumes data transmission after a network outage. Its configuration, for example, includes: an Advanced RISC Machine (ARM) quad-core CPU, 4GB of RAM, and a 128GB industrial SSD.
[0097] After network recovery, three resource statuses are collected in real time: CPU utilization, memory utilization, and disk I / O queue depth. The window duration is determined by the highest load level among the three: 5 seconds for low load, 7 seconds for medium load, and 10 seconds for high load.
[0098] Assuming the current CPU usage is 22% (low load), memory usage is 35% (medium load), and disk queue is 8 (high load), the window duration based on the highest load is 10 seconds. Data from a 5-minute network outage is extracted from the client-side historical database, divided into 30 fragments at 10-second intervals, each fragment has a 38-byte header, compressed using LZ4 (a lossless data compression algorithm), and then uploaded.
[0099] If the CPU usage suddenly spikes to 75% (medium load) during transmission, the subsequent window duration is dynamically adjusted to 7 seconds to avoid congestion. If the disk queue size drops to 3 and both CPU and memory are under low load, the window duration is dynamically restored to 5 seconds to speed up the process.
[0100] In this process, the edge data acquisition and processing module extracts missing data from the edge historical database / file and / or the edge offline cache module based on "data thread ID + device ID". The extracted missing data is then divided into at least one fragment according to the dynamic window duration, and an identifier header is added to each fragment to obtain encapsulated fragments. The encapsulated fragments are then stored in the offline cache module after lossless compression.
[0101] Through the above embodiments of this application, after network outage recovery, the edge device, based on a triple index consisting of "data thread ID + device ID + window timestamp," can directly and quickly locate the storage path or query conditions corresponding to the missing data from the historical database on the client side, without requiring a full scan. This solves the technical problems of low accuracy of interruption points and low efficiency of historical data extraction in related technologies, thus improving data extraction efficiency. Furthermore, the combination of dynamic window fragmentation adapted to edge-side load and lossless compression reduces bandwidth consumption for resumed transmissions and alleviates cloud congestion.
[0102] According to an embodiment of this application, uploading package fragments to the cloud includes: uploading package fragments to the cloud according to a preset priority order, wherein the preset priority order is: the priority of package fragments with device operating parameters is greater than the priority of package fragments with environmental monitoring data, and the priority of package fragments with environmental monitoring data is greater than the priority of package fragments with log data.
[0103] For example, after the encapsulated fragments are losslessly compressed and stored in the edge-side offline cache module, the edge-side offline data continuation module can upload the encapsulated fragments in the offline cache module according to priority.
[0104] Consider the following scenario: Within a 10-second window, there are 1200 frames of device operating parameters, 800 frames of environmental monitoring data, and 2000 frames of logs. After fragmentation and packaging, the edge-side dynamic transmission control module can sort the data according to a custom weight of "device operating parameters > environmental monitoring data > log data," prioritizing the transmission of core business data and ensuring timely operation and maintenance decisions.
[0105] Specifically, the following priority can be applied: transmit 1200 frames of device parameters first, then 800 frames of environmental monitoring, and finally 500 frames of logs (the remaining 1500 frames will go to the next window) to ensure that core data arrives in the cloud first.
[0106] Through the above embodiments of this application, after network outage recovery, the "dynamic time window (adjustable from 5 to N seconds) + lossless compression + data priority sorting" segmented transmission is enabled. The window duration is dynamically adjusted according to the CPU / memory load on the side, and core data (device operating parameters) is transmitted first, which can effectively alleviate the problems of rigid transmission strategies and excessive bandwidth consumption in related technologies.
[0107] To further ensure that the resumed data is aligned with the timeline of the existing data in the cloud, after the network outage is restored, the edge device can also request the current time from the cloud in order to calculate the cumulative drift during the network outage and to batch correct the timestamps of all cached data frames.
[0108] According to an embodiment of this application, in response to detecting a network recovery signal, a current time acquisition request can be sent to the cloud, and the current actual time information sent by the cloud can be received; the cumulative clock offset during the network outage can be calculated based on the current actual time information and the current local time information recorded by the edge computing node; and the collection timestamps of the encapsulated data cached during the network outage can be batch corrected based on the clock offset.
[0109] For example, batch correction can be achieved by combining formula (1).
[0110] T_corrected = T_original + Δδ(1).
[0111] Where Δδ represents the cumulative clock offset during the network outage, T_original represents the acquisition timestamp of the buffered encapsulated data during the network outage, and T_corrected represents the corrected acquisition timestamp.
[0112] For both normal transmission and offline resume transmission scenarios, a secure transmission channel can be built across all scenarios. This ensures unified security processing for both normal single frames and resumed fragments. The basic principle is as follows: sensitive information in the encapsulated data corresponding to the device data collected from the edge is desensitized, then processed through "encoding + encryption (generating an Initialization Vector (IV) and an anti-counterfeiting label)," and finally encapsulated into a private protocol frame containing the magic number and data thread ID. Upon receiving the data in the cloud, it undergoes "data thread ID verification + two-factor authentication + verification code verification," and is then parsed according to device type and parsing rules (customized by device ID, standard by model), uniformly parsed into plaintext, achieving full-link security protection across three nodes.
[0113] According to an embodiment of this application, at an edge computing node, corresponding to the above operation S204, uploading the encapsulated data to the cloud may include: desensitizing sensitive information in the encapsulated data, wherein the sensitive information includes at least the device physical address and device production parameters; encoding and encrypting the desensitized encapsulated data to generate encrypted data; generating an anti-counterfeiting label based on the encrypted data and the data thread identifier; encapsulating the encrypted data into a private protocol frame containing the data thread identifier, the anti-counterfeiting label, and a fixed magic number determined based on private protocol information; and uploading the encapsulated data to the cloud in the form of the private protocol frame.
[0114] For example, after data transmission from the end-side device to the edge is processed by removing redundancy and adding an identifier header to obtain encapsulated data, the edge security and processing module can desensitize sensitive information such as the device MAC address and production parameter thresholds. Then, it generates encrypted data and anti-counterfeiting labels through "encoding + encryption," and finally encapsulates it into a private protocol frame containing a fixed magic number and a data thread ID to prevent unauthorized identification or tampering during transmission. The magic number is a fixed value that can be customized based on the private protocol information.
[0115] According to an embodiment of this application, in the cloud, in response to receiving a private protocol frame containing encapsulated data, the magic number in the private protocol frame is validated for legality; the device identifier and anti-counterfeiting label in the private protocol frame are subjected to two-factor authentication; the encrypted data in the private protocol frame is decrypted to obtain a byte stream containing an identifier header and a data body, and the integrity of the byte stream is verified according to the checksum; the byte stream is restored to plaintext data according to the parsing rules corresponding to the device type; cloud resources are invoked to store the plaintext data, and the receiving status is fed back to the edge computing node.
[0116] For example, after receiving the protocol frame, the cloud security and processing module sequentially verifies the magic number and ID validity, confirms the data source through two-factor authentication using a "device whitelist + anti-counterfeiting label," and verifies the integrity of the CRC32 checksum after decryption. Then, it calls the type and parameter management module to restore the data to plaintext according to the parsing rules corresponding to the device type. Afterwards, the session management module updates the session state and schedules resources to store the plaintext data through the load balancing module, finally feeding back the reception status to the edge, thus achieving end-to-end security protection.
[0117] Corresponding to the above parsing rules, a multi-type device compatible parsing adaptation mechanism can be designed. The principle is as follows: device identifiers, data type tags, and device type identifiers (customized / standard) are pre-configured on the edge, and a parsing system is established in the cloud that "customized devices are matched with exclusive rules by ID, and standard devices are matched with unified rules by model" to adapt to multiple types of devices and enhance scenario compatibility.
[0118] According to the embodiments of this application, the above-mentioned parsing rules corresponding to the device type can be expressed as follows: if the device type is a customized device, a unique parsing rule is matched according to the device ID; if the device type is a standard device, a unified parsing rule is matched according to the device model.
[0119] For example, the same 4-byte data packet was received: [0x01, 0xF4, 0x00, 0x64].
[0120] Customized device resolution (matching exclusive rules by device ID) is as follows.
[0121] 1) The cloud extracts the device ID from the private protocol frame and checks the rule base to find deviceId = "TBM-003-A".
[0122] 2) This exclusive rule defines: the first 3 bytes are the cutter head torque, and the last 1 byte is the feed speed.
[0123] 3) Extract the first 3 bytes 0x01F400 and calculate the cutter head torque as 128000.
[0124] 4) After truncating 1 byte (0x64), the calculated propulsion speed is 100.
[0125] The analysis of standard equipment (based on a unified model matching rule) is as follows.
[0126] 1) The cloud-based custom rule was not matched, so model matching was used instead, which matched deviceModel = "TBM-Standard-V2".
[0127] 2) The unified rule defines: the first 2 bytes are the cutter head torque, and the last 2 bytes are the feed speed.
[0128] 3) Extract the first two bytes 0x01F4 and calculate the cutter head torque as 500.
[0129] 4) Extract the last 2 bytes 0x0064, and calculate the propulsion speed as 100.
[0130] Based on this method, comprehensive compatibility with industrial equipment from different manufacturers and with varying degrees of customization is achieved. No large-scale equipment modifications are required; system integration is achieved through simple configuration, resolving issues of poor equipment compatibility and complex debugging of customized equipment in related technologies, thus lowering the barrier to entry for industrial applications.
[0131] Through the above embodiments of this application, a full-process security protection mechanism of "sensitive information desensitization + data body encoding encryption + private protocol encapsulation + cloud two-factor authentication" is adopted. The private protocol frame contains a fixed magic number and a data thread ID. The cloud identifies the protocol format through the magic number and associates the device and session through the data thread ID to achieve dual verification, effectively resisting illegal injection and data interception. Before the transmitted data is decrypted in the cloud, there is no business information that can be parsed. Only after the cloud completes two-factor authentication and matches the corresponding parsing rules according to the device type, it is restored to plaintext. This constructs an end-to-end secure transmission link, solving the problems of insufficient security protection and easy data leakage in related technologies.
[0132] Subsequently, the cloud can further associate devices and sessions through data thread IDs, verify the integrity and frame continuity of each encapsulated fragment / reassembled data, and if a missing fragment is detected, it will send a precise retransmission instruction to the edge, and the edge will work with the end to retransmit the corresponding fragment until all missing frames are retransmitted.
[0133] According to an embodiment of this application, on the edge side, in response to receiving an abnormal frame retransmission instruction from the cloud, the data to be retransmitted is extracted from the device-side database and / or the cached data of the edge computing node and sent to the cloud. The abnormal frame retransmission instruction is generated by the cloud when it detects an abnormality in the frame sequence number of already received encapsulated data.
[0134] For example, after the cloud security and processing module completes the security verification, the retransmission scheduling and retransmission module verifies the data integrity and frame continuity piece by piece according to the frame sequence number and records the received information in real time. If a missing piece is detected, the cloud sends a precise retransmission instruction to the edge, and the edge offline data retransmission module works with the data acquisition and processing module to extract the corresponding data and retransmit it until all missing frames are received.
[0135] During normal transmission, if the side does not receive a successful reception feedback from the cloud or receives a "missing / abnormal" feedback, the real-time caching module extracts the corresponding data, re-encapsulates and encrypts it, and then resends it by the communication module until the cloud confirms successful reception.
[0136] After the resume / re-transmission is completed, the cloud-based resume and re-transmission module sends a completion command to the edge. The edge-based real-time caching module and offline caching module delete the resumed historical data, release storage resources, and complete the entire resume loop.
[0137] Through the above embodiments of this application, the cloud ensures data integrity, non-duplication, and no omissions through a piece-by-piece verification and precise retransmission mechanism. During normal transmission, automatic retransmission is triggered if the edge does not receive reception feedback from the cloud; during network interruption and resumption of transmission, precise retransmission is initiated after the cloud verifies the missing data until the cloud confirms that all data has been received. This forms a three-level fault-tolerant retransmission closed loop of "end-edge-cloud", solving the problems of single-point caching risk and easy data loss in related technologies.
[0138] For the above-mentioned normal single-frame transmission process, further optimizations can be made in bandwidth-constrained scenarios, as follows.
[0139] According to an embodiment of this application, the aforementioned identifier header further includes: a fixed magic number, a device type identifier, and a collection timestamp in milliseconds. On the side, in response to detecting that the network bandwidth meets preset conditions, the identifier header is simplified, including: reducing the length of the magic number bytes, omitting the device type identifier, and reducing the collection timestamp from milliseconds to seconds.
[0140] According to an embodiment of this application, in the cloud, in response to receiving encapsulated data containing a simplified identifier header, the cloud reception time of the encapsulated data containing the simplified identifier header is determined, and a millisecond-level timestamp is determined based on the cloud reception time; a device type identifier that has a mapping relationship with the data thread identifier is determined; based on the device type identifier and the millisecond-level timestamp, the simplified identifier header is restored to a full-format identifier header; and the encapsulated data containing the full-format identifier header is recorded in the cloud database. Since the data thread identifier is generated based on the device physical address hash and the session timestamp, the device physical address can be determined based on the device physical address hash, and thus the device identifier can be determined. Therefore, the device identifier directly mapped to the data thread identifier can be determined based on this.
[0141] For example, when the network is stable under normal conditions, the edge-side dynamic transmission control module maintains the real-time transmission logic of single frames according to a preset period; if bandwidth constraints are detected, the data acquisition and processing module is triggered to simplify non-core fields in the identifier header to reduce bandwidth consumption. The specific situation is as follows.
[0142] 1) The original single frame is 308 bytes, the identifier header is 48 bytes (magic number, data thread ID, device ID, data type tag, device type identifier, timestamp, CRC16), and the data body is 256 bytes (cutterhead torque, propulsion speed, earth pressure, shield tail gap, attitude deviation, hydraulic cylinder pressure, reserved extension 160 bytes).
[0143] 2) When bandwidth is tight (utilization > 80% or RTT > 500ms), simplification is triggered: the magic number is reduced to 2 bytes; the device type identifier is omitted (it is already cached and mapped in the cloud); the timestamp is reduced from milliseconds to seconds; the data body only transmits core parameters (cutterhead torque, propulsion speed, earth pressure), and the extension is reserved and left empty. After simplification, it is 128 bytes, and the bandwidth usage is reduced by 58%.
[0144] 3) After receiving the data, the cloud uses the data thread ID to query the cache to complete the device type, uses the arrival time in milliseconds to complete the timestamp in milliseconds, and restores the complete format before storing it in the database.
[0145] Through the above embodiments of this application, the normal transmission adopts a lightweight transmission method with a preset period of single frames and a simplified identifier header. This avoids the bandwidth redundancy caused by the large data packets in traditional single-frame transmission, and also overcomes the defect of sacrificing real-time performance in packet transmission. It effectively reduces bandwidth consumption while ensuring real-time data upload.
[0146] Figure 5 The schematic diagram illustrates the overall flowchart of remote data resumption after network outage according to an embodiment of this application.
[0147] like Figure 5 As shown, the method includes operations S501 to S522.
[0148] After operating S501, the network resumed transmission.
[0149] During operation of S502, the edge-cloud communication module detected that edge-cloud communication had resumed.
[0150] When operating S503, the side breakpoint recording module supplements the network recovery timestamp and updates the complete breakpoint information.
[0151] When operating S504, the side-side offline data resume module initiates a resume request to the cloud resume scheduling and retransmission module, carrying complete breakpoint information.
[0152] When operating the S505, the cloud-based resume transmission scheduling and retransmission module uses breakpoint information (frame sequence number + device ID + thread ID) to provide feedback on the breakpoint information recorded in the cloud, accurately aligning the range of missing data.
[0153] In operation S506, the corresponding data fragments are extracted again.
[0154] When operating the S507, the side-side dynamic transmission control module: ① adjusts the dynamic window duration according to the side-side load; ② prioritizes core data (equipment operating parameters).
[0155] When operating the S508, the side data acquisition and processing module is segmented and packaged, and the security and processing module is encrypted and encapsulated.
[0156] When operating the S509, the side-side offline data transmission module uploads data to the cloud one by one.
[0157] In operation S510, the cloud security and processing module verifies fragment integrity, and the resume scheduling and retransmission module verifies frame continuity. If missing fragments / lost frames are detected, operation S511 is executed; if no missing fragments are detected and all frames are received, operations S512 to S522 are executed.
[0158] When operating S511, the cloud-based resume transmission scheduling and retransmission module issues precise retransmission instructions based on breakpoint information (clearly defining the range of missing frame sequence numbers).
[0159] When operating the S512, the cloud-based resume transmission scheduling and retransmission module provides feedback that the resume transmission is complete.
[0160] When operating the S513, the side-side real-time cache module and offline cache module delete the resumed data / complete breakpoint information to release storage resources.
[0161] When operating the S514, it reverts to normal single-frame transmission.
[0162] When operating the S515, data is collected in a loop.
[0163] When operating the S516, the side communication module receives data.
[0164] When operating the S517, the side data acquisition and processing module is encapsulated (with an added identifier header) and the security and processing module is encrypted.
[0165] When operating the S518, the side communication module uploads data to the cloud.
[0166] When operating S519, verify the cloud security and processing module (magic number / ID / checksum).
[0167] When operating the S520, the cloud-based type and parameter management module parses data, and the load balancing module stores it.
[0168] In operation S521, the cloud sends a feedback status of success / missing / abnormal to the edge communication module. If the feedback status is missing / abnormal, operation S522 is executed and operation S518 is returned; if the feedback status is successful, operation S515 is returned.
[0169] When operating the S522, the side-side real-time cache module extracts the data, repackages and encrypts it, and then resends it.
[0170] Based on the above methods, this application provides a method for resuming remote data transmission from a disconnected network to industrial equipment. This addresses the problems of poor accuracy, low efficiency, and weak security in the "edge-cloud" three-tier architecture, which suffers from unclear division of labor and insufficient coordination. On one hand, this application establishes an "edge-cloud" collaborative transmission foundation, clearly defining the core division of labor: edge-cloud collaboration takes the lead, and the end-side provides precise support. The edge side undertakes functions such as data preprocessing, caching and fault tolerance, and breakpoint recording; the cloud side focuses on overall coordination, security verification, and taxonomic analysis; and the end-side is responsible for data collection and local backup. This achieves optimized division of labor and end-to-end collaboration in the "edge-cloud" three-tier architecture, optimizes resource allocation, and improves transmission efficiency. Furthermore, the entire process reduces operational costs, including the frequency of emergency handling and hardware costs, and significantly lowers the difficulty of operation and maintenance. On the other hand, this application optimizes the core responsibilities and collaborative logic of the three-level nodes through "edge-cloud collaborative leadership + precise cooperation on the terminal side + cloud-based categorized analysis + second-level adaptation + full-link linkage of data thread ID". Designed according to the logic of "normal single-frame transmission - breakpoint recording - recovery and fragmented transmission", it solves the problems of accuracy, efficiency and security of network outage resumption, can adapt to customized and standard equipment, avoids the transmission of data being cracked, and ensures the integrity of monitoring data and the timeliness of operation and maintenance.
[0171] Figure 6A A block diagram of a data transmission apparatus applied to an edge computing node according to an embodiment of this application is shown schematically.
[0172] like Figure 6AAs shown, the data transmission device 610 applied to edge computing nodes includes a first session request module 611, a binding synchronization module 612, an identifier header encapsulation module 613, and an encapsulated data upload module 614.
[0173] The first session request module 611 is used to initiate a session request to the cloud, including the device physical address hash value, device identifier, and session timestamp of the started device, when the device is detected to be started, and to receive a data thread identifier generated by the cloud, wherein the data thread identifier is generated based on the device physical address hash value and the session timestamp.
[0174] The binding synchronization module 612 is used to bind the data thread identifier with the device identifier and synchronize it to the device-side database.
[0175] The identifier header encapsulation module 613 is used to respond to the device data uploaded by the device end, and add an identifier header to the device data according to the data thread identifier, device identifier, device data acquisition timestamp, and check code generated based on the device data to obtain encapsulated data.
[0176] The encapsulated data upload module 614 is used to upload encapsulated data to the cloud.
[0177] According to embodiments of this application, the encapsulated data also includes a frame sequence number that monotonically increases within the same session. The data transmission apparatus further includes a breakpoint information generation module and a breakpoint information synchronization module.
[0178] The breakpoint information generation module is used to generate breakpoint information in response to the detection of a network interruption signal by recording the network disconnection timestamp and the last transmitted frame sequence number based on the device identifier and data thread identifier.
[0179] The breakpoint information synchronization module is used to cache breakpoint information in real time to edge computing nodes, synchronize it to the device database, and report it to the cloud.
[0180] According to embodiments of this application, the data transmission device further includes a resume request module, a missing data extraction module, a fragmentation module, a fragmentation encapsulation module, and an encapsulated fragmentation upload module.
[0181] The resume request module is used to initiate a resume request to the cloud, including the breakpoint information recorded by the edge computing node, in response to the detection of a network recovery signal. This is to align the breakpoint information recorded by the cloud with the breakpoint information recorded by the edge computing node and to provide feedback on the range of missing data.
[0182] The missing data extraction module is used to extract missing data from the device-side database and / or the cached data of the edge computing node, based on the range of missing data.
[0183] The sharding module is used to dynamically adjust the sharding window duration based on the load of edge computing nodes, and to divide missing data into at least one shard.
[0184] The fragmentation and encapsulation module is used to add fragmentation identifier headers to fragments based on data thread identifier, device identifier, window timestamp, number of frames within a fragment, and checksum calculated based on fragmentation, thereby obtaining encapsulated fragments.
[0185] The encapsulated fragment upload module is used to upload encapsulated fragments to the cloud.
[0186] According to embodiments of this application, the data transmission device further includes a current time request module, a clock offset calculation module, and a timestamp correction module.
[0187] The current time request module is used to send a current time retrieval request to the cloud and receive the current actual time information sent by the cloud.
[0188] The clock offset calculation module is used to calculate the cumulative clock offset during the network outage based on the current actual time information and the current local time information recorded by the edge computing node.
[0189] The timestamp correction module is used to batch correct the acquisition timestamps of the encapsulated data cached during the network outage based on the clock offset.
[0190] According to an embodiment of this application, the encapsulated fragment upload module includes an encapsulated fragment upload unit.
[0191] The encapsulation fragment upload unit is used to upload encapsulation fragments to the cloud according to a preset priority order. The preset priority order is as follows: the priority of encapsulation fragments with device operating parameters is higher than the priority of encapsulation fragments with environmental monitoring data, and the priority of encapsulation fragments with environmental monitoring data is higher than the priority of encapsulation fragments with log data.
[0192] According to an embodiment of this application, the encapsulated fragment upload module includes a desensitization unit, an encryption unit, an anti-counterfeiting unit, a private protocol frame encapsulation unit, and a private protocol frame upload unit.
[0193] The desensitization unit is used to desensitize sensitive information in the packaged data. The sensitive information includes at least the device physical address and device production parameters.
[0194] The encryption unit is used to encode and encrypt the de-identified packaged data to generate encrypted data.
[0195] The anti-counterfeiting unit is used to generate anti-counterfeiting labels based on encrypted data and data thread identifiers.
[0196] The private protocol frame encapsulation unit is used to encapsulate encrypted data into a private protocol frame containing a data thread identifier, an anti-counterfeiting label, and a fixed magic number determined based on private protocol information.
[0197] The private protocol frame upload unit is used to upload encapsulated data to the cloud in the form of private protocol frames.
[0198] According to embodiments of this application, the data transmission device further includes a retransmission module.
[0199] The retransmission module is used to respond to the abnormal frame retransmission instruction received from the cloud, extract the data to be retransmitted from the device database and / or the cached data of the edge computing node and send it to the cloud. The abnormal frame retransmission instruction is generated by the cloud when it detects that there is an abnormality in the frame sequence number of the received encapsulated data.
[0200] According to embodiments of this application, the identifier header further includes: a fixed magic number, a device type identifier, and a collection timestamp in milliseconds. The data transmission device also includes an identifier header simplification module.
[0201] The header simplification module is used to simplify the header in response to the detection that the network bandwidth meets the preset conditions, including: reducing the length of the magic number byte, omitting the device type identifier, and reducing the collection timestamp from milliseconds to seconds.
[0202] Figure 6B A block diagram of a data transmission apparatus applied to the cloud according to an embodiment of this application is shown schematically.
[0203] like Figure 6B As shown, the data transmission device 620 applied to the cloud includes a second session request module 621, a data thread identifier sending module 622, and an encapsulated data receiving module 623.
[0204] The second session request module 621 is used to respond to a session request initiated by an edge computing node when it detects that the device has been started, which includes the device physical address hash value, device identifier, and session timestamp of the started device, and to generate a data thread identifier based on the device physical address hash value and session timestamp.
[0205] The data thread identifier sending module 622 is used to send the data thread identifier to the edge computing node so that the edge computing node can bind the data thread identifier with the device identifier and synchronize it to the device database.
[0206] The encapsulated data receiving module 623 is used to receive encapsulated data uploaded by the edge computing node. The encapsulated data is obtained by the edge computing node adding an identifier header to the device data uploaded by the device based on the data thread identifier, device identifier, device data collection timestamp, and checksum generated based on the device data.
[0207] According to an embodiment of this application, the second session request module includes a device identifier verification unit and a data thread identifier generation unit.
[0208] The device identification verification unit is used to verify the legality of device identification based on the device whitelist.
[0209] The data thread identifier generation unit is used to generate a data thread identifier based on the device physical address hash value and session timestamp, provided that the verification is valid.
[0210] According to embodiments of this application, the data transmission device further includes a magic number verification module, a two-factor authentication module, a decryption module, a restoration module, and a storage module.
[0211] The magic number verification module is used to verify the validity of the magic number in the private protocol frame in response to the received encapsulated data.
[0212] The two-factor authentication module is used to perform two-factor authentication on the device identifier and anti-counterfeiting label in the private protocol frame.
[0213] The decryption module is used to decrypt the encrypted data in the private protocol frame to obtain a byte stream containing an identifier header and a data body, and to verify the integrity of the byte stream based on the checksum.
[0214] The restoration module is used to restore the byte stream to plaintext data according to the parsing rules corresponding to the device type.
[0215] The storage module is used to access cloud resources to store plaintext data and to report the reception status back to the edge computing nodes.
[0216] According to embodiments of this application, the data transmission device further includes a millisecond-level timestamp determination module, a device type identifier determination module, an identifier header recovery module, and an encapsulated data recording module.
[0217] The millisecond-level timestamp determination module is used to respond to the receipt of encapsulated data containing a simplified identifier header, determine the cloud reception time of the encapsulated data containing the simplified identifier header, and determine the millisecond-level timestamp based on the cloud reception time, wherein the acquisition timestamp of the simplified identifier header is a second-level timestamp.
[0218] The device type identifier determination module is used to determine the device type identifier that has a mapping relationship with the data thread identifier.
[0219] The header restoration module is used to restore the simplified header to the full format header based on the device type identifier and millisecond-level timestamp.
[0220] The encapsulated data recording module is used to record encapsulated data containing a fully formatted identifier header in a cloud database.
[0221] Any one or more of the modules or units according to the embodiments of this application, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules or units according to the embodiments of this application can be implemented by splitting them into multiple modules. Any one or more of the modules or units according to the embodiments of this application can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or implemented by hardware or firmware in any other reasonable manner by integrating or packaging circuits, or implemented by any one of software, hardware, and firmware, or by any appropriate combination of any of these. Alternatively, one or more of the modules or units according to the embodiments of this application can be at least partially implemented as computer program modules, which can perform corresponding functions when the computer program module is run.
[0222] For example, any and multiple modules of the first session request module 611, binding synchronization module 612, identifier header encapsulation module 613, encapsulated data upload module 614, or the second session request module 621, data thread identifier sending module 622, and encapsulated data receiving module 623 can be combined into one module / unit, or any one of these modules / units can be split into multiple modules / units. Alternatively, at least some of the functions of one or more of these modules / units can be combined with at least some of the functions of other modules / units and implemented in one module / unit. According to embodiments of this application, at least one of the following modules can be implemented, at least partially, as hardware circuits: a first session request module 611, a binding synchronization module 612, an identifier header encapsulation module 613, an encapsulated data upload module 614, or a second session request module 621, a data thread identifier sending module 622, and an encapsulated data receiving module 623. These can be implemented, for example, as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or any other reasonable method of integrating or encapsulating the circuit. Alternatively, at least one of the following can be implemented, at least partially, as a computer program module, which, when run, can perform corresponding functions.
[0223] Figure 7 A block diagram of an electronic device suitable for implementing a data transmission method according to an embodiment of this application is shown schematically. Figure 7 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0224] like Figure 7 As shown, an electronic device 700 according to an embodiment of this application includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage portion 708 into a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0225] RAM 703 stores various programs and data required for the operation of electronic device 700. Processor 701, ROM 702, and RAM 703 are interconnected via bus 704. Processor 701 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 702 and / or RAM 703. It should be noted that the programs may also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0226] According to embodiments of this application, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to a bus 704. The electronic device 700 may also include one or more of the following components connected to the input / output (I / O) interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 710 as needed so that computer programs read from it can be installed into the storage section 708 as needed.
[0227] According to embodiments of this application, the method flow according to embodiments of this application can be implemented as a computer software program. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711. When the computer program is executed by processor 701, it performs the functions defined in the system of embodiments of this application. According to embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0228] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the data transmission method according to the embodiments of this application.
[0229] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0230] For example, according to embodiments of this application, a computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0231] Embodiments of this application also include a computer program product, which includes a computer program containing program code for performing the methods provided in the embodiments of this application. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the data transmission method provided in the embodiments of this application.
[0232] When the computer program is executed by the processor 701, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0233] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 709, and / or installed from a removable medium 711. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0234] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0235] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not expressly stated in this application. In particular, the various embodiments and / or features described in the claims of this application may be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
[0236] The embodiments of this application have been described above. However, these embodiments are merely illustrative and not intended to limit the scope of this application. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this application is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this application, and all such substitutions and modifications should fall within the scope of this application.
Claims
1. A data transmission method applied to an edge computing node, comprising: Upon detecting that the device has been started, a session request is sent to the cloud, including the device physical address hash value, device identifier, and session timestamp of the started device, and a data thread identifier generated by the cloud is received, wherein the data thread identifier is generated based on the device physical address hash value and the session timestamp; The data thread identifier is bound to the device identifier and synchronized to the device-side database; In response to receiving device data uploaded by the device, an identifier header is added to the device data according to the data thread identifier, the device identifier, the acquisition timestamp of the device data, and the checksum generated based on the device data to obtain encapsulated data; The encapsulated data is uploaded to the cloud.
2. The method according to claim 1, wherein, The encapsulated data also includes a monotonically increasing frame sequence number within the same session; the method further includes: In response to the detection of a network interruption signal, the network disconnection timestamp and the last transmitted frame sequence number are recorded according to the device identifier and the data thread identifier to generate breakpoint information; The breakpoint information is cached in real time to the edge computing node, synchronized to the device database, and reported to the cloud.
3. The method according to claim 1, further comprising: In response to the detection of a network recovery signal, a resume transmission request is initiated to the cloud, including the breakpoint information recorded by the edge computing node, so as to align the breakpoint information recorded in the cloud with the breakpoint information recorded by the edge computing node and to provide feedback on the range of missing data. Based on the range of missing data, extract the missing data from the device-side database and / or the cached data of the edge computing node; The missing data is divided into at least one shard based on the sharding window duration dynamically adjusted according to the load of the edge computing nodes. Based on the data thread identifier, the device identifier, the window timestamp, the number of frames within the slice, and the checksum calculated based on the slice, a slice identifier header is added to the slice to obtain the encapsulated slice; The packaged fragments are uploaded to the cloud.
4. The method according to claim 3, wherein, The response to detecting a network recovery signal further includes: Send a request to the cloud to obtain the current time, and receive the current actual time information sent by the cloud; Based on the current actual time information and the current local time information recorded by the edge computing node, calculate the cumulative clock offset during the network outage period; The acquisition timestamps of the encapsulated data cached during the network outage are batch corrected based on the clock offset.
5. The method according to claim 3, wherein, Uploading the packaged fragments to the cloud includes: The encapsulated fragments are uploaded to the cloud according to a preset priority order, wherein the preset priority order is as follows: the priority of the encapsulated fragment with device operating parameters is greater than the priority of the encapsulated fragment with environmental monitoring data, and the priority of the encapsulated fragment with environmental monitoring data is greater than the priority of the encapsulated fragment with log data.
6. The method according to any one of claims 1-5, wherein, Uploading the encapsulated data to the cloud includes: Sensitive information in the encapsulated data is desensitized, wherein the sensitive information includes at least the device physical address and device production parameters; The de-identified packaged data is encoded and encrypted to generate encrypted data. Based on the encrypted data and the data thread identifier, an anti-counterfeiting label is generated; The encrypted data is encapsulated into a private protocol frame containing a data thread identifier, an anti-counterfeiting label, and a fixed magic number determined based on private protocol information; The encapsulated data is uploaded to the cloud in the form of a private protocol frame.
7. The method according to claim 1, further comprising: In response to receiving an abnormal frame retransmission instruction from the cloud, the system extracts the data to be retransmitted from the device-side database and / or the cached data of the edge computing node and sends it to the cloud. The abnormal frame retransmission instruction is generated by the cloud when it detects an abnormality in the frame sequence number of the received encapsulated data.
8. The method according to claim 1, wherein, The identifier header further includes: a fixed magic number and a device type identifier; the acquisition timestamp is a millisecond-level timestamp; the method further includes: In response to the detection that the network bandwidth meets the preset conditions, the identifier header is simplified, including: reducing the length of the magic number byte, omitting the device type identifier, and reducing the collection timestamp from milliseconds to seconds.
9. A data transmission method applied in the cloud, comprising: In response to receiving a session request initiated by an edge computing node when it detects that the device has been started, including the device physical address hash value, device identifier, and session timestamp of the started device, a data thread identifier is generated based on the device physical address hash value and the session timestamp; The data thread identifier is sent to the edge computing node so that the edge computing node can bind the data thread identifier to the device identifier and synchronize it to the device-side database; The edge computing node receives encapsulated data uploaded by the edge computing node, wherein the encapsulated data is obtained by the edge computing node adding an identifier header to the device data uploaded by the device based on the data thread identifier, the device identifier, the acquisition timestamp of the device data, and a checksum generated based on the device data.
10. The method according to claim 9, wherein, Before generating the data thread identifier based on the device physical address hash value and the session timestamp, the method further includes: Verify the legality of the device identifier based on the device whitelist; If the verification is valid, a data thread identifier is generated based on the device physical address hash value and the session timestamp.
11. The method of claim 9, further comprising: In response to receiving a private protocol frame containing the encapsulated data, the validity of the magic number in the private protocol frame is verified. Perform two-factor authentication on the device identifier and anti-counterfeiting label in the private protocol frame; The encrypted data in the private protocol frame is decrypted to obtain a byte stream containing an identifier header and a data body, and the integrity of the byte stream is verified according to the checksum. According to the parsing rules corresponding to the device type, the byte stream is restored to plaintext data; The plaintext data is stored by calling cloud resources, and the reception status is fed back to the edge computing node.
12. The method according to claim 9, further comprising: In response to receiving encapsulated data containing a simplified identifier header, the cloud reception time of the encapsulated data containing the simplified identifier header is determined, and a millisecond-level timestamp is determined based on the cloud reception time, wherein the acquisition timestamp of the simplified identifier header is a second-level timestamp; Determine the device type identifier that has a mapping relationship with the data thread identifier; Based on the device type identifier and the millisecond-level timestamp, the simplified identifier header is restored to the full-format identifier header; The encapsulated data containing the fully formatted identifier header is recorded in the cloud database.
13. A data transmission device applied to an edge computing node, comprising: The first session request module is used to initiate a session request to the cloud, including the device physical address hash value, device identifier, and session timestamp of the started device, when the device is detected to be started, and to receive a data thread identifier generated by the cloud, wherein the data thread identifier is generated based on the device physical address hash value and the session timestamp; A binding synchronization module is used to bind the data thread identifier with the device identifier and synchronize it to the device-side database; The identifier header encapsulation module is used to respond to received device data uploaded by the device end, and add an identifier header to the device data according to the data thread identifier, the device identifier, the acquisition timestamp of the device data, and the check code generated based on the device data to obtain encapsulated data. A data upload module is used to upload the encapsulated data to the cloud.
14. A data transmission device, applied in the cloud, comprising: The second session request module is used to respond to receiving a session request from an edge computing node that has detected that the device has been started, which includes the device physical address hash value, device identifier, and session timestamp of the started device, and to generate a data thread identifier based on the device physical address hash value and the session timestamp; A data thread identifier sending module is used to send the data thread identifier to the edge computing node, so that the edge computing node can bind the data thread identifier with the device identifier and synchronize it to the device-side database; The encapsulated data receiving module is used to receive encapsulated data uploaded by the edge computing node. The encapsulated data is obtained by the edge computing node adding an identifier header to the device data uploaded by the device based on the data thread identifier, the device identifier, the acquisition timestamp of the device data, and a checksum generated based on the device data.
15. An electronic device comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1-12.
16. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method of any one of claims 1-12.
17. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-12.
