CN110515749B - Method, device, server and storage medium for queue scheduling of information transmission - Google Patents
Method, device, server and storage medium for queue scheduling of information transmission Download PDFInfo
- Publication number
- CN110515749B CN110515749B CN201910818326.8A CN201910818326A CN110515749B CN 110515749 B CN110515749 B CN 110515749B CN 201910818326 A CN201910818326 A CN 201910818326A CN 110515749 B CN110515749 B CN 110515749B
- Authority
- CN
- China
- Prior art keywords
- queue
- issued
- tasks
- sub
- sending
- 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; CALCULATING OR 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
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a method, a device, a server and a storage medium for scheduling a queue for information transmission. The method for scheduling the queue for information transmission comprises the following steps: acquiring the number of tasks to be issued of the tasks to be issued; matching a quantity threshold value based on the number of the tasks to be issued; and sending the tasks to be issued to the message queues corresponding to the quantity threshold. The task to be issued with different task numbers is sent to different message queues, so that the effect of reducing the waiting time for issuing the task is achieved.
Description
Technical Field
The embodiment of the invention relates to the technical field of information processing, in particular to a method, a device, a server and a storage medium for scheduling a queue for information transmission.
Background
With the rapid development of the internet, how to rapidly process information is more and more important.
Currently, sending a message or a task is to submit the task to a message queue and then to send the task through the message queue. The message queue follows the principle of first-in first-out and is issued according to the order of submitting the messages into the message queue. Because the message queue follows the first-in first-out principle, a task submitted later can be issued only after the previous task is issued.
However, when a large number of tasks need to be issued, for example, a large number of coupons are issued by performing a large campaign, there is a problem that the issuing waiting time is too long.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a server and a storage medium for scheduling a queue for information transmission, so as to achieve the effect of reducing the waiting time for task issuing.
In a first aspect, an embodiment of the present invention provides a method for scheduling a queue for information transmission, including:
acquiring the number of tasks to be issued of the tasks to be issued;
matching a quantity threshold value based on the number of the tasks to be issued;
and sending the tasks to be issued to the message queues corresponding to the quantity threshold.
Optionally, the number threshold includes a first number threshold and a second number threshold, the message queue includes a first message queue and a second message queue, the first number threshold corresponds to the first message queue, the second number threshold corresponds to the second message queue, and the sending the to-be-sent task to the message queue corresponding to the number threshold includes:
if the number of the tasks to be issued is matched with the first number threshold, sending the tasks to be issued to the first message queue;
and if the number of the tasks to be issued is matched with the second number threshold, sending the tasks to be issued to the second message queue.
Optionally, before sending the task to be issued to the message queue corresponding to the number threshold, the method includes:
receiving the quantity threshold value input by the user and the message queue corresponding to the quantity threshold value.
Optionally, the first message queue and/or the second message queue includes at least one sub-queue.
Optionally, the sending the task to be sent to the first message queue includes:
judging whether the number of first subtasks in the first sub queue is larger than an upper limit threshold value or not;
if the number of the first subtasks in the first sub queue is not larger than an upper limit threshold, sending the tasks to be issued to the first sub queue;
and if the number of the first sub tasks in the first sub queue is greater than an upper limit threshold value, sending the tasks to be issued to the second sub queue.
Optionally, the sending the to-be-issued task to the message queue corresponding to the quantity threshold includes:
acquiring the number of first subtasks of the first sub queue;
acquiring the number of second subtasks of the second sub queue;
judging the size of the first subtask number of the first sub queue and the second subtask number of the second sub queue;
if the number of the first subtasks of the first sub queue is larger than the number of the second subtasks of the second sub queue, sending the tasks to be issued to the second sub queue;
and if the number of the first subtasks of the first sub queue is not greater than the number of the second subtasks of the second sub queue, sending the tasks to be issued to the first sub queue.
Optionally, the task to be issued is a coupon issuing task.
In a second aspect, an embodiment of the present invention provides an apparatus for scheduling a queue for information transmission, including:
the acquisition module is used for acquiring the number of the tasks to be issued;
the matching module is used for matching a quantity threshold value based on the quantity of the tasks to be issued;
and the sending module is used for sending the tasks to be issued to the message queues corresponding to the quantity threshold.
In a third aspect, an embodiment of the present invention provides a server, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, the one or more programs cause the one or more processors to implement a method for queue scheduling for information transmission according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for queue scheduling of information transmission according to any embodiment of the present invention.
The embodiment of the invention obtains the number of the tasks to be issued; matching a quantity threshold value based on the number of the tasks to be issued; and sending the task to be issued to the message queue corresponding to the quantity threshold, solving the problem of overlong issuing waiting time caused by overlarge quantity of tasks, and realizing the effect of reducing the task issuing waiting time.
Drawings
Fig. 1 is a flowchart illustrating a method for queue scheduling of information transmission according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a method for queue scheduling of information transmission according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for queue scheduling of information transmission according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the steps as a sequential process, many of the steps can be performed in parallel, concurrently or simultaneously. In addition, the order of the steps may be rearranged. A process may be terminated when its operations are completed, but may have additional steps not included in the figure. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
Furthermore, the terms "first," "second," and the like may be used herein to describe various orientations, actions, steps, or elements, but the orientations, actions, steps, or elements are not limited by these terms. These terms are only used to distinguish one direction, action, step or element from another direction, action, step or element. For example, the first speed difference may be referred to as a second speed difference, and similarly, the second speed difference may be referred to as a first speed difference, without departing from the scope of the present application. The first speed difference and the second speed difference are both speed differences, but they are not the same speed difference. The terms "first", "second", etc. are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "plurality", "batch" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Example one
Fig. 1 is a schematic flowchart of a method for scheduling a queue for information transmission according to an embodiment of the present invention, which is applicable to a scenario in which tasks to be transmitted are scheduled to different message queues according to the number of the tasks to be transmitted.
As shown in fig. 1, a method for scheduling a queue for information transmission according to an embodiment of the present invention includes:
and S110, acquiring the number of the tasks to be issued.
The task to be issued refers to a task which is not submitted to the message queue but needs to be issued. Specifically, the task to be issued may include a message, data, and the like, which is not limited herein. The number of tasks to be issued refers to the number of tasks to be issued. Illustratively, during a large event, coupons need to be issued to users to stimulate a desire to consume. Issuing the coupon is the task to be issued in this embodiment. In the task of issuing the coupon, the coupon needs to be issued to 10 thousands of users, and then the 10 thousands are the number of tasks to be issued in this embodiment. Optionally, the task to be issued is a coupon issuing task.
And S120, matching a quantity threshold value based on the quantity of the tasks to be issued.
The number threshold is a threshold set in advance, and the number threshold is plural. And scheduling the message queues of the tasks to be issued with different numbers of the tasks to be issued by matching the number threshold. Scheduling refers to submitting the tasks to be issued to the corresponding message queues. Specifically, the quantity threshold may be a specific value, such as 10 ten thousand; a range of values is also possible, such as 0 to 1 ten thousand, 1 ten thousand to 10 ten thousand, where the threshold number is not specifically limited. Matching refers to satisfying a quantity threshold. When the quantity threshold is a specific numerical value, then the match may be greater than the quantity threshold; or may be smaller than the number threshold, which is not limited herein and may be set as needed. When the quantity threshold is a range of values, the match can be within the range of values or outside the range of values.
Preferably, the matching number threshold in this embodiment is within one numerical range, and if there are a plurality of number thresholds, there are a plurality of numerical ranges. And determining which numerical range the task to be issued corresponds to according to the number of the tasks to be issued.
And S130, sending the tasks to be issued to the message queues corresponding to the quantity threshold.
The quantity threshold value is multiple, and each quantity threshold value corresponds to one message queue. And matching the corresponding message queues according to the number of the tasks to be issued, and scheduling the tasks to the corresponding message queues according to the number of the tasks to be issued so as to issue the tasks. Specifically, different message queues are isolated from each other, and small tasks can be issued without waiting for the completion of the execution of large tasks, so that the issuing waiting time is reduced.
According to the method and the device, the number of the tasks to be issued is matched with the number threshold, and different numbers of the tasks to be issued are scheduled to different message queues, so that the phenomenon that the task number of some tasks is too large, and the task issuing waiting time of the small task number submitted later is too long can be avoided.
Optionally, before the step S120, matching the number threshold based on the number of tasks to be issued, the method may include:
receiving the quantity threshold value input by the user and the message queue corresponding to the quantity threshold value.
Specifically, before the number of tasks to be issued matches the number threshold, the number threshold and the corresponding message queue input by the user are received, so that the configurability of queue scheduling is realized, and the user can adjust the number threshold and the message queue according to the own requirements so as to meet the requirements of different application scenarios. Optionally, the number threshold and the corresponding message queue may be automatically adjusted through big data analysis, so as to implement automatic configuration of queue scheduling.
According to the technical scheme of the embodiment of the invention, the number of the tasks to be issued is obtained; matching a quantity threshold value based on the number of the tasks to be issued; and sending the tasks to be issued to the message queues corresponding to the quantity threshold. The tasks to be issued with small task number can be in one message queue, the tasks to be issued with large task number can be in another message queue, the tasks to be issued with small task number can be issued without waiting for the tasks to be issued with large task number to be completed, and the technical effect of reducing the waiting time for the task to be issued is achieved.
Example two
Fig. 2 is a flowchart illustrating a method for scheduling a queue for information transmission according to a second embodiment of the present invention. The embodiment is further refined in the technical scheme, and is suitable for a scene that the tasks to be issued are scheduled to different message queues according to the number of the tasks to be issued. The method can be executed by a device for queue scheduling of information transmission, which can be implemented in a software and/or hardware manner and can be integrated on a server.
As shown in fig. 2, a method for scheduling a queue for information transmission according to a second embodiment of the present invention includes:
s210, acquiring the number of the tasks to be issued.
The task to be issued refers to a task which is not submitted to the message queue but needs to be issued. The number of tasks to be issued refers to the number of tasks to be issued. Illustratively, during a large event, coupons need to be issued to users to stimulate a desire to consume. Issuing the coupon is the task to be issued in this embodiment. In the task of issuing the coupon, the coupon needs to be issued to 10 thousands of users, and then the 10 thousands are the number of tasks to be issued in this embodiment. Optionally, the task to be issued is a coupon issuing task.
And S220, matching a quantity threshold value based on the quantity of the tasks to be issued.
Wherein the quantity threshold comprises a first quantity threshold and a second quantity threshold. The message queues comprise a first message queue and a second message queue, the first quantity threshold corresponds to the first message queue, and the second quantity threshold corresponds to the second message queue.
Specifically, if the number of the tasks to be issued matches the first number threshold, step S230 is executed; if the number of tasks to be issued matches the second number threshold, step S240 is executed.
And S230, sending the task to be issued to the first message queue.
The first message queue refers to a message queue for issuing tasks to be issued which are matched with the first quantity threshold.
Optionally, the first message queue comprises at least one sub-queue.
S240, sending the task to be issued to the second message queue.
The second message queue refers to a message queue for issuing tasks to be issued which are matched with the second number threshold.
Optionally, the second message queue comprises at least one sub-queue.
In this embodiment, the number of different tasks to be issued is scheduled to different message queues to issue the tasks, so that the waiting time for issuing the tasks can be reduced.
In an alternative embodiment, a third number threshold and a third message queue, or even more number thresholds and corresponding message queues, may be further included to meet the requirements of different scenarios.
Optionally, the first message queue comprises at least one sub-queue. Specifically, the first message queue includes a first sub-queue and a second sub-queue. Step S230, sending the to-be-issued task to the first message queue, specifically including:
judging whether the number of first subtasks in the first sub queue is larger than an upper limit threshold value or not;
if the number of the first subtasks in the first sub queue is not larger than an upper limit threshold, sending the tasks to be issued to the first sub queue;
and if the number of the first sub tasks in the first sub queue is greater than an upper limit threshold value, sending the tasks to be issued to the second sub queue.
The first subtask number refers to the total number of tasks not issued in the first sub queue. The upper threshold value means a specific numerical value. When the number of the first subtasks is not larger than the upper limit threshold, the tasks to be issued are preferentially sent to the first sub queue, and the tasks are issued; and when the number of the first subtasks is larger than the upper limit threshold, sending the tasks to be issued to the second subtasks for issuing the tasks.
In this embodiment, the first message queue includes a first sub-queue and a second sub-queue, and the to-be-issued tasks meeting the first number threshold are preferentially sent to the first sub-queue to issue the tasks. When the number of the tasks to be issued is larger than the upper limit threshold value, the tasks to be issued are sent to the second sub-queue, and the problem that the number of the tasks in the first sub-queue is accumulated excessively to cause overlong issuing waiting time is solved. By setting an upper limit threshold, the tasks to be issued are coordinated in the first sub-queue and the second sub-queue for issuing, and the issuing waiting time is further reduced.
In another alternative embodiment, the step S230 of sending the task to be delivered to the first message queue may further include:
acquiring the number of first subtasks of the first sub queue;
acquiring the number of second subtasks of the second sub queue;
judging the size of the first subtask number of the first sub queue and the second subtask number of the second sub queue;
if the number of the first subtasks of the first sub queue is larger than the number of the second subtasks of the second sub queue, sending the tasks to be issued to the second sub queue;
and if the number of the first subtasks of the first sub queue is not larger than the number of the second subtasks of the second sub queue, sending the to-be-issued task to the first sub queue.
In this embodiment, by determining the number of the first subtasks and the number of the second subtasks, the task to be issued is preferentially sent to the subqueue with the lower number of the current subtasks, so that the number of the tasks in the subqueue can be kept balanced as much as possible, the number of the tasks in each subqueue cannot be too large, and the waiting time for issuing the task is further reduced.
According to the technical scheme of the embodiment of the invention, the number of the tasks to be issued is obtained; matching a quantity threshold value based on the quantity of the tasks to be issued; and sending the tasks to be issued to the message queues corresponding to the quantity threshold. The tasks to be issued with small task number can be in one message queue, the tasks to be issued with large task number can be in another message queue, the tasks to be issued with small task number can be issued without waiting for the tasks to be issued with large task number to be completed, and the technical effect of reducing the time for issuing and waiting is achieved. In addition, a plurality of sub-queues corresponding to one message queue can be sent to the corresponding sub-queues according to different requirements to issue tasks, and the waiting time for task issuing is further reduced.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an information sending queue scheduling apparatus according to a third embodiment of the present invention, where this embodiment is applicable to a scenario in which tasks to be issued are scheduled to different message queues according to the number of the tasks to be issued, and the apparatus may be implemented in a software and/or hardware manner and may be integrated on a server.
As shown in fig. 3, the apparatus for queue scheduling of information transmission provided in this embodiment may include an obtaining module 310, a matching module 320, and a transmitting module 330, where:
an obtaining module 310, configured to obtain the number of tasks to be issued of the tasks to be issued;
a matching module 320, configured to match a quantity threshold based on the number of tasks to be issued;
the sending module 330 is configured to send the task to be issued to the message queue corresponding to the number threshold.
Optionally, the number threshold includes a first number threshold and a second number threshold, the message queue includes a first message queue and a second message queue, the first number threshold corresponds to the first message queue, the second number threshold corresponds to the second message queue, and the sending module 330 includes:
the first sending unit is used for sending the tasks to be issued to the first message queue if the number of the tasks to be issued matches the first number threshold;
and the second sending unit is used for sending the tasks to be issued to the second message queue if the number of the tasks to be issued is matched with the second number threshold.
Optionally, the apparatus for scheduling a queue for information transmission may further include:
and the configuration module is used for receiving the quantity threshold value input by the user and the message queue corresponding to the quantity threshold value.
Optionally, the first message queue and/or the second message queue includes at least one sub-queue.
Optionally, the first message queue includes a first sub-queue and a second sub-queue, and the apparatus for scheduling a queue for information transmission may further include:
the judging module is used for judging whether the number of the first subtasks in the first sub queue is greater than an upper limit threshold value; if the number of the first subtasks in the first sub queue is not larger than an upper limit threshold, sending the tasks to be issued to the first sub queue; and if the number of the first sub tasks in the first sub queue is greater than an upper limit threshold value, sending the tasks to be issued to the second sub queue.
Optionally, the obtaining module may be configured to obtain a first sub-task number of the first sub-queue; acquiring the number of second subtasks of the second sub queue;
the judging module can also be used for judging the size of the first subtask number of the first sub queue and the second subtask number of the second sub queue; if the number of the first subtasks of the first sub queue is larger than the number of the second subtasks of the second sub queue, sending the tasks to be issued to the second sub queue; and if the number of the first subtasks of the first sub queue is not greater than the number of the second subtasks of the second sub queue, sending the tasks to be issued to the first sub queue.
Optionally, the task to be issued is a coupon issuing task.
The device for queue scheduling of information transmission provided by the embodiment of the invention can execute the method for queue scheduling of information transmission provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. Reference may be made to the description of any method embodiment of the invention that is not an exhaustive description of embodiments of the invention.
Example four
Fig. 4 is a schematic structural diagram of a server according to a fourth embodiment of the present invention. FIG. 4 illustrates a block diagram of an exemplary server 612 suitable for use in implementing embodiments of the present invention. The server 612 shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of the use of the embodiments of the present invention.
As shown in fig. 4, the server 612 is in the form of a general-purpose server. The components of server 612 may include, but are not limited to: one or more processors 616, a memory device 628, and a bus 618 that couples the various system components including the memory device 628 and the processors 616.
The server 612 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by server 612 and includes both volatile and nonvolatile media, removable and non-removable media.
A program/utility 640 having a set (at least one) of program modules 642 may be stored, for example, in storage 628, such program modules 642 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. The program modules 642 generally perform the functions and/or methods of the described embodiments of the present invention.
The server 612 may also communicate with one or more external devices 614 (e.g., keyboard, pointing terminal, display 624, etc.), with one or more terminals that enable a user to interact with the server 612, and/or with any terminals (e.g., network card, modem, etc.) that enable the server 612 to communicate with one or more other computing terminals. Such communication may occur via input/output (I/O) interfaces 622. Further, server 612 may also communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network, such as the internet) via Network adapter 620. As shown in FIG. 4, the network adapter 620 communicates with the other modules of the server 612 via the bus 618. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the server 612, including but not limited to: microcode, end drives, Redundant processors, external disk drive Arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems, among others.
The processor 616 executes programs stored in the storage device 628, so as to execute various functional applications and data processing, for example, implement a method for queue scheduling of information transmission provided by any embodiment of the present invention, where the method may include:
acquiring the number of tasks to be issued of the tasks to be issued;
matching a quantity threshold value based on the number of the tasks to be issued;
and sending the tasks to be issued to the message queues corresponding to the quantity threshold.
According to the technical scheme of the embodiment of the invention, the number of the tasks to be issued is obtained; matching a quantity threshold value based on the number of the tasks to be issued; and sending the tasks to be issued to the message queues corresponding to the quantity threshold. The tasks to be issued with small task number can be in one message queue, the tasks to be issued with large task number can be in another message queue, the tasks to be issued with small task number can be issued without waiting for the tasks to be issued with large task number to be completed, and the technical effect of reducing the waiting time for the task to be issued is achieved.
EXAMPLE five
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a method for queue scheduling for information transmission according to any embodiment of the present invention, where the method includes:
acquiring the number of tasks to be issued of the tasks to be issued;
matching a quantity threshold value based on the number of the tasks to be issued;
and sending the tasks to be issued to the message queues corresponding to the quantity threshold.
The computer-readable storage media of embodiments of the invention may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or terminal. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
According to the technical scheme of the embodiment of the invention, the number of the tasks to be issued is obtained; matching a quantity threshold value based on the number of the tasks to be issued; and sending the tasks to be issued to the message queues corresponding to the quantity threshold. The tasks to be issued with small task quantity can be in one message queue, the tasks to be issued with large task quantity are in another message queue, the tasks to be issued with small task quantity can be issued without waiting for the tasks to be issued with large task quantity to be completed, and the technical effect of reducing the waiting time for issuing the tasks is achieved.
It is to be noted that the foregoing description is only exemplary of the invention and that the principles of the technology may be employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (9)
1. A method for queue scheduling for information transmission, comprising:
acquiring the number of tasks to be issued of the tasks to be issued, wherein the tasks to be issued are tasks which are not submitted to a message queue and need to be issued;
matching a quantity threshold value based on the number of the tasks to be issued;
sending the task to be issued to a message queue corresponding to the quantity threshold;
wherein, different message queues are isolated from each other;
wherein the number threshold includes a first number threshold and a second number threshold, the message queue includes a first message queue and a second message queue, the first number threshold corresponds to the first message queue, the second number threshold corresponds to the second message queue, and the sending the to-be-sent task to the message queue corresponding to the number threshold includes:
if the number of the tasks to be issued is matched with the first number threshold, sending the tasks to be issued to the first message queue;
and if the number of the tasks to be issued is matched with the second number threshold, sending the tasks to be issued to the second message queue.
2. The method of queue scheduling for information transmission according to claim 1, wherein before said matching a number threshold based on the number of tasks to be issued, comprising:
and receiving the quantity threshold value input by the user and the message queue corresponding to the quantity threshold value.
3. The method for queue scheduling of information transmission according to claim 1, wherein the first message queue and/or the second message queue comprises at least one sub-queue.
4. The method for queue scheduling of information transmission according to claim 3, wherein the first message queue includes a first sub-queue and a second sub-queue, and the transmitting the task to be transmitted to the first message queue includes:
judging whether the number of first subtasks in the first sub queue is larger than an upper limit threshold value or not;
if the number of the first subtasks in the first sub queue is not larger than an upper limit threshold, sending the tasks to be issued to the first sub queue;
and if the number of the first sub tasks in the first sub queue is greater than an upper limit threshold value, sending the tasks to be issued to the second sub queue.
5. The method for queue scheduling of information transmission according to claim 4, wherein the transmitting the to-be-transmitted task to the message queue corresponding to the number threshold includes:
acquiring the number of first subtasks of the first sub queue;
acquiring the number of second subtasks of the second sub queue;
judging the size of the first subtask number of the first sub queue and the second subtask number of the second sub queue;
if the number of the first subtasks of the first sub queue is larger than the number of the second subtasks of the second sub queue, sending the tasks to be issued to the second sub queue;
and if the number of the first subtasks of the first sub queue is not greater than the number of the second subtasks of the second sub queue, sending the tasks to be issued to the first sub queue.
6. The method for queue scheduling of information transmission according to any of claims 1-5, characterized in that the task to be issued is a coupon task.
7. An apparatus for queue scheduling for information transmission, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the number of tasks to be issued of the tasks to be issued, and the tasks to be issued are not submitted to a message queue and need to be issued;
the matching module is used for matching a quantity threshold value based on the quantity of the tasks to be issued;
the sending module is used for sending the tasks to be issued to the message queues corresponding to the quantity threshold;
wherein, different message queues are isolated from each other;
the number threshold comprises a first number threshold and a second number threshold, the message queue comprises a first message queue and a second message queue, the first number threshold corresponds to the first message queue, and the second number threshold corresponds to the second message queue;
wherein the sending module comprises:
the first sending unit is used for sending the tasks to be issued to the first message queue if the number of the tasks to be issued matches the first number threshold;
and the second sending unit is used for sending the tasks to be issued to the second message queue if the number of the tasks to be issued is matched with the second number threshold.
8. A server, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement a method of queue scheduling for information transmission according to any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a method for queue scheduling for information transmission according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910818326.8A CN110515749B (en) | 2019-08-30 | 2019-08-30 | Method, device, server and storage medium for queue scheduling of information transmission |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910818326.8A CN110515749B (en) | 2019-08-30 | 2019-08-30 | Method, device, server and storage medium for queue scheduling of information transmission |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110515749A CN110515749A (en) | 2019-11-29 |
CN110515749B true CN110515749B (en) | 2022-06-24 |
Family
ID=68628750
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910818326.8A Active CN110515749B (en) | 2019-08-30 | 2019-08-30 | Method, device, server and storage medium for queue scheduling of information transmission |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110515749B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112015529B (en) * | 2020-08-05 | 2023-09-01 | 北京奇艺世纪科技有限公司 | Data task scheduling method, system, electronic device and storage medium |
CN112468407A (en) * | 2020-12-15 | 2021-03-09 | 东莞中国科学院云计算产业技术创新与育成中心 | Data subpackage transmission method and device, computer equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7779418B2 (en) * | 2004-12-30 | 2010-08-17 | Oracle International Corporation | Publisher flow control and bounded guaranteed delivery for message queues |
CN102761832A (en) * | 2011-04-28 | 2012-10-31 | 中国移动通信集团河南有限公司 | Message distribution method and device |
CN106201676A (en) * | 2016-06-28 | 2016-12-07 | 浪潮软件集团有限公司 | Task allocation method and device |
CN109542608A (en) * | 2018-11-30 | 2019-03-29 | 北京仿真中心 | A kind of cloud artificial tasks dispatching method based on mixing queuing network |
CN109802994A (en) * | 2018-12-13 | 2019-05-24 | 平安科技(深圳)有限公司 | A kind of information push method and system based on content distributing network |
CN110149392A (en) * | 2019-05-17 | 2019-08-20 | 优信拍(北京)信息科技有限公司 | A kind of management method and device of PUSH message |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3788697B2 (en) * | 1998-11-18 | 2006-06-21 | 富士通株式会社 | Message control unit |
KR101651871B1 (en) * | 2009-12-28 | 2016-09-09 | 삼성전자주식회사 | Job Allocation Method on Multi-core System and Apparatus thereof |
US9189281B2 (en) * | 2012-10-18 | 2015-11-17 | Oracle International Corporation | Apparatus, system and method for providing fairness in task servicing |
CN106851594B (en) * | 2017-03-10 | 2019-09-27 | Oppo广东移动通信有限公司 | A kind of broadcast transmission method, apparatus and terminal |
CN107395729A (en) * | 2017-07-27 | 2017-11-24 | 深圳乐信软件技术有限公司 | A kind of consumption system of message queue, method and device |
CN110049118A (en) * | 2019-04-12 | 2019-07-23 | 深圳乐信软件技术有限公司 | Information push method, device, equipment and storage medium |
-
2019
- 2019-08-30 CN CN201910818326.8A patent/CN110515749B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7779418B2 (en) * | 2004-12-30 | 2010-08-17 | Oracle International Corporation | Publisher flow control and bounded guaranteed delivery for message queues |
CN102761832A (en) * | 2011-04-28 | 2012-10-31 | 中国移动通信集团河南有限公司 | Message distribution method and device |
CN106201676A (en) * | 2016-06-28 | 2016-12-07 | 浪潮软件集团有限公司 | Task allocation method and device |
CN109542608A (en) * | 2018-11-30 | 2019-03-29 | 北京仿真中心 | A kind of cloud artificial tasks dispatching method based on mixing queuing network |
CN109802994A (en) * | 2018-12-13 | 2019-05-24 | 平安科技(深圳)有限公司 | A kind of information push method and system based on content distributing network |
CN110149392A (en) * | 2019-05-17 | 2019-08-20 | 优信拍(北京)信息科技有限公司 | A kind of management method and device of PUSH message |
Non-Patent Citations (1)
Title |
---|
支持动态负载平衡的分层消息队列模型;鲍春健等;《计算机工程与应用》;20070101;第43卷(第1期);第155-158页 * |
Also Published As
Publication number | Publication date |
---|---|
CN110515749A (en) | 2019-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109213611B (en) | Cross-process communication method, device, terminal and storage medium | |
US8799564B2 (en) | Efficiently implementing a plurality of finite state machines | |
CN107341062B (en) | Data pushing method, device, equipment and storage medium | |
EP4113299A2 (en) | Task processing method and device, and electronic device | |
CN111221638B (en) | Concurrent task scheduling processing method, device, equipment and medium | |
CN110955640B (en) | Cross-system data file processing method, device, server and storage medium | |
CN110851276A (en) | Service request processing method, device, server and storage medium | |
CN110515749B (en) | Method, device, server and storage medium for queue scheduling of information transmission | |
CN112395097A (en) | Message processing method, device, equipment and storage medium | |
US20110055842A1 (en) | Virtual multiple instance extended finite state machines with wait rooms and/or wait queues | |
CN114020529A (en) | Backup method and device of flow table data, network equipment and storage medium | |
CN110825342B (en) | Memory scheduling device and system, method and apparatus for processing information | |
US9645637B2 (en) | Managing a free list of resources to decrease control complexity and reduce power consumption | |
CN114036085B (en) | DDR 4-based multitasking read-write scheduling method, computer equipment and storage medium | |
CN113391896B (en) | Task processing method and device, storage medium and electronic equipment | |
CN116627495A (en) | Information interaction method, system, device, equipment and medium | |
CN112817788A (en) | Task abnormity warning method, device, server and storage medium | |
CN112714350A (en) | Message processing method, device, equipment and storage medium | |
US9588827B2 (en) | Single program call message retrieval | |
CN117675720B (en) | Message transmission method and device, electronic equipment and storage medium | |
CN113259261B (en) | Network flow control method and electronic equipment | |
CN113438419B (en) | Camera starting method and device and electronic equipment | |
CN111865675B (en) | Container receiving and dispatching speed limiting method, device and system | |
CN117667456A (en) | Message sending management method, device, equipment and storage medium | |
CN116132523A (en) | Message processing method, device, electronic equipment and storage medium |
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 |