CN110175079B - Request queue scheduling method, system, readable storage medium and computer equipment - Google Patents
Request queue scheduling method, system, readable storage medium and computer equipment Download PDFInfo
- Publication number
- CN110175079B CN110175079B CN201910388398.3A CN201910388398A CN110175079B CN 110175079 B CN110175079 B CN 110175079B CN 201910388398 A CN201910388398 A CN 201910388398A CN 110175079 B CN110175079 B CN 110175079B
- Authority
- CN
- China
- Prior art keywords
- scheduling
- request
- request queue
- queue
- free space
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Storage Device Security (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a request queue scheduling method, a system, a readable storage medium and computer equipment, wherein the method comprises the following steps: receiving a scheduling request initiated by a caller, wherein the scheduling request carries a ciphertext; a decryptor is called by the scheduling server to decrypt the ciphertext to obtain a plaintext; acquiring all request queues with free spaces in a request queue list from a scheduling server, wherein the scheduling server is used for maintaining data interaction between a decryptor and the request queue list; and if at least two request queues with free space exist, acquiring the request queue with the shortest scheduling time consumption as the current request queue. The invention can solve the problem that the existing micro-service cannot continue to be served when the request calling process reaches the maximum limit request quantity, and meets the actual application requirements.
Description
Technical Field
The present invention relates to the field of computers, and in particular, to a method, a system, a readable storage medium, and a computer device for scheduling request queues.
Background
One of the microservice architectures is an emerging software architecture style, and aims to develop individual microservices which are independently deployed, and to cooperate through communication among the services to complete the functions of the system. Each service can be developed by different technologies and different languages, and meanwhile, the services are componentized, loosely coupled and easy to maintain and integrate.
In the request calling process of the micro-service, a real-time synchronization mechanism is generally adopted for processing, when the maximum limit request amount is reached, the service cannot be continued, and in a real service scene, the request needs to be buffered sometimes, and the service is continuously executed after the service is idle instead of being directly returned to reject the service.
Disclosure of Invention
In order to solve the above problems, an object of the present invention is to provide a method, a system, a readable storage medium, and a computer device for scheduling a request queue, which can solve the problem that the existing micro service cannot continue to be serviced when the request calling process reaches the maximum limit request amount.
The request queue scheduling method provided by the invention comprises the following steps:
receiving a scheduling request initiated by a caller, wherein the scheduling request carries a ciphertext;
a decryptor is called by the scheduling server to decrypt the ciphertext to obtain a plaintext;
acquiring all request queues with free spaces in a request queue list from a scheduling server, wherein the scheduling server is used for maintaining data interaction between a decryptor and the request queue list;
and if at least two request queues with free space exist, acquiring the request queue with the shortest scheduling time consumption as the current request queue.
According to the request queue scheduling method provided by the invention, the scheduling server calls the decryptor to decrypt the ciphertext carried in the scheduling request to obtain the plaintext, so that the scheduling server can conveniently obtain the scheduling information carried in the scheduling request according to the plaintext, and further determine all the request alignment columns with the free space which meet the requirement and the legality of the scheduling information; the data interaction between the maintenance decryptor and the request queue list is carried out through the scheduling server, when at least two request queues with free space exist, the request queue with the shortest time consumption is obtained and is used as the current request queue, so that the time consumption for calling is shortest, the calling efficiency is improved, meanwhile, in the process of calling the request, the task scheduling can be carried out according to the time of the request, the scheduling information and the size of the free space of each request queue, and the problem that the service cannot be continued when the existing request calling process with micro service reaches the maximum limit request amount is solved.
In addition, the request queue scheduling method according to the present invention may further have the following additional technical features:
further, the step of obtaining the request queue with the shortest scheduling time includes:
acquiring a historical scheduling record of each request queue with the free space in a preset time range;
calculating the scheduling capability of each request queue with the free space according to the historical scheduling record of each request queue with the free space;
and calculating the time for each request queue with the free space to execute the scheduling request according to the scheduling capability of each request queue with the free space and the scheduling amount to be executed, and further acquiring the request queue with the shortest scheduling time consumption as the current request queue.
Further, the step of obtaining the execution queue with the shortest scheduling time includes:
acquiring all processing records of each request queue with the free space in a preset time range;
calculating the average consumed time of each request queue with the free space, and taking the average consumed time as a weight value of the request queue;
and taking the request queue with the highest weight value as the request queue with the shortest scheduling time consumption, and taking the request queue as the current request queue.
Further, the step of receiving a scheduling request initiated by a caller, where the scheduling request carries a ciphertext includes:
when an https request is received, a unique 32-bit or 36-bit UUID string and a millisecond string of request time are generated by a gateway, and the UUID string and the millisecond string are operated to form a text string of the https request.
Further, before the step of generating, by the gateway, a unique 32-bit or 36-bit UUID string and a millisecond digit string of the request time when receiving an https request, the method further comprises:
and performing parameter configuration and storage space initialization processing on each request queue of the request pair list in a preset database.
Further, the step of decrypting the ciphertext by calling a decryptor through the dispatch server to obtain the plaintext includes:
the scheduling server remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the decryptor to obtain a decrypted text character string;
and the scheduling server acquires the decrypted text character string through an adb command.
Further, after the step of obtaining the decrypted text string through the adb command by the scheduling server, the method further includes:
judging whether task scheduling parameters carried by the text character strings are all larger than configuration parameters;
if so, generating first prompt information for displaying, wherein the first prompt information is used for prompting a user that task calling exceeds an upper limit;
and if not, inserting the text character string into a request queue with the shortest scheduling time consumption, and after the scheduling server monitors the completion event, scanning the uncompleted requests in the request queue again to perform the next task.
Another embodiment of the present invention provides a request queue scheduling system, which solves the problem that the existing micro-service cannot continue to serve when the request calling process reaches the maximum limit request amount, and improves the satisfaction of the user task scheduling experience.
The request queue scheduling system according to the embodiment of the invention comprises:
the receiving module is used for receiving a scheduling request initiated by a caller, wherein the scheduling request carries a ciphertext;
the scheduling module is used for calling a decryptor to decrypt the ciphertext through the scheduling server so as to obtain a plaintext;
the acquisition module is used for acquiring all request queues with free spaces in a request queue list from a scheduling server, and the scheduling server is used for maintaining data interaction between the decryptor and the request queue list;
and the determining module is used for acquiring the request queue with the shortest scheduling time consumption as the current request queue if at least two request queues with free space exist.
Another embodiment of the invention also proposes a storage medium on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
Another embodiment of the present invention also proposes a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the above method when executing the program.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a request queue scheduling method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a request queue scheduling method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a request queue scheduling system according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a method for scheduling a request queue according to a first embodiment of the present invention includes steps S101 to S104:
step S101, receiving a scheduling request initiated by a caller, wherein the scheduling request carries a ciphertext.
The request queue scheduling method provided in this embodiment is applied to a scheduling server in a scheduling system, that is, a scheduling server of an execution subject, where the scheduling server receives a scheduling request initiated by a caller.
In specific implementation, before the dispatch server receives a dispatch request initiated by a caller, the dispatch system needs to be initialized, which specifically includes the following steps:
1) a scheduling server is created.
2) And creating a request pair list, which is used for performing parameter configuration and storage space initialization processing on each request queue of the request pair list in a preset database, such as a space threshold of each request queue and a time threshold for executing scheduling requests.
3) And creating an encryptor, wherein the encryptor is used for generating a unique 32-bit or 36-bit UUID character string and a millisecond digit string of request time through a gateway when receiving an https request, and operating the UUID character string and the millisecond digit string to form a text character string of the https request so as to improve the reliability of scheduling information carried in the scheduling request.
4) A decryptor is created.
5) A channel is created for the scheduling server to complete the event and associated with the list of request pairs.
6) And starting a completion event channel monitor, and monitoring the completion event of the maintainer in real time, wherein the completion event is essentially a coroutine or thread for circulation.
After the initialization of the dispatching system is completed, the dispatching server receives a dispatching request task initiated by a caller, and the specific steps are as follows:
1) the caller initiates a scheduling request through a function (method) provided by the scheduling system;
2) the request is firstly received by the scheduling server;
3) the dispatch server places the request into a request queue (typically a save function that calls the request queue);
4) and the request queue stores requests (the request queue needs to make a synchronous lock, lock the array, request the array and then unlock) and completes the receiving of the scheduling request.
And step S102, a decryptor is called by the scheduling server to decrypt the ciphertext to obtain a plaintext.
The scheduling server remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the decryptor to obtain a decrypted text character string;
and the scheduling server acquires the decrypted text character string through an adb command.
Although the script execution mode of different systems is different, different operating systems, such as linux, windows, macOX systems and the like, can be adapted through conditional compilation.
It can be understood that the cryptograph is decrypted by the decryptor, so that the scheduling server can conveniently acquire the scheduling information carried in the scheduling request according to the plaintext, and further determine all the required request alignments with the free space and the legality of the scheduling information.
Step S103, all the request queues with free space in the request queue list are obtained from the scheduling server, and the scheduling server is used for maintaining data interaction between the decryptor and the request queue list.
Among them, all request queues of a request pair list in a scheduling server generally have two states, namely an idle state and a working state. And the scheduling server acquires the request queues with free space in all the request queues.
And step S104, if at least two request queues with free space exist, acquiring the request queue with the shortest scheduling time consumption as the current request queue.
As described above, the data interaction between the maintenance decryptor and the request queue list is carried out through the scheduling server, when at least two request queues with free space exist, the request queue with the shortest time consumption is obtained and is used as the current request queue, so that the time consumption for calling is shortest, the calling efficiency is improved, meanwhile, in the process of calling the request, the task scheduling can be carried out according to the time of the request, the scheduling information and the size of the free space of each request queue, and the problem that the existing micro-service request calling process cannot continue to serve when the maximum limit request quantity is reached is solved.
The scheduling server obtains the request queue with the shortest scheduling time from the at least two request queues with free space, and uses the request queue as the current request queue, wherein the following two implementation modes can be adopted:
the first method comprises the following steps:
acquiring a historical scheduling record of each request queue with the free space in a preset time range;
calculating the scheduling capability of each request queue with the free space according to the historical scheduling record of each request queue with the free space;
and calculating the time for each request queue with the free space to execute the scheduling request according to the scheduling capability of each request queue with the free space and the scheduling amount to be executed, and further acquiring the request queue with the shortest scheduling time consumption as the current request queue.
And the second method comprises the following steps:
acquiring all processing records of each request queue with the free space in a preset time range;
calculating the average consumed time of each request queue with the free space, and taking the average consumed time as a weight value of the request queue;
and taking the request queue with the highest weight value as the request queue with the shortest scheduling time consumption, and taking the request queue as the current request queue.
It should be noted that, in other embodiments of the present invention, if the scheduling amount of the current request queue has reached the upper limit, it is determined whether the remaining space of the scheduling amount of the current request queue within a preset time period is greater than or equal to the scheduling information carried in the scheduling request, if not, an error timeout information is returned, and the request queue with the shortest average time consumption and having a free space is used as the request queue of the scheduling request. It can be understood that the scheduling time of the scheduling request may be scheduled according to a first-in first-out sequence, and may also be scheduled according to a first-in last-out sequence, which is not limited herein, and the user may adjust the scheduling time according to the actual requirement.
According to the request queue scheduling method provided by the invention, corresponding storage space is allocated to the users according to the request service time of the users of the same level, so that the actual throughput of the users is adjusted by adjusting the storage space, the throughput error among the users of the same level is reduced, and the service quality among the users of the same level is ensured; the processing cost of the repeated data blocks among the users in different levels is shared among the users in different levels, so that the processing cost of the data blocks among the users in different levels is accurately shared among the users in different levels, the relative fairness of the service of each level of user is ensured, and the actual application requirements are met.
Referring to fig. 2, the request queue scheduling method in the second embodiment includes steps S201 to S206.
Step S201, receiving a scheduling request initiated by a caller, wherein the scheduling request carries a ciphertext.
And step S202, the scheduling server remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the decryptor to obtain a decrypted text character string.
Step S203, the dispatch server obtains the decrypted text string through an adb command.
Step S204, determining whether all task scheduling parameters carried by the text string are greater than configuration parameters, if so, executing step S205, and if not, executing step S206.
Step S205, generating and displaying first prompt information, wherein the first prompt information is used for prompting a user that task calling exceeds an upper limit;
step S206, inserting the text character string into the request queue with the shortest scheduling time consumption, and after the scheduling server monitors the completion event, scanning the uncompleted request in the request queue again to perform the next task.
On the basis of the second embodiment, the method and the device have the effects of the first embodiment, can perform real-time monitoring and early warning on the scheduling state, facilitate manual intervention on the scheduling request by a user according to the actual scheduling state and the early warning information, and improve the satisfaction degree of task scheduling experience of the user.
It should be noted that the present embodiment focuses on differences from the previous embodiment, similar parts between the embodiments are not repeatedly described, and may refer to each other, and technical features between the embodiments may be selectively combined according to a conventional technical means of a person skilled in the art.
As a specific embodiment, the variable Key of the queue to be requested is taken as waiting _ size and set to 100, the size of the current request queue is set to 100, the variable Key is taken as executing _ size, the timeout time of the request queue is configured to be 60 seconds, the variable Key is taken as waiting _ timeout and stored in the REDIS database;
when receiving an https request sent by a client, generating a unique 32-bit or 36-bit UUID character string as a part of a text character string, simultaneously assembling a UUID + request time millisecond digit string, and inserting a request line queue of a REDIS database, wherein the queue name of the REDIS database is waiting _ list;
obtaining whether the size of the queue waiting _ list of the current request exceeds the preset waiting _ size of the queue to be requested or not through REDIS, if so, directly returning to prompt that the request number is full load, otherwise, continuing;
obtaining whether the size of the current execution queue executing _ list exceeds the preset executing _ size or not through REDIS, if so, continuing to wait until the length of the executing _ list is smaller than the preset executing _ size, and if the waiting time exceeds the preset waiting _ timeout value, returning an exception, prompting that the request is overtime, and not successfully processing the request;
removing data with Key of UUID + request time from a current execution queue executing _ list when a request task is finished;
in addition, a user can provide a data interface by inquiring data of a queue to be requested and a current request queue in REDIS on a management platform, and interact with a page through AJAX to develop a corresponding request monitoring management page for visual monitoring.
Referring to fig. 3, based on the same inventive concept, a request queue scheduling system according to a third embodiment of the present invention includes:
the receiving module 10 is configured to receive a scheduling request initiated by a caller, where the scheduling request carries a ciphertext.
Specifically, parameter configuration and storage space initialization processing are carried out on each request queue of the request pair list in a preset database; when an https request is received, a unique 32-bit or 36-bit UUID string and a millisecond string of request time are generated by a gateway, and the UUID string and the millisecond string are operated to form a text string of the https request.
And the scheduling module 20 is configured to invoke a decryptor to decrypt the ciphertext through the scheduling server to obtain a plaintext.
In this embodiment, the scheduling module 20 includes:
the decryption unit 21 is configured to remotely invoke a decryption command of a corresponding decryptor through conditional compilation by the scheduling server, so as to decrypt the ciphertext through the decryptor to obtain a decrypted text string;
a first obtaining unit 22, configured to obtain the decrypted text string through an adb command by the scheduling server.
In this embodiment, the obtaining unit 22 is further configured to determine whether task scheduling parameters carried by the text strings are all greater than configuration parameters; if so, generating first prompt information for displaying, wherein the first prompt information is used for prompting a user that task calling exceeds an upper limit; and if not, inserting the text character string into a request queue with the shortest scheduling time consumption, and after the scheduling server monitors the completion event, scanning the uncompleted requests in the request queue again to perform the next task.
An obtaining module 30, configured to obtain all request queues having free spaces in a request queue table from a scheduling server, where the scheduling server is configured to maintain data interaction between the decryptor and the request queue table.
And the determining module 40 is configured to, if there are at least two request queues with free space, obtain a request queue with the shortest scheduling time consumption, and use the request queue as the current request queue.
In this embodiment, the determining module 40 includes: a first determination submodule 41 and a second determination submodule 42.
The first determination submodule 41 includes:
a second obtaining unit 411, configured to obtain a historical schedule record of each request queue having a free space within a preset time range.
The first calculating unit 412 is configured to calculate a scheduling capability of each request queue with free space according to the historical scheduling record of each request queue with free space.
The first determining unit 413 is configured to calculate, according to the scheduling capability of each request queue with a free space and the amount of scheduling to be performed, a time for each request queue with a free space to perform the scheduling request, and further obtain a request queue with the shortest scheduling time consumption, and use the request queue as the current request queue.
The second determination submodule 42 includes:
a third obtaining unit 421, configured to obtain all processing records of each request queue with free space in a preset time range.
A second calculating unit 422, configured to calculate an average consumed time of each request queue having an empty space, and use the average consumed time as a weight value of the request queue;
the second determining unit 423 is configured to use the request queue with the highest weight value as the request queue with the shortest scheduling time consumption, and use the request queue as the current request queue.
According to the request queue scheduling method provided by the invention, the scheduling server calls the decryptor to decrypt the ciphertext carried in the scheduling request to obtain the plaintext, so that the scheduling server can conveniently obtain the scheduling information carried in the scheduling request according to the plaintext, and further determine all the request alignment columns with the free space which meet the requirement and the legality of the scheduling information; the data interaction between the maintenance decryptor and the request queue list is carried out through the scheduling server, when at least two request queues with free space exist, the request queue with the shortest time consumption is obtained and is used as the current request queue, so that the time consumption for calling is shortest, the calling efficiency is improved, meanwhile, in the process of calling the request, the task scheduling can be carried out according to the time of the request, the scheduling information and the size of the free space of each request queue, and the problem that the service cannot be continued when the existing request calling process with micro service reaches the maximum limit request amount is solved.
The technical features and technical effects of the request queue scheduling system provided by the embodiment of the present invention are the same as those of the method provided by the embodiment of the present invention, and are not described herein again.
Furthermore, an embodiment of the present invention also proposes a storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
Furthermore, an embodiment of the present invention also provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the above method when executing the program.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims (9)
1. A method for scheduling request queues, the method comprising the steps of:
receiving a micro-service scheduling request initiated by a caller through a function provided by a scheduling system, wherein the micro-service scheduling request carries a ciphertext; the micro service scheduling request comprises an https request, the ciphertext is a unique 32-bit or 36-bit UUID character string and a millisecond numeric character string of request time, which are generated through a gateway, and the UUID character string and the millisecond numeric character string are operated to form a text character string of the https request;
a decryptor is called by the scheduling server to decrypt the ciphertext to obtain a plaintext;
acquiring all request queues with free spaces in a request queue list from a scheduling server, wherein the scheduling server is used for maintaining data interaction between a decryptor and the request queue list;
if at least two request queues with free space exist, acquiring the request queue with the shortest scheduling time consumption as the current request queue;
and if the scheduling amount of the current request queue reaches the upper limit, judging whether the residual space of the scheduling amount of the current request queue in a preset time period is larger than or equal to the scheduling information carried in the micro-service scheduling request, if not, returning error overtime information, and taking the request queue with the shortest average time consumption and free space as the request queue of the micro-service scheduling request.
2. The method according to claim 1, wherein the step of obtaining the request queue with the shortest scheduling time comprises:
acquiring a historical scheduling record of each request queue with the free space in a preset time range;
calculating the scheduling capability of each request queue with the free space according to the historical scheduling record of each request queue with the free space;
and calculating the time for each request queue with the free space to execute the micro-service scheduling request according to the scheduling capability of each request queue with the free space and the scheduling amount to be executed, and further acquiring the request queue with the shortest scheduling time consumption as the current request queue.
3. The method according to claim 1, wherein the step of obtaining the execution queue with the shortest scheduling time comprises:
acquiring all processing records of each request queue with the free space in a preset time range;
calculating the average consumed time of each request queue with the free space, and taking the average consumed time as a weight value of the request queue;
and taking the request queue with the highest weight value as the request queue with the shortest scheduling time consumption, and taking the request queue as the current request queue.
4. The method of claim 1, wherein the step of generating a unique 32-bit or 36-bit UUID string and a millisecond string of request time by the gateway when receiving an https request is preceded by the method further comprising:
and performing parameter configuration and storage space initialization processing on each request queue of the request pair list in a preset database.
5. The method for scheduling request queue according to claim 1, wherein the step of decrypting the ciphertext by the scheduling server invoking a decryptor to obtain plaintext comprises:
the scheduling server remotely calls a decryption command of a corresponding decryptor through conditional compilation so as to decrypt the ciphertext through the decryptor to obtain a decrypted text character string;
and the scheduling server acquires the decrypted text character string through an adb command.
6. The method for scheduling request queue according to claim 5, wherein after the step of obtaining the decrypted text string by the scheduling server through an adb command, the method further comprises:
judging whether task scheduling parameters carried by the text character strings are all larger than configuration parameters;
if so, generating first prompt information for displaying, wherein the first prompt information is used for prompting a user that task calling exceeds an upper limit;
and if not, inserting the text character string into a request queue with the shortest scheduling time consumption, and after the scheduling server monitors the completion event, scanning the uncompleted requests in the request queue again to perform the next task.
7. A request queue scheduling system, the system comprising:
the receiving module is used for receiving a micro-service scheduling request initiated by a caller, wherein the micro-service scheduling request carries a ciphertext; the micro service scheduling request comprises an https request, the ciphertext is a unique 32-bit or 36-bit UUID character string and a millisecond numeric character string of request time, which are generated through a gateway, and the UUID character string and the millisecond numeric character string are operated to form a text character string of the https request;
the scheduling module is used for calling the decryptor to decrypt the ciphertext through the scheduling server so as to obtain a plaintext;
the acquisition module is used for acquiring all request queues with free spaces in a request queue list from a scheduling server, and the scheduling server is used for maintaining data interaction between the decryptor and the request queue list;
the determining module is used for acquiring the request queue with the shortest scheduling time consumption as the current request queue if at least two request queues with free space exist;
and if the scheduling amount of the current request queue reaches the upper limit, judging whether the residual space of the scheduling amount of the current request queue in a preset time period is larger than or equal to the scheduling information carried in the micro-service scheduling request, if not, returning error overtime information, and taking the request queue with the shortest average time consumption and free space as the request queue of the micro-service scheduling request.
8. A readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910388398.3A CN110175079B (en) | 2019-05-10 | 2019-05-10 | Request queue scheduling method, system, readable storage medium and computer equipment |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910388398.3A CN110175079B (en) | 2019-05-10 | 2019-05-10 | Request queue scheduling method, system, readable storage medium and computer equipment |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN110175079A CN110175079A (en) | 2019-08-27 |
| CN110175079B true CN110175079B (en) | 2021-11-09 |
Family
ID=67690739
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910388398.3A Active CN110175079B (en) | 2019-05-10 | 2019-05-10 | Request queue scheduling method, system, readable storage medium and computer equipment |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN110175079B (en) |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103605568A (en) * | 2013-10-29 | 2014-02-26 | 北京奇虎科技有限公司 | Multithread management method and device |
| CN105162884A (en) * | 2015-09-25 | 2015-12-16 | 浪潮(北京)电子信息产业有限公司 | Cloud management platform based on micro-service architecture |
| CN105763331A (en) * | 2014-12-19 | 2016-07-13 | 北大方正集团有限公司 | Data encryption method, device, data decryption method and device |
| CN106487594A (en) * | 2016-10-31 | 2017-03-08 | 中国人民解放军91655部队 | Network traffics collection based on micro services assembly and analysis system |
| CN106909467A (en) * | 2017-02-28 | 2017-06-30 | 郑州云海信息技术有限公司 | A kind of distributed transaction processing method based on micro services framework |
| WO2018199817A1 (en) * | 2017-04-24 | 2018-11-01 | Telefonaktiebolaget Lm Ericsson (Publ) | Message queue performance monitoring |
| CN109561147A (en) * | 2018-11-30 | 2019-04-02 | 武汉烽火信息集成技术有限公司 | A kind of isomery cloud management method and system, isomery cloud management system constituting method |
| CN109673164A (en) * | 2017-08-16 | 2019-04-23 | 北京嘀嘀无限科技发展有限公司 | It is a kind of for handling the method and system of transport request |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9792449B2 (en) * | 2012-05-31 | 2017-10-17 | Fleur De Lis Group, Llc | Cryptic notes and related methods |
| CN106250199B (en) * | 2016-07-26 | 2019-06-21 | 北京北森云计算股份有限公司 | A kind of the dynamic micro services call method and device of multilingual cloud compiling |
| US11080271B2 (en) * | 2016-09-09 | 2021-08-03 | Sap Se | Global database transaction management service |
| CN109491801B (en) * | 2018-09-27 | 2024-06-25 | 平安科技(深圳)有限公司 | Micro-service access scheduling method, micro-service access scheduling device, medium and electronic equipment |
-
2019
- 2019-05-10 CN CN201910388398.3A patent/CN110175079B/en active Active
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103605568A (en) * | 2013-10-29 | 2014-02-26 | 北京奇虎科技有限公司 | Multithread management method and device |
| CN105763331A (en) * | 2014-12-19 | 2016-07-13 | 北大方正集团有限公司 | Data encryption method, device, data decryption method and device |
| CN105162884A (en) * | 2015-09-25 | 2015-12-16 | 浪潮(北京)电子信息产业有限公司 | Cloud management platform based on micro-service architecture |
| CN106487594A (en) * | 2016-10-31 | 2017-03-08 | 中国人民解放军91655部队 | Network traffics collection based on micro services assembly and analysis system |
| CN106909467A (en) * | 2017-02-28 | 2017-06-30 | 郑州云海信息技术有限公司 | A kind of distributed transaction processing method based on micro services framework |
| WO2018199817A1 (en) * | 2017-04-24 | 2018-11-01 | Telefonaktiebolaget Lm Ericsson (Publ) | Message queue performance monitoring |
| CN109673164A (en) * | 2017-08-16 | 2019-04-23 | 北京嘀嘀无限科技发展有限公司 | It is a kind of for handling the method and system of transport request |
| CN109561147A (en) * | 2018-11-30 | 2019-04-02 | 武汉烽火信息集成技术有限公司 | A kind of isomery cloud management method and system, isomery cloud management system constituting method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110175079A (en) | 2019-08-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107767080B (en) | Bank outlet service resource scheduling method and device | |
| CN108052384B (en) | Task processing method, service platform and electronic equipment | |
| US6947988B1 (en) | Method and apparatus for allocating resources of a contact center | |
| US20060167729A1 (en) | Method and system for scheduling a customer service callback | |
| CN105306808B (en) | video image distribution method | |
| US20120185593A1 (en) | License redistributing method, moderator and license controlling system thereof | |
| CN113327139B (en) | Task allocation method, device, electronic equipment, storage medium and program product | |
| CN110753161A (en) | Voice outbound scheduling method, device, computer equipment and storage medium | |
| CN109902103A (en) | Service data management method, device, equipment and computer readable storage medium | |
| CN110191140B (en) | Service processing method and device and server | |
| US20080163233A1 (en) | Method and apparatus for service load consolidation, and computer product | |
| CN112465615A (en) | Bill data processing method, device and system | |
| CN111262909A (en) | Large-screen information display method, device, equipment and storage medium | |
| CN110175079B (en) | Request queue scheduling method, system, readable storage medium and computer equipment | |
| CN105635124A (en) | Flow control method and device | |
| FR3069350A1 (en) | SECURE PRINTING SERVICE VIA A COMMUNICATION NETWORK ON ANY PRINTING EQUIPMENT BELONGING TO A GROUP OF INDEPENDENT PRINTING EQUIPMENTS | |
| US20190109945A1 (en) | Technologies for managing unresolved customer interactions | |
| CN117592677A (en) | Customer service resource scheduling method and electronic equipment | |
| CN109840073B (en) | Method and device for realizing business process | |
| CN117093439A (en) | Method, device, electronic equipment and storage medium for capacity data processing | |
| CN112561620A (en) | Target order reminding method and device, electronic equipment and computer storage medium | |
| CN103685776A (en) | Method and device for processing call | |
| US20070140468A1 (en) | Method and system for scheduling resources in customer contact centers | |
| JP5395305B1 (en) | Server device, program and reservation system | |
| CN112187614B (en) | Information interaction method and device |
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 |