Event processing system and method
Through the collaborative work of the event management module and the cluster agent, the certificate management and network access problems when remote access container clusters are solved, and the event processing efficiency is improved.
Patent Information
- Application Number
- CN202211167316.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-23
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2042-09-23
AI Technical Summary
When remote access container clusters handle events, a large number of cluster certificates need to be managed and certificate leaks are problematic, resulting in inefficiency and container clusters that are closed to the network environment cannot be accessed by the external network.
The event management module determines the access permissions of pending events, generates event broadcast information and sends it to the cluster agent. The cluster agent matches the permissions in the broadcast information based on its event access permissions, and processes events if the match is successful, avoiding certificate management and networking Access issues.
It realizes that no large number of cluster certificates are required to manage, improves event processing efficiency, and solves the problem that container clusters cannot be accessed by external networks in a closed network environment.
Smart Images

Figure CN115514812B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an event processing system and method. Background Art
[0002] For handling events through remote access to container clusters, in the related technology, a cluster certificate for access needs to be provided during the event handling process. Once the number of container clusters that need to be accessed is large, not only a large number of cluster certificates need to be managed, but there is also the technical problem of certificate leakage, which reduces the efficiency of event handling. In addition, remote management of container clusters for event handling also requires the container cluster to open access ports. At this time, there is the problem that some container clusters in closed network environments cannot be accessed from the external network. Summary of the invention
[0003] In view of the above technical problems, the present invention provides an event processing system and method, so as to achieve not only eliminating the need to manage a large number of cluster certificates but also effectively processing events, thereby improving the efficiency of event processing.
[0004] According to one aspect of the present invention, an event processing system is provided, comprising: an event management module and an event processing module, wherein the event processing module comprises at least one cluster agent;
[0005] The event management module is used to determine the event to be processed and the access rights of the event to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent;
[0006] The cluster agent is used to match the access permission carried by the event broadcast information according to the event access permission of the cluster agent, and process the to-be-processed event if the permission match succeeds.
[0007] Optionally, the event management module includes: an event management unit, a cluster management unit and an event control unit; wherein,
[0008] The cluster management unit is used to obtain registration information of at least one cluster agent, generate cluster information based on the registration information, and send the cluster information to the event management unit;
[0009] The event management unit is configured to generate, in response to an event request, a pending event corresponding to the event request, determine the access permission for the pending event based on the cluster information, and send the pending event and the access permission for the pending event to the event control unit;
[0010] The event control unit is configured to generate event broadcast information based on the event to be processed and the access rights of the event to be processed, and send the event broadcast information to at least one cluster agent.
[0011] Optionally, the cluster agent is further configured to generate registration information of the cluster agent when the cluster agent is started for the first time, and send the registration information to the cluster management unit.
[0012] Optionally, the event management unit is further used to store the event to be processed in an event queue corresponding to the event to be processed.
[0013] Optionally, the event management unit is specifically used to determine the event type and / or event importance of the event to be processed, and store the event to be processed in an event queue corresponding to the event type and / or the event importance.
[0014] Optionally, the cluster proxy is further configured to generate an event detail query request, and send the event detail query request to the event control unit;
[0015] The event control unit is further configured to determine event details corresponding to the event detail query request, and feed the event details back to the cluster proxy.
[0016] Optionally, the cluster agent is further used to generate an event processing log after processing the event to be processed, and send the event processing log to the event management unit;
[0017] The event management unit is used to store the event processing log.
[0018] Optionally, the cluster agent is further configured to receive upgrade version information, compare the upgrade version information with current version information of the cluster agent, and if the comparison is inconsistent, the cluster agent performs upgrade processing based on the upgrade version information.
[0019] Optionally, the event management module is further used to generate heartbeat broadcast information based on a preset heartbeat broadcast mechanism, and send the heartbeat broadcast information to the cluster agent;
[0020] The cluster agent is further configured to determine that the cluster agent is not connected to the event management module and switch the working mode of the cluster agent to a polling mode if the cluster agent does not receive the heartbeat broadcast information within a preset time period.
[0021] According to another aspect of the present invention, there is provided an event processing method, comprising:
[0022] Determine the event to be processed through the event management module, determine the access rights of the event to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent in the event processing module;
[0023] The cluster agent matches the access permission carried in the event broadcast information according to the event access permission of the cluster agent, and if the permission match succeeds, the to-be-processed event is processed.
[0024] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the event processing method described in any embodiment of the present invention when executed.
[0025] The technical solution of the embodiment of the present invention provides an event processing system composed of an event management module and an event processing module, and the event processing module includes at least one cluster agent. Among them, the event management module is used to determine the event to be processed, and determine the access rights of the event to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent. Such processing can avoid the problem that the container cluster cannot be accessed by the external network due to the closed network environment. The cluster agent is used to match the access rights carried by the event broadcast information according to the event access rights of the cluster agent. If the rights match is successful, the event to be processed is processed. Compared with the prior art, the technical solution of the embodiment of the present invention realizes that in the process of processing events by remotely accessing the container cluster, not only does it not need to manage a large number of cluster certificates, but it can also effectively process events, thereby improving the efficiency of event processing.
[0026] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 A structural block diagram of an event processing system provided in Embodiment 1 of the present invention;
[0029] Figure 2A structural block diagram of an optional event processing system provided in Embodiment 2 of the present invention;
[0030] Figure 3 An event processing sequence diagram applicable to an event processing system provided in Embodiment 2 of the present invention;
[0031] Figure 4 A flowchart of an event processing method provided in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0033] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatuses.
[0034] Embodiment 1
[0035] Figure 1 This is a structural block diagram of an event processing system provided in Embodiment 1 of the present invention. This embodiment is applicable to a scenario of processing events. The event processing system of this embodiment may include the following structure:
[0036] An event management module 10 and an event processing module 20, wherein the event processing module 20 includes at least one cluster agent 21; wherein the event management module 10 is used to determine the events to be processed and the access rights for the events to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent 21.
[0037] Among them, the event management module 10 can be used to manage one or more pending events. The pending events can be understood as events that need to be processed. In an embodiment of the present invention, the pending events can be cluster events. The access rights of the pending events can be understood as the rights to access the pending events. The event broadcast information can be information generated based on the access rights of the pending events. In an embodiment of the present invention, the cluster agent 21 (Agent) can be deployed in a cluster (such as Kubernetes) in the form of a container.
[0038] Specifically, an event API request is received through the event management module 10. After the event management module 10 receives the event API request, a pending event corresponding to the event API request can be generated. After the pending event is generated, the access rights of the pending event can be determined. Then, broadcast information is generated based on the access rights of the pending event, that is, event broadcast information is generated. After the event broadcast information is generated, the event broadcast information can be sent to one or more cluster agents 21.
[0039] It should be noted that, in an embodiment of the present invention, event broadcast information is generated based on access rights, and then broadcast. After the agent matching the access rights obtains the broadcast, it accesses the event management module on its own to obtain detailed event information, which can avoid network congestion caused by excessive traffic occupied by broadcast messages, and at the same time avoid potential security risks.
[0040] Optionally, the event management module 10 includes: an event management unit, a cluster management unit and an event control unit; wherein the cluster management unit is used to obtain registration information of at least one cluster agent 21, generate cluster information based on the registration information, and send the cluster information to the event management unit.
[0041] The registration information of the cluster agent 21 can be understood as the information obtained after registering the cluster agent 21. The registration information of the cluster agent 21 includes the event access rights of the cluster agent 21. The cluster information can be generated based on the registration information of the cluster agent 21. In other words, the cluster management information includes the registration information of one or more cluster agents 21. It can be understood that the cluster management information includes the event access rights of the cluster agent 21. In the embodiment of the present invention, in order to ensure access security and prevent access data from being tampered with, all active access to the event management module adopts a signature authentication mechanism.
[0042] Specifically, the registration information of at least one cluster agent 21 is obtained through the cluster management unit. The registration information of at least one cluster agent 21 is obtained through the cluster management unit, including: receiving the registration information sent by at least one cluster agent 21 through the cluster management unit. After receiving the registration information of one or more cluster agents 21, the received registration information can be stored and cluster information can be generated. The cluster information can then be sent to an event management unit that is in communication with the cluster management unit.
[0043] The event management unit is used to generate a pending event corresponding to the event request in response to the event request, determine the access rights of the pending event based on the cluster information, and send the pending event and the access rights of the pending event to the event control unit.
[0044] The event management unit can be understood as being used to receive an event request, generate an event to be processed related to the event request, and process the event to be processed. The event request can be understood as an event API request.
[0045] Specifically, an event request is received through an event management unit. After receiving the event request, a pending event corresponding to the event request can be generated based on the event request. After the pending event is generated, the access rights of the pending event can be determined based on the cluster information sent by the cluster management unit. After determining the access rights of the pending event, the pending event and the access rights of the pending event can be sent to the event control unit. Among them, determining the access rights of the pending event based on the cluster information sent by the cluster management unit includes: determining a cluster agent 21 that can process the pending event based on the cluster information. Then, the token of the cluster where the cluster agent 21 is located can be determined based on the registration information of the cluster agent 21. And the token is used as the access rights of the pending event.
[0046] Optionally, the event management unit is further used to store the pending event in an event queue corresponding to the pending event. Wherein, the event queue can be understood as a queue for storing the pending event. In an embodiment of the present invention, the event queue can be a pre-created queue, or a queue created after the pending event is created.
[0047] In an embodiment of the present invention, the pending event is stored in an event queue corresponding to the pending event by the event management unit in the following two ways. In one embodiment, after the pending event is generated by the event management unit, an event queue can be created. After the event queue is created, the pending event can be stored in the created event queue. In another embodiment, after the pending event is generated by the event management unit, the pending event can be stored in a pre-created event queue.
[0048] Furthermore, the event management unit is specifically used to determine the event type and / or event importance of the event to be processed, and store the event to be processed in an event queue corresponding to the event type and / or event importance.
[0049] Specifically, the event type and / or event importance of the event to be processed is determined by the event management unit. Then, according to the preset storage rule of the event queue, the event to be processed is stored in the event queue corresponding to the event type and / or event importance. It should be noted that the preset storage rule of the event queue can be set according to actual needs, which is not specifically limited here.
[0050] The event control unit is configured to generate event broadcast information based on the event to be processed and the access rights of the event to be processed, and send the event broadcast information to at least one cluster agent 21 .
[0051] Specifically, the event control unit generates event broadcast information based on the event to be processed and the access rights of the event to be processed. After the event broadcast information is generated, the event broadcast information can be sent to at least one cluster agent 21. In an embodiment of the present invention, after the event broadcast information is generated, the event broadcast information can be broadcast to all cluster agents 21 in the event processing module 20.
[0052] In the embodiment of the present invention, in order to ensure the security of data transmission, the event broadcast information can be encrypted by the event control unit. After the encryption is completed, the encrypted event broadcast information can be broadcast to all cluster agents 21 in the event processing module 20.
[0053] The cluster agent 21 is used to match the access permissions carried by the event broadcast information according to the event access permissions of the cluster agent 21, and if the permissions are matched successfully, process the pending event.
[0054] Specifically, after the cluster agent 21 receives the event broadcast information, it can determine the access rights carried by the event broadcast information. Then, the event access rights of the cluster agent 21 are compared with the access rights carried by the event broadcast information. Thus, a comparison result can be obtained. If the comparison result is consistent, it can be determined that the permission match is successful. If the permission match is successful, the pending event can be processed by the cluster agent 21.
[0055] In the embodiment of the present invention, information is broadcasted through the event management module 10, and then the cluster agent 21 is matched based on the broadcasted information. After matching the cluster agent 21, the event management module 10 is actively accessed through the cluster agent 21 to obtain event detail information. After the cluster agent 21 obtains the event detail information, the cluster agent 21 can process the pending event based on the event detail information.
[0056] Optionally, the cluster agent 21 is further configured to receive an agent version upgrade instruction, and perform upgrade processing on the cluster agent 21 based on the agent version upgrade instruction.
[0057] The proxy version upgrade instruction may be used as an instruction to upgrade the cluster proxy 21. Specifically, the proxy version upgrade instruction is received by the cluster proxy 21. After receiving the proxy version upgrade instruction, the cluster proxy 21 may be upgraded based on the proxy version upgrade instruction, so that the version of the cluster proxy 21 is upgraded from a lower version to a higher version.
[0058] Furthermore, the cluster agent 21 may also be used to receive upgrade version information, and compare the upgrade version information with the current version information of the cluster agent. If the comparison is inconsistent, the cluster agent performs upgrade processing based on the upgrade version information.
[0059] Specifically, the event management module 10 can send the upgrade version information to the cluster agent 21, which can avoid the cluster agent 21 failing to upgrade due to missing the received instruction, and further ensure the effectiveness of the upgrade of the cluster agent 21.
[0060] Optionally, the cluster agent 21 is further configured to generate registration information of the cluster agent 21 when the cluster agent 21 is started for the first time, and send the registration information to the cluster management unit.
[0061] Specifically, when the cluster agent 21 is started for the first time, the registration information of the cluster agent 21 may be generated according to the configuration information of the cluster agent 21. The generated registration information may then be sent to the cluster management unit corresponding to the cluster agent 21.
[0062] Optionally, the cluster agent 21 is further configured to generate prompt information and send the prompt information to the event management module 10 if the cluster agent 21 does not receive the broadcast event broadcast information within a preset time period.
[0063] The preset duration may be a duration set according to actual conditions. The prompt information may be used to prompt the cluster agent 21 that the event broadcast information sent by the event management module 10 has not been received.
[0064] Specifically, if the cluster agent 21 does not receive the event broadcast information sent by the event management module 10 within a preset time, a prompt message can be generated to prompt the cluster agent 21 that it has not received the event broadcast information sent by the event management module 10. The generated prompt message can then be sent to the event management module 10.
[0065] The event management module 10 is further used to rebroadcast the event broadcast information according to the prompt information.
[0066] Specifically, the prompt information sent by the cluster agent 21 is received by the event management module 10. After the event management module 10 receives the prompt information, the event management module 10 can rebroadcast the event broadcast information to the cluster agent 21.
[0067] In the embodiment of the present invention, the cluster agent 21 is further used to generate an event detail query request and send the event detail query request to the event control unit. The event detail query request can be understood as a request for querying event details of the event to be processed.
[0068] Specifically, the event details query instruction is received through the cluster agent 21. After receiving the event details query instruction, an event details query request corresponding to the event details query instruction may be generated. After generating the event details query request, the event details query request may be sent to the event control unit.
[0069] The event control unit is further configured to determine the event details corresponding to the event detail query request, and feed the event details back to the cluster proxy 21 .
[0070] Specifically, the event control unit receives the event details query request. After receiving the event details query request, the event details corresponding to the event details query request can be determined, and then the event details can be sent to the cluster agent 21.
[0071] In the embodiment of the present invention, the cluster agent 21 is further used to generate an event processing log after processing the event to be processed, and send the event processing log to the event management unit; the event management unit is used to store the event processing log.
[0072] The event processing log can be understood as a log generated after the event to be processed is processed.
[0073] Specifically, after processing the event to be processed, the cluster agent 21 may generate an event processing log, and then send the generated event processing log to the event management unit. After receiving the event processing log through the event management unit, the event processing log may be stored through the event management unit.
[0074] In the embodiment of the present invention, the event management module 10 is also used to generate heartbeat broadcast information based on a preset heartbeat broadcast mechanism, and send the heartbeat broadcast information to the cluster agent 21. The cluster agent 21 is also used to determine that the cluster agent 21 is not connected to the event management module 10 if the cluster agent 21 does not receive the heartbeat broadcast information within a preset time period, and switch the working mode of the cluster agent 21 to the polling mode, so that the cluster agent 21 periodically accesses the event management module 10 to try to actively obtain the latest pending events. It can be understood that if the cluster agent re-acquires the heartbeat broadcast information, the working mode of the cluster agent 21 is switched from the polling mode to the normal working mode.
[0075] The preset heartbeat broadcast mechanism may be pre-configured to generate heartbeat broadcast information and periodically send it to the cluster agent 21. The heartbeat broadcast information may be used to determine whether the cluster agent 21 is connected to the event management module 10.
[0076] It should be noted that, in the embodiment of the present invention, if the cluster agent 21 does not obtain the event to be processed, the event management module 10 may continue to send the event broadcast information to the cluster agent 21 .
[0077] The technical solution of the embodiment of the present invention determines the pending event through the event management module, determines the access rights of the pending event, generates event broadcast information based on the access rights, and sends the event broadcast information to at least one cluster agent in the event processing module. The cluster agent matches the access rights carried by the event broadcast information according to the event access rights of the cluster agent. If the rights match is successful, the pending event is processed. Compared with the prior art, the technical solution of the embodiment of the present invention realizes that in the process of processing events by remotely accessing the container cluster, not only does it not need to manage a large number of cluster certificates, but it can also effectively process events, thereby improving the efficiency of event processing.
[0078] Embodiment 2
[0079] As an optional embodiment of the present invention, the present invention provides a structural block diagram of an event processing system. Figure 2 As shown, in an embodiment of the present invention, the event processing system includes a cluster management end and one or more clusters, each cluster including a cluster agent. The cluster management end can be understood as an event management module. The cluster can be understood as an event processing module. Optionally, the cluster management end includes an event management center, a cluster management center and an event controller. Among them, the event management center can be understood as an event management unit. The cluster management center can be understood as a cluster management unit. The event controller can be understood as an event control unit.
[0080] See also Figure 2, obtain the registration information of at least one cluster agent through the cluster management center, generate cluster information based on the registration information, and send the cluster information to the event management center. The event management center responds to the event request, generates a pending event corresponding to the event request, determines the access rights of the pending event based on the cluster information, and sends the access rights of the pending event to the event controller. The event controller generates event broadcast information based on the access rights of the pending event, and sends the event broadcast information to at least one cluster agent. The cluster agent matches the access rights carried by the event broadcast information according to the event access rights of the cluster agent, and if the rights match is successful, processes the pending event.
[0081] In an embodiment of the present invention, after the event management center generates an event to be processed, the event type and / or event importance of the event to be processed can be determined, and the event to be processed can be stored in an event queue corresponding to the event type and / or event importance.
[0082] In the embodiment of the present invention, the event broadcast information may be processed by the event controller, and the encrypted event broadcast information may be broadcasted.
[0083] In an embodiment of the present invention, the registration information of one or more cluster agents can be obtained through the cluster management center. Then, cluster information is generated based on each registration information. After the cluster information is generated, the cluster information can be sent to the event management center. The event management center receives the cluster information sent by the cluster management center, so that the event management center generates a pending event based on the cluster information and the event API request.
[0084] See also Figure 3 In an embodiment of the present invention, if the cluster agent does not receive the heartbeat broadcast information regularly sent by the event management unit to confirm whether the agent is connected within a preset time period, a prompt message is generated. The prompt message can be further sent to the event management module. At this time, the cluster agent will switch the working mode to automatically switch to the polling mode, and regularly access the event management unit to try to actively obtain the latest events. When the agent re-acquires the heartbeat broadcast, the polling mode can be stopped, that is, the working mode is switched from the polling mode to the normal working mode.
[0085] Furthermore, if the event to be processed is not acquired by the cluster proxy, the event management module will continue to send event broadcast information of the event to be processed to the cluster proxy.
[0086] The technical solution of the embodiment of the present invention realizes that in the process of processing events by remotely accessing a container cluster, not only does it not need to manage a large number of cluster certificates, but also the events can be effectively processed, thereby improving the efficiency of event processing.
[0087] Embodiment 3
[0088] Figure 4 The present invention provides a flowchart of an event processing method provided in the third embodiment of the present invention. The method and the event processing system of the above embodiments belong to the same inventive concept. For details not described in detail in the embodiment of the event processing method, reference can be made to the embodiment of the above event processing system. The method is applied to a device detection system composed of an event management module and an event processing module, wherein the event processing module includes at least one cluster agent.
[0089] like Figure 4 As shown, the method of this embodiment specifically includes:
[0090] S210. Determine an event to be processed through an event management module, determine access rights for the event to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent in the event processing module.
[0091] S220: Matching the access permission carried in the event broadcast information with the event access permission of the cluster proxy through the cluster proxy, and if the permission match succeeds, processing the event to be processed.
[0092] The technical solution of the embodiment of the present invention determines the event to be processed through the event management module, determines the access rights of the event to be processed, generates event broadcast information based on the access rights, and sends the event broadcast information to at least one cluster agent. The cluster agent matches the access rights carried by the event broadcast information according to the event access rights of the cluster agent. If the rights match is successful, the event to be processed is processed. Compared with the prior art, the technical solution of the embodiment of the present invention realizes that in the process of processing events by remotely accessing the container cluster, not only does it not need to manage a large number of cluster certificates, but it can also effectively process events, thereby improving the efficiency of event processing.
[0093] Optionally, obtaining registration information of at least one cluster agent through a cluster management unit of the event management module, generating cluster information based on the registration information, and sending the cluster information to the event management unit of the event management module;
[0094] In response to the event request, the event management unit generates a pending event corresponding to the event request, determines the access permission for the pending event based on the cluster information, and sends the pending event and the access permission for the pending event to the event control unit of the event management module;
[0095] The event control unit generates event broadcast information based on the event to be processed and the access permission of the event to be processed, and sends the event broadcast information to at least one cluster agent.
[0096] Optionally, when the cluster agent is started for the first time, the cluster agent generates registration information of the cluster agent, and sends the registration information to the cluster management unit.
[0097] Optionally, the event management unit stores the event to be processed in an event queue corresponding to the event to be processed.
[0098] Optionally, the event type and / or event importance of the event to be processed is determined by the event management unit, and the event to be processed is stored in an event queue corresponding to the event type and / or the event importance.
[0099] Optionally, generating an event detail query request through the cluster proxy, and sending the event detail query request to the event control unit;
[0100] The event control unit is further configured to determine event details corresponding to the event detail query request, and feed the event details back to the cluster proxy.
[0101] Optionally, after processing the event to be processed, the cluster generation generates an event processing log, and sends the event processing log to the event management unit; and the event management unit stores the event processing log.
[0102] Optionally, the upgrade version information is received through the cluster proxy, and the upgrade version information is compared with the current version information of the cluster proxy. If the comparison is inconsistent, the cluster proxy performs upgrade processing based on the upgrade version information.
[0103] Optionally, heartbeat broadcast information is generated based on a preset heartbeat broadcast mechanism through an event management module, and the heartbeat broadcast information is sent to the cluster agent;
[0104] If the cluster agent does not receive the heartbeat broadcast information within a preset time period, it is determined that the cluster agent is not connected to the event management module, and the working mode of the cluster agent is switched to a polling mode.
[0105] The event processing system provided by the embodiment of the present invention can execute the event processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0106] It is worth noting that the various units and modules included in the above-mentioned event processing system are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.
[0107] Embodiment 4
[0108] Embodiment 4 of the present invention further provides a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, for example, the event processing method provided in the above embodiment of the present invention includes:
[0109] Determine the event to be processed through the event management module, determine the access rights for the event to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent in the event processing module;
[0110] The cluster agent matches the access permission carried in the event broadcast information according to the event access permission of the cluster agent, and if the permission match succeeds, the to-be-processed event is processed.
[0111] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0112] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0113] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0114] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. An event processing system, characterized in that: include: An event management module and an event processing module, wherein the event processing module includes at least one cluster agent; wherein, The event management module is used to determine the event to be processed and the access rights of the event to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent; The cluster agent is used to match the access permission carried by the event broadcast information according to the event access permission of the cluster agent, and if the permission match is successful, process the event to be processed; The event management module includes: an event management unit, a cluster management unit and an event control unit; The cluster management unit is used to obtain registration information of at least one cluster agent, generate cluster information based on the registration information, and send the cluster information to the event management unit; The event management unit is configured to generate, in response to an event request, a pending event corresponding to the event request, determine the access permission for the pending event based on the cluster information, and send the pending event and the access permission for the pending event to the event control unit; The event control unit is configured to generate event broadcast information based on the event to be processed and the access rights of the event to be processed, and send the event broadcast information to at least one cluster agent.
2. The system according to claim 1, characterized in that The cluster agent is further configured to generate registration information of the cluster agent when the cluster agent is started for the first time, and send the registration information to the cluster management unit.
3. The system according to claim 1, characterized in that The event management unit is further configured to store the to-be-processed event in an event queue corresponding to the to-be-processed event.
4. The system according to claim 3, characterized in that The event management unit is specifically used to determine the event type and / or event importance of the event to be processed, and store the event to be processed in an event queue corresponding to the event type and / or the event importance.
5. The system according to claim 1, characterized in that The cluster agent is further used to generate an event detail query request and send the event detail query request to the event control unit; The event control unit is further configured to determine event details corresponding to the event detail query request, and feed the event details back to the cluster proxy.
6. The system according to claim 1, characterized in that The cluster agent is further used to generate an event processing log after processing the event to be processed, and send the event processing log to the event management unit; The event management unit is used to store the event processing log.
7. The system according to claim 1, characterized in that The cluster agent is further configured to receive upgrade version information, compare the upgrade version information with the current version information of the cluster agent, and if the comparison is inconsistent, the cluster agent performs upgrade processing based on the upgrade version information.
8. The system according to claim 1, characterized in that The event management module is further used to generate heartbeat broadcast information based on a preset heartbeat broadcast mechanism, and send the heartbeat broadcast information to the cluster agent; The cluster agent is further configured to determine that the cluster agent is not connected to the event management module and switch the working mode of the cluster agent to a polling mode if the cluster agent does not receive the heartbeat broadcast information within a preset time period.
9. An event processing method, characterized in that: include: Determine the event to be processed through the event management module, determine the access rights for the event to be processed, generate event broadcast information based on the access rights, and send the event broadcast information to at least one cluster agent in the event processing module; Matching the access permission carried by the event broadcast information according to the event access permission of the cluster agent by the cluster agent, and processing the pending event if the permission match succeeds; The event management module includes: an event management unit, a cluster management unit and an event control unit; The cluster management unit is used to obtain registration information of at least one cluster agent, generate cluster information based on the registration information, and send the cluster information to the event management unit; The event management unit is configured to generate, in response to an event request, a pending event corresponding to the event request, determine the access permission for the pending event based on the cluster information, and send the pending event and the access permission for the pending event to the event control unit; The event control unit is configured to generate event broadcast information based on the event to be processed and the access rights of the event to be processed, and send the event broadcast information to at least one cluster agent.
