Information sending method and related device
By obtaining the initial sending time and information sending queue of information to be sent, the data volume is determined to control the sending rate, which solves the problem of message sending rate control in cross-market data interconnection in the securities market, and improves the reliability of information transmission.
Patent Information
- Application Number
- CN202210876752.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-25
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-07-25
AI Technical Summary
In the securities market, cross-market data interconnection demand makes it difficult to implement message transmission rate control between systems, resulting in reduced message rejection and information transmission reliability.
By obtaining the initial transmission time and information transmission queue of the information to be sent, the amount of data to be sent is determined to control the transmission rate and ensure the reliability of information transmission.
It effectively improves the reliability of information transmission, avoids the situation of rejecting messages, and ensures the stability of cross-market data interconnection.
Smart Images

Figure CN115632991B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to an information sending method and related devices. Background Art
[0002] In the securities market, there is a need for cross-market data interconnection, and systems in different markets need to be connected for data exchange. Due to the particularity of securities trading, these systems often have strict flow rate control requirements for key information such as orders. Some systems will reject messages or even disconnect when they detect that the sender has sent more than a specified number of messages within a specified interval.
[0003] The communication rate control algorithm in the existing scheme generally pursues that the average rate meets the requirements, or the rate does not exceed the limit within the statistical window of the sender. Since the statistical windows of the sender and the receiver are inconsistent, the sender's sending rate may be different from the sender's sending rate displayed by the receiver, so there may be situations such as message rejection, which reduces the reliability of information transmission. Summary of the invention
[0004] The embodiments of the present application provide an information sending method and related devices, which can determine the amount of data to be sent based on the starting sending time of the information to be sent and the information sending queue, so as to control the sending rate, thereby improving the reliability of information transmission.
[0005] A first aspect of an embodiment of the present application provides an information sending method, the method comprising:
[0006] Obtaining a starting sending time of information to be sent and an information sending queue, wherein an information sending rate corresponding to a time window in the information sending queue is lower than a preset rate;
[0007] Determining a first data volume of the information to be sent according to the information sending queue and the start sending time;
[0008] The information to be sent is sent according to the first data volume.
[0009] In a possible implementation, determining the first data volume of the information to be sent according to the information sending queue and the start sending time includes:
[0010] Determine, according to the information sending queue, a first time window and a maximum amount of data sent corresponding to the first time window, wherein the first time window includes a time window for sending part or all of the information to be sent;
[0011] Determine, according to the start sending time, a first sending duration for sending data within the first time window;
[0012] The first data amount is determined according to the first sending duration and the maximum sending data amount.
[0013] In a possible implementation, determining the first data volume of the information to be sent according to the information sending queue and the start sending time includes:
[0014] If the start sending time is the same as the start time of the current time window in the information sending queue, the maximum sending data amount corresponding to the current time window is determined as the first data amount.
[0015] In a possible implementation, determining the first data volume of the information to be sent according to the information sending queue and the start sending time includes:
[0016] Acquire time offset information of the start sending time in the second time window of the information sending queue;
[0017] Determine a first sub-time window and a second sub-time window according to the time offset information, wherein the first sub-time window is an occupied time window in the second time window;
[0018] Acquire a first reference data amount sent in the first sub-time window, and acquire a maximum data sending rate in the first sub-time window;
[0019] Determine a second reference data amount corresponding to the second sub-time window according to the first reference data amount and the maximum sent data amount corresponding to the second time window;
[0020] If the maximum data transmission rate in the first sub-time window is greater than the preset data transmission rate, determining the data amount correction value according to the maximum data transmission rate in the first sub-time window;
[0021] The first data amount is determined according to the data amount correction value and the second reference data amount.
[0022] In a possible implementation manner, the sending the information to be sent according to the first data amount includes:
[0023] Extracting information whose data volume corresponds to the first data volume from the information to be sent;
[0024] Sending information extracted from the information to be sent with a data volume corresponding to the first data volume;
[0025] After sending the information whose data volume corresponds to the first data volume extracted from the information to be sent, sending the information in the information to be sent except the information whose data volume corresponds to the first data volume extracted from the information to be sent.
[0026] A second aspect of an embodiment of the present application provides an information sending device, the device comprising:
[0027] An acquisition unit, used to acquire a start sending time of information to be sent and an information sending queue, wherein an information sending rate corresponding to a time window in the information sending queue is lower than a preset rate;
[0028] a determining unit, configured to determine a first data volume of the information to be sent according to the information sending queue and the start sending time;
[0029] A sending unit is used to send the information to be sent according to the first data volume.
[0030] In a possible implementation manner, the determining unit is used to:
[0031] Determine, according to the information sending queue, a first time window and a maximum amount of data sent corresponding to the first time window, wherein the first time window includes a time window for sending part or all of the information to be sent;
[0032] Determine, according to the start sending time, a first sending duration for sending data within the first time window;
[0033] The first data amount is determined according to the first sending duration and the maximum sending data amount.
[0034] In a possible implementation manner, the determining unit is used to:
[0035] If the start sending time is the same as the start time of the current time window in the information sending queue, the maximum sending data amount corresponding to the current time window is determined as the first data amount.
[0036] In a possible implementation manner, the determining unit is used to:
[0037] Acquire time offset information of the start sending time in the second time window of the information sending queue;
[0038] Determine a first sub-time window and a second sub-time window according to the time offset information, wherein the first sub-time window is an occupied time window in the second time window;
[0039] Acquire a first reference data amount sent in the first sub-time window, and acquire a maximum data sending rate in the first sub-time window;
[0040] Determine a second reference data amount corresponding to the second sub-time window according to the first reference data amount and the maximum sent data amount corresponding to the second time window;
[0041] If the maximum data transmission rate in the first sub-time window is greater than the preset data transmission rate, determining the data amount correction value according to the maximum data transmission rate in the first sub-time window;
[0042] The first data amount is determined according to the data amount correction value and the second reference data amount.
[0043] In a possible implementation, the sending unit is used to:
[0044] Extracting information whose data volume corresponds to the first data volume from the information to be sent;
[0045] Sending information extracted from the information to be sent with a data volume corresponding to the first data volume;
[0046] After sending the information whose data volume corresponds to the first data volume extracted from the information to be sent, sending the information in the information to be sent except the information whose data volume corresponds to the first data volume extracted from the information to be sent.
[0047] A third aspect of an embodiment of the present application provides a server, comprising a processor, an input device, an output device and a memory, wherein the processor, input device, output device and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the step instructions in the first aspect of the embodiment of the present application.
[0048] The fourth aspect of the embodiments of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute part or all of the steps described in the first aspect of the embodiments of the present application.
[0049] A fifth aspect of the embodiments of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
[0050] Implementing the embodiments of the present application has at least the following beneficial effects:
[0051] By obtaining the starting sending time of the information to be sent and the information sending queue, the information sending rate corresponding to the time window in the information sending queue is lower than the preset rate, and the first data volume of the information to be sent is determined according to the information sending queue and the starting sending time, and the information to be sent is sent according to the first data volume. Therefore, the data volume that needs to be sent can be determined based on the starting sending time of the information to be sent and the information sending queue to control the sending rate, thereby improving the reliability of information transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 work.
[0053] Figure 1 A schematic diagram of an information sending system is provided for an embodiment of the present application;
[0054] Figure 2A A flowchart of another information sending method is provided for an embodiment of the present application;
[0055] Figure 2B A schematic diagram of another message queue is provided for an embodiment of the present application;
[0056] Figure 3 A flowchart of another information sending method is provided for an embodiment of the present application;
[0057] Figure 4 A schematic diagram of the structure of a server provided in an embodiment of the present application;
[0058] Figure 5 A structural schematic diagram of an information sending device is provided for an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof 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 limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0061] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0062] In order to better understand the information sending method provided by the embodiment of the present application, the following first briefly introduces the information sending system using the information sending method. Figure 1 , Figure 1 A schematic diagram of an information sending system is provided for an embodiment of the present application. Figure 1 As shown, the information sending system includes a first server and a second server. The first server is used to send information to the second server. The first server can obtain the starting sending time and the information sending queue of the information to be sent. The information sending rate corresponding to the time window in the information sending queue is lower than the preset rate. The first server determines the first data volume of the information to be sent according to the information sending queue and the starting sending time. The first server sends the information to be sent according to the first data volume. Therefore, even if the time window for sending information of the first server is different from the time window for receiving information of the second server, the rate at which the second server receives the information does not exceed the maximum receiving rate allowed by the second server, thereby ensuring the normal transmission of information and improving the reliability of information transmission between the first server and the second server.
[0063] See also Figure 2A , Figure 2A A flowchart of a method for sending information is provided for an embodiment of the present application. Figure 2A As shown, the method is applied to a server, and the method includes:
[0064] 201. Obtain a starting sending time of information to be sent and an information sending queue, wherein an information sending rate corresponding to a time window in the information sending queue is lower than a preset rate.
[0065] The information to be sent may be information that needs to be sent in the server, for example, data required by a system different from the server, specifically, entrustment information in a securities system, etc.
[0066] The information transmission queue may be a ring queue, in which a plurality of time windows are included, each time window being set with a maximum amount of data to be transmitted. Each time window has a corresponding index number. The preset rate may be understood as the information transmission rate corresponding to the maximum amount of data to be transmitted corresponding to the time window.
[0067] 202. Determine a first data volume of the information to be sent according to the information sending queue and the start sending time.
[0068] The starting sending time of the information to be sent can be understood as the current time. The starting sending time is used to represent the time when the information can be sent. The actual time of sending the information can be a time after this time.
[0069] The first data volume can be determined based on the first time window in the information sending queue and the maximum sending data volume corresponding to the first time window. Alternatively, if the start sending time is the same as the start time of the current time window in the information sending queue, the maximum sending data volume corresponding to the current time window is determined as the first data volume. Of course, the first data volume can also be determined based on the time offset information of the start sending time in the second time window of the information sending queue. Therefore, the first data volume can be determined by one or more of the above multiple methods, which improves the accuracy of determining the first data volume.
[0070] 203. Send the information to be sent according to the first data volume.
[0071] When sending information to be sent, information corresponding to the first data volume can be extracted from the information to be sent and sent. After sending, the remaining information to be sent can be sent. Therefore, the data volume within the time window can be guaranteed, so that the receiving rate of the receiver does not exceed the limited rate, thereby improving the stability of information transmission.
[0072] In this example, by obtaining the starting sending time of the information to be sent and the information sending queue, the information sending rate corresponding to the time window in the information sending queue is lower than the preset rate, and the first data volume of the information to be sent is determined according to the information sending queue and the starting sending time, and the information to be sent is sent according to the first data volume. Therefore, the data volume that needs to be sent can be determined based on the starting sending time of the information to be sent and the information sending queue to control the sending rate, thereby improving the reliability of information transmission.
[0073] In a possible implementation, a possible method for determining a first data volume of the information to be sent according to the information sending queue and the start sending time includes:
[0074] A1. Determine, according to the information sending queue, a first time window and a maximum amount of data to be sent corresponding to the first time window, wherein the first time window includes a time window for sending part or all of the information to be sent;
[0075] A2. Determine, according to the start sending time, a first sending duration for sending data within the first time window;
[0076] A3. Determine the first data amount according to the first sending duration and the maximum sending data amount.
[0077] The first time window may be the last time window in the information sending queue, and the last time window may be understood as the time window of the current moment. The first time window may be used to send all information to be sent, or may be used to send part of the information to be sent. The duration of the time windows in the information sending queue is the same.
[0078] The first sending duration may be determined according to the position of the start sending time in the first time window, which may be specifically understood as determining the time after the start sending time in the first time window as the first sending duration.
[0079] The first data volume can be determined from the maximum data volume to be sent according to the proportion of the first sending duration in the first time window. The larger the proportion, the larger the first data volume, and the smaller the proportion, the smaller the first data volume.
[0080] In this example, the first data volume is determined by determining the first time window and the maximum amount of data sent corresponding to the first time window, the start sending time, etc., thereby improving the accuracy of determining the first data volume.
[0081] In a possible implementation, another possible method for determining the first data volume of the information to be sent according to the information sending queue and the start sending time includes:
[0082] If the start sending time is the same as the start time of the current time window in the information sending queue, the maximum sending data amount corresponding to the current time window is determined as the first data amount.
[0083] The current time window may be understood as the time window where the start sending time is located, and may also be the first time window shown in the aforementioned embodiment.
[0084] In a possible implementation, another possible method for determining the first data volume of the information to be sent according to the information sending queue and the start sending time includes:
[0085] B1, obtaining the time offset information of the start sending time in the second time window of the information sending queue;
[0086] B2. Determine a first sub-time window and a second sub-time window according to the time offset information, where the first sub-time window is an occupied time window in the second time window;
[0087] B3. Obtain a first reference data amount sent in the first sub-time window, and obtain a maximum data sending rate in the first sub-time window;
[0088] B4. Determine a second reference data amount corresponding to the second sub-time window according to the first reference data amount and the maximum sent data amount corresponding to the second time window;
[0089] B5. If the maximum data transmission rate in the first sub-time window is greater than the preset data transmission rate, determining the data amount correction value according to the maximum data transmission rate in the first sub-time window;
[0090] B6. Determine the first data amount according to the data amount correction value and the second reference data amount.
[0091] The second time window may be the same as the first time window in the aforementioned embodiment, or may be the current time window.
[0092] The time offset information may be understood as the time offset information between the start sending time and the start time of the second time window.
[0093] The first time window is an occupied time window in the second time window, and the second sub-time window may be an unoccupied time window in the second time window.
[0094] The first reference data volume can be obtained from the memory, and after the data is sent, the amount of data that has been sent can be recorded, etc., so that the first reference data volume can be obtained. The maximum sending rate in the first sub-time window can be understood as the peak sending rate in the first time window. The peak sending rate can be higher than the maximum sending rate allowed in the second time window.
[0095] The difference between the maximum amount of sent data corresponding to the second time window and the first reference amount of data may be determined as the second reference amount of data.
[0096] Wherein, the preset data transmission rate is set by an empirical value or historical data. If the maximum data transmission rate in the first sub-time window is less than the preset data transmission rate, the data volume correction value for correcting the second reference data volume can be used according to the maximum data transmission rate in the first sub-time window. Since the maximum data transmission rate in the first sub-time window is higher than the preset data transmission rate, there may be a continuous high data transmission rate, and the subsequent data volume sent can be adjusted, so it is necessary to determine the data volume correction value to correct the second reference data volume to reduce the continuous high data transmission rate and improve the transmission stability. The larger the maximum data transmission rate in the first sub-time window, the larger the data volume correction value, and the smaller the maximum data transmission rate in the first sub-time window, the smaller the data volume correction value. The larger the data volume correction value, the more the data volume is reduced when the second reference data volume is corrected, and the smaller the first data volume is obtained. The smaller the data volume correction value, the less the data volume is reduced when the second reference data volume is corrected, and the larger the first data volume is obtained.
[0097] In this example, the second reference data amount corresponding to the second sub-time window is determined by the first reference data amount corresponding to the first sub-time window in the second time window, and the second reference data amount is corrected to obtain the first data amount, thereby improving the accuracy of determining the first data amount.
[0098] In a possible implementation manner, the sending the information to be sent according to the first data amount includes:
[0099] C1. extracting information whose data volume corresponds to the first data volume from the information to be sent;
[0100] C2, sending information corresponding to the first data amount extracted from the information to be sent;
[0101] C3. After sending the information whose data volume corresponds to the first data volume extracted from the information to be sent, sending the information in the information to be sent except the information whose data volume corresponds to the first data volume extracted from the information to be sent.
[0102] The information to be sent may include multiple data blocks, and a corresponding number of data blocks can be extracted according to the first data volume to obtain information corresponding to the first data volume. Thus, the information corresponding to the first data volume can be sent, and after the sending is completed, the remaining data can be sent. When the remaining information is sent, it is segmented according to the corresponding time window and the data volume corresponding to the time window.
[0103] In a specific embodiment, a specific information sending method includes:
[0104] Assume that the length of the time window is time_window, and the amount of data allowed to be sent in a time window is throttle_rate; set a ring queue msg_time[throttle_rate] with a size of rate limit (such as the number of messages allowed to be sent in each time window); set a variable sent_msg_count starting from 0 to record the number of messages sent after the program is started, and also serve as the message index number index in msg_time.
[0105] The specific information sent includes:
[0106] 1. Get the current time now
[0107] 2. Clear the records in the msg_time queue whose sending time is earlier than now-time_window;
[0108] 3. Calculate the amount of data that can be sent count
[0109] If the msg_time queue is empty, count = throttle_rate;
[0110] If the msg_time queue is not empty, count = throttle_rate – (sent_msg_count – data offset position of the head of the msg_time queue);
[0111] 4. If count <= 0, wait for the following time and return to step 1 to try again:
[0112] msg_time: the data sending time at the head of the queue + time_window – now;
[0113] 5. If count>0, data not exceeding count can be sent. The last data sending time and sent_msg_count of this batch are appended to the end of the msg_time queue.
[0114] sent_msg_count=sent_msg_count+count.
[0115] In another specific embodiment, the information sending method saves all messages sent within the most recent time window into a circular queue, and the circular queue is as follows: Figure 2B As shown. Each item in the queue stores the data transmission time Ti and data offset position Ii. When you want to send data starting from Ij and with a length of Lj at Tj, you only need to find the first data item from the back of the queue that satisfies Ij+Lj–Ik and is not less than the speed limit. If Tj–Tk is less than a time window, it means that if the current data is sent, the speed limit will be exceeded within the recent time window, so it cannot be sent temporarily.
[0116] See also Figure 3 , Figure 3 A flowchart of a method for sending information is provided for an embodiment of the present application. Figure 3 As shown, the method is applied to a server, and the method includes:
[0117] 301. Obtain a starting sending time of information to be sent and an information sending queue, wherein an information sending rate corresponding to a time window in the information sending queue is lower than a preset rate;
[0118] 302. Obtain time offset information of the start sending time in a second time window of the information sending queue;
[0119] 303. Determine a first sub-time window and a second sub-time window according to the time offset information, where the first sub-time window is an occupied time window in the second time window;
[0120] 304. Obtain a first reference data amount sent in the first sub-time window, and obtain a maximum data sending rate in the first sub-time window;
[0121] 305. Determine a second reference data amount corresponding to the second sub-time window according to the first reference data amount and the maximum sent data amount corresponding to the second time window;
[0122] 306. If the maximum data transmission rate in the first sub-time window is greater than the preset data transmission rate, determine a data amount correction value according to the maximum data transmission rate in the first sub-time window;
[0123] 307. Determine the first data amount according to the data amount correction value and the second reference data amount;
[0124] 308. Send the information to be sent according to the first data volume.
[0125] In this example, the second reference data amount corresponding to the second sub-time window is determined by the first reference data amount corresponding to the first sub-time window in the second time window, and the second reference data amount is corrected to obtain the first data amount, thereby improving the accuracy of determining the first data amount.
[0126] For the above embodiments, please refer to Figure 4 , Figure 4 A structural diagram of a server provided in an embodiment of the present application, as shown in the figure, includes a processor, an input device, an output device and a memory, the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program includes program instructions, the processor is configured to call the program instructions, and the program includes instructions for executing the following steps;
[0127] Obtaining a starting sending time of information to be sent and an information sending queue, wherein an information sending rate corresponding to a time window in the information sending queue is lower than a preset rate;
[0128] Determining a first data volume of the information to be sent according to the information sending queue and the start sending time;
[0129] The information to be sent is sent according to the first data volume.
[0130] The above mainly introduces the scheme of the embodiment of the present application from the perspective of the execution process on the method side. It is understandable that in order to realize the above functions, the terminal includes a hardware structure and / or software module corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments provided herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0131] The embodiment of the present application can divide the terminal into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0132] In line with the above, see Figure 5 , Figure 5 The present invention provides a schematic diagram of the structure of an information sending device. Figure 5 As shown, the device comprises:
[0133] An acquisition unit 501 is used to acquire a start sending time of information to be sent and an information sending queue, wherein the information sending rate corresponding to the time window in the information sending queue is lower than a preset rate;
[0134] A determining unit 502, configured to determine a first data volume of the information to be sent according to the information sending queue and the start sending time;
[0135] The sending unit 503 is configured to send the information to be sent according to the first data volume.
[0136] In a possible implementation, the determining unit 502 is configured to:
[0137] Determine, according to the information sending queue, a first time window and a maximum amount of data sent corresponding to the first time window, wherein the first time window includes a time window for sending part or all of the information to be sent;
[0138] Determine, according to the start sending time, a first sending duration for sending data within the first time window;
[0139] The first data amount is determined according to the first sending duration and the maximum sending data amount.
[0140] In a possible implementation, the determining unit 502 is configured to:
[0141] If the start sending time is the same as the start time of the current time window in the information sending queue, the maximum sending data amount corresponding to the current time window is determined as the first data amount.
[0142] In a possible implementation, the determining unit 502 is configured to:
[0143] Acquire time offset information of the start sending time in the second time window of the information sending queue;
[0144] Determine a first sub-time window and a second sub-time window according to the time offset information, wherein the first sub-time window is an occupied time window in the second time window;
[0145] Acquire a first reference data amount sent in the first sub-time window, and acquire a maximum data sending rate in the first sub-time window;
[0146] Determine a second reference data amount corresponding to the second sub-time window according to the first reference data amount and the maximum sent data amount corresponding to the second time window;
[0147] If the maximum data transmission rate in the first sub-time window is greater than the preset data transmission rate, determining the data amount correction value according to the maximum data transmission rate in the first sub-time window;
[0148] The first data amount is determined according to the data amount correction value and the second reference data amount.
[0149] In a possible implementation, the sending unit 503 is used to:
[0150] Extracting information whose data volume corresponds to the first data volume from the information to be sent;
[0151] Sending information extracted from the information to be sent with a data volume corresponding to the first data volume;
[0152] After sending the information whose data volume corresponds to the first data volume extracted from the information to be sent, sending the information in the information to be sent except the information whose data volume corresponds to the first data volume extracted from the information to be sent.
[0153] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program enables a computer to execute part or all of the steps of any one of the information sending methods recorded in the above method embodiments.
[0154] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program enables a computer to execute part or all of the steps of any one of the information sending methods recorded in the above method embodiments.
[0155] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0156] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0157] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0158] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0159] In addition, the functional units in the various embodiments of the application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software program modules.
[0160] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0161] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, which can include: a flash drive, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0162] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for sending information, characterized in that: The method comprises: Obtaining a starting sending time of information to be sent and an information sending queue, wherein an information sending rate corresponding to a time window in the information sending queue is lower than a preset rate; Determining a first data volume of the information to be sent according to the information sending queue and the start sending time; Sending the information to be sent according to the first data volume; The determining, according to the information sending queue and the start sending time, a first data volume of the information to be sent, comprises: Determine, according to the information sending queue, a first time window and a maximum amount of data sent corresponding to the first time window, wherein the first time window includes a time window for sending part or all of the information to be sent; Determine, according to the start sending time, a first sending duration for sending data within the first time window; The first data amount is determined according to the first sending duration and the maximum sending data amount.
2. The method according to claim 1, characterized in that The determining, according to the information sending queue and the start sending time, a first data volume of the information to be sent, comprises: If the start sending time is the same as the start time of the current time window in the information sending queue, the maximum sending data amount corresponding to the current time window is determined as the first data amount.
3. The method according to claim 1, characterized in that The determining, according to the information sending queue and the start sending time, a first data volume of the information to be sent, comprises: Acquire time offset information of the start sending time in the second time window of the information sending queue; Determine a first sub-time window and a second sub-time window according to the time offset information, wherein the first sub-time window is an occupied time window in the second time window; Acquire a first reference data amount sent in the first sub-time window, and acquire a maximum data sending rate in the first sub-time window; Determine a second reference data amount corresponding to the second sub-time window according to the first reference data amount and the maximum sent data amount corresponding to the second time window; If the maximum data transmission rate in the first sub-time window is greater than the preset data transmission rate, determining the data amount correction value according to the maximum data transmission rate in the first sub-time window; The first data amount is determined according to the data amount correction value and the second reference data amount.
4. The method according to any one of claims 1 to 3, characterized in that: The sending the information to be sent according to the first data volume includes: Extracting information whose data volume corresponds to the first data volume from the information to be sent; Sending information extracted from the information to be sent with a data volume corresponding to the first data volume; After sending the information whose data volume corresponds to the first data volume extracted from the information to be sent, sending the information in the information to be sent except the information whose data volume corresponds to the first data volume extracted from the information to be sent.
5. An information sending device, characterized in that: The device comprises: An acquisition unit, used to acquire a start sending time of information to be sent and an information sending queue, wherein an information sending rate corresponding to a time window in the information sending queue is lower than a preset rate; a determining unit, configured to determine a first data volume of the information to be sent according to the information sending queue and the start sending time; a sending unit, configured to send the information to be sent according to the first data volume; The determining unit is used for: Determine, according to the information sending queue, a first time window and a maximum amount of data sent corresponding to the first time window, wherein the first time window includes a time window for sending part or all of the information to be sent; Determine, according to the start sending time, a first sending duration for sending data within the first time window; The first data amount is determined according to the first sending duration and the maximum sending data amount.
6. The device according to claim 5, characterized in that The determining unit is used for: If the start sending time is the same as the start time of the current time window in the information sending queue, the maximum sending data amount corresponding to the current time window is determined as the first data amount.
7. A server, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Data receiving flow control method and system
CN104734985A
Scheduling method and device
CN108282415A