Data transmission method and device, computer equipment and readable storage medium
By adjusting the data transmission parameters according to the data buffer area storage amount of the edge-end device, the problem of poor data transmission flexibility in the prior art is solved, and more efficient flow control and data transmission stability are achieved.
Patent Information
- Application Number
- CN202411257577.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-11-22
AI Technical Summary
The existing data transmission methods have poor flexibility in flow control, making it difficult to adjust transmission parameters in real time according to the data buffer area storage amount of edge devices, resulting in insufficient accuracy and stability of data transmission.
By determining the target adjustment method based on the storage amount of the data buffer area, adjusting data transmission parameters, such as data transmission rate, fluctuation range and group capacity, ensuring that the data amount per unit time meets the preset range, and achieving flexible control of the data transmission process.
It improves the flexibility and accuracy of data transmission, avoids bandwidth bottlenecks caused by excessive or too small exit traffic, ensures the reliability and stability of data transmission, and is suitable for more application scenarios.
Smart Images

Figure CN119011629A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data transmission method, apparatus, computer equipment, and computer-readable storage medium. Background Art
[0002] With the rapid development of IoT technology, a large number of IoT terminal devices are connected to the cloud IoT platform. The edge end with edge computing capabilities further extends the cloud capabilities of the IoT platform to the edge end, realizes the sinking of computing power, and avoids uploading large amounts of raw data or process data to the cloud through local data processing, thereby alleviating the bandwidth pressure on the cloud.
[0003] In order to ensure the reliability and stability of data transmission, it is necessary to control the flow at the edge. In the related art, flow limitation can be achieved by rate limitation, however, this flow limitation method has poor flexibility and poor flow control accuracy. Summary of the invention
[0004] Based on this, it is necessary to provide a data transmission method, device, computer equipment, and computer-readable storage medium that can improve flexibility in response to the above technical problems.
[0005] In a first aspect, the present application provides a data transmission method, the method comprising:
[0006] In response to the data storage amount in the data buffer area being within a preset data range, determining a target adjustment method according to the data storage amount;
[0007] The data transmission parameter is adjusted according to the target adjustment method to obtain a target transmission parameter, wherein the target transmission parameter is used to adjust the amount of data stored in the data buffer area per unit time;
[0008] The data to be transmitted is received according to the target transmission parameter, and the data to be transmitted is stored in the data buffer area.
[0009] In one embodiment, determining the target adjustment method according to the data storage amount includes:
[0010] When the data storage amount is greater than a first preset threshold, determining the target adjustment mode to be the first preset adjustment mode; and / or,
[0011] When the data storage amount is less than the second preset threshold, the target adjustment mode is determined to be the second preset adjustment mode.
[0012] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the step of adjusting the data transmission parameter according to the target adjustment method to obtain the target transmission parameter includes:
[0013] In response to the target adjustment mode being the first preset adjustment mode, lowering the data transmission rate by a first preset value, and determining the target transmission parameter to be the adjusted data transmission rate; and / or,
[0014] In response to the target adjustment mode being the first preset adjustment mode, the data fluctuation range is expanded according to a first preset step length, and the target transmission parameter is determined to be the adjusted data fluctuation range; and / or,
[0015] In response to the target adjustment mode being the first preset adjustment mode, the data group capacity is reduced by a second preset value, and the target transmission parameter is determined to be the adjusted data group capacity.
[0016] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the step of adjusting the data transmission parameter according to the target adjustment method to obtain the target transmission parameter includes:
[0017] In response to the target adjustment mode being the second preset adjustment mode, increasing the data transmission rate to a third preset value, and determining the target transmission parameter to be the adjusted data transmission rate; and / or,
[0018] In response to the target adjustment mode being the second preset adjustment mode, reducing the data fluctuation range according to the second preset step size, and determining the target transmission parameter to be the adjusted data fluctuation range; and / or,
[0019] In response to the target adjustment mode being the second preset adjustment mode, the data group capacity is increased by a second preset value, and the target transmission parameter is determined to be the adjusted data group capacity.
[0020] In one of the embodiments, before adjusting the data transmission parameters according to the target adjustment method, the method further includes:
[0021] Determine a parameter adjustment priority corresponding to the target adjustment mode, and determine a data transmission parameter according to the parameter adjustment priority.
[0022] In one embodiment, determining the parameter adjustment priority corresponding to the target adjustment method includes:
[0023] In response to the target adjustment mode being the first preset adjustment mode, determining the parameter adjustment priority as data group capacity being higher than data transmission rate and data transmission rate being higher than data fluctuation range; and / or,
[0024] In response to the target adjustment mode being the second preset adjustment mode, the parameter adjustment priority is determined as that the data fluctuation range is higher than the data transmission rate and the data transmission rate is higher than the data group capacity.
[0025] In one of the embodiments, the receiving the data to be transmitted according to the target transmission parameter includes:
[0026] receiving the data to be transmitted according to the adjusted data transmission rate; and / or,
[0027] In response to the difference between the data to be transmitted and the preset value being greater than or equal to the adjusted data fluctuation range, receiving the data to be transmitted; and / or,
[0028] In response to the category of the data to be transmitted being a file category, the data to be transmitted is divided according to the adjusted data group capacity to obtain a plurality of data groups to be transmitted; and the plurality of data groups to be transmitted are received in sequence.
[0029] In one embodiment, the data buffer area includes a real-time data buffer area and a non-real-time data buffer area, and storing the data to be transmitted in the data buffer area includes:
[0030] In response to the data to be transmitted being real-time transmission data, storing the data to be transmitted in a real-time data buffer area; and / or,
[0031] In response to the data to be transmitted being non-real-time transmission data, the data to be transmitted is stored in a non-real-time data buffer area.
[0032] In one embodiment, the method further comprises:
[0033] According to a preset data transmission volume, data is periodically obtained from the real-time data buffer area and the non-real-time data buffer area, and sent to a target platform, wherein the transmission priority of the real-time data buffer area is higher than the transmission priority of the non-real-time data buffer area.
[0034] In a second aspect, the present application further provides a data transmission device, the device comprising:
[0035] A determination module, configured to determine a target adjustment method according to the data storage amount in the data buffer area in response to the data storage amount being within a preset data range;
[0036] An adjustment module, used for adjusting the data transmission parameter according to the target adjustment mode to obtain a target transmission parameter, wherein the target transmission parameter is used for adjusting the amount of data stored in the data buffer area per unit time;
[0037] The receiving module is used to receive the data to be transmitted according to the target transmission parameter and store the data to be transmitted into the data buffer area.
[0038] In one embodiment, the determining module includes:
[0039] A first determining submodule is configured to determine, when the data storage amount is greater than a first preset threshold, that the target adjustment mode is a first preset adjustment mode; and / or,
[0040] The second determining submodule is used to determine that the target adjustment mode is a second preset adjustment mode when the data storage amount is less than a second preset threshold.
[0041] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the adjustment module includes:
[0042] A first adjustment submodule is configured to, in response to the target adjustment mode being the first preset adjustment mode, lower the data transmission rate by a first preset value, and determine the target transmission parameter to be the adjusted data transmission rate; and / or,
[0043] a second adjustment submodule, configured to, in response to the target adjustment mode being the first preset adjustment mode, expand the data fluctuation range according to a first preset step length, and determine the target transmission parameter to be the adjusted data fluctuation range; and / or,
[0044] The third adjustment submodule is used to reduce the data group capacity by a second preset value in response to the target adjustment mode being the first preset adjustment mode, and determine the target transmission parameter to be the adjusted data group capacity.
[0045] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the adjustment module includes:
[0046] a fourth adjustment submodule, configured to, in response to the target adjustment mode being the second preset adjustment mode, increase the data transmission rate to a third preset value, and determine the target transmission parameter to be the adjusted data transmission rate; and / or,
[0047] a fifth adjustment submodule, configured to, in response to the target adjustment mode being the second preset adjustment mode, reduce the data fluctuation range according to the second preset step length, and determine the target transmission parameter to be the adjusted data fluctuation range; and / or,
[0048] The sixth adjustment submodule is used to increase the data group capacity by a second preset value in response to the target adjustment mode being the second preset adjustment mode, and determine the target transmission parameter to be the adjusted data group capacity.
[0049] In one embodiment, the device further comprises:
[0050] The third determination submodule is used to determine the parameter adjustment priority corresponding to the target adjustment mode, and determine the data transmission parameter according to the parameter adjustment priority.
[0051] In one embodiment, the third determining submodule is further used for:
[0052] In response to the target adjustment mode being the first preset adjustment mode, determining the parameter adjustment priority as data group capacity being higher than data transmission rate and data transmission rate being higher than data fluctuation range; and / or,
[0053] In response to the target adjustment mode being the second preset adjustment mode, the parameter adjustment priority is determined as that the data fluctuation range is higher than the data transmission rate and the data transmission rate is higher than the data group capacity.
[0054] In one embodiment, the receiving module includes:
[0055] A first receiving submodule is configured to receive the data to be transmitted according to the adjusted data transmission rate; and / or,
[0056] A second receiving submodule is configured to receive the data to be transmitted in response to the difference between the data to be transmitted and the preset value being greater than or equal to the adjusted data fluctuation range; and / or,
[0057] The third receiving submodule is used for dividing the data to be transmitted according to the adjusted data group capacity to obtain multiple data groups to be transmitted in response to the category of the data to be transmitted being a file category; and receiving the multiple data groups to be transmitted in sequence.
[0058] In one embodiment, the data buffer area includes a real-time data buffer area and a non-real-time data buffer area, and the receiving module includes:
[0059] A first response module is configured to store the data to be transmitted into a real-time data buffer area in response to the data to be transmitted being real-time transmission data; and / or,
[0060] The second response module is used for storing the data to be transmitted into a non-real-time data buffer area in response to the data to be transmitted being non-real-time transmission data.
[0061] In one embodiment, the device further comprises:
[0062] A sending module is used to periodically obtain data from the real-time data buffer area and the non-real-time data buffer area according to a preset data transmission volume, and send the data to the target platform, wherein the transmission priority of the real-time data buffer area is higher than the transmission priority of the non-real-time data buffer area.
[0063] In a third aspect, an embodiment of the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods in the embodiments of the present disclosure are implemented.
[0064] In a fourth aspect, the embodiments of the present disclosure further provide a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the steps of any one of the methods in the embodiments of the present disclosure are implemented.
[0065] The above-mentioned data transmission method, device, computer equipment, and computer-readable storage medium, when performing data transmission, when the data storage capacity of the data buffer area is within a preset data range, determine the target adjustment method corresponding to the data storage capacity, and adjust the data transmission parameters according to the target adjustment method to obtain the target transmission parameters. The target transmission parameters can be used to adjust the amount of data stored in the data buffer area per unit time, receive the data to be transmitted according to the target transmission parameters, and store the data to be transmitted in the data buffer area; through this embodiment, the data transmission parameters can be adjusted in real time and continuously according to the data storage capacity of the data buffer area during the data transmission process, and the data transmission parameters can be flexibly adjusted according to the data storage situation of the data buffer area, thereby realizing flexible control of the data transmission process, improving the accuracy of data transmission control, ensuring the reliability and stability of data transmission, and being suitable for more application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0067] Figure 1 A schematic diagram of a flow chart of a data transmission method in an embodiment;
[0068] Figure 2 A schematic diagram of a flow chart of a data transmission method in another embodiment;
[0069] Figure 3A schematic diagram of a flow chart of a data transmission method in another embodiment;
[0070] Figure 4 A schematic diagram of a flow chart of a data transmission method in another embodiment;
[0071] Figure 5 A schematic diagram of a traffic control rule configuration in one embodiment;
[0072] Figure 6 A schematic diagram of a flow chart of a data transmission method in another embodiment;
[0073] Figure 7 is a structural block diagram of a data transmission device in one embodiment;
[0074] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0075] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0076] In the application scenarios of smart IoT, high concurrency and massive device data make the cloud IoT platform face problems such as high bandwidth pressure and high data processing latency. In this context, edge devices with edge computing capabilities come into being. Although the data preprocessing capabilities of the edge can convert a large amount of original or process data into result data, reducing the data scale, if the edge cannot control the export traffic, the cloud platform will still encounter bandwidth bottlenecks. When the cloud platform encounters a bandwidth bottleneck, if the edge cannot cooperate in limiting the flow, the edge that exceeds the limit will be disconnected and refused to connect. Based on this, in this embodiment, a data buffer area is set, and the transmission parameters are adjusted according to the amount of data in the data buffer area, and the adjusted transmission parameters are used for data reception and storage, thereby realizing subsequent flow control and avoiding the problem of poor data transmission accuracy and poor effect caused by excessive data transmission pressure or low efficiency.
[0077] In one embodiment, Figure 1 As shown, a data transmission method is provided. This embodiment takes the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0078] Step S110, in response to the data storage amount in the data buffer area being within a preset data range, determining a target adjustment method according to the data storage amount;
[0079] In this embodiment, a data buffer area is set. When data is transmitted, the data to be transmitted can be first stored in the data buffer area, and then the data can be obtained from the data buffer area and sent to the target platform. In one example, this embodiment can be applied to the edge end, the data buffer area can be set in the edge end device, and the target platform can include a cloud platform.
[0080] The storage capacity of the data storage area can be determined according to the actual application scenario. In one example, the data buffer area can include one or more, which can be determined according to the actual scenario. The storage capacity of different data buffer areas can be different, and different data buffer areas can be used to store different categories of data to be transmitted.
[0081] The preset data range can be determined according to the actual application scenario. In one example, the preset data range can be determined based on the proportion of the data storage capacity in the actual scenario to the entire data buffer area. When the data storage capacity of the data buffer area is within the preset data range, it can be considered that the data storage capacity in the data buffer area is too large or too small, and the data transmission parameters need to be adjusted.
[0082] Exemplarily, the target adjustment method is determined according to the data storage capacity, and different data storage capacities may correspond to different adjustment methods. In a possible implementation, a mapping relationship between a data storage capacity range and an adjustment method may be set, and a corresponding adjustment method is determined according to the data storage capacity range in which the data storage capacity is located, that is, the target adjustment method. The target adjustment method may include an adjustment strategy for data transmission parameters, and the adjustment strategy may include but is not limited to an adjustment sequence, an adjustment amplitude, etc., which may be determined based on actual application scenarios.
[0083] The size of the data buffer area can be proportional to the memory configuration of the running device. The corresponding data buffer area size can be set according to the data transmission effect and latency. For example, an edge device with 4G memory and an export flow of 10M / s requires a total memory of about 2G for the system and application. Considering the additional consumption of the intermediate data structure conversion, the total buffer size can be set between 10M and 1.6G. The running device may include an edge device.
[0084] Step S120, adjusting the data transmission parameter according to the target adjustment method to obtain a target transmission parameter, wherein the target transmission parameter is used to adjust the amount of data stored in the data buffer area per unit time;
[0085] Exemplarily, the data transmission parameters are adjusted according to the target adjustment mode to obtain the target transmission parameters, wherein the data transmission parameters may be the initial transmission parameters or the target transmission parameters corresponding to the last data transmission, which may be determined according to the actual application scenario. The target transmission parameters may generally be the data transmission parameters corresponding to when the data is stored in the data buffer area during the current data transmission.
[0086] Among them, the target transmission parameter is used to adjust the amount of data stored in the data buffer area per unit time. Different target transmission parameters will result in different amounts of data stored in the data buffer area per unit time. The unit time can be determined based on the actual application scenario. For example, the unit time can be set to seconds, minutes, etc.
[0087] Step S130: receiving data to be transmitted according to the target transmission parameter, and storing the data to be transmitted into the data buffer area.
[0088] Exemplarily, the data to be transmitted is received according to the target transmission parameter, and the data to be transmitted is stored in the data buffer area. Since the amount of data stored in the data buffer area per unit time under different target transmission parameters will also be different, when the data is received and stored according to the target transmission parameter, the amount of data stored in the data buffer area per unit time matches the target transmission parameter. The target transmission parameter may include one or more parameters, which may be determined according to the actual application scenario.
[0089] In some possible application scenarios, the data to be transmitted may include device data, which may include but is not limited to device attribute data, device event data, etc., which can be determined based on the actual application scenario. Device data is generated during the operation and debugging of the device. In one example, the device to be transmitted may include processed device data, for example, the device data is transmitted to the edge device so that data analysis and processing can be performed. The edge device transmits the processed device data to the cloud device to connect the device to the cloud.
[0090] In a possible implementation, after the data to be transmitted is stored in the data buffer area, the data can be periodically obtained from the data buffer area and sent to the target platform, and the target platform can be determined according to the actual application scenario. In one example, the method described in this embodiment can be applied to an edge device, which has edge computing capabilities, and the edge device can process and analyze the received data and convert the received data into result data.
[0091] In the disclosed embodiment, when data transmission is performed, when the data storage capacity of the data buffer area is within a preset data range, a target adjustment method corresponding to the data storage capacity is determined, and the data transmission parameters are adjusted according to the target adjustment method to obtain the target transmission parameters. The target transmission parameters can be used to adjust the amount of data stored in the data buffer area per unit time, and the data to be transmitted is received according to the target transmission parameters, and the data to be transmitted is stored in the data buffer area. Through this embodiment, the data transmission parameters can be adjusted in real time and continuously according to the data storage capacity of the data buffer area during the data transmission process, and the data transmission parameters can be flexibly adjusted according to the data storage situation of the data buffer area, thereby realizing flexible control of the data transmission process, adjusting the export flow of data to the target platform according to the actual application scenario, avoiding the bandwidth bottleneck of the target platform caused by excessively high export flow, improving the accuracy of data transmission control, ensuring the reliability and stability of data transmission, and being suitable for more application scenarios.
[0092] In one embodiment, Figure 2 As shown, the method of determining the target adjustment method according to the data storage amount includes:
[0093] Step S111, when the data storage amount is greater than a first preset threshold, determining the target adjustment mode to be the first preset adjustment mode; and / or,
[0094] Step S112: when the data storage amount is less than a second preset threshold, determining the target adjustment mode to be the second preset adjustment mode.
[0095] Exemplarily, when determining the target adjustment method according to the data storage amount, different target adjustment methods correspond to different ranges of the data storage amount. When the data storage amount is greater than the first preset threshold, it can be considered that the data storage amount in the data buffer area is too large at this time, and the transmission parameters need to be adjusted. The target adjustment method is determined to be the first preset adjustment method. In one example, compared with the transmission parameters before adjustment, the adjusted target transmission parameters obtained after adjustment according to the first preset adjustment method, the amount of data stored in the data buffer area per unit time corresponding to the adjusted target transmission parameters is reduced.
[0096] When the amount of data stored is less than the second preset threshold, it can be considered that the amount of data stored in the data buffer area is small at this time, and the transmission parameters need to be adjusted. The target adjustment method is determined to be the second preset adjustment method. In an example, compared with the transmission parameters before adjustment, the adjusted target transmission parameters are obtained after adjustment according to the second preset adjustment method. The amount of data stored in the data buffer area per unit time corresponding to the adjusted target transmission parameters increases.
[0097] Optionally, the first preset threshold and the second preset threshold are determined according to an actual application scenario, and the first preset threshold is greater than the second preset threshold. In an example, the first preset threshold and the second preset threshold can be determined according to the data storage capacity of the data buffer area.
[0098] In the embodiments of the present disclosure, when determining a target adjustment mode according to the amount of data storage, when the amount of data storage is greater than a first preset threshold, the target adjustment mode is determined as the first preset adjustment mode, and when the amount of data storage is less than a second preset threshold, the target adjustment mode is determined as the second preset adjustment mode. In this way, when the amount of data in the data buffer is too large or too small, different adjustment modes can be used to adjust the data transmission parameters, thereby improving the flexibility of data transmission control and ensuring the reliability and stability of data transmission.
[0099] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the data transmission parameter is adjusted according to the target adjustment method to obtain the target transmission parameter, including:
[0100] In response to the target adjustment mode being the first preset adjustment mode, lowering the data transmission rate by a first preset value, and determining the target transmission parameter to be the adjusted data transmission rate; and / or,
[0101] In response to the target adjustment mode being the first preset adjustment mode, the data fluctuation range is expanded according to a first preset step length, and the target transmission parameter is determined to be the adjusted data fluctuation range; and / or,
[0102] In response to the target adjustment mode being the first preset adjustment mode, the data group capacity is reduced by a second preset value, and the target transmission parameter is determined to be the adjusted data group capacity.
[0103] Exemplarily, the data transmission parameters include at least one of a data transmission rate, a data fluctuation range, and a data group capacity. Among them, the data transmission rate can be the amount of data received and stored in the data buffer area per unit time, the data fluctuation range can be the variation range of the data received and cached, and the data group capacity can be the size of a single data group during packet transmission, which can be determined according to the actual application scenario. The data fluctuation range is the variation range of the data. Data that exceeds the preset variation range is received and cached, and data that does not exceed the preset variation range is discarded. For example, if the value of the previous data is A and the fluctuation range is 50%, data exceeding 1.5A or less than 0.5A is stored, otherwise it is discarded.
[0104] Optionally, when the target adjustment mode is the first preset adjustment mode, it can be considered that the amount of data stored in the data buffer area per unit time needs to be reduced at this time, the first preset value of the data transmission rate is lowered, and the target transmission parameter is determined to be the adjusted data transmission rate, wherein the first preset value can be an adjustment value determined according to the actual application scenario, and different first preset values can correspond to different scenarios. In one example, the association relationship between the first preset value and the number of reductions can also be set. For example, in a continuous reduction scenario, starting from the second reduction, the first preset value at each reduction is determined according to the first preset value at the last reduction, such as the first preset value at each reduction is half of the first preset value at the last reduction. In one example, the minimum transmission rate can be set according to the actual application scenario, and when the data transmission rate is less than or equal to the minimum transmission rate, it is no longer reduced. In one example, a message queue can be created for secondary caching, and the message queue is used to store data that has not yet entered the data buffer area, control the rate at which data enters the data buffer area, and set the maximum storage capacity of the message queue. When the capacity in the message queue exceeds the maximum storage capacity, the data fluctuation range can be adjusted.
[0105] Optionally, when the target adjustment mode is the first preset adjustment mode, it can be considered that the amount of data stored in the data buffer area per unit time needs to be reduced at this time, the data fluctuation range is expanded according to the first preset step length, and the target transmission parameter is determined to be the adjusted data fluctuation range, wherein the first preset step length can be an adjustment value determined according to the actual application scenario, and different scenarios can correspond to different first preset step lengths. In one example, the association between the first preset step length and the number of expansions can also be set. For example, in a continuous expansion scenario, starting from the second expansion, the first preset step length at each expansion is determined according to the first preset step length at the last expansion, such as the first preset step length at each expansion is half of the first preset step length at the last expansion, etc. In one example, a maximum interval can be set according to the actual application scenario, and when the data fluctuation range is greater than or equal to the maximum interval, the data fluctuation range is no longer expanded.
[0106] Optionally, when the target adjustment mode is the first preset adjustment mode, it can be considered that the amount of data stored in the data buffer area per unit time needs to be reduced, the data group capacity is reduced by the second preset value, and the target transmission parameter is determined to be the adjusted data group capacity, wherein the second preset value can be an adjustment value determined according to the actual application scenario, and different second preset values can correspond to different scenarios. In one example, the association between the second preset value and the number of reductions can also be set. For example, in a continuous reduction scenario, starting from the second reduction, the second preset value at each reduction is determined according to the second preset value at the last reduction, such as the second preset value at each reduction is half of the second preset value at the last reduction. In one example, the minimum data group capacity can be set according to the actual application scenario, and when the data group capacity is less than or equal to the minimum data group capacity, the data group capacity is no longer reduced. In one example, when adjusting the data group capacity, the time interval for sending the data group can also be adjusted, such as increasing the time interval for sending the data group. In one example, when the file is a data file, it can be transmitted in pieces, and the data group capacity can be the size of a single piece. When the flow is insufficient, the size of a single piece can be reduced, that is, the capacity of a single array.
[0107] In some possible embodiments, the data to be transmitted may include video stream data, and the data transmission parameters may also include data resolution, frame rate, bit depth, image quality, data compression parameters, etc., which can be specifically determined according to the actual application scenario.
[0108] In the embodiments of the present disclosure, when the amount of data stored is large, the data transmission rate, data fluctuation range, and data group capacity can be adjusted. By lowering the data transmission rate, expanding the data fluctuation range, and reducing the data group capacity, the amount of data stored in the data buffer area per unit time can be effectively reduced, and the problem of excessive pressure on the data buffer area due to excessive data flow can be avoided, thereby achieving efficient and flexible flow control, and effectively improving the stability and reliability of data transmission after storage in the data buffer area.
[0109] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the data transmission parameter is adjusted according to the target adjustment method to obtain the target transmission parameter, including:
[0110] In response to the target adjustment mode being the second preset adjustment mode, increasing the data transmission rate to a third preset value, and determining the target transmission parameter to be the adjusted data transmission rate; and / or,
[0111] In response to the target adjustment mode being the second preset adjustment mode, reducing the data fluctuation range according to the second preset step size, and determining the target transmission parameter to be the adjusted data fluctuation range; and / or,
[0112] In response to the target adjustment mode being the second preset adjustment mode, the data group capacity is increased by a second preset value, and the target transmission parameter is determined to be the adjusted data group capacity.
[0113] Optionally, when the target adjustment mode is the second preset adjustment mode, it can be considered that the amount of data stored in the data buffer area per unit time needs to be increased, the data transmission rate is adjusted to the third preset value, and the target transmission parameter is determined to be the adjusted data transmission rate, wherein the third preset value can be an adjustment value determined according to the actual application scenario, and different third preset values can correspond to different scenarios. In one example, the association between the third preset value and the number of increases can also be set. For example, in a continuous increase scenario, starting from the second increase, the third preset value at each increase is determined according to the third preset value at the last increase, such as the third preset value at each increase is half of the third preset value at the last increase, etc. In one example, the maximum transmission rate can be set according to the actual application scenario, and when the data transmission rate is greater than or equal to the maximum transmission rate, no increase is performed.
[0114] Optionally, when the target adjustment mode is the second preset adjustment mode, it can be considered that the amount of data stored in the data buffer area per unit time needs to be increased, the data fluctuation range is reduced according to the second preset step length, and the target transmission parameter is determined to be the adjusted data fluctuation range, wherein the second preset step length can be an adjustment value determined according to the actual application scenario, and different scenarios can correspond to different second preset step lengths. In one example, the association between the second preset step length and the number of reductions can also be set. For example, in a continuous reduction scenario, starting from the second reduction, the second preset step length at each reduction is determined according to the second preset step length at the last reduction, such as the second preset step length at each reduction is half of the second preset step length at the last reduction, etc. In one example, a minimum interval can be set according to the actual application scenario, and when the data fluctuation range is less than or equal to the minimum interval, the interval reduction is no longer performed.
[0115] Optionally, when the target adjustment mode is the second preset adjustment mode, it can be considered that the amount of data stored in the data buffer area per unit time needs to be increased, the fourth preset value of the data group capacity is increased, and the target transmission parameter is determined to be the adjusted data group capacity, wherein the fourth preset value can be an adjustment value determined according to the actual application scenario, and different fourth preset values can correspond to different scenarios. In one example, the association between the fourth preset value and the number of increases can also be set. For example, in a continuous increase scenario, starting from the second increase, the fourth preset value at each increase is determined according to the fourth preset value at the last increase, such as the fourth preset value at each increase is half of the fourth preset value at the last increase. In one example, the maximum data group capacity can be set according to the actual application scenario, and when the data group capacity is greater than or equal to the maximum data group capacity, the data group capacity is no longer increased. In one example, when adjusting the data group capacity, the time interval for sending the data group can also be adjusted, such as reducing the time interval for sending the data group.
[0116] According to the embodiments of the present disclosure, when the amount of data stored is small, the data transmission rate, data fluctuation range, and data group capacity can be adjusted. By increasing the data transmission rate, reducing the data fluctuation range, and increasing the data group capacity, the amount of data stored in the data buffer area per unit time can be effectively increased, and the utilization rate of the data buffer area can be improved. The efficiency of data transmission can be ensured through flexible flow control, and while ensuring the stability and reliability of data transmission, the efficiency of data transmission is taken into account, making it suitable for more application scenarios.
[0117] In one embodiment, before adjusting the data transmission parameters according to the target adjustment method, the method further includes:
[0118] Determine a parameter adjustment priority corresponding to the target adjustment mode, and determine a data transmission parameter according to the parameter adjustment priority.
[0119] Exemplarily, before performing parameter adjustment, the data transmission parameters may be determined according to the parameter adjustment priority. In one example, different target adjustment methods correspond to different parameter adjustment priorities, and the data transmission parameters are determined according to the parameter adjustment priority and the parameter adjustment situation. In a possible implementation, the corresponding data transmission parameters may be adjusted in sequence according to the parameter adjustment priority.
[0120] Optionally, the parameter adjustment priority may be determined according to an actual application scenario. For example, the parameter adjustment priority may be set according to the impact of different transmission parameters on data transmission quality and data transmission efficiency.
[0121] The disclosed embodiments achieve precise control over data transmission by adjusting the setting of priority through parameters, thereby improving the flexibility of data transmission control and being applicable to more application scenarios.
[0122] In one embodiment, determining the parameter adjustment priority corresponding to the target adjustment mode includes:
[0123] In response to the target adjustment mode being the first preset adjustment mode, determining the parameter adjustment priority as data group capacity being higher than data transmission rate and data transmission rate being higher than data fluctuation range; and / or,
[0124] In response to the target adjustment mode being the second preset adjustment mode, the parameter adjustment priority is determined as that the data fluctuation range is higher than the data transmission rate and the data transmission rate is higher than the data group capacity.
[0125] Exemplarily, the first preset adjustment method is data downgrading, that is, reducing the amount of data stored in the data buffer area per unit time. In one example, during data downgrading, the parameter adjustment priority is that the data group capacity is higher than the data transmission rate and the data transmission rate is higher than the data fluctuation range. The corresponding adjustment order can be set to adjust the data group capacity first, then adjust the data transmission rate, and finally adjust the data fluctuation range; specifically, the data of the file category is generally large and non-real-time transmission data, and the priority is lower. Therefore, downgrading is first performed by adjusting the data group capacity, and the principle of data transmission is to ensure that data is not lost as much as possible. Therefore, if the flow control purpose is still not achieved through the adjustment of the data group capacity, the data transmission rate can continue to be adjusted. If the purpose is still not achieved, the data fluctuation range is finally adjusted.
[0126] Exemplarily, the second preset adjustment method is data upgrade processing, that is, increasing the amount of data stored in the data buffer area per unit time. During data upgrade processing, the parameter adjustment priority is that the data fluctuation range is higher than the data transmission rate and the data transmission rate is higher than the data group capacity. The corresponding adjustment sequence can be to adjust the data fluctuation range first, then adjust the data transmission rate, and finally adjust the data group capacity. By setting the adjustment method, the efficiency and accuracy of data transmission can be taken into account while achieving flow control.
[0127] The disclosed embodiments set parameter adjustment priorities under different adjustment modes according to the influence of different data transmission parameters on data transmission instructions, and adopt the coordination of data transmission rate, data fluctuation range and data group capacity, which complies with the data transmission principle of ensuring data loss to the greatest extent. While ensuring data transmission efficiency and export flow control, the data transmission quality is taken into account, and the problem of large-scale data loss caused by adjustment of data transmission flow is reduced. By adjusting the data group capacity, file data with lower priority is processed first, and then the data inflow speed is slowed down, and finally the data inflow is reduced. The amount of data flowing in per unit time is adjusted step by step. This dynamic adjustment mechanism is beneficial to improving the quality of data transmission.
[0128] In one embodiment, the receiving the data to be transmitted according to the target transmission parameter includes:
[0129] receiving the data to be transmitted according to the adjusted data transmission rate; and / or,
[0130] In response to the difference between the data to be transmitted and the preset value being greater than or equal to the adjusted data fluctuation range, receiving the data to be transmitted; and / or,
[0131] In response to the category of the data to be transmitted being a file category, the data to be transmitted is divided according to the adjusted data group capacity to obtain a plurality of data groups to be transmitted; and the plurality of data groups to be transmitted are received in sequence.
[0132] Exemplarily, the target transmission parameter may include an adjusted data transmission rate. When receiving the data to be transmitted according to the target transmission parameter, the data to be transmitted is received according to the determined adjusted data transmission rate, wherein the unit of the adjusted data transmission rate may be data / second, indicating the number of data received and stored in the data buffer area per second.
[0133] Optionally, the target transmission parameter may include an adjusted data fluctuation range. In one example, the data fluctuation range is for numerical data, that is, for the same parameter, its corresponding value will change, corresponding to different numerical data, usually, the latest numerical data is used as the parameter value corresponding to the parameter.
[0134] When receiving data to be transmitted according to the target transmission parameter, if the data to be transmitted is numerical data corresponding to the parameter, first determine whether the difference between the data to be transmitted and the preset value is outside the adjusted data fluctuation range. Optionally, the preset value is determined according to the actual application scenario. In one example, the preset value can be the previous numerical data corresponding to the parameter and adjacent to the data to be transmitted; in another example, the preset value can be the previous numerical data stored in the data buffer area corresponding to the parameter and adjacent to the data to be transmitted, etc.
[0135] If the difference between the data to be transmitted and the preset value is less than the adjusted data fluctuation range, it can be considered that the numerical data changes little at this time. To ensure data transmission efficiency, there is no need for storage and transmission; if the difference between the data to be transmitted and the preset value is greater than or equal to the adjusted data fluctuation range, it can be considered that the data changes greatly at this time and needs to be stored and transmitted, and the data to be transmitted is received.
[0136] Optionally, the target transmission parameter may include an adjusted data group capacity. In one example, the data group capacity is for file category data, and when the data to be transmitted is file category data, it can be divided into multiple data groups for sequential transmission and storage. Exemplarily, the adjusted data group capacity corresponds to a single data group size, and the data to be transmitted is divided according to the adjusted data group capacity to obtain multiple data groups to be transmitted, and the multiple data groups to be transmitted are received sequentially.
[0137] The embodiments of the present disclosure, when receiving data to be transmitted according to target transmission parameters, can flexibly control the data transmission process through data transmission rate, data fluctuation range, and data group capacity, taking into account the stability and efficiency of data transmission, and control data transmission through different transmission parameters, effectively improving the flexibility of data transmission control, and ensuring the accuracy and effectiveness of the data transmission control process.
[0138] In one embodiment, Figure 3 As shown, the data buffer area includes a real-time data buffer area and a non-real-time data buffer area, and storing the data to be transmitted in the data buffer area includes:
[0139] Step S131, in response to the data to be transmitted being real-time transmission data, storing the data to be transmitted in a real-time data buffer area; and / or,
[0140] Step S132: In response to the data to be transmitted being non-real-time transmission data, storing the data to be transmitted in a non-real-time data buffer area.
[0141] Exemplarily, the data buffer area can be classified, and different data buffer areas are used to store different types of data. Optionally, the data buffer area includes a real-time data buffer area and a non-real-time data buffer area, wherein the real-time data buffer area is used to store real-time transmission data, that is, data that needs to be transmitted in real time, and the non-real-time data buffer area is used to store non-real-time transmission data, that is, data that does not need to be transmitted in real time.
[0142] In one example, the real-time data type that needs to be transmitted in real time and the non-real-time data type that does not need to be transmitted in real time can be determined in advance according to the actual application scenario, and the corresponding storage rules can be established. After receiving the data to be transmitted, the data type corresponding to the data to be transmitted is determined, and based on the storage rules, it is determined whether the data corresponding to the data type is real-time transmission data or non-real-time transmission data.
[0143] If the data to be transmitted is real-time transmission data, the data to be transmitted is stored in the real-time data buffer area. If the data to be transmitted is non-real-time transmission data, the data to be transmitted is stored in the non-real-time data buffer area.
[0144] In one example, the storage space sizes of the real-time data buffer area and the non-real-time data buffer area may be determined according to actual application scenarios, and the storage space sizes of the real-time data buffer area and the non-real-time data buffer area may be the same or different.
[0145] Exemplarily, the method described in this embodiment can be applied to device data transmission scenarios. Normally, the data to be transmitted may include device attribute data and device event data. The data type corresponding to data that requires low latency to report and is minimized from being lost is determined as a real-time data type, and the data type corresponding to data that has a greater tolerance for latency and loss is determined as a non-real-time data type.
[0146] The disclosed embodiment further refines the data buffer area. When storing the data to be transmitted in the data buffer area, the data to be transmitted are stored in the real-time data buffer area and the non-real-time data buffer area respectively according to the type of the data to be transmitted, thereby realizing different data partition caches. In the subsequent data transmission process, the data can be classified for transmission, thereby ensuring the stability and reliability of data transmission.
[0147] In one embodiment, Figure 4 As shown, the method also includes:
[0148] Step S140, according to the preset data transmission volume, periodically obtain data from the real-time data buffer area and the non-real-time data buffer area, and send it to the target platform, wherein the transmission priority of the real-time data buffer area is higher than the transmission priority of the non-real-time data buffer area.
[0149] Exemplarily, data is acquired from the data buffer area and sent to the target platform according to a preset data transmission volume. The preset data transmission volume may be determined in advance according to an actual application scenario, and the cycle for acquiring data may also be determined in advance according to an actual application scenario.
[0150] In this embodiment, the priority of data transmission is set, and the transmission priority of the real-time data buffer area is higher than the transmission priority of the non-real-time data buffer area. When acquiring data from the data buffer area, the data in the real-time data buffer area is acquired first. If the preset data transmission amount has not been reached after the data in the real-time data buffer area is acquired, the data is continuously acquired from the non-real-time data buffer area.
[0151] The target platform may be a platform for receiving data to be transmitted determined according to an actual application scenario. In one example, the target platform may include but is not limited to a cloud platform, a business platform, etc. Compared with directly transmitting a large amount of raw data, the data transmission efficiency is effectively improved and the pressure of data transmission is alleviated. For example, the method described in this embodiment can be applied to the edge end. Through this embodiment, the egress traffic from the edge end to the target platform can be controlled to avoid bandwidth bottlenecks.
[0152] In one example, the method described in this embodiment is applied to the edge end, and the edge end corresponds to egress traffic, that is, the egress traffic of the edge device, wherein the egress traffic of the edge device can also be set and adjusted. Exemplarily, the cloud can remotely configure the egress traffic of the edge device, and when abnormal traffic or bandwidth fluctuations are detected in the cloud, adaptive adjustments can be made. At the same time, the edge device will continue to monitor the real-time outflow data volume. If the actual egress traffic is lower than the traffic threshold allowed by the traffic control rule node, the edge will perform a local bandwidth test. If the test results show that the bandwidth is insufficient to support the current egress traffic, the edge will temporarily adjust the egress traffic setting to ensure the effective transmission of real-time data and reduce the risk of data being discarded at the bottom of the network.
[0153] The disclosed embodiment periodically obtains data from the real-time data buffer area and the non-real-time data buffer area according to a preset data transmission volume and sends the data to the target platform. The data can be transmitted to the target platform efficiently and accurately, and the flow control when the data is transmitted to the target platform is realized by controlling the transmission parameters of the data buffer area, thereby avoiding the problem of high pressure on the target platform caused by excessive transmission flow or low data transmission efficiency caused by too small transmission flow, thereby ensuring the reliability and efficiency of data transmission; and by setting the transmission priority of the cache area, the orderliness of data transmission is improved, and the hidden dangers caused by data loss are reduced, which is suitable for more application scenarios.
[0154] In one example, a series of rule nodes can be developed in the rule engine module of the overall data transmission framework. The rule nodes can be adjusted and set through a visual draggable configuration page to adjust the rules of flow control such as transmission parameters and data types to achieve flow control.
[0155] Figure 5A schematic diagram of a flow control rule configuration according to an exemplary embodiment is shown, referring to Figure 5 As shown, the data to be transmitted is classified from the aspect of timeliness, and is divided into real-time transmission data and non-real-time transmission data, and the traffic is comprehensively controlled, and the data to be sent is pushed subsequently. In one example, two rule nodes for the data to be sent are dragged out in the visual interface, corresponding to real-time transmission data and non-real-time transmission data. The two nodes each select the corresponding data type, so that real-time transmission data and non-real-time transmission data can be subscribed to from the data bus respectively. In one example, when the application scenario is the transmission of device data, the real-time transmission data may include device event data such as alarm data and fault data; the non-real-time transmission data may include device attribute data such as device parameter data, which can be determined based on the data type and data transmission requirements in the actual application scenario.
[0156] The disclosed embodiment implements traffic control in combination with a rule engine, thereby achieving detailed end-to-end traffic management; maintaining visualization of the configuration process and reducing operational difficulty.
[0157] Figure 6 FIG. 1 is a flow chart of a data transmission method according to an exemplary embodiment. Figure 6 As shown, by classifying and subscribing to data, classified storage and transmission of real-time transmission data and non-real-time transmission data are realized. After receiving the data, they are stored in the corresponding data buffer area respectively. Data is periodically obtained from the data buffer area, where the priority of the real-time data buffer area is higher than that of the non-real-time data buffer area. The period can be configured, and the smaller the period, the smaller the delay of the corresponding data being sent to the target platform. After obtaining the data from the data buffer area, the data is sent to the target platform.
[0158] In one example, the size of the real-time data buffer area and the non-real-time data buffer area can be determined according to the actual application scenario. For example, the size of the data buffer area can be set to several to dozens of times the export flow of the target platform, which can be determined according to the memory configuration of the device corresponding to the target platform. In one example, when the data buffer area is full, a cyclic overwrite is performed to discard the data that entered the data buffer area the earliest so that new data can enter the buffer.
[0159] Before acquiring data from the data buffer area, the data transmission parameters are adjusted according to the amount of data in the data buffer area. When the amount of data in the data buffer area is greater than or equal to a first preset threshold, i.e., a downgrade threshold, the data transmission parameters are adjusted, i.e., downgrade processing is performed, and the amount of data stored in the data buffer area per unit time corresponding to the adjusted data transmission parameters is reduced; when the amount of data in the data buffer area is less than or equal to a second preset threshold, i.e., an upgrade threshold, the data transmission parameters are adjusted, i.e., an upgrade processing is performed, and the amount of data stored in the data buffer area per unit time corresponding to the adjusted data transmission parameters is increased.
[0160] In one example, to avoid frequent switching between upgrade and downgrade operations, a minimum execution time may be set for the downgrade process, and data upgrade processing may be performed only when the minimum execution time is exceeded after the downgrade.
[0161] The disclosed embodiments ensure that the export traffic is always within preset limits through flow control of data transmission, and can respond to cloud instructions to make remote policy adjustments, or automatically optimize according to local network conditions. Moreover, through dynamic modification of real-time and non-real-time data classification, it can adapt to different business needs and process complex business logic, and can meet the needs of complex business scenarios with greater flexibility.
[0162] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0163] Based on the same inventive concept, the embodiment of the present application also provides a data transmission device for implementing the data transmission method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more data transmission device embodiments provided below can refer to the limitations on the data transmission method above, and will not be repeated here.
[0164] In an exemplary embodiment, Figure 7 As shown, a data transmission device 700 is provided, comprising:
[0165] A determination module 710, configured to determine a target adjustment method according to the data storage amount in the data buffer area in response to the data storage amount being within a preset data range;
[0166] An adjustment module 720, configured to adjust the data transmission parameter according to the target adjustment method to obtain a target transmission parameter, wherein the target transmission parameter is used to adjust the amount of data stored in the data buffer area per unit time;
[0167] The receiving module 730 is used to receive the data to be transmitted according to the target transmission parameter and store the data to be transmitted into the data buffer area.
[0168] In one embodiment, the determining module includes:
[0169] A first determining submodule is configured to determine, when the data storage amount is greater than a first preset threshold, that the target adjustment mode is a first preset adjustment mode; and / or,
[0170] The second determining submodule is used to determine that the target adjustment mode is a second preset adjustment mode when the data storage amount is less than a second preset threshold.
[0171] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the adjustment module includes:
[0172] A first adjustment submodule is configured to, in response to the target adjustment mode being the first preset adjustment mode, lower the data transmission rate by a first preset value, and determine the target transmission parameter to be the adjusted data transmission rate; and / or,
[0173] a second adjustment submodule, configured to, in response to the target adjustment mode being the first preset adjustment mode, expand the data fluctuation range according to a first preset step length, and determine the target transmission parameter to be the adjusted data fluctuation range; and / or,
[0174] The third adjustment submodule is used to reduce the data group capacity by a second preset value in response to the target adjustment mode being the first preset adjustment mode, and determine the target transmission parameter to be the adjusted data group capacity.
[0175] In one embodiment, the data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the adjustment module includes:
[0176] a fourth adjustment submodule, configured to, in response to the target adjustment mode being the second preset adjustment mode, increase the data transmission rate to a third preset value, and determine the target transmission parameter to be the adjusted data transmission rate; and / or,
[0177] a fifth adjustment submodule, configured to, in response to the target adjustment mode being the second preset adjustment mode, reduce the data fluctuation range according to the second preset step length, and determine the target transmission parameter to be the adjusted data fluctuation range; and / or,
[0178] The sixth adjustment submodule is used to increase the data group capacity by a second preset value in response to the target adjustment mode being the second preset adjustment mode, and determine the target transmission parameter to be the adjusted data group capacity.
[0179] In one embodiment, the device further comprises:
[0180] The third determination submodule is used to determine the parameter adjustment priority corresponding to the target adjustment mode, and determine the data transmission parameter according to the parameter adjustment priority.
[0181] In one embodiment, the third determining submodule is further used for:
[0182] In response to the target adjustment mode being the first preset adjustment mode, determining the parameter adjustment priority as data group capacity being higher than data transmission rate and data transmission rate being higher than data fluctuation range; and / or,
[0183] In response to the target adjustment mode being the second preset adjustment mode, the parameter adjustment priority is determined as that the data fluctuation range is higher than the data transmission rate and the data transmission rate is higher than the data group capacity.
[0184] In one embodiment, the receiving module includes:
[0185] A first receiving submodule is configured to receive the data to be transmitted according to the adjusted data transmission rate; and / or,
[0186] A second receiving submodule is configured to receive the data to be transmitted in response to the difference between the data to be transmitted and the preset value being greater than or equal to the adjusted data fluctuation range; and / or,
[0187] The third receiving submodule is used for dividing the data to be transmitted according to the adjusted data group capacity to obtain multiple data groups to be transmitted in response to the category of the data to be transmitted being a file category; and receiving the multiple data groups to be transmitted in sequence.
[0188] In one embodiment, the data buffer area includes a real-time data buffer area and a non-real-time data buffer area, and the receiving module includes:
[0189] A first response module is configured to store the data to be transmitted into a real-time data buffer area in response to the data to be transmitted being real-time transmission data; and / or,
[0190] The second response module is used for storing the data to be transmitted into a non-real-time data buffer area in response to the data to be transmitted being non-real-time transmission data.
[0191] In one embodiment, the device further comprises:
[0192] A sending module is used to periodically obtain data from the real-time data buffer area and the non-real-time data buffer area according to a preset data transmission volume, and send the data to the target platform, wherein the transmission priority of the real-time data buffer area is higher than the transmission priority of the non-real-time data buffer area.
[0193] Each module in the above data transmission device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0194] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data to be transmitted and other data involved in the method described in this embodiment. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a data transmission method is implemented.
[0195] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0196] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0197] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0198] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0199] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0200] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0201] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0202] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data transmission method, characterized in that: The method comprises: In response to the data storage amount in the data buffer area being within a preset data range, determining a target adjustment method according to the data storage amount; The data transmission parameter is adjusted according to the target adjustment method to obtain a target transmission parameter, wherein the target transmission parameter is used to adjust the amount of data stored in the data buffer area per unit time; The data to be transmitted is received according to the target transmission parameter, and the data to be transmitted is stored in the data buffer area.
2. The method according to claim 1, characterized in that Determining the target adjustment method according to the data storage amount includes: When the data storage amount is greater than a first preset threshold, determining the target adjustment mode to be the first preset adjustment mode; and / or, When the data storage amount is less than the second preset threshold, the target adjustment mode is determined to be the second preset adjustment mode.
3. The method according to claim 2, characterized in that The data transmission parameter includes at least one of a data transmission rate, a data fluctuation range, and a data group capacity, and the data transmission parameter is adjusted according to the target adjustment method to obtain a target transmission parameter, including: In response to the target adjustment mode being the first preset adjustment mode, lowering the data transmission rate by a first preset value, and determining the target transmission parameter to be the adjusted data transmission rate; and / or, in response to the target adjustment mode being the first preset adjustment mode, expanding the data fluctuation range according to a first preset step size, and determining the target transmission parameter to be the adjusted data fluctuation range; and / or, in response to the target adjustment mode being the first preset adjustment mode, reducing the data group capacity by a second preset value, and determining the target transmission parameter to be the adjusted data group capacity; In response to the target adjustment mode being the second preset adjustment mode, the data transmission rate is increased by a third preset value, and the target transmission parameter is determined to be the adjusted data transmission rate; and / or, in response to the target adjustment mode being the second preset adjustment mode, the data fluctuation range is reduced according to a second preset step size, and the target transmission parameter is determined to be the adjusted data fluctuation range; and / or, in response to the target adjustment mode being the second preset adjustment mode, the data group capacity is increased by a second preset value, and the target transmission parameter is determined to be the adjusted data group capacity.
4. The method according to claim 3, characterized in that Before adjusting the data transmission parameters according to the target adjustment method, the method further includes: Determine a parameter adjustment priority corresponding to the target adjustment mode, and determine a data transmission parameter according to the parameter adjustment priority.
5. The method according to claim 4, characterized in that Determining the parameter adjustment priority corresponding to the target adjustment method includes: In response to the target adjustment mode being the first preset adjustment mode, determining the parameter adjustment priority as data group capacity being higher than data transmission rate and data transmission rate being higher than data fluctuation range; and / or, In response to the target adjustment mode being the second preset adjustment mode, the parameter adjustment priority is determined as that the data fluctuation range is higher than the data transmission rate and the data transmission rate is higher than the data group capacity.
6. The method according to claim 3, characterized in that The receiving the data to be transmitted according to the target transmission parameter comprises: receiving the data to be transmitted according to the adjusted data transmission rate; and / or, In response to the difference between the data to be transmitted and the preset value being greater than or equal to the adjusted data fluctuation range, receiving the data to be transmitted; and / or, In response to the category of the data to be transmitted being a file category, the data to be transmitted is divided according to the adjusted data group capacity to obtain a plurality of data groups to be transmitted; and the plurality of data groups to be transmitted are received in sequence.
7. The method according to claim 1, characterized in that The data buffer area includes a real-time data buffer area and a non-real-time data buffer area, and storing the data to be transmitted in the data buffer area includes: In response to the data to be transmitted being real-time transmission data, storing the data to be transmitted in a real-time data buffer area; and / or, In response to the data to be transmitted being non-real-time transmission data, the data to be transmitted is stored in a non-real-time data buffer area.
8. A data transmission device, characterized in that: The device comprises: A determination module, configured to determine a target adjustment method according to the data storage amount in the data buffer area in response to the data storage amount being within a preset data range; An adjustment module, used for adjusting the data transmission parameter according to the target adjustment mode to obtain a target transmission parameter, wherein the target transmission parameter is used for adjusting the amount of data stored in the data buffer area per unit time; The receiving module is used to receive the data to be transmitted according to the target transmission parameter and store the data to be transmitted into the data buffer area.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
State monitoring method and system of industrial internet equipment and storage medium
CN119356191A
Data transmission method and device, equipment and storage medium
CN119814549A
