Movatterモバイル変換


[0]ホーム

URL:


CN113660171B - Flow control method and system for terminal data acquisition, server side and client side - Google Patents

Flow control method and system for terminal data acquisition, server side and client side
Download PDF

Info

Publication number
CN113660171B
CN113660171BCN202110912131.7ACN202110912131ACN113660171BCN 113660171 BCN113660171 BCN 113660171BCN 202110912131 ACN202110912131 ACN 202110912131ACN 113660171 BCN113660171 BCN 113660171B
Authority
CN
China
Prior art keywords
uploading
probability
determining
probability factor
client
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.)
Active
Application number
CN202110912131.7A
Other languages
Chinese (zh)
Other versions
CN113660171A (en
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech 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 CCB Finetech Co LtdfiledCriticalCCB Finetech Co Ltd
Priority to CN202110912131.7ApriorityCriticalpatent/CN113660171B/en
Publication of CN113660171ApublicationCriticalpatent/CN113660171A/en
Application grantedgrantedCritical
Publication of CN113660171BpublicationCriticalpatent/CN113660171B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a flow control method and a system for terminal data acquisition, a server and a client, and relates to the technical field of mobile interconnection, wherein the method comprises the following steps: the server receives an information uploading request sent by the client, determines the current actual transaction concurrency number based on the information uploading request, determines an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, and returns the uploading probability factor to the client; the client calculates an uploading time point according to the uploading probability factor and uploads information according to the uploading time point; the server receives the information sent by the client. By adding congestion feedback, sleeping at any time, delaying up-sending and other mechanisms, the invention can coordinate the communication between the terminal and the server, ensure the normal up-sending and downloading of information, and prevent the communication from channel paralysis caused by traffic jam.

Description

Flow control method and system for terminal data acquisition, server side and client side
Technical Field
The present invention relates to the field of mobile interconnection technologies, and in particular, to a flow control method and system for terminal data acquisition, a server side, and a client side.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In the scenes of mobile internet, internet of things and the like, terminal information acquisition, control and configuration information distribution are generally required. However, in the environment of the terminal, there are two features, one is that the number of the terminals is large, and the second is that the bandwidth of the communication network of the terminal is relatively limited, if the terminals send information at the same time, the situation of vehicle blocking may be encountered. In general, when a terminal has information to be sent, the information is directly sent, and a server side can generate larger wave peaks and wave troughs due to the change of business transaction amount. The server side generally performs service continuity protection in a current limiting and capacity expanding mode, and the client side performs retry through a certain rejection-retry mechanism to ensure successful information uploading. The mechanisms such as current limiting and retry are passive coping modes, the problems can be relieved to a certain extent, the problems of service rejection and blocking in the peak period still cannot be avoided, and the service availability and the information completion uploading are guaranteed to the greatest extent.
Disclosure of Invention
The embodiment of the invention provides a flow control method for terminal data acquisition, which is used for solving the problems of service rejection and blocking when a terminal simultaneously performs information uploading and meets a traffic jam through mechanisms such as current limiting, retry and the like, and comprises the following steps:
determining the current actual transaction concurrency number;
when the information is sent to the client, determining a sending probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number, and returning the sending probability factor to the client;
and receiving information uploaded by the client according to an uploading time point, wherein the uploading time point is calculated by the client according to the uploading probability factor.
In one embodiment, determining the current actual transaction concurrency number includes:
determining the number of clients;
determining the transaction amount of each client;
and determining the current actual transaction concurrency number according to the number of the clients and the transaction amount of each client.
In one embodiment, determining the uploading probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number includes:
determining the number of clients;
and determining an uploading probability factor according to the number of the clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number.
In one embodiment, the upload probability factor is determined according to the following formula:
Figure BDA0003204047110000021
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1.
In one embodiment, further comprising:
and dynamically adjusting the number of clients and/or fixed parameters according to the transaction characteristics.
The embodiment of the invention provides a flow control method for terminal data acquisition, which is used for solving the problems of service rejection and blocking when a terminal simultaneously performs information uploading and meets a traffic jam through mechanisms such as current limiting, retry and the like, and comprises the following steps:
when information needs to be uploaded, an uploading probability factor returned by a server is received, wherein the uploading probability factor is determined by the server according to the current actual transaction concurrency number and the preset maximum transaction concurrency number;
calculating an uploading time point according to the uploading probability factor;
and sending information according to the sending time point.
In one embodiment, the upload time point is determined as follows:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
And comparing the random number with the starting probability, and determining the uploading time point according to the comparison result.
In one embodiment, determining the start probability of the current time according to the upload probability factor includes:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
In one embodiment, the start-up probability is determined according to the following formula:
Figure BDA0003204047110000031
wherein f (t) is a start probability at time t, where t=0 is a time when the upload probability factor is acquired; t is the survival time of the day; p is an upload probability factor.
In one embodiment, comparing the random number with the start probability, and determining the upload time point according to the comparison result includes:
if the random number is smaller than the starting probability, the corresponding moment is an upward sending time point;
if the random number is larger than the starting probability, the random number is recalculated until the random number is smaller than the starting probability, and the corresponding moment is the uploading time point.
In one embodiment, if it is determined that offline is required but the send time point has not been reached, the data is uploaded.
The embodiment of the invention provides a flow control method for terminal data acquisition, which is used for solving the problems of service rejection and blocking when a terminal simultaneously performs information uploading and meets a traffic jam through mechanisms such as current limiting, retry and the like, and comprises the following steps:
The server receives an information uploading request sent by the client, determines the current actual transaction concurrency number based on the information uploading request, determines an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, and returns the uploading probability factor to the client;
the client calculates an uploading time point according to the uploading probability factor and uploads information according to the uploading time point;
the server receives the information sent by the client.
In one embodiment, the server determines the current actual transaction concurrency number, including:
determining the number of clients;
determining the transaction amount of each client;
and determining the current actual transaction concurrency number according to the number of the clients and the transaction amount of each client.
In one embodiment, the server determines the uploading probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number, including:
determining the number of clients;
and determining an uploading probability factor according to the number of the clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number.
In one embodiment, the upload probability factor is determined according to the following formula:
Figure BDA0003204047110000041
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1.
In one embodiment, further comprising:
the server dynamically adjusts the number of clients and/or fixed parameters according to the transaction characteristics.
In one embodiment, the client calculates a upload time point according to the upload probability factor, including:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
and comparing the random number with the starting probability, and determining the uploading time point according to the comparison result.
In one embodiment, determining the start probability of the current time according to the upload probability factor includes:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
In one embodiment, the start-up probability is determined according to the following formula:
Figure BDA0003204047110000042
wherein f (t) is a start probability at time t, where t=0 is a time when the upload probability factor is acquired; t is the survival time of the day; p is an upload probability factor.
In one embodiment, comparing the random number with the start probability, and determining the upload time point according to the comparison result includes:
If the random number is smaller than the starting probability, the corresponding moment is an upward sending time point;
if the random number is larger than the starting probability, the random number is recalculated until the random number is smaller than the starting probability, and the corresponding moment is the uploading time point.
In one embodiment, the client uploads the data if it determines that offline is required but the send time point has not been reached.
The embodiment of the invention also provides a server for solving the problems of service rejection and blocking when the terminal simultaneously performs information uploading and meets the situation of traffic jam by mechanisms such as current limiting, retry and the like, and the server comprises:
the current actual transaction concurrency number determining module is used for determining the current actual transaction concurrency number;
the uploading probability factor determining module is used for determining an uploading probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number when the information is uploaded by the client, and returning the uploading probability factor to the client;
the information receiving module is used for receiving information uploaded by the client according to an uploading time point, wherein the uploading time point is calculated by the client according to the uploading probability factor.
The embodiment of the invention also provides a client, which is used for solving the problems of service rejection and blocking when the terminal simultaneously performs information uploading and meets the situation of traffic jam through mechanisms such as current limiting, retry and the like, and comprises the following steps:
The uploading probability factor receiving module is used for receiving the uploading probability factor returned by the server side when the information is required to be uploaded, wherein the uploading probability factor is determined by the server side according to the current actual transaction concurrency number and the preset maximum transaction concurrency number;
the uploading time point determining module is used for calculating an uploading time point according to the uploading probability factor;
and the information uploading module is used for uploading information according to the uploading time point.
The embodiment of the invention also provides a flow control system for terminal data acquisition, which is used for solving the problems of service rejection and blocking when the terminal simultaneously performs information uploading and meets the situation of traffic jam through mechanisms such as current limiting, retry and the like, and comprises the following steps: the system comprises a server side and a client side.
The embodiment of the invention also provides a computer device which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the flow control method for terminal data acquisition when executing the computer program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the flow control method for terminal data acquisition.
Compared with the technical scheme that in the prior art, when a terminal performs information uploading simultaneously and encounters a situation of traffic jam and service refusal and blocking exist, the method and the device solve the problem that in the case of traffic jam, according to the current actual transaction concurrency number and the preset maximum transaction concurrency number, an uploading probability factor is determined by a server side receiving an uploading information request sent by a client side and based on the uploading information request, and the uploading probability factor is returned to the client side; the client calculates an uploading time point according to the uploading probability factor and uploads information according to the uploading time point; the server receives the information sent by the client, and by adding congestion feedback, sleeping at any time, delaying sending and other mechanisms, the server actively smoothes the wave crest and wave trough while guaranteeing the reliability of data sending, thereby solving the congestion problem of information sending by the client.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow control method (server) for terminal data acquisition in an embodiment of the present invention;
FIG. 2 is a second flow control method (server) for terminal data acquisition in an embodiment of the present invention;
FIG. 3 is a third flow control method (server) for terminal data acquisition in an embodiment of the present invention;
FIG. 4 is a diagram illustrating the sending of probability factors according to an embodiment of the present invention;
fig. 5 is a flow control method fourth (server) of terminal data acquisition in the embodiment of the present invention;
FIG. 6 is a flow control method (client) for terminal data acquisition in an embodiment of the present invention;
fig. 7 is a flow control method two (client) of terminal data acquisition in an embodiment of the present invention;
fig. 8 is a flow control method three (client) of terminal data acquisition in an embodiment of the present invention;
FIG. 9 is a schematic diagram of the start probability in an embodiment of the present invention;
fig. 10 is a flow control method fourth (client) of terminal data acquisition in the embodiment of the present invention;
fig. 11 is a flow control method fifth (client) of terminal data acquisition in the embodiment of the present invention;
FIG. 12 is a flow control method (system angle) for terminal data acquisition in an embodiment of the present invention;
FIG. 13 is a block diagram of a server-side structure according to an embodiment of the present invention;
FIG. 14 is a second block diagram of a server-side architecture in accordance with an embodiment of the present invention;
FIG. 15 is a block diagram of a client architecture in accordance with an embodiment of the present invention;
FIG. 16 is a block diagram of a flow control system for terminal data acquisition in an embodiment of the present invention;
fig. 17 is a schematic block diagram of a system configuration of a computer device in the embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present invention and their descriptions herein are for the purpose of explaining the present invention, but are not to be construed as limiting the invention.
Fig. 1 is a flow control method (server) for terminal data acquisition in an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101: determining the current actual transaction concurrency number;
step 102: when the information is sent to the client, determining a sending probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number, and returning the sending probability factor to the client;
step 103: and receiving information uploaded by the client according to an uploading time point, wherein the uploading time point is calculated by the client according to the uploading probability factor.
Specifically, the concurrency number, computer network terminology, refers to the number of connections that access a server site simultaneously.
In the embodiment of the present invention, as shown in fig. 2, step 101 of determining the current actual transaction concurrency number includes:
step 201: determining the number of clients;
step 202: determining the transaction amount of each client;
step 203: and determining the current actual transaction concurrency number according to the number of the clients and the transaction amount of each client.
Specifically, the server performs monitoring deployment instep 101, deploys agents (in IT field, agents may refer to software or hardware entities capable of autonomous activity, and are usually translated into "agents") to each transaction computing node (i.e. clients that want to upload information), collects transaction amounts through log collection and statistical analysis, performs transaction parallelism monitoring evaluation, and obtains the current actual transaction concurrency amount TPS (Transaction processing systems, which is a transaction processing system capable of performing daily business processing) data in near real time. Meanwhile, the service end transmits lightweight service availability query transaction for the client to quickly acquire the configuration such as the uploading probability factor. For the probability factor, the client only needs to acquire once per life cycle.
In the embodiment of the present invention, as shown in fig. 3, step 102 of determining an upload probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number includes:
step 301: determining the number of clients;
step 302: and determining an uploading probability factor according to the number of the clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number.
Specifically, the upload probability factor is determined according to the following formula:
Figure BDA0003204047110000071
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes (i.e. clients), and typically a system will deploy multiple nodes in parallelNodes to support transactions; k is a fixed parameter greater than 1, the greater k, the steeper the curve, the more pronounced the convergence effect (as shown in fig. 4).
In an embodiment of the present invention, as shown in fig. 5, the method further includes:
step 501: and dynamically adjusting the number of clients and/or fixed parameters (r and k) according to the transaction characteristics, and controlling and adjusting the strength of the ironing peak, namely increasing the strength of the smooth peak.
The embodiment of the invention also provides a flow control method for terminal data acquisition, as described in the following embodiment.
Fig. 6 is a flow control method (client) for terminal data acquisition in an embodiment of the present invention, as shown in fig. 6, the method includes:
step 601: when information needs to be uploaded, an uploading probability factor returned by a server is received, wherein the uploading probability factor is determined by the server according to the current actual transaction concurrency number and the preset maximum transaction concurrency number;
step 602: calculating an uploading time point according to the uploading probability factor;
step 603: and information is sent according to the sending time point, and the sending is not repeated at the subsequent time.
Specifically, the client calculates the uploading time point by using a random number generator (any existing random number) according to the uploading probability factor returned by the server, and calculates the uploading according to the time point.
In the embodiment of the present invention, as shown in fig. 7, the uploading time point instep 602 is determined as follows:
step 701: determining the starting probability at the current moment according to the uploading probability factor;
step 702: calculating random number rand= (0, 1) at the current moment;
step 703: and comparing the random number with the starting probability, and determining the uploading time point according to the comparison result.
Specifically, as shown in fig. 8, step 701 of determining the start probability at the current moment according to the upload probability factor includes:
Step 801: determining the current day survival time length of the client;
step 802: the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
Specifically, the start probability is determined according to the following formula:
Figure BDA0003204047110000081
wherein f (t) is a start probability at time t (as shown in fig. 9), where t=0 is a time when the upload probability factor is acquired; t is the duration of survival on the day (minutes); p is an upload probability factor.
Specifically, the random () function may be used to calculate the random number, and the random () function returns the next random floating point number from the generated sequence. All return values are in therange 0< = n < 1.0. random () generates a different value each time it is called and has a large period before it repeats any number. This is useful for generating unique values and variants thereof
Specifically, as shown in fig. 10,step 703 of comparing the random number with the start probability, and determining the upload time point according to the comparison result includes:
step 1001: if the random number is smaller than the starting probability rand < f (t), the corresponding moment is an upward sending time point;
step 1002: if the random number is larger than the starting probability, the random number is recalculated until the random number is smaller than the starting probability, and the corresponding moment is the uploading time point.
In an embodiment of the present invention, as shown in fig. 11, the method further includes:
step 1101: if the data is judged to be needed to be offline but the sending time point is not reached yet, the data is sent up.
Specifically, if the device needs to be offline but the data is not yet uploaded, the uploading is immediately performed.
The embodiment of the invention also provides a flow control method (system angle) for terminal data acquisition, as described in the following embodiment.
Fig. 12 is a flow control method (system angle) for terminal data acquisition in an embodiment of the present invention, where, as shown in fig. 12, the flow control method for terminal data acquisition includes:
step 1201: the server receives an information uploading request sent by the client, determines the current actual transaction concurrency number based on the information uploading request, determines an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, and returns the uploading probability factor to the client;
step 1202: the client calculates an uploading time point according to the uploading probability factor and uploads information according to the uploading time point;
step 1203: the server receives the information sent by the client.
In the embodiment of the invention, the server determines the current actual transaction concurrency number, which comprises the following steps:
Determining the number of clients;
determining the transaction amount of each client;
and determining the current actual transaction concurrency number according to the number of the clients and the transaction amount of each client.
In the embodiment of the invention, the server determines the uploading probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number, and the method comprises the following steps:
determining the number of clients;
and determining an uploading probability factor according to the number of the clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number.
In the embodiment of the invention, the uploading probability factor is determined according to the following formula:
Figure BDA0003204047110000091
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1.
In an embodiment of the present invention, the method further includes:
the server dynamically adjusts the number of clients and/or fixed parameters according to the transaction characteristics.
In the embodiment of the present invention, the calculation of the upload time point by the client according to the upload probability factor includes:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
and comparing the random number with the starting probability, and determining the uploading time point according to the comparison result.
In the embodiment of the invention, determining the starting probability of the current moment according to the uploading probability factor comprises the following steps:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
In the embodiment of the invention, the uploading time point is determined according to the following formula:
Figure BDA0003204047110000101
wherein f (t) is a start probability at time t, where t=0 is a time when the upload probability factor is acquired; t is the survival time of the day; p is an upload probability factor.
In the embodiment of the invention, the random number is compared with the starting probability, and the uploading time point is determined according to the comparison result, which comprises the following steps:
if the random number is smaller than the starting probability, the corresponding moment is an upward sending time point;
if the random number is larger than the starting probability, the random number is recalculated until the random number is smaller than the starting probability, and the corresponding moment is the uploading time point.
In the embodiment of the invention, if the client judges that the client needs to be offline but does not reach the sending time point yet, the client uploads the data.
The embodiment of the invention also provides a flow control device (namely a server) for terminal data acquisition, as described in the following embodiment. Because the principle of the device for solving the problem is similar to that of the flow control method (the service end angle) for terminal data acquisition, the implementation of the device can be referred to the implementation of the flow control method for terminal data acquisition, and the repetition is omitted.
Fig. 13 is a block diagram of a service end in an embodiment of the present invention, as shown in fig. 13, where the service end includes:
the current actual transaction concurrencynumber determining module 1301 is configured to determine a current actual transaction concurrency number;
the uploading probabilityfactor determining module 1302 is configured to determine an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number when the client uploads information, and return the uploading probability factor to the client;
theinformation receiving module 1303 is configured to receive information uploaded by a client according to an uploading time point, where the uploading time point is calculated by the client according to the uploading probability factor.
In the embodiment of the present invention, the current actual transactionconcurrency determination module 1301 is specifically configured to:
determining the number of clients;
determining the transaction amount of each client;
and determining the current actual transaction concurrency number according to the number of the clients and the transaction amount of each client.
In the embodiment of the present invention, the upload probabilityfactor determining module 1302 is specifically configured to:
determining the number of clients;
and determining an uploading probability factor according to the number of the clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number.
In the embodiment of the invention, the uploading probability factor is determined according to the following formula:
Figure BDA0003204047110000111
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1.
In an embodiment of the present invention, as shown in fig. 14, further includes:
theparameter adjustment module 1304 is configured to dynamically adjust the number of clients and/or fixed parameters according to the transaction characteristics.
The embodiment of the invention also provides a flow control device (namely a client) for terminal data acquisition, as described in the following embodiment. Because the principle of the device for solving the problem is similar to that of the flow control method (client angle) for terminal data acquisition, the implementation of the device can refer to the implementation of the flow control method for terminal data acquisition, and the repetition is omitted.
Fig. 15 is a block diagram of a client according to an embodiment of the present invention, where, as shown in fig. 15, the client includes:
the sending probability factor receiving module 1501 is configured to receive, when information needs to be sent, a sending probability factor returned by the server, where the sending probability factor is determined by the server according to a current actual transaction concurrency number and a preset maximum transaction concurrency number;
A upload timepoint determining module 1502, configured to calculate an upload time point according to the upload probability factor;
theinformation uploading module 1503 is configured to upload information according to the uploading time point.
In the embodiment of the present invention, the upload timepoint determining module 1502 is specifically configured to:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
and comparing the random number with the starting probability, and determining the uploading time point according to the comparison result.
In the embodiment of the present invention, the upload timepoint determining module 1502 is specifically configured to:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
In the embodiment of the invention, the starting probability is determined according to the following formula:
Figure BDA0003204047110000121
wherein f (t) is a start probability at time t, where t=0 is a time when the upload probability factor is acquired; t is the survival time of the day; p is an upload probability factor.
In the embodiment of the present invention, the upload timepoint determining module 1502 is specifically configured to:
if the random number is smaller than the starting probability, the corresponding moment is an upward sending time point;
if the random number is larger than the starting probability, the random number is recalculated until the random number is smaller than the starting probability, and the corresponding moment is the uploading time point.
In the embodiment of the present invention, the information uploadmodule 1503 is specifically configured to:
if the data is judged to be needed to be offline but the sending time point is not reached yet, the data is sent up.
The embodiment of the invention also provides a flow control system for terminal data acquisition, as described in the following embodiment.
Fig. 16 is a block diagram of a flow control system for terminal data collection according to an embodiment of the present invention, and as shown in fig. 16, the flow control system for terminal data collection includes: the system comprises a server side and a client side.
The embodiment of the invention also provides a computer device which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the flow control method for terminal data acquisition when executing the computer program.
The computer device provided by the embodiment of the invention can be a desktop computer, a tablet computer, a mobile terminal and the like, and the embodiment is not limited to the desktop computer, the tablet computer, the mobile terminal and the like. In this embodiment, the computer device may refer to implementation of a flow control method for terminal data acquisition and a flow control device (i.e. a server and a client) for terminal data acquisition, and the contents thereof are incorporated herein, and the repetition is omitted.
Fig. 17 is a schematic block diagram of a system configuration of a computer device according to an embodiment of the present invention. As shown in fig. 17, the computer device may include acentral processor 100 and amemory 140;memory 140 is coupled tocentral processor 100. Notably, the diagram is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications functions or other functions.
As shown in fig. 17, the computer device may further include: acommunication module 110, aninput unit 120, an audio processing unit 130, adisplay 160, apower supply 170. It is noted that the computer device need not include all of the components shown in fig. 17; furthermore, the computer device may also include components not shown in fig. 17, to which reference is made to the prior art.
As shown in fig. 17, thecentral processor 100, also sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device that thecentral processor 100 receives inputs and controls the operation of the various components of the computer device.
Thememory 140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. A program for executing the related information may be stored. And thecentral processor 100 can execute the program stored in thememory 140 to realize information storage or processing, etc.
Theinput unit 120 provides an input to thecentral processor 100. Theinput unit 120 is, for example, a key or a touch input device. Thepower supply 170 is used to provide power to the computer device. Thedisplay 160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
Thememory 140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, or the like. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like.Memory 140 may also be some other type of device.Memory 140 includes a buffer memory 141 (sometimes referred to as a buffer). Thememory 140 may include an application/function storage 142, the application/function storage 142 for storing application programs and function programs or a flow for executing operations of the computer device by thecentral processor 100.
Thememory 140 may also include adata store 143, thedata store 143 for storing data such as contacts, digital data, pictures, sounds, and/or any other data used by a computer device. Thedriver store 144 of thememory 140 may include various drivers for the computer device for communication functions and/or for performing other functions of the computer device (e.g., messaging applications, address book applications, etc.).
Thecommunication module 110 is a transmitter/receiver 110 that transmits and receives signals via anantenna 111. A communication module (transmitter/receiver) 110 is coupled to thecentral processor 100 to provide an input signal and receive an output signal, which may be the same as in the case of a conventional mobile communication terminal.
Based on different communication technologies, a plurality ofcommunication modules 110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, etc., may be provided in the same computer device. The communication module (transmitter/receiver) 110 is also coupled to aspeaker 131 and amicrophone 132 via an audio processor 130 to provide audio output via thespeaker 131 and to receive audio input from themicrophone 132 to implement usual telecommunication functions. The audio processor 130 may include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 130 is also coupled to thecentral processor 100 so that sound can be recorded locally through themicrophone 132 and so that sound stored locally can be played through thespeaker 131.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the flow control method for terminal data acquisition.
Compared with the technical scheme that in the prior art, when a terminal performs information uploading simultaneously and encounters a situation of traffic jam and service refusal and blocking exist, the method and the device solve the problem that in the case of traffic jam, according to the current actual transaction concurrency number and the preset maximum transaction concurrency number, an uploading probability factor is determined by a server side receiving an uploading information request sent by a client side and based on the uploading information request, and the uploading probability factor is returned to the client side; the client calculates an uploading time point according to the uploading probability factor and uploads information according to the uploading time point; the server receives the information sent by the client, and by adding congestion feedback, sleeping at any time, delaying sending and other mechanisms, the server actively smoothes the wave crest and wave trough while guaranteeing the reliability of data sending, thereby solving the congestion problem of information sending by the client. In addition, the method has the following beneficial effects:
1. the peak value can be ironed in a random number discrete mode, so that transaction peaks are avoided;
2. the intensity of the ironing wave crest can be flexibly adjusted by controlling and adjusting k and r;
3. ensuring that the data can be uploaded;
4. and the secondary bundling and uploading are avoided through the random number discrete transaction distribution time control.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (18)

1. The flow control method for terminal data acquisition is characterized by comprising the following steps:
determining the current actual transaction concurrency number;
when the information is sent to the client, determining a sending probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number, and returning the sending probability factor to the client;
receiving information uploaded by a client according to an uploading time point, wherein the uploading time point is calculated by the client according to the uploading probability factor;
determining an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, wherein the method comprises the following steps:
determining the number of clients;
determining an uploading probability factor according to the number of clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number;
the upload probability factor is determined according to the following formula:
Figure FDA0004188678810000011
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1;
the upload time point is determined as follows:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
Comparing the random number with the starting probability, and determining an uploading time point according to a comparison result;
determining the starting probability of the current moment according to the uploading probability factor, wherein the method comprises the following steps:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
2. The flow control method for terminal data collection according to claim 1, wherein determining a current actual transaction concurrency number comprises:
determining the number of clients;
determining the transaction amount of each client;
and determining the current actual transaction concurrency number according to the number of the clients and the transaction amount of each client.
3. The flow control method for terminal data acquisition according to claim 1, further comprising:
and dynamically adjusting the number of clients and/or fixed parameters according to the transaction characteristics.
4. The flow control method for terminal data acquisition is characterized by comprising the following steps:
when information needs to be uploaded, an uploading probability factor returned by a server is received, wherein the uploading probability factor is determined by the server according to the current actual transaction concurrency number and the preset maximum transaction concurrency number;
Calculating an uploading time point according to the uploading probability factor;
sending information according to the sending time point;
the server determines an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, and the method comprises the following steps:
determining the number of clients;
determining an uploading probability factor according to the number of clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number;
the server determines the uploading probability factor according to the following formula:
Figure FDA0004188678810000021
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1;
the upload time point is determined as follows:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
comparing the random number with the starting probability, and determining an uploading time point according to a comparison result;
determining the starting probability of the current moment according to the uploading probability factor, wherein the method comprises the following steps:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
5. The flow control method for terminal data acquisition as claimed in claim 4, wherein the start probability is determined according to the following formula:
Figure FDA0004188678810000022
Wherein f (t) is a start probability at time t, where t=0 is a time when the upload probability factor is acquired; t is the survival time of the day; p is an upload probability factor.
6. The flow control method for terminal data acquisition according to claim 4, wherein comparing the random number with the start probability, and determining the upload time point based on the comparison result, comprises:
if the random number is smaller than the starting probability, the corresponding moment is an upward sending time point;
if the random number is larger than the starting probability, the random number is recalculated until the random number is smaller than the starting probability, and the corresponding moment is the uploading time point.
7. The traffic control method for terminal data acquisition according to claim 4, further comprising: if the data is judged to be needed to be offline but not reach the uploading time point, uploading the data.
8. The flow control method for terminal data acquisition is characterized by comprising the following steps:
the server receives an information uploading request sent by the client, determines the current actual transaction concurrency number based on the information uploading request, determines an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, and returns the uploading probability factor to the client;
The client calculates an uploading time point according to the uploading probability factor and uploads information according to the uploading time point;
the server receives information sent by the client;
the server determines an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, and the method comprises the following steps:
determining the number of clients;
determining an uploading probability factor according to the number of clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number;
the server determines the uploading probability factor according to the following formula:
Figure FDA0004188678810000031
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1;
the upload time point is determined as follows:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
comparing the random number with the starting probability, and determining an uploading time point according to a comparison result;
determining the starting probability of the current moment according to the uploading probability factor, wherein the method comprises the following steps:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
9. The flow control method for terminal data acquisition according to claim 8, wherein the server determines the current actual transaction concurrency number, comprising:
determining the number of clients;
determining the transaction amount of each client;
and determining the current actual transaction concurrency number according to the number of the clients and the transaction amount of each client.
10. The traffic control method for terminal data acquisition according to claim 8, further comprising:
the server dynamically adjusts the number of clients and/or fixed parameters according to the transaction characteristics.
11. The flow control method for terminal data acquisition according to claim 8, wherein the start probability is determined according to the following formula:
Figure FDA0004188678810000041
wherein f (t) is a start probability at time t, where t=0 is a time when the upload probability factor is acquired; t is the survival time of the day; p is an upload probability factor.
12. The flow control method for terminal data acquisition according to claim 8, wherein comparing the random number with the start probability, and determining the upload time point based on the comparison result, comprises:
if the random number is smaller than the starting probability, the corresponding moment is an upward sending time point;
if the random number is larger than the starting probability, the random number is recalculated until the random number is smaller than the starting probability, and the corresponding moment is the uploading time point.
13. The traffic control method for terminal data acquisition according to claim 8, further comprising: and if the client judges that the offline is needed but the uploading time point is not reached, uploading the data.
14. A server, comprising:
the current actual transaction concurrency number determining module is used for determining the current actual transaction concurrency number;
the uploading probability factor determining module is used for determining an uploading probability factor according to the current actual transaction concurrency number and the preset maximum transaction concurrency number when the information is uploaded by the client, and returning the uploading probability factor to the client;
the information receiving module is used for receiving information uploaded by the client according to an uploading time point, wherein the uploading time point is calculated by the client according to the uploading probability factor;
the uploading probability factor determining module is specifically configured to:
determining the number of clients;
determining an uploading probability factor according to the number of clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number;
the upload probability factor is determined according to the following formula:
Figure FDA0004188678810000051
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1;
The upload time point is determined as follows:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
comparing the random number with the starting probability, and determining an uploading time point according to a comparison result;
determining the starting probability of the current moment according to the uploading probability factor, wherein the method comprises the following steps:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
15. A client, comprising:
the uploading probability factor receiving module is used for receiving the uploading probability factor returned by the server side when the information is required to be uploaded, wherein the uploading probability factor is determined by the server side according to the current actual transaction concurrency number and the preset maximum transaction concurrency number;
the uploading time point determining module is used for calculating an uploading time point according to the uploading probability factor;
the information uploading module is used for uploading information according to the uploading time point;
the server determines an uploading probability factor according to the current actual transaction concurrency number and a preset maximum transaction concurrency number, and the method comprises the following steps:
determining the number of clients;
determining an uploading probability factor according to the number of clients, the current actual transaction concurrency number and the preset maximum transaction concurrency number;
The server determines the uploading probability factor according to the following formula:
Figure FDA0004188678810000052
wherein P is an upward probability factor; b is the concurrent number of the current actual transaction; b (B)m Presetting a maximum concurrent transaction number; r is the number of transaction nodes; k is a fixed parameter greater than 1;
the uploading time point determining module is specifically configured to:
determining the starting probability at the current moment according to the uploading probability factor;
calculating a random number at the current moment;
comparing the random number with the starting probability, and determining an uploading time point according to a comparison result;
the uploading time point determining module is specifically configured to:
determining the current day survival time length of the client;
the start probability at the current time is determined based on the time-to-day survival time, the current time and the upload probability factor.
16. A flow control system for terminal data acquisition, comprising: the server of claim 14 and the client of claim 15.
17. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the flow control method of terminal data acquisition according to any one of claims 1 to 13 when executing the computer program.
18. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor realizes the steps of the flow control method of terminal data acquisition according to any one of claims 1 to 13.
CN202110912131.7A2021-08-102021-08-10Flow control method and system for terminal data acquisition, server side and client sideActiveCN113660171B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110912131.7ACN113660171B (en)2021-08-102021-08-10Flow control method and system for terminal data acquisition, server side and client side

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110912131.7ACN113660171B (en)2021-08-102021-08-10Flow control method and system for terminal data acquisition, server side and client side

Publications (2)

Publication NumberPublication Date
CN113660171A CN113660171A (en)2021-11-16
CN113660171Btrue CN113660171B (en)2023-05-26

Family

ID=78491042

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110912131.7AActiveCN113660171B (en)2021-08-102021-08-10Flow control method and system for terminal data acquisition, server side and client side

Country Status (1)

CountryLink
CN (1)CN113660171B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102387069A (en)*2011-10-082012-03-21华为技术有限公司Method and system for connecting clients with server and clients as well as server
CN106817314A (en)*2015-12-022017-06-09中国电信股份有限公司Big data acquisition method, device and system
CN107612844A (en)*2017-08-152018-01-19武汉斗鱼网络科技有限公司A kind of method for mitigating server pulse, server and client side
CN111506443A (en)*2020-04-172020-08-07一汽解放汽车有限公司Service calling method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US9078277B2 (en)*2012-08-212015-07-07International Business Machines CorporationNetwork and user behavior based time-shifted mobile data transmission

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN102387069A (en)*2011-10-082012-03-21华为技术有限公司Method and system for connecting clients with server and clients as well as server
CN106817314A (en)*2015-12-022017-06-09中国电信股份有限公司Big data acquisition method, device and system
CN107612844A (en)*2017-08-152018-01-19武汉斗鱼网络科技有限公司A kind of method for mitigating server pulse, server and client side
CN111506443A (en)*2020-04-172020-08-07一汽解放汽车有限公司Service calling method, device, equipment and storage medium

Also Published As

Publication numberPublication date
CN113660171A (en)2021-11-16

Similar Documents

PublicationPublication DateTitle
US7929436B2 (en)Network communication control methods and systems
CN107135411B (en)Method for adjusting video code rate and electronic equipment
CN112035066B (en)Log reservation time length calculation method and device
CN113965517B (en)Network transmission method, device, electronic equipment and storage medium
US20150134846A1 (en)Method and apparatus for media segment request retry control
CN111343098B (en)Data interaction method and device, computer equipment and storage medium
CN108235136A (en)A kind of data playing method and terminal device
CN111970208A (en)Network transmission method, device, equipment and computer readable storage medium
US11671656B2 (en)Method for selecting resolution switching algorithm, computing device, and computer-program product
CN104506631A (en)Audio file cache method and audio file cache equipment
CN113660171B (en)Flow control method and system for terminal data acquisition, server side and client side
US20160203144A1 (en)Method and System for Processing Associated Content
CN112004132A (en)Video synchronous playing method and device
CN111666589A (en)Block chain distributed risk data sharing system and method
CN113052691A (en)Distributed account checking system service balancing method, node and cluster
CN112396511B (en)Distributed wind control variable data processing method, device and system
CN111083431A (en)Method, device, medium and electronic device for adjusting image acquisition time
CN109982110B (en)Method and device for video playing
CN117857464A (en)Data transmission method, device, electronic equipment and readable storage medium
JP4166592B2 (en) Transmission band adjustment method, base station and radio communication terminal in radio communication system
CN115498735A (en)Fuel cell monomer voltage monitoring method and fuel cell controller
CN112449209B (en)Video storage method and device, cloud server and computer readable storage medium
KR20070077743A (en) Data transmission device and method
CN120416239B (en)Front-end large file uploading method and device
CN110968641B (en)Data writing control method and device and electronic equipment

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp