CN116192759A - Data transmission amount adjusting method and device, electronic equipment and storage medium - Google Patents

Data transmission amount adjusting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116192759A
CN116192759A CN202211601597.6A CN202211601597A CN116192759A CN 116192759 A CN116192759 A CN 116192759A CN 202211601597 A CN202211601597 A CN 202211601597A CN 116192759 A CN116192759 A CN 116192759A
Authority
CN
China
Prior art keywords
transmission
data
heuristic
batch
basic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211601597.6A
Other languages
Chinese (zh)
Inventor
徐帅
刘勇成
胡志鹏
袁思思
程龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202211601597.6A priority Critical patent/CN116192759A/en
Publication of CN116192759A publication Critical patent/CN116192759A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The application provides a method and device for adjusting data transmission quantity, electronic equipment and a storage medium. The method comprises the steps of obtaining the basic data volume corresponding to the current basic transmission batch. And determining the heuristic data quantity corresponding to the heuristic transmission batch according to the basic data quantity and the preset data change quantity. When the data of the basic data volume corresponding to the current basic transmission batch and the data of the heuristic data volume corresponding to the heuristic transmission batch are sequentially transmitted, if the second transmission efficiency corresponding to the heuristic transmission batch is not smaller than the first transmission efficiency corresponding to the current basic transmission batch, the data volume corresponding to the subsequent basic transmission batch is modified into the heuristic data volume. According to the technical scheme, the data volume of the tentative transmission batch is adjusted by taking the basic data volume corresponding to the current data transmission batch as a reference. And then comparing the transmission efficiency of the basic transmission batch with the transmission efficiency of the trial transmission batch to determine the corresponding data quantity of the subsequent basic transmission batch which is more suitable for the current transmission running environment.

Description

Data transmission amount adjusting method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for adjusting data transmission amount, an electronic device, and a storage medium.
Background
In the field of big data, data transmission refers to a process of transmitting data from a sender to a receiver. Typically, data is transferred in batches. I.e. several pieces of data are divided into a batch, which batch is then transmitted as a whole to the receiving party at once. In order to increase the transmission efficiency of data transmission, the amount of data contained in a batch should be determined according to the current transmission environment.
The data transmission efficiency refers to the amount of data transmitted by the data transmission channel in a unit time, which is positively related to the amount of data contained in a batch and negatively related to the transmission time of the batch, and the amount of data affects the transmission time. To maximize transmission efficiency, it is desirable to rationally program the amount of data that a batch contains. A common method for determining the corresponding data volume of a batch is to test in advance when an application program is developed, continuously perform test transmission by using different data volumes, and compare the transmission efficiency of the data volumes to transmit the data batch size (i.e. the quantity of data included in the batch) with better transmission efficiency.
However, the transmission environment of the application program is changed continuously, and the measured data batch size cannot be applied to all transmission environments during software development. The transmission efficiency of data is seriously affected if data is always transmitted according to the size of the data batch. Therefore, how to adjust the size of the data batch according to the transmission environment changes to improve the data transmission efficiency is a urgent problem to be solved.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, an electronic device, and a storage medium for adjusting a data transmission amount, so as to solve the problem in the prior art that a data batch size cannot be changed along with a change of a transmission environment during data transmission, and only data can be transmitted according to the data batch size measured during software development, thereby seriously affecting data transmission efficiency.
An embodiment of the present application provides a method for adjusting a data transmission amount, where the method includes:
and acquiring the basic data quantity corresponding to the current basic transmission batch.
And determining the heuristic data quantity corresponding to the heuristic transmission batch according to the basic data quantity and the preset data change quantity.
When the data of the basic data volume corresponding to the current basic transmission batch and the data of the heuristic data volume corresponding to the heuristic transmission batch are sequentially transmitted, if the second transmission efficiency corresponding to the heuristic transmission batch is not smaller than the first transmission efficiency corresponding to the current basic transmission batch, the data volume corresponding to the subsequent basic transmission batch is modified into the heuristic data volume.
The first transmission efficiency is used for representing the transmission speed degree of the data corresponding to the current basic transmission batch, and the second transmission efficiency is used for representing the transmission speed degree of the data corresponding to the trial transmission batch.
A second aspect of the embodiments of the present application provides an adjustment device for a data transmission amount, including:
the acquisition unit is used for acquiring the basic data quantity corresponding to the current basic transmission batch.
And the determining unit is used for determining the heuristic data quantity corresponding to the heuristic transmission batch according to the basic data quantity and the preset data change quantity.
The transmission unit is used for sequentially transmitting the data of the basic data volume corresponding to the current basic transmission batch and the data of the trial data volume corresponding to the trial transmission batch.
And the processing unit is used for modifying the data volume corresponding to the subsequent basic transmission batch into the tentative data volume if the second transmission efficiency corresponding to the tentative transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch in the process of transmitting the data by the transmission unit.
The first transmission efficiency is used for representing the transmission speed degree of the data corresponding to the current basic transmission batch, and the second transmission efficiency is used for representing the transmission speed degree of the data corresponding to the trial transmission batch.
A third aspect of the embodiments of the present application further provides an electronic device, including: a processor and a memory.
The memory stores computer-executable instructions.
The processor executes computer-executable instructions to cause the electronic device to perform the method of adjusting the amount of data transmission as described in the first aspect and various possible designs described above.
The fourth aspect of the embodiments of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored, which when executed by a processor are configured to implement the method for adjusting the data transmission amount as described in the first aspect and the various possible designs.
In the method provided by the embodiment of the application, the data batch size suitable for the current transmission environment is probed by utilizing the probing transmission batch in the data transmission process. Specifically, the common transmission batch determines the data amount contained according to the basic data amount, and then uses the basic data amount as a reference to determine the heuristic data amount corresponding to the heuristic transmission batch. And then transmitting the data of the common transmission batch and the data of the trial transmission batch at one time, and calculating the respective transmission efficiencies. If the transmission efficiency of the tentative transmission lot is greater than or equal to the transmission efficiency of the normal transmission lot, the data volume of the subsequent normal transmission lot is modified to the tentative data volume so as to be suitable for the current transmission environment. The subsequent probing transmission batch then resumes probing to cope with the changing transmission environment.
According to the technical scheme, the change of the transmission environment can be perceived by using the transmission result of the trial transmission batch, the data batch size with higher transmission efficiency under the current transmission environment is determined by comparing the transmission efficiency of the trial transmission batch and the common transmission batch, and the data volume of most of the subsequent transmission batches (common transmission batches) is adjusted according to the better data batch size, so that the data volume of the subsequent common transmission batch is more suitable for the transmission environment, and the transmission efficiency of the subsequent common transmission batch is improved. Namely, the method can dynamically adjust the data quantity of the common transmission batch along with the change of the transmission environment, so that the method is more suitable for the current operation environment, and the data transmission efficiency is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic view of a scenario of data transmission provided in an embodiment of the present application;
Fig. 2 is a flow chart of a method for adjusting data transmission amount according to an embodiment of the present application;
fig. 3 is a flowchart illustrating another method for adjusting data transmission amount according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an apparatus for adjusting data transmission amount according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The application provides a method, a device, an electronic device and a storage medium for adjusting data transmission quantity, which are used for solving the problems that in the prior art, when data is transmitted, the batch size of the data cannot change along with the change of a transmission environment, and the data can only be transmitted always according to the batch size measured during software development, thereby seriously affecting the data transmission efficiency
In order to enable those skilled in the art to better understand the technical solutions of the present application, the present application is clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. This application is intended to be limited to the details shown and described, and it is intended that the invention not be limited to the particular embodiment disclosed, but that the application will include all embodiments falling within the scope of the appended claims.
It should be noted that the terms "first," "second," "third," and the like in the claims, specification, and drawings herein are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. The data so used may be interchanged where appropriate to facilitate the embodiments of the present application described herein, and may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and their variants are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the field of big data, data transmission refers to transmitting data to be transmitted from a sender to a receiver. In the data transmission process, there are often a plurality of data to be transmitted, but the data are not transmitted one by one, but are transmitted in batches. That is, each time data is transmitted, a plurality of pieces of data need to be assembled into a batch, and the batch is transmitted to a receiving party as a whole at one time. The purpose of this is to increase the transmission speed. For example, if 10ms is required for transmission at a time, if only one piece of data is transmitted at a time, and the number of pieces of data transmitted is sufficiently large, such as 100 pieces, then at least 1s is required for the data to be transmitted. If the batch transmission method is used, it is assumed that one batch contains 50 pieces of data, the duration of transmitting one batch may be 50ms, and transmitting all data requires transmitting two batches, i.e. at least 0.1s, so that all data can be transmitted.
In the process of transmitting a large amount of data, the transmission efficiency by batch is higher than that by stripe, so that the data transmission is generally performed by batch. In the batch transmission process, the transmission time length of each batch of data has a great relationship with the running environment (transmission environment) of the application program. Specifically, the transmission speed of the underlying logic, the size of the network packet, the input/output mode corresponding to the receiving party, the design principle of the database, and the like can be affected.
The data transmission efficiency refers to the amount of data transmitted by the data transmission path in a unit time, and is positively related to the total amount of data and negatively related to the transmission time. It will be appreciated that to increase the data transmission efficiency of a batch, the amount of data that a batch contains should be as large as possible when transmitting data. However, the amount of data affects the data transmission duration. For example, a large amount of data may affect the choice of transmission path. In order to reduce packet loss, the transmission network selects a forwarding device with sufficient network resources when selecting a path, which is likely to select a longer transmission path, resulting in an excessively long transmission time. Alternatively, a lot of resources of the receiver are occupied by other tasks, and only a small part of the resources are used for receiving data, so that an excessive amount of data contained in a batch will likely require a lot of time to receive, and the transmission time will also increase. Therefore, the larger the amount of data contained in a batch is, 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.
In the prior art, a developer of an application program cannot directly determine the optimal data batch size according to a transmission environment, and generally determines the optimal data batch size through modes of experience, repeated experiments and the like. In general, a developer performs a test in advance when developing an application program, continuously transmits using different data amounts, and transmits a data batch size with superior transmission efficiency by comparing transmission efficiency thereof and determines the utilized data batch size as data contained in each batch. However, after the application program runs for a long period and month, the running environment of the application program is often changed, for example, the network cable is upgraded to a network cable with higher quality transmission efficiency, the version of the database is upgraded, the data receiving performance of the receiving party is improved, and the like, which can result in that the data batch size obtained by the test is not applicable to the current running environment any more. If data is still transmitted according to the data batch size obtained by the test at this time, the data transmission performance is seriously affected. For example, the data size of the better data batch in the current environment has become 1805, but the application program cannot sense the environment change and still transmit data according to the first 1024 pieces, so that the hardware resources of the data sender and the data receiver are wasted, and the efficiency of data transmission is also reduced.
Thus, the prior art method of determining the size of a data batch has the following problems:
first, a developer is required to test repeatedly to obtain the data batch size value.
Secondly, the experience of the technician is relied on to obtain the data batch size value.
Thirdly, when the transmission environment of the application program changes, the size value of the data batch in the technical scheme cannot be automatically adjusted, so that the condition of wasting hardware resources in the data transmission process is extremely easy to occur, and the data transmission efficiency is seriously affected.
Therefore, how to adjust the size of the data batch according to the transmission environment changes to improve the data transmission efficiency is a urgent problem to be solved.
In view of the above, the present application provides a method, an apparatus, an electronic device, and a storage medium for adjusting a data transmission amount. In the embodiment of the application, the data batch size suitable for the current transmission environment is probed by using the probing transmission batch in the data transmission process. If the transmission efficiency of the tentative transmission lot is greater than or equal to the transmission efficiency of the normal transmission lot, the data volume of the subsequent normal transmission lot is modified to the tentative data volume so as to be suitable for the current transmission environment. The subsequent probing transmission batch then resumes probing to cope with the changing transmission environment. The method, apparatus, terminal and computer readable storage medium described in the present application are described in further detail below with reference to specific embodiments and attached drawings.
Based on the problems in the prior art, fig. 1 is a schematic view of a data transmission scenario provided in an embodiment of the present application, so as to solve the technical problems. As shown in fig. 1, the scene diagram includes: sender device 11, computing device 12, and receiver device 13.
The application scenario is merely an example, and the data transmission may be that the sender device 11 sends the data to the computing device 12, which is not limited to the application scenario, and the disclosure in the application scenario is described in the following embodiments.
Alternatively, the sender device 11 and the receiver device 13 each have an application a installed thereon, and the computing device 12 provides services for the application a, which may be a server.
In one possible implementation, the sender device 11 sends data to the receiver device 13 via the application a, and at this time, in order to adapt to the running environment of the application a, the computing device 12 adjusts the size of the data batch according to the technical solution provided in the embodiment of the present application (see below), and performs data transmission according to the data batch size in the following data transmission.
The technical scheme of the present application is described in detail below through specific embodiments. It should be noted that the following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a flow chart of a method for adjusting data transmission amount according to an embodiment of the present application. As shown in fig. 2, the method for adjusting the data transmission amount may include the steps of:
201. and acquiring the basic data quantity corresponding to the current basic transmission batch.
When an application is running in an operating environment, data transmission services are provided for a data sender and a data receiver. When a data transmitter transmits data to a data receiver, the data is transmitted in batches. At this time, it is necessary to acquire a basic data amount corresponding to the current basic transmission lot, the basic data amount being used to reflect the size of the data amount contained in the basic transmission lot. For example, the basic data amount may be 1000, i.e. each basic transmission batch comprises 1000 pieces of data to be transmitted, i.e. the data sender will send 1000 pieces of data to the data receiver at once.
The basic transmission batch refers to a normal data transmission batch. The basic data amount is the initial data amount specified according to 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 be changed along with the change of the environment, and the basic data volume can be used as the reference data volume to determine whether the new data volume corresponding to the subsequent basic transmission batch plays the role of improving the transmission efficiency.
202. And determining the heuristic data quantity corresponding to the heuristic transmission batch according to the basic data quantity and the preset data change quantity.
Wherein, the heuristic transmission lot is a "special transmission lot" that is different from the normal basic transmission lot. The probing transmission batch is a transmission batch used for probing in the data transmission process, and has the function of testing the data batch size which is more optimal and suitable for the current transmission environment in order to sense the environment change. The data amount corresponding to the tentative transmission lot is different from the data amount corresponding to the basic transmission lot, and the tentative transmission lot needs to include transmission data with a new tentative data amount size. Thus, by comparing the transmission efficiency of the basic transmission lot and the tentative transmission lot, a more optimal data lot size can be obtained. And then dividing the subsequent basic transmission batch by using the more optimal data batch size, and adjusting the data quantity corresponding to the subsequent basic transmission batch, so that the subsequent basic transmission batch is more suitable for the current transmission environment, thereby achieving the purpose of improving the data transmission efficiency.
In the step, the amount of probing data corresponding to the probing transmission lot is determined according to the amount of basic data corresponding to the basic transmission lot. For example, a preset data change amount may be set, and the preset data change amount may be increased or decreased based on the basic data amount to obtain the heuristic data amount. The data variable quantity can be understood as the data quantity of the probe data quantity batch_try changed compared with the basic data quantity batch.
Alternatively, the data change amount may be set in the following ways. It will be appreciated that the following is merely a few examples and is not limiting of the setting of the amount of data change.
First, the amount of data change can be set with reference to a similar application and the latest data batch size that the application is running. For example, the application corresponds to a data batch size of 10150, and then the data change amount may be set to 150.
Second, if popular applications, reference may be made to advice from web documents of some software or advice from blogs of specialists. For example, if the blog suggestion data batch size of a certain expert is 10100, the data change amount may be set to 100.
Third, the data batch size may be determined with reference to initial settings that the application is self-contained. For example, the data batch size initially set is 10100, and then the data change amount may be set to 100.
Fourth, the amount of data change (preset value) may be arbitrarily set. It may be generally set to 200, 150, 100, etc., and is not particularly limited.
Fifth, the data change amount may also be set as a product of the basic data amount and a preset percentage. For example, +/-2% of the predetermined percentage, the data change is +200/-200.
It will be appreciated that when the amount of data change is the product of the basic amount of data and a preset percentage, in order to prevent the amount of data change from being too large or too small, the following constraint may be added: and if the product of the basic data quantity and the preset percentage is smaller than a first preset threshold value, determining the data change quantity as the first preset threshold value. And if the product of the first data quantity and the preset percentage is larger than a second preset threshold value, determining the data change quantity as the second preset threshold value.
Optionally, the constraint constrains the data variation between a first preset threshold and a second preset threshold, so as to avoid inaccurate test caused by too large or too small data volume of the test probes. For example, the product of 10000 of the basic data and 0.05% of the preset percentage is 5, and the first preset threshold is 20, and since 5 is smaller than 20, 20 can be used as the data variable, and the heuristic data can be 9980 or 10020. For example, the product of the basic data amount 10000 and the preset percentage 5% is 500, and the second preset threshold is 200, and since 500 is greater than 200, 200 can be used as the data variation, i.e. the heuristic data amount can be 9800 or 10200.
In one possible implementation, table 1 is a determination example of the second data amount provided in the embodiment of the present application, as shown in table 1:
Table 1:
first data volume Data variable quantity Second data volume
10000 2%*10000 9800/10200
6000 100 5900/6100
10000 150 9850/10150
10000 200 9800/10200
That is, when the basic data amount is 10000, the preset data change amount may be 2% by 10000, and the heuristic data amount may be 9800 or 10200. When the basic data amount is 6000, the preset data change amount may be 100, and the second data amount may be 5900 or 6100. When the basic data amount is 10000, the preset data change amount may be 150, and the heuristic data amount may be 9850 or 10150. When the first data amount is 10000, the preset data change amount may be 200, and the heuristic data amount may be 9800 or 10200.
203. And sequentially transmitting the data of the basic data quantity corresponding to the current basic transmission batch and the data of the heuristic data quantity corresponding to the heuristic transmission batch.
It can be understood that after determining the amount of probing data corresponding to the probing transmission lot, sequentially transmitting the data of the basic data amount corresponding to the current basic transmission lot and the data of the probing data amount corresponding to the probing transmission lot. And after the transmission is finished, comparing the transmission conditions of the basic transmission batch and the trial transmission batch, and judging whether the basic data volume is more suitable for the current transmission environment or the trial data volume is more suitable for the current transmission environment according to the comparison result. If the basic data volume is more suitable for the current transmission environment, keeping the data volume corresponding to the subsequent basic transmission batch as the basic data volume; if the amount of the tentative data is more suitable for the current transmission environment, the amount of data corresponding to the subsequent basic transmission lot needs to be adjusted to the tentative data amount, so as to improve the transmission efficiency of the subsequent basic transmission lot.
204. And calculating the first transmission efficiency corresponding to the current basic transmission batch and the second transmission efficiency corresponding to the trial transmission batch.
The first transmission efficiency is used for representing the transmission speed degree of the data in the current basic transmission batch, and the second transmission efficiency is used for representing the transmission speed degree of the data in the trial transmission batch. For example, the first transmission efficiency may be a ratio of a basic data amount to a transmission duration of the basic transmission lot, i.e., a data amount transmitted by the basic transmission lot per unit time. The second transmission efficiency is the ratio of the transmission duration of the probe data amount to the transmission duration of the probe data amount, i.e. the data amount transmitted by the probe transmission batch in unit time. It can be appreciated that the higher the transmission efficiency, the faster the transmission speed of data.
In this step, during the running process of the application program, when data is transmitted according to the second data amount, the second transmission efficiency corresponding to the data is continuously compared with the first transmission efficiency corresponding to the first data amount according to the second data amount, and when the second transmission efficiency continuous N batches corresponding to the second data amount are greater than the first transmission efficiency corresponding to the first data amount, the second data amount is determined to be the data amount in the subsequent data transmission batches.
For example, if the basic data size is 10000, and the transmission duration cost_base of the basic data size is 50ms, the first transmission efficiency speed_base is 10000/50=200; the heuristic data size batch_try may be 10200, and when the transmission duration cost_try of the heuristic data size batch_try is 48.57ms, the second transmission efficiency speed is 10200/48.57=210.
205. And if the second transmission efficiency corresponding to the tentative 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 into the tentative data volume.
It can be understood that if the second transmission efficiency corresponding to the tentative transmission lot is greater than or equal to the first transmission efficiency corresponding to the current basic transmission lot, it is indicated that the tentative data amount is more suitable for the current transmission environment, that is, when the data size included in one lot is the tentative data amount in the current transmission environment, higher transmission efficiency can be obtained, and then the data amount corresponding to the subsequent basic transmission lot needs to be determined as the tentative data amount, so that resources of the transmission network and the data receiver are not wasted while higher transmission efficiency is obtained. If the second transmission efficiency corresponding to the probing transmission lot is smaller than the first transmission efficiency corresponding to the current basic transmission lot, the probing failure is indicated, so that the data volume corresponding to the subsequent basic transmission lot should still be kept as the basic data volume.
To ensure the safety and stability of the data amount adjustment process, the data amount of the basic transmission batch can be adjusted after probing a plurality of times. That is, a plurality of probing transmission lots are determined according to the probing data amount, and when the transmission efficiency of all probing transmission lots is greater than or equal to the transmission efficiency of the basic transmission lot, the data amount of the subsequent basic transmission lot is adjusted to the probing data amount.
It will be appreciated that the meaning of a continuous multi-batch heuristic is to determine the amount of data transferred that is more efficient and stable, and therefore, the number of batches to be transferred should not be too large and small for the heuristic. Typically, 4 heuristics or 5 heuristics, etc. may be set.
For example, the probing transmission lot may be determined periodically, i.e. one probing transmission lot is determined every other time period to probe. For example, the data batch size of the data transmission corresponding to the time node is set to be the heuristic data amount every 10 minutes, and the data is transmitted as a heuristic transmission batch.
Or determining the transmission batch corresponding to the time node as the current basic transmission batch every 10 minutes, taking the data volume corresponding to the transmission batch as the basic data volume, and setting the data batch size of the next transmission batch as the trial data volume to be used as the trial transmission batch. The transmission efficiency of the basic transmission lot and the trial transmission lot are then compared. If the transmission efficiency of the probing transmission lot within one 10 minutes is greater than or equal to the basic transmission lot, the transmission efficiency of the probing transmission lot and the basic transmission lot within the next 10 minutes is continued to be judged. Assuming that the number of probing is 5, i.e., within 50 consecutive minutes, the transmission efficiency of each probing transmission lot within 10 minutes is greater than or equal to the basic transmission lot, the data volume of the basic transmission lot after the last probing lot within 50 minutes needs to be modified to the probing data volume.
Wherein, in a long time when an application program provides a transmission service of data for a data receiving party and a transmitting party, in order to avoid the influence of a probing process on a normal service, the frequency of probing transmission batches should be controlled.
In a specific example, the 11 point 10 is divided into basic transmission batches for transmitting data according to the basic data amount, the data is transmitted according to the heuristic transmission batches after the transmission is completed, and then the data is still transmitted according to the basic data amount based on the basic transmission batches until the 11 point 20 is divided into basic transmission batches for transmitting the data according to the basic data amount, and the data is transmitted again based on the heuristic transmission batches. After the basic transmission batch is divided into 11 points 30 and data is transmitted according to the basic data quantity, the third trial transmission batch is again transmitted according to the trial data quantity, the fourth trial batch is transmitted according to the trial data quantity after the 11 points 40 are divided, and the fifth trial batch is transmitted according to the trial data quantity after the 11 points 50 are divided, so that the data is pushed out according to the trial data quantity … ….
Each probing transmission lot then needs to compare the transmission efficiency with its previous basic transmission lot, thereby determining and recording the probing effect of the probing transmission lot. Illustratively, table 2 is an example one of the transmission efficiency comparisons provided in the embodiments of the present application, as shown in table 2 (e.g., heuristic number 5):
Table 2:
Figure BDA0003995212070000121
that is, after data transmission is performed according to the basic data amount, the first transmission efficiency is measured as 200, and then data transmission is performed according to the tentative data amount, the second transmission efficiency is measured as 210, and the transmission efficiency of the first tentative transmission lot is greater than the transmission efficiency of the basic transmission lot. The transmission efficiency of the five consecutive probing transmission batches is greater than that of the basic transmission batch, so that the probing data volume can be considered as the data batch size more suitable for the data transmission of the running environment where the current application program is located, and can be used as the data batch size of the subsequent data transmission. This requires modifying the data volume corresponding to the subsequent normal transmission lot to the probe data volume.
However, whenever a heuristic transmission lot occurs with a transmission efficiency less than the basic transmission lot, the heuristic of the present round needs to be terminated. The data volume of the basic transmission lot is still kept as the basic data volume. It is then necessary to redetermine the amount of data change and redetermine a new amount of heuristic data based on the redetermined amount of data change. Finally, a new round of verification test process for the new test data quantity is entered.
In the method provided by the embodiment of the application, the data batch size suitable for the current transmission environment is probed by utilizing the probing transmission batch in the data transmission process. Specifically, the common transmission batch determines the data amount contained according to the basic data amount, and then uses the basic data amount as a reference to determine the heuristic data amount corresponding to the heuristic transmission batch. And then transmitting the data of the common transmission batch and the data of the trial transmission batch at one time, and calculating the respective transmission efficiencies. If the transmission efficiency of the tentative transmission lot is greater than or equal to the transmission efficiency of the normal transmission lot, the data volume of the subsequent normal transmission lot is modified to the tentative data volume so as to be suitable for the current transmission environment. The subsequent probing transmission batch then resumes probing to cope with the changing transmission environment.
According to the technical scheme, the change of the transmission environment can be perceived by using the transmission result of the trial transmission batch, the data batch size with higher transmission efficiency under the current transmission environment is determined by comparing the transmission efficiency of the trial transmission batch and the common transmission batch, and the data volume of most of the subsequent transmission batches (common transmission batches) is adjusted according to the better data batch size, so that the data volume of the subsequent common transmission batch is more suitable for the transmission environment, and the transmission efficiency of the subsequent common transmission batch is improved. Namely, the method can dynamically adjust the data quantity of the common transmission batch along with the change of the transmission environment, so that the method is more suitable for the current operation environment, and the data transmission efficiency is greatly improved.
On the basis of the above embodiments, fig. 3 is a flow chart of another method for adjusting data transmission amount according to an embodiment of the present application. As shown in fig. 3, the method for adjusting the data transmission amount may include the steps of:
301. during data transmission, a common transmission batch is initialized and a heuristic variable is initialized.
The data amount corresponding to the common transmission batch to be currently transmitted may be determined to be the basic data amount batch, for example, the basic data amount may be 10000. And a heuristic variable needs to be initialized, for example, a heuristic variable try_state is initialized to 0.
The heuristic variable try_state corresponds to the heuristic transmission batch and is used for representing the successful number of the heuristic transmission batch. For example, after initializing the heuristic variable try_state to 0 and finding that the transmission efficiency of the heuristic transmission lot is greater than that of the basic transmission lot after transmitting data by using the heuristic transmission lot for the first time, the heuristic variable try_state may be updated to 1, and after transmitting data according to the heuristic data amount by using the heuristic transmission lot for the second time, if the transmission efficiency of the heuristic transmission lot is still greater than that of the basic transmission lot, the heuristic variable try_state may be updated to 2, and so on. However, once the transmission efficiency of the probing transmission lot is smaller than that of the basic transmission lot, the probing state try_state needs to be restored to the initialization state, and the successful times of probing of the probing transmission lot are accumulated again.
302. And transmitting the data of the basic data quantity corresponding to the basic transmission batch, and acquiring the transmission time length corresponding to the basic transmission batch.
After the basic transmission lot is determined, it is necessary to transmit data according to the basic data amount and monitor the transmission condition of the basic transmission lot. After the transmission is completed, the transmission time length cost_base of the basic transmission batch needs to be determined.
303. The positive and negative of the current heuristic variable are determined.
It is understood that the value of the heuristic variable try_state may be 0, positive, negative. If the number is 0, it indicates that a new round of probing is not performed, and the number of probing times is 0. If not, it is indicated that probing has been started. Wherein positive and negative represent heuristic directions, positive values represent heuristic data amounts greater than the base data amount, and negative values represent heuristic data amounts less than the base data amount. Therefore, it is necessary to determine the amount of probe data corresponding to the next probe transmission lot according to the current probe variable.
304. And determining the heuristic data quantity corresponding to the heuristic transmission batch according to the basic data quantity, the preset data change quantity and the positive and negative states of the heuristic variables.
For example, the amount of probe data corresponding to a probe transmission lot may be determined from a probe variable. If the heuristic variable try_state is positive, the heuristic data amount batch_try=1.02 is the basic data amount batch (i.e. the heuristic data amount is increased by 2% compared to the basic data amount). If the heuristic variable try_state is negative, the basic data amount batch_try=0.98 is the basic data amount batch (i.e., the heuristic data amount is reduced by 2% compared to the basic data amount). If the heuristic variable try_state is 0, then the heuristic variable needs to be assigned to positive 1 or negative 1 randomly, and then the size of the heuristic data amount is determined according to the determined positive and negative.
305. Transmitting data of the heuristic data amount corresponding to the heuristic transmission batch, and obtaining the transmission time length corresponding to the heuristic transmission batch.
After the amount of the trial data is determined, transmitting the data of the amount of the trial data corresponding to the trial transmission batch, and then monitoring the transmission process to obtain the transmission time length cost_try corresponding to the trial transmission batch.
306. And calculating the first transmission efficiency corresponding to the basic transmission batch and the second transmission efficiency corresponding to the heuristic transmission batch.
Then, 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 efficiency is compared, so that whether the basic data volume accords with the current transmission environment or the trial data volume accords with the transmission environment is determined. The transmission efficiency is the ratio of the data quantity to the transmission duration. For example, the first transmission efficiency speed_base=the basic data amount batch/the transmission duration cost_base corresponding to the basic transmission batch. And the second transmission efficiency speed_try=the probe data amount batch_try/the transmission duration cost_try corresponding to the probe transmission batch.
307. And judging whether the second transmission efficiency is greater than or equal to the first transmission efficiency. If yes, go to step 309. If not, go to step 308.
308. The value of the heuristic variable is normalized to 0.
Wherein if the second transmission efficiency speed_try corresponding to the tentative transmission lot is not greater than the first transmission efficiency speed_base corresponding to the basic transmission lot, it is indicated that the attempt in this direction is not effective. Therefore, the value of the heuristic variable is reset to 0, new positive and negative directions are allocated to the heuristic variable again, a new heuristic data amount is determined, and a new round of heuristic is performed.
309. If the heuristic variable is positive, 1 is added; if the heuristic variable is negative, then 1 is decremented.
If the second transmission efficiency corresponding to the probing transmission lot is greater than or equal to the first transmission efficiency corresponding to the basic transmission lot, the attempt to determine the direction is beneficial, and the number of successful probing needs to be accumulated. And 1 is added when the heuristic variable is positive, and 1 is subtracted when the heuristic variable is negative. All representing a successful heuristic.
310. It is determined whether the absolute value of the heuristic variable is less than a time threshold. If yes, return to wait for execution step 304. If not, go to step 311.
The number of successful probing transmission batches for successive probing needs to be determined based on the absolute value of the probing variable. The heuristic variable try state is first taken an absolute value (i.e., eliminating the negative sign), and if the absolute value is greater than a threshold number of times (e.g., the threshold number of times is equal to 5), it is beneficial to account for the data volume heuristic to be run 5 times in succession (50 minutes have elapsed, every 10 minutes being tried). Thus, the heuristic variable is described as a preferred data batch size in the current transmission environment. If the absolute value of the heuristic variable try_state is smaller than 5, it is beneficial to say that the number of attempts in the direction (positive direction or negative direction) is insufficient, but because the number of attempts is insufficient and is not stable enough, the data needs to be continuously transmitted according to the basic data volume, the heuristic transmission batch is transmitted again, and whether the heuristic of the heuristic data volume is beneficial is verified according to the transmission condition of the next heuristic transmission batch.
311. And modifying the data volume corresponding to the subsequent basic transmission batch into the heuristic data volume.
If the absolute value is greater than the number of times threshold (e.g., the number of times threshold is equal to 5), then a data volume heuristic that accounts for 5 consecutive times (every 10 minutes trial passes) is beneficial. Thus, the heuristic variable is described as a preferred data batch size in the current transmission environment. Then the value of the heuristic data quantity batch_try is required to be assigned to the basic transmission batch, and the data quantity batch of the subsequent basic transmission batch is modified to be batch_try, so that the subsequent data transmission can transmit data according to the new batch size, and the data transmission efficiency is greatly improved.
According to the data transmission quantity adjusting method, when an application program runs continuously, the reference batch size and the initial heuristic variable are initialized, the application program transmits data according to the reference batch size, and the first transmission time length is obtained. And then judging the value of the heuristic variable, setting the heuristic data amount according to the basic data amount, and transmitting the data of the heuristic data amount won by the heuristic transmission batch to acquire a second transmission time length. And then respectively determining transmission efficiency corresponding to the basic data quantity and the heuristic data quantity based on the first transmission time length and the second transmission time length, and returning the heuristic variable to 0 if the second transmission efficiency corresponding to the heuristic data quantity is not greater than the first transmission efficiency corresponding to the basic data quantity. If the second transmission efficiency corresponding to the heuristic data amount is greater than the first transmission efficiency corresponding to the basic data amount, it is beneficial to indicate that the direction is attempted, and then determine the heuristic data amount as the data amount more suitable for the running environment of the current application program.
On the basis of the above method embodiment, fig. 4 is a schematic diagram of a device for adjusting a data transmission amount according to an embodiment of the present application, as shown in fig. 4, where the device for adjusting a data transmission amount includes:
an obtaining unit 401 is configured to obtain a basic data amount corresponding to a current basic transmission batch.
The determining unit 402 is configured to determine, according to the basic data amount and the preset data variation amount, a heuristic data amount corresponding to the heuristic transmission lot.
A transmission unit 403, configured to sequentially transmit data of a basic data amount corresponding to a current basic transmission lot and data of a heuristic data amount corresponding to a heuristic transmission lot.
And the processing unit 404 is configured to modify the data amount corresponding to the subsequent basic transmission batch into the tentative data amount if the second transmission efficiency corresponding to the tentative 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.
The first transmission efficiency is used for representing the transmission speed degree of the data corresponding to the current basic transmission batch, and the second transmission efficiency is used for representing the transmission speed degree of the data corresponding to the trial transmission batch.
In an alternative embodiment, the obtaining unit 401 is further configured to periodically select a target transmission lot from the basic transmission lots.
The determining unit 402 is further configured to take the data amount corresponding to the target transmission lot as the basic data amount, and determine the target transmission lot as the current basic transmission lot.
In an alternative embodiment, the probe transmission lot corresponds to a probe variable.
The processing unit 404 is further configured to set the initial value of the heuristic variable to 0.
The determining unit 402 is further configured to randomly determine the positive and negative of the value of the heuristic variable.
The processing unit 404 is further configured to add 1 to the value of the heuristic variable if the second transmission efficiency corresponding to the heuristic transmission lot is not less than the first transmission efficiency corresponding to the current basic transmission lot and the value of the heuristic variable is a positive value during the data transmission process. If the second transmission efficiency corresponding to the probing transmission lot is not less than the first transmission efficiency corresponding to the current basic transmission lot and the value of the probing variable is a negative value, subtracting 1 from the value of the probing variable. And if the second transmission efficiency corresponding to the heuristic transmission batch is smaller than the first transmission efficiency corresponding to the current basic transmission batch, returning the value of the heuristic variable to 0.
In an alternative embodiment, the obtaining unit 401 is further configured to obtain an absolute value of the current value of the heuristic variable.
The processing unit 404 is specifically configured to not modify the data amount corresponding to the subsequent basic transmission batch if the absolute value of the current value of the heuristic variable is smaller than the frequency threshold. And if the absolute value of the current numerical value of the heuristic variable is greater than or equal to the frequency threshold, modifying the data quantity corresponding to the subsequent basic transmission batch into the heuristic data quantity.
In an alternative embodiment, the processing unit 404 is further configured to restore the value of the heuristic variable to the initial value
In an alternative embodiment, the obtaining unit 401 is further configured to obtain a first transmission duration of the data of the basic data amount corresponding to the current basic transmission batch, and a second transmission duration of the data of the heuristic data amount corresponding to the heuristic transmission batch.
The determining unit 402 is further configured to determine a first transmission efficiency corresponding to the current basic transmission batch according to the basic data amount and the first transmission duration. And determining a second transmission efficiency corresponding to the heuristic transmission batch according to the heuristic transmission quantity and the second transmission duration.
In an alternative embodiment, the first transmission efficiency is a ratio of a basic data amount to a first transmission duration, and the second transmission efficiency is a ratio of a tentative data amount to a second transmission duration.
In an alternative embodiment, the obtaining unit 401 is further configured to obtain first transmission efficiencies corresponding to a plurality of basic transmission batches before the tentative transmission batch.
The determining unit 402 is further configured to determine an average transmission efficiency according to the first transmission efficiencies corresponding to the plurality of basic transmission batches.
The processing unit 404 is specifically configured to modify the data size corresponding to the subsequent basic transmission lot into the probe data size if the second transmission efficiency is not less than the average transmission efficiency.
In an alternative embodiment, the current value of the heuristic variable is obtained.
The determining unit 402 is specifically configured to determine that the probe data size corresponding to the probe transmission lot is the basic data size plus the preset data change size if the current value of the probe variable is a positive value.
If the current value of the heuristic variable is a negative value, determining that the heuristic data amount corresponding to the heuristic transmission batch is the basic data amount minus the preset data variation amount.
In an alternative embodiment, the preset data change amount is any one of the following: the product of the first data amount and a preset percentage or a preset variation value.
The device for adjusting the data transmission amount provided in the embodiment of the present application may be used to execute the technical scheme corresponding to the method for adjusting the data transmission amount in the above embodiment, and its implementation principle and technical effect are similar, and will not be described herein again.
The data transmission quantity adjusting device can sense the change of the transmission environment by utilizing the transmission result of the trial transmission batch, determine the data batch size with higher transmission efficiency under the current transmission environment by comparing the transmission efficiency of the trial transmission batch and the common transmission batch, and adjust the data quantity of most of the subsequent transmission batches (common transmission batch) according to the better data batch size, so that the data quantity of the subsequent common transmission batch is more suitable for the transmission environment, thereby improving the transmission efficiency of the subsequent common transmission batch. The device can dynamically adjust the data volume of the common transmission batch along with the change of the transmission environment, so that the device is more suitable for the current operation environment, and the data transmission efficiency is greatly improved.
It should be noted that the division of the respective modules (the acquisition module, the processing module, and the determination module) of the above apparatus is merely a division of a logic function, and may be fully or partially integrated into one physical entity or may be physically separated. And these modules may all be implemented in software in the form of calls by the processing element; or can be realized in hardware; the method can also be realized in a form of calling software by a processing element, and the method can be realized in a form of hardware by a part of modules. In addition, all or part of the modules can be integrated together or can be independently implemented. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in a software form.
Next, referring to fig. 5, fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 800 may be configured with the data transmission amount adjusting device described in the corresponding embodiment of fig. 4, so as to implement the functions in the corresponding embodiments of fig. 1 to 3. Specifically, the electronic device 800 includes: a receiver 801, a transmitter 802, a processor 803, and a memory 804 (where the number of processors 803 in the execution device 800 may be one or more, one processor is exemplified in fig. 5), where the processor 803 may include an application processor 8031 and a communication processor 8032. In some embodiments of the present application, the receiver 801, transmitter 802, processor 803, and memory 804 may be connected by a bus or other means.
Memory 804 may include read only memory and random access memory and provides instructions and data to the processor 803. A portion of the memory 804 may also include non-volatile random access memory (NVRAM). The memory 804 stores a processor and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations.
The processor 803 controls the operation of the execution device. In a specific application, the individual components of the execution device are coupled together by a bus system, which may include, in addition to a data bus, a power bus, a control bus, a status signal bus, etc. For clarity of illustration, however, the various buses are referred to in the figures as bus systems.
The methods disclosed in the embodiments of the present application may be applied to the processor 803 or implemented by the processor 803. The processor 803 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry of hardware or instructions in software form in the processor 803. The processor 803 may be a general purpose processor, a digital signal processor (digital signal processing, DSP), a microprocessor, or a microcontroller, and may 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 device, discrete gate or transistor logic device, discrete hardware components. The processor 803 may implement or perform the methods, steps, and logic blocks disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in hardware, in a decoded processor, or in a combination of hardware and software modules in a decoded processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 804, and the processor 803 reads information in the memory 804, and in combination with the hardware, performs the steps of the above method.
The receiver 801 may be used to receive input numeric or character information and to generate signal inputs related to performing relevant settings and function control of the device. The transmitter 802 may be used to output numeric or character information through a first interface; the transmitter 802 may also be configured to send instructions to the disk group through the first interface to modify data in the disk group; the transmitter 802 may also include a display device such as a display screen.
In the embodiment of the present application, the application processor 8031 in the processor 803 is configured to execute the method for adjusting the data transmission amount in the corresponding embodiment of fig. 1 to 3. It should be noted that, the specific manner in which the application processor 8031 executes each step is based on the same concept as that of each method embodiment corresponding to fig. 1 to 3 in the present application, so that the technical effects brought by the specific manner are the same as those of each method embodiment corresponding to fig. 1 to 3 in the present application, and details of the specific manner may be referred to the descriptions in the foregoing method embodiments shown in the present application, which are not repeated herein.
The embodiment of the application also provides a chip for running the instruction, and the chip is used for executing the technical scheme of the method for adjusting the data transmission quantity in the embodiment.
The embodiment of the application also provides a computer readable storage medium, in which computer instructions are stored, which when executed on a computing device, cause the computing device to execute the technical scheme of the method for adjusting the data transmission amount in the embodiment.
The embodiment of the application also provides a computer program product, which comprises a computer program, wherein the computer program is used for executing the technical scheme of the method for adjusting the data transmission amount in the embodiment when being executed by a processor.
The computer readable storage medium described above may be implemented by any type or combination of volatile or nonvolatile memory devices 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 or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computing device.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
While the preferred embodiment has been described, it is not intended to limit the invention thereto, and any person skilled in the art may make variations and modifications without departing from the spirit and scope of the present invention, so that the scope of the present invention shall be defined by the claims of the present application.

Claims (13)

1. A method for adjusting a data transmission amount, the method comprising:
acquiring a basic data volume corresponding to a current basic transmission batch;
determining the heuristic data amount corresponding to the heuristic transmission batch according to the basic data amount and the preset data variation;
when sequentially transmitting the data of the basic data volume corresponding to the current basic transmission batch and the data of the heuristic data volume corresponding to the heuristic transmission batch, if the second transmission efficiency corresponding to the heuristic 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 into the heuristic data volume;
the first transmission efficiency is used for representing the transmission speed degree of the data corresponding to the current basic transmission batch, and the second transmission efficiency is used for representing the transmission speed degree of the data corresponding to the heuristic transmission batch.
2. The method according to claim 1, wherein the method further comprises:
periodically selecting a target transmission batch in the basic transmission batches;
and taking the data volume corresponding to the target transmission batch as the basic data volume, and determining the target transmission batch as the current basic transmission batch.
3. The method of claim 2, wherein the probe transmission lot corresponds to a probe variable, the method further comprising:
setting an initial value of the heuristic variable to 0;
randomly determining a positive preset value or a negative preset value of the numerical value of the heuristic variable;
in the data transmission process, if the second transmission efficiency corresponding to the heuristic transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch and the numerical value of the heuristic variable is a positive value, adding 1 to the numerical value of the heuristic variable;
if the second transmission efficiency corresponding to the heuristic transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch and the numerical value of the heuristic variable is a negative value, subtracting 1 from the numerical value of the heuristic variable;
and if the second transmission efficiency corresponding to the heuristic transmission batch is smaller than the first transmission efficiency corresponding to the current basic transmission batch, returning the value of the heuristic variable to 0.
4. A method according to claim 3, wherein said modifying the basic data volume corresponding to the subsequent basic transmission batch to the heuristic data volume comprises:
Acquiring the absolute value of the current numerical value of the heuristic variable;
if the absolute value of the current numerical value of the heuristic variable is smaller than the frequency threshold, the data quantity corresponding to the subsequent basic transmission batch is not modified;
and if the absolute value of the current numerical value of the heuristic variable is greater than or equal to the frequency threshold, modifying the data volume corresponding to the subsequent basic transmission batch into the heuristic data volume.
5. The method of claim 4, wherein after modifying the amount of data corresponding to the subsequent basic transmission lot to the heuristic amount of data, the method further comprises:
restoring the value of the heuristic variable to the initial value.
6. The method according to any one of claims 1 to 5, further comprising:
acquiring a first transmission time length of the data of the basic data volume corresponding to the current basic transmission batch and a second transmission time length of the data of the heuristic data volume corresponding to the heuristic transmission batch;
determining the first transmission efficiency corresponding to the current basic transmission batch according to the basic data quantity and the first transmission time length;
And determining the second transmission efficiency corresponding to the heuristic transmission batch according to the heuristic transmission quantity and the second transmission duration.
7. The method of claim 6, wherein the step of providing the first layer comprises,
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 heuristic data amount to the second transmission duration.
8. The method of claim 7, wherein the method further comprises:
acquiring the first transmission efficiency corresponding to a plurality of basic transmission batches before the heuristic transmission batch;
determining average transmission efficiency according to the first transmission efficiency corresponding to the plurality of basic transmission batches;
and if the second transmission efficiency corresponding to the tentative transmission lot is not less than the first transmission efficiency corresponding to the current basic transmission lot, modifying the data volume corresponding to the subsequent basic transmission lot to the tentative data volume, including:
and if the second transmission efficiency is not smaller than the average transmission efficiency, modifying the data volume corresponding to the subsequent basic transmission batch into the heuristic data volume.
9. The method of claim 3, wherein prior to determining the amount of probe data corresponding to the probe transmission lot, the method further comprises:
Acquiring the current value of the heuristic variable;
the determining the probe data volume corresponding to the probe transmission batch according to the basic data volume and the preset data variation volume comprises the following steps:
if the current value of the heuristic variable is a positive value, determining that the heuristic data amount corresponding to the heuristic transmission batch is the basic data amount plus the preset data variation amount;
and if the current value of the heuristic variable is a negative value, determining that the heuristic data volume corresponding to the heuristic transmission batch is the basic data volume minus the preset data variation volume.
10. The method according to claim 9, wherein the preset amount of data change is any one of:
the product of the first data amount and a preset percentage; or a preset variation value.
11. An apparatus for adjusting a data transmission amount, the apparatus comprising:
the acquisition unit is used for acquiring the basic data quantity corresponding to the current basic transmission batch;
the determining unit is used for determining the heuristic data amount corresponding to the heuristic transmission batch according to the basic data amount and the preset data variation;
a transmission unit, configured to sequentially transmit the data of the basic data amount corresponding to the current basic transmission batch and the data of the heuristic data amount corresponding to the heuristic transmission batch;
The processing unit is used for modifying the data volume corresponding to the subsequent basic transmission batch into the heuristic data volume if the second transmission efficiency corresponding to the heuristic transmission batch is not less than the first transmission efficiency corresponding to the current basic transmission batch in the data transmission process of the transmission unit;
the first transmission efficiency is used for representing the transmission speed degree of the data corresponding to the current basic transmission batch, and the second transmission efficiency is used for representing the transmission speed degree of the data corresponding to the heuristic transmission batch.
12. An electronic device, comprising: a processor, a memory, and computer program instructions stored on the memory and executable on the processor;
the processor, when executing the computer program instructions, implements a method for adjusting the amount of data transmission according to any one of the preceding claims 1 to 10.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein computer-executable instructions, which when executed by a processor, are adapted to carry out the method of adjusting the data transmission amount according to any of the preceding claims 1 to 10.
CN202211601597.6A 2022-12-13 2022-12-13 Data transmission amount adjusting method and device, electronic equipment and storage medium Pending CN116192759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211601597.6A CN116192759A (en) 2022-12-13 2022-12-13 Data transmission amount adjusting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211601597.6A CN116192759A (en) 2022-12-13 2022-12-13 Data transmission amount adjusting method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116192759A true CN116192759A (en) 2023-05-30

Family

ID=86431614

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211601597.6A Pending CN116192759A (en) 2022-12-13 2022-12-13 Data transmission amount adjusting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116192759A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405491A (en) * 2023-06-09 2023-07-07 北京随信云链科技有限公司 File batch uploading method and system, electronic equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116405491A (en) * 2023-06-09 2023-07-07 北京随信云链科技有限公司 File batch uploading method and system, electronic equipment and computer readable storage medium
CN116405491B (en) * 2023-06-09 2023-09-15 北京随信云链科技有限公司 File batch uploading method and system, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN108173698B (en) Network service management method, device, server and storage medium
CN111767142B (en) Method for setting current limiting threshold of service node and service terminal equipment
CN114257551A (en) Distributed current limiting method and system and storage medium
CN116192759A (en) Data transmission amount adjusting method and device, electronic equipment and storage medium
CN111464351B (en) Network distribution method and device for intelligent household equipment, terminal equipment and storage medium
CN107341097B (en) Information pushing method and device
CN105337783A (en) Method of monitoring abnormal flow consumption of communication equipment and apparatus
CN112328289A (en) Firmware upgrading method, device, equipment and storage medium
CN110163554B (en) Workflow operation method, device, server and storage medium
CN107665135B (en) Upgrading program pushing method and device
CN109960572B (en) Equipment resource management method and device and intelligent terminal
CN115907207A (en) Method, system, terminal and medium for predicting quotation interval in bidding process
CN112669091B (en) Data processing method, device and storage medium
CN111273939B (en) Information processing method, information processing device and terminal equipment
CN104462116A (en) Data selecting method and device
CN110704220B (en) Method, device and equipment for adjusting fusing parameters
CN110381150B (en) Data processing method and device on block chain, electronic equipment and storage medium
CN114221910A (en) Data control method and device for transmission channel
CN109639792B (en) Method and device for sharing resources
CN111581558A (en) Method, device and equipment for determining page loading duration and storage medium
JP2868447B2 (en) Transaction processing task number control method
CN108280113B (en) Service Worker control method and device and electronic terminal
CN113630332B (en) Distributed multistage dynamic current limiting method and system
CN117453377B (en) Model scheduling method, terminal equipment and server
CN112241754B (en) Online model learning method, system, device and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination