Serial gateway data real-time processing method and device fusing edge computing
By integrating edge computing into the serial port gateway, data is parsed and dynamic transmission scheduling strategies are generated, solving the problems of transmission delay and bandwidth waste caused by changes in the network environment, and achieving high efficiency and stability in data transmission.
Patent Information
- Application Number
- CN202510894734.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2045-06-30
AI Technical Summary
Existing serial gateway data transmission methods have failed to effectively adapt to complex and ever-changing network environments, resulting in increased transmission latency, higher packet loss rates, and wasted network bandwidth resources.
By adopting the method of fusion edge computing, serial port device data is parsed into real-time critical data, non-real-time critical data and non-critical redundant data, and a dynamic transmission scheduling strategy is generated. Real-time critical data is prioritized for transmission, and buffering and scheduling are performed according to real-time network parameters to make reasonable use of bandwidth.
While ensuring timely transmission of critical real-time data, the caching and transmission strategies for non-critical and non-critical redundant data are dynamically adjusted to reduce transmission latency and packet loss rate, thereby improving data transmission efficiency and stability.
Smart Images

Figure CN120675837B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method and apparatus for real-time data processing of a serial port gateway that integrates edge computing. Background Technology
[0002] In IoT applications, serial gateways serve as crucial hubs connecting traditional serial devices to the network, undertaking the vital task of efficiently transmitting data from these devices to the network. Existing serial gateway data transmission methods typically employ fixed data acquisition frequencies and transmission strategies, directly packaging data generated by serial devices and sending it over the network to the cloud or server. However, because they fail to consider dynamic changes in the network environment and the real-time characteristics of the data, network congestion leads to increased transmission latency and packet loss rates due to the accumulation of large amounts of data. Furthermore, transmitting non-critical redundant data at a fixed frequency wastes network bandwidth resources. Therefore, a new serial gateway data transmission method is urgently needed to adapt to complex and ever-changing network environments and improve data transmission efficiency and stability. Summary of the Invention
[0003] This invention provides a method and apparatus for real-time data processing of a serial port gateway that integrates edge computing, in order to improve the efficiency and stability of data transmission.
[0004] In a first aspect, the present invention provides a method for real-time data processing of a serial port gateway that integrates edge computing, comprising:
[0005] The serial gateway data sent by the serial port device is parsed to obtain real-time critical data, non-real-time critical data, and non-critical redundant data; the importance of the real-time critical data, the non-real-time critical data, and the non-critical redundant data decreases in that order.
[0006] Send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters;
[0007] The real-time critical data is sent to the target server through the transmission link network, and the non-real-time critical data and the non-critical redundant data are cached based on the data caching strategy.
[0008] A dynamic transmission scheduling strategy is generated based on the real-time network parameters and the amount of cached data. Based on the dynamic transmission scheduling strategy, the non-real-time critical data and the non-critical redundant data are transmitted to the target server through the transmission link network.
[0009] In a second aspect, the present invention also provides a real-time data processing device for a serial port gateway that integrates edge computing, applied to the real-time data processing method for a serial port gateway that integrates edge computing as described in the first aspect; the real-time data processing device for a serial port gateway that integrates edge computing includes:
[0010] The data parsing module is used to parse the serial gateway data sent by the serial port device to obtain real-time key data, non-real-time key data, and non-key redundant data; the data importance of the real-time key data, the non-real-time key data, and the non-key redundant data decreases in that order.
[0011] The network monitoring module is used to send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters.
[0012] The data transmission module is used to send the real-time critical data to the target server through the transmission link network, and to cache the non-real-time critical data and the non-critical redundant data based on the data caching strategy.
[0013] The transmission scheduling module is used to generate a dynamic transmission scheduling strategy based on the real-time network parameters and the amount of cached data, and to transmit the non-real-time critical data and the non-critical redundant data to the target server through the transmission link network based on the dynamic transmission scheduling strategy.
[0014] Thirdly, the present invention also provides an electronic device, comprising: a memory for storing computer software programs; and a processor for reading and executing the computer software programs, thereby realizing the real-time data processing method for serial port gateways in converged edge computing as described above.
[0015] Fourthly, the present invention also provides a non-transitory computer-readable storage medium storing a computer software program, which, when executed by a processor, implements the real-time data processing method for serial port gateways in converged edge computing as described above.
[0016] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the real-time data processing method for serial port gateways that integrates edge computing as described above.
[0017] The real-time data processing method for serial port gateways integrating edge computing provided in this invention prioritizes the transmission of real-time critical data. It generates a data caching strategy based on real-time network parameters to cache non-real-time critical data and non-critical redundant data. This ensures timely transmission of important real-time critical data while dynamically adjusting the transmission strategy based on real-time network parameters to cache non-real-time critical data and non-critical redundant data, preventing data accumulation that could lead to transmission delays and packet loss. Furthermore, a dynamic transmission scheduling strategy is generated based on real-time network parameters and the amount of cached non-critical data, allowing for dynamic transmission scheduling of non-critical data. This ensures that bandwidth is used efficiently to transmit cached non-critical data when network parameters permit. Therefore, it effectively adapts to complex and ever-changing network environments, reduces transmission delays and packet loss rates, and makes rational use of network bandwidth resources, thereby improving the efficiency and stability of data transmission. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the real-time data processing method for a serial port gateway that integrates edge computing, as provided in an embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram of the structure of the serial port gateway data real-time processing device for fused edge computing provided in an embodiment of the present invention;
[0020] Figure 3 An embodiment diagram of the electronic device provided in this invention;
[0021] Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0024] In the description of this invention, the term "for example" is used to mean "used as an example, illustration, or description." Any embodiment described as "for example" in this invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use the invention. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that the invention can be made without using these specific details. In other instances, well-known structures and processes will not be described in detail to avoid obscuring the description of the invention with unnecessary detail. Therefore, the invention is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed herein.
[0025] Optional, see below Figure 1 , Figure 1 This is a flowchart illustrating the real-time data processing method for a serial port gateway integrating edge computing provided by the present invention. In this embodiment of the invention, the executing entity of the real-time data processing method for a serial port gateway integrating edge computing is a data processing device. Therefore, the real-time data processing method for a serial port gateway integrating edge computing includes:
[0026] Step 10: Parse the serial gateway data sent by the serial port device to obtain real-time critical data, non-real-time critical data, and non-critical redundant data. The importance of the real-time critical data, non-real-time critical data, and non-critical redundant data decreases in that order.
[0027] Optionally, the data processing device receives serial gateway data sent by a serial port device. This serial gateway data is typically encapsulated in a specific protocol format. Therefore, the data processing device needs to identify the protocol type of the data and then split, decode, and extract the serial gateway data according to the rules of the corresponding protocol. During the parsing process, based on the timeliness and importance of the data, it is classified into real-time critical data, non-real-time critical data, and non-critical redundant data. In this embodiment of the invention, real-time critical data refers to data that has an immediate impact on system operation status and decision-making, and must be processed and transmitted immediately. Non-real-time critical data, while not requiring immediate processing, is of great importance to overall data integrity and analysis. Non-critical redundant data exists for backup or auxiliary analysis and has relatively low importance.
[0028] In one embodiment, in an industrial automation monitoring scenario, a serial port device is responsible for collecting data from multiple sensors on the production line. The serial port gateway data includes temperature sensor data, pressure sensor data, equipment operating status indicators, and equipment operation log records. After receiving the data, the data processing device identifies that the data uses the Modbus RTU protocol. According to the protocol rules, the data is parsed. The temperature sensor collects data once per second, which is directly related to temperature control in the production process and is considered real-time critical data. The pressure sensor collects average pressure data once per hour, which is important for long-term analysis of the production process and is considered non-real-time critical data. The equipment operation log records are mainly used for auxiliary reference during troubleshooting and are considered non-critical redundant data.
[0029] Step 20: Send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters.
[0030] Furthermore, the data processing device periodically sends probe packets to the edge computing transmission link network. These probe packets contain specific identifiers and timestamps. Upon receiving the probe packets, the transmission link network, based on its own network status, feeds back network bandwidth trend data within a preset time series and real-time network latency jitter values to the data processing device.
[0031] Furthermore, after receiving the real-time network parameters, the data processing device generates a data caching strategy based on the real-time network parameters, as described in steps 201 to 205.
[0032] Step 30: Send real-time critical data to the target server through the transmission link network, and cache non-real-time critical data and non-critical redundant data based on the data caching strategy.
[0033] Furthermore, the data processing device prioritizes encapsulating real-time critical data according to the protocol format supported by the transmission link network, and then sends it to the target server via the transmission link network. During the transmission of real-time critical data, the data transmission status is monitored in real time to ensure that the data arrives at the target server intact and accurately. Simultaneously, non-real-time critical data and non-critical redundant data are cached according to a data caching strategy.
[0034] Continuing with the above embodiments, in an industrial automation monitoring scenario, the data processing device encapsulates the parsed real-time temperature sensor data (real-time critical data) into data packets according to the TCP / IP protocol and sends them to the target server (such as the factory's central monitoring system server) via a transmission link network. During transmission, retransmission and verification mechanisms are set to ensure the reliability of data transmission. For pressure sensor data (non-real-time critical data) and equipment operation log records (non-critical redundant data), they are stored in the local solid-state drive cache space according to the data caching strategy generated in step 20.
[0035] Step 40: Generate a dynamic transmission scheduling strategy based on real-time network parameters and cached data volume, and transmit non-real-time critical data and non-critical redundant data to the target server through the transmission link network based on the dynamic transmission scheduling strategy.
[0036] Furthermore, the data processing device generates a dynamic transmission scheduling strategy based on the real-time acquired network parameters (network bandwidth trends and real-time network latency jitter values) and the current amount of cached data, as described in steps 401 to 404. Further, the data processing device transmits non-real-time critical data and non-critical redundant data to the target server via the transmission link network according to the dynamic transmission scheduling strategy, as described in steps 405 to 408.
[0037] This invention prioritizes the transmission of real-time critical data and generates a data caching strategy based on real-time network parameters to cache non-real-time critical data and non-critical redundant data. This ensures timely transmission of important real-time critical data while dynamically adjusting the transmission strategy based on real-time network parameters to cache non-real-time critical data and non-critical redundant data, preventing data accumulation that could lead to transmission delays and packet loss. Furthermore, a dynamic transmission scheduling strategy is generated based on real-time network parameters and the amount of cached non-critical data, allowing for dynamic transmission scheduling of non-critical data. This ensures that bandwidth is used efficiently to transmit cached non-critical data when network parameters permit. Therefore, this invention effectively adapts to complex and ever-changing network environments, reduces transmission delays and packet loss rates, and makes rational use of network bandwidth resources, thereby improving the efficiency and stability of data transmission.
[0038] In one embodiment, steps 201 to 205 include:
[0039] Step 201: Based on the network bandwidth trend, predict the predicted bandwidth of the transmission link network at the current time, and based on the actual bandwidth and predicted bandwidth of the transmission link network at the current time, determine the traffic pattern.
[0040] Optionally, the data processing device employs time series analysis algorithms (such as the ARIMA model) to predict the bandwidth of the transmission link network at the current time based on historical network bandwidth data. Perform calculations to obtain the actual bandwidth of the transmission link network at the current time. Calculate the bandwidth difference between the actual bandwidth and the predicted bandwidth. Set the preset quantity multiplier. ,like If so, the traffic pattern is determined to be a traffic mutation pattern; if If the actual bandwidth is not significantly different from the predicted bandwidth, it is considered to be in a stable traffic mode. This process quickly identifies sudden changes or stable states in network traffic by accurately comparing the actual and predicted bandwidth.
[0041] Continuing in the industrial automation monitoring scenario, the data processing device acquires network bandwidth data from the past 24 hours (one data point every 5 minutes) and uses the ARIMA(1,1,1) model to predict the network bandwidth at the current time. =6Mbps, actual measured network bandwidth at the current time. =4Mbps, calculate the bandwidth difference. =2Mbps. Due to the preset quantity multiplier. =0.3, =1.8Mbps, The data processing device determines that the current traffic pattern is a traffic mutation pattern.
[0042] Step 202: Based on the amount of non-real-time critical data and non-critical redundant data generated per unit time, determine the data generation rate of each type of data, and calculate the cumulative data amount of each type of data within a preset time under different network conditions based on the data generation rate of each type of data, and determine the cache requirement space area.
[0043] Furthermore, the data processing device statistically analyzes the amount of non-real-time critical data and non-critical redundant data generated per unit time (e.g., 1 hour) and calculates the data generation rate for each type of data. ( Indicates data category, =1 indicates non-real-time critical data. =2 represents non-critical redundant data). Using the formula... ( For the first Class data in time The cumulative data volume within the time frame), calculate the data volume of each type under different network conditions within a preset time (e.g., The cumulative data volume within 12 hours is used to determine the cache space requirement area, which is the storage space size corresponding to the sum of the cumulative data volumes of various types of data.
[0044] Continuing with the aforementioned industrial scenario, data processing equipment statistics revealed that the hourly generation of non-real-time critical data (pressure sensor data) is 50MB. Therefore, its data generation rate... =50MB / h; Non-critical redundant data (equipment operation log records) is generated at a rate of 30MB / h per hour. =30MB / h. Based on the network bandwidth trend prediction that the network conditions will remain unchanged for the next 12 hours, the cumulative data volume of non-real-time key data over 12 hours is calculated using a formula. =600MB, the cumulative amount of non-critical redundant data over 12 hours =360MB), the cache space required is 600+360=960MB.
[0045] Step 203: If the traffic pattern is a traffic mutation pattern, determine the cache area for each type of data based on the data generation rate and data importance. The sum of the cache areas for each type of data is the cache requirement space area. The traffic pattern includes the traffic mutation pattern, which indicates that the bandwidth difference between the actual bandwidth and the predicted bandwidth is greater than or equal to a preset multiple of the predicted bandwidth.
[0046] Furthermore, when the traffic pattern is a traffic mutation pattern, the data generation rate of each type of data is used as the basis. And data importance (importance coefficient of non-real-time key data) =0.7, Importance coefficient of non-critical redundant data =0.3), using the formula ( For the first Cache area for class data, Calculate the cache area for each type of data (to meet the cache requirement space area) to ensure that important data has more sufficient cache space, and that the sum of the cache areas for each type of data equals the cache requirement space area.
[0047] In one embodiment, it is known that under a traffic mutation mode, the cache demand space area =960MB, =50MB / h, =0.7, =30MB / h, =0.3. Calculate the cache area for non-real-time critical data. =712MB, cache area for non-critical redundant data =960-712=248MB.
[0048] Step 204: Based on the cache area and data generation rate of each type of data, calculate the cache filling time required to fill the corresponding cache area for each type of data, and determine the cache overflow risk of each type of data based on the cache filling time and cache overflow risk sensitivity coefficient of each type of data.
[0049] Furthermore, the data processing device determines the cache area for each type of data. and data generation rate Through formula ( For the first Calculate the cache fill time (the time required to fill the corresponding cache area with class data). Set a cache overflow risk sensitivity factor. (If not real-time critical data) =1.2, non-critical redundant data =0.8), using the formula Calculate the cache overflow risk for each type of data to quantify the likelihood of different types of data facing cache overflow.
[0050] Continuing with the above embodiments, for non-real-time critical data, =712MB, =50MB / h, cache fill time =712 / 50=14.24h =1.2, risk of cache overflow =0.084; For non-critical redundant data, =248MB =30MB / h, cache fill time =248 / 30=8.27h =0.8, risk of cache overflow =0.097.
[0051] Step 205: Generate a data caching strategy based on the cache overflow risk of each type of data.
[0052] Furthermore, the data processing device generates a data caching strategy based on the cache overflow risk of each type of data, as described in steps 2051 to 2053.
[0053] The embodiments of the present invention can accurately sense changes in network traffic. When traffic changes suddenly occur, critical data is prioritized for caching, effectively reducing the risk of cache overflow. At the same time, the caching strategy is dynamically adjusted according to the risk to ensure that data can be reasonably cached and transmitted even when the network is unstable. This improves the adaptability and stability of the data processing system to changes in the network environment and reduces data loss or transmission delays caused by network fluctuations.
[0054] In one embodiment, steps 2051 to 2053 include:
[0055] Step 2051: If the first cache overflow risk of non-real-time critical data is greater than the second cache overflow risk of non-critical redundant data, the data caching strategy is as follows: prioritize caching non-real-time critical data, continue to store newly generated non-real-time critical data in the first cache area before the first cache area is filled, and then start storing non-critical redundant data based on the second cache area after the first cache area is filled.
[0056] Optionally, the data processing device acquires non-real-time critical data, posing a first risk of buffer overflow. Second cache overflow risk of non-critical redundant data Compare the two. If > If non-real-time critical data is deemed to face a higher risk of cache overflow, then to avoid the loss of important data, priority is given to caching non-real-time critical data. The data processing device continuously stores newly generated non-real-time critical data into the first cache area until the area is completely filled, and only then does it begin to use the second cache area to store non-critical redundant data, thereby ensuring that critical data has sufficient cache space.
[0057] Continuing in the industrial automation monitoring scenario, the data processing device calculates the first buffer overflow risk of non-real-time critical data (pressure sensor data). =0.12, a second buffer overflow risk for non-critical redundant data (device operation log records). =0.08, because > The data processing device executes the corresponding strategy. The first buffer area is 800MB in size, and the second buffer area is 400MB in size. Newly generated pressure sensor data is continuously stored in the first buffer area. Only after the first buffer area is filled with 800MB of data will the device operation log data be stored in the second buffer area.
[0058] Step 2052: If the first cache overflow risk is less than or equal to the second cache overflow risk, and the first cache area is smaller than the second cache area, then the generated data caching strategy is as follows: Prioritize caching non-critical redundant data. When the cache reaches a preset proportion of the second cache area, pause the caching of non-critical redundant data and begin caching non-real-time critical data. Continue caching of non-critical redundant data until the non-real-time critical data caching is complete. The preset proportion is determined based on the size of the first and second cache areas.
[0059] Furthermore, when the data processing device determines And the size of the first cache region Smaller than the size of the second cache region In this case, non-critical redundant data is cached first. To balance the caching needs of the two types of data and avoid non-critical redundant data from excessively occupying cache space, which could prevent non-real-time critical data from being cached properly, a mechanism based on... and preset ratio Non-critical redundant data is cached in the second cache area to reach a preset proportion. When this happens, pause caching of this type of data and start caching non-real-time critical data instead. Once the non-real-time critical data caching is complete, resume caching of non-critical redundant data.
[0060] Continuing with the above scenario, the first risk of cache overflow for non-real-time critical data =0.07, risk of second cache overflow for non-critical redundant data =0.09, First cache area size =300MB, second cache area size =600MB, calculate preset ratio =0.5. The data processing device first stores the equipment operation log data into the second buffer area. When the second buffer area contains 600*0.5=300MB of data, the caching of the equipment operation log data is paused, and the pressure sensor data is started to be stored into the first buffer area. After the first buffer area is filled with 300MB of pressure sensor data, the equipment operation log data is stored into the second buffer area.
[0061] Step 2053: If the first cache overflow risk is less than or equal to the second cache overflow risk, and the first cache area is larger than the second cache area, then the data caching strategy is as follows: prioritize caching non-critical redundant data. After the second cache area is filled, start storing non-real-time critical data into the first cache area until the first cache area is filled. Then continue to cache newly generated non-critical redundant data into the second cache area.
[0062] Furthermore, if the data processing device determines ,and > If non-critical redundant data is cached first, it is stored in the second cache area. Once the second cache area is full, the first cache area is used to store non-real-time critical data until the first cache area is also full. After that, newly generated non-critical redundant data continues to be stored in the second cache area, which has been partially cleared. In this way, while ensuring the caching of non-critical redundant data, the larger first cache area is fully utilized to store non-real-time critical data, thereby improving the utilization rate of cache space.
[0063] Continuing with the aforementioned risks of buffer overflows in non-real-time critical data within industrial scenarios... =0.06, risk of second cache overflow for non-critical redundant data =0.08. First cache area size =700MB, second cache area size =300MB. The data processing device first stores the equipment operation log data into the second buffer area. When the second buffer area is filled with 300MB of data, it starts storing the pressure sensor data into the first buffer area. When the first buffer area is filled with 700MB of pressure sensor data, the newly generated equipment operation log data is stored into the second buffer area again.
[0064] This invention, through a comprehensive assessment of the cache overflow risk of non-real-time critical data and non-critical redundant data, as well as the size of the cache area, formulates a differentiated data caching strategy. This allows for the dynamic and reasonable allocation of cache space based on the actual data situation, prioritizing the storage of high-risk data. Simultaneously, it achieves a balance between the two types of data caching when the cache area sizes differ, effectively reducing the risk of data cache overflow, improving the utilization efficiency of cache space, and ensuring the validity of data during the caching process.
[0065] In one embodiment, steps 206 to 208 include:
[0066] Step 206: If the traffic mode is stable, then divide the cache demand space area into a third cache area and a fourth cache area of equal size.
[0067] Optionally, the data processing device determines the traffic pattern to be a stable traffic pattern (bandwidth difference). Less than the predicted bandwidth preset quantity times Then, the previously calculated cache requirement space area is... The buffer is divided into two equal-sized regions to form the third cache region. and the fourth cache area .
[0068] Continuing in the industrial automation monitoring scenario, the data processing device determines in step 201 that the current flow is stable. The previously calculated buffer requirement area... Divide the 1000MB cache into equal parts to obtain the third cache region. =500MB, fourth cache area =500MB.
[0069] Step 207: If the first data generation rate of non-real-time critical data is greater than the second data generation rate of non-critical redundant data, the data generation caching strategy is as follows: cache the non-real-time critical data in the third cache area until the first data generation rate and the second data generation rate are equal, then cache the non-real-time critical data in the third cache area and cache the non-critical redundant data in the fourth cache area.
[0070] Furthermore, the data processing device acquires the first data generation rate of non-real-time key data. Second data generation rate of non-critical redundant data ,when > In such cases, non-real-time critical data should be cached in the third cache area first. Continuous monitoring is required. and When the two are equal, interleaved caching is used, that is, a certain amount (which can be set to a fixed data block size) is cached each time. After non-real-time critical data is cached in the third cache area, an equal amount of non-critical redundant data is cached in the fourth cache area, and this cycle continues until the caching operation is complete. This strategy ensures that non-real-time critical data is cached first, while dynamically adjusting according to changes in the data generation rate to achieve a balance between the two types of data caching.
[0071] Continuing with the above scenario, the first data generation rate of non-real-time critical data =60MB / h, the second data generation rate for non-critical redundant data =30MB / h, because > The data processing device first stores the pressure sensor data into the third buffer area. During the caching process, as the system runs, Gradually decrease, when Reduced to 30MB / h and When they are equal, set a fixed data block size. =10MB. The data processing device first caches 10MB of pressure sensor data in the third cache area, then caches 10MB of device operation log data in the fourth cache area, and continuously alternates between caching operations.
[0072] Step 208: If the first data generation rate of non-real-time critical data is less than the second data generation rate of non-critical redundant data, the non-critical redundant data is cached in the fourth cache area. When the second data generation rate is less than or equal to the preset rate threshold, the non-real-time critical data is cached in the third cache area until the non-real-time critical data is completely cached, and then the non-critical redundant data is cached in the fourth cache area.
[0073] Furthermore, when the data processing device determines < Non-critical redundant data is prioritized for caching in the fourth cache area. Simultaneously, the second data generation rate is continuously monitored. ,when Less than or equal to the preset rate threshold When the non-real-time critical data is generated, it is first cached in the third cache area until all non-real-time critical data is cached. Then, the remaining non-critical redundant data is cached in the fourth cache area. In this way, non-critical redundant data is processed first when the generation rate is high, and when the rate drops to a certain level, the caching of non-real-time critical data is guaranteed in a timely manner to avoid it being back up for a long time.
[0074] Continuing with the aforementioned industrial scenarios, the first data generation rate of non-real-time critical data =20MB / h, the second data generation rate for non-critical redundant data =50MB / h), due to < The data processing device first stores the equipment operation log data into the fourth cache area. A preset rate threshold is then set. =30MB / h, when As the system speed drops to 30MB / h, the data processing device begins to store pressure sensor data in the third cache area. After all the pressure sensor data has been cached, the device operation log data will then be stored in the fourth cache area.
[0075] In a stable traffic mode, this invention rationally divides the cache area and formulates different caching strategies based on the differences in the data generation rates of non-real-time critical data and non-critical redundant data. This allows for full utilization of the stable network environment and flexible and balanced allocation of cache space according to the dynamic changes in data generation. This ensures the caching priority of critical data while avoiding excessive caching of cache resources by a certain type of data, effectively improving the utilization efficiency of cache space, reducing the risk of data cache conflicts and loss, and ensuring that data can be stored in an orderly manner under stable network conditions.
[0076] In one embodiment, steps 401 to 404 include:
[0077] Step 401: Determine the real-time network status based on real-time network parameters.
[0078] Optionally, the data processing device determines the real-time network status at the current time based on real-time network parameters. The real-time network status includes a first state, a second state, and a third state. The first state indicates that the network latency jitter value is greater than or equal to a first jitter threshold. The second state indicates that the network latency jitter value is greater than or equal to a second jitter threshold but less than a first jitter threshold. The third state indicates that the network latency jitter value is less than a second jitter threshold.
[0079] Step 402: If the real-time network status is in the first state, the dynamic transmission scheduling strategy is generated as follows: no data transmission operation is performed.
[0080] Furthermore, when the data processing device determines that the real-time network status is in the first state, the network environment is extremely poor, and the risk of data transmission failure is extremely high. To avoid resource waste and data loss caused by invalid data transmission, the data processing device generates a dynamic transmission scheduling strategy that does not execute any transmission operations for non-real-time critical data and non-critical redundant data, temporarily retaining the data in the buffer area, waiting for the network status to improve.
[0081] Continuing with the above embodiment, the data processing device determines that the current real-time network status is in the first state. At this time, the cache area contains 500MB of non-real-time critical data (pressure sensor data) and 300MB of non-critical redundant data (equipment operation log records). The data processing device does not transmit this data to the target server, but continues to keep it in the local cache and continuously monitors the network status.
[0082] Step 403: If the real-time network status is in the second state, then based on the first cached data volume of non-real-time critical data, the second cached data volume of non-critical redundant data, and the transmission bandwidth of the transmission link network, determine the corresponding first transmission volume and second transmission volume respectively, and generate a dynamic transmission scheduling strategy as follows: transmit non-real-time critical data with the first transmission volume and transmit non-critical redundant data with the second transmission volume.
[0083] Furthermore, if the data processing device determines that the real-time network status is in the second state, where the network condition is relatively poor but some data transmission is still possible, the data processing device will cache the first amount of non-real-time critical data. The second cache size of non-critical redundant data and transmission link network transmission bandwidth Through formula Calculate the first transmission volume , Calculate the second transmission volume At this point, the dynamic transmission scheduling strategy is generated based on the first transmission volume. Transmitting non-real-time critical data, using a second transmission volume Transmitting non-critical redundant data ensures data transmission while balancing the transmission volume of both types of data, reducing the risk of data loss due to network instability.
[0084] Continuing with the above embodiments, the data processing device determines that the real-time network state is in the second state, at which time the first cached data amount of non-real-time critical data... =400MB, the second cache size for non-critical redundant data =200MB, transmission link network transmission bandwidth =5Mbps. Calculate the first transmission rate according to the formula. =3.33Mbps, second transmission rate =1.67Mbps. The data processing unit generates a dynamic transmission scheduling strategy to transmit pressure sensor data at a rate of approximately 3.33Mbps and equipment operation log data at a rate of approximately 1.67Mbps.
[0085] Step 404: If the real-time network status is in the third state, then the dynamic transmission scheduling strategy is generated as follows: transmit non-real-time critical data and non-critical redundant data with the first buffer data volume.
[0086] Furthermore, when the data processing device determines that the real-time network status is in the third state, it indicates that the network status is good and the data transmission reliability is high. The data processing device generates a dynamic transmission scheduling strategy based on the first buffered data amount. Transmitting non-real-time critical data and non-critical redundant data means making full use of good network conditions to quickly and efficiently transmit all data in the cache area to the target server, reducing the backlog time of data in the cache.
[0087] Continuing with the above embodiments, the data processing device determines that the real-time network state is in the third state, at which time the first cached data volume of non-real-time critical data is... =300MB, the second cache size for non-critical redundant data =150MB. The data processing unit generates a dynamic transmission scheduling strategy, transmitting all 300MB of pressure sensor data and 150MB of equipment operation log data to the target server to quickly clear the cache area and prepare for new data. This is the initial cache size for non-real-time critical data. =300MB, the second cache size for non-critical redundant data =350MB. The data processing unit generates a dynamic transmission scheduling strategy to transmit all 300MB of pressure sensor data and 300MB of equipment operation log data to the target server as quickly as possible to clear the cache area and prepare for new data.
[0088] This invention provides a precise classification of real-time network conditions and formulates differentiated data transmission scheduling strategies for different network conditions. Therefore, when network conditions are extremely poor, transmission is suspended to avoid data waste; when network conditions are moderate, transmission volume is rationally allocated based on the amount of cached data and bandwidth to balance data transmission; and when network conditions are good, cached data is transmitted at full capacity to improve transmission efficiency. This dynamic transmission scheduling mechanism can effectively adapt to changes in the network environment, reduce the risk of data loss, improve the reliability and efficiency of data transmission, and achieve efficient and stable data transmission under different network conditions.
[0089] In one embodiment, steps 405 to 408 include:
[0090] Step 405: Based on the distribution characteristics of each type of data field in the real-time key data, determine the data feature distribution of each type of data field, and based on the data feature distribution and complexity of each type of data field combined with the bandwidth fluctuation of the transmission link network, determine the data fragmentation granularity.
[0091] Optionally, the data processing device performs in-depth analysis of each type of data field in the real-time key data, statistically analyzing the distribution characteristics of each data field, such as its value range, data type, and frequency of occurrence, thereby determining the data characteristic distribution of each type of data field. Then, combining the complexity of the data fields (e.g., data fields containing multiple sub-items or complex logical relationships are more complex) and the bandwidth fluctuations of the transmission link network (determined by analyzing the range and frequency of network bandwidth changes within a preset time series), a formula is used... Determine the granularity of data sharding .in, Represents the set of data feature distribution parameters. A parameter indicating the complexity of a data field. This represents a set of parameters indicating network bandwidth fluctuations. This is a mapping function that dynamically calculates the appropriate data fragmentation granularity based on the relationship between data characteristics, complexity, and bandwidth fluctuations, in order to balance data transmission efficiency and network resource utilization.
[0092] Continuing with the above embodiment, the real-time key data includes temperature sensor data (including real-time temperature values and temperature acquisition timestamps) and equipment operating status data (including equipment operation / stop indicators, fault codes, etc.). Data processing analysis revealed that the temperature values ranged from 0-100℃, the acquisition timestamps were in a time format accurate to the second, and occurred once per second; the equipment operation / stop indicators were Boolean values, and the fault codes had a wide range of values and were highly complex. Simultaneously, the statistical transmission link network bandwidth fluctuated between 4Mbps and 8Mbps over the past hour, with a fluctuation frequency of once every 10 minutes. This was achieved through a mapping function. By substituting these data feature distribution parameters, data field complexity parameters, and network bandwidth fluctuation parameters into the calculation, the data fragment granularity was finally determined to be 10KB.
[0093] Step 406: Clustering is performed based on the data granularity, the data feature distribution of each type of data field, and the correlation and logical relationship between different types of data fields to obtain data field groups.
[0094] Furthermore, based on the data granularity, the data processing device combines the data feature distribution of each type of data field, as well as the correlation (e.g., temperature acquisition timestamps are associated with time in equipment operating status data) and logical relationships (e.g., temperature data during equipment failure has a specific logical association) between different types of data fields. It then uses hierarchical clustering algorithms or DBSCAN (density clustering) to cluster the data fields, grouping data fields with similar characteristics, strong correlations, or close logical connections into a single group, resulting in multiple data field groups.
[0095] Continuing with the aforementioned industrial scenario, the data processing device groups the real-time temperature values and temperature acquisition timestamps from the temperature sensor data, as well as time-related fields from the equipment operating status data, into one group because they are strongly correlated in the time dimension; it then groups data fields closely related to the equipment operating status, such as equipment operation / stop indicators and fault codes, into another group, ultimately resulting in two data field groups.
[0096] Step 407: Using time as the dimension, and combining sharding granularity and data field grouping, the real-time key data is divided into multiple time window shards.
[0097] Furthermore, the data processing device divides real-time critical data into multiple time window segments based on time, data sharding granularity, and data field grouping. For each time window, data from the same group is placed in the same shard according to the data field grouping results, ensuring data integrity and correlation; data from different groups are distributed across different shards to avoid data confusion. During the partitioning process, the limitations of data sharding granularity are strictly adhered to, ensuring that the data volume of each shard does not exceed the specified size.
[0098] Continuing with the industrial scenario described above, the data granularity is 10KB, and the data fields are divided into two groups. The data processing device uses a 1-minute time window to package the data belonging to the first group (temperature-related data) within each time window into fragments no larger than 10KB. If the data volume is less than 10KB, it is packaged into a separate fragment. Similarly, the data belonging to the second group (equipment operating status-related data) is packaged into fragments no larger than 10KB. Within a time window, if the first group of data forms 2 fragments and the second group of data forms 1 fragment, these fragments together constitute the real-time key data fragment set for that time window.
[0099] Step 408: Based on time window sharding, real-time key data is sent to the target server via the transmission link network.
[0100] Furthermore, the data processing device segments the real-time key data according to the time window and sends it to the target server through the transmission link network, as described in steps 4081 to 4084.
[0101] This invention, through comprehensive consideration of the data characteristics, complexity, and network bandwidth fluctuations of real-time critical data, determines a reasonable data fragmentation granularity. It then performs clustering and grouping based on the correlation and logical relationships between data, and further divides time windows into fragments by combining the fragmentation granularity and time dimension. Finally, it achieves ordered data transmission, effectively adapting to dynamic changes in network bandwidth and reducing congestion and packet loss during data transmission. Through reasonable data grouping and fragmentation, it ensures data integrity and relevance, improves the efficiency of data parsing and processing on the target server, and thus enables efficient, stable, and accurate transmission of real-time critical data to the target server.
[0102] In one embodiment, steps 4081 to 4084 include:
[0103] Step 4081: Determine the sharding priority of each time window shard based on the importance of each data field group and the timeliness of the data within each time window shard.
[0104] Optionally, the data processing device first assigns an importance coefficient to each data field group; the higher the importance, the larger the coefficient. Simultaneously, based on the timeliness of the data within each time window segment (e.g., data closer to the current time has higher timeliness), it uses a formula... Calculate the fragmentation priority for each time window fragment. .in, The importance coefficient for grouping data fields. This is the data timeliness coefficient (the value ranges from 0 to 1, and the closer it is to 1, the higher the timeliness).
[0105] Continuing in industrial automation monitoring scenarios, the data processing device groups temperature-related data fields by importance coefficients. Set to 0.8, the importance coefficient for grouping data fields related to equipment operating status. Set to 0.6. For temperature data slices within a certain time window, those that are closer to the current time have a higher data timeliness coefficient. =0.9; Timeliness coefficient of equipment operation status data sharding =0.7. The priority of temperature data sharding is calculated according to the formula. =0.72, priority of device operating status data fragmentation =0.42.
[0106] Step 4082: Divide each time window into fragments according to fragmentation priority and time order, and arrange them into a fragmented transmission sequence. Fragments with the same priority in the fragmented transmission sequence are arranged in chronological order.
[0107] Furthermore, the data processing device sorts the time window fragments according to their fragmentation priority, with higher-priority fragments appearing first. For time window fragments with the same priority, they are arranged according to their corresponding chronological order, thus obtaining a complete fragment transmission sequence. This process ensures that data is transmitted sequentially according to importance and chronological order, optimizing the efficiency and logic of data transmission.
[0108] In one embodiment, in addition to the two segments mentioned above, there is another time window segment for device operating status data, which also has the same priority. =0.42, but the time is later than the previous equipment operation status data fragment. The data processing unit fragments the temperature data (priority). =0.72) is ranked first, followed by earlier times with lower priority. The device operation status data with a time value of 0.42 is ranked second, and finally, the data with later times and higher priority is ranked last. The device operation status data fragment with a value of 0.42 is ranked third, forming a fragmented transmission sequence.
[0109] Step 4083: Add an association identifier to each time window segment to identify the logical relationship between it and other time window segments. The logical relationship includes the data field group to which it belongs, its position in the real-time key data, and its position in the segment transmission sequence.
[0110] Furthermore, an association identifier is added to each time window segment. This identifier includes the data field group information to which the segment belongs (such as belonging to the temperature-related data field group or the equipment operation status-related data field group), its position in the real-time key data (such as whether it is the first half or the second half of the real-time key data), and its position in the segment transmission sequence (i.e., the sequence number of the segment in the transmission sequence).
[0111] Continuing with the above embodiments, for the temperature data segment that is ranked first, the data processing device adds an association identifier: the data field group to which it belongs is "temperature-related data field group", the position in the real-time key data is "first 1 / 3", and the position in the segment transmission sequence is "1st". For the second device operation status data segment, the association identifier is: the data field group to which it belongs is "device operation status related data field group", the position in the real-time key data is "middle 1 / 3", and the position in the segment transmission sequence is "2nd". For the third device operation status data segment, the association identifier is: the data field group to which it belongs is "device operation status related data field group", the position in the real-time key data is "last 1 / 3", and the position in the segment transmission sequence is "3rd".
[0112] Step 4084: The time window fragment with the added association identifier is encapsulated to obtain encapsulated data fragments, and the encapsulated data fragments are sent to the target server sequentially according to the fragment transmission sequence through the transmission link network.
[0113] Furthermore, the data processing device encapsulates the time window segments with added association identifiers according to the network transmission protocol, forming encapsulated data segments. Then, according to the segment transmission sequence, the encapsulated data segments are sent sequentially to the target server through the transmission link network, ensuring that the data is transmitted accurately according to the predetermined priority and order. Continuing in the industrial automation monitoring scenario, the data processing device encapsulates the above three time window segments with added association identifiers into data packets according to the TCP / IP protocol. First, the encapsulated data packet of the first temperature data segment is sent, followed by the encapsulated data packet of the second equipment operating status data segment, and finally the encapsulated data packet of the third equipment operating status data segment, transmitting the data to the factory's central monitoring system server (target server).
[0114] This invention determines fragment priority by comprehensively considering the importance of data field grouping and data timeliness, arranges the transmission sequence according to priority and time order, adds association identifiers containing multi-dimensional logical relationships, and encapsulates and transmits data fragments in sequence. This ensures that during the transmission of real-time critical data, important and time-sensitive data arrives at the target server first, and the target server can quickly and accurately parse the relationships between the data fragments through clear logical identifiers and transmission sequences. This effectively improves the orderliness of data transmission and reduces the risk of data transmission chaos and parsing errors.
[0115] Furthermore, the real-time data processing device for serial port gateways in fusion edge computing provided by the present invention will be described below. The real-time data processing device for serial port gateways in fusion edge computing described below can be referred to in correspondence with the real-time data processing method for serial port gateways in fusion edge computing described above.
[0116] Optional, refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of the serial port gateway data real-time processing device for fusion edge computing provided by the present invention. The serial port gateway data real-time processing device for fusion edge computing includes...
[0117] The data parsing module 210 is used to parse the serial gateway data sent by the serial port device to obtain real-time key data, non-real-time key data and non-key redundant data; the importance of real-time key data, non-real-time key data and non-key redundant data decreases in that order.
[0118] The network monitoring module 220 is used to send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters.
[0119] The data transmission module 230 is used to send real-time critical data to the target server through the transmission link network, and to cache non-real-time critical data and non-critical redundant data based on the data caching strategy.
[0120] The transmission scheduling module 240 is used to generate a dynamic transmission scheduling strategy based on real-time network parameters and cached data volume, and transmit non-real-time critical data and non-critical redundant data to the target server through the transmission link network based on the dynamic transmission scheduling strategy.
[0121] This invention prioritizes the transmission of real-time critical data and generates a data caching strategy based on real-time network parameters to cache non-real-time critical data and non-critical redundant data. This ensures timely transmission of important real-time critical data while dynamically adjusting the transmission strategy based on real-time network parameters to cache non-real-time critical data and non-critical redundant data, preventing data accumulation that could lead to transmission delays and packet loss. Furthermore, a dynamic transmission scheduling strategy is generated based on real-time network parameters and the amount of cached non-critical data, allowing for dynamic transmission scheduling of non-critical data. This ensures that bandwidth is used efficiently to transmit cached non-critical data when network parameters permit. Therefore, this invention effectively adapts to complex and ever-changing network environments, reduces transmission delays and packet loss rates, and makes rational use of network bandwidth resources, thereby improving the efficiency and stability of data transmission.
[0122] Please see Figure 3 , Figure 3 An embodiment diagram of an electronic device provided in accordance with the present invention. For example... Figure 3 As shown, this embodiment of the invention provides an electronic device 300, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor 320. When the processor 320 executes the computer program 311, it performs the following steps:
[0123] The serial gateway data sent by the serial port device is parsed to obtain real-time critical data, non-real-time critical data, and non-critical redundant data; the importance of real-time critical data, non-real-time critical data, and non-critical redundant data decreases in that order.
[0124] Send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters;
[0125] Real-time critical data is sent to the target server via the transmission link network, and non-real-time critical data and non-critical redundant data are cached based on the data caching strategy.
[0126] A dynamic transmission scheduling strategy is generated based on real-time network parameters and cached data volume. Based on the dynamic transmission scheduling strategy, non-real-time critical data and non-critical redundant data are transmitted to the target server through the transmission link network.
[0127] Please see Figure 4 , Figure 4 An embodiment diagram of a computer-readable storage medium provided in accordance with an embodiment of the present invention is shown. Figure 4 As shown, this embodiment provides a computer-readable storage medium 400 on which a computer program 311 is stored. When the computer program 311 is executed by a processor, it performs the following steps:
[0128] The serial gateway data sent by the serial port device is parsed to obtain real-time critical data, non-real-time critical data, and non-critical redundant data; the importance of real-time critical data, non-real-time critical data, and non-critical redundant data decreases in that order.
[0129] Send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters;
[0130] Real-time critical data is sent to the target server via the transmission link network, and non-real-time critical data and non-critical redundant data are cached based on the data caching strategy.
[0131] A dynamic transmission scheduling strategy is generated based on real-time network parameters and cached data volume. Based on the dynamic transmission scheduling strategy, non-real-time critical data and non-critical redundant data are transmitted to the target server through the transmission link network.
[0132] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the real-time data processing method for serial port gateways in fused edge computing provided by the above methods, the method including:
[0133] The serial gateway data sent by the serial port device is parsed to obtain real-time critical data, non-real-time critical data, and non-critical redundant data; the importance of real-time critical data, non-real-time critical data, and non-critical redundant data decreases in that order.
[0134] Send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters;
[0135] Real-time critical data is sent to the target server via the transmission link network, and non-real-time critical data and non-critical redundant data are cached based on the data caching strategy.
[0136] A dynamic transmission scheduling strategy is generated based on real-time network parameters and cached data volume. Based on the dynamic transmission scheduling strategy, non-real-time critical data and non-critical redundant data are transmitted to the target server through the transmission link network.
[0137] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0138] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for real-time data processing of a serial port gateway integrating edge computing, characterized in that, include: The serial gateway data sent by the serial port device is parsed to obtain real-time critical data, non-real-time critical data, and non-critical redundant data. The importance of the real-time critical data, the non-real-time critical data, and the non-critical redundant data decreases in that order. Send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters; The real-time critical data is sent to the target server through the transmission link network, and the non-real-time critical data and the non-critical redundant data are cached based on the data caching strategy. A dynamic transmission scheduling strategy is generated based on the real-time network parameters and the amount of cached data. Based on the dynamic transmission scheduling strategy, the non-real-time critical data and the non-critical redundant data are transmitted to the target server through the transmission link network. The real-time network parameters include a preset time series network bandwidth trend and a real-time network latency jitter value; The data caching strategy generated based on the real-time network parameters includes: Based on the network bandwidth trend, predict the predicted bandwidth of the transmission link network at the current time, and determine the traffic pattern based on the actual bandwidth of the transmission link network at the current time and the predicted bandwidth. Based on the amount of non-real-time critical data and non-critical redundant data generated per unit time, the data generation rate of each type of data is determined, and the cumulative amount of each type of data within a preset time under different network conditions is calculated based on the data generation rate of each type of data, and the cache requirement space area is determined. If the traffic pattern is a traffic mutation pattern, a cache area for each type of data is determined based on the data generation rate and data importance of each type of data; the sum of the cache areas for each type of data is the cache requirement space area; the traffic pattern includes a traffic mutation pattern, which indicates that the bandwidth difference between the actual bandwidth and the predicted bandwidth is greater than or equal to a preset number of times the predicted bandwidth; Based on the cache area and data generation rate of each type of data, calculate the cache filling time required to fill the corresponding cache area for each type of data, and determine the cache overflow risk of each type of data based on the cache filling time and cache overflow risk sensitivity coefficient of each type of data. The data caching strategy is generated based on the cache overflow risk of each type of data.
2. The real-time data processing method for serial port gateways integrating edge computing according to claim 1, characterized in that, The step of sending the real-time key data to the target server through the transmission link network includes: Based on the distribution characteristics of each type of data field in the real-time key data, the data feature distribution of each type of data field is determined, and based on the data feature distribution and complexity of each type of data field combined with the bandwidth fluctuation of the transmission link network, the data fragmentation granularity is determined. Clustering is performed based on the data granularity, the data feature distribution of each type of data field, and the correlation and logical relationship between different types of data fields to obtain data field groups; Using time as the dimension, and combining the granularity of the sharding and the grouping of the data fields, the real-time key data is divided into multiple time window shards; within each time window shard, data of the same group is in the same shard, and data of different groups are distributed in different shards; Based on the time window segmentation, the real-time key data is sent to the target server through the transmission link network.
3. The real-time data processing method for serial port gateways integrating edge computing according to claim 2, characterized in that, The step of sending the real-time key data to the target server through the transmission link network based on the time window sharding includes: The sharding priority of each time window is determined based on the importance of each data field group and the timeliness of the data within each time window shard. Each time window is segmented and arranged sequentially according to segmentation priority and time order to obtain a segmented transmission sequence; in the segmented transmission sequence, segments with the same priority are arranged in chronological order. Add an association identifier to each time window segment to identify the logical relationship between it and other time window segments; the logical relationship includes the data field group to which it belongs, its position in the real-time key data, and its position in the segment transmission sequence; The time window segments with added association identifiers are encapsulated to obtain encapsulated data segments, and the encapsulated data segments are sent sequentially to the target server through the transmission link network according to the segment transmission sequence.
4. The real-time data processing method for serial port gateways integrating edge computing according to claim 1, characterized in that, A dynamic transmission scheduling strategy is generated based on the real-time network parameters and the amount of cached data, including: The real-time network status at the current time is determined based on the real-time network parameters. If the real-time network state is in the first state, the generated dynamic transmission scheduling strategy is: no data transmission operation is performed; the first state indicates that the network latency jitter value is greater than or equal to the first jitter threshold. If the real-time network state is in the second state, then based on the first cached data volume of the non-real-time critical data, the second cached data volume of the non-critical redundant data, and the transmission bandwidth of the transmission link network, the corresponding first transmission volume and second transmission volume are determined respectively, and a dynamic transmission scheduling strategy is generated as follows: non-real-time critical data is transmitted with the first transmission volume, and non-critical redundant data is transmitted with the second transmission volume; the second state indicates that the network latency jitter value is greater than or equal to the second jitter threshold and less than the first jitter threshold; If the real-time network state is in the third state, the dynamic transmission scheduling strategy is generated as follows: transmit non-real-time critical data and non-critical redundant data with the first cached data volume; the third state indicates that the network latency jitter value is less than the second jitter threshold.
5. The real-time data processing method for serial port gateways integrating edge computing according to claim 1, characterized in that, The cache area includes a first cache area for non-real-time critical data and a second cache area for non-critical redundant data; The data caching strategy is generated based on the cache overflow risk of each type of data, including: If the first cache overflow risk of the non-real-time critical data is greater than the second cache overflow risk of the non-critical redundant data, then the data caching strategy is generated as follows: prioritize caching non-real-time critical data, and continue to store newly generated non-real-time critical data into the first cache area before the first cache area is filled, until the first cache area is filled, and then start storing non-critical redundant data based on the second cache area. If the first cache overflow risk is less than or equal to the second cache overflow risk, and the first cache area is smaller than the second cache area, then the data caching strategy is generated as follows: prioritize caching non-critical redundant data; when the cache reaches a preset proportion of the second cache area, pause the caching of non-critical redundant data and start caching non-real-time critical data until the non-real-time critical data caching is completed, then continue caching of non-critical redundant data; the preset proportion is determined based on the size of the first cache area and the second cache area. If the first cache overflow risk is less than or equal to the second cache overflow risk, and the first cache area is larger than the second cache area, then the data caching strategy is generated as follows: prioritize caching non-critical redundant data, and after the second cache area is filled, start storing non-real-time critical data into the first cache area until the first cache area is filled, and then continue to cache newly generated non-critical redundant data into the second cache area.
6. The real-time data processing method for serial port gateways integrating edge computing according to claim 1, characterized in that, The method further includes: If the traffic mode is a stable traffic mode, then the cache demand space area is divided into a third cache area and a fourth cache area of equal size; the stable traffic mode indicates that the bandwidth difference is less than a preset number of times the predicted bandwidth; If the first data generation rate of the non-real-time critical data is greater than the second data generation rate of the non-critical redundant data, then the data caching strategy is as follows: cache the non-real-time critical data in the third cache area until the first data generation rate and the second data generation rate are equal, then alternately cache the non-real-time critical data in the third cache area and cache the non-critical redundant data in the fourth cache area. If the first data generation rate of the non-real-time critical data is less than the second data generation rate of the non-critical redundant data, the non-critical redundant data is cached in the fourth cache area. When the second data generation rate is less than or equal to a preset rate threshold, the non-real-time critical data is cached in the third cache area until the non-real-time critical data is completely cached, and then the non-critical redundant data is cached in the fourth cache area.
7. A real-time data processing device for a serial port gateway integrating edge computing, characterized in that, A real-time data processing method for serial port gateways in fused edge computing as described in any one of claims 1 to 6; The serial port gateway data real-time processing device for fused edge computing includes: The data parsing module is used to parse the serial gateway data sent by the serial port device to obtain real-time key data, non-real-time key data, and non-key redundant data; the data importance of the real-time key data, the non-real-time key data, and the non-key redundant data decreases in that order. The network monitoring module is used to send probe packets to the transmission link network of edge computing, obtain real-time network parameters fed back by the transmission link network, and generate a data caching strategy based on the real-time network parameters. The data transmission module is used to send the real-time critical data to the target server through the transmission link network, and to cache the non-real-time critical data and the non-critical redundant data based on the data caching strategy. The transmission scheduling module is used to generate a dynamic transmission scheduling strategy based on the real-time network parameters and the amount of cached data, and to transmit the non-real-time critical data and the non-critical redundant data to the target server through the transmission link network based on the dynamic transmission scheduling strategy. The real-time network parameters include a preset time series network bandwidth trend and a real-time network latency jitter value; The data caching strategy generated based on the real-time network parameters includes: Based on the network bandwidth trend, predict the predicted bandwidth of the transmission link network at the current time, and determine the traffic pattern based on the actual bandwidth of the transmission link network at the current time and the predicted bandwidth. Based on the amount of non-real-time critical data and non-critical redundant data generated per unit time, the data generation rate of each type of data is determined, and the cumulative amount of each type of data within a preset time under different network conditions is calculated based on the data generation rate of each type of data, and the cache requirement space area is determined. If the traffic pattern is a traffic mutation pattern, a cache area for each type of data is determined based on the data generation rate and data importance of each type of data; the sum of the cache areas for each type of data is the cache requirement space area; the traffic pattern includes a traffic mutation pattern, which indicates that the bandwidth difference between the actual bandwidth and the predicted bandwidth is greater than or equal to a preset number of times the predicted bandwidth; Based on the cache area and data generation rate of each type of data, calculate the cache filling time required to fill the corresponding cache area for each type of data, and determine the cache overflow risk of each type of data based on the cache filling time and cache overflow risk sensitivity coefficient of each type of data. The data caching strategy is generated based on the cache overflow risk of each type of data.
8. An electronic device, comprising: Memory, used to store computer software programs; A processor for reading and executing the computer software program, characterized in that, when the processor executes the computer software program, it implements the real-time data processing method for serial port gateways in converged edge computing as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium, wherein a computer software program is stored therein, characterized in that, When the computer software program is executed by the processor, it implements the real-time data processing method for serial port gateways in converged edge computing as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Data transmission control method and device based on edge computing
CN113783792A