CN108415759A - Processing method, device and the electronic equipment of message - Google Patents

Processing method, device and the electronic equipment of message Download PDF

Info

Publication number
CN108415759A
CN108415759A CN201710071742.7A CN201710071742A CN108415759A CN 108415759 A CN108415759 A CN 108415759A CN 201710071742 A CN201710071742 A CN 201710071742A CN 108415759 A CN108415759 A CN 108415759A
Authority
CN
China
Prior art keywords
message
timed message
timed
index information
delay
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.)
Pending
Application number
CN201710071742.7A
Other languages
Chinese (zh)
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201710071742.7A priority Critical patent/CN108415759A/en
Publication of CN108415759A publication Critical patent/CN108415759A/en
Pending legal-status Critical Current

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Abstract

An embodiment of the present invention provides a kind of processing method of message, device and electronic equipments, are provided with multiple timing queues, and the multiple timing queue is corresponding with multiple preset delay ranks respectively, the method includes:Timed message is received, and data file is written into the timed message;According to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing queue;The multiple timing queue is monitored respectively, to judge whether to meet the timed message of default delivery condition;If there is the timed message for presetting delivery condition is met, then the index information for meeting the timed message for presetting delivery condition is delivered to the object queue, meets the timed message for presetting delivery condition so that user is obtained by the index information.The present invention improves timed message accumulation ability, and when timed message quantity is larger, can reduce timed message delay time error, ensures that timed message is delivered on time to a greater extent.

Description

Processing method, device and the electronic equipment of message
Technical field
A kind of field of computer technology of the embodiment of the present invention more particularly to processing method of message, device and equipment.
Background technology
Most of message-oriented middlewares, such as Ali's cloud MQ (Message Queue) and MetaQ (Metamorphosis) are It can support timed message or delay message.Currently, timed message or delay message have application in many business scenarios, Lift a simply example:When in shopping platform (for example, day cat) establishment order, it is assumed that the order is arranged and is not paid in 45 minutes It is closed, this just generates a delay message (or timed message).In our real life, especially network interaction In the process, timed message or delay message are seen everywhere.
The realization of timed message (or delay message) is mainly in the following way in the related art:Storage engines receive After the timed message sent to client, timed message is stored in waiting list (timing queue) first, then by individual line Timed message is delivered to target team by journey moment poll waiting list when meeting delivery condition (for example, reaching delay time) Row, by the consumer spending timed message.
During the realization present invention of inventor, it is found that there are following defects for the prior art:Timed message accumulates ability Weak, when timed message quantity is larger, server end scheduling pressure is big, dispatching is insufficient, leads to timed message bulk deposition, There is serious delay and delivers phenomenon.
Invention content
Processing method, device and the electronic equipment of message provided in an embodiment of the present invention promote timed message and accumulate ability, And when timed message quantity is larger, timed message delay time error can be reduced, ensure that timed message is punctual to a greater extent It delivers.
An aspect of of the present present invention provides a kind of processing method of message, is provided with multiple timing queues, the multiple timing Queue is corresponding with multiple preset delay ranks respectively, the method includes:Timed message is received, and the timed message is write Enter data file;According to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing In queue;The multiple timing queue is monitored respectively, to judge whether to meet the timed message of default delivery condition;If In the presence of the timed message for presetting delivery condition is met, then the index information for meeting the timed message for presetting delivery condition is delivered to The object queue meets the timed message for presetting delivery condition so that user is obtained by the index information.
The second aspect of the present invention provides a kind of processing unit of message, is provided with multiple timing queues, the multiple fixed When queue it is corresponding with multiple preset delay ranks respectively, described device includes:First receiving module disappears for receiving timing Breath, and data file is written into the timed message;First memory module is used for the delay rank according to the timed message, The index information of the timed message is stored in corresponding timing queue;Queue monitoring module is described more for monitoring respectively A timing queue, to judge whether to meet the timed message of default delivery condition;Message throws module again, for full when existing When the timed message of the default delivery condition of foot, the index information for meeting the timed message for presetting delivery condition is delivered to the mesh Queue is marked, meets the timed message for presetting delivery condition so that user is obtained by the index information.
The third aspect of the present invention provides a kind of electronic equipment, including:Memory, for storing program;Processor, coupling Be bonded to the memory, for executing described program, and be provided with multiple timing queues, the multiple timing queue respectively with it is more A preset delay rank corresponds to, for:Timed message is received, and data file is written into the timed message;According to institute The index information of the timed message is stored in corresponding timing queue by the delay rank for stating timed message;Institute is monitored respectively Multiple timing queues are stated, to judge whether to meet the timed message of default delivery condition;It is delivered if there is meeting to preset The index information for meeting the timed message for presetting delivery condition is then delivered to the object queue by the timed message of condition, with It is obtained by the index information for user and meets the timed message for presetting delivery condition.
The fourth aspect of the present invention provides a kind of processing method of message, is provided with multiple timing queues, the multiple fixed When queue it is corresponding with multiple preset delay ranks respectively, the method includes:Timed message is received, and by the timed message Data file is written;It is according to the delay rank of the timed message, the index information deposit of the timed message is corresponding fixed When queue in.
The fifth aspect of the present invention provides a kind of processing unit of message, is provided with multiple timing queues, the multiple fixed When queue it is corresponding with multiple preset delay ranks respectively, described device includes:Second receiving module disappears for receiving timing Breath, and data file is written into the timed message;Second memory module is used for the delay rank according to the timed message, The index information of the timed message is stored in corresponding timing queue.
The sixth aspect of the present invention provides a kind of electronic equipment, including:Memory, for storing program;Processor, coupling Be bonded to the memory, for executing described program, and be provided with multiple timing queues, the multiple timing queue respectively with it is more A preset delay rank corresponds to, for:Timed message is received, and data file is written into the timed message;According to institute The index information of the timed message is stored in corresponding timing queue by the delay rank for stating timed message.
The seventh aspect of the present invention provides a kind of processing method of message, is provided with multiple object queues, the multiple mesh Mark queue is corresponding with multiple original topic information respectively, and each object queue is stored with corresponding with the original topic information The index information of timed message, the timed message are stored in data file, the method includes:It is read from the object queue Take index information;Timed message corresponding with the index information is read from the data file according to the index information. The eighth aspect of the present invention provides a kind of processing unit of message, is provided with multiple object queues, the multiple object queue point Not corresponding with multiple original topic information, each object queue is stored with timed message corresponding with the original topic information Index information, the timed message is stored in data file, and described device includes:Index information read module is used for from institute It states and reads index information in object queue;Timed message read module, for according to the index information from the data file It is middle to read timed message corresponding with the index information.
The ninth aspect of the present invention provides a kind of electronic equipment, including:Memory, for storing program;Processor, coupling Be bonded to the memory, for executing described program, and be provided with multiple object queues, the multiple object queue respectively with it is more A original topic information corresponds to, and each object queue is stored with the index of timed message corresponding with the original topic information Information, the timed message are stored in data file, for:Index information is read from the object queue;According to described Index information reads timed message corresponding with the index information from the data file.
Using the embodiment of the present invention, the index information of timed message is deposited in by delay rank in timing queue, therefore Make timed message that there is the accumulation ability consistent with common message, and the index information of the timed message of delivery condition will be met It is delivered to object queue, user can use and arrive the timed message in order, reduce random file read-write, ensure server End will not reduce readwrite performance because of timed message, reduce the load pressure and scheduling pressure of server end, reduce timed message Accumulation reduces timed message error so as to ensure that timed message is delivered on time to a greater extent.
Above description is only the general introduction of technical solution of the present invention, in order to better understand the technical means of the present invention, And can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can It is clearer and more comprehensible, below the special specific implementation mode for lifting the present invention.
Description of the drawings
Fig. 1 is the handling principle schematic diagram of timed message in the related technology;
Fig. 2 is one of the flow diagram of processing method of message provided in an embodiment of the present invention;
Fig. 3 is the two of the flow diagram of the processing method of message provided in an embodiment of the present invention;
Fig. 4 is the processing procedure schematic diagram of timed message provided in an embodiment of the present invention;
Fig. 5 is the three of the flow diagram of the processing method of message provided in an embodiment of the present invention;
Fig. 6 is the four of the flow diagram of the processing method of message provided in an embodiment of the present invention;
Fig. 7 is one of the structural schematic diagram of processing unit of message provided in an embodiment of the present invention;
Fig. 8 is the second structural representation of the processing unit of message provided in an embodiment of the present invention;
Fig. 9 is the third structural representation of the processing unit of message provided in an embodiment of the present invention;
Figure 10 is the four of the structural schematic diagram of the processing unit of message provided in an embodiment of the present invention;
Figure 11 is the structural schematic diagram of electronic equipment provided in an embodiment of the present invention.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
In the description of the present invention, it is to be understood that, term " first ", " second " etc. are used for description purposes only, without It can be interpreted as indicating or implying relative importance.In addition, in the description of the present invention, unless otherwise indicated, the meaning of " multiple " It is two or more.
Timing queue can also be referred to as delay queue, it is a kind of message with timing function or delay feature Queue.For example when order is constantly in non-pay status, order how is timely being closed, and return inventoryHow periodically Check the whether reimbursement success of the order in reimbursement stateNew to create shop, without uploading commodity in N days, how is system Know the information, and send activation request message etc. in business scenario and will need to timing queue.
The producer of message generates a side of message, can be some module in server, can also be other services Device can also be the user terminal etc. for having interacting message with server.By taking the application scenarios of shopping platform as an example, such as businessman The order created according to the purchase request of buyer, and according to the setting of order generation module in system, order was at 45 minutes It does not pay inside and is closed, this just generates a delay message (or timed message) in this way, it is desirable that consumer is in 45 minutes It does not pay, if still do not paid the bill to 45 minutes orders, needs that consumer or notice cancellation of order module is notified to go The message is handled, order generation module of the businessman in other words on transaction platform is the producer of message.
The user of message can be some module in server using a side of message, can also be other services Device can also be the user terminal etc. for having interacting message with server.Specifically occupation mode can be simply read, or Person is further processed to the message itself or based on the message.Still by taking above-mentioned shopping platform as an example, consumer needs The payment of order is completed in 45 minutes, if still do not paid the bill to 45 minutes orders, transaction platform notifies consumer, At this moment consumer can read the message, and carry out delivery operation.Certainly, if the message is not paid for, transaction platform Cancellation of order module can also read the message and be canceled.Herein, the terminal of consumer or transaction platform are ordered Single user for cancelling module and may act as message.
Fig. 1 is the handling principle schematic diagram of timed message in the related technology.As shown in Figure 1, client can be deployed in example Such as mobile phone, notebook, the end sides pad can produce timed message (for example, passing through client as the producer of message Human-computer interaction interface receive user be similar to order request etc., to generate timed message), and timed message can be sent out Give server end.In server end, timed message can be placed in timing queue by storage engines first, then by The timed message is delivered to object queue by individual thread poll timing queue when timed message meets delivery condition, with It is used for the user of message.
In embodiments of the present invention, the storage of timed message and reading are improved using process, improve timed message Accumulation ability, and reduce server end load pressure, scheduling pressure, the accumulation of timed message is reduced, so as to bigger Ensure that timed message is delivered on time in degree.
In order to which those skilled in the art can clearly and accurately understand technical scheme of the present invention, below in conjunction with attached drawing And technical scheme of the present invention is described in detail in related embodiment.
Embodiment one
Fig. 2 is one of the flow diagram of processing method of message provided in an embodiment of the present invention.
As shown in Fig. 2, a kind of processing method of message of the embodiment of the present invention may include steps of:
Step 210, timed message is received, and data file is written into timed message.This step can transport in the server Row software program is realized.
In server end, for example, the storage engines in server, generator (such as the client from message can be received End) generate timed message, and by storage engines will timed message be written data file in.
Step 220, according to the delay rank of timed message, the index information of timed message is stored in corresponding timing queue In.This step runs software program can be realized in the server.
In an embodiment of the present invention, timed message may include delay rank, which can be in message What generator selected during generating message from preset delay rank, for example, engineer can rule of thumb in advance The delay rank of some business scenarios is set, is stored, when generator generates message, according to practical business scene, is selected Corresponding delay rank, delay rank can be set in advance to be corresponding with a scheduled delay duration, in order to area below Not, referred to herein as the first delay duration.Further, step 220 can be implemented as the read latch rank from timed message, and According to the delay rank of timed message, the index information of timed message is stored in corresponding timing queue.
In an alternative embodiment of the invention, may include having time of delivery or the second delay duration in timed message, wherein Time of delivery or the second delay duration are what message generator set during generating message, illustratively, the life of message Winner can set the time of delivery of the message (for example, time of delivery is 21 days 14 January in 2017 first when generating message: 00, it is assumed that current time is 20 days 14 January in 2017:00, then when being the delivery of the message after current time timing, 24 hours Between) or the second delay duration (for example, the second delay duration is 15min, then after current time timing, 15min for need to should Message dilivery is to object queue, for user's use of message).Further, step 220 can be implemented as from timed message Middle reading time of delivery or the second delay duration, and according to time of delivery or the second delay duration, determine the delay of timed message The index information of timed message is stored in corresponding timing queue by rank then according to the delay rank of timed message.Example Property, time of delivery or the other correspondence of the corresponding delay stages of the second delay duration can be pre-set and be stored, reception is worked as When to timed message, first corresponding field reads storage time of delivery or the second delay duration from timed message, then basis Time of delivery or the second delay duration determine the delay rank of timed message from the correspondence of storage, further according to delay rank The index information of timed message is stored in corresponding timing queue.
In embodiments of the present invention, the index information of timed message may include the storage of timed message in the data file The offset of position.The effective address that offset, that is, data store in the data file, therefore, according to timed message in data text The offset of storage location in part can correctly find the address in the data file of the timed message.
It will be appreciated by persons skilled in the art that in the embodiment of the present invention, according to the delay rank of timed message, will determine When message index information be stored in corresponding with its rank that is delayed timing queue, rather than timed message itself is stored in timing team Row, therefore, accumulation ability can be consistent with the accumulation ability of common message, to sum up, improving the accumulation of timed message Ability.
Step 230, multiple timing queues are monitored respectively, to judge whether that the timing for meeting default delivery condition disappears Breath.This step runs software program can be realized in the server.If it is present executing step 240.
In this step, multiple delay ranks correspond to multiple preset first delay durations respectively, can by one or Multiple threads monitor multiple timing queues, time interval the prolonging according to multiple delay queues of poll respectively in a manner of poll When grade setting.It illustratively, can be by the multiple timing queues of thread poll, for example, there is multiple delays shown in table 1 Rank and corresponding multiple first delay durations, then the thread can be every in the timing queue that 1s monitoring delay ranks are 1 to 3 Whether the timed message that meets preset delivery condition is had, and the timing queue for being 4 to 12 every 1min monitoring delay ranks. It, can be by multiple multiple timing queues of thread poll, for example, it is multiple fixed that 3 thread polls may be used in other examples When queue, illustratively, 3 threads for example be respectively the second grade thread, minute grade thread and hour rank thread, In, the thread of second grade can be used for the timing queue that the delay rank in poll such as table 1 is 1 and 2, and the thread of minute grade can be with Thread for timing queue and hour grade that the delay rank in poll such as table 1 is 3-9 can be used for poll such as table Be delayed the timing queue that rank is 10-12 in 1.Using the embodiment, the scheduling thread run by rank can be protected to a greater extent Barrier timed message is delivered on time.
Meet default delivery condition in this step to be specifically as follows:Timed message index information deposit timing queue when Between have reached the first delay duration, if reached, then follow the steps 240.
The correspondence of table 1 delay rank and the first delay duration
As shown in table 1, multiple delay ranks correspond to multiple preset first delay durations and multiple delay ranks correspond to Multiple timing queues.In this step, corresponding timing queue is monitored according to delay rank, to judge to determine in the timing queue When message whether reach its first delay time, then follow the steps 240 if reached.
Step 240, the index information for meeting the timed message for presetting delivery condition is delivered to object queue, for using Person is obtained by index information meets the timed message for presetting delivery condition.This step can runs software program in the server It realizes.
In this step, for example, being up to the index information of the timed message of its first delay time (for example, the timing The address date of the storage location of message in the data file) it is delivered in object queue.The user of message can be from target The index information that timed message is read in queue, goes to read timed message in data file further according to index information, fixed to use When message.
Using the embodiment of the present invention, the index information of timed message is deposited in by delay rank in timing queue, therefore Make timed message that there is the accumulation ability consistent with common message, and the index information of the timed message of delivery condition will be met It is delivered to object queue, the user of message can use in order arrives the timed message, reduces random file read-write, ensures Server end will not reduce readwrite performance because of timed message, reduce the load pressure and scheduling pressure of server end, can be with bigger Ensure that timed message is delivered on time, reduces timed message error in degree.
Embodiment two
Fig. 3 is the two of the flow diagram of the processing method of message provided in an embodiment of the present invention.
As shown in figure 3, a kind of processing method of message of the embodiment of the present invention may include steps of:
Step 310, timed message is received, and data file is written into timed message.This step can transport in the server Row software program is realized.
The realization process of this step can refer to step 210, for sake of simplicity, details are not described herein.
Step 320, it modifies to the original topic information of timed message, on the basis of retaining original topic information, Increase preset additional subject matter information, to form new subject information.This step runs software program can be realized in the server.
It will be appreciated by persons skilled in the art that message subject (Topic), for classifying to message.Message The theme of the message can be arranged when generating message in producer.
It in this step, can be by the original topic information of modification timed message, by common message and timed message area It separates.Illustratively, it when received server-side is to message, can first judge the delay rank of the message, such as work as delay stages Not great Yu 0 when, it may be determined that the message is timed message, and then changes the original topic information of the timed message, new to be formed Subject information.Modification original topic information is that new subject information can be implemented as:On the basis of retaining original topic information, increase Add preset additional subject matter information.For example, original topic information is TOPIC, then on the basis of TOPIC, in addition SCHEDULE, Form new subject information SCHEDULE_TOPIC.
Step 330, the timed message with new subject information is chosen, and according to the delay rank of the timed message, will be determined When message index information be stored in corresponding timing queue.This step runs software program can be realized in the server.
It will be appreciated by persons skilled in the art that a variety of file datas can be stored in the data file, for example, it is a variety of Message, including common message, timed message etc..
In this step, common message and timed message can be distinguished by the theme of message.There to be new subject information Message be determined as timed message, and the index information of the timed message can be stored according to the delay rank of timed message In corresponding timing queue.The process that the index information of timed message is stored in timing queue may refer to embodiment illustrated in fig. 2 Step 220, for sake of simplicity, details are not described herein.
Step 340, multiple timing queues are monitored respectively, to judge whether that the timing for meeting default delivery condition disappears Breath.This step runs software program can be realized in the server.The timed message that delivery condition is preset if there is meeting, then hold Row step 350.
The realization process and principle, effect of this step may refer to the step 230 of embodiment illustrated in fig. 2, for sake of simplicity, This is repeated no more.
Step 350, the timed message for meeting and presetting delivery condition is obtained from data file according to index information.This step It runs software program can realize in the server.
It in this step, can be corresponding from data file to deposit according to the index information of timed message in timing queue It stores up address and obtains the timed message for meeting and presetting delivery condition.For example, index information is 300, i.e., the timed message is in data text Storage address in part is 300, according to the storage address searching data file, to obtain timed message from the address.
Step 360, the new subject information in the timed message of default delivery condition is revised as original topic information.This step Suddenly it runs software program can realize in the server.
After step 350 obtains and meets the timed message for presetting delivery condition, in this step, thrown for the satisfaction is default Its new subject information is revised as original topic information, such as the new subject information of the timed message by the timed message for passing condition For SCHEDULE_TOPIC, it is revised as original topic information TOPIC, to which the timed message is revised as general information.
In some instances, the delay rank of the timed message can also be changed, it is assumed for example that the delay of the timed message Rank is 1, and the delay rank of the timed message can be revised as to 0 in this step, such as delay rank 0 corresponding first is prolonged Constantly a length of 0.By the subject information for changing timed message and the rank that is delayed, timed message is revised as common message, so that The user of message can sequentially read the timed message at any time.
Step 370, the timed message after original topic will be revised as and the presently written position of data file is written, and updated Meet the index information for the timed message for presetting delivery condition.This step runs software program can be realized in the server.
In this step, can will be revised as the timed message after original topic and re-write data file, but its Storage location in data file can change, i.e., offset can change.Illustratively, after original topic being revised as Timed message write-in data file presently written position, for example, before being revised as original topic, timed message is in number It is 3000 according to the storage address in file, after being revised as original topic, it is assumed that deposit the presently written position of data file It is 4001 to store up address, then the timed message is re-write the position that storage address is 4001 in data file.
After timed message is re-write in data file, since the offset of timed message is changed, Meet the index information for the timed message for presetting delivery condition according to new offset update in this step.
Step 380, according to original topic information, which is preset to the updated index of the timed message of delivery condition Information delivery meets to object queue corresponding with original topic information so that user is obtained by updated index information The timed message of default delivery condition.This step runs software program can be realized in the server.
In this step, corresponding mesh is written into the updated index information for meeting the timed message for presetting delivery condition It marks in queue.The user of message can get the timed message by reading the updated index information in object queue Storage address in the data file, to read timed message.
It will be appreciated by persons skilled in the art that mechanical hard disk is when being written and reading data, what is be all made of is same A magnetic head, in data procedures are written, magnetic head remains at presently written position, and when reading data, magnetic head is needed from working as Preceding writing position is moved to the position that need to read data storage, to read corresponding data from the position.And the embodiment of the present invention In, the index information (including new offset) for meeting the timed message for presetting delivery condition will be regenerated and be distributed to target team After in row, these timed message will be in the storage region near presently written position, and the magnetic head most of the time is also Writing position in this prior is kept, in this way when subsequent message user transfers these timed message, does not have to a wide range of move Dynamic magnetic head goes to read the old timed message being written before, to improve the message reading efficiency during message use.
To sum up, using the embodiment of the present invention, timed message content is stored in data file, and index information presses delay stages It is not deposited in timed message queue, the stacking energy of timed message will be improved with the accumulation ability consistent with common message Power.
And the index information for the timed message for meeting delivery condition is delivered to object queue, the user of message can be with The timed message is used in order, reduces the load pressure and scheduling pressure of server end, it is fixed to ensure to a greater extent When message delivered on time, reduce timed message error.
In addition, in embodiments of the present invention, first the original storage position acquisition of timed message is fixed to this from data file When message, the timed message is then re-write into the presently written position in data file again, therefore, in the user of message It can directly be read from presently written position when using the timed message, go to obtain old message without moving head, to Random file IO can be reduced, and then ensures that server end will not reduce readwrite performance because of timed message, and improves digital independent Efficiency.
Embodiment three
Fig. 5 is the three of the flow diagram of the processing method of message provided in an embodiment of the present invention.
As shown in figure 5, a kind of processing method of message provided in an embodiment of the present invention, wherein it is multiple fixed to be provided with When queue, multiple timing queues are corresponding with multiple preset delay ranks respectively, and this method may include steps of:
Step 410, timed message is received, and data file is written into timed message.This step can transport in the server Row software program is realized.
In server end, for example, the storage engines in server, generator (such as the client from message can be received End) generate timed message, and by storage engines will timed message be written data file in.
Step 420, according to the delay rank of timed message, the index information of timed message is stored in corresponding timing queue In.This step runs software program can be realized in the server.
In an embodiment of the present invention, timed message may include delay rank, which can be in message What generator selected during generating message from preset delay rank, for example, engineer can rule of thumb in advance The delay rank of some business scenarios is set, is stored, when generator generates message, according to practical business scene, is selected Corresponding delay rank, delay rank can be set in advance to be corresponding with a scheduled delay duration, in order to area below Not, referred to herein as the first delay duration.Further, step 420 can be implemented as the read latch rank from timed message, and According to the delay rank of timed message, the index information of timed message is stored in corresponding timing queue.
In an alternative embodiment of the invention, may include having time of delivery or the second delay duration in timed message, wherein Time of delivery or the second delay duration are what message generator set during generating message, illustratively, the life of message Winner can set the time of delivery of the message (for example, time of delivery is 21 days 14 January in 2017 first when generating message: 00, it is assumed that current time is 20 days 14 January in 2017:00, then when being the delivery of the message after current time timing, 24 hours Between) or the second delay duration (for example, the second delay duration is 15min, then after current time timing, 15min for need to should Message dilivery is to object queue, for user's use of message).Further, step 420 can be implemented as from timed message Middle reading time of delivery or the second delay duration, and according to time of delivery or the second delay duration, determine the delay of timed message The index information of timed message is stored in corresponding timing queue by rank then according to the delay rank of timed message.Example Property, time of delivery or the other correspondence of the corresponding delay stages of the second delay duration can be pre-set and be stored, reception is worked as When to timed message, first corresponding field reads storage time of delivery or the second delay duration from timed message, then basis Time of delivery or the second delay duration determine the delay rank of timed message from the correspondence of storage, further according to delay rank The index information of timed message is stored in corresponding timing queue.
In embodiments of the present invention, the index information of timed message may include the storage of timed message in the data file The offset of position.The effective address that offset, that is, data store in the data file, therefore, according to timed message in data text The offset of storage location in part can correctly find the address in the data file of the timed message.
Using the embodiment of the present invention, according to the delay rank of timed message, index information deposit by timed message and its In the corresponding timing queue of the rank that is delayed, rather than timed message itself is stored in timing queue, therefore, accumulation ability can be with The accumulation ability of common message is consistent, improves the accumulation ability of timed message.
Example IV
Fig. 6 is the four of the flow diagram of the processing method of message provided in an embodiment of the present invention.
As shown in fig. 6, a kind of processing method of message provided in an embodiment of the present invention, wherein multiple mesh can be provided with Queue is marked, multiple object queues are corresponding with multiple original topic information respectively, and each object queue is stored with and original topic information The index information of corresponding timed message, timed message store in the data file, and this method may include steps of:
Step 610, index information is read from object queue.This step can in the server runs software program it is real It is existing, can be specifically that server asks in response to the acquisition timed message of user and triggers and execute step 610, and then executes step again Rapid 620, to user is supplied to use timed message.
It in this step, in some embodiments, can be in the instruction for receiving user's reading message from message When, such as the storage engines of server can read corresponding index information from object queue.In further embodiments, may be used According to the delay time of timed message, the index information for reaching corresponding message is read periodically from object queue.
Step 620, timed message corresponding with index information is read from data file according to index information.This step can It is realized with runs software program in the server.
In this step, index information for example may include the offset of timed message in the data file, i.e. storage Location, therefore can in the data file be searched by index information and obtain corresponding timed message.In the present invention, in timing After message reaches delay time, then it is newly stored into the presently written position of data file, and the original of index information and timed message Beginning subject information corresponds to, and therefore, the timed message obtained by the index information in object queue can be such as common message one Sample is delivered, and can accelerate the speed of message dilivery in this way and improve to deliver efficiency.
Using the embodiment of the present invention, index information is stored in object queue, the accumulation ability of timed message can be improved, and The index information stored in object queue is corresponding with the original topic information of timed message, therefore by the index information from data The timed message obtained in file can be delivered as common message, to accelerate the delivery speed of message, improve Deliver efficiency.
The achievable technical principle of technical solution of the present invention and detailed technology scheme are illustrated in previous embodiment, in order to make Those skilled in the art can more accurately understand the present invention, below in conjunction with Fig. 4 to the embodiment of the present invention to timed message Write-in and reading process further illustrate.Embodiment five
Fig. 4 is the processing procedure schematic diagram of timed message provided in an embodiment of the present invention, through this embodiment again from entirety On the illustratively timed message of the embodiment of the present invention processing procedure.
As described in Figure 4, the producer of message generates timed message, and transmits the message to the storage engines of server end, Timed message is stored in data file, and can change the master of timed message by storage engines first after receiving timed message Information is inscribed, to distinguish the timed message and common message in data file, and the offset according to timed message in the data file Amount generates index information, index information is stored in corresponding timing queue, from figure, it can be seen that including multiple timing teams Row, as in figure queue 1 to queue X, wherein 1-X indicates the delay rank of timed message, more as described in aforementioned implementation embodiment A delay rank corresponds to multiple timing queues.And in embodiments of the present invention, one or more scheduling thread can be passed through Monitor multiple timing queues in a manner of poll, for example, scheduling thread can be divided into it is second grade, minute grade and hour grade, point The not periodically corresponding timing queue of poll.
When monitoring with the timed message for presetting delivery condition is met, storage engines will can periodically disappear scheduling thread Breath is thrown into data file again, wherein when throwing the timed message again, the subject information that can change the timed message is original Subject information, and the delay rank (such as being revised as 0) of the timed message is changed, and new index information is generated, then will be new Index information write-in object queue in, in addition, also from timed message, currently storage location in the data file takes out timing Message, and timed message is re-write to the presently written position of data file.Therefore, the user of message can be from target The new index information of timed message is read in queue, and this is read from data file according to new index information and is periodically disappeared Breath, to use the timed message.
The present invention also provides a kind of processing units of the message using above method embodiment.Below in conjunction with Fig. 7 and The processing unit of message is described in detail in Figure 10.
Embodiment six
Fig. 7 is one of the structural schematic diagram of processing unit of message provided in an embodiment of the present invention.
As shown in fig. 7, a kind of processing unit of message, multiple timing queues can be provided in the device, wherein multiple Timing queue is corresponding with multiple preset delay ranks respectively.The processing unit of the message may include the first receiving module 510, First memory module 520, queue monitoring module 530 and message throw module 540 again.
First receiving module 510 can be used for receiving timed message, and data file is written in timed message.
First memory module 520 is used for the delay rank according to timed message, by the index information deposit pair of timed message In the timing queue answered.Illustratively, the index information of timed message may include the storage of timed message in the data file The offset of position.
In some embodiments, can include delay rank in timed message, the delay rank for including in timed message It is selected from multiple preset delay ranks during generating message for message generator.Based on this, first stores mould Block 520 may include the first reading unit (not shown) and the first storage unit (not shown), wherein first reads Unit can be used for the read latch rank from timed message, and the first storage unit can be used for the delay stages according to timed message Not, the index information of timed message is stored in corresponding timing queue.
In further embodiments, it in timed message can include time of delivery or the second delay duration, time of delivery Or second delay duration message generator set during generating message.Based on this, the first memory module 520 can wrap Include the second reading unit (not shown), delay level deciding unit (not shown) and the second storage unit (in figure not It shows).Wherein, the second reading unit can be used for reading time of delivery or the second delay duration from timed message.Delay stages Other determination unit can be used for determining the delay rank of timed message according to time of delivery or the second delay duration.Second storage Unit can be used for the delay rank according to timed message, and the index information of timed message is stored in corresponding timing queue.
Queue monitoring module 530 can be used for monitoring multiple timing queues respectively, to judge whether to meet default throwing Pass the timed message of condition.
Wherein, queue monitoring module 530 may include poll monitoring unit (not shown), and poll monitoring unit can be with For by one or more threads, monitoring multiple timing queues respectively in a manner of poll, the time interval of poll is according to more The delay grade setting of a delay queue.
Illustratively, multiple delay ranks correspond to multiple preset first delay durations respectively, meet and preset delivery condition Specially:The time of the index information deposit timing queue of timed message has reached the first delay duration.
Message is thrown module 540 and be can be used for when there is the timed message for meeting default delivery condition again, default by meeting The index information of the timed message of delivery condition is delivered to object queue, is preset so that user obtains to meet by index information The timed message of delivery condition.
Using the embodiment of the present invention, the index information of timed message is deposited in by delay rank in timing queue, therefore Make timed message that there is the accumulation ability consistent with common message, and the index information of the timed message of delivery condition will be met It is delivered to object queue, the user of message can get the timed message in order, reduce random file read-write, ensure Server end will not reduce readwrite performance because of timed message, reduce the load pressure and scheduling pressure of server end, can be with bigger Ensure that timed message is delivered on time, reduces timed message error in degree.
Embodiment seven
Fig. 8 is the second structural representation of the processing unit of message provided in an embodiment of the present invention.
As shown in figure 8, a kind of processing unit of message may include the first receiving module 510, the first memory module 520, Queue monitoring module 530, message throw module 540 and theme modified module 550 again.
Wherein, the first receiving module 510, the first memory module 520, queue monitoring module 530 and message throw module 540 again Function can refer to embodiment shown in Fig. 7.
In the present embodiment, the processing unit of message is additionally arranged theme modified module 550, and the structures of modules also will be with Improvement.
First receiving module 510 can be used for receiving timed message, and data file is written in timed message.
Theme modified module 550 can be used for that timed message being written in the first receiving module 510 process of data file In, it modifies to the original topic information of timed message, on the basis of retaining original topic information, increases preset additional Subject information, to form new subject information.
First memory module 520 can be used for the delay rank according to timed message, and the index information of timed message is deposited Enter in corresponding timing queue.After specifically, the first memory module 520 can be used for changing based on theme modified module 550 The new subject information arrived chooses the timed message with new subject information, and according to the delay rank of the timed message, will timing The index information of message is stored in corresponding timing queue.
Queue monitoring module 530 can be used for monitoring multiple timing queues respectively, to judge whether to meet default throwing Pass the timed message of condition.
Message is thrown module 540 and be can be used for when there is the timed message for meeting default delivery condition again, default by meeting The index information of the timed message of delivery condition is delivered to object queue, is preset so that user obtains to meet by index information The timed message of delivery condition.Illustratively, multiple object queues can be provided in the storage engines of server end, and more A object queue is corresponding with multiple original topic information respectively.
In some embodiments, it may include message retrieval unit 541, theme modification unit 542 that message throws module 540 again With message dilivery unit 543.Wherein, message retrieval unit 541 can be used for being obtained from data file according to index information full The timing of the default delivery condition of foot disappears.Theme modification unit 542 can be used for and will be in the timed message of default delivery condition New subject information is revised as original topic information.Message dilivery unit 543 can be used for according to original topic information, by the satisfaction The index information of the timed message of default delivery condition is delivered to object queue corresponding with original topic information, for user It is obtained by index information and meets the timed message for presetting delivery condition.
In further embodiments, it can also include third storage unit 544, it will be pre- for changing unit 542 in theme If the new subject information in the timed message of the condition of delivery is revised as after original topic information, after being revised as original topic The presently written position of data file is written in timed message, and updates the index letter for meeting the timed message for presetting delivery condition Breath.Based on this, message dilivery unit 543 specifically can be used for according to original topic information, which is preset delivery condition The updated index information of timed message is delivered to object queue corresponding with original topic information, so that user passes through more Index information after new obtains the timed message for meeting and presetting delivery condition.
To sum up, using the embodiment of the present invention, timed message content is stored in data file, and index information presses delay stages It is not deposited in timed message queue, the stacking energy of timed message will be improved with the accumulation ability consistent with common message Power.
And the index information for the timed message for meeting delivery condition is delivered to object queue, the user of message can be with The timed message is read in order, reduces the load pressure and scheduling pressure of server end, it is fixed to ensure to a greater extent When message delivered on time, reduce timed message error.
In addition, in embodiments of the present invention, first the original storage position acquisition of timed message is fixed to this from data file When message, the timed message is then re-write into the presently written position in data file again, therefore, in the user of message It can directly be read from presently written position when obtaining the timed message, go to obtain old message without moving head, to Random file IO can be reduced, and then ensures that server end will not reduce readwrite performance because of timed message, and improves digital independent Efficiency.
Embodiment eight
Fig. 9 is the third structural representation of the processing unit of message provided in an embodiment of the present invention.
As shown in figure 9, a kind of processing unit of message may include the second receiving module 910 and the second memory module 920. Wherein, the processing unit of message can be provided with multiple timing queues, multiple timing queues respectively with multiple preset delay stages Dui Ying not.
Second receiving module 910 can be used for receiving timed message, and data file is written in timed message.
Second memory module 920 can be used for the delay rank according to timed message, and the index information of timed message is deposited Enter in corresponding timing queue.
In some embodiments, can include delay rank in timed message, delay rank can be message generator It is selected from multiple preset delay ranks during generating message.Based on this, the second memory module 920 specifically can be with For the read latch rank from timed message, and according to the delay rank of timed message, the index information of timed message is deposited Enter in corresponding timing queue.
In further embodiments, it in timed message can include time of delivery or the second delay duration, time of delivery Or second delay duration can be that message generator set during generating message.Based on this, the second memory module 920 When specifically can be used for reading time of delivery or the second delay duration from timed message, and being delayed according to time of delivery or second It is long, it determines the delay rank of timed message, then, according to the delay rank of timed message, the index information of timed message is deposited Enter in corresponding timing queue.
Using the embodiment of the present invention, according to the delay rank of timed message, index information deposit by timed message and its In the corresponding timing queue of the rank that is delayed, rather than timed message itself is stored in timing queue, therefore, accumulation ability can be with The accumulation ability of common message is consistent, improves the accumulation ability of timed message.
Embodiment nine
Figure 10 is the four of the structural schematic diagram of the processing unit of message provided in an embodiment of the present invention.As shown in Figure 10, one The processing unit of kind message may include index information read module 1010 and timed message read module 1020.Wherein, message Processing unit can be provided with multiple object queues, multiple object queues are corresponding with multiple original topic information respectively, each mesh Mark queue is stored with the index information of timed message corresponding with original topic information, and timed message is stored in data file.
Index information read module 1010 can be used for reading index information from object queue.
Timed message read module 1020 can be used for being read from data file according to index information and index information pair The timed message answered.
Using the embodiment of the present invention, index information is stored in object queue, the accumulation ability of timed message can be improved, and The index information stored in object queue is corresponding with the original topic information of timed message, therefore by the index information from data The timed message obtained in file can be delivered as common message, to accelerate the delivery speed of message, improve Deliver efficiency.
Embodiment ten
The foregoing describe the built-in function of the processing unit of message and structure, Figure 11 is electronics provided in an embodiment of the present invention The structural schematic diagram of equipment, as shown in figure 11, in practice, the processing unit of the message in above-described embodiment can be realized as a kind of electricity Sub- equipment may include:Memory 111 and processor 112.
Memory 111, for storing program.
In addition to above procedure, memory 111 is also configured to store various other data to support in electronic equipment On operation.The example of these data includes the instruction for any application program or method that operate on an electronic device, example Such as electric business platform, telephone book data, message, picture, video etc. on online shopping platform, line.
Memory 111 can realize by any kind of volatibility or non-volatile memory device or combination thereof, Such as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable is read-only Memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, disk Or CD.
Processor 112 is coupled to memory 111, for executing the program in memory 111.
In an embodiment of the present invention, processor 112 can be provided with multiple timing queues, multiple timing queues respectively with Multiple preset delay ranks correspond to, for:
Timed message is received, and data file is written into timed message;
According to the delay rank of timed message, the index information of timed message is stored in corresponding timing queue;
Multiple timing queues are monitored respectively, to judge whether to meet the timed message of default delivery condition;
If there is the timed message for presetting delivery condition is met, then it will meet the rope for the timed message for presetting delivery condition Fuse breath is delivered to object queue, meets the timed message for presetting delivery condition so that user is obtained by index information.
In an alternative embodiment of the invention, processor 112 can be provided with multiple timing queues, multiple timing queue difference It is corresponding with multiple preset delay ranks, for:
Timed message is received, and data file is written into timed message;
According to the delay rank of timed message, the index information of timed message is stored in corresponding timing queue.
In an alternative embodiment of the invention, processor 112 can be provided with multiple object queues, multiple object queue difference Corresponding with multiple original topic information, each object queue is stored with the index letter of timed message corresponding with original topic information Breath, timed message are stored in data file, for:
Index information is read from object queue;
Timed message corresponding with index information is read from data file according to index information.
Above-mentioned specific processing operation is described in detail in embodiment in front, and details are not described herein.
Further, as shown in figure 11, electronic equipment can also include:Communication component 113, power supply module 114, audio component 115, other components such as display 116.Members are only schematically provided in Figure 11, are not meant to that electronic equipment only includes figure Component shown in 11.
Communication component 113 is configured to facilitate the communication of wired or wireless way between electronic equipment and other equipment.Electricity Sub- equipment can access the wireless network based on communication standard, such as WiFi, 2G or 3G or combination thereof.It is exemplary at one In embodiment, communication component 113 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, communication component 113 further includes near-field communication (NFC) module, to promote short range communication. For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band (UWB) skill can be based in NFC module Art, bluetooth (BT) technology and other technologies are realized.
Power supply module 114 provides electric power for the various assemblies of electronic equipment.Power supply module 114 may include power management System, one or more power supplys and other generate, manage and distribute electric power associated component with for electronic equipment.
Audio component 115 is configured as output and/or input audio signal.For example, audio component 115 includes a Mike Wind (MIC), when electronic equipment is in operation mode, when such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The received audio signal can be further stored in memory 111 or via communication set Part 113 is sent.In some embodiments, audio component 115 further includes a loud speaker, is used for exports audio signal.
Display 116 includes screen, and screen may include liquid crystal display (LCD) and touch panel (TP).If screen Curtain includes touch panel, and screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one A or multiple touch sensors are to sense the gesture on touch, slide, and touch panel.Touch sensor can not only sense tactile It touches or the boundary of sliding action, but also detects and touch or the relevant duration and pressure of slide.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above-mentioned each method embodiment can lead to The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer read/write memory medium.The journey When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or The various media that can store program code such as person's CD.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Present invention has been described in detail with reference to the aforementioned embodiments for pipe, it will be understood by those of ordinary skill in the art that:Its according to So can with technical scheme described in the above embodiments is modified, either to which part or all technical features into Row equivalent replacement;And these modifications or replacements, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (24)

1. a kind of processing method of message, which is characterized in that be provided with multiple timing queues, the multiple timing queue respectively with Multiple preset delay ranks correspond to, the method includes:
Timed message is received, and data file is written into the timed message;
According to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing queue;
The multiple timing queue is monitored respectively, to judge whether to meet the timed message of default delivery condition;
If there is the timed message for presetting delivery condition is met, then the index for meeting the timed message for presetting delivery condition is believed Breath is delivered to the object queue, so that user is disappeared by the timing of the default delivery condition of index information acquisition satisfaction Breath.
2. processing method according to claim 1, which is characterized in that the multiple delay rank corresponds to multiple default respectively The first delay duration;
The satisfaction presets delivery condition:The index information of the timed message has been stored in the time of the timing queue Through reaching first delay duration.
3. processing method according to claim 1, which is characterized in that described to monitor the multiple timing queue packet respectively It includes:
By one or more threads, the multiple timing queue is monitored respectively in a manner of poll, between the time of the poll Every the delay grade setting according to the multiple delay queue.
4. processing method according to claim 1, which is characterized in that include delay rank, institute in the timed message State include in timed message delay rank be message generator during generating message from the multiple preset delay It is selected in rank;
The index information of the timed message is stored in corresponding timing queue by the delay rank according to the timed message In be specially:The delay rank is read from the timed message, and according to the delay rank of the timed message, it will be described The index information of timed message is stored in corresponding timing queue.
5. processing method according to claim 1, which is characterized in that include time of delivery or in the timed message Two delay durations, the time of delivery or the second delay duration are what message generator set during generating message;
The index information of the timed message is stored in corresponding timing queue by the delay rank according to the timed message In be specially:
The time of delivery or the second delay duration are read from the timed message, and according to the time of delivery or described Two delay durations determine the delay rank of the timed message;
Then, according to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing team In row.
6. according to the method described in claim 1, it is characterized in that, further including:Data file is being written into the timed message During, it modifies to the original topic information of the timed message, on the basis of retaining the original topic information, Increase preset additional subject matter information, to form new subject information;
The index information of the timed message is stored in corresponding timing queue by the delay rank according to the timed message Include:
The timed message with new subject information is chosen, and according to the delay rank of the timed message, by the timed message Index information is stored in corresponding timing queue.
7. according to the method described in claim 6, it is characterized in that, be provided with multiple object queues, the multiple object queue It is corresponding with multiple original topic information respectively;
It is described that the index information for meeting the timed message for presetting delivery condition is delivered to the object queue, so that user is logical Crossing the timed message that the index information acquisition meets default delivery condition includes:
Obtain from the data file timed message for meeting and presetting delivery condition according to the index information, and by default throwing The new subject information passed in the timed message of condition is revised as original topic information;
According to the original topic information, which is preset the timed message of delivery condition index information be delivered to it is described The corresponding object queue of original topic information presets determining for delivery condition so that user obtains to meet by the index information When message.
8. the method according to the description of claim 7 is characterized in that being obtained from the data file according to the index information Meet the timed message for presetting delivery condition, and the new subject information in the timed message of default delivery condition is revised as original Further include after subject information:It will be revised as the timed message after original topic and be written the presently written position of the data file It sets, and updates the index information of the timed message for meeting and presetting delivery condition;
It is described according to the original topic information, which is preset the timed message of delivery condition index information be delivered to The corresponding object queue of the original topic information presets delivery condition so that user passes through the index information and obtains to meet Timed message be specially:
According to the original topic information, the updated index information which is preset to the timed message of delivery condition is delivered To object queue corresponding with the original topic information, meet so that user is obtained by the updated index information The timed message of default delivery condition.
9. according to the method described in claim 1, it is characterized in that, the index information of the timed message includes the timing disappears Cease the offset of the storage location in the data file.
10. a kind of processing unit of message, which is characterized in that be provided with multiple timing queues, the multiple timing queue difference Corresponding with multiple preset delay ranks, described device includes:
Data file is written for receiving timed message, and by the timed message in first receiving module;
The index information of the timed message is stored in by the first memory module for the delay rank according to the timed message In corresponding timing queue;
Queue monitoring module, for monitoring the multiple timing queue respectively, to judge whether to meet default delivery condition Timed message;
Message throws module again, for when there is the timed message for meeting default delivery condition, delivery condition to be preset by meeting The index information of timed message is delivered to the object queue, meets default throw so that user is obtained by the index information Pass the timed message of condition.
11. device according to claim 10, which is characterized in that described device further includes:
Theme modified module is used for during data file is written in the timed message, to the original of the timed message Beginning subject information is modified, and on the basis of retaining the original topic information, increases preset additional subject matter information, with shape At new subject information;
First memory module is specifically used for:
The timed message with new subject information is chosen, and according to the delay rank of the timed message, by the timed message Index information is stored in corresponding timing queue.
12. according to the devices described in claim 11, which is characterized in that be provided with multiple object queues, the multiple target team Row are corresponding with multiple original topic information respectively;
The message throws module again:
Message retrieval unit presets determining for delivery condition for obtaining to meet from the data file according to the index information When message;
Theme changes unit, is used for and the new subject information in the timed message of default delivery condition is revised as original topic letter Breath;
Message dilivery unit, for according to the original topic information, which to be preset to the rope of the timed message of delivery condition Fuse breath is delivered to object queue corresponding with the original topic information, so that user is obtained completely by the index information The timed message of the default delivery condition of foot.
13. device according to claim 12 again, which is characterized in that the message throws module and further includes:
Third storage unit, for the new subject information in the timed message of default delivery condition to be revised as original topic letter After breath, the timed message after original topic will be revised as and the presently written position of the data file is written, and described in updating Meet the index information for the timed message for presetting delivery condition;And
Message dilivery unit is specifically used for:
According to the original topic information, the updated index information which is preset to the timed message of delivery condition is delivered To object queue corresponding with the original topic information, meet so that user is obtained by the updated index information The timed message of default delivery condition.
14. a kind of electronic equipment, which is characterized in that including:
Memory, for storing program;
Processor is coupled to the memory, for executing described program, and is provided with multiple timing queues, the multiple fixed When queue it is corresponding with multiple preset delay ranks respectively, for:
Timed message is received, and data file is written into the timed message;
According to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing queue;
The multiple timing queue is monitored respectively, to judge whether to meet the timed message of default delivery condition;
If there is the timed message for presetting delivery condition is met, then the index for meeting the timed message for presetting delivery condition is believed Breath is delivered to the object queue, so that user is disappeared by the timing of the default delivery condition of index information acquisition satisfaction Breath.
15. a kind of processing method of message, which is characterized in that be provided with multiple timing queues, the multiple timing queue difference It is corresponding with multiple preset delay ranks, the method includes:
Timed message is received, and data file is written into the timed message;
According to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing queue.
16. processing method according to claim 15, which is characterized in that include delay rank in the timed message, The delay rank for including in the timed message is that message generator preset prolongs during generating message from the multiple When rank in select;
The index information of the timed message is stored in corresponding timing queue by the delay rank according to the timed message In be specially:The delay rank is read from the timed message, and according to the delay rank of the timed message, it will be described The index information of timed message is stored in corresponding timing queue.
17. processing method according to claim 15, which is characterized in that include in the timed message time of delivery or Second delay duration, the time of delivery or the second delay duration are what message generator set during generating message;
The index information of the timed message is stored in corresponding timing queue by the delay rank according to the timed message In be specially:
The time of delivery or the second delay duration are read from the timed message, and according to the time of delivery or described Two delay durations determine the delay rank of the timed message;
Then, according to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing team In row.
18. a kind of processing unit of message, which is characterized in that be provided with multiple timing queues, the multiple timing queue difference Corresponding with multiple preset delay ranks, described device includes:
Data file is written for receiving timed message, and by the timed message in second receiving module;
The index information of the timed message is stored in by the second memory module for the delay rank according to the timed message In corresponding timing queue.
19. processing unit according to claim 18, which is characterized in that include delay rank in the timed message, The delay rank for including in the timed message is that message generator preset prolongs during generating message from the multiple When rank in select;
Second memory module is specifically used for:The delay rank is read from the timed message, and according to the timing The index information of the timed message is stored in corresponding timing queue by the delay rank of message.
20. processing unit according to claim 18, which is characterized in that include in the timed message time of delivery or Second delay duration, the time of delivery or the second delay duration are what message generator set during generating message;
Second memory module is specifically used for:
The time of delivery or the second delay duration are read from the timed message, and according to the time of delivery or described Two delay durations determine the delay rank of the timed message;
Then, according to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing team In row.
21. a kind of electronic equipment, which is characterized in that including:
Memory, for storing program;
Processor is coupled to the memory, for executing described program, and is provided with multiple timing queues, the multiple fixed When queue it is corresponding with multiple preset delay ranks respectively, for:
Timed message is received, and data file is written into the timed message;
According to the delay rank of the timed message, the index information of the timed message is stored in corresponding timing queue.
22. a kind of processing method of message, which is characterized in that be provided with multiple object queues, the multiple object queue difference Corresponding with multiple original topic information, each object queue is stored with timed message corresponding with the original topic information Index information, the timed message are stored in data file, the method includes:
Index information is read from the object queue;
Timed message corresponding with the index information is read from the data file according to the index information.
23. a kind of processing unit of message, which is characterized in that be provided with multiple object queues, the multiple object queue difference Corresponding with multiple original topic information, each object queue is stored with timed message corresponding with the original topic information Index information, the timed message are stored in data file, and described device includes:
Index information read module, for reading index information from the object queue;
Timed message read module, for being read from the data file and the index information pair according to the index information The timed message answered.
24. a kind of electronic equipment, which is characterized in that including:
Memory, for storing program;
Processor is coupled to the memory, for executing described program, and is provided with multiple object queues, the multiple mesh Mark queue is corresponding with multiple original topic information respectively, and each object queue is stored with corresponding with the original topic information The index information of timed message, the timed message are stored in data file, for:
Index information is read from the object queue;
Timed message corresponding with the index information is read from the data file according to the index information.
CN201710071742.7A 2017-02-09 2017-02-09 Processing method, device and the electronic equipment of message Pending CN108415759A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710071742.7A CN108415759A (en) 2017-02-09 2017-02-09 Processing method, device and the electronic equipment of message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710071742.7A CN108415759A (en) 2017-02-09 2017-02-09 Processing method, device and the electronic equipment of message

Publications (1)

Publication Number Publication Date
CN108415759A true CN108415759A (en) 2018-08-17

Family

ID=63125087

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710071742.7A Pending CN108415759A (en) 2017-02-09 2017-02-09 Processing method, device and the electronic equipment of message

Country Status (1)

Country Link
CN (1) CN108415759A (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450778A (en) * 2018-12-28 2019-03-08 北京爱奇艺科技有限公司 A kind of message delay delivering method, device and equipment
CN109684108A (en) * 2018-12-26 2019-04-26 江苏满运软件科技有限公司 Implementation method, system, storage medium and the electronic equipment of message queue
CN109726024A (en) * 2018-12-28 2019-05-07 北京爱奇艺科技有限公司 A kind of message delay delivering method, device and equipment
CN109743137A (en) * 2019-01-10 2019-05-10 浙江小泰科技有限公司 A kind of Distributed Delay message queue processing system for supporting to update
CN110139229A (en) * 2019-04-15 2019-08-16 平安科技(深圳)有限公司 Delay sends method, apparatus, computer equipment and the storage medium of short message
CN110262910A (en) * 2019-06-24 2019-09-20 四川新网银行股份有限公司 The method of distributed task scheduling poll based on delay queue
CN110532108A (en) * 2019-08-15 2019-12-03 北京拉勾网络技术有限公司 Processing method, device, server and the system of resume delivery task
CN110618879A (en) * 2019-08-15 2019-12-27 北京三快在线科技有限公司 Message processing method and device, electronic equipment and computer readable medium
CN110648052A (en) * 2019-09-02 2020-01-03 浙江大搜车软件技术有限公司 Wind control decision method and device, computer equipment and storage medium
CN110704110A (en) * 2019-09-30 2020-01-17 浪潮软件股份有限公司 Method and device for improving response speed of system under high concurrency condition
CN110850969A (en) * 2019-10-25 2020-02-28 深圳市瑞立视多媒体科技有限公司 Data delay processing method and system based on linked list queue
CN111367629A (en) * 2020-03-30 2020-07-03 绿盟科技集团股份有限公司 Delayed task processing method and device
CN112118297A (en) * 2020-09-01 2020-12-22 上海东普信息科技有限公司 Control method, device and equipment of delay message and storage medium
CN112148506A (en) * 2020-09-25 2020-12-29 北京自如信息科技有限公司 Message processing method, device, platform and storage medium
CN112583742A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Message processing method and device
CN112801559A (en) * 2021-04-09 2021-05-14 恒生电子股份有限公司 Service request processing method, device, equipment and storage medium
CN112966005A (en) * 2021-03-08 2021-06-15 平安科技(深圳)有限公司 Timing message sending method and device, computer equipment and storage medium
CN113709214A (en) * 2021-08-04 2021-11-26 北京快乐茄信息技术有限公司 Message processing method and device, electronic equipment and storage medium
CN114510336A (en) * 2022-04-14 2022-05-17 广州世炬网络科技有限公司 Single-thread resource scheduling method, device, equipment and storage medium
CN115242744A (en) * 2022-06-15 2022-10-25 艺龙网信息技术(北京)有限公司 Timing message sending method, system, terminal and storage medium of user-defined time
CN115469991A (en) * 2022-11-14 2022-12-13 苏州浪潮智能科技有限公司 Timer queue setting method, device and equipment and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379021A (en) * 2012-04-24 2013-10-30 中兴通讯股份有限公司 Method and system for achieving distributed message queue
CN103457875A (en) * 2013-08-29 2013-12-18 上海永畅信息科技有限公司 Message queue control method based on multi-priority in Internet of vehicles
CN104615777A (en) * 2015-02-27 2015-05-13 浪潮集团有限公司 Method and device for real-time data processing based on stream-oriented calculation engine
CN104794119A (en) * 2014-01-17 2015-07-22 阿里巴巴集团控股有限公司 Middleware message storage and transmission method and system
CN105468346A (en) * 2014-09-05 2016-04-06 中兴通讯股份有限公司 Timing event management method, storage method, execution method and corresponding apparatus
US20160224380A1 (en) * 2015-01-30 2016-08-04 Salesforce.Com, Inc. Workload-driven techniques for providing biased service level guarantees
CN106327324A (en) * 2016-08-23 2017-01-11 杭州同盾科技有限公司 Network behavior characteristic rapid calculation method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103379021A (en) * 2012-04-24 2013-10-30 中兴通讯股份有限公司 Method and system for achieving distributed message queue
CN103457875A (en) * 2013-08-29 2013-12-18 上海永畅信息科技有限公司 Message queue control method based on multi-priority in Internet of vehicles
CN104794119A (en) * 2014-01-17 2015-07-22 阿里巴巴集团控股有限公司 Middleware message storage and transmission method and system
CN105468346A (en) * 2014-09-05 2016-04-06 中兴通讯股份有限公司 Timing event management method, storage method, execution method and corresponding apparatus
US20160224380A1 (en) * 2015-01-30 2016-08-04 Salesforce.Com, Inc. Workload-driven techniques for providing biased service level guarantees
CN104615777A (en) * 2015-02-27 2015-05-13 浪潮集团有限公司 Method and device for real-time data processing based on stream-oriented calculation engine
CN106327324A (en) * 2016-08-23 2017-01-11 杭州同盾科技有限公司 Network behavior characteristic rapid calculation method and system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
LZWGLORY: "rocketmq 延迟队列的实现", 《HTTPS://BLOG.CSDN.NET/LZWGLORY/ARTICLE/DETAILS/53220687》, 18 November 2016 (2016-11-18), pages 1 - 2 *
U014380653: "RocketMQ延时消息的使用和延时级别的配置", 《HTTPS://BLOG.CSDN.NET/U014380653/ARTICLE/DETAILS/52883356》 *
U014380653: "RocketMQ延时消息的使用和延时级别的配置", 《HTTPS://BLOG.CSDN.NET/U014380653/ARTICLE/DETAILS/52883356》, 21 October 2016 (2016-10-21), pages 1 *
尘央: "RocketMQ关键特性", 《HTTPS://DEVELOPER.ALIYUN.COM/ARTICLE/66110》, 9 December 2016 (2016-12-09), pages 1 - 8 *

Cited By (29)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109684108A (en) * 2018-12-26 2019-04-26 江苏满运软件科技有限公司 Implementation method, system, storage medium and the electronic equipment of message queue
CN109726024A (en) * 2018-12-28 2019-05-07 北京爱奇艺科技有限公司 A kind of message delay delivering method, device and equipment
CN109450778A (en) * 2018-12-28 2019-03-08 北京爱奇艺科技有限公司 A kind of message delay delivering method, device and equipment
CN109743137B (en) * 2019-01-10 2022-01-14 浙江小泰科技有限公司 Distributed delay message queue processing system supporting updating
CN109743137A (en) * 2019-01-10 2019-05-10 浙江小泰科技有限公司 A kind of Distributed Delay message queue processing system for supporting to update
CN110139229A (en) * 2019-04-15 2019-08-16 平安科技(深圳)有限公司 Delay sends method, apparatus, computer equipment and the storage medium of short message
CN110139229B (en) * 2019-04-15 2022-03-29 平安科技(深圳)有限公司 Method and device for sending short message in delayed mode, computer equipment and storage medium
CN110262910A (en) * 2019-06-24 2019-09-20 四川新网银行股份有限公司 The method of distributed task scheduling poll based on delay queue
CN110532108A (en) * 2019-08-15 2019-12-03 北京拉勾网络技术有限公司 Processing method, device, server and the system of resume delivery task
CN110618879A (en) * 2019-08-15 2019-12-27 北京三快在线科技有限公司 Message processing method and device, electronic equipment and computer readable medium
CN110532108B (en) * 2019-08-15 2022-10-11 北京拉勾网络技术有限公司 Resume delivery task processing method, device, server and system
CN110648052B (en) * 2019-09-02 2022-07-01 浙江大搜车软件技术有限公司 Wind control decision method and device, computer equipment and storage medium
CN110648052A (en) * 2019-09-02 2020-01-03 浙江大搜车软件技术有限公司 Wind control decision method and device, computer equipment and storage medium
CN112583742A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Message processing method and device
CN110704110A (en) * 2019-09-30 2020-01-17 浪潮软件股份有限公司 Method and device for improving response speed of system under high concurrency condition
CN110850969B (en) * 2019-10-25 2023-04-18 深圳市瑞立视多媒体科技有限公司 Data delay processing method and system based on linked list queue
CN110850969A (en) * 2019-10-25 2020-02-28 深圳市瑞立视多媒体科技有限公司 Data delay processing method and system based on linked list queue
CN111367629A (en) * 2020-03-30 2020-07-03 绿盟科技集团股份有限公司 Delayed task processing method and device
CN112118297A (en) * 2020-09-01 2020-12-22 上海东普信息科技有限公司 Control method, device and equipment of delay message and storage medium
CN112118297B (en) * 2020-09-01 2024-03-26 上海东普信息科技有限公司 Control method, device, equipment and storage medium for delay message
CN112148506A (en) * 2020-09-25 2020-12-29 北京自如信息科技有限公司 Message processing method, device, platform and storage medium
CN112966005A (en) * 2021-03-08 2021-06-15 平安科技(深圳)有限公司 Timing message sending method and device, computer equipment and storage medium
CN112966005B (en) * 2021-03-08 2023-07-25 平安科技(深圳)有限公司 Timing message sending method, device, computer equipment and storage medium
CN112801559A (en) * 2021-04-09 2021-05-14 恒生电子股份有限公司 Service request processing method, device, equipment and storage medium
CN113709214A (en) * 2021-08-04 2021-11-26 北京快乐茄信息技术有限公司 Message processing method and device, electronic equipment and storage medium
CN114510336A (en) * 2022-04-14 2022-05-17 广州世炬网络科技有限公司 Single-thread resource scheduling method, device, equipment and storage medium
CN115242744B (en) * 2022-06-15 2024-02-02 艺龙网信息技术(北京)有限公司 Timing message sending method, system, terminal and storage medium for self-defining time
CN115242744A (en) * 2022-06-15 2022-10-25 艺龙网信息技术(北京)有限公司 Timing message sending method, system, terminal and storage medium of user-defined time
CN115469991A (en) * 2022-11-14 2022-12-13 苏州浪潮智能科技有限公司 Timer queue setting method, device and equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN108415759A (en) Processing method, device and the electronic equipment of message
EP3373142A1 (en) Systems and methods for real time message processing using an event driven framework
KR102635945B1 (en) Method for managing a schedule and electronic apparatus therefor
CN104364819B (en) The electronic communication rough draft management of enhancing
CN103295122B (en) Electronic notebook recording feature including blank note trigger
CN109947821B (en) Report information generation method, display method, device, equipment and storage medium
CN106164908A (en) Modern document storing and sync status
CN108132845A (en) Message storage, delivering method and device and electronic equipment
US9141942B2 (en) Event scheduler based on real-time analytics and business rules
CN101523389A (en) Method for storing and accessing data
CN103179267A (en) Apparatus and method for managing attached file of message in portable terminal
CN106534562A (en) File deletion method and apparatus
CN104219639A (en) Method and device for displaying text message record
EP4062345A1 (en) Enhanced views and notifications of location and calendar information
CN106888264B (en) A kind of method for interchanging data and device
CN105900079B (en) For being selected for the prompting service of the Email of subsequent action
CN106100965A (en) A kind of schedule creation method and server
CN104137130A (en) Task performing method, system and computer-readable recording medium
CN101547164A (en) System and method for providing instant messaging and schedule management
KR102051591B1 (en) Method and apparatus for organizing a calendar in a communication device
CN111400056B (en) Message transmission method, device and equipment based on message queue
WO2021137768A1 (en) Method, apparatus and device for consuming messages based on message queue
CN109495335A (en) Business monitoring method, device, system and electronic equipment
CN109376018A (en) The operation method and program instruction of message threads
CN109587236A (en) Multimedia file sharing method, device 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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1259217

Country of ref document: HK

RJ01 Rejection of invention patent application after publication

Application publication date: 20180817

RJ01 Rejection of invention patent application after publication