CN114205354A - Event management system, event management method, server, and storage medium - Google Patents

Event management system, event management method, server, and storage medium Download PDF

Info

Publication number
CN114205354A
CN114205354A CN202111484588.9A CN202111484588A CN114205354A CN 114205354 A CN114205354 A CN 114205354A CN 202111484588 A CN202111484588 A CN 202111484588A CN 114205354 A CN114205354 A CN 114205354A
Authority
CN
China
Prior art keywords
event
executed
management
target
attribute information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111484588.9A
Other languages
Chinese (zh)
Other versions
CN114205354B (en
Inventor
彭民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Baiguoyuan Information Technology Co Ltd
Original Assignee
Guangzhou Baiguoyuan Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN202111484588.9A priority Critical patent/CN114205354B/en
Publication of CN114205354A publication Critical patent/CN114205354A/en
Application granted granted Critical
Publication of CN114205354B publication Critical patent/CN114205354B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Abstract

The embodiment of the invention discloses an event management system, an event management method, a server and a storage medium. The system comprises a management service layer and a data layer, wherein the data layer comprises a data center and is used for storing event ordered sets corresponding to client users respectively, and event attribute information of events related to the corresponding client users is recorded in each event ordered set in an ordered manner; the management service layer comprises at least one management service node and is used for determining a target client user of the received event to be executed and updating the event attribute information of the event to be executed to an event ordered set of the target client user based on a set event management strategy. By using the system, when the execution server acquires the out-of-order events to be executed under the conditions of unreliable network and delay, the ordered execution of the events to be executed can be correctly realized; meanwhile, on the basis of ensuring high availability, the ordered storage of events is improved, and the out-of-order execution of the events is avoided.

Description

Event management system, event management method, server, and storage medium
Technical Field
The embodiment of the invention relates to the technical field of distributed systems, in particular to an event management system, an event management method, a server and a storage medium.
Background
In an actual application scenario of application software, a client of the application software divides different events to be executed into a certain period of time according to application requirements of a user, and submits the events to a background server, and an execution sequence of the events is fixed and cannot be out of order. In the existing implementation, the ordered storage of events can be performed through an ordered queue, so as to ensure the ordered execution of the events by obtaining the events to be executed from the ordered queue.
The problems of the implementation of the ordered execution of the events by relying on the ordered queue are as follows: in consideration of the need of supporting a large-scale client user, the background server provides background support by adopting a distributed technology, in this case, an ordered queue for simply caching each event to be executed is stored in a database accessible by each service node, and under the conditions of unreliable network and delay, the sequentiality of the events to be executed in the ordered queue acquired by the service node cannot be ensured, that is, the events to be executed originally and sequentially arranged in the ordered queue may arrive at the service node out of order in the transmission process, so that the normal execution of the functional application of the client is influenced. Meanwhile, if the problem of out-of-order events is solved by adopting a single-point processing mode, not only the bottleneck of computing resources such as a processor and a memory exists in actual processing, but also single-machine faults can be caused, and high availability cannot be achieved.
Disclosure of Invention
In view of this, embodiments of the present invention provide an event management system, an event management method, a server, and a storage medium, so as to improve ordered storage of events and avoid out-of-order execution of events on the basis of ensuring high availability.
In a first aspect, an embodiment of the present invention provides an event management system, including: a management service layer and a data layer;
the data layer comprises a data center and is used for storing event ordered sets corresponding to the client users respectively, wherein event attribute information of events related to the corresponding client users is recorded in each event ordered set in an ordered manner;
the management service layer comprises at least one management service node and is used for determining a target client user of the received event to be executed and updating the event attribute information of the event to be executed into an event ordered set of the target client user based on a set event management strategy.
In a second aspect, an embodiment of the present invention provides an event management method, which is executed by a management service node of a management service layer in an event management system provided in the first aspect of the present invention, and includes: determining a target client user of the received event to be executed, and updating the event attribute information of the event to be executed into an event ordered set of the target client user based on a set event management strategy;
the ordered set of events is stored in the data center of the data layer in the event management system provided in the embodiment of the first aspect of the present invention, with respect to the target client user.
In a third aspect, an embodiment of the present invention provides a server, which is a management service node of a management service layer in an event management system provided in the first aspect of the present invention, and includes:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors implement the event management method provided by the embodiment of the second aspect of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the event management method provided in the second aspect of the present invention.
In the event management system, the event management method, the server, and the storage medium provided in the embodiments of the present invention, the event management system includes a management service layer and a data layer, and event ordered sets corresponding to client users are stored in a data center of the data layer, where event attribute information of an event associated with a corresponding client user is recorded in each event ordered set in order, and each management service node in the management service layer can determine a target client user of a received event to be executed and update the event attribute information of the event to be executed to the event ordered set of the target client user based on a set event management policy, so as to realize that each event associated with the target client user is recorded in the event ordered set. According to the technical scheme, the event attribute information of the received events to be executed can be determined through the management service node, so that the events to be executed are stored in order in the event ordered set of the associated client user, the event attribute information of the events to be executed is recorded in the event ordered set, and the ordered execution of the events to be executed can be correctly realized when the out-of-order events to be executed are obtained by the execution server under the conditions of unreliable network and delay; according to the technical scheme, on the basis of ensuring high availability, ordered storage of events is improved, and out-of-order execution of the events is avoided.
Drawings
Fig. 1 is a block diagram illustrating an event management system according to an embodiment of the present invention;
FIG. 2 is a block diagram of another example of an event management system according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating an event management method according to a second embodiment of the present invention;
FIG. 4 is a diagram illustrating an implementation example of event management performed by a management service node on a received event to be executed in the event management system according to the present invention;
fig. 5 is a schematic diagram of a hardware structure of a server according to a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. In addition, the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
Example one
Fig. 1 shows a block diagram of an event management system according to an embodiment of the present invention, where the system is suitable for performing ordered management on events to be executed associated with a client user, and as shown in fig. 1, the event management system includes: a management service layer 11 and a data layer 12;
the data layer 12 includes a data center 121, configured to store event ordered sets 1211 corresponding to each client user, where event attribute information of events associated with the corresponding client user is recorded in order in each event ordered set 1211;
the management service layer 11 includes at least one management service node 111, configured to determine a target client user of a received event to be executed, and update event attribute information of the event to be executed into an event ordered set 1211 of the target client user based on a set event management policy.
In this embodiment, the provided event management system may be specifically understood as a service support system deployed at an application background server, and is mainly used for managing an execution sequence of events to be executed generated by a client. Generally, the background service end may be regarded as a distributed system architecture, and may implement global service deployment, and under the distributed system architecture, the distributed event management system in this embodiment may be formed by deploying background service nodes in different regions, where each background service node participating in deployment may be used as a management service node 111 to form a management service layer 11.
It should be noted that, the application scenario of the event management system may be described as follows: on the client side of the application software, when a user triggers execution of a certain functional application, the functional application may involve different events to be executed in actual execution, and there is a limitation of an execution sequence in consideration of execution of the different events to be executed, so that the background server needs to sequentially manage the events to be executed before executing each event to be executed. The event management system provided by the embodiment mainly realizes the ordered arrangement of the events to be executed corresponding to each client user.
Specifically, both the management service layer 11 and the data layer 12 may be understood as an abstraction mechanism for performing event management services, in this embodiment, the management service layer 11 may be abstracted as an execution mechanism for performing event management services, and specifically includes management service nodes 111 capable of performing event execution sequence arrangement on events submitted by clients to be executed, where each management service node 111 may be a computer device serving as a background service node in a distributed system architecture. For the management service layer 11, it mainly manages the event execution sequence of the events to be executed allocated to it by the management service node 111. The embodiment can abstract the management of the execution sequence of the events to be executed into effective sequencing of the events to be executed in the event ordered sequence corresponding to the client user.
Similarly, in this embodiment, the data layer 12 may also be abstracted into a data management mechanism, which specifically includes data centers 121 deployed in different regions, and the data centers 121 may be specifically integrated on any background service node under the distributed system architecture. In this embodiment, the data center 121 may be used to store an ordered set of events 1211 corresponding to a client user. The event ordered set 1211 records event attribute information of each event associated with the client user according to an execution order of the events, wherein the recorded event attribute information preferably includes execution start and end times of the events. When the events to be executed are issued to the execution nodes out of order, the correct execution sequence of the events to be executed can be determined through the event attribute information of the events to be executed, so that the out of order execution of the events to be executed is avoided.
It can be known that the event ordered sets 1211 of different client users may be stored on different data centers 121 through a load balancing concept, and the management service node 111 in the management service layer 11 may establish a connection with each data center 121 in the data layer 12, so that after determining the event attribute information of the received event to be executed, the addition of the event attribute information of the event to be executed to the corresponding event ordered set 1211 may be effectively implemented.
It should be noted that, in this embodiment, each data center 121 in the data layer 12 may be formed on background service nodes corresponding to different regions by building a codis cluster, which may be understood as a distributed database cluster, and may be specifically used to store mass data and implement data management through interaction of other services, such as implementing management operations such as adding, deleting, modifying, and the like on the data. The ordered set 1211 stored on the data center 121 with respect to the client user may preferably be a Redis ordered set, and each Redis ordered set may implement ordered recording of a corresponding time to be executed according to the event start time in the obtained event attribute information.
In this embodiment, the management object corresponding to each management service node 111 in the management service layer 11 may preferably be an event to be executed, which is fed back by the client and is distributed to the management service node 111 through a corresponding process. For any management service node 111, it can determine the event attribute information of the event to be executed allocated thereon, so as to realize effective management of the event execution order by adding the event attribute information to the corresponding event ordered set 1211.
For example, one implementation of the management service node 111 for managing the execution sequence of the events to be executed may be described as: the management service node 111 may receive an event to be executed, which is allocated by a relevant process for performing event allocation, and may determine, based on client information carried in the event to be executed when allocating the event, a client user related to the event to be executed, which is denoted as a target client user in this embodiment; then, the event duration to be executed of the event to be executed may be obtained through interaction with the data center 121 on the data layer 12, and the event duration and the set event management policy may be combined to determine the event start time and the event end time for executing the event to be executed, so as to update the event start time and the event end time, etc. as event attribute information to the event ordered set 1211 corresponding to the target client user.
It is to be appreciated that, for the execution of the event associated with the client user, the event execution node of the background server may obtain the event attribute information of the event to be executed according to the event ordered set 1211 of the target client user on the data center 121, and then may determine the execution timing of the event to be executed based on the obtained event attribute information, and execute the relevant event after the execution timing is met, thereby implementing the ordered execution of the events to be executed.
The event management system provided by the first embodiment of the present invention can determine the event attribute information of a received event to be executed through a management service node, so as to implement ordered storage of the event to be executed in an event ordered set of an associated client user, and record the event attribute information of the event to be executed based on the event ordered set, so that when an execution server acquires an out-of-order event to be executed under unreliable network and delayed conditions, ordered execution of the event to be executed can be correctly implemented; according to the technical scheme, on the basis of ensuring high availability, ordered storage of events is improved, and out-of-order execution of the events is avoided.
Further, fig. 2 is a block diagram of another structure of the event management system according to an embodiment of the present invention, and as shown in fig. 2, the system may further include: a front-end access layer 13;
the front-end access layer 13 includes at least one front-end access process 131, configured to obtain an event duration of an event to be executed submitted by each client, generate an event unique identifier of each event to be executed, and submit the event unique identifier to the data center 121;
the data center 121 is further configured to store initial event sets 1212 corresponding to each client user, where each initial event set 1212 records an event unique identifier and an event duration of each event to be executed, which are associated with a corresponding client user.
In this embodiment, the event management system of the distributed system architecture established by the background server further includes a front-end access layer 13, where the front-end access layer 13 may be abstracted as an interaction mechanism interacting with the client, and specifically includes front-end access processes 131 capable of receiving various requests or messages sent by the client, where each front-end access process 131 may be created on any background service node under one distributed system architecture.
For the event management system provided in this embodiment, it may establish a communication connection with a client of an application software through a front access process 131 in the front access layer 13, so that an event to be executed submitted by a client user through the client is received based on the front access process 131, and an event duration of the event to be executed may be determined through analysis of a request message related to the event to be executed (that is, the event duration may be actually set at the client according to an actual situation and carried in the request message related to the event to be executed in advance), and then an event unique identifier may be generated with respect to the received event to be executed, and finally the front access process 131 in the front access layer 13 may also interact with each data center 121 on the data layer 12, and may submit the event duration of the event to be executed and the event unique identifier to the data center 121, to store information about events to be performed by the data center 121.
The event unique identifier may be a global variable preset by the front-end access layer 13 with respect to the event, the global variable may be recorded in the data center 121 of the data layer 12, and a variable value of the event unique identifier may be self-increased, so that each front-end access process 131 accurately generates a corresponding event unique identifier for each received event to be executed.
In this embodiment, the data center 121 of the data layer 12 may further set an initial event set 1212 corresponding to each client user in addition to the ordered event set 1211, where the initial event set 1212 of each client user may record event related information, such as an event unique identifier and an event duration, of each event to be executed associated with the client user. It is to be appreciated that the initial event set 1212 of the client user may also preferably be a Redis set, so that each event to be executed associated with the client user is recorded in order based on the event unique identifier thereof.
Further, the front-end access process 131 is further configured to distribute the received to-be-executed event to each management service node 111 through a hash algorithm.
In this embodiment, it may be considered that the management service layer 11 in the event management system does not directly communicate with the client of the application software, but needs to add a front-end service layer to indirectly establish the association between the management service node 111 and the event to be executed by the client user. It is to be understood that the background service node as the bearer for executing the front access process 131 in the front access layer 13 may be determined according to the home region of the client, and an appropriate management service node 111 capable of establishing a communication connection may be allocated to each front access process 131 through the home region.
Specifically, after receiving a request packet of an event to be executed submitted by a client, the front-end access process 131 may determine an event unique identifier and an event duration and submit the event duration to the data center 121, and needs to distribute the event to be executed to the management service nodes 111.
Further, the embodiment optimizes the management service node 111, which may include:
the information determining process is used for determining a target client user associated with the event to be executed through analysis of the received event to be executed;
an information reading process, configured to access the data center 121, search a target initial event set 1212 and a target event ordered set 1211 corresponding to the target client user, and read an event duration to be executed of the event to be executed from the target initial event set 1212 and read last event attribute information of a last event from the target event ordered set 1211;
and the event management process is used for updating the event attribute information of the event to be executed into the target event ordered set 1211 according to the duration of the event to be executed and the last event attribute information.
In the embodiment, the management service node 111 performs event execution sequence management on the received events to be executed, which corresponds to the interaction of the presence information with the data layer 12. Specifically, it can update the event attribute information related to the event to be executed into the event ordered set 1211 through the interaction between the event ordered set 1211 stored by the corresponding client user in the data layer 12 and the initial event set 1212.
In this embodiment, the management service node 111 may manage each event to be executed allocated thereto, and each management service node 111 may update only one event to be executed to the event ordered set 1211 at one execution time point, in order to ensure atomicity of each event ordered set 1211 within the data center 121. Specifically, the management service node 111 may implement the execution order management of the events to be executed by executing respective steps depending on various processes created on the node itself. The created processes comprise an information determination process, an information reading process and an event management process.
It can be understood that the information determining process is mainly used for analyzing the received to-be-executed event, so as to determine a client user associated with the to-be-executed event, which is denoted as a target client user in this embodiment. According to the actual application scenario distance, when a user has a certain function requirement on the client side, the client triggers to generate a series of events to be executed, the events to be executed can be submitted to the front-end access process 131 by the client, and the front-end access process 131 allocates the management service node 111 for performing event management for the events to be executed. At the management service node 111, the assigned event to be executed may first be received by the information determination process and a corresponding analysis determination operation may be performed.
For the information determination process, the client user associated with the event to be executed can be determined by analyzing the request message carrying the event to be executed. Meanwhile, the information reading process created on the management service node 111 may perform a reading operation of the relevant information on the basis of the information determination process. The method is mainly used for searching an event ordered set 1211 and an initial event set 1212 associated with a target client user from within the data center 121 of the data layer 12, and in this embodiment, the event ordered set 1211 and the initial event set 1212 are respectively marked as a target event ordered set 1211 and a target initial event set 1212. The initial related information of the event to be executed, such as the event duration and the event unique identifier, may be considered to be already stored in the target initial event set 1212, so that the event duration of the event to be executed may be read from the searched target initial event set 1212, which is recorded as the event duration to be executed in this embodiment.
As described above, the target event ordered set 1211 may be considered to include the events associated with the target client user that have been executed in the order (the included events may have been executed, or are being executed, or have not yet started to be executed), but does not yet include the to-be-executed event. The information reading process may also read event attribute information of the last event (the last event recorded in the set) from the searched ordered set 1211 of target events, which is recorded as last event attribute information in this embodiment, and through the above description in this embodiment, the last event attribute information may include the event unique identifier, the event start time, and the event end time of the last event.
Meanwhile, the event management process created on the management service node 111 may determine the event attribute information of the event to be executed by combining the given event management policy through the event duration of the event to be executed and the last event attribute information of the last event read by the information reading process, and update the relevant event attribute information into the target event ordered set 1211.
It should be noted that, because of the order of the execution sequence of the events to be executed, in order to realize the ordered arrangement of the events to be executed in the ordered set 1211, it needs to consider that the start time of the event is after the end time of the last event, and therefore, the event management process may determine the start time of the event to be executed according to the duration of the event to be executed and the end time of the last event, so as to form the event attribute information of the event to be executed, submit the event attribute information to the data center 121, and record the event attribute information in the ordered set 1211 corresponding to the target client user.
Specifically, the embodiment may further preferably perform the function of the event management process by:
extracting the end time of the last event from the attribute information of the last event;
if the last event end time is less than the current system time, taking the current system time as the event starting time of the event to be executed; otherwise, taking the end time of the last event as the start time of the event to be executed;
taking the sum of the event starting time and the duration of the event to be executed as the event ending time of the event to be executed;
and taking the event unique identifier, the event starting time and the event ending time of the event to be executed as target event attribute information, and sequentially adding the target event attribute information to the target event ordered set 1211.
The event management process may be set as a Lua script in actual operation, and based on the characteristics of the Lua script, the execution of the functional steps may be ensured to be atomic. Meanwhile, it should be noted that the present embodiment describes the execution of the above functional steps from the perspective of the current time point, so that, to determine the event start time of the event to be executed, the end time of the last event needs to be compared with the current system time of the current time point, and if the end time of the last event is less than the current system time, it can be considered that the execution of the last event is completed, and at this time, the current system time can be directly used as the event start time of the event to be executed.
As described above, if the last event end time is greater than the current system time, the last event may be considered to have not started execution or not completed execution, and thus, the last event end time may be used as the event start time of the event to be executed. Correspondingly, after the event start time is determined, the event end time may also be determined as the sum of the event start time and the duration of the event to be executed, and finally, the determined event start time, the determined event end time, and the event unique identifier of the event to be executed are updated in the event ordered set 1211 of the target client user as the event attribute information (denoted as target event attribute information in this embodiment) of the event to be executed, and are used as a new last event in the event ordered set 1211.
It should be noted that, in the process that the management service node 111 implements updating of the event attribute information through the above processes, it may be considered that a Get command is used to obtain the event end time of the last event, and the event end time is cached in the memory for subsequent time comparison, and after the time comparison is completed, a delete command is further used to delete the event end time cached in the memory.
Further, the event management process, after sequentially adding the target event attribute information to the target event ordered set 1211, is further configured to:
when message feedback of failed addition is received, taking the sum of the event ending time of the event to be executed and the set duration as the new event ending time of the event to be executed;
taking the difference between the new event ending time and the duration of the event to be executed as the new event starting time of the event to be executed;
and forming new target event attribute information of the event to be executed, and returning to the operation of adding the re-executed target event attribute information to the target event ordered set 1211.
In the above description, considering that the event management system is a distributed system, the management service layer 11 for event management includes at least one management service node 111, and parallel execution of the received event can be implemented between the management service nodes 111. If there are multiple management service nodes 111 performing the addition of the event attribute information to the associated event ordered set 1211 on the data center 121 through the created event management process for the received event to be executed at the same time, a situation of information addition failure may occur because the addition operation of the event attribute information to the data center 121 conflicts, and therefore, the embodiment may preferably monitor whether the information addition is successfully completed by receiving the feedback message of the data center 121 after the event management process sends the event attribute information to be added to the event ordered set 1211.
Specifically, when receiving the message feedback of the addition failure, the event management process may execute the operation of determining the event attribute information corresponding to the event to be executed again through the above description. It can be appreciated that the reason why the event management process receives the addition failure is often that the event ordered set 1211 is currently occupied by another process or the event attribute information of the event to be executed conflicts with the event attribute information of another added event. Based on this, the embodiment may re-determine the event attribute information of the event to be executed by re-determining the form of the event end time corresponding to the event to be executed, where the event end time of the event to be executed may be the sum of the original determined event end time and a set time length, and the new event start time may be the difference between the newly determined event end time and the event time length.
The event management system provided in this embodiment, through cooperation of the processes created on the management service node 111, realizes addition of event attribute information of the to-be-executed event to the associated event ordered set 1211, and by this way, on the basis of ensuring high availability, the order of the execution sequence of the to-be-executed event is ensured.
It should be noted that, in the practical application of the application software, there is also a requirement for querying the event execution status by the client user or related personnel. Based on the existing mode of orderly storing events, because only the ordered queue of the events to be executed is realized, when the execution of a certain event is performed according to the execution sequence, the event is taken out from the ordered queue, the event is equivalent to be deleted from the ordered queue, and the state of the event cannot be traced back, so that the state of the event cannot be accurately known, namely, the effective query of the state of the event cannot be realized through the existing event recording mode.
On the basis of the foregoing embodiment, as shown in fig. 2, the event management system provided in this embodiment further optimizes an event management system that includes: the query service layer 14 is provided with a query,
the query service layer 14 comprises at least one query service process 141 for feeding back event status information of an event to be queried to a corresponding client user by querying the event ordered set 1211 of the corresponding client user when receiving a status query request of the event to be queried.
It can be understood that, in the embodiment, the management service node 111 updates the event attribute information of the received event to be executed to the associated event ordered set 1211 in the data center 121, while the event sequence set corresponding to each client user in the data center 121 records the event attribute information of each associated event, and on the basis of ensuring that each event is stored in sequence, the event ordered set 1211 also records the start time and the end time of the execution of the event, and meanwhile, the recorded relevant information is not deleted from the set when a certain event is executed.
In this embodiment, the query service process 141 in the event management system may implement a query of a relevant state of any event, for example, when receiving a query request of a certain event, the query service process 141 may find a matched event ordered set 1211 on the data center 121, acquire event attribute information of the queried event from the event ordered set 1211, and determine a state of the queried event by comparing an event start time and an event end time in the event attribute information with a query time system time to form event state information and feed the event state information back to a querier (e.g., a client user), where the event state information may include content that is not executed, is being executed, is executed, and is finished.
It is understood that the query service layer 14 can also be abstracted as an interaction mechanism for interacting with the client and the data layer 12, and specifically includes the query service processes 141 capable of receiving event query requests sent by the client, wherein each query service process 141 can also be created on any background service node under a distributed system architecture.
Further, the query service process 141 is further configured to:
when receiving an event query request of a currently executed event, the query result of the currently executed event is fed back to the query client user by querying each event ordered set 1211 on the data center 121 in combination with the current system time.
As described above, as the query service process 141 in the query service layer 14, it further has another query function, that is, it can implement the related information query of each event executed currently. For example, the event start time and the event end time of the relevant event are recorded in each event ordered set 1211 on the data center 121, and after the current system time is obtained, each event of which the current system time is between the event start time and the event end time may be traversed, and each traversed event may be regarded as a currently executed event, which may be fed back to the information inquirer as a query result.
The event management system provided by this embodiment can also implement effective query of the event state when the user has the event state query requirement, on the basis that the data center sets the event ordered set relative to the client user and updates the event ordered set through the management service node.
Example two
Fig. 3 is a schematic flow chart of an event management method according to a second embodiment of the present invention, where the method is suitable for performing ordered management on each event to be executed associated with a client user, and specifically, the method may be implemented by a management service node of a management service layer in an event management system according to the first embodiment of the present invention, and the management service node may preferably be a server.
As shown in fig. 3, an event management method provided in the second embodiment of the present invention may specifically include the following steps:
s201, determining a target client user of the received event to be executed, and updating the event attribute information of the event to be executed into an event ordered set of the target client user based on a set event management strategy.
In this embodiment, the execution subject of the provided method may be a management service node in the event management system, and this embodiment may abstract the management of the execution order of the events to be executed into effective ordering of the events to be executed in the ordered sequence of events corresponding to the client user.
For example, a management service node serving as the execution subject may receive an event to be executed, where the event to be executed is allocated to a process related to event allocation, and based on client information carried in the event to be executed, a client user related to the event to be executed may be determined, and this embodiment is denoted as a target client user; then, the event duration to be executed of the event to be executed can be acquired through interaction with a data center on a data layer, the event duration and a set event management strategy are combined to determine the event starting time and the event ending time of the event to be executed, and the event starting time, the event ending time and the like are used as event attribute information to be updated to the event ordered set corresponding to the target client user.
In this embodiment, for the execution of the event associated with the client user, the event execution node of the background server may obtain event attribute information of the event to be executed according to the ordered set of events of the target client user on the data center, and then may determine the execution timing of the event to be executed based on the obtained event attribute information, and execute the relevant event after the execution timing is met, thereby implementing the ordered execution of the events to be executed.
It should be noted that the event is stored in the data center of the data layer in the event management system provided in the first embodiment in an ordered combination with respect to the target client user. A data center may be used to store an ordered set of events corresponding to a client user. The event attribute information of each event associated with the client user is recorded in the event ordered set according to the execution sequence of the events, wherein the recorded event attribute information preferably comprises the execution start time and the execution end time of the events. Based on the above, when the event to be executed is issued to the execution node out of order due to network delay, the correct execution order of the event to be executed can be determined through the event attribute information of the event to be executed, so that out of order execution of the event to be executed is avoided.
In the event management method provided by the second embodiment of the present invention, the set management service node can be used to determine the event attribute information of the received event to be executed, so as to implement the ordered storage of the event to be executed in the event ordered set of the associated client user, and record the event attribute information of the event to be executed based on the event ordered set, so that when the execution server obtains the out-of-order event to be executed under the conditions of unreliable network and delay, the ordered execution of the event to be executed can also be correctly implemented; according to the technical scheme, on the basis of ensuring high availability, ordered storage of events is improved, and out-of-order execution of the events is avoided.
To better illustrate the ordered storage management of the events to be executed by the method provided by this embodiment, the station of this embodiment performs an exemplary description on the process of implementing ordered storage of the events to be executed with respect to the received events to be executed from the perspective of one management service node.
Fig. 4 is a diagram showing an implementation example of event management performed on a received event to be executed by a management service node in an event management system provided by the present invention.
As shown in fig. 4, this exemplary diagram includes a plurality of execution bodies involved in implementing the method, where the client 31 is a sender of an event to be executed, and the management service node 321 in the management service layer 32 is an execution body for executing the method; in addition, an ordered set of events and an initial set of events corresponding to the client user are stored in one data center in the data layer 33, and meanwhile, a front access process 341 in the front access layer 34 interacts with the client 31 and the management service node 321.
Specifically, as shown in fig. 3, the event management method is implemented as follows:
and S1, the client generates an event to be executed according to the functional application requirement, and submits the event to be executed to the front-end access process of the front-end access layer.
S2, the front access process stores the event unique identification and the event duration of the event to be executed in the initial event set corresponding to the client user in the data center.
And S3, the front-end access process distributes the event to be executed to the management service node through a hash algorithm.
S4, the management service node determines the associated client user based on the received event to be executed.
S5, the management service node acquires the last event attribute information of the last event from the event ordered set corresponding to the client user in the data center, and acquires the event unique identifier and the event duration of the event to be executed from the initial event set;
and S6, the management service node determines the event attribute information of the event to be executed according to the last event attribute information, the unique event identifier and the event duration.
The determination process of the event attribute information can be described as follows: if the last event ending time in the last event attribute information is less than the current system time, the current system time is the event starting time of the event to be executed, otherwise, the last event ending time is the event starting time of the event to be executed; the sum of the event start time and the event duration may then be used as the event end time for the event to be executed.
S7, the management service node adds the event attribute information of the event to be executed to the event ordered set of the client user.
And S8, after receiving the message feedback of the addition failure, the management service node updates the event attribute information of the event to be executed and carries out the addition operation of the event ordered set again.
EXAMPLE III
Fig. 5 is a schematic diagram of a hardware structure of a server according to a third embodiment of the present invention, where specifically, the server is used to form a management service node on a management service layer in an event management system according to the first embodiment, and specifically, the server may include: a processor and a storage device. At least one instruction is stored in the storage device, and the instruction is executed by the processor, so that the server can execute the corresponding operation steps in the time management method provided by the second embodiment.
Referring to fig. 5, the server may specifically include: a processor 40, a storage device 41, a display 42, an input device 43, an output device 44, and a communication device 45. The number of the processors 40 in the server may be one or more, and one processor 40 is taken as an example in fig. 5. The number of the storage devices 41 in the server may be one or more, and one storage device 41 is taken as an example in fig. 5. The processor 40, the storage device 41, the display 42, the input device 43, the output device 44, and the communication device 45 of the server may be connected by a bus or other means, and the bus connection is exemplified in fig. 5.
Specifically, in an embodiment, when the processor 40 executes one or more programs stored in the storage device 41, the following operations may be implemented: determining a target client user of the received event to be executed, and updating the event attribute information of the event to be executed into an event ordered set of the target client user based on a set event management strategy; the ordered set of events is stored in the data center of the data layer in the event management system provided in the embodiment of the first aspect of the present invention, with respect to the target client user.
An embodiment of the present invention further provides a computer-readable storage medium, where when a program in the storage medium is executed by a processor of a computer device, the computer device is enabled to execute the event management method according to the above embodiment. Illustratively, the event management method according to the foregoing embodiment includes: determining a target client user of the received event to be executed, and updating the event attribute information of the event to be executed into an event ordered set of the target client user based on a set event management strategy; the ordered set of events is stored in the data center of the data layer in the event management system provided in the embodiment of the first aspect of the present invention, with respect to the target client user.
It should be noted that, as for the embodiments of the apparatus, the computer device, and the storage medium, since they are basically similar to the embodiments of the method, the description is relatively simple, and in the relevant places, reference may be made to the partial description of the embodiments of the method.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the event management method according to any embodiment of the present invention.
It should be noted that, in the event management system, the units and modules included in the event management system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are only for the convenience of distinguishing from each other, and are not used for limiting the keep-alive range of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the spirit of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. An event management system, comprising: a management service layer and a data layer;
the data layer comprises a data center and is used for storing event ordered sets corresponding to the client users respectively, wherein event attribute information of events related to the corresponding client users is recorded in each event ordered set in an ordered manner;
the management service layer comprises at least one management service node and is used for determining a target client user of the received event to be executed and updating the event attribute information of the event to be executed into an event ordered set of the target client user based on a set event management strategy.
2. The system of claim 1, further comprising: a front access layer;
the front-end access layer comprises at least one front-end access process and is used for acquiring the event duration of the events to be executed submitted by each client, generating the event unique identifier of each event to be executed and submitting the event unique identifier to the data center;
the data center is further used for storing initial event sets corresponding to the client users respectively, and event unique identifiers and event durations of the events to be executed and associated with the corresponding client users are recorded in each initial event set.
3. The system of claim 1, wherein the management service node comprises:
the information determining process is used for determining a target client user associated with the event to be executed through analysis of the received event to be executed;
an information reading process, configured to access the data center, search a target initial event set and a target event ordered set corresponding to the target client user, read an event duration to be executed of the event to be executed from the target initial event set, and read last event attribute information of a last event from the target event ordered set;
and the event management process is used for updating the event attribute information of the event to be executed into the target event ordered set according to the time length of the event to be executed and the last event attribute information.
4. The system of claim 3, wherein the event management process is specifically configured to:
extracting the end time of the last event from the attribute information of the last event;
if the last event end time is less than the current system time, taking the current system time as the event starting time of the event to be executed; otherwise, taking the end time of the last event as the start time of the event to be executed;
taking the sum of the event starting time and the duration of the event to be executed as the event ending time of the event to be executed;
and taking the event unique identifier, the event starting time and the event ending time of the event to be executed as target event attribute information, and sequentially adding the target event attribute information to the target event ordered set.
5. The system of claim 4, wherein the event management process, after sequentially adding the target event attribute information to the ordered set of target events, is further configured to:
when message feedback of failed addition is received, taking the sum of the event ending time of the event to be executed and the set duration as the new event ending time of the event to be executed;
taking the difference between the new event ending time and the duration of the event to be executed as the new event starting time of the event to be executed;
and forming new target event attribute information of the event to be executed, and returning to the operation of adding the re-executed target event attribute information to the target event ordered set.
6. The system of any one of claims 1-5, further comprising: the query service layer is used for querying the service layer,
the query service layer comprises at least one query service process and is used for feeding back the event state information of the event to be queried to the corresponding client user by querying the event ordered set of the corresponding client user when receiving the state query request of the event to be queried.
7. The system of claim 6, wherein the query service process is further configured to:
and when an event query request of the current executed event is received, the query result of the current executed event is fed back to the query client user by querying each event ordered set on the data center and combining the current system time.
8. An event management method performed by a management service node of a management service layer in the event management system according to any one of claims 1 to 8, comprising:
determining a target client user of the received event to be executed, and updating the event attribute information of the event to be executed into an event ordered set of the target client user based on a set event management strategy;
wherein the ordered set of events is stored with respect to the target client user on a data center of a data layer in the event management system of any of claims 1-8.
9. A server as a management service node of a management service layer in the event management system according to any one of claims 1 to 8, comprising:
one or more processors;
storage means for storing one or more programs;
the one or more programs being executable by the one or more processors to cause the one or more processors to perform the event management method of claim 8.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the event management method according to claim 8.
CN202111484588.9A 2021-12-07 2021-12-07 Event management system, event management method, server, and storage medium Active CN114205354B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111484588.9A CN114205354B (en) 2021-12-07 2021-12-07 Event management system, event management method, server, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111484588.9A CN114205354B (en) 2021-12-07 2021-12-07 Event management system, event management method, server, and storage medium

Publications (2)

Publication Number Publication Date
CN114205354A true CN114205354A (en) 2022-03-18
CN114205354B CN114205354B (en) 2023-11-03

Family

ID=80650969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111484588.9A Active CN114205354B (en) 2021-12-07 2021-12-07 Event management system, event management method, server, and storage medium

Country Status (1)

Country Link
CN (1) CN114205354B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344410A (en) * 2022-10-14 2022-11-15 北京奥星贝斯科技有限公司 Method and device for judging event execution sequence, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130218941A1 (en) * 2012-02-17 2013-08-22 Bsquare Corporation Managed event queue for independent clients
US8560671B1 (en) * 2003-10-23 2013-10-15 Netapp, Inc. Systems and methods for path-based management of virtual servers in storage network environments
US20160357778A1 (en) * 2015-06-02 2016-12-08 David MacKenzie System for handling event messages for file collaboration

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8560671B1 (en) * 2003-10-23 2013-10-15 Netapp, Inc. Systems and methods for path-based management of virtual servers in storage network environments
US20130218941A1 (en) * 2012-02-17 2013-08-22 Bsquare Corporation Managed event queue for independent clients
US20160357778A1 (en) * 2015-06-02 2016-12-08 David MacKenzie System for handling event messages for file collaboration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
何再朗;田敬东;张毓森;: "策略管理中的事件处理机制研究", 兰州理工大学学报, no. 03 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344410A (en) * 2022-10-14 2022-11-15 北京奥星贝斯科技有限公司 Method and device for judging event execution sequence, storage medium and electronic equipment
CN115344410B (en) * 2022-10-14 2023-02-28 北京奥星贝斯科技有限公司 Method and device for judging event execution sequence, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN114205354B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
US9852204B2 (en) Read-only operations processing in a paxos replication system
CN108108463B (en) Synchronous task processing method and device based on time slice scheduling
CN111897638B (en) Distributed task scheduling method and system
US20180373750A1 (en) Allocation method and device for a distributed lock
RU2357283C2 (en) Scheme for refreshing connection with network printing device for clients of printer device
US9542226B2 (en) Operating programs on a computer cluster
CN102333029A (en) Routing method in server cluster system
CN110427386B (en) Data processing method, device and computer storage medium
CN105468718B (en) Data consistency processing method, device and system
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN112162846B (en) Transaction processing method, device and computer readable storage medium
CN113094430B (en) Data processing method, device, equipment and storage medium
WO2022134797A1 (en) Data fragmentation storage method and apparatus, a computer device, and a storage medium
US9900403B2 (en) Method and server for assigning relative order to message by using vector clock and delivering the message based on the assigned relative order under distributed environment
CN109328331A (en) Self-organizing storage system for asynchronous storage service
CN110737510B (en) Block device management system
CN107025257B (en) Transaction processing method and device
CN111291062A (en) Data synchronous writing method and device, computer equipment and storage medium
US20090100436A1 (en) Partitioning system including a generic partitioning manager for partitioning resources
CN114205354B (en) Event management system, event management method, server, and storage medium
US20090100441A1 (en) Resource assignment system with recovery notification
CN110798358B (en) Distributed service identification method and device, computer readable medium and electronic equipment
CN103905512A (en) Data processing method and equipment
CN109005071B (en) Decision deployment method and scheduling equipment
CN111367921A (en) Data object refreshing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant