CN110515749A - Method, apparatus, server and the storage medium for the queue scheduling that information is sent - Google Patents

Method, apparatus, server and the storage medium for the queue scheduling that information is sent Download PDF

Info

Publication number
CN110515749A
CN110515749A CN201910818326.8A CN201910818326A CN110515749A CN 110515749 A CN110515749 A CN 110515749A CN 201910818326 A CN201910818326 A CN 201910818326A CN 110515749 A CN110515749 A CN 110515749A
Authority
CN
China
Prior art keywords
task
issued
sent
subqueue
amount threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910818326.8A
Other languages
Chinese (zh)
Other versions
CN110515749B (en
Inventor
吴伟兴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Lexin Software Technology Co Ltd
Original Assignee
Shenzhen Lexin Software Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Lexin Software Technology Co Ltd filed Critical Shenzhen Lexin Software Technology Co Ltd
Priority to CN201910818326.8A priority Critical patent/CN110515749B/en
Publication of CN110515749A publication Critical patent/CN110515749A/en
Application granted granted Critical
Publication of CN110515749B publication Critical patent/CN110515749B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message 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 method, apparatus, server and the storage mediums of the queue scheduling that a kind of information is sent.The method for the queue scheduling that the information is sent includes: to obtain the task quantity to be issued of task to be issued;Based on the task quantity Matching amount threshold to be issued;The task to be issued is sent to the corresponding message queue of the amount threshold.By the way that the task to be issued of different task quantity to be sent in different message queues, achieve the effect that reduce the time that mission dispatching waits.

Description

Method, apparatus, server and the storage medium for the queue scheduling that information is sent
Technical field
The present embodiments relate to a kind of sides for the queue scheduling that technical field of information processing more particularly to information are sent Method, device, server and storage medium.
Background technique
With the fast development of internet, how quickly to handle information also more and more important.
Currently, transmission message or task are all task to be submitted in message queue, then issue task by message queue. Message queue follows the principle of first in first out, is issued according to the sequence being submitted in message queue.Since message queue is abided by First in first out is followed, submitting below for task could must start to issue after the completion of mission dispatching in front.
However, when needing to issue considerable task, such as carry out promoting activities, when issuing a large amount of discount coupon, meeting There is a problem of issuing the waiting time too long.
Summary of the invention
The embodiment of the present invention provides method, apparatus, server and the storage medium of a kind of queue scheduling that information is sent, with Realize the effect for reducing the time that mission dispatching waits.
In a first aspect, a kind of method of the queue scheduling sent the embodiment of the invention provides information, comprising:
Obtain the task quantity to be issued of task to be issued;
Based on the task quantity Matching amount threshold to be issued;
The task to be issued is sent to the corresponding message queue of the amount threshold.
Optionally, the amount threshold includes the first amount threshold and the second amount threshold, and the message queue includes the One message queue and second message queue, first amount threshold and the first message queue are corresponding, second quantity Threshold value and the second message queue are corresponding, described that the task to be issued is sent to the corresponding message team of the amount threshold Column, comprising:
If the task to be issued is sent to institute by the first amount threshold described in the task quantity Matching to be issued State first message queue;
If the task to be issued is sent to institute by the second amount threshold described in the task quantity Matching to be issued State second message queue.
It is optionally, described that the task to be issued is sent to before the corresponding message queue of the amount threshold, comprising:
Receive the amount threshold and the corresponding message queue of the amount threshold of user's input.
Optionally, the first message queue and/or second message queue include at least one subqueue.
Optionally, the first message queue includes the first subqueue and the second subqueue, described to appoint described wait issue Business is sent to the first message queue, comprising:
Judge whether the first subtask quantity in first subqueue is greater than upper limit threshold;
If the first subtask quantity in first subqueue is not more than upper limit threshold, by the task to be issued It is sent to first subqueue;
If the first subtask quantity in first subqueue is greater than upper limit threshold, the task to be issued is sent out It send to second subqueue.
It is optionally, described that the task to be issued is sent to the corresponding message queue of the amount threshold, comprising:
Obtain the first subtask quantity of first subqueue;
Obtain the second subtask quantity of second subqueue;
Judge the first subtask quantity of first subqueue and the second subtask quantity of second subqueue Size;
If the first subtask quantity of first subqueue is greater than the second subtask quantity of second subqueue, The task to be issued then is sent to second subqueue;
If the first subtask quantity of first subqueue is not more than the second subtask number of second subqueue Amount, then be sent to first subqueue for the task to be issued.
Optionally, the task to be issued is hair certificate task.
Second aspect, the embodiment of the invention provides a kind of devices for the queue scheduling that information is sent, comprising:
Module is obtained, for obtaining the task quantity to be issued of task to be issued;
Matching module, for based on the task quantity Matching amount threshold to be issued;
Sending module, for the task to be issued to be sent to the corresponding message queue of the amount threshold.
The third aspect, the embodiment of the invention provides a kind of servers, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing The method that device realizes the queue scheduling that the information as described in any embodiment of that present invention is sent.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage mediums, are stored thereon with computer journey Sequence realizes the method for the queue scheduling that the information as described in any embodiment of that present invention is sent when the program is executed by processor.
The embodiment of the present invention passes through the task quantity to be issued for obtaining task to be issued;Based on the task quantity to be issued Number of matches threshold value;The task to be issued is sent to the corresponding message queue of the amount threshold, is solved because of number of tasks It measures excessive and leads to issue waiting time too long problem, realize the effect for reducing the time that mission dispatching waits.
Detailed description of the invention
Fig. 1 is the flow diagram of the method for the queue scheduling that a kind of information that the embodiment of the present invention one provides is sent;
Fig. 2 is the flow diagram of the method for the queue scheduling that a kind of information provided by Embodiment 2 of the present invention is sent;
Fig. 3 is the structural schematic diagram of the device for the queue scheduling that a kind of information that the embodiment of the present invention three provides is sent;
Fig. 4 is a kind of structural schematic diagram for server that the embodiment of the present invention four provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation Processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.Handle the side of can correspond to Method, function, regulation, subroutine, subprogram etc..
In addition, term " first ", " second " etc. can be used to describe herein various directions, movement, step or element etc., But these directions, movement, step or element should not be limited by these terms.These terms are only used to by first direction, movement, step Rapid or element and another direction, movement, step or element are distinguished.For example, the case where not departing from scope of the present application Under, it can be second speed difference by First Speed difference, and similarly, it is poor second speed difference can be known as First Speed Value.First Speed difference and second speed difference both speed difference, but it is not same speed difference.Term " the One ", " second " etc. is not understood to indicate or imply relative importance or implicitly indicates the number of indicated technical characteristic Amount." first " is defined as a result, the feature of " second " can explicitly or implicitly include one or more of the features. In the description of the present invention, " multiple ", " batch " are meant that at least two, such as two, three etc., unless otherwise clearly having The restriction of body.
Embodiment one
Fig. 1 is the flow diagram of the method for the queue scheduling that a kind of information that the embodiment of the present invention one provides is sent, can Suitable for according to task quantity to be issued, by task schedule to be issued to the scene of different messages queue, this method can be by information The device of the queue scheduling of transmission executes, which can be realized by the way of software and/or hardware, and can be integrated in clothes It is engaged on device.
As shown in Figure 1, the method for the queue scheduling that the information that the embodiment of the present invention one provides is sent includes:
S110, the task quantity to be issued for obtaining task to be issued.
Wherein, task to be issued refers to and is not submitted in message queue, but being issued for task.Specifically, Task to be issued may include message, data etc., herein with no restrictions.Task quantity to be issued refers to the task of task to be issued Quantity.Illustratively, during promoting activities, need to issue discount coupon to user, to stimulate the desire for consumer goods.Issue discount coupon just It is the task to be issued of the present embodiment.In the issuing discount coupon of the task, need for discount coupon to be handed down to 100,000 users, then this 100000 be exactly the task quantity to be issued of the present embodiment.Optionally, the task to be issued is hair certificate task.
S120, based on the task quantity Matching amount threshold to be issued.
Wherein, amount threshold refers to that the threshold value being set in advance, amount threshold have multiple.It can be with by number of matches threshold value The task to be issued of task quantity to be issued to difference carries out the scheduling of message queue.Scheduling, which refers to, is committed to task to be issued In corresponding message queue.Specifically, amount threshold can be a specific numerical value, such as 100,000;It is also possible to a number It is worth range, such as 0-1 ten thousand, 10,000-10 ten thousand, is not specifically limited herein for amount threshold.Matching, which refers to, meets amount threshold. When amount threshold is specific numerical value, then matching may be greater than amount threshold;It is also possible to be less than amount threshold, herein not It is restricted, can be set as needed.When amount threshold is numberical range, matching be can be in this numberical range, can also Outside this numberical range.
Preferably, the number of matches threshold value in the present embodiment refers in a numberical range, has multiple amount thresholds, then Have in multiple numberical ranges.It is determined according to task quantity to be issued and is somebody's turn to do which numberical range is task to be issued correspond to.
S130, the task to be issued is sent to the corresponding message queue of the amount threshold.
Wherein, amount threshold has multiple, each amount threshold corresponds to a message queue.According to task to be issued Task quantity to be issued, match corresponding message queue, then can be dispatched to corresponding message team according to task quantity to be issued In column, so that the task of progress issues.Specifically, mutually isolated between different message queues, small task is withouted waiting for greatly Task execution completion can also be issued, and the waiting time issued is reduced.
The present embodiment by will task quantity Matching amount threshold be issued, different task quantity to be issued are dispatched to not , can be too big to avoid the task quantity of certain tasks in same message queue, and lead to appointing for the small task quantity submitted below It is too long that business issues the waiting time.
Optionally, before step S120, based on the task quantity Matching amount threshold to be issued, may include:
Receive the amount threshold and the corresponding message queue of the amount threshold of user's input.
Specifically, before task quantity Matching amount threshold to be issued, by receive user's input amount threshold and Corresponding message queue, realizes configurableization of queue scheduling, and user to amount threshold and can disappear according to the demand of itself Breath queue is adjusted, to meet the needs of different application scene.It optionally, can also be and then automatic by big data analysis Amount threshold and corresponding message queue are adjusted, the automatically configuring of queue scheduling is realized.
The technical solution of the embodiment of the present invention, by the task quantity to be issued for obtaining task to be issued;Based on it is described to Issue task quantity Matching amount threshold;The task to be issued is sent to the corresponding message queue of the amount threshold.Root It is dispatched in different message queues according to difference quantity to be issued, the lesser task to be issued of task quantity can be in a message In queue, task quantity it is big issue task in another message queue, the small task to be issued of task quantity does not need Big just can be carried out after the completion of issuing task of task quantity issues, and reaches the technology effect for reducing the time that mission dispatching waits Fruit.
Embodiment two
Fig. 2 is the flow diagram of the method for the queue scheduling that a kind of information provided by Embodiment 2 of the present invention is sent.This Embodiment is the further refinement in above-mentioned technical proposal, suitable for according to task quantity to be issued will task schedule be issued extremely The scene of different messages queue.This method can be executed by the device of the queue scheduling of information transmission, which can use The mode of software and/or hardware is realized, and can be integrated on the server.
As shown in Fig. 2, the method for the queue scheduling that information provided by Embodiment 2 of the present invention is sent includes:
S210, the task quantity to be issued for obtaining task to be issued.
Wherein, task to be issued refers to and is not submitted in message queue, but being issued for task.Appoint wait issue Business quantity refers to the task quantity of task to be issued.Illustratively, during promoting activities, need to issue discount coupon to user, To stimulate the desire for consumer goods.Issue the task to be issued that discount coupon is exactly the present embodiment.In the issuing discount coupon of the task, need by Discount coupon is handed down to 100,000 users, then this 100,000 be exactly the present embodiment task quantity to be issued.Optionally, described wait issue Task is hair certificate task.
S220, based on the task quantity Matching amount threshold to be issued.
Wherein, amount threshold includes the first amount threshold and the second amount threshold.The message queue includes first message Queue and second message queue, first amount threshold and the first message queue are corresponding, second amount threshold and The second message queue is corresponding.
Specifically, if the first amount threshold described in the task quantity Matching to be issued, thens follow the steps S230;If Second amount threshold described in the task quantity Matching to be issued, thens follow the steps S240.
S230, the task to be issued is sent to the first message queue.
Wherein, first message queue refers to the message queue issued with the matched task to be issued of the first amount threshold.
Optionally, first message queue includes at least one subqueue.
S240, the task to be issued is sent to the second message queue.
Wherein, second message queue refers to the message queue issued with the matched task to be issued of the second amount threshold.
Optionally, second message queue includes at least one subqueue.
In the present embodiment, by the way that difference task quantity to be issued to be dispatched in different message queues, to be appointed Business issues, it is possible to reduce the waiting time of mission dispatching.
It is replaced in embodiment one, can also include third amount threshold and third message queue, even more numbers Threshold value and corresponding message queue are measured, to meet the needs of different scenes.
Optionally, first message queue includes at least one subqueue.Specifically, first message queue includes the first sub- team Column and the second subqueue.Wherein, the task to be issued step S230, is sent to the first message queue, specifically included:
Judge whether the first subtask quantity in first subqueue is greater than upper limit threshold;
If the first subtask quantity in first subqueue is not more than upper limit threshold, by the task to be issued It is sent to first subqueue;
If the first subtask quantity in first subqueue is greater than upper limit threshold, the task to be issued is sent out It send to second subqueue.
Wherein, the first subtask quantity refers to the total task number amount not issued in the first subqueue.Upper limit threshold refers to tool The numerical value of body.When the first subtask quantity is not more than upper limit threshold, then task to be issued preferentially is sent to the first subqueue In, carry out issuing for task;When the first subtask quantity is greater than upper limit threshold, then task to be issued is sent to the second sub- team In column, issuing for task is carried out.
In the present embodiment, first message queue includes the first subqueue and the second subqueue, will preferentially meet the first number The task to be issued of amount threshold value is sent in the first subqueue, carries out issuing for task.When task quantity to be issued is greater than the upper limit When threshold value, task to be issued is sent in the second subqueue, task quantity in the first subqueue is avoided and adds up excessively to cause Issue waiting time too long problem.By set a upper limit threshold, will task be issued the first subqueue and second son Coordinate to further decrease the time for issuing waiting to be issued in queue.
It is replaced in embodiment another, the task to be issued step S230, is sent to the first message queue and is had Body can also include:
Obtain the first subtask quantity of first subqueue;
Obtain the second subtask quantity of second subqueue;
Judge the first subtask quantity of first subqueue and the second subtask quantity of second subqueue Size;
If the first subtask quantity of first subqueue is greater than the second subtask quantity of second subqueue, The task to be issued then is sent to second subqueue;
If the first subtask quantity of first subqueue is not more than the second subtask number of second subqueue Amount, then be sent to first subqueue for the task to be issued.
It in the present embodiment, preferentially will be under by judging the size of the first subtask quantity and the second subtask quantity Hair task is sent in the current lower subqueue of subtask quantity, can guarantee that the task quantity in subqueue keeps flat as far as possible It weighs, the task quantity in each subqueue all will not be too many, further reduced the waiting time of mission dispatching.
The technical solution of the embodiment of the present invention, by the task quantity to be issued for obtaining task to be issued;Based on it is described to Issue task quantity Matching amount threshold;The task to be issued is sent to the corresponding message queue of the amount threshold.Root It is dispatched in different message queues according to difference quantity to be issued, the lesser task to be issued of task quantity can be in a message In queue, task quantity it is big issue task in another message queue, the small task to be issued of task quantity does not need Big just can be carried out after the completion of issuing task of task quantity issues, and reaches the technical effect for reducing the time for issuing waiting.This Outside, multiple subqueues are corresponded in a message queue, can be sent to according to different needs in corresponding subqueue to be appointed Issuing for business, further reduced the waiting time of mission dispatching.
Embodiment three
Fig. 3 is the structural schematic diagram of the device for the queue scheduling that a kind of information that the embodiment of the present invention three provides is sent, this Embodiment is applicable to the scene according to task quantity to be issued by task schedule to be issued to different messages queue, which can It realizes, and can be integrated on the server in a manner of using software and/or hardware.
As shown in figure 3, the device for the queue scheduling that information provided in this embodiment is sent may include obtain module 310, Matching module 320 and sending module 330, in which:
Module 310 is obtained, for obtaining the task quantity to be issued of task to be issued;
Matching module 320, for based on the task quantity Matching amount threshold to be issued;
Sending module 330, for the task to be issued to be sent to the corresponding message queue of the amount threshold.
Optionally, the amount threshold includes the first amount threshold and the second amount threshold, and the message queue includes the One message queue and second message queue, first amount threshold and the first message queue are corresponding, second quantity Threshold value and the second message queue are corresponding, and sending module 330 includes:
First transmission unit, if for the first amount threshold described in the task quantity Matching to be issued, it will be described Task to be issued is sent to the first message queue;
Second transmission unit, if for the second amount threshold described in the task quantity Matching to be issued, it will be described Task to be issued is sent to the second message queue.
Optionally, the device of the queue scheduling of information transmission can also include:
Configuration module, for receiving the amount threshold and the corresponding message team of the amount threshold of user's input Column.
Optionally, the first message queue and/or second message queue include at least one subqueue.
Optionally, the first message queue includes the first subqueue and the second subqueue, the queue tune which sends The device of degree can also include:
Whether judgment module, the first subtask quantity for judging in first subqueue are greater than upper limit threshold;Such as The first subtask quantity in first subqueue described in fruit is not more than upper limit threshold, then is sent to the task to be issued described First subqueue;If the first subtask quantity in first subqueue is greater than upper limit threshold, appoint described wait issue Business is sent to second subqueue.
Optionally, which can be used for obtaining the first subtask quantity of first subqueue;Described in acquisition Second subtask quantity of the second subqueue;
The judgment module can be also used for judging first subqueue the first subtask quantity and the second sub- team The size of second subtask quantity of column;If the first subtask quantity of first subqueue is greater than second subqueue The second subtask quantity, then the task to be issued is sent to second subqueue;If first subqueue First subtask quantity is not more than the second subtask quantity of second subqueue, then the task to be issued is sent to institute State the first subqueue.
Optionally, the task to be issued is hair certificate task.
Any embodiment of that present invention institute can be performed in the device for the queue scheduling that information provided by the embodiment of the present invention is sent The method for the queue scheduling that the information of offer is sent, has the corresponding functional module of execution method and beneficial effect.The present invention is real The content for applying not detailed description in example can be with reference to the description in any means embodiment of the present invention.
Example IV
Fig. 4 is a kind of structural schematic diagram for server that the embodiment of the present invention four provides.Fig. 4, which is shown, to be suitable for being used to realizing The block diagram of the exemplary servers 612 of embodiment of the present invention.The server 612 that Fig. 4 is shown is only an example, should not be right The function and use scope of the embodiment of the present invention bring any restrictions.
As shown in figure 4, server 612 is showed in the form of generic server.The component of server 612 may include but not Be limited to: one or more processor 616, storage device 628 connect different system components (including storage device 628 and processing Device 616) bus 618.
Bus 618 indicates one of a few class bus structures or a variety of, including storage device bus or storage device control Device processed, peripheral bus, graphics acceleration port, processor or total using the local of any bus structures in a variety of bus structures Line.For example, these architectures include but is not limited to industry standard architecture (Industry Subversive Alliance, ISA) bus, microchannel architecture (Micro Channel Architecture, MAC) bus is enhanced Isa bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local are total Line and peripheral component interconnection (Peripheral Component Interconnect, PCI) bus.
Server 612 typically comprises a variety of computer system readable media.These media can be it is any being capable of bedding and clothing The usable medium that business device 612 accesses, including volatile and non-volatile media, moveable and immovable medium.
Storage device 628 may include the computer system readable media of form of volatile memory, such as arbitrary access Memory (Random Access Memory, RAM) 630 and/or cache memory 632.Terminal 612 can be wrapped further Include other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, storage system 634 can be used for reading and writing immovable, non-volatile magnetic media (Fig. 4 do not show, commonly referred to as " hard disk drive ").Although It is not shown in Fig. 4, the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided, and To removable anonvolatile optical disk, such as CD-ROM (Compact Disc Read-Only Memory, CD-ROM), number Optic disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical mediums) read-write CD drive Dynamic device.In these cases, each driver can be connected by one or more data media interfaces with bus 618.It deposits Storage device 628 may include at least one program product, which has one group of (for example, at least one) program module, this A little program modules are configured to perform the function of various embodiments of the present invention.
Program/utility 640 with one group of (at least one) program module 642 can store in such as storage dress It sets in 628, such program module 642 includes but is not limited to operating system, one or more application program, other program moulds It may include the realization of network environment in block and program data, each of these examples or certain combination.Program module 642 usually execute function and/or method in embodiment described in the invention.
Server 612 can also be with one or more external equipments 614 (such as keyboard, direction terminal, display 624 etc.) Communication, can also be enabled a user to one or more terminal interact with the server 612 communicate, and/or with make the clothes Any terminal (such as network interface card, modem etc.) that business device 612 can be communicated with one or more of the other computing terminal Communication.This communication can be carried out by input/output (I/O) interface 622.Also, server 612 can also be suitable by network Orchestration 620 and one or more network (such as local area network (Local Area Network, LAN), wide area network (Wide Area Network, WAN) and/or public network, such as internet) communication.As shown in figure 4, network adapter 620 passes through bus 618 It is communicated with other modules of server 612.It should be understood that although not shown in the drawings, can be used in conjunction with server 612 other hard Part and/or software module, including but not limited to: microcode, terminal driver, redundant processor, external disk drive array, magnetic Disk array (Redundant Arrays of Independent Disks, RAID) system, tape drive and data backup Storage system etc..
The program that processor 616 is stored in storage device 628 by operation, thereby executing various function application and number According to processing, such as the method for realizing the queue scheduling that a kind of information provided by any embodiment of the invention is sent, this method can To include:
Obtain the task quantity to be issued of task to be issued;
Based on the task quantity Matching amount threshold to be issued;
The task to be issued is sent to the corresponding message queue of the amount threshold.
The technical solution of the embodiment of the present invention, by the task quantity to be issued for obtaining task to be issued;Based on it is described to Issue task quantity Matching amount threshold;The task to be issued is sent to the corresponding message queue of the amount threshold.Root It is dispatched in different message queues according to difference quantity to be issued, the lesser task to be issued of task quantity can be in a message In queue, task quantity it is big issue task in another message queue, the small task to be issued of task quantity does not need Big just can be carried out after the completion of issuing task of task quantity issues, and reaches the technology effect for reducing the time that mission dispatching waits Fruit.
Embodiment five
The embodiment of the present invention five additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should The method that the queue scheduling that a kind of information such as provided by any embodiment of the invention is sent is realized when program is executed by processor, This method may include:
Obtain the task quantity to be issued of task to be issued;
Based on the task quantity Matching amount threshold to be issued;
The task to be issued is sent to the corresponding message queue of the amount threshold.
The computer readable storage medium of the embodiment of the present invention, can be using one or more computer-readable media Any combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.Computer Readable storage medium storing program for executing for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, dress It sets or device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium wraps It includes: there is the electrical connection of one or more conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable Storage medium can be it is any include or storage program tangible medium, the program can be commanded execution system, device or Device use or in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for By the use of instruction execution system, device or device or program in connection.
The program code for including on storage medium can transmit with any suitable medium, including --- but it is not limited to nothing Line, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion Divide and partially executes or executed on remote computer or terminal completely on the remote computer on the user computer.It is relating to And in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or extensively Domain net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as provided using Internet service Quotient is connected by internet).
The technical solution of the embodiment of the present invention, by the task quantity to be issued for obtaining task to be issued;Based on it is described to Issue task quantity Matching amount threshold;The task to be issued is sent to the corresponding message queue of the amount threshold.Root It is dispatched in different message queues according to difference quantity to be issued, the lesser task to be issued of task quantity can be in a message In queue, task quantity it is big issue task in another message queue, the small task to be issued of task quantity does not need Big just can be carried out after the completion of issuing task of task quantity issues, and reaches the technology effect for reducing the time that mission dispatching waits Fruit.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of method for the queue scheduling that information is sent characterized by comprising
Obtain the task quantity to be issued of task to be issued;
Based on the task quantity Matching amount threshold to be issued;
The task to be issued is sent to the corresponding message queue of the amount threshold.
2. the method for the queue scheduling that information as described in claim 1 is sent, which is characterized in that the amount threshold includes the One amount threshold and the second amount threshold, the message queue include first message queue and second message queue, and described first Amount threshold and first message queue correspondence, second amount threshold and the second message queue are corresponding, described to incite somebody to action The task to be issued is sent to the corresponding message queue of the amount threshold, comprising:
If the first amount threshold described in the task quantity Matching to be issued, the task to be issued is sent to described One message queue;
If the second amount threshold described in the task quantity Matching to be issued, the task to be issued is sent to described Two message queues.
3. the method for the queue scheduling that information as described in claim 1 is sent, which is characterized in that it is described based on described under Before hair task quantity Matching amount threshold, comprising:
Receive the amount threshold and the corresponding message queue of the amount threshold of user's input.
4. the method for the queue scheduling that information as claimed in claim 2 is sent, which is characterized in that the first message queue And/or second message queue includes at least one subqueue.
5. the method for the queue scheduling that information as claimed in claim 4 is sent, which is characterized in that the first message queue packet The first subqueue and the second subqueue are included, it is described that the task to be issued is sent to the first message queue, comprising:
Judge whether the first subtask quantity in first subqueue is greater than upper limit threshold;
If the first subtask quantity in first subqueue is not more than upper limit threshold, the task to be issued is sent To first subqueue;
If the first subtask quantity in first subqueue is greater than upper limit threshold, the task to be issued is sent to Second subqueue.
6. the method for the queue scheduling that information as claimed in claim 4 is sent, which is characterized in that described to appoint described wait issue Business is sent to the corresponding message queue of the amount threshold, comprising:
Obtain the first subtask quantity of first subqueue;
Obtain the second subtask quantity of second subqueue;
Judge the size of the first subtask quantity of first subqueue and the second subtask quantity of second subqueue;
It, will if the first subtask quantity of first subqueue is greater than the second subtask quantity of second subqueue The task to be issued is sent to second subqueue;
If the first subtask quantity of first subqueue is not more than the second subtask quantity of second subqueue, The task to be issued is sent to first subqueue.
7. the method for the queue scheduling that the information as described in claim 1-6 is sent, which is characterized in that the task to be issued is Send out certificate task.
8. a kind of device for the queue scheduling that information is sent characterized by comprising
Module is obtained, for obtaining the task quantity to be issued of task to be issued;
Matching module, for based on the task quantity Matching amount threshold to be issued;
Sending module, for the task to be issued to be sent to the corresponding message queue of the amount threshold.
9. a kind of server characterized by comprising
One or more processors;
Storage device, for storing one or more programs;
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The method of the queue scheduling now sent such as information of any of claims 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The method of the queue scheduling sent such as information of any of claims 1-7 is realized when execution.
CN201910818326.8A 2019-08-30 2019-08-30 Method, device, server and storage medium for queue scheduling of information transmission Active CN110515749B (en)

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 true CN110515749A (en) 2019-11-29
CN110515749B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015529A (en) * 2020-08-05 2020-12-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 (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6848107B1 (en) * 1998-11-18 2005-01-25 Fujitsu Limited Message control apparatus
US20060149787A1 (en) * 2004-12-30 2006-07-06 Kapil Surlaker Publisher flow control and bounded guaranteed delivery for message queues
US20110161978A1 (en) * 2009-12-28 2011-06-30 Samsung Electronics Co., Ltd. Job allocation method and apparatus for a multi-core system
CN102761832A (en) * 2011-04-28 2012-10-31 中国移动通信集团河南有限公司 Message distribution method and device
US20140115591A1 (en) * 2012-10-18 2014-04-24 Oracle International Corporation Apparatus, system and method for providing fairness in task servicing
CN106201676A (en) * 2016-06-28 2016-12-07 浪潮软件集团有限公司 Task allocation method and device
CN106851594A (en) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 A kind of broadcast transmission method, device and terminal
CN107395729A (en) * 2017-07-27 2017-11-24 深圳乐信软件技术有限公司 A kind of consumption system of message queue, 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
CN110049118A (en) * 2019-04-12 2019-07-23 深圳乐信软件技术有限公司 Information push method, device, equipment and storage medium
CN110149392A (en) * 2019-05-17 2019-08-20 优信拍(北京)信息科技有限公司 A kind of management method and device of PUSH message

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6848107B1 (en) * 1998-11-18 2005-01-25 Fujitsu Limited Message control apparatus
US20060149787A1 (en) * 2004-12-30 2006-07-06 Kapil Surlaker Publisher flow control and bounded guaranteed delivery for message queues
US7779418B2 (en) * 2004-12-30 2010-08-17 Oracle International Corporation Publisher flow control and bounded guaranteed delivery for message queues
US20110161978A1 (en) * 2009-12-28 2011-06-30 Samsung Electronics Co., Ltd. Job allocation method and apparatus for a multi-core system
CN102761832A (en) * 2011-04-28 2012-10-31 中国移动通信集团河南有限公司 Message distribution method and device
US20140115591A1 (en) * 2012-10-18 2014-04-24 Oracle International Corporation Apparatus, system and method for providing fairness in task servicing
CN106201676A (en) * 2016-06-28 2016-12-07 浪潮软件集团有限公司 Task allocation method and device
CN106851594A (en) * 2017-03-10 2017-06-13 广东欧珀移动通信有限公司 A kind of broadcast transmission method, device and terminal
CN107395729A (en) * 2017-07-27 2017-11-24 深圳乐信软件技术有限公司 A kind of consumption system of message queue, 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
CN110049118A (en) * 2019-04-12 2019-07-23 深圳乐信软件技术有限公司 Information push method, device, equipment and storage medium
CN110149392A (en) * 2019-05-17 2019-08-20 优信拍(北京)信息科技有限公司 A kind of management method and device of PUSH message

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BI ZHAO等: "A queuing-based delay-tolerant scheme for energy efficiency over cognitive radio networks", 《2012 IEEE GLOBECOM WORKSHOPS》 *
陆庆等: "消息队列中间件系统中消息队列与消息分发技术研究", 《计算机应用研究》 *
鲍春健等: "支持动态负载平衡的分层消息队列模型", 《计算机工程与应用》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112015529A (en) * 2020-08-05 2020-12-01 北京奇艺世纪科技有限公司 Data task scheduling method, system, electronic device and storage medium
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

Also Published As

Publication number Publication date
CN110515749B (en) 2022-06-24

Similar Documents

Publication Publication Date Title
CN109117260A (en) A kind of method for scheduling task, device, equipment and medium
EP3718008B1 (en) Provisioning using pre-fetched data in serverless computing environments
CN110417879A (en) A kind of message treatment method, device, equipment and storage medium
CN109348237A (en) A kind of direct broadcasting room management method, device, server and storage medium
CN109960541A (en) Start method, equipment and the computer storage medium of small routine
CN110377429A (en) A kind of control method, device, server and storage medium that real-time task calculates
CN105579959A (en) Virtualization of hardware accelerator
CN109618225A (en) Video takes out frame method, device, equipment and medium
CN109582316A (en) A kind of cross-platform Compilation Method, device, system, server and storage medium
CN110413390A (en) Thread task processing method, device, server and storage medium
CN110515749A (en) Method, apparatus, server and the storage medium for the queue scheduling that information is sent
CN109756568A (en) Processing method, equipment and the computer readable storage medium of file
CN110443690A (en) A kind of method, apparatus, server and the storage medium of variance data reconciliation
CN110457038A (en) Card display methods, device, equipment and the storage medium of attached application end
CN110365796A (en) Service request processing method, device
CN109242320A (en) Order allocation method, device, server and storage medium
CN109388475A (en) A kind of dispositions method, device, electronic equipment and the storage medium of physics bare machine
CN110309480A (en) It is a kind of to send part method, apparatus, express delivery cabinet and storage medium
CN110348783A (en) Method, apparatus, server and the storage medium of express delivery cabinet access
CN109032788B (en) Reserved resource pool dynamic dispatching method, device, computer equipment and storage medium
CN110517028A (en) Method, equipment and the computer storage medium of payment bill
CN109933199A (en) Control method, device, electronic equipment and storage medium based on gesture
CN109960554A (en) Show method, equipment and the computer storage medium of reading content
CN110413675A (en) A kind of control method, device, server and storage medium that real-time task calculates
CN107943377A (en) A kind of list is loaded into transition method, device, terminal and the storage medium of displaying

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