Method and apparatus for configuring data transmission

By optimizing the dynamic adjustment of the number and length of queues, the problems of real-time performance and cost in high-frequency data transmission were solved, and a low-cost and efficient data transmission solution was achieved.

CN116708482BActive Publication Date: 2026-07-31HITACHI LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HITACHI LTD
Filing Date
2022-02-24
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies have limitations in high-frequency data acquisition and transmission, such as the inability to guarantee real-time data performance or the need for high-cost hardware, which restricts the advancement of smart factories.

Method used

By determining the initial values ​​of the number and length of queues, calculating the maximum product value, dynamically adjusting the combination of transmission parameters, optimizing the data transmission process, meeting real-time requirements, and reducing resource usage.

Benefits of technology

This achieves both reliable real-time transmission and reduced data acquisition and transmission costs, while improving resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116708482B_ABST
    Figure CN116708482B_ABST
Patent Text Reader

Abstract

A data transmission configuration method and apparatus are disclosed. The method includes an initial value determination step, a product value determination step, a parameter combination determination step, and a configuration step. This invention calculates the optimal values ​​for queue length and queue number, and can also dynamically adjust them according to different tasks or real-time system load, thereby meeting the real-time requirements of data transmission while reducing resource usage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data acquisition and transmission technology in the Internet of Things (IoT) field, specifically to a data transmission configuration method and apparatus. Background Technology

[0002] Currently, in many production sites, high-frequency data is transmitted via downsampling. However, to better extract value from the data and provide greater benefits to customers, it is necessary to acquire all high-frequency data reliably in real time. Advances in transmission, storage, and computing technologies have made this possible. On the other hand, the high cost of dedicated acquisition equipment also restricts the collection and transmission of high-frequency data, thus necessitating a low-cost data transmission solution.

[0003] In the Internet of Things (IoT) field, data is typically collected directly or indirectly by controllers, and then the collected data is sent to edge devices. Controllers can be programmable logic controllers (PLCs), programmable automation controllers (PACs), CNC machine tools, etc., while edge devices can be ordinary PCs, industrial PCs, industrial smart gateways, etc. Figure 1 The general operating logic of a PLC is provided: During the entire run, the PLC's CPU repeatedly executes at a certain scan speed. Figure 1 Processing (scan cycle).

[0004] In existing data collection processes, data is acquired by sensors, collected by data collection equipment at a specific frequency, and then sent to data storage and processing equipment. Typically, data collection equipment, especially high-frequency equipment, uses specialized devices for high-precision data collection, which increases acquisition costs.

[0005] Please refer to Chinese patent application CN101488907B, which provides a method for acquiring and transmitting high-frequency message signals. This method addresses the problem of acquiring and transmitting high-frequency data, including: acquiring high-frequency production signals by a data acquisition module, converting them into digital high-frequency message signals, and sending them to a data transmission module; the data transmission module packaging the high-frequency message signals and sending them to a data receiving module via a network; and the data receiving module receiving the packaged message signals, unpacking them, and storing them. This method utilizes a sliding pipe and online storage for data caching in high-frequency data transmission and designs a retransmission mechanism to ensure data reliability. Furthermore, in practical applications, the controller often uses an FTP server for data caching, and then the host computer obtains high-frequency data by reading files from the FTP server.

[0006] In the above solutions, either the real-time nature of the data cannot be guaranteed, or the need to use higher-performance hardware leads to increased costs for data collection and transmission, thus affecting the advancement and implementation of smart factories. Summary of the Invention

[0007] At least one embodiment of the present invention provides a data transmission configuration method and apparatus for reducing data acquisition and transmission costs, and reducing resource usage while meeting the requirements for reliable real-time transmission.

[0008] In a first aspect, embodiments of the present invention provide a data transmission configuration method, applied to configuring a first device to transmit data of a target task to a second device, the method comprising:

[0009] Initial value determination steps: Based on the cycle time of the first device, the cycle time of the second device, and the data sampling interval of the target task, determine the initial values ​​of the number of queues and the queue length under the target task;

[0010] Steps for determining the product value: By conducting data transmission tests under different queue lengths and / or queue numbers, the maximum product value of queue length and queue number when the system load reaches a preset threshold is obtained;

[0011] Parameter combination determination steps: Based on the initial values ​​of the number of queues and queue length under the target task and the maximum product value, traverse different combinations of transmission parameters with different numbers of queues and queue lengths, and obtain the system load evaluation value corresponding to each combination of transmission parameters through data transmission tests under each combination of transmission parameters.

[0012] Configuration steps: Determine the target transmission parameter combination corresponding to the optimal system load assessment value, and configure the first device to transmit the data of the target task according to the target transmission parameter combination.

[0013] Optionally, the initial value determination step includes:

[0014] The initial value for the number of queues under the target task is determined to be 2;

[0015] Calculate a first ratio of the loop time of the first device to the data sampling interval of the target task, and round down the first ratio to obtain a first value; calculate a second ratio of the loop time of the second device to the data sampling interval of the target task, and round down the second ratio to obtain a second value; determine the larger of the first value and the second value as the initial value of the queue length under the target task.

[0016] Optionally, the product value determination step includes:

[0017] Keeping the number of queues at 2, the first device is configured to gradually increase the queue length from the initial value of the queue length to conduct data transmission tests, obtain the system load status under different queue lengths, and when the system load status reaches a preset threshold, calculate the product value of the queue length and the number of queues based on the current queue length and the number of queues, and obtain the maximum product value.

[0018] Optionally, the system load status includes at least one of the following loads: processor load, memory load, and network load of the first device; processor load, memory load, and network load of the second device;

[0019] The system load state reaching the preset threshold means that any one of the at least one loads reaches the corresponding preset threshold.

[0020] Optionally, the parameter combination determination step includes:

[0021] Calculate the third ratio of the maximum product value to the initial value of the queue length under the target task, and round down the third ratio to obtain the maximum number of queues.

[0022] Within the range from the initial value of the number of queues to the maximum value, each value of the number of queues is traversed. While traversing each value of the number of queues, within the range from the initial value of the queue length to the maximum length value of the queue length under the current number of queues, each value of the queue length is traversed. The first device is configured to perform data transmission test under the current combination of transmission parameters of the current number of queues and the current queue length, and obtain the system load evaluation value under the current combination of transmission parameters.

[0023] Optionally, the maximum queue length value under the current queue number is obtained by rounding down the fourth ratio, which is the ratio of the maximum product value to the current queue number.

[0024] Optionally, the system load assessment value is obtained by averaging at least one of the following loads: processor load, memory load, and network load of the first device; and processor load, memory load, and network load of the second device.

[0025] Optional, also includes:

[0026] If the system load exceeds a preset threshold, the product value determination step, parameter combination determination step, and configuration step are re-executed to update the target transmission parameter combination, and the first device is configured to transmit the target task data according to the updated target transmission parameter combination.

[0027] Optional, also includes:

[0028] If the target task changes, the initial value determination step, product value determination step, parameter combination determination step, and configuration step are re-executed according to the changed target task to update the target transmission parameter combination, and the first device is configured to transmit the data of the changed target task according to the updated target transmission parameter combination.

[0029] Secondly, embodiments of the present invention provide a data transmission configuration apparatus for configuring a first device to transmit data of a target task to a second device, the configuration apparatus comprising:

[0030] The initial value determination module is used to determine the initial values ​​of the number of queues and the queue length under the target task based on the cycle time of the first device, the cycle time of the second device, and the data sampling interval of the target task.

[0031] The product value determination module is used to obtain the maximum product value of queue length and queue number when the system load reaches a preset threshold through data transmission tests under different queue lengths and / or queue numbers;

[0032] The parameter combination determination module is used to traverse different combinations of transmission parameters with different numbers of queues and queue lengths based on the initial values ​​of the number of queues and queue lengths under the target task and the maximum product value, and obtain the system load evaluation value corresponding to each combination of transmission parameters through data transmission tests under each combination of transmission parameters.

[0033] The configuration module is used to determine the target transmission parameter combination corresponding to the optimal system load assessment value, and configure the first device to transmit the data of the target task according to the target transmission parameter combination.

[0034] Optionally, the initial value determination module is further configured to determine that the initial value of the number of queues under the target task is 2; calculate a first ratio of the loop time of the first device to the data sampling interval of the target task, and round down the first ratio to obtain a first value; calculate a second ratio of the loop time of the second device to the data sampling interval of the target task, and round down the second ratio to obtain a second value; and determine the larger of the first value and the second value as the initial value of the queue length under the target task.

[0035] Optionally, the product value determination module is further configured to maintain the number of queues at 2, configure the first device to gradually increase the queue length from the initial value of the queue length to conduct data transmission tests, obtain the system load status under different queue lengths, and when the system load status reaches a preset threshold, calculate the product value of the queue length and the number of queues based on the current queue length and the number of queues to obtain the maximum product value.

[0036] Optionally, the parameter combination determination module is further configured to calculate a third ratio between the maximum product value and the initial value of the queue length under the target task, and round down the third ratio to obtain the maximum number of queues; within the interval from the initial value of the queue number to the maximum value, traverse each value of the queue number, wherein, when traversing each value of the queue number, within the interval from the initial value of the queue length to the maximum length value of the queue length under the current queue number, traverse each value of the queue length, configure the first device to perform data transmission test under the current transmission parameter combination of the current queue number and the current queue length, and obtain the system load evaluation value under the current transmission parameter combination.

[0037] Optional, also includes:

[0038] The first dynamic adjustment module is used to re-execute the product value determination step, parameter combination determination step, and configuration step when the system load state is detected to exceed a preset threshold, so as to update the target transmission parameter combination and configure the first device to transmit the target task data according to the updated target transmission parameter combination.

[0039] And / or,

[0040] The second dynamic adjustment module is used to, in the event that the target task changes, re-execute the initial value determination step, product value determination step, parameter combination determination step, and configuration step according to the changed target task, so as to update the target transmission parameter combination and configure the first device to transmit the data of the changed target task according to the updated target transmission parameter combination.

[0041] Thirdly, embodiments of the present invention provide a communication device, including: a processor, a memory, and a program stored in the memory and executable on the processor, wherein the program, when executed by the processor, implements the steps of the method described in the first aspect.

[0042] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a program that, when executed by a processor, implements the steps of the method described above.

[0043] Compared with the prior art, the data transmission configuration method and apparatus provided in this embodiment of the invention calculate the optimal values ​​of queue length and queue number, and can also dynamically adjust according to different work tasks or real-time system load, so as to meet the real-time requirements of data transmission and reduce resource usage. Attached Figure Description

[0044] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0045] Figure 1 This is an example diagram of the scanning process of a PLC in the prior art;

[0046] Figure 2 This is a flowchart of a data transmission configuration method according to an embodiment of the present invention;

[0047] Figure 3 This is an example diagram illustrating an overall flow of the data transmission configuration method according to an embodiment of the present invention;

[0048] Figure 4 This is an example diagram of the initial configuration in the data transmission configuration method of this embodiment of the invention;

[0049] Figure 5 This is an example diagram illustrating the dynamic adjustment of queue length and number of queues according to an embodiment of the present invention;

[0050] Figure 6 This is another example diagram illustrating the dynamic adjustment of queue length and number of queues according to an embodiment of the present invention;

[0051] Figure 7 This is an example diagram illustrating the inter-device interaction of the data transmission configuration method according to an embodiment of the present invention.

[0052] Figure 8 This is a schematic diagram of a data transmission configuration device according to an embodiment of the present invention;

[0053] Figure 9 This is a schematic diagram of a communication device according to an embodiment of the present invention;

[0054] Figure 10 This is another structural schematic diagram of the communication device according to an embodiment of the present invention. Detailed Implementation

[0055] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

[0056] The terms “first,” “second,” etc., used in the specification and claims of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus. The terms “and / or” in the specification and claims indicate at least one of the connected objects.

[0057] The following description provides examples and is not intended to limit the scope, applicability, or configuration set forth in the claims. Changes may be made to the function and arrangement of the elements discussed without departing from the spirit and scope of this disclosure. Various procedures or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with reference to certain examples may be combined in other examples.

[0058] To help understand the solutions of the embodiments of the present invention, some concepts that may be involved in the embodiments of the present invention will be explained below.

[0059] The cycle time of the first device refers to the scanning cycle of the first device (denoted as t). c That is, the first device collects data of the target task according to the scanning cycle, and the specific collection method is as described above.

[0060] The cycle time of the second device refers to the reception period (denoted as t) during which the second device receives data collected by the first device. e The first device can transmit the collected data to the second device according to the received period. Typically, the received period is greater than or equal to the scan period.

[0061] The data sampling interval of the target task refers to the interval at which the target task samples data (denoted as T). d When data of the target task is collected using devices such as acquisition cards (sensors), the scanning period is usually greater than or equal to the data sampling interval; when the first device directly collects data of the target task, the scanning period is usually equal to the data sampling interval.

[0062] Network latency refers to the latency of the communication network between the first device and the second device (denoted as t). n )

[0063] The load status of the first device may include the processor (CPU) load, memory load, and network load of the first device (represented by l). cc ,l cm ,l cn At least one of the following. Network load reflects the network transmission performance of a device. The aforementioned load can usually be obtained by querying device operating status data.

[0064] The load status of the second device can include the CPU load, memory load, and network load of the second device: (represented by l) ec ,l em ,l en At least one of the following.

[0065] System load status refers to the load status of the first device and / or the second device, which may specifically include at least one of the following loads: processor load, memory load, and network load of the first device; processor load, memory load, and network load of the second device.

[0066] This invention provides a data transmission configuration method for configuring a first device to transmit target task data to a second device. This configuration method can be executed by the second device. The first device can be a controller or similar device, and the second device can specifically be an edge device. The controller can specifically be a PLC, PAC, CNC, etc., and the edge device can specifically be a regular PC, an industrial PC, an industrial smart gateway, etc. The first device collects the target task data. Specifically, the collection method can be that the first device directly collects the target task data through sensors, or it can indirectly collect the target task data through a collection device. The first device collects the collected data according to a preset period.

[0067] like Figure 2 As shown, the configuration method for this data transmission includes:

[0068] Initial value determination step 21: Based on the cycle time of the first device, the cycle time of the second device, and the data sampling interval of the target task, determine the initial values ​​of the number of queues and the queue length under the target task.

[0069] Specifically, in this embodiment of the invention, the initial value of the number of queues under the target task can be determined to be 2. Furthermore, a first ratio of the loop time of the first device to the data sampling interval of the target task is calculated, and the first ratio is rounded down to obtain a first value; a second ratio of the loop time of the second device to the data sampling interval of the target task is calculated, and the second ratio is rounded down to obtain a second value; the larger of the first value and the second value is determined as the initial value of the queue length under the target task.

[0070] Step 22 for determining the product value: By conducting data transmission tests under different queue lengths and / or queue numbers, obtain the maximum product value of queue length and queue number when the system load reaches a preset threshold.

[0071] Here, in this embodiment of the invention, the queue length can be gradually increased from a preset number of queues to conduct data transmission tests and obtain the system load status under different queue lengths. For example, keeping the number of queues at 2, the first device is configured to gradually increase the queue length from the initial value of the queue length to conduct data transmission tests and obtain the system load status under different queue lengths. Then, when the system load status reaches a preset threshold, the product of the queue length and the number of queues is calculated based on the current queue length and the number of queues to obtain the maximum product value.

[0072] Here, when configuring the first device to gradually increase the queue length from the initial value of the queue length to conduct data transmission tests, the second device can send the current queue length value to the first device to control the first device to send test data according to the current queue length value and the number of queues.

[0073] In this embodiment of the invention, the number of queues and the queue length can also be adjusted simultaneously to perform the data transmission test. The specific method is similar to the above method and will not be described again here.

[0074] In this embodiment of the invention, the system load state includes at least one of the following loads: processor load, memory load, and network load of a first device; and processor load, memory load, and network load of a second device. The system load state reaching a preset threshold means that any one of the at least one loads reaches the preset threshold. In this embodiment of the invention, different loads can be set with the same or different thresholds. Once any one of the at least one loads reaches the threshold set for that load, the system load state is considered to have reached the preset threshold.

[0075] For example, a threshold 1 is set for the processor load of the first device, a threshold 2 is set for the memory load of the first device, and a threshold 3 is set for the network load of the first device; a threshold 4 is set for the processor load of the second device, a threshold 5 is set for the memory load of the second device, and a threshold 6 is set for the network load of the second device. These threshold values ​​can be the same or different. Once any load reaches its corresponding threshold, the load state is determined to have reached the preset threshold.

[0076] Step 23 for determining parameter combinations: Based on the initial values ​​of the number of queues and the queue length under the target task, as well as the maximum product value, traverse different combinations of transmission parameters with different numbers of queues and queue lengths, and obtain the system load evaluation value corresponding to each combination of transmission parameters by conducting data transmission tests under each combination of transmission parameters.

[0077] Here, in this embodiment of the invention, the maximum number of queues (maximum number value) can be determined based on the maximum product value. For example, the third ratio of the maximum product value to the initial value of the queue length under the target task is calculated, and the third ratio is rounded down to obtain the maximum number of queues. Similarly, based on the maximum product value, the range of queue length values ​​for each queue number can also be determined. The starting point of this range is the initial value of the queue length, and the ending point is the ratio of the maximum product value to the queue number (if the ratio is not an integer, it can be rounded down). In this way, the ranges of values ​​for both the queue number and queue length can be obtained.

[0078] Then, within the range of the above-mentioned queue number and queue length values, different combinations of transmission parameters with different queue numbers and queue lengths are traversed to obtain the system load evaluation value under different combinations of transmission parameters.

[0079] For example, within the interval from the initial value of the queue number to the maximum value, each value of the queue number is traversed. While traversing each value of the queue number, within the interval from the initial value of the queue length to the maximum queue length value under the current queue number, each value of the queue length is traversed. The first device is configured to perform data transmission tests under the current combination of transmission parameters for the current queue number and the current queue length, obtaining a system load evaluation value under the current combination of transmission parameters. The maximum queue length value under the current queue number is obtained by rounding down a fourth ratio, where the fourth ratio is the ratio of the maximum product value to the current queue number.

[0080] Here, when configuring the first device to perform data transmission tests under the current combination of transmission parameters, the second device can send the information of the current combination of transmission parameters to the first device to control the first device to send test data according to the current combination of transmission parameters.

[0081] In addition, the system load assessment value can be obtained by averaging at least one of the following loads: processor load, memory load, and network load of the first device; and processor load, memory load, and network load of the second device. Embodiments of the present invention can also employ other different load assessment methods. For example, embodiments of the present invention can set corresponding weights according to the importance of each load, wherein the sum of the weights of all loads is 1; then, these loads are weighted and summed, and the resulting sum is used as the system load assessment value.

[0082] Configuration step 24: Determine the target transmission parameter combination corresponding to the optimal system load assessment value, and configure the first device to transmit the data of the target task according to the target transmission parameter combination.

[0083] In configuration step 24 above, this embodiment of the invention determines the optimal system load assessment value based on the various system load assessment values ​​obtained in step 23, and uses the corresponding transmission parameter combination (including queue length and queue number) as the final target transmission parameter combination. Specifically, the information of the target transmission parameter combination can be sent to the first device to configure the first device to transmit the data of the target task according to the target transmission parameter combination.

[0084] In this embodiment of the invention, the load data of the first device (such as processor load, memory load, and network load) can be sent from the first device to the second device, so that the second device can determine the system load status or system load assessment value based on its own load data and the load data of the first device.

[0085] Through the above steps, the embodiments of the present invention can dynamically adjust the number and length of data transmission queues according to specific work tasks and / or real-time system load, thereby meeting the requirements for reliable real-time transmission while reducing resource usage.

[0086] In this embodiment of the invention, the system load state may change. If the system load state is detected to exceed a preset threshold, the product value determination step 22, parameter combination determination step 23, and configuration step 24 can be re-executed to update the target transmission parameter combination, and the first device can be configured to transmit the target task data according to the updated target transmission parameter combination. Here, detecting that the system load state exceeds the preset threshold can specifically be receiving an indication message sent by the first device indicating that the system load state exceeds the preset threshold, or it can be that the second device determines that the system load state exceeds the preset threshold based on the load data of the first device and / or the second device.

[0087] In addition, in the case of a change in the target task, for example, upon receiving a notification message of a changed target task, the initial value determination step 21, product value determination step 22, parameter combination determination step 23, and configuration step 24 are re-executed according to the changed target task to update the target transmission parameter combination, and the first device is configured to transmit the data of the changed target task according to the updated target transmission parameter combination.

[0088] The following example, using the first device as the controller and the second device as the edge device, further illustrates the above method through an example of the interaction process between the devices.

[0089] Please refer to Figure 3 The data transmission configuration method in this example is used to configure the controller to transmit data of a target task to an edge device. An overall flow of this method includes:

[0090] Step 31: The controller and edge devices work together to calculate the initial configuration and store it in the task configuration table.

[0091] Step 32: The edge device receives high-frequency data or load anomaly data sent by the controller, or receives data sent by the upstream device. Here, high-frequency data refers to data from the target task acquired at a high frequency; high-frequency acquisition means acquiring data at a frequency greater than a preset value. Specifically, this can be data acquired at a high frequency by a data acquisition card, or data directly acquired at a high frequency by the controller. Load anomaly data refers to data used to indicate that the system load status exceeds a preset threshold.

[0092] Step 33: The edge device parses and stores the received data.

[0093] Here, the edge device parses the received data: if it is information sent by the upper-level device to indicate task changes, it parses out the specific task number; if it is data received from the controller, it parses it into high-frequency data or load anomaly data.

[0094] Step 34: The edge device optimizes and adjusts the queue length and number of queues based on abnormal load data or task change information.

[0095] Figure 4 A specific implementation of the initial configuration process in step 31 above is given, wherein:

[0096] S1, the variables are set as follows:

[0097] Controller cycle time: i.e., the controller's scan period, denoted as t. c ;

[0098] Edge device cycle time: This refers to the period during which the edge device receives data, denoted as t. e;

[0099] Data sampling interval: The interval for sampling high-frequency data, denoted as T. d ;

[0100] Network latency: The latency of the communication network between the controller and the edge devices, denoted as t. n ;

[0101] The CPU load, memory load, and network load on the controller side are as follows: cc ,l cm ,l cn ;

[0102] The CPU load, memory load, and network load on the edge device are as follows: ec ,l em ,l en ;

[0103] Queue length m, number of queues n;

[0104] Table 1 is an example of a task configuration table:

[0105]

[0106]

[0107] Table 1

[0108] In the data transmission test process, the controller sends test data and controller load data (such as processor load, memory load, and network load) according to the configured number and length of queues. The edge device parses the received data and obtains the controller load data after removing the test data.

[0109] S2, Calculation of the initial value of queue length M0 and the initial value of queue number N0:

[0110] M0 = max(t) c / T d ,t e / T d )

[0111] N0 = 2

[0112] Here, if M0*T d <t n If so, then a faster network transmission method is needed.

[0113] Additionally, for ease of representation, t in this example... c / T d ,t e / T d All of these represent the results after rounding down the correlation ratio.

[0114] S3, maximum queue length M max Calculation:

[0115] Given the current task, the system consisting of the controller and edge devices, n = N0 and m = M0.

[0116] As m gradually increases (m = m + 1), it can be determined that when max(l) cc ,l cm ,l cn ,l ec ,l em ,l en The value of m when ) = 80% is the corresponding M value for the current task. max Here, 80% is a preset threshold value.

[0117] S4, Optimal queue length M opt The optimal number of queues N opt Calculation:

[0118] Given the current workload, calculate the minimum average system load (Average). min (...), the algorithm pseudocode is described as follows:

[0119]

[0120] Final calculation At this point, the determined values ​​of m and n are M. opt and N opt .

[0121] Figure 5 This example demonstrates how to reconfigure M when resource usage thresholds are exceeded. opt and N opt And update the task configuration table. Figure 6 The method describes how an edge device, upon receiving a changed task information from a higher-level device, redetermines the initial value of the queue length M0 and the initial value of the queue number N0, and reconfigures M0 through the initial configuration. opt and N opt Exceeding resource usage thresholds can occur when the controller's processor, memory, or network load exceeds a preset threshold, such as 80%.

[0122] Figure 7 An application scenario for this example is given, in which the controller collects high-frequency data from the mobile phone's sensors and sends the collected high-frequency data to an edge device according to the configured queue length and number of queues. Specifically, the controller includes:

[0123] The receiving and transmitting module is used to collect high-frequency data from the sensor side and, according to the configured queue length and number of queues, send the collected high-frequency data to the edge device.

[0124] The queue adjustment module is used to adjust the queue length and / or queue data for data transmission testing or sending high-frequency data.

[0125] The device status information collection module is used to collect load data from the controller to provide to edge devices.

[0126] The edge devices specifically include:

[0127] Storage module: Stores the task configuration table and the received high-frequency data.

[0128] Calculation module: Calculates M0, N0, and M max M opt N opt Equal values.

[0129] Equipment status information collection module: obtains T d , t e , l ec ,l em ,l en The relevant data.

[0130] Receive and transmit module: Receives data sent from the controller or upstream device, transmits data (including high-frequency data) to the upstream device, and transmits data (control data, such as configuring queue length and / or queue data) to the controller.

[0131] Please refer to Figure 8 This invention also provides a data transmission configuration device 800, used to configure a first device to transmit data of a target task to a second device, characterized in that the configuration device includes:

[0132] The initial value determination module 801 is used to determine the initial values ​​of the number of queues and the queue length under the target task based on the cycle time of the first device, the cycle time of the second device, and the data sampling interval of the target task.

[0133] The product value determination module 802 is used to obtain the maximum product value of queue length and queue number when the system load reaches a preset threshold through data transmission tests under different queue lengths and / or queue numbers;

[0134] The parameter combination determination module 803 is used to traverse different combinations of transmission parameters with different numbers of queues and queue lengths based on the initial values ​​of the number of queues and queue lengths under the target task and the maximum product value, and obtain the system load evaluation value corresponding to each combination of transmission parameters through data transmission tests under each combination of transmission parameters.

[0135] The configuration module 804 is used to determine the target transmission parameter combination corresponding to the optimal system load assessment value, and configure the first device to transmit the data of the target task according to the target transmission parameter combination.

[0136] Optionally, the initial value determination module is further configured to determine that the initial value of the number of queues under the target task is 2; calculate a first ratio of the loop time of the first device to the data sampling interval of the target task, and round down the first ratio to obtain a first value; calculate a second ratio of the loop time of the second device to the data sampling interval of the target task, and round down the second ratio to obtain a second value; and determine the larger of the first value and the second value as the initial value of the queue length under the target task.

[0137] Optionally, the product value determination module is further configured to maintain the number of queues at 2, configure the first device to gradually increase the queue length from the initial value of the queue length to conduct data transmission tests, obtain the system load status under different queue lengths, and when the system load status reaches a preset threshold, calculate the product value of the queue length and the number of queues based on the current queue length and the number of queues to obtain the maximum product value.

[0138] Optionally, the system load status includes at least one of the following loads: processor load, memory load, and network load of the first device; processor load, memory load, and network load of the second device;

[0139] The system load state reaching the preset threshold means that any one of the at least one loads reaches the corresponding preset threshold.

[0140] Optionally, the parameter combination determination module is further configured to calculate a third ratio between the maximum product value and the initial value of the queue length under the target task, and round down the third ratio to obtain the maximum number of queues; within the interval from the initial value of the queue number to the maximum value, traverse each value of the queue number, wherein, when traversing each value of the queue number, within the interval from the initial value of the queue length to the maximum length value of the queue length under the current queue number, traverse each value of the queue length, configure the first device to perform data transmission test under the current transmission parameter combination of the current queue number and the current queue length, and obtain the system load evaluation value under the current transmission parameter combination.

[0141] Optionally, the maximum queue length value under the current queue number is obtained by rounding down the fourth ratio, which is the ratio of the maximum product value to the current queue number.

[0142] Optionally, the system load assessment value is obtained by averaging at least one of the following loads: processor load, memory load, and network load of the first device; and processor load, memory load, and network load of the second device.

[0143] Optionally, the configuration device further includes:

[0144] The first dynamic adjustment module is used to re-execute the product value determination step, parameter combination determination step, and configuration step when the system load state is detected to exceed a preset threshold, so as to update the target transmission parameter combination and configure the first device to transmit the target task data according to the updated target transmission parameter combination.

[0145] And / or,

[0146] The second dynamic adjustment module is used to, in the event that the target task changes, re-execute the initial value determination step, product value determination step, parameter combination determination step, and configuration step according to the changed target task, so as to update the target transmission parameter combination and configure the first device to transmit the data of the changed target task according to the updated target transmission parameter combination.

[0147] It should be noted that the device in this embodiment corresponds to the configuration method described above. The implementation methods in each of the above embodiments are applicable to the embodiments of this device and can achieve the same technical effect. The device provided by the embodiments of the present invention can implement all the method steps implemented in the above method embodiments and can achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail here.

[0148] Please refer to Figure 9 The present invention also provides a communication device 900, including: a transceiver 901 and a processor 902;

[0149] The transceiver 901 is used to send and / or receive data under the control of the processor.

[0150] The processor 902 is used to perform the following steps:

[0151] Initial value determination steps: Based on the cycle time of the first device, the cycle time of the second device, and the data sampling interval of the target task, determine the initial values ​​of the number of queues and the queue length under the target task;

[0152] Steps for determining the product value: By conducting data transmission tests under different queue lengths and / or queue numbers, the maximum product value of queue length and queue number when the system load reaches a preset threshold is obtained;

[0153] Parameter combination determination steps: Based on the initial values ​​of the number of queues and queue length under the target task and the maximum product value, traverse different combinations of transmission parameters with different numbers of queues and queue lengths, and obtain the system load evaluation value corresponding to each combination of transmission parameters through data transmission tests under each combination of transmission parameters.

[0154] Configuration steps: Determine the target transmission parameter combination corresponding to the optimal system load assessment value, and configure the first device to transmit the data of the target task according to the target transmission parameter combination.

[0155] It should be noted that the device in this embodiment corresponds to the configuration method described above. The implementation methods in each of the above embodiments are applicable to the embodiments of this device and can achieve the same technical effect. The device provided by the embodiments of the present invention can implement all the method steps implemented in the above method embodiments and can achieve the same technical effect. Therefore, the parts that are the same as those in the method embodiments and the beneficial effects will not be described in detail here.

[0156] Please refer to Figure 10 The present invention also provides a communication device 1000, including a processor 1001, a memory 1002, and a computer program stored in the memory 1002 and executable on the processor 1001. When the computer program is executed by the processor 1001, it implements the various processes of the above-described data transmission configuration method embodiment and achieves the same technical effect. To avoid repetition, it will not be described again here.

[0157] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the above-described data transmission configuration method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0158] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0159] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, 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 is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0160] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of the present invention.

Claims

1. A configuration method of data transmission, applied to configure a first device to transmit data of a target task to a second device, characterized in that, The method includes: Initial value determination steps: Based on the cycle time of the first device, the cycle time of the second device, and the data sampling interval of the target task, determine the initial values ​​of the number of queues and the queue length under the target task. The cycle time of the first device refers to the scanning cycle of the first device collecting data of the target task, and the cycle time of the second device refers to the receiving cycle of the second device receiving data collected by the first device. Product value determination step: By conducting data transmission tests under different queue lengths and / or queue numbers, the maximum product value of queue length and queue number when the system load state reaches a preset threshold is obtained, wherein the system load state refers to the load state of the first device and / or the second device; Parameter combination determination steps: Based on the initial values ​​of the number of queues and queue length under the target task and the maximum product value, traverse different combinations of transmission parameters with different numbers of queues and queue lengths, and obtain the system load evaluation value corresponding to each combination of transmission parameters through data transmission tests under each combination of transmission parameters. Configuration steps: Determine the target transmission parameter combination corresponding to the optimal system load assessment value, and configure the first device to transmit the data of the target task according to the target transmission parameter combination.

2. The method of claim 1, wherein, The initial value determination step includes: The initial value for the number of queues under the target task is determined to be 2; Calculate a first ratio of the loop time of the first device to the data sampling interval of the target task, and round down the first ratio to obtain a first value; calculate a second ratio of the loop time of the second device to the data sampling interval of the target task, and round down the second ratio to obtain a second value; determine the larger of the first value and the second value as the initial value of the queue length under the target task.

3. The method of claim 2, wherein, The product value determination step includes: Keeping the number of queues at 2, the first device is configured to gradually increase the queue length from the initial value of the queue length to conduct data transmission tests, obtain the system load status under different queue lengths, and when the system load status reaches a preset threshold, calculate the product value of the queue length and the number of queues based on the current queue length and the number of queues, and obtain the maximum product value.

4. The method according to claim 3, characterized in that, The system load status includes at least one of the following loads: processor load, memory load, and network load of the first device; processor load, memory load, and network load of the second device; The system load state reaching the preset threshold means that any one of the at least one loads reaches the corresponding preset threshold.

5. The method of claim 2, wherein, The parameter combination determination step includes: Calculate the third ratio of the maximum product value to the initial value of the queue length under the target task, and round down the third ratio to obtain the maximum number of queues. Within the range from the initial value of the number of queues to the maximum value, each value of the number of queues is traversed. While traversing each value of the number of queues, within the range from the initial value of the queue length to the maximum length value of the queue length under the current number of queues, each value of the queue length is traversed. The first device is configured to perform data transmission test under the current combination of transmission parameters of the current number of queues and the current queue length, and obtain the system load evaluation value under the current combination of transmission parameters.

6. The method according to claim 5, characterized in that, The maximum queue length value under the current queue number is obtained by rounding down the fourth ratio, which is the ratio of the maximum product value to the current queue number.

7. The method of claim 5, wherein, The system load assessment value is obtained by averaging at least one of the following loads: processor load, memory load, and network load of the first device; and processor load, memory load, and network load of the second device.

8. The method of claim 1, wherein, Also includes: If the system load exceeds a preset threshold, the product value determination step, parameter combination determination step, and configuration step are re-executed to update the target transmission parameter combination, and the first device is configured to transmit the target task data according to the updated target transmission parameter combination.

9. The method of claim 1, wherein, Also includes: If the target task changes, the initial value determination step, product value determination step, parameter combination determination step, and configuration step are re-executed according to the changed target task to update the target transmission parameter combination, and the first device is configured to transmit the data of the changed target task according to the updated target transmission parameter combination.

10. A configuration apparatus of data transmission, applied to configure a first device to transmit data of a target task to a second device, characterized in that, The configuration device includes: The initial value determination module is used to determine the initial values ​​of the number of queues and the queue length under the target task based on the cycle time of the first device, the cycle time of the second device, and the data sampling interval of the target task. The cycle time of the first device refers to the scanning cycle of the first device collecting data of the target task, and the cycle time of the second device refers to the receiving cycle of the second device receiving the data collected by the first device. The product value determination module is used to obtain the maximum product value of queue length and queue number when the system load state reaches a preset threshold by conducting data transmission tests under different queue lengths and / or queue numbers, wherein the system load state refers to the load state of the first device and / or the second device. The parameter combination determination module is used to traverse different combinations of transmission parameters with different numbers of queues and queue lengths based on the initial values ​​of the number of queues and queue lengths under the target task and the maximum product value, and obtain the system load evaluation value corresponding to each combination of transmission parameters through data transmission tests under each combination of transmission parameters. The configuration module is used to determine the target transmission parameter combination corresponding to the optimal system load assessment value, and configure the first device to transmit the data of the target task according to the target transmission parameter combination.

11. The apparatus according to claim 10, characterized in that, The initial value determination module is further configured to determine that the initial value of the number of queues under the target task is 2; calculate the first ratio of the loop time of the first device to the data sampling interval of the target task, and round down the first ratio to obtain a first value; calculate the second ratio of the loop time of the second device to the data sampling interval of the target task, and round down the second ratio to obtain a second value; and determine the larger of the first value and the second value as the initial value of the queue length under the target task.

12. The apparatus according to claim 11, characterized in that, The product value determination module is further configured to maintain the number of queues at 2, configure the first device to gradually increase the queue length from the initial value of the queue length to conduct data transmission tests, obtain the system load status under different queue lengths, and when the system load status reaches a preset threshold, calculate the product value of the queue length and the number of queues based on the current queue length and the number of queues to obtain the maximum product value.

13. The apparatus according to claim 11, characterized in that, The parameter combination determination module is further configured to calculate the third ratio of the maximum product value to the initial value of the queue length under the target task, and round down the third ratio to obtain the maximum number of queues; within the interval from the initial value of the queue number to the maximum value, it iterates through each value of the queue number, wherein, when iterating through each value of the queue number, within the interval from the initial value of the queue length to the maximum length value of the queue length under the current queue number, it iterates through each value of the queue length, configures the first device to perform data transmission test under the current transmission parameter combination of the current queue number and the current queue length, and obtains the system load evaluation value under the current transmission parameter combination.

14. The apparatus of claim 10, wherein, Also includes: The first dynamic adjustment module is used to re-execute the product value determination step, parameter combination determination step, and configuration step when the system load state is detected to exceed a preset threshold, so as to update the target transmission parameter combination and configure the first device to transmit the target task data according to the updated target transmission parameter combination. And / or, The second dynamic adjustment module is used to, in the event that the target task changes, re-execute the initial value determination step, product value determination step, parameter combination determination step, and configuration step according to the changed target task, so as to update the target transmission parameter combination and configure the first device to transmit the data of the changed target task according to the updated target transmission parameter combination.