CN109032819A - Synchronous method, device, equipment and the storage medium of message event between a kind of system - Google Patents
Synchronous method, device, equipment and the storage medium of message event between a kind of system Download PDFInfo
- Publication number
- CN109032819A CN109032819A CN201810844922.9A CN201810844922A CN109032819A CN 109032819 A CN109032819 A CN 109032819A CN 201810844922 A CN201810844922 A CN 201810844922A CN 109032819 A CN109032819 A CN 109032819A
- Authority
- CN
- China
- Prior art keywords
- event
- message
- acquisition instruction
- instruction
- message event
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0766—Error or fault reporting or storing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Abstract
This application discloses a kind of synchronous method of message event between system, according to the predetermined period time to from system send acquisition instruction thread in, if detecting triggering command, the predetermined period time is set by the current timing time for starting timing after upper primary transmission acquisition instruction;Receive the corresponding message event obtained from system according to acquisition instruction, it can be seen that, the application, to obtain corresponding message event more in time, improves the efficiency of synchronization message event by further sending acquisition instruction according to triggering command on the basis of the predetermined period time;And the current timing time by will test triggering command is set as the predetermined period time, avoids and continually sends acquisition instruction, to improve the stability of system.Disclosed herein as well is the synchronizing device of message event, equipment and computer readable storage mediums between a kind of system, all have above-mentioned beneficial effect.
Description
Technical field
The present invention relates to field of information transmission, in particular to the synchronous method, device, equipment of message event between a kind of system
And computer readable storage medium.
Background technique
In message processing procedure between system, synchronizing for message event is that state synchronized between two systems, instruction issue
Etc. functions realize basis.In the prior art, main system sends acquisition instruction to from system according to the predetermined period time, thus
It obtains from the message event in system in message queue.But in this method, due to increasing message from the message queue of system
The time and quantity of event are all random, if therefore setting predetermined period overlong time, will lead to main system and obtain from being
The message event of system not in time so that from system message event accumulation, reduce the treatment effeciency of message event;If default week
Time phase is too short, and main system continually sends acquisition instruction to from system, will occupy a large amount of system resource, causes system unstable
It is fixed.
Therefore, how to provide it is a kind of under the premise of guarantee system is stablized, being capable of efficiently message between synchronization system in time
The method of event is a technical problem that technical personnel in the field need to solve at present.
Summary of the invention
In view of this, can guarantee the purpose of the present invention is to provide a kind of synchronous method of message event between system
Under the premise of system is stablized, the efficiently message event between synchronization system in time;It is a further object of the present invention to provide a germlines
The synchronizing device of message event, equipment and computer readable storage medium between system, all have above-mentioned beneficial effect.
In order to solve the above technical problems, the present invention provides a kind of synchronous method of message event between system, comprising:
It, to from the thread that system sends acquisition instruction, if detecting triggering command, is incited somebody to action according to the predetermined period time
Current timing time is set as the predetermined period time;Wherein, the timing time is after sending the acquisition instruction
Start timing;
Receive the corresponding message event obtained from system according to the acquisition instruction.
Preferably, the triggering command specifically includes the instruction generated when detecting business demand.
Preferably, further comprise:
Main system event id is respectively set in advance and from system event ID;
Corresponding, the generating mode of the acquisition instruction specifically includes:
Referred to described from system transmission comprising the inquiry of the main system event id or mark ID according to the business demand
It enables;
From system according to the exception of the main system event id or the mark ID corresponding types judged described in receiving
Event;
Being generated corresponding according to the type of the anomalous event includes the main system event id or the institute for identifying ID
State acquisition instruction.
Preferably, the exception judged from system according to the main system event id or the mark ID described in the reception
Event specifically includes:
If the inquiry instruction, which includes the mark ID or the inquiry instruction, includes the main system event id and described
Main system event id is greater than described from system event ID, then the first anomalous event sent described in reception from system;
It is corresponding, it is described corresponding comprising the main system event id or described according to the generation of the type of the anomalous event
The acquisition instruction of mark ID is specially to generate the acquisition comprising the mark ID according to first anomalous event to refer to
It enables;
Corresponding, the corresponding message event obtained from system according to the acquisition instruction described in the reception is specially to connect
Receive the current entire message event obtained from system according to the mark ID;
If the inquiry instruction include the main system event id and the main system event id be less than it is described from system thing
Part ID then receives second anomalous event sent from system;
It is corresponding, it is described corresponding comprising the main system event id or described according to the generation of the type of the anomalous event
The acquisition instruction for identifying ID is specially to generate the acquisition comprising the main system event id according to second anomalous event
Instruction;
Corresponding message event that is corresponding, being obtained from system according to the acquisition instruction described in the reception specifically:
What is obtained according to from the difference of system event ID and the main system event id described in receiving from system is newly-increased
Message event.
Preferably, the triggering command further comprises the finger generated when receiving the notification message sent from system
It enables;
It is corresponding, the generating mode of the acquisition instruction specifically:
Corresponding acquisition instruction is generated according to the property of the notification message.
Preferably, the triggering command further comprises receiving described to reach from the quantity of message event described in system
The instruction of generation when the length threshold of preset message queue;
It is corresponding, the generating mode of the acquisition instruction specifically:
It is generated according to preset rules and obtains the acquisition instruction from the current entire message event of system.
Preferably, the corresponding message event obtained from system according to the acquisition instruction described in the reception it is laggard
One step includes:
Delete the message event from system.
In order to solve the above technical problems, the present invention also provides a kind of synchronizing devices of message event between system, comprising:
Sending module, for according to the predetermined period time to from system send acquisition instruction thread in, if detecting
Triggering command then sets the predetermined period time for current timing time;Wherein, the timing time is to send institute
Start timing after stating acquisition instruction;
Receiving module, for receiving the corresponding message event obtained from system according to the acquisition instruction.
In order to solve the above technical problems, the present invention also provides a kind of synchronizers of message event between system, comprising:
Memory, for storing computer program;
Processor realizes the synchronous method of message event between any of the above-described kind of system when for executing the computer program
The step of.
In order to solve the above technical problems, the present invention also provides a kind of computer readable storage medium, it is described computer-readable
Computer program is stored on storage medium, the computer program disappears between realizing any of the above-described kind of system when being executed by processor
The step of synchronous method of breath event.
The synchronous method of message event between a kind of system provided by the invention, compared to the prior art in can only be according to default
Cycle time obtains the method from the message event of system, and the present invention is referring to according to the predetermined period time to from system transmission acquisition
In the thread of order, if detecting triggering command, the current timing of timing will be started after upper primary transmission acquisition instruction
Time is set as the predetermined period time;Receive the corresponding message event obtained from system according to acquisition instruction, it is seen then that the present invention
By further sending acquisition instruction according to triggering command on the basis of the predetermined period time, corresponded to obtain more in time
Message event, improve synchronization message event efficiency;And the current timing time by will test triggering command is set
It is set to the predetermined period time, avoids and continually sends acquisition instruction, to improve the stability of system.
In order to solve the above technical problems, the present invention also provides the synchronizing device of message event between a kind of system, equipment and
Computer readable storage medium all has above-mentioned beneficial effect.
Detailed description of the invention
It in order to illustrate the embodiments of the present invention more clearly or the technical solution of the prior art, below will be to embodiment or existing
Attached drawing needed in technical description is briefly described, it should be apparent that, the accompanying drawings in the following description is only this hair
Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root
Other attached drawings are obtained according to the attached drawing of offer.
Fig. 1 is the flow chart of the synchronous method of message event between a kind of system provided in an embodiment of the present invention;
The generation of Fig. 2 acquisition instruction in the synchronous method of message event between another system provided in an embodiment of the present invention
The flow chart of mode;
Fig. 3 is a kind of message queue treatment process schematic diagram provided in an embodiment of the present invention;
Fig. 4 is the structure chart of the synchronizing device of message event between a kind of system provided in an embodiment of the present invention;
Fig. 5 is the structure chart of the synchronizer of message event between a kind of system provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The core of the embodiment of the present invention is to provide a kind of synchronous method of message event between system, can guarantee that system is steady
Under the premise of fixed, the efficiently message event between synchronization system in time;Another core of the invention disappears between being to provide a kind of system
Synchronizing device, equipment and the computer readable storage medium of breath event, all have above-mentioned beneficial effect.
It is right with reference to the accompanying drawings and detailed description in order to make those skilled in the art more fully understand the present invention program
The present invention is described in further detail.
Fig. 1 is the flow chart of the synchronous method of message event between a kind of system provided in an embodiment of the present invention, such as Fig. 1 institute
Show, the synchronous method of message event includes: between a kind of system
S10: according to the predetermined period time to from system send acquisition instruction thread in, if detecting triggering command,
Then the predetermined period time is set by current timing time;Wherein, timing time is to start timing after sending acquisition instruction.
It is understood that synchronizing for message event is to realize that state synchronized, instruction such as issue at the functions between system between system
Basis, therefore between system message event synchronous method superiority and inferiority, direct influence will be generated between the realization of function system.?
In the present embodiment, main system sends acquisition instruction to from system according to pre-set cycle time, and obtains in each transmission
Start new timing after instruction fetch, at the same time, namely within the predetermined period time of main system, main system detection it is current whether
There are triggering commands, if detecting triggering command, set the predetermined period time for current timing time, namely to work as
Preceding timing time reaches the time point for sending acquisition instruction.Assuming that the predetermined period time is 5 minutes, if being 3 in timing time
When minute, main system detects triggering command, then it is 5 minutes that current timing time, which will be arranged, so that main system reaches
The time of acquisition instruction is sent, acquisition instruction is sent.It is understood that the timing mode in the present embodiment is counted since 0
When, and it is accumulated to preset cycle time, in other examples, timing mode is also possible to the preset period time,
Then by way of gradually decreasing timing time until timing time is 0, the present embodiment does not do specific restriction to this.
It should be noted that restarting the timing time in period after sending acquisition instruction, repeatedly to obtain
From the message event of system.If not detecting triggering command within the predetermined period time, reach default week in timing time
Acquisition instruction is sent when time phase, to obtain the corresponding message event from system according to the predetermined period time.
S20: the corresponding message event obtained from system according to acquisition instruction is received.
Specifically, main system to from system send acquisition instruction after, from system according to the acquisition instruction disappearing from itself
It ceases and obtains message event corresponding with acquisition instruction in queue, and the corresponding message event that will acquire returns to main system.
It should be noted that presetting the setting parameter in acquisition instruction, such as obtains the time of message event or obtain message thing
The parameters such as the size of part or the quantity for obtaining message event, then obtain corresponding message event by the parameter of acquisition instruction.
In the present embodiment, the concrete mode of main system is returned to as those skilled in the art from system by corresponding message event
The common knowledge of member, therefore details are not described herein again.It is further to note that main system in the present embodiment and being referred to from system
The information system of asynchronous information transmission is carried out, it, can be in order to distinguish the recipient and sender of information in describing the embodiments of the present
Understand, the sender in information system is also possible to recipient namely main system and can be mutually synchronized letter from system
Breath.In addition, quantity of the present embodiment to main system and from system is without limitation, such as one can be same by message event from system
It walks and can receive multiple message events from system to multiple main systems or a main system.
The synchronous method of message event between a kind of system provided in an embodiment of the present invention, compared to the prior art in can only root
The method from the message event of system is obtained according to the predetermined period time, the present invention is being sent according to the predetermined period time to from system
In the thread of acquisition instruction, if detecting triggering command, the current of timing will be started after upper primary transmission acquisition instruction
Timing time be set as the predetermined period time;Receive the corresponding message event obtained from system according to acquisition instruction, it is seen then that
The present invention is by further sending acquisition instruction according to triggering command on the basis of the predetermined period time, to obtain more in time
Corresponding message event is taken, the efficiency of synchronization message event is improved;And pass through the current timing that will test triggering command
Time is set as the predetermined period time, avoids and continually sends acquisition instruction, to improve the stability of system.
On the basis of the above embodiments, the present embodiment has made further instruction and optimization to technical solution, specifically,
Triggering command specifically includes the instruction generated when detecting business demand.
Specifically, when main system is there are when business demand, such as need to carry out using from the message event in system as counted
When the operations such as calculation, storage, main system generates triggering command then when detecting the presence of business demand in order to obtain from system
Corresponding message event.
On the basis of the above embodiments, the present embodiment has made further instruction and optimization to technical solution, specifically,
Further comprise:
Main system event id is respectively set in advance and from system event ID.
As preferred embodiment, the present embodiment is being connect by the way that message queue is being arranged from system in advance from system
After receiving message event, message event is put into message queue according to preset sequence such as time sequencing, and according to message team
The sequence of column is that unique corresponding event id is arranged in each message event, for identifying each message event.In general, in reality
In, for the ease of distinguishing and calculating, numerical value form incremented by successively usually is set by ID, it then will be recently received
The maximum event id of numerical value is set as from system event ID in the event id namely current message queue of message event.In main system
Obtain after the message event of system, main system according to each event id, by the event id of recently received message event namely
The maximum event id of numerical value is set as main system event id in current main system.
As it can be seen that can more directly judge main system message thing by setting main system event id and from system event ID
The synchronous situation of part.
It is corresponding, as shown in Fig. 2, the generating mode of acquisition instruction specifically includes:
S21: according to business demand to the inquiry instruction from system transmission comprising main system event id or mark ID.
Specifically, timing time reach the predetermined period time or detect business demand and generate triggering command it
Afterwards, main system sends inquiry instruction to from system, obtains the form of message event according to the predetermined period time or according to business need
The form for obtaining message event is sought, inquiry instruction can be comprising main system event id or mark ID.It should be noted that mark
ID is the ID of the pre-set range for indicating message event, such as mark ID for A or can be set as -1, it is corresponding indicate from
Current entire message event in system message queue, mark ID are also possible to indicate that the message event of a certain type such as has label
Message event.
S22: the anomalous event from system according to main system event id or mark the ID corresponding types judged is received.
It should be noted that the inquiry instruction comprising main system event id or mark ID is sent to from system by main system,
In order to judge the type of anomalous event and by the anomalous event of corresponding types according to main system event id or mark ID from system
Return to main system.Specifically, judging that current inquiry instruction is corresponding different from system according to main system event id or mark ID
The type of ordinary affair part can be by way of the type for judging ID, be also possible to by comparing the size relation between ID
Mode, the present embodiment do not do specific restriction to this.
S23: the corresponding acquisition instruction comprising main system event id or mark ID is generated according to the type of anomalous event.
Specifically, main system after receiving anomalous event, refers to corresponding acquisition is generated according to the type of anomalous event
It enables, to obtain corresponding message event.It is different according to the type of anomalous event, type to the message event in requisition for acquisition and
All there may be differences for quantity, and therefore, in the present embodiment, being generated corresponding according to the type of anomalous event includes main system thing
Part ID or the acquisition instruction for identifying ID.
In the present embodiment, by the way that main system event id is respectively set in advance and from system event ID, and main system thing is utilized
Part ID and from system event ID generate acquisition instruction, make Host Systems using acquisition instruction obtain message event it is more accurate.
On the basis of the above embodiments, the present embodiment has made further instruction and optimization to technical solution, specifically,
Step " receiving the anomalous event judged from system according to main system event id or mark ID " specifically includes:
If inquiry instruction includes mark ID or inquiry instruction includes that main system event id and main system event id are greater than from being
System event id, then receive the first anomalous event sent from system;
It is corresponding, the corresponding acquisition instruction comprising main system event id or mark ID is generated according to the type of anomalous event
The acquisition instruction comprising mark ID is specially generated according to the first anomalous event;
It is corresponding, receive the corresponding message event obtained from system according to acquisition instruction be specially reception from system according to
Identify the current entire message event that ID is obtained.
Specifically, include in judging inquiry instruction from system is that identify that ID or inquiry instruction include is main
Still the main system event id is greater than from system event ID system event ID, will generate the first anomalous event and be sent to principal series
System.Main system sends the acquisition instruction comprising mark ID after receiving first anomalous event, according to preset rules.Due to mark
Know ID expression is to obtain current whole message event from system, therefore refer to from system according to the acquisition comprising identifying ID
It enables, entire message event is obtained from the message queue of itself and is sent to main system.
Message queue treatment process schematic diagram as shown in Figure 3, in a kind of specific implementation, from the message queue in system
The event id of middle message event is 0~4, is 4 from system event ID, main system is first using the acquisition instruction for including mark ID
GET (last=-1) is obtained from entire message event events=0~4 in system in message queue, and updates main system thing
Part ID is 4.After receiving new message event from system, if main system event id is greater than from system event ID, from system
First anomalous event of one " Invalid parameter " will be generated, when main system receives the anomalous event, main system will make in next time
It is obtained with the acquisition instruction GET (last=-1) for including mark ID from the entire message event in system in message queue.
If inquiry instruction includes main system event id and main system event id is less than from system event ID, receive from system
The second anomalous event sent;
It is corresponding, the corresponding acquisition instruction comprising main system event id or mark ID is generated according to the type of anomalous event
The acquisition instruction comprising main system event id is specially generated according to the second anomalous event;
It is corresponding, receive the corresponding message event obtained from system according to acquisition instruction specifically:
It receives from system according to the newly-increased message event obtained from the difference of system event ID and main system event id.
For example, it is assumed that being updated to 7 from system message event id, main system after receiving new message event from system
Event id is still that 4 namely main system event id are less than from system event ID, then second exception of " losing event " is sent from system
Event, when main system receives second anomalous event, main system is sent by GET method comprising the main system event id
Acquisition instruction GET (last=4) calculates newly-increased message from system according to from the difference of system event ID and main system event id
Event is 5,6 and 7, so that main system is sent to from system by the message event of events=5,6 and 7, to complete newly-increased letter
The synchronization of breath.
As it can be seen that between system provided in this embodiment message event synchronous method so that the mode of synchronization message event is more
It is accurate to add.
On the basis of the above embodiments, the present embodiment has made further instruction and optimization to technical solution, specifically,
Triggering command further comprises the instruction that generates when receiving from the notification message that system is sent;
It is corresponding, the generating mode of acquisition instruction specifically:
Corresponding acquisition instruction is generated according to the property of notification message.
That is, triggering command is also possible to the finger that generates when main system is received from the notification message that system is sent
It enables.Specifically, from system according to for example certain message events of property of the message event in message queue be emergency, need
It is synchronized to main system as soon as possible, therefore from system after detecting the message event, generates notification instruction and is sent to main system,
Make Host Systems are corresponding to generate triggering command.More specifically, the label information of the message event can be sent to main system, or
Person is that the time of the message event or other unique identification informations are sent to main system, in order to which main system can be timely
Obtain corresponding message event.
It should be noted that can be put into the notification information in message queue from system in order to main system acquisition, or
This is obtained notification information by way of directly transmitting and is sent to main system by person, and the present embodiment does not do specific restriction to this.Make
It can be that label is arranged in message event previously according to the property of each message event for preferred embodiment, when from system detection
To tape label message event when, then generate triggering command, can generate triggering command as soon as possible in this way, improve synchronization message thing
The timeliness of part improves the utilization efficiency of message event.
On the basis of the above embodiments, the present embodiment has made further instruction and optimization to technical solution, specifically,
Triggering command further comprises when receiving that the quantity of message event reaches the length threshold of preset message queue from system
Generation instruction;
It is corresponding, the generating mode of acquisition instruction specifically:
The acquisition instruction obtained from the current entire message event of system is generated according to preset rules.
Specifically, the quantity of i.e. message event reaches preset when having taken message queue from the message event of system
The length threshold of message queue, in order to allow main system that can handle the message event from system in time, as preferred embodiment party
Formula, the present embodiment are stored in the message event from the message queue of system by losing at first, then generate an abnormal thing
Part, main system will generate the acquisition instruction of a tape identification ID after getting the anomalous event, to obtain from system message
Current entire message event in queue.
It should be noted that aforesaid way is to reach the length of preset message queue in the quantity for detecting message event
It is carried out when the case where threshold value is incident, if the quantity of repeated detection to message event reaches the length of preset message queue
The case where spending threshold value can also then come by adjusting the duration of predetermined period time and the mode of increase message queue length threshold
Reduce the case where quantity of message event reaches the length threshold of preset message queue from system.
The present embodiment passes through in the length threshold for receiving the quantity of message event from system and reaching preset message queue
It obtains when the instruction of generation when value from the corresponding message event of system, the message thing from system message queue can be improved in time
The case where part is accumulated, improves the stability of system.
On the basis of the above embodiments, the present embodiment has made further instruction and optimization to technical solution, specifically,
Further comprise receiving after the corresponding message event that system is obtained according to acquisition instruction:
Delete the message event from system.
Specifically, being received after the corresponding message event that system is obtained according to acquisition instruction in main system, delete
The message event sent from system.Not only it is avoided that the message event sent occupies message queue length space, moreover it is possible to
It avoids repeating to send message event when obtaining from the message event of system, so that efficiency of transmission is higher.
The embodiment of the synchronous method of message event between a kind of system provided by the invention is carried out above detailed
Description, the present invention also provides synchronizing device, equipment and the computers of message event between a kind of system corresponding with this method can
Storage medium is read, due to the embodiment and the embodiment phase of method part of device, equipment and computer readable storage medium part
Mutually correlate, therefore the embodiment of device, equipment and computer readable storage medium part refers to the embodiment of method part
Description, wouldn't repeat here.
Fig. 4 is the structure chart of the synchronizing device of message event between a kind of system provided in an embodiment of the present invention, such as Fig. 4 institute
Show, the synchronizing device of message event includes: between a kind of system
Sending module 41, for according to the predetermined period time to from system send acquisition instruction thread in, if detection
To triggering command, then the predetermined period time is set by current timing time;Wherein, timing time is to send acquisition
Start timing after instruction.
Receiving module 42, for receiving the corresponding message event obtained from system according to the acquisition instruction.
The synchronizing device of message event between a kind of system provided by the invention, compared to the prior art in can only be according to default
Cycle time obtains the method from the message event of system, the present apparatus by sending module according to the predetermined period time to from being
System is sent in the thread of acquisition instruction, if detecting triggering command, will start timing after upper primary transmission acquisition instruction
Current timing time be set as the predetermined period time;And obtained from system according to acquisition instruction by receiving module reception
Corresponding message event, it is seen then that the present apparatus on the basis of predetermined period time according to triggering command transmission by further obtaining
Instruction fetch improves the efficiency of synchronization message event to obtain corresponding message event more in time;And by will test
The current timing time of triggering command is set as the predetermined period time, avoids and continually sends acquisition instruction, to improve
The stability of system.
Fig. 5 is the structure chart of the synchronizer of message event between a kind of system provided in an embodiment of the present invention, such as Fig. 5 institute
Show, the synchronizer of message event includes: between a kind of system
Memory 51, for storing computer program;
Processor 52 realizes the step such as the synchronous method of message event between above system when for executing computer program
Suddenly.
The synchronizer of message event between system provided in an embodiment of the present invention, between above system message event it is same
The beneficial effect of one step process.
In order to solve the above technical problems, the present invention also provides a kind of computer readable storage medium, computer-readable storage
It is stored with computer program on medium, the synchronization such as message event between above system is realized when computer program is executed by processor
The step of method.
Computer readable storage medium provided in an embodiment of the present invention, the synchronous method with message event between above system
Beneficial effect.
Above between the method, apparatus, equipment of the synchronization of message event system provided by the present invention and computer-readable
Storage medium is described in detail.Specific embodiment used herein explains the principle of the present invention and embodiment
It states, the above description of the embodiment is only used to help understand the method for the present invention and its core ideas.It should be pointed out that for this skill
For the those of ordinary skill in art field, without departing from the principle of the present invention, several change can also be carried out to the present invention
Into and modification, these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
?.
Claims (10)
1. the synchronous method of message event between a kind of system characterized by comprising
According to the predetermined period time to from system send acquisition instruction thread in, will be current if detecting triggering command
Timing time be set as the predetermined period time;Wherein, the timing time is started after sending the acquisition instruction
Timing;
Receive the corresponding message event obtained from system according to the acquisition instruction.
2. the method according to claim 1, wherein the triggering command specifically includes when detecting business demand
The instruction of generation.
3. according to the method described in claim 2, it is characterized in that, further comprising:
Main system event id is respectively set in advance and from system event ID;
Corresponding, the generating mode of the acquisition instruction specifically includes:
The inquiry instruction comprising the main system event id or mark ID is sent from system to described according to the business demand;
From system according to the anomalous event of the main system event id or the mark ID corresponding types judged described in receiving;
It is generated according to the type of the anomalous event corresponding comprising being obtained described in the main system event id or the mark ID
Instruction fetch.
4. according to the method described in claim 3, it is characterized in that, from system according to the main system event described in the reception
The anomalous event that ID or described mark ID judges specifically includes:
If the inquiry instruction includes the mark ID or the inquiry instruction includes the main system event id and the principal series
Event id of uniting is greater than described from system event ID, then the first anomalous event sent described in reception from system;
Corresponding, described generated corresponding according to the type of the anomalous event includes the main system event id or the mark
The acquisition instruction of ID is specially to generate the acquisition instruction comprising the mark ID according to first anomalous event;
It is corresponding, institute is specially received from system according to the corresponding message event that the acquisition instruction obtains described in the reception
State the current entire message event obtained from system according to the mark ID;
If the inquiry instruction include the main system event id and the main system event id be less than it is described from system event ID,
Then receive second anomalous event sent from system;
Corresponding, described generated corresponding according to the type of the anomalous event includes the main system event id or the mark
The acquisition instruction of ID is specially to generate the acquisition instruction comprising the main system event id according to second anomalous event;
Corresponding message event that is corresponding, being obtained from system according to the acquisition instruction described in the reception specifically:
Receive the newly-increased message obtained from system according to the difference from system event ID and the main system event id
Event.
5. the method according to claim 1, wherein the triggering command further comprise receive it is described from being
The instruction generated when the notification message that system is sent;
It is corresponding, the generating mode of the acquisition instruction specifically:
Corresponding acquisition instruction is generated according to the property of the notification message.
6. the method according to claim 1, wherein the triggering command further comprise receive it is described from being
The instruction of generation when the quantity of message event described in system reaches the length threshold of preset message queue;
It is corresponding, the generating mode of the acquisition instruction specifically:
It is generated according to preset rules and obtains the acquisition instruction from the current entire message event of system.
7. method according to any one of claims 1 to 6, which is characterized in that from system according to institute described in the reception
The corresponding message event for stating acquisition instruction acquisition further comprises later:
Delete the message event from system.
8. the synchronizing device of message event between a kind of system characterized by comprising
Sending module, for according to the predetermined period time to from system send acquisition instruction thread in, if detecting triggering
Instruction, then set the predetermined period time for current timing time;Wherein, the timing time is obtained described in transmission
Start timing after instruction fetch;
Receiving module, for receiving the corresponding message event obtained from system according to the acquisition instruction.
9. the processing equipment of message event between a kind of system characterized by comprising
Memory, for storing computer program;
Processor realizes message thing between system as described in any one of claim 1 to 7 when for executing the computer program
The step of processing method of part.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program, the computer program realize message event between system as described in any one of claim 1 to 7 when being executed by processor
Processing method the step of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810844922.9A CN109032819B (en) | 2018-07-27 | 2018-07-27 | Method, device, equipment and storage medium for synchronizing message events between systems |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810844922.9A CN109032819B (en) | 2018-07-27 | 2018-07-27 | Method, device, equipment and storage medium for synchronizing message events between systems |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109032819A true CN109032819A (en) | 2018-12-18 |
CN109032819B CN109032819B (en) | 2021-10-29 |
Family
ID=64647274
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810844922.9A Active CN109032819B (en) | 2018-07-27 | 2018-07-27 | Method, device, equipment and storage medium for synchronizing message events between systems |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109032819B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5150313A (en) * | 1990-04-12 | 1992-09-22 | Regents Of The University Of California | Parallel pulse processing and data acquisition for high speed, low error flow cytometry |
US20080222453A1 (en) * | 2002-03-29 | 2008-09-11 | Cypress Semiconductor Corporation | Method for integrating event-related information and trace information |
US20100257404A1 (en) * | 2009-04-04 | 2010-10-07 | Oracle International Corporation | Method and system for implementing a scalable, high-performance, fault-tolerant locking mechanism in a multi-process environment |
CN107800883A (en) * | 2017-10-31 | 2018-03-13 | 广东欧珀移动通信有限公司 | Calendar reminding method for detecting abnormality, device and mobile terminal |
CN107908494A (en) * | 2017-11-10 | 2018-04-13 | 泰康保险集团股份有限公司 | Processing method, device, electronic equipment and the storage medium of anomalous event |
CN108304704A (en) * | 2018-02-07 | 2018-07-20 | 平安普惠企业管理有限公司 | Authority control method, device, computer equipment and storage medium |
-
2018
- 2018-07-27 CN CN201810844922.9A patent/CN109032819B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5150313A (en) * | 1990-04-12 | 1992-09-22 | Regents Of The University Of California | Parallel pulse processing and data acquisition for high speed, low error flow cytometry |
US20080222453A1 (en) * | 2002-03-29 | 2008-09-11 | Cypress Semiconductor Corporation | Method for integrating event-related information and trace information |
US20100257404A1 (en) * | 2009-04-04 | 2010-10-07 | Oracle International Corporation | Method and system for implementing a scalable, high-performance, fault-tolerant locking mechanism in a multi-process environment |
CN107800883A (en) * | 2017-10-31 | 2018-03-13 | 广东欧珀移动通信有限公司 | Calendar reminding method for detecting abnormality, device and mobile terminal |
CN107908494A (en) * | 2017-11-10 | 2018-04-13 | 泰康保险集团股份有限公司 | Processing method, device, electronic equipment and the storage medium of anomalous event |
CN108304704A (en) * | 2018-02-07 | 2018-07-20 | 平安普惠企业管理有限公司 | Authority control method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109032819B (en) | 2021-10-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107017958B (en) | A kind of method for synchronizing time and corresponding system based on NTP | |
KR20160020521A (en) | Method for detecting electric quantity of device, device and system | |
US20100318663A1 (en) | Optimizing mobile device synchronization with multiple data sources | |
US9680719B2 (en) | Communication system, client terminal, and server | |
CN105528366B (en) | A kind of data synchronization control method and device | |
CN111131058A (en) | Access point control method and device | |
CN104052565B (en) | Time synchronization method and communication terminal | |
CN109558065A (en) | Data-erasure method and distributed memory system | |
CN110071789A (en) | A kind of passive awakening method of super low-power consumption and system | |
CN110062347A (en) | A kind of low power consumption data active reporting method and system | |
CN106201715A (en) | A kind of method for scheduling task and device | |
CN101719858B (en) | Synchronous processing method of bit timing of control area network (CAN) controller | |
CN111368005A (en) | Data processing method, device and equipment based on block chain and readable storage medium | |
CN109032819A (en) | Synchronous method, device, equipment and the storage medium of message event between a kind of system | |
CN112883106A (en) | Method, device, equipment and medium for determining out-of-block node of block chain | |
US11263112B2 (en) | Method and apparatus for evaluating quality of software running environment of device | |
CN106293996B (en) | Method of data synchronization, main equipment, alternate device and system | |
CN102014157B (en) | Meteorological data downloading engine and method | |
CN114510338B (en) | Task scheduling method, task scheduling device and computer readable storage medium | |
CN106201543A (en) | The display packing of notification message and smart machine in smart machine | |
CN105357060A (en) | Method, device and system for obtaining network equipment performance data | |
CN115240850A (en) | Information processing method and device, wearable device and electronic device | |
US20140244190A1 (en) | Power usage analysis | |
EP3776214A1 (en) | User interface optimization for delayed data | |
CN103024097A (en) | Method, device and system for detecting network address translation server aging time |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |