CN113472674B - 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
CN113472674B
CN113472674B CN202110784658.6A CN202110784658A CN113472674B CN 113472674 B CN113472674 B CN 113472674B CN 202110784658 A CN202110784658 A CN 202110784658A CN 113472674 B CN113472674 B CN 113472674B
Authority
CN
China
Prior art keywords
target
target terminal
data receiving
service
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.)
Active
Application number
CN202110784658.6A
Other languages
Chinese (zh)
Other versions
CN113472674A (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

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)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (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 method comprises the steps that a first target terminal is a service consumption terminal in a positive state, a first flow limit message is generated according to a first target quantity, and the first flow limit message is sent to the first target terminal; the first traffic limitation message includes a first target number and an upper traffic limit, the upper traffic limit being an upper limit of traffic receivable by the data receiving unit. The service providing end can provide service for the service consuming end in the active state better by adjusting the corresponding first target quantity in real time for the service consuming end in the active state. By sending the first flow limit message in real time, the situation that the sending flow of the first target terminal exceeds the maximum flow limit in one call is avoided, downtime is avoided, and the usability of the system is ensured.

Description

Flow control method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of the internet, and in particular, to a flow control method, a device, a storage medium, and an electronic apparatus.
Background
With the development of society and the progress of science, the internet is fully utilized and is filled in the life of people. RPC (Remote Procedure Call) remote procedure calls are also of great interest as a hot technology. An RPC is simply understood to be a service that one node requests from another node.
In the RPC scenario, the processing capability of the service provider is limited, if the service caller cannot timely sense the real-time processing capability of the provider, and if there is a surge in data traffic at a certain time node, the service provider cannot deal with the surge in traffic, and may not provide the service or crash temporarily. Therefore, in a distributed system, how to ensure high availability of the system becomes a difficult problem to be solved by those skilled in the art.
Disclosure of Invention
The application aims to provide a flow control method, a flow control device, a storage medium and electronic equipment, so as to at least partially solve the problems.
In order to achieve the above object, the technical scheme adopted by the embodiment of the application is as follows:
In a first aspect, an embodiment of the present application provides a flow control method, applied to a service provider, where 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 consumption terminal in a positive state;
Generating a first flow limit message according to the first target quantity, and sending the first flow limit message to the first target terminal;
The first flow limit message includes the first target number and an upper flow limit, where the upper flow limit is an upper flow limit that the data receiving unit can receive.
In a second aspect, an embodiment of the present application provides a flow control device, 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 adjustment threshold value so as to determine the first target number;
the first target terminal is a service consumption terminal in a positive state;
a sending unit, configured to generate a first traffic restriction message according to the first target number, and send the first traffic restriction message to the first target terminal;
The first flow limit message includes the first target number and an upper flow limit, where the upper flow limit is an upper flow limit that the data receiving unit can receive.
In a third aspect, an embodiment of the present application provides a storage medium having stored thereon a computer program which, 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 a memory for storing one or more programs; the above-described method is implemented when the one or more programs are executed by the processor.
Compared with the prior art, the flow control method, the flow control device, the storage medium and the electronic equipment provided by the embodiment of the application are used for adjusting the number of the data receiving units corresponding to the first target terminal according to the preset adjustment threshold value so as to determine the first target number; the method comprises the steps that a first target terminal is a service consumption terminal in a positive state, a first flow limit message is generated according to a first target quantity, and the first flow limit message is sent to the first target terminal; the first flow limit message includes a first target number and an upper flow limit, where the upper flow limit is an upper flow limit that can be received by the data receiving unit. And adjusting the corresponding first target quantity in real time for the service consumption terminal in the active state, namely adjusting the maximum flow limit corresponding to the first terminal. The service providing end can provide service for the service consuming end in a positive state better. Meanwhile, by sending the first flow limit message in real time, the situation that the sending flow of the first target terminal exceeds the maximum flow limit in one call is avoided, downtime is avoided, and the usability of the system is guaranteed.
In order to make the above 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 needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 2 is a flow chart of a flow control method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of the substeps of S102 according to the embodiment of the application;
FIG. 4 is a schematic diagram of one of the substeps of S102 according to the embodiment of the 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 data receiving unit allocation according to an embodiment of the present application;
Fig. 8 is a schematic diagram of a flow control device according to an embodiment of the present application.
In the figure: 10-a processor; 11-memory; 12-bus; 13-a communication interface; 201-a processing unit; 202-transmitting unit.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the description of the present application, it should be noted that, directions or positional relationships indicated by terms such as "upper", "lower", "inner", "outer", etc., are directions or positional relationships based on those shown in the drawings, or those conventionally put in use in the application, are merely for convenience of description and simplification of the description, and do not indicate or imply that the apparatus or elements referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present application.
In the description of the present application, it should also be noted that, unless explicitly specified and limited otherwise, the terms "disposed", "connected" and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present application will be understood in specific cases by those of ordinary skill in the art.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may 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 needed to dynamically control the delivery of traffic to multiple customers based on the processing power of the service provider.
The embodiment of the application provides electronic equipment, which can be a service providing end, such as server equipment. Referring to fig. 1, a schematic structure of an electronic device is shown. 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, the processor 10 being adapted to execute executable modules, such as computer programs, stored in the memory 11.
The processor 10 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the flow control method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 10. The processor 10 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
The memory 11 may comprise a high-speed random access memory (RAM: random Access Memory) or may further comprise a non-volatile memory (non-volatile memory), such as at least one disk memory.
Bus 12 may be ISA (Industry Standard Architecture) bus, PCI (Peripheral Component Interconnect) bus, EISA (Extended Industry Standard Architecture) bus, or the like. Only one double-headed arrow is shown in fig. 1, but not only one bus 12 or one type of bus 12.
The memory 11 is used to store programs, such as programs corresponding to the flow control devices. The flow control means comprise at least one software function module which may be stored in the memory 11 in the form of software or firmware (firmware) or cured in the 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 application further comprises 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 a schematic structural diagram of only 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 by the embodiment of the application can be applied to, but is not limited to, the electronic device shown in fig. 1, and the specific flow is shown in fig. 2:
S102, 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.
The first target terminal is a service consumption terminal in a positive 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, and 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 consumer in the active state is the service consumer that sends the data message (except the heartbeat monitoring message) to the service provider 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 end for the first target terminal, and the more the number is, the stronger the processing capability is.
S103, generating a first flow limit message according to the first target quantity, and sending the first flow limit message to the first target terminal.
The first flow limit message includes a first target number and an upper flow limit, where the upper flow limit is an upper flow limit that can be received by the data receiving unit.
It can be appreciated that the product of the first target number and the upper traffic limit is the maximum traffic limit allocated to the first target terminal by the service provider. The sending traffic of the first target terminal in one call cannot exceed the maximum traffic limit.
And adjusting the corresponding first target quantity in real time for the service consumption terminal in the active state, namely adjusting the maximum flow limit corresponding to the first terminal. The service providing end can provide service for the service consuming end in a positive state better. Meanwhile, by sending the first flow limit message in real time, the situation that the sending flow of the first target terminal exceeds the maximum flow limit in one call is avoided, downtime is avoided, and the usability of the system is guaranteed.
In summary, an embodiment of the present application provides a flow control method, which is applied to a service providing end, 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 method comprises the steps that a first target terminal is a service consumption terminal in a positive state, a first flow limit message is generated according to a first target quantity, and the first flow limit message is sent to the first target terminal; the first flow limit message includes a first target number and an upper flow limit, where the upper flow limit is an upper flow limit that can be received by the data receiving unit. And adjusting the corresponding first target quantity in real time for the service consumption terminal in the active state, namely adjusting the maximum flow limit corresponding to the first terminal. The service providing end can provide service for the service consuming end in a positive state better. Meanwhile, by sending the first flow limit message in real time, the situation that the sending flow of the first target terminal exceeds the maximum flow limit in one call is avoided, downtime is avoided, and the usability of the system is guaranteed.
For the first flow restriction message, a possible implementation manner is also provided in the embodiments of the present application, please refer to the following.
Request ID(64bits)l Data Length(32bits)l Version(8bits)l Allow Flows Of Each Package(32bits)l Allow Packages(8bits)
The packet Header (Header) is 144bits fixed length;
Request ID (64 bits): identifying a unique request;
DATA LENGTH (32 bits): the length (variable part) of the content after serialization is counted in bytes;
version (8 bits): identifying a protocol version number;
Allow Flows Of EACH PACKAGE (32 bits): the data unit flow size defined by the service providing end;
Allow Packages (8 bits): the service provider allows the number of data units of the received data.
In one possible implementation, the adjustment threshold includes a first threshold that is a total number of data receiving units within the service provider. With respect to the content in S102 on the basis of fig. 2, the embodiment of the present application further provides a possible implementation manner, please refer to fig. 3, S102 includes:
s102-1, determining a first threshold as a first target number in the case that the first target terminal is a service consumer initially connected to the service provider.
Optionally, the service provider needs to define (or configure) its own traffic rules before providing the service: defining each data unit size (X), the maximum data unit allowed by the provider (Y), the maximum acceptable flow rate of the provider (Z), satisfying the definition of z=x×y; after the first service consumer long connection is established, the first request returns the full processing power of the provider: z=x×y; i.e. the first threshold value is determined as the first target number. And sending the first flow limit message carrying the first target number to the first target terminal.
In one possible implementation, the adjustment threshold includes a second threshold. With respect to the content in S102 on the basis of fig. 2, the embodiment of the present application further provides a possible implementation manner, please refer to fig. 4, S102 includes:
S102-2, determining the sum of the current number of the first target terminals and the second threshold value as the first target number when other service consumption terminals are connected to the service providing terminal.
The current number of the first target terminals is the number of data receiving units corresponding to the first target terminals.
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, referring to fig. 5, the flow control method further includes:
S101, determining a second threshold according to the number of data receiving units corresponding to the service consumers connected to the service provider.
Because the total number of data receiving units within the service provider is fixed, i.e. the first threshold is fixed. In the case where the number of data reception units corresponding to the first target terminal increases, it is necessary to have the number of data reception units corresponding to the other terminals decrease.
On this basis, with respect to 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, and the flow control method further includes:
s104, sending a second flow limit message to the second target terminal.
The second target terminal is a service consumption terminal with the maximum number of corresponding data receiving units except the first target terminal, the second traffic limiting 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 value, and the current number of the second target terminal is the number of the data receiving units corresponding to the second target terminal.
Specifically, as shown in fig. 7, it is assumed that there is currently a service consumer O, P, Q and R is connected to a service provider. The number of 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 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 consumption end in the active state is P, namely P is used as a first target terminal. At this time, the service consumer having the largest number of corresponding data receiving units except P is Q, i.e., Q is 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 second target terminals is equal to the minimum threshold (Ymin), the number of second target terminals corresponding data receiving units cannot be acquired any more. The second threshold is now adjusted to 0. Otherwise, the second target terminal is limited in current, and can never send a request to the service provider.
In one possible implementation, for example, one service consumer a sends packets fastest, and the traffic is the largest, and is the consumer with the largest maximum traffic ratio, and the other service consumers reach the minimum Ymin, then the service consumer a cannot get to the data receiving unit on the service consumer with the other Ymin.
Optionally, regarding policy enforcement, the number of data receiving units needs to be adjusted, and there must be one service consumer request to be reached, which affects at most the two consumers' notification about Y value change: a requested service consumer (first target terminal) and an adapted service consumer (second target terminal). The Y value change of the requested service consumer is returned to the service consumer along with the request response data, and the adjusted service consumer is actively initiated by the producer to be pushed to the service consumer once.
In one possible implementation manner, after receiving the flow limitation message (the first flow limitation message or the second flow limitation message), the server consumer calculates whether the size of the total packet exceeds the maximum limit allowed by the server through quota data in the flow limitation message: z=x×y; if the packet is exceeded, unpacking is executed (the big data packet is split into a plurality of small data packets) or the subsequent small data packets are executed, and the big data packet executes a retry strategy; whether the server consumer can perform unpacking and whether there is a subsequent small packet or not requires that the entire cluster be reasonably evaluated in connection with the traffic when defining the size (X) of each data unit.
Referring to fig. 8, fig. 8 is a schematic diagram illustrating an embodiment of a flow control device according to the present application, and the flow control device is optionally applied to the electronic apparatus 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 consumption terminal in a positive state.
Alternatively, the processing unit 201 may execute S102 described above.
The sending unit 202 is configured to generate a first traffic limitation message according to the first target number, and send the first traffic limitation message to the first target terminal.
The first flow limit message includes a first target number and an upper flow limit, where the upper flow limit is an upper flow limit that can be received by the data receiving unit.
Alternatively, the transmission unit 202 may perform S103 described above.
In one possible implementation, the adjustment threshold includes a first threshold that is a total number of data receiving units within the service provider.
The processing unit is configured to determine a first threshold as a first target number if the first target terminal is a service consumer initially connected to the service provider.
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 flow shown in the method flow embodiment to achieve the corresponding technical effects. For a brief description, reference is made to the corresponding parts of the above embodiments, where this embodiment is not mentioned.
The embodiment of the application also provides a storage medium storing computer instructions and programs which when read and executed perform the flow control method of the above embodiment. The storage medium may include memory, flash memory, registers, combinations thereof, or the like.
An electronic device, which may be a flow control device, is provided below, and the flow control device includes an electronic device as shown in fig. 1, and the flow control method described above may be implemented; specifically, the electronic device includes: a processor 10, a memory 11, a bus 12. The processor 10 may be a CPU. The memory 11 is used to store one or more programs that, when executed by the processor 10, perform the flow control methods of the above-described embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus embodiments described above are merely illustrative, for example, of the flowcharts and block diagrams in the figures that 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 a single part, or each module may exist alone, or two or more modules may be integrated to form a single 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 this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
It will be evident to those skilled in the art that the 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 characteristics 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 (5)

1. A flow control method, applied to a service provider, comprising:
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 a positive state;
Generating a first flow limit message according to the first target quantity, and sending the first flow limit message to the first target terminal;
The first flow limit message comprises the first target number and an upper flow limit, wherein the upper flow limit is the upper flow limit which can be received by the data receiving unit;
The adjustment threshold comprises a first threshold and a second threshold, wherein the first threshold is the total number of data receiving units in the service providing end;
the step of adjusting the number of the 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 case the first target terminal is a service consumer initially connected to the service provider;
Determining the sum of the current number of the first target terminals and the second threshold value as the first target number under the condition that the service providing end is connected with other service consuming ends;
The current number of the first target terminals is the number of data receiving units corresponding to the first target terminals;
After generating a first traffic limitation message according to the first target number and sending the first traffic limitation message to the first target terminal, the method further includes:
sending a second traffic limiting message to a second target terminal;
the second target terminal is a service consumption terminal with the maximum number of corresponding data receiving units except the first target terminal, the second traffic limiting 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 the second threshold value, and the current number of the second target terminal is the number of the data receiving units corresponding to the second target terminal.
2. The flow control method according to claim 1, 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 according to the number of data receiving units corresponding to the service consumption terminals connected to the service providing terminal.
3. A flow control device for use with 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 adjustment threshold value so as to determine the first target number;
the first target terminal is a service consumption terminal in a positive state;
a sending unit, configured to generate a first traffic restriction message according to the first target number, and send the first traffic restriction message to the first target terminal;
The first flow limit message comprises the first target number and an upper flow limit, wherein the upper flow limit is the upper flow limit which can be received by the data receiving unit;
The adjustment threshold comprises a first threshold and a second threshold, wherein the first threshold is the total number of data receiving units in the service providing end;
The processing unit is configured to determine, in a case where the first target terminal is a service consumer initially connected to the service provider, the first threshold as the first target number; determining the sum of the current number of the first target terminals and the second threshold value as the first target number under the condition that the service providing end is connected with other service consuming ends; the current number of the first target terminals is the number of data receiving units corresponding to the first target terminals;
The flow control device is further configured to send a second flow restriction message to a second target terminal after sending the first flow restriction message to the first target terminal;
the second target terminal is a service consumption terminal with the maximum number of corresponding data receiving units except the first target terminal, the second traffic limiting 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 the second threshold value, and the current number of the second target terminal is the number of the data receiving units corresponding to the second target terminal.
4. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to claim 1 or 2.
5. An electronic device, comprising: a processor and a memory for storing one or more programs; the method of claim 1 or 2 is implemented when the one or more programs are executed by the processor.
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 CN113472674A (en) 2021-10-01
CN113472674B true 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)

Families Citing this family (1)

* 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

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7447155B2 (en) * 2002-06-17 2008-11-04 Intel Corporation Guaranteed service in a data network
US7627675B2 (en) * 2003-05-01 2009-12-01 Cisco Technology, Inc. Methods and devices for regulating traffic on a network
US11521207B2 (en) * 2019-04-26 2022-12-06 Mastercard International Incorporated Tokenization request handling at a throttled rate in a payment network

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
数据中心网络流量调度方案的研究与实现;张劲声;《中国优秀硕士学位论文全文数据库》;20210515;全文 *

Also Published As

Publication number Publication date
CN113472674A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
CN109561141B (en) CDN node selection method and equipment
CN109451002B (en) CDN node selection method and equipment
CN110830391A (en) Resource allocation method and device and cluster system
US11824787B2 (en) Method and apparatus for node speed limiting, electronic device and storage medium
CN108834179B (en) Method, server and client for adjusting heartbeat cycle
CN108540400A (en) A kind of data transfer control method, control device, terminal and readable storage medium storing program for executing
CN113472674B (en) Flow control method and device, storage medium and electronic equipment
CN105101412A (en) Notification message sending method and device
CN105577573B (en) Information processing method and electronic equipment
US20150067066A1 (en) Provisioning Communication Services using Proxy Server in a Cloud
CN114071547B (en) QoE measurement configuration method, qoE measurement configuration device and storage medium
CN111538572A (en) Task processing method, device, scheduling server and medium
CN113051456A (en) Request processing method and device, electronic equipment and computer readable medium
CN109639555B (en) Link layer message generation method, link layer message generation device and terminal equipment
CN113453285B (en) Resource adjusting method, device and storage medium
CN109526032B (en) Method and device for modifying network slice example
CN117014924A (en) Method and device for reporting service capacity load parameters
CN113835905B (en) Message queue load balancing method and device, electronic equipment and medium
CN113810461B (en) Bandwidth control method, device and equipment and readable storage medium
CN115794396A (en) Resource allocation method, system and electronic equipment
JP2023514142A (en) Method and network node for QoS notification
CN109905320B (en) Message distribution method and device for aggregation port
CN113453043B (en) Video scheduling optimization method and device, computer equipment and storage medium
CN110650358B (en) Node distribution method, device, node distribution server and medium
CN112671704B (en) Attack-aware mMTC slice resource allocation method and device and electronic 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