Industrial internet of things data transmission method, device, equipment, storage medium and product
By using the DDPM-API algorithm to cluster and differentiate data in the Industrial Internet of Things (IIoT), and using the median as a reference value, the problem of excessive load on the API gateway is solved, achieving the effects of reducing data volume and ensuring secure transmission.
Patent Information
- Application Number
- CN202411781467.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-05
AI Technical Summary
In the Industrial Internet of Things (IIoT), API gateways often experience excessive loads when processing data due to high data similarity, leading to difficulties in data transmission and retrieval. Furthermore, the large and complex data volume negatively impacts data transmission efficiency and security.
The DDPM-API algorithm is adopted to cluster and package data at nodes along the transmission path, use the median as a reference value for differential processing, reduce the size of data packets, and ensure data security when transmitting data packets between nodes.
It effectively reduces the amount of data transmitted, lowers the burden on nodes, and improves data transmission efficiency and security without losing information.
Smart Images

Figure CN119484586B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an industrial Internet of Things (IoT) data transmission method, apparatus, equipment, storage medium, and product. Background Technology
[0002] In Industrial Internet of Things (IIoT) scenarios where API gateways act as proxies, a large amount of data is generated. This data is characterized by its diverse types, large volume, high value, high speed, and complex processing. One of the most significant features is the extremely high similarity of the data. When such data is requested through the API gateway, it can overload the gateway, leading to difficulties in data transmission and retrieval. Summary of the Invention
[0003] Therefore, it is necessary to provide an industrial Internet of Things (IoT) data transmission method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can effectively reduce the amount of data transmitted without losing any of the transmitted information, in order to address the aforementioned technical problems.
[0004] Firstly, this application provides an industrial Internet of Things (IoT) data transmission method, including:
[0005] For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0006] For non-first nodes on the transmission path, the packaged data transmitted by the previous node is restored, the restored data is clustered and packaged, and the packaged data is transmitted to the next node that is not the first node.
[0007] After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client.
[0008] In one embodiment, the clustering and packaging of the data to be processed includes:
[0009] Cluster the data to be processed to obtain multiple clustering results for the data to be processed.
[0010] Generate data packets for each clustering result, integrate the data packets for each clustering result, and obtain the total data packet for the data to be processed.
[0011] In one embodiment, the data packet that generates each clustering result includes:
[0012] For each clustering result, determine the median of the multiple data points to be processed under that clustering result;
[0013] Calculate the difference between the remaining unprocessed data (excluding the median) and the median in the clustering results;
[0014] The data packet representing the clustering result is generated based on the difference and the median.
[0015] In one embodiment, integrating the data packets of each clustering result to obtain the total data packet of the data to be processed includes:
[0016] Pack the data packets of each clustering result, the class identifier of each clustering result, and the node identifier of the current node into a total data packet.
[0017] In one embodiment, restoring the packaged data includes:
[0018] For each clustering result covered by the packaged data, obtain the corresponding difference and median of the clustering result in the packaged data;
[0019] Based on the difference and median of the clustering results, the data to be processed under the clustering results are restored.
[0020] In one embodiment, the method further includes:
[0021] If the target node is a server, and a non-target node on the transmission path receives a client request, the client request is authenticated.
[0022] If the client request passes authentication, the client request is forwarded to the server via the transmission path;
[0023] If the client request fails authentication, a failure message will be returned to the client.
[0024] Secondly, this application also provides an industrial Internet of Things (IoT) data transmission device, comprising:
[0025] The first transmission module is used to cluster and package the data to be processed for the first node on the transmission path from multiple nodes to the target node, and then transmit the packaged data to the next node after the first node.
[0026] The second transmission module is used to restore the packaged data transmitted by the previous node to the non-first node on the transmission path, cluster and package the restored data, and transmit the packaged data to the next node that is not the first node.
[0027] The restore module is used to restore the currently packaged data after the data to be processed has been transmitted to the target node; wherein the target node is a server or a client.
[0028] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0029] For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0030] For non-first nodes on the transmission path, the packaged data transmitted by the previous node is restored, the restored data is clustered and packaged, and the packaged data is transmitted to the next node that is not the first node.
[0031] After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client.
[0032] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0033] For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0034] For non-first nodes on the transmission path, the packaged data transmitted by the previous node is restored, the restored data is clustered and packaged, and the packaged data is transmitted to the next node that is not the first node.
[0035] After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client.
[0036] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0037] For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0038] For non-first nodes on the transmission path, the packaged data transmitted by the previous node is restored, the restored data is clustered and packaged, and the packaged data is transmitted to the next node that is not the first node.
[0039] After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client.
[0040] The aforementioned industrial IoT data transmission methods, devices, computer equipment, computer-readable storage media, and computer program products compress data into smaller data packets through clustering and packaging, and transmit data between nodes based on these data packets. This effectively reduces the amount of data transmitted, while the clustering method does not lose information and reduces the burden on transmission nodes. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a flowchart illustrating an industrial IoT data transmission method in one embodiment;
[0043] Figure 2 This is a schematic diagram of the industrial Internet of Things (IIoT) data transmission process in one embodiment;
[0044] Figure 3 This is a schematic diagram of differential data processing in the prior art;
[0045] Figure 4 This is a schematic diagram of the authentication process in one embodiment;
[0046] Figure 5 This is a structural block diagram of an industrial IoT data transmission device in one embodiment;
[0047] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] An API gateway acts as a proxy between clients and servers. It receives requests from clients, aggregates and processes the requested data, and then forwards the data to the server. API gateways are widely used in practice, especially in microservice architectures, mobile applications, IoT, and enterprise-level application scenarios. Therefore, data processing is a crucial aspect of an API gateway.
[0050] Please see Figure 2 , Figure 2 This diagram illustrates the data transmission process in the Industrial Internet of Things (IIoT), where ELB stands for Elastic Load Balancer. Consider a scenario where an API gateway acts as a proxy in IIoT, such as in my country where mine safety is a widely studied and important area. To prevent accidents, mine monitoring systems continuously monitor the environment 24 / 7, generating massive amounts of data such as temperature, wind speed, and gas concentration. This data exhibits the main characteristics of big data: diverse types, large volume, high value, high speed, and complex processing. A key feature is extremely high data similarity, such as consistent temperatures over a period of time. When this data is requested through the API gateway, it can overload the gateway, necessitating data compression. Besides handling large volumes, data security is paramount, especially in applications involving the transmission of sensitive or even confidential data. Therefore, security verification, authentication, and access control strategies within the API gateway are essential.
[0051] Therefore, this application proposes a method that can effectively reduce the amount of data transmitted without losing any of the transmitted information, while also ensuring the secure transmission of data.
[0052] In one embodiment, such as Figure 1 As shown, an industrial Internet of Things (IoT) data transmission method is provided. This embodiment illustrates the method applied to a terminal, but it is understood that the method can also be applied to a server, or to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0053] Step 101: For the transmission path from multiple nodes to the target node, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0054] Step 102: For non-first nodes on the transmission path, restore the packaged data transmitted by the previous node, cluster and package the restored data, and transmit the packaged data to the next node that is not the first node.
[0055] Step 103: After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein the target node is a server or a client.
[0056] For example, this embodiment can be applied to scenarios where a user initiates a request to a server, i.e., the target node is the server; it can also be applied to scenarios where the server returns data to a user, i.e., the target node is the client. In both scenarios, the data processing method is the same, only the data flow direction is different.
[0057] In this embodiment, the nodes on the transmission path can be either API Gateways or Server Load Balancers (SLBs), and the specific type is not limited here. An API Gateway is a key foundational component in the entire API lifecycle management, responsible for API configuration, deployment, version rollback, security, load balancing, etc. The API Gateway is the entry point for all terminal traffic, responsible for routing terminal API requests to the correct upstream service for processing, and then returning the returned data to the original requester.
[0058] Traditional differential data processing can be found in [reference needed]. Figure 3 , Figure 3 This illustrates a differential data processing procedure, exemplarily. Figure 3 The differential data processing shown employs the LEACH protocol (Low Energy Adaptive Clustering Hierarchy). The basic idea of the LEACH protocol is to randomly select cluster head nodes in a cyclic manner, distributing the energy load of the entire network evenly to each sensor node, thereby reducing network energy consumption and improving the overall network lifetime.
[0059] Differential data processing (DDPM) is a data processing method that involves calculating the differences or variations between adjacent data points in a dataset. This method is commonly used for time series data, monitoring data, sensor data, and other fields to better understand data trends, changes, and patterns. This embodiment combines DDPM with an API gateway and designs a novel packetized data algorithm based on reference values. For ease of description, this algorithm is named Differential Data Processing with Median algorithm based on API Gateway (DDPM-API), and can be used for data requesting and processing in the oil, gas, and coal mining industries.
[0060] In the DDPM-API algorithm, considering that the data passes through multiple transmission nodes before reaching the API gateway, it is assumed that each transmission node can process the received data, rather than transmitting it all to the gateway for processing. Based on this, the DDPM-API algorithm proposed in this application employs a multi-reference value optimization method: First, the receiving node (e.g., SLB or Gateway) restores the data to its original state. Then, it clusters all the data using a clustering algorithm to obtain multiple highly cohesive clusters. Next, the clustering results of each cluster are packaged based on reference values before final transmission. This way, even in industrial networks such as those in the coal mining industry where there is a lot of highly diverse data, the DDPM-API algorithm can cluster highly correlated data together, effectively reducing the amount of data that each node needs to transmit.
[0061] It is important to note that each node in this application requires data clustering and reconstruction, making it more suitable for situations with continuous, concurrent requests over a period of time, or when a single request corresponds to a large amount of data. In practical applications, the computation of each node can be reduced based on the actual situation. For example, if only one request exists over a period of time, the intermediate nodes do not need to perform reconstruction and clustering processes; instead, they can directly pass the clustered and packaged data sequentially until it reaches the target node.
[0062] In the aforementioned industrial IoT data transmission method, data is compressed into smaller data packets through clustering and packaging, and then transmitted between nodes based on these data packets. This effectively reduces the amount of data transmitted, while the clustering method does not lose information and can reduce the burden on the transmission nodes.
[0063] In one exemplary embodiment, the clustering and packaging of the data to be processed includes:
[0064] The data to be processed is clustered to obtain multiple clustering results; data packets for each clustering result are generated, and the data packets for each clustering result are integrated to obtain the total data packet for the data to be processed.
[0065] Specifically, the mean-shift clustering algorithm can be used to cluster the data. Mean-shift clustering is a sliding window-based algorithm designed to discover dense regions of data points. This algorithm does not require pre-specifying the number of clusters; it automatically discovers the number of clusters through an iterative process, which is its main difference from algorithms such as K-means. The core idea of the mean-shift algorithm is to continuously update the position of data points during the iteration process, moving them towards denser regions until the convergence condition is met. After obtaining k clusters through the clustering algorithm, a data packet for each cluster result can be generated, and all cluster result data packets can be integrated into a total data packet for the data to be processed.
[0066] In one exemplary embodiment, the data packet for generating each clustering result includes:
[0067] For each clustering result, determine the median among the multiple unprocessed data under the clustering result; calculate the difference between the remaining unprocessed data under the clustering result (excluding the median) and the median; and generate a data packet of the clustering result based on the difference and the median.
[0068] Specifically, this step is applicable to differential processing of data, using the median of each cluster result as the baseline reference value for differential processing. For example, the median can be found based on the quicksort algorithm. After finding the median, the differences between the median and all other numbers in the cluster result are calculated. Each difference is represented in binary, and the total number of binary bits for each cluster is calculated. This leads to the calculation of the total number of binary bits for that node across k clusters, which represents the total data packet size.
[0069] Using the median as a benchmark can make the difference distribution more uniform. Furthermore, in the same clustering result, the differences between the other numbers and the median are smaller, and the number of bits corresponding to the difference in binary representation is also smaller, thus reducing the size of the data packet.
[0070] In an exemplary embodiment, the step of integrating the data packets of each clustering result to obtain the total data packet of the data to be processed includes: packaging the data packets of each clustering result, the class identifier (class ID) of each clustering result, and the node identifier (node ID) of the current node into a total data packet.
[0071] At this point, the data packet size has been significantly reduced compared to the original data and traditional differential data. See the table below for details:
[0072] Table 1:
[0073]
[0074] For example, this application provides a set of data, Table 1 shows the size of the request data packet without data processing, which is 391 bits;
[0075] Table 2:
[0076]
[0077] Table 2 shows the request data packet size using traditional differential data processing. The first data in each cluster ID in Table 2 is the cluster head node data, and the remaining data is the difference between the member node data and the cluster head data. In this case, the total data packet size is 371 bits, which is lower than that without processing.
[0078] Table 3:
[0079]
[0080] Table 3 shows the data packet sizes processed using the DDPM-API algorithm provided in this application. For ease of description, data from different classes are separated by semicolons, and the median is the value in the middle of the queue within a class. Specifically, the medians for cluster ID 1 are 126 and 372; for cluster ID 2, the medians are 5, 126, 247, 377, and 498; for cluster ID 3, the medians are 0, 79, 125, 255, 372, and 513; for cluster ID 4, the medians are -260, 0, 33, 125, 255, 377, 513, and 876; for cluster ID 5, the medians are -260, 0, 31, 63, 125, 255, 377, 513, and 876; for cluster ID 6, the median is 68; and for cluster ID 7, the median is 2. Table 3 shows that the data packet size processed by the DDPM-API algorithm is 234 bits, which is a significant improvement compared to the original data and traditional differential data processing. Furthermore, because this method does not actually change the data itself, but rather changes its representation, it can reduce the amount of data transmitted without information loss.
[0081] The DDPM-API algorithm proposed in this application selects the median of each cluster as the reference value. Compared with traditional differential data processing, which coarsely selects the first data value as the reference value, making the difference potentially exceed the data itself, selecting the median can make the difference distribution more uniform and further improve the reduction of data packets.
[0082] In an exemplary embodiment, restoring the packaged data includes:
[0083] For each clustering result covered by the packaged data, obtain the corresponding difference and median of the clustering result in the packaged data; based on the corresponding difference and median of the clustering result, restore the data to be processed under the clustering result.
[0084] Summing the median and the difference allows direct calculation of the corresponding data in the original data, enabling lossless restoration of the original data. Once all requests or data in the current batch arrive, the next round of clustering, packaging, and transmission can begin. If the current node receives multiple sets of data in batches, the restored data needs to be re-clustered to ensure that the data packet size remains small in each transmission round.
[0085] For example, the phrase "waiting for all requests or data in the current batch to arrive" refers to a situation where there are continuous, concurrent requests within a certain period, or a single request corresponding to a large amount of data. In practical applications, if only one request exists within a certain period, there is no need to wait or only a very short wait. Furthermore, the computation of nodes can be appropriately reduced depending on the amount of data requested and called. For example, when there is less data and requests to be transmitted, intermediate nodes do not need to perform the restoration and clustering process, but instead directly pass the clustered and packaged data sequentially until it reaches the target node.
[0086] In one exemplary embodiment, the method further includes:
[0087] If the target node is a server, and a non-target node on the transmission path receives a client request, the client request is authenticated. If the client request is successfully authenticated, the client request is forwarded to the server via the transmission path. If the client request fails authentication, a failure message is returned to the client.
[0088] For example, please see Figure 4 This embodiment employs an external authentication service to verify data security. When the API gateway receives a client request, it forwards the request to the external authentication service and determines whether to allow the request based on the service's response. This mechanism allows the authentication logic to be independent of the API gateway, thereby enabling more flexible and scalable security policies. Users can configure the third-party authentication service address, forwarding request headers, response content, request methods, etc., on this API, and can also support custom response content when authentication fails.
[0089] For example, external authentication services can use the forward-auth external identity authentication routing strategy. Forward Auth is a mechanism that delegates authentication and authorization functions to an external service. The workflow of forward-auth is as follows:
[0090] Request interception: When a client request arrives at the APISIX gateway, Forward Auth will intercept it first.
[0091] Forward Request: Forwards the intercepted request information to the configured external authentication service.
[0092] Authentication response: The external service processes the request and returns a response, which is usually an HTTP response containing the authentication result.
[0093] Decision: Based on the response from the external service, Forward Auth decides whether to allow the original request to pass. If authentication succeeds, the request is forwarded to the backend service via the transport path; if authentication fails, a corresponding error response is returned to the client.
[0094] To illustrate the industrial IoT data transmission method in detail, the following is a detailed embodiment:
[0095] The main idea of the DDPM-API algorithm proposed in this application is to reduce the size of data packets requesting the server by using clustering and selecting the median differential data transmission. The DDPM-API method mainly consists of the following steps:
[0096] For each SLB or Gateway, a clustering algorithm is used to cluster the requested data. After clustering, the median of each cluster is selected as the benchmark value, and the differences between the other values in the cluster and the median are calculated.
[0097] The processed data is then passed to the next node, which in turn receives the data packet and restores it to its original form.
[0098] After waiting for a period of time until all requests reach the node (including requests within a certain period or a large amount of data corresponding to a single request), the clustering process is executed again, and then the data is sent to the next node until the data is sent to the server / client. The detailed implementation process of each step is shown below.
[0099] The mean-shift clustering algorithm is used to cluster the data. The pseudocode for the algorithm is as follows:
[0100] 1:BEGIN
[0101] 2:shift=0
[0102] 3: FOR each data point DO
[0103] 4:FLAG[ ] = false
[0104] 5:S(x)=
[0105] 6:END FOR
[0106] 7: Randomly select a data point as the center point.
[0107] 8:WHILE data Its FLAG[ ] = false DO
[0108] 9: While shift DO
[0109] 10:FOR Each data DO
[0110] 11:
[0111] 12:
[0112] 13:FLAG[j]=true
[0113] 14: END FOR
[0114] 15: FOR each data point DO
[0115] 16:
[0116] 17:END FOR
[0117] 18:center = center + shift
[0118] 19:WHEN There are multiple overlapping sliding windows DO
[0119] 20: Retain the window containing the most data points
[0120] 21:END WHEN
[0121] 22:END WHILE
[0122] 23:END WHILE
[0123] 24:END / / End.
[0124] After obtaining k clusters using a clustering algorithm at each node, select C from each cluster. i The median M i Then calculate the differences between the other data points and the median. Use the quicksort algorithm:
[0125] Algorithm 2: Selecting the median using the quicksort algorithm:
[0126] 1:BEGIN
[0127] 2: Partition(A[low...high]): / / Partition function, all elements on the left side of the array are not greater than the pivot, and all elements on the right side are not less than the pivot.
[0128] 3: l = low, h = high
[0129] 4: pivot = A[low]
[0130] 5: REPEAT
[0131] 6: REPEAT l=l+1 UNTIL A[l] pivot
[0132] 7: REPEAT h = h - 1 UNTIL A[h] pivot
[0133] 8: UNTIL
[0134] 9:swap(A[l],A[h])
[0135] 10:swap(A[low],A[h])
[0136] 11:RETURN h
[0137] 12:FindMedian(A[low...high]): / / Divide and conquer to find the median
[0138] 13:m=Partition(A[low...high])
[0139] 14:IF m== THEN
[0140] 15:RETURN A[ ]
[0141] 16:END IF
[0142] 17:IF m> THEN
[0143] 18:Partition(A,low,m-1)
[0144] 19:ELSE Partition(A,m+1,high)
[0145] 20:END IF
[0146] 21:END / / End.
[0147] Based on the above algorithm, class C is found. i The median M i Then, calculate the other numbers C in the class. i j The difference between the median and the data type. Represent each difference in binary and calculate the total number of binary bits for each node within that category, i.e., the total data packet size S. i .
[0148] Algorithm 4: Processing data within nodes:
[0149] 1:BEGIN
[0150] 2:Sum=0
[0151] 3: Use the mean-shift clustering algorithm to obtain k clusters from the nodes.
[0152] 4: FOR Each class DO
[0153] 5: = FindMedian(A[low...high])
[0154] 6: FOR class Each data in ( ) DO
[0155] 7:
[0156] 8:END FOR
[0157] 9: Calculation Category Total data packet size
[0158] 10: Sum = Sum +
[0159] 11:END FOR
[0160] 12:END / / End.
[0161] Finally, after a period of time, the requested data arrives at the node, is first restored to its original form, and then proceeds to the next round of clustering, packaging, and transmission.
[0162] Algorithm 4: Restore the data to its original state:
[0163] 1:BEGIN
[0164] 2: FOR at each node transmitting through the API gateway DO
[0165] 3:WHEN The data packets (DO) sent by the previous API request have been collected.
[0166] 4: Each class in the FOR node DO
[0167] 5: FOR class Each data in ( ) DO
[0168] 6:
[0169] 7:END FOR
[0170] 8:END FOR
[0171] 9:END WHEN
[0172] 10:END FOR
[0173] 11:END / / End.
[0174] Therefore, the overall DDPM-API algorithm can be summarized as follows:
[0175] Algorithm 5: DDPM-API Algorithm:
[0176] 1:BEGIN
[0177] 2: WHILE node Not the target node (DO) / / The target node is the server or client
[0178] 3: FOR each node transmitting in the API gateway DO
[0179] 4: Process the data collected from the previous nodes and restore it to the original data.
[0180] 5: Processing Nodes Data within
[0181] 6: Pack the median and difference along with the node ID and class ID and send them to the next node NN.
[0182] 7: =NN
[0183] 8:END FOR
[0184] 9:END WHILE
[0185] 10:END / / End.
[0186] The DDPM-API algorithm employs a multi-reference value optimization method. First, the receiving SLB or Gateway restores the data to its original form. Then, a clustering algorithm is used to cluster all the data, resulting in multiple clusters with high cohesion. The median of each cluster is then selected as the reference value for differential processing. Finally, differential data processing techniques are used for transmission. This way, even in industrial networks such as those in the coal mining industry, where there is a lot of highly variable data, the DDPM-API algorithm can cluster highly correlated data together, effectively reducing the amount of data that nodes need to transmit.
[0187] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0188] Based on the same inventive concept, this application also provides an industrial IoT data transmission device for implementing the industrial IoT data transmission method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the industrial IoT data transmission device provided below can be found in the limitations of the industrial IoT data transmission method described above, and will not be repeated here.
[0189] In one exemplary embodiment, such as Figure 5 As shown, an industrial Internet of Things (IoT) data transmission device is provided, comprising: a first transmission module 501, a second transmission module 502, and a restoration module 503, wherein:
[0190] The first transmission module 501 is used to cluster and package the data to be processed for the first node on the transmission path from multiple nodes to the target node, and then transmit the packaged data to the next node after the first node.
[0191] The second transmission module 502 is used to restore the packaged data transmitted by the previous node for non-first nodes on the transmission path, cluster and package the restored data, and transmit the packaged data to the next node that is not the first node.
[0192] The restoration module 503 is used to restore the currently packaged data after the data to be processed has been transmitted to the target node; wherein the target node is a server or a client.
[0193] The first transmission module 501 is also used for:
[0194] Cluster the data to be processed to obtain multiple clustering results for the data to be processed.
[0195] Generate data packets for each clustering result, integrate the data packets for each clustering result, and obtain the total data packet for the data to be processed.
[0196] The first transmission module 501 is also used for:
[0197] For each clustering result, determine the median of the multiple data points to be processed under that clustering result;
[0198] Calculate the difference between the remaining unprocessed data (excluding the median) and the median in the clustering results;
[0199] The data packet representing the clustering result is generated based on the difference and the median.
[0200] The first transmission module 501 is also used for:
[0201] Pack the data packets of each clustering result, the class identifier of each clustering result, and the node identifier of the current node into a total data packet.
[0202] The second transmission module 502 is also used for:
[0203] For each clustering result covered by the packaged data, obtain the corresponding difference and median of the clustering result in the packaged data;
[0204] Based on the difference and median of the clustering results, the data to be processed under the clustering results are restored.
[0205] Industrial IoT data transmission devices also include:
[0206] The verification module is used for:
[0207] If the target node is a server, and a non-target node on the transmission path receives a client request, the client request is authenticated.
[0208] If the client request passes authentication, the client request is forwarded to the server via the transmission path;
[0209] If the client request fails authentication, a failure message will be returned to the client.
[0210] Each module in the aforementioned industrial IoT data transmission device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0211] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements an industrial Internet of Things (IoT) data transmission method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0212] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0213] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0214] For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0215] For non-first nodes on the transmission path, the packaged data transmitted by the previous node is restored, the restored data is clustered and packaged, and the packaged data is transmitted to the next node that is not the first node.
[0216] After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client.
[0217] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0218] For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0219] For non-first nodes on the transmission path, the packaged data transmitted by the previous node is restored, the restored data is clustered and packaged, and the packaged data is transmitted to the next node that is not the first node.
[0220] After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client.
[0221] For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node;
[0222] For non-first nodes on the transmission path, the packaged data transmitted by the previous node is restored, the restored data is clustered and packaged, and the packaged data is transmitted to the next node that is not the first node.
[0223] After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client.
[0224] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0225] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0226] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0227] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An industrial Internet of Things (IoT) data transmission method, characterized in that, The method includes: For a transmission path that leads to a target node via multiple nodes, for the first node on the transmission path, the data to be processed is clustered and packaged, and the packaged data is transmitted to the next node after the first node; For a non-first node on the transmission path, if the non-first node receives multiple sets of packaged data transmitted by the previous node in batches, the multiple sets of data are restored respectively, the restored data are re-clustered and packaged as a whole, and the packaged data is transmitted to the next node of the non-first node. After the data to be processed is transmitted to the target node, the currently packaged data is restored; wherein, the target node is a server or a client. The clustering and packaging process includes: clustering the data to be processed to obtain multiple clustering results; for each clustering result, determining the median of the multiple data to be processed under the clustering result, calculating the difference between the remaining data to be processed under the clustering result (excluding the median) and the median, generating a data packet of the clustering result based on the difference and the median; and integrating the data packets of each clustering result to obtain a total data packet of the data to be processed.
2. The method according to claim 1, characterized in that, The process of integrating the data packets from each clustering result to obtain the total data packet of the data to be processed includes: Pack the data packets of each clustering result, the class identifier of each clustering result, and the node identifier of the current node into a total data packet.
3. The method according to claim 1, characterized in that, Restoring the packaged data includes: For each clustering result covered by the packaged data, obtain the corresponding difference and median of the clustering result in the packaged data; Based on the difference and median of the clustering results, the data to be processed under the clustering results are restored.
4. The method according to claim 1, characterized in that, The method further includes: If the target node is a server, and a non-target node on the transmission path receives a client request, the client request is authenticated. If the client request passes authentication, the client request is forwarded to the server via the transmission path; If the client request fails authentication, a failure message will be returned to the client.
5. An industrial Internet of Things (IoT) data transmission device, characterized in that, The device includes: The first transmission module is used to cluster and package the data to be processed for the first node on the transmission path from multiple nodes to the target node, and then transmit the packaged data to the next node after the first node. The second transmission module is used to, for non-first nodes on the transmission path, if the non-first node receives multiple sets of packaged data transmitted by the previous node in batches, restore the multiple sets of data respectively, re-cluster and repackage the restored data as a whole, and transmit the packaged data to the next node of the non-first node. The restore module is used to restore the currently packaged data after the data to be processed has been transmitted to the target node; wherein the target node is a server or a client. The clustering and packaging process includes: clustering the data to be processed to obtain multiple clustering results; for each clustering result, determining the median of the multiple data to be processed under the clustering result, calculating the difference between the remaining data to be processed under the clustering result (excluding the median) and the median, generating a data packet of the clustering result based on the difference and the median; and integrating the data packets of each clustering result to obtain a total data packet of the data to be processed.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Data transmission method and device, electronic device and storage medium
CN109194647A
Time sequence data compression method and device, wearable intelligent equipment and storage medium
CN115118788A