CN115442432B - Control method, device, equipment and storage medium - Google Patents

Control method, device, equipment and storage medium Download PDF

Info

Publication number
CN115442432B
CN115442432B CN202211086112.4A CN202211086112A CN115442432B CN 115442432 B CN115442432 B CN 115442432B CN 202211086112 A CN202211086112 A CN 202211086112A CN 115442432 B CN115442432 B CN 115442432B
Authority
CN
China
Prior art keywords
service
server
target
adjacent
available idle
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
CN202211086112.4A
Other languages
Chinese (zh)
Other versions
CN115442432A (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.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202211086112.4A priority Critical patent/CN115442432B/en
Publication of CN115442432A publication Critical patent/CN115442432A/en
Application granted granted Critical
Publication of CN115442432B publication Critical patent/CN115442432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a control method, a control device, control equipment and a storage medium. The method comprises the following steps: when receiving target service requests of target quantity, if the utilization rate corresponding to the target service is greater than the threshold value corresponding to the target service, acquiring adjacent servers of the servers corresponding to the target service; acquiring the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent servers and the number of available idle tokens corresponding to the target service; and determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request. By the technical scheme, the service request can be processed in real time, and the dynamic planning processing of the server among different services is set, so that the excessive pressure of the server is avoided.

Description

Control method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a control method, a control device and a storage medium.
Background
The current banking business has larger and larger access amount, more and more business types, and high concurrency is often involved, so that the pressure of a server is overlarge. The most adopted methods for processing high concurrency pressure at present are to use cache data to improve the response capability of a system, or use asynchronous cache, synchronous processing and the like.
The prior technical proposal mainly comprises the following steps:
1. Caching user information in advance, and directly refusing when the user information does not meet the second killing condition;
2. And caching the high concurrency result, directly outputting the result when the high concurrency result is accessed, and re-caching the result when the threshold value does not meet the requirement of caching.
The defects of the prior technical proposal are as follows:
1. when data is cached in advance, the coverage area is not comprehensive, and excessive server pressure can be caused once a request is not in the cache;
2. When caching high concurrency results, the problem of time delay exists, the cache cannot be timely performed, and the phenomenon of repeated replacement cache exists when the types of access requests are more.
Disclosure of Invention
The embodiment of the invention provides a control method, a control device, control equipment and a control storage medium, so that service requests can be processed in real time, dynamic programming processing of servers among different services is set, and excessive pressure of the servers is avoided.
According to an aspect of the present invention, there is provided a control method including:
when receiving target service requests of target quantity, if the utilization rate corresponding to the target service is greater than a threshold corresponding to the target service, acquiring adjacent servers of servers corresponding to the target service, wherein the adjacent servers are servers corresponding to first service, and the first service is different from the target service;
acquiring the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent servers and the number of available idle tokens corresponding to the target service;
And determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request.
Optionally, before acquiring the adjacent server of the server corresponding to the target service if the usage rate corresponding to the target service is greater than the threshold corresponding to the target service, the method further includes:
And determining the utilization rate corresponding to the target service according to the number of tokens in use corresponding to the target service and the total number of tokens.
Optionally, if the usage rate corresponding to the target service is greater than the threshold value corresponding to the target service, acquiring the adjacent server of the server corresponding to the target service includes:
If the utilization rate corresponding to the target service is greater than the threshold value corresponding to the target service, releasing the probe request through the server corresponding to the target service;
and receiving feedback information sent by the servers corresponding to the other services, and determining adjacent servers of the servers corresponding to the target service according to the feedback information of the servers corresponding to the other services.
Optionally, the feedback information includes feedback time;
Correspondingly, determining the adjacent server of the server corresponding to the target service according to the feedback information of the servers corresponding to other services comprises the following steps:
Determining at least two servers according to feedback information of servers corresponding to other services;
and if at least two servers corresponding to the same service exist in the at least two services, selecting one server from the servers corresponding to the same service as an adjacent server according to the feedback time.
Optionally, obtaining the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server, and the number of available idle tokens corresponding to the target service includes:
Acquiring the number of tokens in use corresponding to a first service, the total number of tokens corresponding to the first service, a threshold value corresponding to the first service, the total number of tokens of adjacent servers, the number of tokens in use corresponding to the adjacent servers, the total number of tokens corresponding to target service and the use rate corresponding to the target service;
Determining the number of available idle tokens corresponding to the first service according to the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service and a threshold value corresponding to the first service;
determining the number of available idle tokens corresponding to the adjacent server according to the total number of tokens of the adjacent server and the number of tokens in use corresponding to the adjacent server;
And determining the number of available idle tokens corresponding to the target service according to the total number of tokens corresponding to the target service and the utilization rate corresponding to the target service.
Optionally, determining the target server according to the target number, the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server, and the number of available idle tokens corresponding to the target service, and controlling the target server to execute the target service request, including:
determining a first quantity according to the number of available idle tokens corresponding to the target service and the target quantity;
if the number of available idle tokens corresponding to the adjacent servers is smaller than the number of available idle tokens corresponding to the first service and the first number is smaller than the number of available idle tokens corresponding to the adjacent servers, determining the adjacent servers as target servers and controlling the adjacent servers to execute target service requests of the target number;
If the first number is smaller than the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server is smaller than the available idle token number corresponding to the first service, and the first number is larger than the available idle token number corresponding to the adjacent server, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the available idle token number corresponding to the adjacent server, and sending probe requests through the adjacent server until the target service requests of the target number are processed;
If the first number is greater than the number of available idle tokens corresponding to the first service, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the number of available idle tokens corresponding to the first service, and sending probe requests through the adjacent server until the target service requests of the target number are processed.
Optionally, the method further comprises:
if the available idle token number corresponding to the adjacent server is larger than the available idle token number corresponding to the first service, updating the available idle token number corresponding to the adjacent server into the available idle token number corresponding to the first service.
According to another aspect of the present invention, there is provided a control apparatus including:
the receiving module is used for acquiring adjacent servers of the servers corresponding to the target service if the utilization rate corresponding to the target service is larger than the threshold value corresponding to the target service when the target service request of the target number is received, wherein the adjacent servers are servers corresponding to the first service, and the first service is different from the target service;
the acquisition module is used for acquiring the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server and the number of available idle tokens corresponding to the target service;
And the determining module is used for determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request.
According to another aspect of the present invention, there is provided an electronic apparatus including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the control method according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to execute a control method according to any one of the embodiments of the present invention.
According to the embodiment of the invention, when the target business requests of the target quantity are received, if the utilization rate corresponding to the target business is larger than the threshold value corresponding to the target business, the adjacent servers of the servers corresponding to the target business are obtained; acquiring the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent servers and the number of available idle tokens corresponding to the target service; and determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request. By the technical scheme, the service request can be processed in real time, and the dynamic planning processing of the server among different services is set, so that the excessive pressure of the server is avoided.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, 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 invention 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 flow chart of a control method according to a first embodiment of the present invention;
FIG. 2 is a flow chart of a control method according to a second embodiment of the present invention;
Fig. 3 is a schematic structural view of a control device according to a third embodiment of the present invention;
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a control method according to a first embodiment of the present invention, where the present embodiment is applicable to a case of controlling a server, the method may be performed by a control device according to the embodiment of the present invention, and the device may be implemented in software and/or hardware, as shown in fig. 1, and the method specifically includes the following steps:
s110, when receiving target service requests of target quantity, if the utilization rate corresponding to the target service is larger than the threshold corresponding to the target service, acquiring adjacent servers of the servers corresponding to the target service, wherein the adjacent servers are servers corresponding to first service, and the first service is different from the target service.
Wherein, the target number can be understood as a specific number of the received target service requests; by way of example, the target number may be 100. The service in this embodiment may divide the service into different types of services according to the importance of the service, for example, may be a type a service, a type B service, a type C service, a type D service, etc., and may also divide the service into types by other manners. The embodiment of the present invention is not limited thereto. In this embodiment, the service types may be labeled, and each different type of service may be allocated to different queues for access, and a plurality of different servers may be allocated below each service type for service processing; meanwhile, because of different service importance degrees, the number and the performance of the corresponding servers under each type of service can also focus on important services.
The target service request may be understood as a request such as a class a service request, a class B service request, a class C service request, or a class D service request. When a service request is received in this embodiment, the type of the service request may be acquired. Each type of service in this embodiment may correspond to a token pool. The usage rate corresponding to the target service can be represented according to the number of token number consumption corresponding to the target service. The usage rate corresponding to the target service in this embodiment may be determined according to the number of tokens in use and the total number of tokens corresponding to the target service. Specifically, in this embodiment, the alarm threshold of the number of tokens may be set in the service queue, and when the token corresponding to the target service is consumed to the alarm threshold, interaction between servers in different scenes is performed, so as to process the alarm service.
The thresholds corresponding to the target service may be obtained by querying a database, and it should be noted that the thresholds corresponding to different services may be the same or different, and the thresholds corresponding to different services may be limited according to service weights, where the service weights may be determined according to service access amounts, and the higher the service access amount, the greater the service weight. For example, if the traffic access amount of the a traffic is greater than the traffic access amount of the B traffic, the weight of the a traffic may be greater than the weight of the B traffic.
The adjacent server can be a server corresponding to a first service, and the first service can be any type of service different from the target service; if the number of adjacent servers is greater than or equal to two, the service type included in the first service is the same as the number of adjacent servers, for example, if there are 2 adjacent servers in the servers corresponding to the target service: the server 1 is a server corresponding to the B service, and the server 2 is a server corresponding to the C service. It should be noted that, the adjacent servers are servers corresponding to different services, and only one server corresponding to each service exists in the adjacent servers.
In this embodiment, when a target number of target service requests are received, a threshold value corresponding to the target service and a usage rate corresponding to the target service may be obtained, and when the usage rate corresponding to the target service is greater than the threshold value corresponding to the target service, an adjacent server of the server corresponding to the target service is obtained.
In this embodiment, before acquiring the adjacent server of the server corresponding to the target service if the usage rate corresponding to the target service is greater than the threshold value corresponding to the target service, the method further includes: and determining the utilization rate corresponding to the target service according to the number of tokens in use corresponding to the target service and the total number of tokens.
In this embodiment, in order to protect the system, a large amount of service request access amount is prevented from impacting the server, so that the server is paralyzed, and therefore, in this embodiment, a token resource pool can be introduced for protection. Specifically, when a service request is received, the number of tokens corresponding to the service request is reduced by one; when the service request is processed, the token number corresponding to the service request is increased by one. In this embodiment, the number of tokens required by different types of services may be allocated in the resource pool, where the number of tokens may be equal to the sum of the numbers of concurrences of the maximum processing services of the server that belongs to the service type processing. When the number of tokens in the token resource pool is zero, the subsequent requests wait for processing until the number of tokens is increased.
When a service request passes through the firewall and enters the server for processing, the number of tokens in the token resource pool is reduced by 1, the service processing is completed, when the service request returns, the number of tokens in the token resource pool is increased by 1, the number of tokens in the token resource pool is reduced by the rest number to obtain the number of currently processed tokens, and the use ratio corresponding to the target service can be calculated by dividing the number of currently processed tokens by the total number of tokens, so that the current pressure of the server is known.
The number of tokens in use can be understood as the number of tokens in use corresponding to the target service. The total number of tokens is the total number of tokens which can be understood as corresponding to the target service, and can be the total number of tokens which are pre-allocated in the token resource pool. The usage rate corresponding to the target service may be obtained by dividing the number of tokens in use corresponding to the target service by the total number of tokens.
In this embodiment, before acquiring the adjacent server of the server corresponding to the target service if the usage rate corresponding to the target service is greater than the threshold corresponding to the target service, the usage rate corresponding to the target service may be determined according to the number of tokens in use and the total number of tokens corresponding to the target service. Through the arrangement, the adjacent servers can be determined by comparing the usage rate with the threshold value corresponding to the target service, so that the pressure condition of the servers can be determined in real time conveniently, and the adjacent servers can be determined flexibly.
In this embodiment, if the usage rate corresponding to the target service is greater than the threshold value corresponding to the target service, acquiring the neighboring server of the server corresponding to the target service includes: if the utilization rate corresponding to the target service is greater than the threshold value corresponding to the target service, releasing the probe request through the server corresponding to the target service; and receiving feedback information sent by the servers corresponding to the other services, and determining adjacent servers of the servers corresponding to the target service according to the feedback information of the servers corresponding to the other services.
Wherein the probe request may be used to probe a connected server. The probe request may be released by any server corresponding to the target service.
It should be noted that, if the target service corresponds to only one server, the probe request is released through the server corresponding to the target service. If the target service corresponds to at least two servers, the probe request can be released through the server with the highest utilization rate in the at least two servers, or the probe request can be released through the server with the lowest utilization rate in the at least two servers. The embodiment of the present invention is not limited thereto.
The feedback information can be sent by a server corresponding to other services. The adjacent server can determine according to feedback information sent by the server corresponding to other services. The adjacent servers can be one server, two servers or a plurality of servers, and can be determined according to actual requirements.
Specifically, the method for receiving feedback information sent by the server corresponding to the other service and determining the adjacent server of the server corresponding to the target service according to the feedback information of the server corresponding to the other service may be: if at least two servers corresponding to the same service exist in the received servers corresponding to the other services, any one server is selected as the adjacent server. For example, servers adjacent to the a server may be B server, C server, d server, and e server, where the a server processes the a service, the B server and the C server processes the B service, and the d server and the e server processes the C service. Any one of the b-server and the c-server, any one of the d-server and the e-server is selected, and if the b-server and the d-server are selected, the b-server and the d-server are determined as adjacent servers.
In this embodiment, if the usage rate corresponding to the target service is greater than the threshold value corresponding to the target service, the probe request may be released through the server corresponding to the target service; and determining the adjacent servers of the servers corresponding to the target service according to the feedback information of the servers corresponding to the other services.
Through the arrangement, the adjacent server of the server corresponding to the target service is determined by sending the probe request and receiving the feedback information, so that the service request can be shared by finding out the appropriate adjacent server, and dynamic planning can be performed on the server.
In this embodiment, the feedback information includes a feedback time; correspondingly, determining the adjacent server of the server corresponding to the target service according to the feedback information of the servers corresponding to other services comprises the following steps: determining at least two servers according to feedback information of servers corresponding to other services; and if at least two servers corresponding to the same service exist in the at least two services, selecting one server from the servers corresponding to the same service as an adjacent server according to the feedback time.
The feedback information may include feedback time, and may further include other information. The adjacent server can select one of the servers corresponding to the same service as the adjacent server.
Specifically, the manner of selecting one server from the servers corresponding to the same service as the adjacent server according to the feedback time may be: and selecting the server with the earliest feedback time from the servers corresponding to at least two same services according to the feedback time as the adjacent server.
In a specific example, the usage rate corresponding to the a service is ninety-five percent of the preset threshold value. If the A service reaches ninety-five percent utilization rate, a server of other services is started to process the service. The server corresponding to the A service releases the probe signal, detects whether the connected server can process the service, and is specifically expressed as follows: and the server corresponding to the service A emits a probe, the probe is connected to the servers with different service types adjacent to the server along the direction, and if the adjacent servers are servers with the same service type, only one server is detected. The servers adjacently connected with the server a are the server B, the server C, the server d and the server e, wherein the server a processes the service A, the server B and the server C process the service B, and the server d and the server e process the service C. The probe is detected as the server which receives the feedback information first in the b server or the c server, and the server which receives the feedback information first in the d server or the e server, and meanwhile, the servers corresponding to other A services do not release the probe. Therefore, if the feedback information sent by the b server is received first, then the feedback information sent by the c server is received, the feedback information sent by the d server is received first, and then the feedback information sent by the e server is received, the adjacent servers of the a server are the b server and the d server.
In this embodiment, at least two servers may be determined according to feedback information of servers corresponding to other services; and if at least two servers corresponding to the same service exist in the at least two services, selecting one server from the servers corresponding to the same service as an adjacent server according to the feedback time.
Through the arrangement, the server to be selected can be determined according to the feedback information, and the adjacent server is screened from the servers to be selected corresponding to the same service, so that the adjacent server can be determined conveniently.
S120, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service are obtained.
Wherein the first service may be understood as a service different from the target service. The number of available idle tokens corresponding to the first service may be understood as the number of idle tokens that may be provided when the threshold preset by the first service is not reached. The number of available idle tokens corresponding to the adjacent server can be understood as the number of idle tokens obtained by subtracting the number of tokens in use from the total number of tokens of the corresponding server. The number of available idle tokens corresponding to the target service may be understood as the number of idle tokens that may be provided when the threshold preset by the target service is not reached.
Specifically, the method for obtaining the number of available idle tokens corresponding to the first service may be: acquiring the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service and a threshold corresponding to the first service; and determining the available idle token number corresponding to the first service according to the token number in use corresponding to the first service, the total number of tokens corresponding to the first service and the threshold value corresponding to the first service.
Specifically, the manner of obtaining the available idle token number corresponding to the adjacent server may be: acquiring the total number of tokens of the adjacent servers and the number of tokens in use corresponding to the adjacent servers; and determining the available idle token number corresponding to the adjacent server according to the total number of tokens of the adjacent server and the number of tokens in use corresponding to the adjacent server.
Specifically, the method for obtaining the available idle token number corresponding to the target service may be: obtaining the total number of tokens of the target service and the number of tokens in use corresponding to the target service; and determining the number of available idle tokens corresponding to the target service according to the total number of tokens of the target service and the number of tokens in use corresponding to the target service.
In this embodiment, the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server, and the number of available idle tokens corresponding to the target service may be obtained.
S130, determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request.
The target server may be understood as a server that processes the target service request. The target server may be determined according to the target number, the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server, and the number of available idle tokens corresponding to the target service.
In this embodiment, the target server may be determined according to the target number, the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server, and the number of available idle tokens corresponding to the target service, and the target server may be controlled to execute the target service request.
According to the embodiment of the invention, when the target business requests of the target quantity are received, if the utilization rate corresponding to the target business is larger than the threshold value corresponding to the target business, the adjacent servers of the servers corresponding to the target business are obtained; acquiring the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent servers and the number of available idle tokens corresponding to the target service; and determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request. By the technical scheme, the service request can be processed in real time, and the dynamic planning processing of the server among different services is set, so that the excessive pressure of the server is avoided.
Example two
Fig. 2 is a flowchart of a control method according to a second embodiment of the present invention, which is optimized based on the above embodiment. The concrete optimization is as follows: the method for obtaining the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service comprises the following steps: acquiring the number of tokens in use corresponding to a first service, the total number of tokens corresponding to the first service, a threshold value corresponding to the first service, the total number of tokens of adjacent servers, the number of tokens in use corresponding to the adjacent servers, the total number of tokens corresponding to target service and the use rate corresponding to the target service; determining the number of available idle tokens corresponding to the first service according to the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service and a threshold value corresponding to the first service; determining the number of available idle tokens corresponding to the adjacent server according to the total number of tokens of the adjacent server and the number of tokens in use corresponding to the adjacent server; and determining the number of available idle tokens corresponding to the target service according to the total number of tokens corresponding to the target service and the utilization rate corresponding to the target service. As shown in fig. 2, the method of this embodiment specifically includes the following steps:
And S210, when receiving the target service requests of the target quantity, if the utilization rate corresponding to the target service is greater than the threshold corresponding to the target service, acquiring the adjacent servers of the servers corresponding to the target service, wherein the adjacent servers are servers corresponding to the first service, and the first service is different from the target service.
S220, the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service, the threshold value corresponding to the first service, the total number of tokens of adjacent servers, the number of tokens in use corresponding to the adjacent servers, the total number of tokens corresponding to the target service and the utilization rate corresponding to the target service are obtained.
In this embodiment, the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service, the threshold value corresponding to the first service, the total number of tokens of the adjacent servers, the number of tokens in use corresponding to the adjacent servers, the total number of tokens corresponding to the target service, and the usage rate corresponding to the target service may be obtained.
S230, determining the number of available idle tokens corresponding to the first service according to the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service and a threshold value corresponding to the first service.
Specifically, in this embodiment, the number of available idle tokens corresponding to the first service may be obtained by multiplying the threshold corresponding to the first service by the total number of tokens corresponding to the first service and subtracting the number of tokens in use corresponding to the first service.
For example, the first service may be a class C service, and the determination may be made that the number of idle tokens may be provided by the following formula:
Wherein N P may be the number of service tokens in use corresponding to the class C service, N may be the total number of tokens corresponding to the class C service (the number of idle tokens+the number of service tokens in use), N Z may be the maximum number of idle tokens corresponding to the class C service, and P may represent the corresponding maximum usage threshold of the class C service.
In this embodiment, the number of available idle tokens corresponding to the first service may be determined according to the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service, and a threshold corresponding to the first service.
S240, determining the available idle token number corresponding to the adjacent server according to the total number of tokens of the adjacent server and the token number in use corresponding to the adjacent server.
In this embodiment, the number of available idle tokens corresponding to the adjacent server may be obtained by subtracting the number of tokens in use corresponding to the adjacent server from the total number of tokens of the adjacent server.
Illustratively, the number of available idle tokens corresponding to neighboring servers may be determined by:
NN-NX=NV
Where N N may represent the total number of tokens for the neighboring server d, N X may represent the number of tokens that server d is processing, and N V may represent the maximum number of idle tokens that server d may provide.
In this embodiment, the number of available idle tokens corresponding to the adjacent server may be determined according to the total number of tokens of the adjacent server and the number of tokens in use corresponding to the adjacent server.
S250, determining the number of available idle tokens corresponding to the target service according to the total number of tokens corresponding to the target service and the utilization rate corresponding to the target service.
In this embodiment, the available idle token number corresponding to the target service may be obtained by subtracting the usage rate corresponding to the target service from 1 and multiplying the usage rate by the total number of tokens corresponding to the target service.
In this embodiment, the number of available idle tokens corresponding to the target service may be determined according to the total number of tokens corresponding to the target service and the usage rate corresponding to the target service.
In this embodiment, further comprising: if the available idle token number corresponding to the adjacent server is larger than the available idle token number corresponding to the first service, updating the available idle token number corresponding to the adjacent server into the available idle token number corresponding to the first service.
Illustratively, N Z may be the number of available idle tokens corresponding to the first service, and N V may represent the number of available idle tokens corresponding to the neighboring server. If N V is greater than N Z, then the value of N Z is assigned to N V.
In this embodiment, if the number of available idle tokens corresponding to the adjacent server is greater than the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server may be updated to the number of available idle tokens corresponding to the first service. By the arrangement in the embodiment, reasonable service planning can be conveniently performed on the adjacent servers.
S260, determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request.
In this embodiment, determining the target server according to the target number, the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server, and the number of available idle tokens corresponding to the target service, and controlling the target server to execute the target service request includes:
determining a first quantity according to the number of available idle tokens corresponding to the target service and the target quantity;
if the number of available idle tokens corresponding to the adjacent servers is smaller than the number of available idle tokens corresponding to the first service and the first number is smaller than the number of available idle tokens corresponding to the adjacent servers, determining the adjacent servers as target servers and controlling the adjacent servers to execute target service requests of the target number;
If the first number is smaller than the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server is smaller than the available idle token number corresponding to the first service, and the first number is larger than the available idle token number corresponding to the adjacent server, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the available idle token number corresponding to the adjacent server, and sending probe requests through the adjacent server until the target service requests of the target number are processed;
If the first number is greater than the number of available idle tokens corresponding to the first service, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the number of available idle tokens corresponding to the first service, and sending probe requests through the adjacent server until the target service requests of the target number are processed.
Wherein the first number may be understood as the number of service tokens required for the target service request. The first number may be determined according to the number of available idle tokens corresponding to the target service and the target number; specifically, the determination may be made by the difference between the target number and the available number of idle tokens.
In this embodiment, the target server may determine to execute the target service request by comparing the first number with the number of available idle tokens corresponding to the first service and the number of available idle tokens corresponding to the neighboring server.
Specifically, the first number N I is compared with the available idle token number N Z corresponding to the first service and the available idle token number N V corresponding to the adjacent server; if N V is less than N Z,NI and less than N V, all the servers are processed by the adjacent servers; if N I is smaller than N Z,NV and smaller than N Z,NI and larger than N V, the server processes the number of N V, the probe detects other adjacent servers in the type, and the number of the remaining tokens required is distributed and processed in sequence; if N I is greater than N Z, the number of tokens of N Z is placed in the server to which the service type belongs for processing, and the probe continues to search for other service types until the required number of tokens is processed.
In this embodiment, if there is one neighboring server, if the number of available idle tokens corresponding to the neighboring server is smaller than the number of available idle tokens corresponding to the first service, and the first number is smaller than the number of available idle tokens corresponding to the neighboring server, the neighboring server may be determined as the target server, and the neighboring server may be controlled to execute the target service request of the target number. If the first number is smaller than the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server is smaller than the available idle token number corresponding to the first service, and the first number is larger than the available idle token number corresponding to the adjacent server, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the available idle token number corresponding to the adjacent server, and sending probe requests through the adjacent server until the target service requests of the target number are processed; if the first number is greater than the number of available idle tokens corresponding to the first service, determining the adjacent servers as target servers, controlling the adjacent servers to execute target service requests corresponding to the number of available idle tokens corresponding to the first service, and sending probe requests through the adjacent servers until the target service requests of the target number are processed.
Optionally, in this embodiment, if there are at least two adjacent servers, the number of target service requests allocated to each adjacent server is determined according to the ratio of the number of available idle tokens corresponding to the at least two adjacent servers; if the first number is greater than the sum of the available idle tokens corresponding to all the adjacent servers, selecting any adjacent server as a target adjacent server after the target service requests with the same number of the available idle tokens are distributed to each adjacent server, sending a probe by the target adjacent server, acquiring the adjacent servers of the target adjacent server, and distributing the rest of the target service requests to the adjacent servers of the target adjacent server until all the target service requests are processed.
Optionally, in this embodiment, if at least two adjacent servers exist, the first number of target service requests are uniformly distributed to each adjacent server, if the number of target service requests distributed to the adjacent servers is greater than the number of available idle tokens corresponding to the adjacent servers, the adjacent servers process the target service requests with the same number of available idle tokens corresponding to the adjacent servers, send the target service requests to the probe, acquire the adjacent servers of the adjacent servers, and distribute the remaining target service requests to the adjacent servers of the adjacent servers for processing.
In a specific example, if there are two adjacent servers a and B in this embodiment, the server a may be a server corresponding to the service 1, and the server B may be a server corresponding to the service 2; in this embodiment, the number of available idle tokens corresponding to the server a is 50, the number of available idle tokens corresponding to the service 1 is 60, the number of available idle tokens corresponding to the server B is 60, and the number of available idle tokens corresponding to the service 2 is 70;
when the first number is 40; 40/2=20, since 20 is smaller than the number of available idle tokens corresponding to the server a and 20 is smaller than the number of available idle tokens corresponding to the server B, 20 target service requests can be allocated to the server a for processing, and 20 target service requests can be allocated to the server B for processing.
When the first number is 80; 80/2=40, since 40 is smaller than the number of available idle tokens corresponding to server a and 40 is smaller than the number of available idle tokens corresponding to server B, 40 target service requests can be allocated to server a for processing, and 40 target service requests can be allocated to server B for processing.
In another specific example, when the first number is 110; the ratio of the available idle token number corresponding to the server A to the available idle token number corresponding to the server B is 5:6, 110/11=10, 50 target service requests are distributed to the server A for processing, and 60 target service requests are distributed to the server B for processing.
Through the arrangement, dynamic server planning can be realized through the connection of servers among different services, the pressure of the servers can be relieved, and the normal operation of the service is protected.
According to the embodiment of the invention, when the target business requests of the target quantity are received, if the utilization rate corresponding to the target business is larger than the threshold value corresponding to the target business, the adjacent servers of the servers corresponding to the target business are obtained; acquiring the number of tokens in use corresponding to a first service, the total number of tokens corresponding to the first service, a threshold value corresponding to the first service, the total number of tokens of adjacent servers, the number of tokens in use corresponding to the adjacent servers, the total number of tokens corresponding to target service and the use rate corresponding to the target service; determining the number of available idle tokens corresponding to the first service according to the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service and a threshold value corresponding to the first service; determining the number of available idle tokens corresponding to the adjacent server according to the total number of tokens of the adjacent server and the number of tokens in use corresponding to the adjacent server; determining the number of available idle tokens corresponding to the target service according to the total number of tokens corresponding to the target service and the utilization rate corresponding to the target service; and determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request. By the technical scheme, the service request can be processed in real time, and the dynamic planning processing of the server among different services is set, so that the excessive pressure of the server is avoided.
Example III
Fig. 3 is a schematic structural diagram of a control device according to a third embodiment of the present invention. The embodiment may be applied to a case of controlling a server, where the apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in any device that provides a function of data processing, as shown in fig. 2, where the apparatus for controlling specifically includes: a receiving module 310, an obtaining module 320 and a determining module 330.
A receiving module 310, configured to, when receiving a target number of target service requests, obtain, if a usage rate corresponding to a target service is greater than a threshold corresponding to the target service, a neighboring server of a server corresponding to the target service, where the neighboring server is a server corresponding to a first service, and the first service is different from the target service;
An obtaining module 320, configured to obtain a number of available idle tokens corresponding to the first service, a number of available idle tokens corresponding to the adjacent server, and a number of available idle tokens corresponding to the target service;
The determining module 330 is configured to determine a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the neighboring server, and the available idle token number corresponding to the target service, and control the target server to execute the target service request.
Optionally, the device further includes a usage rate determining module, configured to determine, before acquiring the neighboring server of the server corresponding to the target service if the usage rate corresponding to the target service is greater than the threshold corresponding to the target service, the usage rate corresponding to the target service according to the number of tokens in use corresponding to the target service and the total number of tokens.
Optionally, the receiving module 310 includes:
the probe request releasing unit is used for releasing the probe request through the server corresponding to the target service if the utilization rate corresponding to the target service is greater than the threshold corresponding to the target service;
and the adjacent server determining unit is used for receiving the feedback information sent by the servers corresponding to the other services and determining the adjacent servers of the servers corresponding to the target service according to the feedback information of the servers corresponding to the other services.
Optionally, the feedback information includes feedback time;
Accordingly, the adjacent server determining unit is configured to:
Determining at least two servers according to feedback information of servers corresponding to other services;
and if at least two servers corresponding to the same service exist in the at least two services, selecting one server from the servers corresponding to the same service as an adjacent server according to the feedback time.
Optionally, the obtaining module 320 is specifically configured to:
Acquiring the number of tokens in use corresponding to a first service, the total number of tokens corresponding to the first service, a threshold value corresponding to the first service, the total number of tokens of adjacent servers, the number of tokens in use corresponding to the adjacent servers, the total number of tokens corresponding to target service and the use rate corresponding to the target service;
Determining the number of available idle tokens corresponding to the first service according to the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service and a threshold value corresponding to the first service;
determining the number of available idle tokens corresponding to the adjacent server according to the total number of tokens of the adjacent server and the number of tokens in use corresponding to the adjacent server;
And determining the number of available idle tokens corresponding to the target service according to the total number of tokens corresponding to the target service and the utilization rate corresponding to the target service.
Optionally, the determining module 330 is specifically configured to:
determining a first quantity according to the number of available idle tokens corresponding to the target service and the target quantity;
if the number of available idle tokens corresponding to the adjacent servers is smaller than the number of available idle tokens corresponding to the first service and the first number is smaller than the number of available idle tokens corresponding to the adjacent servers, determining the adjacent servers as target servers and controlling the adjacent servers to execute target service requests of the target number;
If the first number is smaller than the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server is smaller than the available idle token number corresponding to the first service, and the first number is larger than the available idle token number corresponding to the adjacent server, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the available idle token number corresponding to the adjacent server, and sending probe requests through the adjacent server until the target service requests of the target number are processed;
If the first number is greater than the number of available idle tokens corresponding to the first service, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the number of available idle tokens corresponding to the first service, and sending probe requests through the adjacent server until the target service requests of the target number are processed.
Optionally, the apparatus further includes: and the idle token number updating unit is used for updating the available idle token number corresponding to the adjacent server into the available idle token number corresponding to the first service if the available idle token number corresponding to the adjacent server is larger than the available idle token number corresponding to the first service.
The control device provided by the embodiment of the invention can execute the control method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the respective methods and processes described above, for example, control methods.
In some embodiments, the control method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the control method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the control method in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (9)

1. A control method, characterized by comprising:
when receiving target service requests of target quantity, if the utilization rate corresponding to the target service is greater than a threshold corresponding to the target service, acquiring adjacent servers of servers corresponding to the target service, wherein the adjacent servers are servers corresponding to first service, and the first service is different from the target service;
acquiring the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent servers and the number of available idle tokens corresponding to the target service;
Determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request;
Determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request, including:
determining a first quantity according to the number of available idle tokens corresponding to the target service and the target quantity;
if the number of available idle tokens corresponding to the adjacent servers is smaller than the number of available idle tokens corresponding to the first service and the first number is smaller than the number of available idle tokens corresponding to the adjacent servers, determining the adjacent servers as target servers and controlling the adjacent servers to execute target service requests of the target number;
If the first number is smaller than the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server is smaller than the available idle token number corresponding to the first service, and the first number is larger than the available idle token number corresponding to the adjacent server, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the available idle token number corresponding to the adjacent server, and sending probe requests through the adjacent server until the target service requests of the target number are processed;
If the first number is greater than the number of available idle tokens corresponding to the first service, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the number of available idle tokens corresponding to the first service, and sending probe requests through the adjacent server until the target service requests of the target number are processed.
2. The method according to claim 1, further comprising, before acquiring the neighboring server of the server corresponding to the target service if the usage rate corresponding to the target service is greater than the threshold corresponding to the target service:
And determining the utilization rate corresponding to the target service according to the number of tokens in use corresponding to the target service and the total number of tokens.
3. The method of claim 2, wherein if the usage rate corresponding to the target service is greater than the threshold corresponding to the target service, acquiring the neighboring server of the server corresponding to the target service comprises:
If the utilization rate corresponding to the target service is greater than the threshold value corresponding to the target service, releasing the probe request through the server corresponding to the target service;
and receiving feedback information sent by the servers corresponding to the other services, and determining adjacent servers of the servers corresponding to the target service according to the feedback information of the servers corresponding to the other services.
4. A method according to claim 3, wherein the feedback information comprises a feedback time;
Correspondingly, determining the adjacent server of the server corresponding to the target service according to the feedback information of the servers corresponding to other services comprises the following steps:
Determining at least two servers according to feedback information of servers corresponding to other services;
and if at least two servers corresponding to the same service exist in the at least two services, selecting one server from the servers corresponding to the same service as an adjacent server according to the feedback time.
5. The method of claim 1, wherein obtaining the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the neighboring server, and the number of available idle tokens corresponding to the target service comprises:
Acquiring the number of tokens in use corresponding to a first service, the total number of tokens corresponding to the first service, a threshold value corresponding to the first service, the total number of tokens of adjacent servers, the number of tokens in use corresponding to the adjacent servers, the total number of tokens corresponding to target service and the use rate corresponding to the target service;
Determining the number of available idle tokens corresponding to the first service according to the number of tokens in use corresponding to the first service, the total number of tokens corresponding to the first service and a threshold value corresponding to the first service;
determining the number of available idle tokens corresponding to the adjacent server according to the total number of tokens of the adjacent server and the number of tokens in use corresponding to the adjacent server;
And determining the number of available idle tokens corresponding to the target service according to the total number of tokens corresponding to the target service and the utilization rate corresponding to the target service.
6. The method as recited in claim 1, further comprising:
if the available idle token number corresponding to the adjacent server is larger than the available idle token number corresponding to the first service, updating the available idle token number corresponding to the adjacent server into the available idle token number corresponding to the first service.
7. A control apparatus, characterized by comprising:
the receiving module is used for acquiring adjacent servers of the servers corresponding to the target service if the utilization rate corresponding to the target service is larger than the threshold value corresponding to the target service when the target service request of the target number is received, wherein the adjacent servers are servers corresponding to the first service, and the first service is different from the target service;
the acquisition module is used for acquiring the number of available idle tokens corresponding to the first service, the number of available idle tokens corresponding to the adjacent server and the number of available idle tokens corresponding to the target service;
The determining module is used for determining a target server according to the target number, the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server and the available idle token number corresponding to the target service, and controlling the target server to execute the target service request;
The determining module is specifically configured to:
determining a first quantity according to the number of available idle tokens corresponding to the target service and the target quantity;
if the number of available idle tokens corresponding to the adjacent servers is smaller than the number of available idle tokens corresponding to the first service and the first number is smaller than the number of available idle tokens corresponding to the adjacent servers, determining the adjacent servers as target servers and controlling the adjacent servers to execute target service requests of the target number;
If the first number is smaller than the available idle token number corresponding to the first service, the available idle token number corresponding to the adjacent server is smaller than the available idle token number corresponding to the first service, and the first number is larger than the available idle token number corresponding to the adjacent server, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the available idle token number corresponding to the adjacent server, and sending probe requests through the adjacent server until the target service requests of the target number are processed;
If the first number is greater than the number of available idle tokens corresponding to the first service, determining the adjacent server as a target server, controlling the adjacent server to execute target service requests corresponding to the number of available idle tokens corresponding to the first service, and sending probe requests through the adjacent server until the target service requests of the target number are processed.
8. An electronic device, the electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the control method of any one of claims 1-6.
9. A computer readable storage medium, characterized in that the computer readable storage medium stores computer instructions for causing a processor to implement the control method of any one of claims 1-6 when executed.
CN202211086112.4A 2022-09-06 Control method, device, equipment and storage medium Active CN115442432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211086112.4A CN115442432B (en) 2022-09-06 Control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211086112.4A CN115442432B (en) 2022-09-06 Control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115442432A CN115442432A (en) 2022-12-06
CN115442432B true CN115442432B (en) 2024-06-07

Family

ID=

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5982780A (en) * 1995-12-28 1999-11-09 Dynarc Ab Resource management scheme and arrangement
US9639397B1 (en) * 2015-03-31 2017-05-02 Amazon Technologies, Inc. Dynamic burst throttling for multi-tenant storage
CN108494703A (en) * 2018-03-08 2018-09-04 腾讯科技(深圳)有限公司 A kind of access frequency control method, device and storage medium
CN108566415A (en) * 2018-03-12 2018-09-21 广东睿江云计算股份有限公司 A kind of Distributed concurrency control method based on web
CN108667744A (en) * 2018-02-26 2018-10-16 华为技术有限公司 Flow control methods and device
CN109194584A (en) * 2018-08-13 2019-01-11 中国平安人寿保险股份有限公司 A kind of flux monitoring method, device, computer equipment 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
CN110245153A (en) * 2019-05-20 2019-09-17 平安银行股份有限公司 Product data processing method, system, computer equipment and storage medium
CN110768913A (en) * 2018-07-27 2020-02-07 华为技术有限公司 Flow control method and device
CN111343102A (en) * 2020-02-03 2020-06-26 ***股份有限公司 Flow rate control method, server-side server, client-side server and system
CN111813513A (en) * 2020-06-24 2020-10-23 中国平安人寿保险股份有限公司 Real-time task scheduling method, device, equipment and medium based on distribution
CN112383585A (en) * 2020-10-12 2021-02-19 广州市百果园网络科技有限公司 Message processing system and method and electronic equipment
WO2021114829A1 (en) * 2020-06-09 2021-06-17 平安科技(深圳)有限公司 Token bucket-based method, device, and system for interface throttling, and readable storage medium

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5982780A (en) * 1995-12-28 1999-11-09 Dynarc Ab Resource management scheme and arrangement
US9639397B1 (en) * 2015-03-31 2017-05-02 Amazon Technologies, Inc. Dynamic burst throttling for multi-tenant storage
CN108667744A (en) * 2018-02-26 2018-10-16 华为技术有限公司 Flow control methods and device
CN108494703A (en) * 2018-03-08 2018-09-04 腾讯科技(深圳)有限公司 A kind of access frequency control method, device and storage medium
CN108566415A (en) * 2018-03-12 2018-09-21 广东睿江云计算股份有限公司 A kind of Distributed concurrency control method based on web
CN110198275A (en) * 2018-03-28 2019-09-03 腾讯科技(深圳)有限公司 A kind of flow control methods, system, server and storage medium
CN110768913A (en) * 2018-07-27 2020-02-07 华为技术有限公司 Flow control method and device
CN109194584A (en) * 2018-08-13 2019-01-11 中国平安人寿保险股份有限公司 A kind of flux monitoring method, device, computer equipment and storage medium
CN109787915A (en) * 2018-12-14 2019-05-21 北京三快在线科技有限公司 Flow control methods, device, electronic equipment and the storage medium of network access
CN110245153A (en) * 2019-05-20 2019-09-17 平安银行股份有限公司 Product data processing method, system, computer equipment and storage medium
CN111343102A (en) * 2020-02-03 2020-06-26 ***股份有限公司 Flow rate control method, server-side server, client-side server and system
WO2021114829A1 (en) * 2020-06-09 2021-06-17 平安科技(深圳)有限公司 Token bucket-based method, device, and system for interface throttling, and readable storage medium
CN111813513A (en) * 2020-06-24 2020-10-23 中国平安人寿保险股份有限公司 Real-time task scheduling method, device, equipment and medium based on distribution
CN112383585A (en) * 2020-10-12 2021-02-19 广州市百果园网络科技有限公司 Message processing system and method and electronic equipment

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Logistic Support Architecture with Petri Net Design in Cloud Environment for Services and Profit Optimization;Fuu-Cheng Jiang等;《IEEE Transactions on Services Computing》;20160208;第10卷(第6期);全文 *
一种控制网关流量的控制器设计;刘罗仁等;《重庆科技学院学报(自然科学版)》;20080430;全文 *
一种新的令牌传递算法;孙献璞, 张艳玲;西安邮电学院学报;20050415(02);全文 *
基于微服务的银行统一用户管理***的设计与实现;王川;《中国优秀硕士学位论文全文数据库 信息科技辑》;20220315;全文 *

Similar Documents

Publication Publication Date Title
CN111190745B (en) Data processing method, device and computer readable storage medium
CN112559182B (en) Resource allocation method, device, equipment and storage medium
CN115421922A (en) Current limiting method, device, equipment, medium and product of distributed system
CN112615795A (en) Flow control method and device, electronic equipment, storage medium and product
CN115442432B (en) Control method, device, equipment and storage medium
CN113992586A (en) Flow control method and device, computer equipment and storage medium
CN116661960A (en) Batch task processing method, device, equipment and storage medium
CN116594563A (en) Distributed storage capacity expansion method and device, electronic equipment and storage medium
CN115952054A (en) Simulation task resource management method, device, equipment and medium
CN115442432A (en) Control method, device, equipment and storage medium
CN114785739A (en) Method, device, equipment and medium for controlling service quality of logical volume
CN114090247A (en) Method, device, equipment and storage medium for processing data
CN113992760B (en) Method, device, equipment and storage medium for scheduling back source traffic
CN114598705B (en) Message load balancing method, device, equipment and medium
CN114610575B (en) Method, apparatus, device and medium for calculating updated peak value of branch
CN117591249A (en) Transaction processing method, device, electronic equipment and storage medium
CN116361008A (en) Task balanced distribution method, device, equipment and medium based on electric power Internet of things
CN117634825A (en) Dynamic resource allocation method and device
CN117743300A (en) Service processing method, device, equipment and medium
CN116801001A (en) Video stream processing method and device, electronic equipment and storage medium
CN115967677A (en) Flow control method, device and equipment for service call and storage medium
CN117519940A (en) Process scheduling method and device, electronic equipment and storage medium
CN117793188A (en) Resource flow limiting method, device, system, equipment and storage medium
CN116233010A (en) Flow control method, device, equipment and storage medium
CN117555830A (en) Flow control method, device, chip and storage medium

Legal Events

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