CN113472674A - Flow control method and device, storage medium and electronic equipment - Google Patents

Flow control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113472674A
CN113472674A CN202110784658.6A CN202110784658A CN113472674A CN 113472674 A CN113472674 A CN 113472674A CN 202110784658 A CN202110784658 A CN 202110784658A CN 113472674 A CN113472674 A CN 113472674A
Authority
CN
China
Prior art keywords
target
traffic
data receiving
threshold
target terminal
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.)
Granted
Application number
CN202110784658.6A
Other languages
Chinese (zh)
Other versions
CN113472674B (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.)
Duodian Life Chengdu Technology Co ltd
Original Assignee
Duodian Life Chengdu Technology 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 Duodian Life Chengdu Technology Co ltd filed Critical Duodian Life Chengdu Technology Co ltd
Priority to CN202110784658.6A priority Critical patent/CN113472674B/en
Publication of CN113472674A publication Critical patent/CN113472674A/en
Application granted granted Critical
Publication of CN113472674B publication Critical patent/CN113472674B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a flow control method, a flow control device, a storage medium and electronic equipment, wherein the number of data receiving units corresponding to a first target terminal is adjusted according to a preset adjustment threshold value so as to determine the first target number; the first target terminal is a service consumption terminal in an active state, generates a first traffic limitation message according to the first target number, and sends the first traffic limitation message to the first target terminal; the first traffic limitation message includes a first target number and a traffic upper limit, and the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit. The corresponding first target quantity is adjusted in real time for the service consumption end in the active state, so that the service providing end can better provide service for the service consumption end in the active state. By sending the first traffic limitation message in real time, the situation that the sending traffic of the first target terminal in one call exceeds the maximum traffic limitation is avoided, the downtime is avoided, and the availability of the system is guaranteed.

Description

Flow control method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of internet, and in particular, to a flow control method, apparatus, storage medium, and electronic device.
Background
With the development and scientific progress of society, the internet is fully utilized and is full of people's lives. Rpc (remote Procedure call) remote Procedure calls are also of widespread interest as a very hot technology. RPC is simply understood to be a request by one node for a service provided by another node.
In the RPC scenario, the processing capacity of the service provider has an upper limit, and if the service caller cannot timely perceive the real-time processing capacity of the provider, the service provider may temporarily fail to provide service or be down if the service provider cannot cope with the increased traffic when there is a sudden increase in data traffic at a certain time node. Therefore, how to guarantee high availability of the system in a distributed system becomes a difficult problem to be solved by those skilled in the art.
Disclosure of Invention
It is an object of the present application to provide a flow control method, apparatus, storage medium and electronic device to at least partially improve the above problems.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a flow control method, which is applied to a service provider, and the method includes:
adjusting the number of data receiving units corresponding to the first target terminal according to a preset adjustment threshold value to determine a first target number;
the first target terminal is a service consumer terminal in an active state;
generating a first traffic limitation message according to the first target quantity, and sending the first traffic limitation message to the first target terminal;
the first traffic limitation packet includes the first target number and a traffic upper limit, where the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit.
In a second aspect, an embodiment of the present application provides a flow control device, which is applied to a service provider, where the device includes:
the processing unit is used for adjusting the number of the data receiving units corresponding to the first target terminal according to a preset adjusting threshold value so as to determine the first target number;
the first target terminal is a service consumer terminal in an active state;
a sending unit, configured to generate a first traffic limitation packet according to the first target number, and send the first traffic limitation packet to the first target terminal;
the first traffic limitation packet includes the first target number and a traffic upper limit, where the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit.
In a third aspect, the present application provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method described above.
In a fourth aspect, an embodiment of the present application provides an electronic device, including: a processor and memory for storing one or more programs; the one or more programs, when executed by the processor, implement the methods described above.
Compared with the prior art, the flow control method, the flow control device, the storage medium and the electronic device provided by the embodiment of the application adjust the number of data receiving units corresponding to the first target terminal according to the preset adjustment threshold value to determine the first target number; the first target terminal is a service consumption terminal in an active state, generates a first traffic limitation message according to the first target number, and sends the first traffic limitation message to the first target terminal; the first traffic limitation message includes a first target quantity and a traffic upper limit, and the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit. The corresponding first target quantity is adjusted in real time by the service consumption end in the active state, namely, the maximum flow limit corresponding to the first terminal is adjusted. The service provider can better provide service for the service consumer in the active state. Meanwhile, the first traffic limit message is sent in real time, so that the situation that the sending traffic of the first target terminal in one call exceeds the maximum traffic limit is avoided, the downtime is avoided, and the availability of the system is guaranteed.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and it will be apparent to those skilled in the art that other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a flow control method according to an embodiment of the present application;
fig. 3 is a schematic diagram illustrating the substeps of S102 according to an embodiment of the present disclosure;
fig. 4 is one of the sub-steps of S102 provided in the embodiments of the present application;
fig. 5 is a schematic flow chart of a flow control method according to an embodiment of the present application;
fig. 6 is a schematic flow chart of a flow control method according to an embodiment of the present application;
fig. 7 is a schematic diagram of a data receiving unit allocation provided in an embodiment of the present application;
fig. 8 is a schematic unit diagram of a flow control device according to an embodiment of the present disclosure.
In the figure: 10-a processor; 11-a memory; 12-a bus; 13-a communication interface; 201-a processing unit; 202-sending unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "outer", and the like indicate orientations or positional relationships based on orientations or positional relationships shown in the drawings or orientations or positional relationships conventionally found in use of products of the application, and are used only for convenience in describing the present application and for simplification of description, but do not indicate or imply that the referred devices or elements must have a specific orientation, be constructed in a specific orientation, and be operated, and thus should not be construed as limiting the present application.
In the description of the present application, it is also to be noted that, unless otherwise explicitly specified or limited, the terms "disposed" and "connected" are to be interpreted broadly, e.g., as being either fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.
Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
In a distributed system, in order to ensure high availability of the system, a low-latency dynamic flow control strategy is required to dynamically control the flow delivery of multiple consumers according to the processing power of a service provider.
The embodiment of the application provides an electronic device which can be a service providing end, such as a server device. Please refer to fig. 1, a schematic structural diagram of an electronic device. The electronic device comprises a processor 10, a memory 11, a bus 12. The processor 10 and the memory 11 are connected by a bus 12, and the processor 10 is configured to execute an executable module, such as a computer program, stored in the memory 11.
The processor 10 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the flow control method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 10. The Processor 10 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The Memory 11 may comprise a high-speed Random Access Memory (RAM) and may further comprise a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The bus 12 may be an ISA (Industry Standard architecture) bus, a PCI (peripheral Component interconnect) bus, an EISA (extended Industry Standard architecture) bus, or the like. Only one bi-directional arrow is shown in fig. 1, but this does not indicate only one bus 12 or one type of bus 12.
The memory 11 is used for storing programs, such as programs corresponding to the flow control device. The flow control means comprises at least one software function which may be stored in the memory 11 in the form of software or firmware or may be fixed in an Operating System (OS) of the electronic device. The processor 10, upon receiving the execution instruction, executes the program to implement the flow control method.
Possibly, the electronic device provided by the embodiment of the present application further includes a communication interface 13. The communication interface 13 is connected to the processor 10 via a bus. In one possible implementation, the electronic device may establish long connections with other devices or terminals through the communication interface 13.
It should be understood that the structure shown in fig. 1 is merely a structural schematic diagram of a portion of an electronic device, which may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The flow control method provided in the embodiment of the present application may be applied to, but is not limited to, the electronic device shown in fig. 1, and please refer to fig. 2:
s102, the number of the data receiving units corresponding to the first target terminal is adjusted according to a preset adjusting threshold value so as to determine the first target number.
The first target terminal is a service consumer terminal in an active state.
It should be noted that the data receiving unit belongs to the service providing end, and is configured to receive the data packet sent by the target terminal, which may be understood as a network access token. When the first target terminal is allocated with a data receiving unit (network access token), the first target terminal can establish a corresponding long connection to send a message.
It can be understood that the service consumption end in the active state is a service consumption end which sends a data message (except the heartbeat monitoring message) to the service providing end at the current time, and may be a mobile phone, a computer or other servers.
The number of data receiving units corresponding to the first target terminal, that is, the adjusted first target number, is related to the request processing capability of the service providing terminal to the first target terminal, and the greater the number, the stronger the processing capability.
S103, generating a first traffic limitation message according to the first target quantity, and sending the first traffic limitation message to the first target terminal.
The first traffic limitation message includes a first target quantity and a traffic upper limit, and the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit.
It can be understood that the product of the first target number and the upper traffic limit is the maximum traffic limit allocated by the service provider to the first target terminal. The sending traffic of the first target terminal in one invocation cannot exceed the maximum traffic limit.
The corresponding first target quantity is adjusted in real time by the service consumption end in the active state, namely, the maximum flow limit corresponding to the first terminal is adjusted. The service provider can better provide service for the service consumer in the active state. Meanwhile, the first traffic limit message is sent in real time, so that the situation that the sending traffic of the first target terminal in one call exceeds the maximum traffic limit is avoided, the downtime is avoided, and the availability of the system is guaranteed.
To sum up, an embodiment of the present application provides a flow control method, applied to a service provider, including: adjusting the number of data receiving units corresponding to the first target terminal according to a preset adjustment threshold value to determine a first target number; the first target terminal is a service consumption terminal in an active state, generates a first traffic limitation message according to the first target number, and sends the first traffic limitation message to the first target terminal; the first traffic limitation message includes a first target quantity and a traffic upper limit, and the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit. The corresponding first target quantity is adjusted in real time by the service consumption end in the active state, namely, the maximum flow limit corresponding to the first terminal is adjusted. The service provider can better provide service for the service consumer in the active state. Meanwhile, the first traffic limit message is sent in real time, so that the situation that the sending traffic of the first target terminal in one call exceeds the maximum traffic limit is avoided, the downtime is avoided, and the availability of the system is guaranteed.
Regarding the first traffic restriction packet, a possible implementation manner is also provided in the embodiments of the present application, please refer to the following description.
Request ID(64bits)l Data Length(32bits)l Version(8bits)l Allow Flows Of Each Package(32bits)l Allow Packages(8bits)
The length of a packet head (Header) is 144 bits;
request ID (64 bits): identifying the unique request;
data Length (32 bits): the serialized content length (variable portion), counted in bytes;
version (8 bits): identifying a protocol version number;
low flow Of easy Package (32 bits): the data unit flow size defined by the service provider;
low Packages (8 bits): the number of data units allowed to receive data by the service provider.
In a possible implementation manner, the adjustment threshold includes a first threshold, and the first threshold is a total number of data receiving units in the service provider. On the basis of fig. 2, regarding the content in S102, the embodiment of the present application further provides a possible implementation manner, please refer to fig. 3, where S102 includes:
s102-1, under the condition that the first target terminal is a service consumer terminal initially connected to the service provider terminal, determining a first threshold value as a first target number.
Optionally, the service provider needs to define (or configure) its own traffic rule before providing the service: defining the size (X) of each data unit, the maximum data unit (Y) allowed by a provider and the maximum acceptable flow (Z) of the provider, and meeting the limitation that Z is X Y; after the first service consumer long connection is established, the first request returns all the processing capacity of the provider: z ═ X × Y; i.e. the first threshold is determined as the first target number. And sending the first traffic limitation message carrying the first target quantity to the first target terminal.
In one possible implementation, adjusting the threshold includes adjusting the second threshold. On the basis of fig. 2, regarding the content in S102, the embodiment of the present application further provides a possible implementation manner, please refer to fig. 4, where S102 includes:
and S102-2, under the condition that the service providing end is connected with other service consuming ends, determining the sum of the current number of the first target terminals and the second threshold value as the first target number.
The current number of the first target terminals is the number of data receiving units corresponding to the first target terminals currently.
For example, the number of data receiving units currently corresponding to the first target terminal is 1, the second threshold is N, and the first target number is 1+ N.
On the basis of fig. 4, regarding how to determine the second threshold, a possible implementation manner is further provided in the embodiment of the present application, please refer to fig. 5, where the flow control method further includes:
s101, determining a second threshold value according to the number of the data receiving units corresponding to the service consumption terminals connected to the service providing terminal.
Optionally, the expression for determining the second threshold is:
N=Ya÷M;
where N characterizes the second threshold, M characterizes the first threshold, YaAnd characterizing the maximum value in the number of the data receiving units corresponding to the service consumption terminals connected to the service providing terminal.
Optionally, calculating the proportion of the Y values of all the service consumers according to the Y values (the number of corresponding data receiving units) of all the service consumers at present; for example, a service provider has service consumers, and their Y values are: { Ya, Yb, Yc, Yd, Ye }; then the obtained N is Ya/(Ya + Yb + Yc + Yd + Ye), and Ya + Yb + Yc + Yd + Ye is M. And determining a second threshold according to the distribution strategy, and under the condition that the calling frequencies of all the service consumption ends and the packet sizes are not different, the equilibrium state of the quota can be reached.
Because, the total number of data receiving units within the service provider is fixed, i.e. the first threshold is fixed. When the number of data receiving units corresponding to the first target terminal increases, the number of data receiving units corresponding to other terminals needs to be decreased.
On this basis, regarding how to balance the distribution of the data receiving units, the embodiment of the present application further provides a possible implementation manner, please refer to fig. 6, where the flow control method further includes:
and S104, sending a second traffic limitation message to a second target terminal.
The second target terminal is a service consuming terminal which corresponds to the maximum number of the data receiving units except the first target terminal, the second traffic limitation message comprises a second target number and a traffic upper limit, the second target number is the difference between the current number of the second target terminal and a second threshold, and the current number of the second target terminal is the number of the data receiving units which correspond to the second target terminal currently.
Specifically, as shown in fig. 7, it is assumed that there are currently a service consumer O, P, Q and R connected to a service provider. The number of the data receiving units corresponding to the service consumption end O is 3; the number of the data receiving units corresponding to the service consumption end P is 1; the number of the data receiving units corresponding to the service consumption end Q is 4; the number of data receiving units corresponding to the service consumer R is 2.
The service consumer currently in the active state is P, that is, P serves as the first target terminal. At this time, the service consumer having the largest number of corresponding data receiving units except for P is Q, that is, Q serves as the second target terminal. The second target number is 4-N and the first target number is 1+ N.
In one possible implementation, when the current number of the second target terminals is equal to the minimum threshold (Ymin), the number of the data receiving units corresponding to the second target terminals cannot be acquired any more. The second threshold is now adjusted to 0. Otherwise, the second target terminal may be throttled and will never be able to send a request to the service provider.
In a possible implementation manner, for example, one service consumer a sends a packet fastest, and has the largest flow rate, which is the consumer with the largest maximum flow rate ratio, and the other service consumers all reach the minimum Ymin, then the service consumer a cannot go to the other Ymin service consumers to obtain the data receiving unit.
Alternatively, in relation to policy enforcement, the number of data receiving units needs to be adjusted, and there must be a service consumer requesting this, which will affect at most two consumers' notifications about changes in the Y value: a requesting service consumer (first target terminal) and an adjusted service consumer (second target terminal). The Y value change of the requested service consumer is returned to the service consumer along with the response data of the request, and the adjusted service consumer actively initiates a push to the service consumer by the producer.
In a possible implementation manner, after receiving a traffic limitation packet (a first traffic limitation packet or a second traffic limitation packet), a server consumption end calculates, according to quota data therein, whether the size of the current total packet exceeds a maximum limit allowed by a server or not: z ═ X × Y; if the execution is to be unpacked (the big data packet is divided into a plurality of small data packets) or the subsequent small data packets are executed after the execution is over, the big data packet executes a retry strategy; whether the server consumer can execute unpacking and whether a subsequent small data packet exists or not needs to be reasonably evaluated by combining services when the size (X) of each data unit is defined by the whole cluster.
Referring to fig. 8, fig. 8 is a flow control device according to an embodiment of the present disclosure, and optionally, the flow control device is applied to the electronic device described above.
The flow control device includes: a processing unit 201 and a transmitting unit 202.
The processing unit 201 is configured to adjust the number of data receiving units corresponding to the first target terminal according to a preset adjustment threshold, so as to determine the first target number.
The first target terminal is a service consumer terminal in an active state.
Alternatively, the processing unit 201 may execute S102 described above.
The sending unit 202 is configured to generate a first traffic limitation packet according to the first target number, and send the first traffic limitation packet to the first target terminal.
The first traffic limitation message includes a first target quantity and a traffic upper limit, and the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit.
Alternatively, the transmitting unit 202 may perform S103 described above.
In a possible implementation manner, the adjustment threshold includes a first threshold, and the first threshold is a total number of data receiving units in the service provider.
The processing unit is used for determining the first threshold value as a first target number under the condition that the first target terminal is a service consuming terminal which is initially connected to the service providing terminal.
Alternatively, the processing unit 201 may execute S102-1 described above.
It should be noted that, the flow control device provided in this embodiment may execute the method flows shown in the above method flow embodiments to achieve the corresponding technical effects. For the sake of brevity, the corresponding contents in the above embodiments may be referred to where not mentioned in this embodiment.
The embodiment of the present application further provides a storage medium, where the storage medium stores a computer instruction and a program, and the computer instruction and the program, when read and executed, execute the flow control method of the foregoing embodiment. The storage medium may include memory, flash memory, registers, or a combination thereof, etc.
The following provides an electronic device, which may be a flow control device, where the flow control device includes the electronic device shown in fig. 1, and may implement the flow control method described above; specifically, the electronic device includes: processor 10, memory 11, bus 12. The processor 10 may be a CPU. The memory 11 is used for storing one or more programs, and when the one or more programs are executed by the processor 10, the flow control method of the above-described embodiment is performed.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. A flow control method is applied to a service provider, and the method comprises the following steps:
adjusting the number of data receiving units corresponding to the first target terminal according to a preset adjustment threshold value to determine a first target number;
the first target terminal is a service consumer terminal in an active state;
generating a first traffic limitation message according to the first target quantity, and sending the first traffic limitation message to the first target terminal;
the first traffic limitation packet includes the first target number and a traffic upper limit, where the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit.
2. The flow control method according to claim 1, wherein the adjustment threshold comprises a first threshold, and the first threshold is a total number of data receiving units in the service provider;
the step of adjusting the number of data receiving units corresponding to the first target terminal according to a preset adjustment threshold to determine the first target number includes:
determining the first threshold as the first target number in a case where the first target terminal is a service consumer initially connected to the service provider.
3. The flow control method according to claim 1, wherein the adjusting threshold includes a second threshold, and the step of adjusting the number of data receiving units corresponding to the first target terminal according to a preset adjusting threshold to determine the first target number includes:
determining the sum of the current number of the first target terminals and the second threshold as the first target number under the condition that the service providing end is connected with other service consuming ends;
and the current number of the first target terminals is the number of data receiving units corresponding to the first target terminals currently.
4. The traffic control method according to claim 3, wherein before the adjusting the number of data receiving units corresponding to the first target terminal according to the preset adjustment threshold to determine the first target number, the method further comprises:
and determining the second threshold value according to the number of the data receiving units corresponding to the service consumption terminals connected to the service providing terminal.
5. The flow control method according to claim 4, wherein the expression for determining the second threshold value is:
N=Ya÷M;
wherein N characterizes the second threshold, M characterizes the first threshold, YaAnd characterizing the maximum value in the number of the data receiving units corresponding to the service consumption terminals connected to the service providing terminal.
6. The traffic control method according to claim 3, wherein after generating a first traffic limitation packet according to the first target number and sending the first traffic limitation packet to the first target terminal, the method further comprises:
sending a second traffic limitation message to a second target terminal;
the second target terminal is a service consuming side with the largest number of corresponding data receiving units except the first target terminal, the second traffic limitation packet includes a second target number and a traffic upper limit, the second target number is a difference between a current number of the second target terminal and the second threshold, and the current number of the second target terminal is a number of data receiving units currently corresponding to the second target terminal.
7. A flow control device, applied to a service provider, the device comprising:
the processing unit is used for adjusting the number of the data receiving units corresponding to the first target terminal according to a preset adjusting threshold value so as to determine the first target number;
the first target terminal is a service consumer terminal in an active state;
a sending unit, configured to generate a first traffic limitation packet according to the first target number, and send the first traffic limitation packet to the first target terminal;
the first traffic limitation packet includes the first target number and a traffic upper limit, where the traffic upper limit is an upper limit of traffic that can be received by the data receiving unit.
8. The flow control device according to claim 7, wherein the adjustment threshold comprises a first threshold that is a total number of data receiving units within the service provider;
the processing unit is configured to determine the first threshold as the first target number when the first target terminal is a service consumer initially connected to the service provider.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.
10. An electronic device, comprising: a processor and memory for storing one or more programs; the one or more programs, when executed by the processor, implement the method of any of claims 1-6.
CN202110784658.6A 2021-07-12 2021-07-12 Flow control method and device, storage medium and electronic equipment Active CN113472674B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110784658.6A CN113472674B (en) 2021-07-12 2021-07-12 Flow control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110784658.6A CN113472674B (en) 2021-07-12 2021-07-12 Flow control method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113472674A true CN113472674A (en) 2021-10-01
CN113472674B CN113472674B (en) 2024-05-24

Family

ID=77879840

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110784658.6A Active CN113472674B (en) 2021-07-12 2021-07-12 Flow control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113472674B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914124A (en) * 2022-12-09 2023-04-04 北京百度网讯科技有限公司 Self-adaptive multi-dimensional flow rate limiting method, device, equipment and medium
CN118473628A (en) * 2024-07-10 2024-08-09 此芯科技(无锡)有限公司 Skew elimination method and system and electronic equipment

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030231648A1 (en) * 2002-06-17 2003-12-18 Tang Puqi Perry Guaranteed service in a data network
US20040221032A1 (en) * 2003-05-01 2004-11-04 Cisco Technology, Inc. Methods and devices for regulating traffic on a network
US9813306B1 (en) * 2014-12-16 2017-11-07 Amazon Technologies, Inc. Response rate limiting device
CN109039817A (en) * 2018-08-03 2018-12-18 北京京东金融科技控股有限公司 A kind of information processing method and device for traffic monitoring
CN109547257A (en) * 2018-12-05 2019-03-29 深圳前海微众银行股份有限公司 Method for controlling network flow, device, equipment, system and storage medium
CN109787915A (en) * 2018-12-14 2019-05-21 北京三快在线科技有限公司 Flow control methods, device, electronic equipment and the storage medium of network access
CN110198275A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of flow control methods, system, server and storage medium
CN111343102A (en) * 2020-02-03 2020-06-26 中国银联股份有限公司 Flow rate control method, server-side server, client-side server and system
US20200342453A1 (en) * 2019-04-26 2020-10-29 Mastercard International Incorporated Tokenization request handling at a throttled rate in a payment network
CN112799861A (en) * 2021-01-29 2021-05-14 上海弘积信息科技有限公司 Method for realizing flow speed limit lock-free concurrency under multi-core architecture
CN112965823A (en) * 2021-03-24 2021-06-15 百度在线网络技术(北京)有限公司 Call request control method and device, electronic equipment and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030231648A1 (en) * 2002-06-17 2003-12-18 Tang Puqi Perry Guaranteed service in a data network
US20040221032A1 (en) * 2003-05-01 2004-11-04 Cisco Technology, Inc. Methods and devices for regulating traffic on a network
US9813306B1 (en) * 2014-12-16 2017-11-07 Amazon Technologies, Inc. Response rate limiting device
CN110198275A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of flow control methods, system, server and storage medium
CN109039817A (en) * 2018-08-03 2018-12-18 北京京东金融科技控股有限公司 A kind of information processing method and device for traffic monitoring
CN109547257A (en) * 2018-12-05 2019-03-29 深圳前海微众银行股份有限公司 Method for controlling network flow, device, equipment, system and storage medium
CN109787915A (en) * 2018-12-14 2019-05-21 北京三快在线科技有限公司 Flow control methods, device, electronic equipment and the storage medium of network access
US20200342453A1 (en) * 2019-04-26 2020-10-29 Mastercard International Incorporated Tokenization request handling at a throttled rate in a payment network
CN111343102A (en) * 2020-02-03 2020-06-26 中国银联股份有限公司 Flow rate control method, server-side server, client-side server and system
CN112799861A (en) * 2021-01-29 2021-05-14 上海弘积信息科技有限公司 Method for realizing flow speed limit lock-free concurrency under multi-core architecture
CN112965823A (en) * 2021-03-24 2021-06-15 百度在线网络技术(北京)有限公司 Call request control method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张劲声: "数据中心网络流量调度方案的研究与实现", 《中国优秀硕士学位论文全文数据库》, 15 May 2021 (2021-05-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115914124A (en) * 2022-12-09 2023-04-04 北京百度网讯科技有限公司 Self-adaptive multi-dimensional flow rate limiting method, device, equipment and medium
CN118473628A (en) * 2024-07-10 2024-08-09 此芯科技(无锡)有限公司 Skew elimination method and system and electronic equipment

Also Published As

Publication number Publication date
CN113472674B (en) 2024-05-24

Similar Documents

Publication Publication Date Title
CN109561141B (en) CDN node selection method and equipment
EP3981190B1 (en) Method and apparatus for enforcement of maximum number of protocol data unit sessions per network slice in a communication system
CN113472674B (en) Flow control method and device, storage medium and electronic equipment
US11258717B2 (en) Method for sending service packet, network device, and system
KR20160035013A (en) Service layer southbound interface and quality of service
WO2021031672A1 (en) Method for notifying quality of service information, device, and system
WO2015096680A1 (en) Node distribution method and control center
WO2021146926A1 (en) Data transmission method, device, and system
WO2022222674A1 (en) Message processing method and apparatus, electronic device, and computer-readable storage medium
JP2023514142A (en) Method and network node for QoS notification
US20150067066A1 (en) Provisioning Communication Services using Proxy Server in a Cloud
JP2023126982A (en) Protocol data unit session processing method, device, and electronic equipment
JP2024514643A (en) Packet forwarding method, apparatus, and system, and computer-readable storage medium
CN115002046A (en) Message processing method, NUMA node, electronic device and storage medium
CN114286447A (en) Method, device and storage medium for adjusting scheduling priority
CN109639555B (en) Link layer message generation method, link layer message generation device and terminal equipment
CN113453285B (en) Resource adjusting method, device and storage medium
US11870707B2 (en) Bandwidth management and configuration method for cloud service, and related apparatus
CN109526032B (en) Method and device for modifying network slice example
CN117014924A (en) Method and device for reporting service capacity load parameters
CN115357363A (en) Current limiting method and device, task response system, electronic equipment and storage medium
CN111565155B (en) Service chain configuration method and device
KR101719724B1 (en) Resource management system and method, and method for deciding resource price by the same system
KR102168177B1 (en) Network function and method for processing packet using the same
US9172727B2 (en) Customer premise equipment and microprocessor resource management method of customer premise equipment

Legal Events

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