Data transmission volume adjustment method, device, electronic device and storage medium
By testing transmission batches to sense changes in the transmission environment and adjust the data batch size, the problem of low data transmission efficiency in the existing technology is solved and more efficient data transmission is achieved.
Patent Information
- Application Number
- CN202211601597.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-13
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-12-13
AI Technical Summary
In the existing technology, the data batch size cannot be automatically adjusted according to changes in the transmission environment during data transmission, resulting in reduced transmission efficiency, and it is necessary to determine the appropriate data batch size through repeated testing and reliance on experience.
By obtaining the data volume of the current basic transmission batch, and using the trial transmission batch to trial the data batch size suitable for the current transmission environment, compare the transmission efficiency. If the efficiency of the trial transmission batch is higher than or equal to that of the ordinary transmission batch efficiency, the subsequent data volume will be adjusted to suit the current environment.
Dynamically adjust the data batch size to adapt to changes in the transmission environment, improve data transmission efficiency, and avoid the problems of wasting hardware resources and reducing transmission efficiency.
Smart Images

Figure CN116192759B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for adjusting data transmission volume. Background Art
[0002] In the field of big data, data transmission refers to the process of transmitting data from the sender to the receiver. Generally, data is transmitted in batches. That is, several pieces of data are divided into a batch, and then the batch of data is transmitted to the receiver as a whole at one time. Among them, the data transmission process is related to the transmission environment. In order to improve the transmission efficiency of data transmission, the amount of data contained in a batch should be determined according to the current transmission environment.
[0003] Data transmission efficiency refers to the amount of data transmitted by a data transmission channel per unit time. It is positively correlated with the amount of data contained in a batch and negatively correlated with the transmission time of the batch, and the amount of data will affect the transmission time. In order to maximize the transmission efficiency, it is necessary to reasonably plan the amount of data contained in a batch. A common method for determining the amount of data corresponding to a batch is to test it in advance when developing an application, continuously test transmission with different data amounts, and compare their transmission efficiency to determine the data batch size with better transmission efficiency (that is, the amount of data included in the batch).
[0004] However, the transmission environment of the application will continue to change, and the data batch size measured during software development may not be applicable to all transmission environments. If data is always transmitted according to this data batch size, the data transmission efficiency will be seriously affected. Therefore, how to adjust the data batch size according to the changes in the transmission environment to improve the data transmission efficiency has become an urgent problem to be solved. Summary of the invention
[0005] In view of this, the present application provides a method, device, electronic device and storage medium for adjusting the data transmission volume, so as to solve the problem in the prior art that the data batch size cannot change with the change of the transmission environment during data transmission, and data can only be transmitted according to the data batch size measured during software development, thereby seriously affecting the data transmission efficiency.
[0006] A first aspect of an embodiment of the present application provides a method for adjusting a data transmission amount, the method comprising:
[0007] Get the basic data volume corresponding to the current basic transmission batch.
[0008] The amount of trial data corresponding to the trial transmission batch is determined according to the basic data amount and the preset data change amount.
[0009] When transmitting the basic data amount corresponding to the current basic transmission batch and the trial data amount corresponding to the trial transmission batch in sequence, if the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, the data amount corresponding to the subsequent basic transmission batch will be modified to the trial data amount.
[0010] The first transmission efficiency is used to characterize the transmission speed of data corresponding to the current basic transmission batch, and the second transmission efficiency is used to characterize the transmission speed of data corresponding to the trial transmission batch.
[0011] A second aspect of an embodiment of the present application provides a device for adjusting data transmission volume, the device comprising:
[0012] The acquisition unit is used to acquire the basic data volume corresponding to the current basic transmission batch.
[0013] The determination unit is used to determine the trial data volume corresponding to the trial transmission batch according to the basic data volume and the preset data change volume.
[0014] The transmission unit is used to sequentially transmit a basic data volume corresponding to a current basic transmission batch and a trial data volume corresponding to a trial transmission batch.
[0015] The processing unit is used for modifying the data volume corresponding to the subsequent basic transmission batch to the trial data volume if the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch during the data transmission process of the transmission unit.
[0016] The first transmission efficiency is used to characterize the transmission speed of data corresponding to the current basic transmission batch, and the second transmission efficiency is used to characterize the transmission speed of data corresponding to the trial transmission batch.
[0017] A third aspect of an embodiment of the present application further provides an electronic device, including: a processor and a memory.
[0018] The memory stores computer-executable instructions.
[0019] The processor executes the computer execution instruction, so that the electronic device executes the method for adjusting the data transmission volume as described in the first aspect and various possible designs above.
[0020] The fourth aspect of the embodiment of the present application also provides a computer-readable storage medium, which stores computer execution instructions. When the computer execution instructions are executed by a processor, they are used to implement the method for adjusting the data transmission volume as described in the first aspect and various possible designs mentioned above.
[0021] The method provided in the embodiment of the present application uses a trial transmission batch to test the data batch size suitable for the current transmission environment during the data transmission process. Specifically, the amount of data contained in the ordinary transmission batch is determined according to the basic data amount, and then the amount of trial data corresponding to the trial transmission batch is determined with reference to the basic data amount. Then, the data of the ordinary transmission batch and the data of the trial transmission batch are transmitted at one time, and the transmission efficiency of each is calculated. If the transmission efficiency of the trial transmission batch is greater than or equal to the transmission efficiency of the ordinary transmission batch, then the data amount of the subsequent ordinary transmission batch is modified to the trial data amount to suit the current transmission environment. Then the subsequent trial transmission batches continue to test to cope with the ever-changing transmission environment.
[0022] In this technical solution, the transmission results of the trial transmission batch can be used to perceive the changes in the transmission environment, and by comparing the transmission efficiency of the trial transmission batch and the ordinary transmission batch, the data batch size with higher transmission efficiency under the current transmission environment can be determined, and the data volume of most subsequent transmission batches (ordinary transmission batches) can be adjusted according to the more optimal data batch size, so that the data volume of the subsequent ordinary transmission batches is more suitable for the transmission environment, thereby improving the transmission efficiency of the subsequent ordinary transmission batches. That is, this method will dynamically adjust the data volume of the ordinary transmission batch as the transmission environment changes, making it more suitable for the current operating environment, thereby greatly increasing the data transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application 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 drawings can be obtained based on these drawings without paying creative labor.
[0024] Figure 1 A schematic diagram of a data transmission scenario provided in an embodiment of the present application;
[0025] Figure 2 A flowchart of a method for adjusting the data transmission volume provided in an embodiment of the present application;
[0026] Figure 3 A flowchart of another method for adjusting the data transmission rate provided in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of the structure of a device for adjusting the data transmission rate provided in an embodiment of the present application;
[0028] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The present application provides a method, device, electronic device and storage medium for adjusting the data transmission amount, which is used to solve the problem in the prior art that during data transmission, the batch size of data cannot change with the change of the transmission environment, and data can only be transmitted according to the batch size measured during software development, which seriously affects the data transmission efficiency.
[0030] In order to enable those skilled in the art to better understand the technical solution of the present application, the present application is described clearly and completely below in conjunction with the drawings in the embodiments of the present application. However, the present application can be implemented in many other ways different from the above description. Therefore, based on the embodiments provided by the present application, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] In the field of big data, data transmission refers to the transmission of data to be transmitted from the sender to the receiver. In the process of data transmission, there are often multiple pieces of data to be transmitted, but they are not transmitted one by one, but in batches. That is, each time data is transmitted, several pieces of data need to be grouped into a batch and transmitted to the receiver as a whole at one time. The purpose of this is to increase the transmission speed. For example, if it takes 10ms to transmit once, if only one piece of data is transmitted at a time, and the number of data to be transmitted is large enough, such as 100, then it will take at least 1s to transmit these data. If the batch transmission method is used, assuming that a batch contains 50 pieces of data, the transmission time of a batch may be 50ms, and two batches are required to transmit all the data, that is, at least 0.1s can be used to transmit all the data.
[0033] In the process of transmitting large amounts of data, batch transmission is more efficient than line transmission, so batch transmission is usually used for data transmission. In the process of batch transmission, the transmission time of each batch of data is closely related to the operating environment (transmission environment) of the application. Specifically, the underlying logic, the size of the network packet, the input and output methods of the receiver, the design principle of the database, etc. will affect its transmission speed.
[0034] Among them, data transmission efficiency refers to the amount of data transmitted by the data transmission channel per unit time, which is positively correlated with the total amount of data and negatively correlated with the transmission time. It is understandable that in order to improve the data transmission efficiency of a batch, the amount of data contained in a batch should be as large as possible when transmitting data. However, the amount of data will affect the data transmission time. For example, a large amount of data will affect the selection of the transmission path. In order to reduce packet loss, the transmission network must select a forwarding device with sufficient network resources when selecting a path, which is likely to select a longer transmission path, resulting in a long transmission time. Or, if a large amount of resources of the receiver are occupied by other tasks, and only a small part of the resources are used to receive data, then a batch containing too much data will likely require a lot of time to receive, which will also increase the transmission time. Therefore, the amount of data contained in a batch is not the larger the better, but a reasonable value needs to be determined according to the transmission environment, so that more data can be transmitted within a reasonable transmission time, thereby improving the transmission efficiency.
[0035] Currently, application developers cannot directly determine the optimal data batch size based on the transmission environment. Generally, the optimal data batch size is determined through experience, repeated experiments, etc. Generally, developers will test in advance when developing applications, use different data volumes to continuously transmit, and compare their transmission efficiency to determine the data batch size with the best transmission efficiency and use the data batch size to determine the data contained in each batch. However, after the application has been running for many years, its operating environment often changes. For example, the network cable is upgraded to a network cable with higher quality transmission efficiency, the database version is upgraded, and the data receiving performance of the receiver is improved, which will cause the data batch size obtained by the test to no longer be applicable to the current operating environment. If data is still transmitted according to the data batch size obtained by the test at this time, the data transmission performance will be seriously affected. For example, the data volume of the better data batch size in the current environment has become 1805, but the application cannot perceive the environmental changes and still transmits data according to the original 1024. Then, it will cause a waste of hardware resources of the data sender and the data receiver, and also lead to low data transmission efficiency.
[0036] Therefore, the prior art method for determining the data batch size has the following problems:
[0037] First, developers need to test repeatedly to get the data batch size value.
[0038] Second, the data batch size value can only be obtained by relying on the experience of technical personnel.
[0039] Third, when the transmission environment of the application changes, the data batch size value in the technical solution cannot be automatically adjusted, which can easily cause a waste of hardware resources during data transmission and seriously affect data transmission efficiency.
[0040] Therefore, how to adjust the data batch size according to changes in the transmission environment to improve data transmission efficiency has become an urgent problem that needs to be solved.
[0041] In response to the above problems, the present application provides a method, device, electronic device and storage medium for adjusting the data transmission volume. In an embodiment of the present application, a trial transmission batch is used to test the data batch size suitable for the current transmission environment during the data transmission process. If the transmission efficiency of the trial transmission batch is greater than or equal to the transmission efficiency of the ordinary transmission batch, then the data volume of the subsequent ordinary transmission batch is modified to the trial data volume to suit the current transmission environment. Then the subsequent trial transmission batches continue to test to cope with the ever-changing transmission environment. The method, device, terminal and computer-readable storage medium described in the present application are further described in detail below in conjunction with specific embodiments and drawings.
[0042] Based on the above problems existing in the prior art, Figure 1 The following is a schematic diagram of a data transmission scenario provided by an embodiment of the present application to solve the above technical problems. Figure 1 As shown, the scenario diagram includes: a sending device 11, a computing device 12 and a receiving device 13.
[0043] Among them, this application scenario is only an example, and data transmission can also be sent from the sending device 11 to the computing device 12, etc., and this application scenario is not a limitation of the present application. In addition, for the content not disclosed in this application scenario, please refer to the following embodiments.
[0044] Optionally, both the sender device 11 and the receiver device 13 have application A installed, and the computing device 12 provides services for the application A and may be a server.
[0045] In one possible implementation, the sending device 11 sends data to the receiving device 13 through the application A. At this time, in order to adapt to the operating environment of the application A, the computing device 12 adjusts the data batch size through the technical solution provided by the embodiment of the present application (see below for details), and transmits data according to the data batch size in the subsequent data transmission.
[0046] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0047] Figure 2 Schematic diagram of a flow chart of a method for adjusting the data transmission volume provided in an embodiment of the present application. Figure 2 As shown, the method for adjusting the data transmission volume may include the following steps:
[0048] 201. Obtain the basic data volume corresponding to the current basic transmission batch.
[0049] When the application runs in the runtime environment, it provides data transmission services for the data sender and the data receiver. When the data sender sends data to the data receiver, the data is transmitted in batches. At this time, it is necessary to obtain the basic data volume corresponding to the current basic transmission batch, which is used to reflect the size of the data volume contained in the basic transmission batch. Exemplarily, the basic data volume can be 1000, that is, each basic transmission batch includes 1000 data to be transmitted, that is, the data sender will send 1000 data to the data receiver at one time.
[0050] Among them, the basic transmission batch refers to a normal data transmission batch. The basic data volume is the initial data volume specified in a certain standard. That is, the basic data volume is the initial data volume corresponding to the basic transmission batch, and the data volume corresponding to the basic transmission batch should change with the change of the environment. The basic data volume can be used as a reference data volume to determine whether the new data volume corresponding to the subsequent basic transmission batch can improve the transmission efficiency.
[0051] 202. Determine the trial data volume corresponding to the trial transmission batch according to the basic data volume and the preset data change volume.
[0052] Among them, the trial transmission batch is a "special transmission batch" that is different from the normal basic transmission batch. The trial transmission batch is a transmission batch used for trial during the data transmission process. Its function is to sense environmental changes and test out a more optimal data batch size suitable for the current transmission environment. Among them, the data volume corresponding to the trial transmission batch is different from the data volume corresponding to the basic transmission batch, and it needs to include transmission data with a new trial data volume. In this way, by comparing the transmission efficiency of the basic transmission batch and the trial transmission batch, a more optimal data batch size can be obtained. Then, the subsequent basic transmission batches are divided by the more optimal data batch size, and the data volume corresponding to the subsequent basic transmission batches is adjusted, so that the subsequent basic transmission batches can be more suitable for the current transmission environment, thereby achieving the purpose of improving data transmission efficiency.
[0053] In the step, the trial data amount corresponding to the trial transmission batch needs to be determined according to the basic data amount corresponding to the basic transmission batch. Exemplarily, a preset data change amount can be set, and based on the basic data amount, the preset data change amount is increased or decreased to obtain the trial data amount. The data change amount can be understood as the amount of data that the trial data amount batch_try changes compared to the basic data amount batch.
[0054] Optionally, the data variation amount may be set in the following ways. It is understandable that the following ways are only examples and do not limit the setting of the data variation amount.
[0055] The first method is to set the data change amount by referring to similar applications and the latest data batch size of the application being run. For example, if the data batch size corresponding to the application is 10150, then the data change amount can be set to 150.
[0056] Second, if it is a popular application, you can refer to the suggestions in the official website documentation of some software or the suggestions in the expert blog. For example, if an expert's blog recommends that the data batch size is 10100, then you can set the data change amount to 100.
[0057] The third method is to refer to the initial settings of the application to determine the data batch size. For example, if the initial data batch size is 10100, then the data change amount can be set to 100.
[0058] The fourth type is to set the data change amount (preset value) arbitrarily. Generally, it can be set to 200, 150, 100, etc., without specific limitation.
[0059] Fifth, the data change amount can also be set as the product of the basic data amount and the preset percentage. For example, if the preset percentage is + / -2%, then the data change amount is +200 / -200.
[0060] It is understandable that when the data change amount is the product of the basic data amount and the preset percentage, in order to prevent the data change amount from being too large or too small, the following constraints may be added: if the product of the basic data amount and the preset percentage is less than the first preset threshold, the data change amount is determined to be the first preset threshold. If the product of the first data amount and the preset percentage is greater than the second preset threshold, the data change amount is determined to be the second preset threshold.
[0061] Optionally, the constraint constrains the data change amount between a first preset threshold and a second preset threshold to avoid inaccurate testing due to the amount of data to be tested being too large or too small. Exemplarily, the product of the basic data amount 10,000 and the preset percentage 0.05% is 5, and the first preset threshold is 20. Since 5 is less than 20, 20 can be used as the data change amount at this time, and the trial data amount can be 9,980 or 10,020. For another example, the product of the basic data amount 10,000 and the preset percentage 5% is 500, and the second preset threshold is 200. Since 500 is greater than 200, 200 can be used as the data change amount at this time, that is, the trial data amount can be 9,800 or 10,200.
[0062] In a possible implementation, Table 1 is an example of determining the second data amount provided in an embodiment of the present application, as shown in Table 1:
[0063] Table 1:
[0064] The first amount of data Data change The second data volume 10000 2%*10000 9800 / 10200 6000 100 5900 / 6100 10000 150 9850 / 10150 10000 200 9800 / 10200
[0065] That is, when the basic data volume is 10000, the preset data change amount may be 2%*10000, and the trial data volume may be 9800 or 10200. When the basic data volume is 6000, the preset data change amount may be 100, and the second data volume may be 5900 or 6100. When the basic data volume is 10000, the preset data change amount may be 150, and the trial data volume may be 9850 or 10150. When the first data volume is 10000, the preset data change amount may be 200, and the trial data volume may be 9800 or 10200.
[0066] 203. Transmit the basic data volume corresponding to the current basic transmission batch and the trial data volume corresponding to the trial transmission batch in sequence.
[0067] It can be understood that after determining the amount of trial data corresponding to the trial transmission batch, the data of the basic data amount corresponding to the current basic transmission batch and the data of the trial data amount corresponding to the trial transmission batch are transmitted in sequence. After the transmission is completed, the transmission conditions of the basic transmission batch and the trial transmission batch are compared, and it is determined based on the comparison result whether the basic data amount is more suitable for the current transmission environment or the trial data amount is more suitable for the current transmission environment. If the basic data amount is more suitable for the current transmission environment, then the data amount corresponding to the subsequent basic transmission batch is maintained as the basic data amount; if the trial data amount is more suitable for the current transmission environment, then the data amount corresponding to the subsequent basic transmission batch needs to be adjusted to the trial data amount to improve the transmission efficiency of the subsequent basic transmission batches.
[0068] 204. Calculate a first transmission efficiency corresponding to the current basic transmission batch and a second transmission efficiency corresponding to the trial transmission batch.
[0069] Among them, the first transmission efficiency is used to characterize the transmission speed of the data in the current basic transmission batch, and the second transmission efficiency is used to characterize the transmission speed of the data in the trial transmission batch. Exemplarily, the first transmission efficiency can be the ratio of the basic data volume to the transmission time of the basic transmission batch, that is, the amount of data transmitted by the basic transmission batch per unit time. The second transmission efficiency is the ratio of the trial data volume to the transmission time of the trial data volume, that is, the amount of data transmitted by the trial transmission batch per unit time. It can be understood that the higher the transmission efficiency, the faster the data transmission speed.
[0070] In this step, during the running of the application, when data is transmitted according to the second data amount, the second transmission efficiency corresponding to the data transmitted according to the second data amount is continuously compared with the first transmission efficiency corresponding to the first data amount. When the second transmission efficiency corresponding to the second data amount is greater than the first transmission efficiency corresponding to the first data amount for N consecutive batches, the second data amount is determined to be the data amount in subsequent data transmission batches.
[0071] Exemplarily, if the basic data volume batch is 10000 and the transmission time cost_base of the basic data volume batch is 50ms, then the first transmission efficiency speed_base is 10000 / 50=200; and the trial data volume batch_try can be 10200. When the transmission time cost_try of the trial data volume batch_try is 48.57ms, the second transmission efficiency speed_try is 10200 / 48.57=210.
[0072] 205. If the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, the data volume corresponding to the subsequent basic transmission batch is modified to the trial data volume.
[0073] It can be understood that if the second transmission efficiency corresponding to the trial transmission batch is greater than or equal to the first transmission efficiency corresponding to the current basic transmission batch, then it means that the trial data volume is more suitable for the current transmission environment, that is, under the current transmission environment, when the data size contained in a batch is the trial data volume, a higher transmission efficiency can be obtained, then it is necessary to determine the data volume corresponding to the subsequent basic transmission batch as the trial data volume, so that while obtaining a higher transmission efficiency, the resources of the transmission network and the data receiver are not wasted. If the second transmission efficiency corresponding to the trial transmission batch is less than the first transmission efficiency corresponding to the current basic transmission batch, then it means that the trial has failed, so the data volume corresponding to the subsequent basic transmission batch should still remain the basic data volume.
[0074] In order to ensure the security and stability of the data volume adjustment process, the data volume of the basic transmission batch can be adjusted after multiple trials, for example. That is, multiple trial transmission batches need to be determined according to the trial data volume, and when the transmission efficiency of all trial transmission batches is greater than or equal to the transmission efficiency of the basic transmission batch, the data volume of the subsequent basic transmission batch is adjusted to the trial data volume.
[0075] It is understandable that the significance of continuous multi-batch trials is to determine a relatively efficient and stable data transmission volume, so the number of trial transmission batches should not be too large and should be small. Generally, it can be set to 4 trials or 5 trials.
[0076] For example, the trial transmission batch may be determined periodically, that is, a trial transmission batch may be determined every time period for trial transmission. For example, the data batch size corresponding to the time node is set to the trial data amount every 10 minutes, and the trial transmission batch is transmitted.
[0077] Alternatively, every 10 minutes, the transmission batch corresponding to the time node is determined as the current basic transmission batch, and then the data volume corresponding to the transmission batch is used as the basic data volume, and then the data batch size of the next transmission batch is set to the trial data volume as the trial transmission batch. Then compare the transmission efficiency of the basic transmission batch and the trial transmission batch. If the transmission efficiency of a trial transmission batch within 10 minutes is greater than or equal to the basic transmission batch, then continue to judge the transmission efficiency of the trial transmission batch and the basic transmission batch within the next 10 minutes. Assuming that the number of trials is 5 times, that is, within 50 consecutive minutes, the transmission efficiency of the trial transmission batch within each 10 minutes is greater than or equal to the basic transmission batch, then the data volume of the basic transmission batch after the last trial batch within the 50 minutes needs to be modified to the trial data volume.
[0078] Among them, during the long period of time when the application provides data transmission services to the data receiver and sender, in order to avoid the impact of the trial process on normal services, the frequency of trial transmission batches should be controlled.
[0079] In a specific example, data is transmitted according to the basic data volume in the basic transmission batch at 11:10, and after the transmission is completed, data is transmitted according to the trial data volume in the trial transmission batch. Next, data is still transmitted according to the basic data volume in the basic transmission batch until 11:20, after which data is transmitted according to the basic data volume in the basic transmission batch, and then data is transmitted again based on the trial transmission batch. After data is transmitted according to the basic data volume in the basic transmission batch at 11:30, data is once again transmitted according to the trial data volume in the third trial transmission batch. After 11:40, data is transmitted according to the trial data volume in the fourth trial transmission batch. After 11:50, data is transmitted according to the trial data volume in the fifth trial transmission batch... and so on.
[0080] Next, each trial transmission batch needs to compare the transmission efficiency with the previous basic transmission batch, so as to determine the trial effect of the trial transmission batch and record it. For example, Table 2 is an example 1 of the transmission efficiency comparison provided by the embodiment of the present application, as shown in Table 2 (for example, the number of trials is 5):
[0081] Table 2:
[0082]
[0083] That is, after data transmission according to the basic data volume, the first transmission efficiency is measured to be 200, and then data transmission according to the trial data volume is measured to be 210. The transmission efficiency of the first trial transmission batch is greater than the transmission efficiency of the basic transmission batch. After that, the transmission efficiency of the five consecutive trial transmission batches is greater than the transmission efficiency of the basic transmission batch. Therefore, it can be considered that the trial data volume is a data batch size that is more suitable for the data transmission in the operating environment of the current application, and can be used as the data batch size for subsequent data transmission. In this way, the data volume corresponding to the subsequent ordinary transmission batch needs to be modified to the trial data volume.
[0084] However, as long as the transmission efficiency of the trial transmission batch is lower than that of the basic transmission batch, the current round of trial needs to be terminated. The data volume of the basic transmission batch is still maintained as the basic data volume. Then the data change volume needs to be re-determined, and the new trial data volume needs to be re-determined based on the re-determined data change volume. Finally, a new round of verification trial process for the new trial data volume is entered.
[0085] The method provided in the embodiment of the present application uses a trial transmission batch to test the data batch size suitable for the current transmission environment during the data transmission process. Specifically, the amount of data contained in the ordinary transmission batch is determined according to the basic data amount, and then the amount of trial data corresponding to the trial transmission batch is determined with reference to the basic data amount. Then, the data of the ordinary transmission batch and the data of the trial transmission batch are transmitted at one time, and the transmission efficiency of each is calculated. If the transmission efficiency of the trial transmission batch is greater than or equal to the transmission efficiency of the ordinary transmission batch, then the data amount of the subsequent ordinary transmission batch is modified to the trial data amount to suit the current transmission environment. Then the subsequent trial transmission batches continue to test to cope with the ever-changing transmission environment.
[0086] In this technical solution, the transmission results of the trial transmission batch can be used to perceive the changes in the transmission environment, and by comparing the transmission efficiency of the trial transmission batch and the ordinary transmission batch, the data batch size with higher transmission efficiency under the current transmission environment can be determined, and the data volume of most subsequent transmission batches (ordinary transmission batches) can be adjusted according to the more optimal data batch size, so that the data volume of the subsequent ordinary transmission batches is more suitable for the transmission environment, thereby improving the transmission efficiency of the subsequent ordinary transmission batches. That is, this method will dynamically adjust the data volume of the ordinary transmission batch as the transmission environment changes, making it more suitable for the current operating environment, thereby greatly increasing the data transmission efficiency.
[0087] Based on the above embodiments, Figure 3 A flow chart of another method for adjusting the data transmission rate provided in an embodiment of the present application. Figure 3 As shown, the method for adjusting the data transmission amount may include the following steps:
[0088] 301. During the data transmission process, initialize the normal transmission batch and initialize the trial variables.
[0089] The data volume corresponding to the common transmission batch to be transmitted can be determined as the basic data volume batch. For example, the basic data volume can be 10000. And the trial variable needs to be initialized, for example, the trial variable try_state is initialized to 0.
[0090] Among them, the trial variable try_state corresponds to the trial transmission batch and is used to characterize the number of successful trials of the trial transmission batch. For example, the trial variable try_state is initialized to 0. After the trial transmission batch is used to transmit data for the first time, it is found that the transmission efficiency of the trial transmission batch is greater than the transmission efficiency of the basic transmission batch. Then the trial variable try_state can be updated to 1. After the second trial transmission batch transmits data according to the trial data volume, if the transmission efficiency of the trial transmission batch is still greater than the transmission efficiency of the basic transmission batch, then the trial variable try_state can be updated to 2, and so on. However, once the transmission efficiency of the trial transmission batch is less than the transmission efficiency of the basic transmission batch, it is necessary to restore the trial state try_state to the initialization and re-accumulate the number of successful trials of the trial transmission batch.
[0091] 302. Transmit a basic data volume of data corresponding to a basic transmission batch, and obtain a transmission duration corresponding to the basic transmission batch.
[0092] After the basic transmission batch is determined, it is necessary to transmit data according to the basic data volume and monitor the transmission status of the basic transmission batch. After the transmission is completed, it is necessary to determine the transmission duration cost_base of the basic transmission batch.
[0093] 303. Determine whether the current trial variable is positive or negative.
[0094] It is understandable that the value of the trial variable try_state may be 0, positive, or negative. If it is 0, it means that a new round of trial has not been carried out, and the number of trials is 0. If it is not 0, it means that the trial has begun. Among them, positive and negative represent the direction of the trial, a positive value means that the trial data amount is greater than the basic data amount, and a negative value means that the trial data amount is less than the basic data amount. Therefore, it is necessary to determine the trial data amount corresponding to the next trial transmission batch based on the current trial variable.
[0095] 304. Determine the amount of trial data corresponding to the trial transmission batch according to the basic data amount, the preset data change amount, and the positive and negative states of the trial variables.
[0096] Exemplarily, the amount of trial data corresponding to the trial transmission batch can be determined based on the trial variable. For example, if the trial variable try_state is positive, the trial data amount batch_try = 1.02 * basic data amount batch (i.e., the trial data amount is increased by 2% compared to the basic data amount). If the trial variable try_state is negative, the basic data amount batch_try = 0.98 * basic data amount batch (i.e., the trial data amount is reduced by 2% compared to the basic data amount). If the trial variable try_state is 0, then it is necessary to randomly assign a value of positive 1 or negative 1 to the trial variable, and then determine the size of the trial data amount based on the determined positive or negative.
[0097] 305. Transmit a trial data volume corresponding to the trial transmission batch, and obtain a transmission duration corresponding to the trial transmission batch.
[0098] After determining the trial data volume, data of the trial data volume corresponding to the trial transmission batch is transmitted, and then the transmission process is monitored to obtain the transmission duration cost_try corresponding to the trial transmission batch.
[0099] 306. Calculate a first transmission efficiency corresponding to the basic transmission batch and a second transmission efficiency corresponding to the trial transmission batch.
[0100] Next, the first transmission efficiency corresponding to the basic transmission batch and the second transmission efficiency corresponding to the trial transmission batch are calculated, and then the transmission efficiencies are compared to determine whether the basic data volume is in line with the current transmission environment or the trial data volume is more in line with the transmission environment. The transmission efficiency is the ratio of the data volume to the transmission duration. Exemplarily, the first transmission efficiency corresponding to the basic transmission batch is speed_base = basic data volume batch / transmission duration cost_base. The second transmission efficiency corresponding to the trial transmission batch is speed_try = trial data volume batch_try / transmission duration cost_try.
[0101] 307. Determine whether the second transmission efficiency is greater than or equal to the first transmission efficiency. If yes, execute step 309. Otherwise, execute step 308.
[0102] 308. Set the value of the trial variable to 0.
[0103] If the second transmission efficiency speed_try corresponding to the trial transmission batch is not greater than the first transmission efficiency speed_base corresponding to the basic transmission batch, it means that the attempt in this direction is ineffective. Therefore, it is necessary to return the value of the trial variable to 0, reassign a new positive and negative direction to the trial variable, determine a new trial data volume, and conduct a new round of trials.
[0104] 309. If the trial variable is positive, add 1; if the trial variable is negative, subtract 1.
[0105] If the second transmission efficiency corresponding to the trial transmission batch is greater than or equal to the first transmission efficiency corresponding to the basic transmission batch, it means that the attempt in this direction is beneficial, and then the number of successful trials needs to be accumulated. When the trial variable is positive, it is increased by 1, and if the trial variable is negative, it is decreased by 1. Both represent a successful trial.
[0106] 310. Determine whether the absolute value of the trial variable is less than the number threshold. If yes, return to wait and execute step 304. If no, execute step 311.
[0107] Next, it is necessary to determine the number of trial transmission batches that have been successfully tried continuously based on the absolute value of the trial variable. First, take the absolute value of the trial variable try_state (i.e., eliminate the negative sign). If the absolute value is greater than the number threshold (such as the number threshold is equal to 5), then it means that 5 consecutive (after 50 minutes, try once every 10 minutes) data volume trials are beneficial. Therefore, it means that the trial change amount is a more optimal data batch size under the current transmission environment. If the absolute value of the trial variable try_state is less than 5, it means that these attempts in this direction (positive or negative direction) are beneficial, but because the number of times is not enough and not stable enough, it is necessary to continue to transmit data according to the basic data amount, and transmit the trial transmission batch again. Verify whether the trial data amount trial is beneficial based on the transmission situation of the next trial transmission batch.
[0108] 311. Modify the data volume corresponding to the subsequent basic transmission batch to the trial data volume.
[0109] If the absolute value is greater than the number threshold (such as the number threshold is equal to 5), it means that the data volume trials for 5 consecutive times (after 50 minutes, one attempt every 10 minutes) are beneficial. Therefore, it means that the trial change amount is a more optimal data batch size under the current transmission environment. Then it is necessary to assign the value of the trial data volume batch_try to the basic transmission batch, and modify the data volume batch of the subsequent basic transmission batch to batch_try, so that the subsequent data transmission will transmit data according to the new batch size, thereby greatly improving the data transmission efficiency.
[0110] The method for adjusting the data transmission volume provided in the embodiment of the present application is to initialize the reference batch size and the trial variable when the application is continuously running, and the application transmits data according to the reference batch size to obtain the first transmission duration. Then, the value of the trial variable is determined, the trial data volume is set according to the basic data volume, and then the data of the trial data volume won by the trial transmission batch is transmitted to obtain the second transmission duration. Then, based on the first transmission duration and the second transmission duration, the transmission efficiencies corresponding to the basic data volume and the trial data volume are determined respectively. If the second transmission efficiency corresponding to the trial data volume is not greater than the first transmission efficiency corresponding to the basic data volume, the trial variable is returned to 0. If the second transmission efficiency corresponding to the trial data volume is greater than the first transmission efficiency corresponding to the basic data volume, it means that the attempt in this direction is beneficial, and then the trial data volume is determined to be a data volume that is more suitable for the operating environment of the current application.
[0111] Based on the above method embodiment, Figure 4 A schematic diagram of a device for adjusting the data transmission rate provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the data transmission amount adjustment device includes:
[0112] The acquisition unit 401 is used to acquire the basic data volume corresponding to the current basic transmission batch.
[0113] The determination unit 402 is used to determine the trial data volume corresponding to the trial transmission batch according to the basic data volume and the preset data change volume.
[0114] The transmission unit 403 is used to sequentially transmit data of a basic data volume corresponding to the current basic transmission batch and data of a trial data volume corresponding to the trial transmission batch.
[0115] The processing unit 404 is used to modify the data volume corresponding to the subsequent basic transmission batch to the trial data volume if the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch during the data transmission process of the transmission unit.
[0116] The first transmission efficiency is used to characterize the transmission speed of data corresponding to the current basic transmission batch, and the second transmission efficiency is used to characterize the transmission speed of data corresponding to the trial transmission batch.
[0117] In an optional implementation, the acquisition unit 401 is further configured to periodically select a target transmission batch from the basic transmission batch.
[0118] The determination unit 402 is further configured to use the data volume corresponding to the target transmission batch as the basic data volume, and determine the target transmission batch as the current basic transmission batch.
[0119] In an optional implementation, the trial transmission batch corresponds to a trial variable.
[0120] The processing unit 404 is further configured to set the initial value of the trial variable to 0.
[0121] The determination unit 402 is further used to randomly determine the positive or negative value of the trial variable.
[0122] The processing unit 404 is further configured to, during the data transmission process, if the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, and the value of the trial variable is a positive value, then increase the value of the trial variable by 1. If the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, and the value of the trial variable is a negative value, then decrease the value of the trial variable by 1. If the second transmission efficiency corresponding to the trial transmission batch is less than the first transmission efficiency corresponding to the current basic transmission batch, then return the value of the trial variable to 0.
[0123] In an optional implementation, the acquisition unit 401 is further configured to acquire the absolute value of the current numerical value of the trial variable.
[0124] The processing unit 404 is specifically configured to not modify the data volume corresponding to the subsequent basic transmission batch if the absolute value of the current value of the trial variable is less than the number threshold, and to modify the data volume corresponding to the subsequent basic transmission batch to the trial data volume if the absolute value of the current value of the trial variable is greater than or equal to the number threshold.
[0125] In an optional embodiment, the processing unit 404 is further configured to restore the value of the trial variable to an initial value.
[0126] In an optional implementation, the acquisition unit 401 is further used to acquire a first transmission duration of a basic data volume corresponding to a current basic transmission batch, and a second transmission duration of a trial data volume corresponding to a trial transmission batch.
[0127] The determination unit 402 is further configured to determine a first transmission efficiency corresponding to the current basic transmission batch according to the basic data volume and the first transmission duration, and to determine a second transmission efficiency corresponding to the trial transmission batch according to the trial transmission volume and the second transmission duration.
[0128] In an optional implementation, the first transmission efficiency is a ratio of a basic data volume to a first transmission duration, and the second transmission efficiency is a ratio of a trial data volume to a second transmission duration.
[0129] In an optional implementation, the acquisition unit 401 is further configured to acquire first transmission efficiencies corresponding to a plurality of basic transmission batches before the trial transmission batch.
[0130] The determining unit 402 is further configured to determine an average transmission efficiency according to the first transmission efficiencies corresponding to the multiple basic transmission batches.
[0131] The processing unit 404 is specifically configured to modify the data volume corresponding to the subsequent basic transmission batch to the trial data volume if the second transmission efficiency is not less than the average transmission efficiency.
[0132] In an optional implementation, the current value of the probe variable is obtained.
[0133] The determination unit 402 is specifically configured to determine, if the current value of the trial variable is a positive value, that the trial data amount corresponding to the trial transmission batch is the basic data amount plus a preset data change amount.
[0134] If the current value of the trial variable is a negative value, the trial data amount corresponding to the trial transmission batch is determined to be the basic data amount minus the preset data change amount.
[0135] In an optional implementation, the preset data change amount is any one of the following: a product of the first data amount and a preset percentage or a preset change value.
[0136] The device for adjusting data transmission volume provided in the embodiment of the present application can be used to execute the technical solution corresponding to the method for adjusting data transmission volume in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.
[0137] The data transmission volume adjustment device can use the transmission results of the trial transmission batch to perceive the changes in the transmission environment, and by comparing the transmission efficiency of the trial transmission batch and the ordinary transmission batch, determine the data batch size with higher transmission efficiency under the current transmission environment, and adjust the data volume of most subsequent transmission batches (ordinary transmission batches) according to the more optimal data batch size, so that the data volume of the subsequent ordinary transmission batches is more suitable for the transmission environment, thereby improving the transmission efficiency of the subsequent ordinary transmission batches. That is, the device can dynamically adjust the data volume of the ordinary transmission batch as the transmission environment changes, making it more suitable for the current operating environment, thereby greatly increasing the data transmission efficiency.
[0138] It should be noted that it should be understood that the division of the various modules (acquisition module, processing module, and determination module) of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0139] Next, an electronic device provided by an embodiment of the present application is introduced. Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 800 may be equipped with Figure 4 The data transmission amount adjustment device described in the corresponding embodiment is used to implement Figures 1 to 3 Specifically, the electronic device 800 includes: a receiver 801, a transmitter 802, a processor 803 and a memory 804 (wherein the number of the processor 803 in the execution device 800 can be one or more, Figure 5 In the example of FIG. 801 , the processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of the present application, the receiver 801, the transmitter 802, the processor 803 and the memory 804 may be connected via a bus or other means.
[0140] The memory 804 may include a read-only memory and a random access memory, and provides instructions and data to the processor 803. A portion of the memory 804 may also include a non-volatile random access memory (NVRAM). The memory 804 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0141] The processor 803 controls the operation of the execution device. In a specific application, the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0142] The method disclosed in the above embodiment of the present application can be applied to the processor 803, or implemented by the processor 803. The processor 803 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 803. The above processor 803 can be a general processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The processor 803 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be combined and executed. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 804, and the processor 803 reads the information in the memory 804 and completes the steps of the above method in combination with its hardware.
[0143] The receiver 801 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device. The transmitter 802 can be used to output digital or character information through the first interface; the transmitter 802 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 802 can also include a display device such as a display screen.
[0144] In the embodiment of the present application, the application processor 8031 in the processor 803 is used to execute Figures 1 to 3 The method for adjusting the data transmission volume in the corresponding embodiment. It should be noted that the specific manner in which the application processor 8031 executes each step is different from the specific manner in which the application processor 8031 executes each step. Figures 1 to 3 The corresponding method embodiments are based on the same concept, and the technical effects they bring are the same as those in this application. Figures 1 to 3 The corresponding method embodiments are the same. For specific contents, please refer to the description in the method embodiments shown above in this application, which will not be repeated here.
[0145] An embodiment of the present application also provides a chip for executing instructions, which is used to execute the technical solution of the method for adjusting the data transmission volume in the above embodiment.
[0146] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computing device, the computing device executes the technical solution of the method for adjusting the data transmission volume in the above embodiment.
[0147] An embodiment of the present application further provides a computer program product, including a computer program, which, when executed by a processor, is used to execute the technical solution of the method for adjusting the data transmission volume in the above embodiment.
[0148] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special computing device.
[0149] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0150] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A method for adjusting data transmission volume, characterized in that: The method comprises: Obtaining the basic data volume corresponding to the current basic transmission batch; the basic data volume is used to reflect the size of the data volume included in the basic transmission batch; Determining the amount of trial data corresponding to the trial transmission batch according to the basic data amount and the preset data change amount; When transmitting the data of the basic data amount corresponding to the current basic transmission batch and the data of the trial data amount corresponding to the trial transmission batch in sequence, if the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, the data amount corresponding to the subsequent basic transmission batch is modified to the trial data amount; The first transmission efficiency is used to characterize the transmission speed of data corresponding to the current basic transmission batch, and the second transmission efficiency is used to characterize the transmission speed of data corresponding to the trial transmission batch.
2. The method according to claim 1, characterized in that The method further comprises: Periodically selecting a target transmission batch from the basic transmission batch; The data amount corresponding to the target transmission batch is used as the basic data amount, and the target transmission batch is determined as the current basic transmission batch.
3. The method according to claim 2, characterized in that The trial transmission batch corresponds to a trial variable, and the method further includes: Setting the initial value of the trial variable to 0; Randomly determine a positive preset value or a negative preset value of the numerical value of the trial variable; During data transmission, if the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, and the value of the trial variable is positive, then the value of the trial variable is increased by 1; If the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, and the value of the trial variable is negative, then the value of the trial variable is reduced by 1; If the second transmission efficiency corresponding to the trial transmission batch is less than the first transmission efficiency corresponding to the current basic transmission batch, the value of the trial variable is reset to zero.
4. The method according to claim 3, characterized in that The step of modifying the basic data amount corresponding to the subsequent basic transmission batch to the trial data amount includes: Obtaining the absolute value of the current value of the trial variable; If the absolute value of the current value of the trial variable is less than the number threshold, the data amount corresponding to the subsequent basic transmission batch is not modified; If the absolute value of the current numerical value of the trial variable is greater than or equal to the number threshold, the data amount corresponding to the subsequent basic transmission batch is modified to the trial data amount.
5. The method according to claim 4, characterized in that After modifying the data amount corresponding to the subsequent basic transmission batch to the trial data amount, the method further includes: The value of the trial variable is restored to the initial value.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Acquire a first transmission duration of the data of the basic data volume corresponding to the current basic transmission batch, and a second transmission duration of the data of the trial data volume corresponding to the trial transmission batch; Determining the first transmission efficiency corresponding to the current basic transmission batch according to the basic data volume and the first transmission duration; The second transmission efficiency corresponding to the trial transmission batch is determined according to the trial data amount and the second transmission duration.
7. The method according to claim 6, characterized in that The first transmission efficiency is a ratio of the basic data amount to the first transmission duration, and the second transmission efficiency is a ratio of the trial data amount to the second transmission duration.
8. The method according to claim 7, characterized in that The method further comprises: Obtaining the first transmission efficiencies corresponding to a plurality of basic transmission batches before the trial transmission batch; determining an average transmission efficiency according to the first transmission efficiencies corresponding to the multiple basic transmission batches; If the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch, modifying the data volume corresponding to the subsequent basic transmission batch to the trial data volume includes: If the second transmission efficiency is not less than the average transmission efficiency, the data amount corresponding to the subsequent basic transmission batch is modified to the trial data amount.
9. The method according to claim 3, characterized in that: Before determining the amount of trial data corresponding to the trial transmission batch, the method further includes: obtaining a current value of the trial variable; The step of determining the amount of trial data corresponding to the trial transmission batch according to the basic amount of data and the preset amount of data change includes: If the current value of the trial variable is a positive value, the trial data amount corresponding to the trial transmission batch is determined to be the basic data amount plus the preset data change amount; If the current value of the trial variable is a negative value, the trial data amount corresponding to the trial transmission batch is determined to be the basic data amount minus the preset data change amount.
10. The method according to claim 9, characterized in that The preset data change amount is any of the following: The product of the basic data volume and a preset percentage; or a preset change value.
11. A device for adjusting data transmission volume, characterized in that: The device comprises: An acquisition unit, used to acquire a basic data volume corresponding to a current basic transmission batch; the basic data volume is used to reflect the size of the data volume included in the basic transmission batch; A determination unit, configured to determine a trial data volume corresponding to a trial transmission batch according to the basic data volume and a preset data change volume; A transmission unit, configured to sequentially transmit the basic data amount of data corresponding to the current basic transmission batch and the trial data amount of data corresponding to the trial transmission batch; a processing unit configured to modify, during the data transmission process of the transmission unit, a data volume corresponding to a subsequent basic transmission batch to the trial data volume if the second transmission efficiency corresponding to the trial transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch; The first transmission efficiency is used to characterize the transmission speed of data corresponding to the current basic transmission batch, and the second transmission efficiency is used to characterize the transmission speed of data corresponding to the trial transmission batch.
12. An electronic device, characterized in that: include: A processor, a memory, and computer program instructions stored on the memory and executable on the processor; When the processor executes the computer program instructions, the method for adjusting the data transmission volume as described in any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method for adjusting the data transmission volume as described in any one of claims 1 to 10 above.
Citation Information
Patent Citations
Concurrent transmission method and system of uniform interface test of power consumption information collection system
CN107276850A
