Event notification method, event notification system, device, equipment, storage medium and program product

By introducing an event notification module in project development, and determining the processing strategy based on the type of event notification message, the problems of complex dependencies between modules and confusing communication are solved, and decoupling between modules and efficient system optimization are achieved.

CN119806862APending Publication Date: 2025-04-11DAWNING NETWORK TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411837450.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In a complex network environment, the inter-module messaging and dependencies in project development are complicated, resulting in difficult module decoupling, confusing communication, difficult to manage and modularize.

Method used

An event notification method is provided, through the event notification module, the event notification message is passed between multiple software modules, and the processing strategy is determined according to the message type, including cache or direct notification of the target module processing, reducing the coupling between modules.

Benefits of technology

Decoupling between modules is realized, coupling between modules is reduced, maintainability and scalability of the system is improved, and duplicate execution of development tasks is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806862A_ABST
    Figure CN119806862A_ABST
Patent Text Reader

Abstract

The invention relates to an event notification method, an event notification system, an event notification device, equipment, a storage medium and a program product, is applied to an event notification module in the event notification system, and comprises the following steps: receiving an event notification message sent by an event initiation module in the event notification system, and according to the type of the event notification message, sending the event notification message to the event initiation module; determining a processing strategy of the event notification message; the processing strategy comprises caching the event notification message or notifying a target event execution module in the event notification system to process the event notification message to be processed. According to the method, each software module only needs to send the event notification message to the event notification module, so that the event notification module determines the processing strategy of the event according to the event notification message, the software modules do not need to communicate with each other to implement action execution, and the coupling among the software modules is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information interaction technology, and in particular to an event notification method, event notification system, device, equipment, storage medium and program product. Background Art

[0002] In today's increasingly complex network environment, project development involves many modules, and the message transmission and dependency relationships between modules are intricate. This intricate dependency relationship between modules seriously hinders the decoupling of modules and is not conducive to the independent splitting and compilation of modules.

[0003] In the current module framework, there is a lot of confusion in the communication between modules. For example, in order to notify the change of status, the designers of each module often send messages or modify global variables on their own. This practice will lead to the proliferation of global variables and messages, which are difficult to manage and modularize. In order to simplify the communication and dependency between modules and improve the maintainability and scalability of the system, how to achieve decoupling between modules has become an important direction of current research. Summary of the invention

[0004] Based on this, it is necessary to provide an event notification method, event notification system, device, equipment, storage medium and program product that can achieve decoupling between modules in order to solve the above technical problems.

[0005] In a first aspect, the present application provides an event notification method, which is applied to an event notification module in an event notification system, comprising:

[0006] Receiving an event notification message sent by an event initiation module in the event notification system;

[0007] Determine a processing strategy for the event notification message according to the type of the event notification message; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0008] The method provides an event notification module between multiple software modules that need to communicate. Each software module only needs to send an event notification message to the event notification module so that the event notification module determines the event processing strategy according to the event notification message. The software modules do not need to communicate with each other to execute actions, thereby reducing the coupling between the software modules. In addition, by adding the event notification module, the communication between the software modules can be more frequent, preventing each software module from working in isolation, achieving efficient optimization of each software module, and avoiding repeated execution of development tasks in each software module.

[0009] In one embodiment, the determining of a processing strategy for the event notification message according to the type of the event notification message includes:

[0010] If the type of the event notification message is a synchronous message type, the processing strategy includes notifying the target event execution module to process the event notification message to be processed;

[0011] If the type of the event notification message is an asynchronous message type, the processing strategy includes caching the event notification message so that the target event execution module obtains the event notification message to be processed from the resource pool associated with the event initiation module for processing.

[0012] The event notification method provided in the embodiment of the present application determines different processing strategies for different types of event notification messages, realizes the reasonable processing of different event notification messages, ensures the priority processing of events that need priority processing, and realizes the rationality and efficiency of event processing.

[0013] In one embodiment, the resource pool includes a plurality of resource sub-pools, and the caching of the event notification message includes:

[0014] Determining the priority of the event notification message;

[0015] A target resource sub-pool that meets the storage conditions is selected from the multiple resource sub-pools, and the event notification message is cached in the target resource sub-pool; the storage conditions include that the priority of the resource sub-pool matches the priority of the event notification message, and the remaining capacity of the resource sub-pool is greater than a preset capacity threshold.

[0016] In an embodiment of the present application, the priority of event notification messages is taken into consideration, and matching resource sub-pools are allocated to event notification messages of different priority levels to achieve reasonable processing of different event notification messages, ensure priority processing of events that require priority processing, and achieve rationality and efficiency in event processing.

[0017] In a second aspect, the present application provides an event notification method, which is applied to an event initiation module in an event notification system, comprising:

[0018] When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes an identifier of a target event execution module and a type of the event notification message;

[0019] An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0020] The method provides an event notification module between multiple software modules that need to communicate. Each software module only needs to send an event notification message to the event notification module so that the event notification module determines the event processing strategy according to the event notification message. The software modules do not need to communicate with each other to execute actions, thereby reducing the coupling between the software modules. In addition, by adding the event notification module, the communication between the software modules can be more frequent, preventing each software module from working in isolation, achieving efficient optimization of each software module, and avoiding repeated execution of development tasks in each software module.

[0021] In a third aspect, the present application provides an event notification method, which is applied to an event execution module in an event notification system, comprising:

[0022] Receiving an event notification message sent by an event notification module in the event notification system, and processing the event notification message;

[0023] Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

[0024] The method provides an event notification module between multiple software modules that need to communicate. Each software module only needs to send an event notification message to the event notification module so that the event notification module determines the event processing strategy according to the event notification message. The software modules do not need to communicate with each other to execute actions, thereby reducing the coupling between the software modules. In addition, by adding the event notification module, the communication between the software modules can be more frequent, preventing each software module from working in isolation, achieving efficient optimization of each software module, and avoiding repeated execution of development tasks in each software module.

[0025] In a fourth aspect, the present application provides an event notification system, including an event initiation module, an event notification module and an event execution module;

[0026] The event initiation module is used to execute the event notification method as described in the second aspect above;

[0027] The event notification module is used to execute the event notification method as described in the first aspect above;

[0028] The above-mentioned event execution module is used to execute the event notification method as described in the above-mentioned third aspect.

[0029] In a fifth aspect, the present application further provides an event notification device, which is applied to an event notification module in an event notification system, comprising:

[0030] A receiving module, used to receive an event notification message sent by an event initiating module in the event notification system;

[0031] The determination module is used to determine the processing strategy of the event notification message according to the type of the event notification message; the processing strategy includes caching the event notification message, or notifying the target event execution module in the event notification system to process the event notification message to be processed.

[0032] In a sixth aspect, the present application further provides an event notification device, which is applied to an event initiation module in an event notification system, including: a generation module and a sending module, wherein:

[0033] A generation module, used to generate an event notification message according to the event collaborative processing requirement when the event collaborative processing requirement is met; the event notification message includes an identifier of a target event execution module and a type of the event notification message;

[0034] The sending module is used to send an event notification message to the event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0035] In a seventh aspect, the present application further provides an event notification device, which is applied to an event execution module in an event notification system, including: a receiving module or a processing module, wherein:

[0036] A receiving module, used to receive an event notification message sent by an event notification module in the event notification system, and process the event notification message;

[0037] Alternatively, the processing module is used to obtain the event notification message to be processed from the resource pool associated with the event initiation module in the event notification system for processing.

[0038] In an eighth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0039] Receive an event notification message sent by an event initiation module in the event notification system;

[0040] According to the type of the event notification message, a processing strategy for the event notification message is determined; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0041] In a ninth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0042] When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes an identifier of a target event execution module and a type of the event notification message;

[0043] An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0044] In a tenth aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0045] Receive event notification messages sent by the event notification module in the event notification system and process the event notification messages;

[0046] Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

[0047] In an eleventh aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0048] Receive an event notification message sent by an event initiation module in the event notification system;

[0049] According to the type of the event notification message, a processing strategy for the event notification message is determined; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0050] In a twelfth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0051] When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes an identifier of a target event execution module and a type of the event notification message;

[0052] An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0053] In a thirteenth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0054] Receive event notification messages sent by the event notification module in the event notification system and process the event notification messages;

[0055] Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

[0056] In a fourteenth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0057] Receive an event notification message sent by an event initiation module in the event notification system;

[0058] According to the type of the event notification message, a processing strategy for the event notification message is determined; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0059] In a fifteenth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0060] When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes an identifier of a target event execution module and a type of the event notification message;

[0061] An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0062] In a sixteenth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0063] Receive event notification messages sent by the event notification module in the event notification system and process the event notification messages;

[0064] Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

[0065] The above-mentioned event notification method, event notification system, device, equipment, storage medium and program product, the above-mentioned method provides an event notification module between multiple software modules that need to communicate, each software module only needs to send the event notification message to the event notification module, so that the event notification module determines the event processing strategy according to the event notification message, and the software modules do not need to communicate with each other to execute the action, thereby reducing the coupling between the software modules; in addition, through the addition of the event notification module, the communication between the software modules can be more frequent, preventing each software module from developing in isolation, achieving efficient optimization of each software module, and avoiding repeated execution of development tasks in each software module. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0067] Figure 1 An application environment diagram of an event notification method in an embodiment;

[0068] Figure 2 A schematic diagram of a flow chart of an event notification method in an embodiment;

[0069] Figure 3 A schematic diagram of a flow chart of an event notification method in another embodiment;

[0070] Figure 4 A schematic diagram of a flow chart of an event notification method in another embodiment;

[0071] Figure 5 A schematic diagram of a flow chart of an event notification method in another embodiment;

[0072] Figure 6 A schematic diagram of a flow chart of an event notification method in an embodiment;

[0073] Figure 7 is a structural block diagram of an event notification device in an embodiment;

[0074] Figure 8 is a structural block diagram of an event notification device in another embodiment;

[0075] Fig. 9 is a structural block diagram of an event notification device in another embodiment;

[0076] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0078] In today's increasingly complex network environment, project development involves many modules, and the message transmission and dependency relationships between modules are intricate. This intricate dependency relationship between modules seriously hinders the decoupling of modules and is not conducive to the independent splitting and compilation of modules.

[0079] In the current module framework, there is a lot of confusion in the communication between modules. For example, in order to notify the change of state, the designers of each module often send messages or modify global variables on their own. This practice will lead to the proliferation of global variables and messages, which are difficult to manage and modularize. In order to simplify the communication and dependency between modules and improve the maintainability and scalability of the system, how to achieve decoupling between modules has become an important direction of current research. This application aims to solve this problem.

[0080] After introducing the background technology of the event notification method provided by the embodiment of the present application, the following briefly describes the implementation environment involved in the event notification method provided by the embodiment of the present application. The event notification method provided by the embodiment of the present application can be applied to Figure 1 The event notification system 01 shown. Figure 1 , the event notification system 01 includes an event notification module 10, an event initiation module 20 and a time execution module 30, wherein the event notification system 01 may include an event notification module 10, at least one event initiation module 20 and at least one event execution module 30, and each event initiation module 20 and each event execution module 30 are in communication connection with the event notification module 10. It should be noted that, in the event notification system 01, except for the event notification module 10, other modules (i.e., each event initiation module 20 and each event execution module 30) are all communication modules in the project development scenario, i.e., other modules in the event notification system 01 except for the event notification module 10 can be both event initiation modules 20 and event execution modules 30.

[0081] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific terminal may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0082] After introducing the application scenarios of the event notification method provided in the embodiments of the present application, the event notification method described in the present application is introduced in detail below.

[0083] In one embodiment, Figure 2 As shown, an event notification method is provided, which is applied to Figure 1 Taking the event notification module 10 in the example as an example, the method includes the following steps:

[0084] S201: Receive an event notification message sent by an event initiation module in an event notification system.

[0085] In an embodiment of the present application, when the event initiation module in the event notification system requires the event execution module in the event notification system to perform a certain action, the event initiation module can first generate a time notification message based on the details of the action, and send the event notification message to the event notification module in the event notification system, so that the event notification module receives the event notification message sent by the event initiation module.

[0086] For example, if module A (i.e., event initiation module) in the event notification system needs module B (i.e., event execution module) to end an action, then module A will generate an event message based on the time and type of the end action that module B needs to perform, and send the event message to the event notification module. The event notification module can mount the event message to the list of pending events. Furthermore, the event notification module can also receive event messages corresponding to other modules sent by other modules (i.e., other event initiation modules), and mount the event messages corresponding to other modules to the list of pending events. When the event initiation module needs the event execution module to perform a corresponding action, it can generate an event notification message based on the execution information of the corresponding action, and send the event notification message to the event notification module.

[0087] It should be noted that the execution information of an action includes information such as execution type (for example, event synchronous execution and event asynchronous execution), execution priority, execution object (ie, which event execution module executes the event), and so on.

[0088] It should be noted that the event notification module is implemented through the notification linked list. The notification linked list is a function linked list. Each node on the function linked list has a function registered. When an event occurs, the functions corresponding to all nodes on the linked list will be executed. The function to be run is determined by the event initiating module. The event initiating module saves the operation that should be performed when the event occurs in the notification linked list through a function pointer. Then when the event occurs, the notifier executes the callback function of each element in the linked list in turn to complete the notification.

[0089] S202: Determine a processing strategy for the event notification message according to the type of the event notification message.

[0090] The types of event notification messages include event synchronous execution type and event asynchronous execution type.

[0091] The processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0092] The target event execution module refers to the module corresponding to the event notification message. For example, if the event notification message is to let module C end the current action immediately, then module C is the target event execution module.

[0093] In an embodiment of the present application, after the event notification module receives the event notification message sent by the event initiation module, the execution type of the event can be determined according to the event notification message, and different processing strategies for the event notification message can be determined according to different event types. Optionally, if the execution type of the event is event synchronous execution, the event notification model can directly send the event notification message to the target event execution module to process the pending event notification message. If the execution type of the event is event asynchronous execution, the event notification model can cache the event notification message to the cache pool so that the event corresponding to the event notification message can be subsequently executed according to information such as the event priority in the event notification message.

[0094] The event notification method provided in the embodiment of the present application is applied to the event notification module in the event notification system, receives the event notification message sent by the event initiation module in the event notification system, and determines the processing strategy of the event notification message according to the type of the event notification message; the processing strategy includes caching the event notification message, or notifying the target event execution module in the event notification system to process the event notification message to be processed. This method provides an event notification module between multiple software modules that need to communicate, and each software module only needs to send the event notification message to the event notification module so that the event notification module determines the event processing strategy according to the event notification message. The software modules do not need to communicate with each other to execute the action, which reduces the coupling between the software modules; in addition, through the addition of the event notification module, the communication between the software modules can be more frequent, which prevents each software module from working in isolation, realizes the efficient optimization of each software module, and also avoids the repeated execution of development tasks in each software module.

[0095] In one embodiment, Figure 2 Based on the embodiment shown, the process of determining the processing strategy of the event notification message can be described as follows: Figure 3 As shown, the above S202 "determining a processing strategy for the event notification message according to the type of the event notification message" includes:

[0096] S301: If the type of the event notification message is a synchronous message type, the processing strategy includes notifying a target event execution module to process the event notification message to be processed.

[0097] In an embodiment of the present application, after the event notification message is obtained as mentioned above, the type of the event notification message can be determined, and when the type of the event notification message is a synchronous message type, the processing strategy is determined to notify the target event execution module to immediately process the event notification message to be processed, thereby realizing the synchronous execution of the event corresponding to the event notification message.

[0098] S302: If the type of the event notification message is an asynchronous message type, the processing strategy includes caching the event notification message so that the target event execution module obtains the event notification message to be processed from the resource pool associated with the event initiation module for processing.

[0099] In an embodiment of the present application, after the event notification message is obtained as mentioned above, the type of the event notification message can be determined, and when the type of the event notification message is an asynchronous message type, the processing strategy is determined to first cache the event notification message into a resource pool, and wait for the target event execution module to obtain the event notification message to be processed from the resource pool associated with the event initiation module, and when the target event execution obtains the event notification message, execute the event corresponding to the event notification message.

[0100] The event notification method provided in the embodiment of the present application determines different processing strategies for different types of event notification messages, realizes the reasonable processing of different event notification messages, ensures the priority processing of events that need priority processing, and realizes the rationality and efficiency of event processing.

[0101] In one embodiment, Figure 3 Based on the embodiment shown, the resource pool includes multiple resource sub-pools, and the process of caching the event notification message can be described as follows: Figure 4 As shown, the above S302 "caching the event notification message" includes:

[0102] S401: Determine the priority of the event notification message.

[0103] In the embodiment of the present application, when the event notification message is obtained as described above, the priority of the event notification message can be determined according to the information carried by the event notification message.

[0104] S402: Select a target resource sub-pool that meets the storage condition from multiple resource sub-pools, and cache the event notification message in the target resource sub-pool.

[0105] The storage condition includes that the priority of the resource sub-pool matches the priority of the event notification message, and the remaining capacity of the resource sub-pool is greater than a preset capacity threshold.

[0106] In an embodiment of the present application, after the priority of the event notification message is determined as above, it can be determined whether the remaining capacity of each resource sub-pool in the resource pool is greater than the preset capacity threshold. If the remaining capacity of the resource sub-pool is greater than the preset capacity threshold, the resource sub-pool is determined as the target resource sub-pool; if the remaining capacity of the resource sub-pool is not greater than the preset capacity threshold, the resource sub-pool is determined as a non-target resource sub-pool, and the event notification message is cached in the target resource sub-pool that matches the event notification message according to the priority of the event notification message.

[0107] Optionally, after determining the target resource sub-pool, if the priority of the event notification message is higher, the event notification message can be cached in any target resource sub-pool; if the priority of the event notification message is lower, the event notification message can be cached in any non-target resource sub-pool.

[0108] It should be noted that each resource sub-pool in the resource pool may be in an idle state or in a running state. When the resource sub-pool is in an idle state, the threads in the resource sub-pool are in a blocked sleep state. Here we can use epoll_wait() to wake up the resource sub-pool. There are also other methods. When an event occurs, the main thread in the resource pool informs the thread to be converted to the running state through eventfd, and the thread is converted to the running state.

[0109] In an embodiment of the present application, the priority of event notification messages is taken into consideration, and matching resource sub-pools are allocated to event notification messages of different priority levels to achieve reasonable processing of different event notification messages, ensure priority processing of events that require priority processing, and achieve rationality and efficiency in event processing.

[0110] In one embodiment, Figure 5 As shown, an event notification method is provided, which is applied to Figure 1 Taking the event initiation module 20 in the example as an example, the method includes the following steps:

[0111] S501. When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement.

[0112] Among them, the event collaborative processing requirement means that the event initiation module requires the event execution module to perform corresponding actions. The event collaborative processing requirement includes the identification of the target execution module that executes the event, the execution type of the event and the priority of the event execution. The event execution type includes event synchronous execution and event asynchronous execution.

[0113] The event notification message includes the identifier of the target event execution module and the type of the event notification message. The types of event notification messages include event synchronous execution and event asynchronous execution. The identifier of the target event execution module is the identifier of the event execution module that executes the event synchronous message.

[0114] In an embodiment of the present application, when the event initiation module requires the event execution module to perform corresponding actions, that is, the event initiation module meets the event collaborative processing requirements, when the event initiation module meets the event collaborative processing request, an event notification message is generated according to the event collaborative processing request.

[0115] S502: Send an event notification message to an event notification module in an event notification system.

[0116] The event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0117] In an embodiment of the present application, after the event notification message is obtained as described above, the event notification message can be sent to an event notification module in the event notification system to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message. Optionally, when the type of the event notification message is a synchronous execution type, the target event execution module is notified to process the pending event notification message, and when the type of the event notification message is an asynchronous execution type, the target event execution module in the event notification system is notified to process the pending event notification message.

[0118] Optionally, the event initiation module can register event notification messages to the event notification module through the event_notifiee_resigter() function. For example, event execution module A has three events, event notification module B1 only cares about event one and event two, event execution module B2 only cares about event one, and event execution module B3 only cares about event three.

[0119] It should be noted that, for a certain event of event execution module A, the same event initiation module can only be registered once, and each event initiation module can register multiple events at a time. When registering an event, the event initiation module can specify whether the event is processed synchronously or asynchronously.

[0120] The event notification method provided in the embodiment of the present application is applied to the event initiation module in the event notification system. When the event collaborative processing requirements are met, an event notification message is generated according to the event collaborative processing requirements, and the event notification message is sent to the event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine the processing strategy of the event notification message according to the type of the event notification message; the event notification message includes the identifier of the target event execution module and the type of the event notification message. This method provides an event notification module between multiple software modules that need to communicate. Each software module only needs to send the event notification message to the event notification module so that the event notification module determines the processing strategy of the event according to the event notification message. The software modules do not need to communicate with each other to execute the action, which reduces the coupling between the software modules; in addition, through the addition of the event notification module, the communication between the software modules can be more frequent, which prevents each software module from working in isolation, realizes the efficient optimization of each software module, and also avoids the repeated execution of development tasks in each software module.

[0121] In one embodiment, an event notification method is provided, which is applied to Figure 1 The event execution module 30 in the example is used as an example to illustrate, and includes the following steps:

[0122] First, receiving an event notification message sent by an event notification module in the event notification system, and processing the event notification message according to the type of the event notification message.

[0123] In an embodiment of the present application, after the event notification module in the above-mentioned event notification system determines the type of the event notification message, if the type of the event notification message is an event synchronization type, the event notification module in the event notification system can directly send the event notification message to the event execution module corresponding to the event notification message, so that the event execution module receives the event notification message sent by the event notification module in the event notification system and processes the event notification message.

[0124] Second, the event notification message to be processed is obtained from the resource pool associated with the event initiation module in the event notification system for processing.

[0125] In an embodiment of the present application, after the event notification module in the above-mentioned event notification system determines the type of the event notification message, if the type of the event notification message is an event asynchronous type, the event notification message to be processed is obtained from the resource pool associated with the event initiation module in the event notification system for processing.

[0126] Optionally, the event execution module may first detect the event notification message to obtain the event execution type. If the event execution type is an asynchronous execution event, the event processing function registered by the event initiation module may be called through event_notifier_call().

[0127] The event notification method provided in the embodiment of the present application is applied to the event execution module in the event notification system, receives the event notification message sent by the event notification module in the event notification system, and processes the event notification message; or, obtains the event notification message to be processed from the resource pool associated with the event initiation module in the event notification system for processing. This method provides an event notification module between multiple software modules that need to communicate. Each software module only needs to send the event notification message to the event notification module so that the event notification module determines the event processing strategy according to the event notification message. The software modules do not need to communicate with each other to execute the action, which reduces the coupling between the software modules. In addition, by adding the event notification module, the communication between the software modules can be more frequent, which prevents each software module from working in isolation, realizes the efficient optimization of each software module, and also avoids the repeated execution of development tasks in each software module.

[0128] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0129] In one embodiment, see Figure 6 , and also provides an event notification method, including:

[0130] S10. When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement;

[0131] S11, sending an event notification message to an event notification module in an event notification system;

[0132] S12, receiving an event notification message sent by an event initiation module in the event notification system;

[0133] S13. If the type of the event notification message is a synchronous message type, the processing strategy includes notifying the target event execution module to process the event notification message to be processed;

[0134] S14. If the type of the event notification message is an asynchronous message type, the processing strategy includes determining the priority of the event notification message;

[0135] S15, selecting a target resource sub-pool that meets the storage condition from the multiple resource sub-pools, and caching the event notification message in the target resource sub-pool;

[0136] S16, receiving an event notification message sent by an event notification module in the event notification system, and processing the event notification message;

[0137] S17: Obtain the event notification message to be processed from the resource pool associated with the event initiation module in the event notification system for processing.

[0138] The method provides an event notification module between multiple software modules that need to communicate. Each software module only needs to send an event notification message to the event notification module so that the event notification module determines the event processing strategy according to the event notification message. The software modules do not need to communicate with each other to execute actions, thereby reducing the coupling between the software modules. In addition, by adding the event notification module, the communication between the software modules can be more frequent, preventing each software module from working in isolation, achieving efficient optimization of each software module, and avoiding repeated execution of development tasks in each software module.

[0139] In one embodiment, see Figure 1 , provides an event notification system, the event notification system includes an event initiation module, an event notification module and an event execution module, and the event initiation module is used to execute the above Figure 5 In the embodiment shown, the event notification module is used to perform the above Figure 2-Figure 4 In the embodiment shown, the event execution module is used to execute the above embodiment.

[0140] Based on the same inventive concept, the embodiment of the present application also provides an event notification device for implementing the event notification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more event notification device embodiments provided below can refer to the limitations of the event notification method above, and will not be repeated here.

[0141] In an exemplary embodiment, Figure 7 As shown, an event notification device is provided, which is applied to an event notification module in an event notification system, including: a receiving module 10 and a determining module 11, wherein:

[0142] The receiving module 10 is used to receive the event notification message sent by the event initiating module in the event notification system.

[0143] The determination module 11 is used to determine the processing strategy of the event notification message according to the type of the event notification message; the processing strategy includes caching the event notification message, or notifying the target event execution module in the event notification system to process the event notification message to be processed.

[0144] In an exemplary embodiment, the determination module 11 includes: a processing unit and a cache unit, wherein:

[0145] A processing unit, specifically configured to, when the type of the event notification message is a synchronous message type, process the event notification message by notifying a target event execution module to process the event notification message to be processed;

[0146] The cache unit is specifically used for caching the event notification message when the event notification message type is an asynchronous message type, so that the target event execution module obtains the event notification message to be processed from the resource pool associated with the event initiation module for processing.

[0147] In an exemplary embodiment, the resource pool includes multiple resource sub-pools, and the cache unit is specifically used to determine the priority of the event notification message; select a target resource sub-pool that meets the storage conditions from the multiple resource sub-pools, and cache the event notification message into the target resource sub-pool; the storage conditions include that the priority of the resource sub-pool matches the priority of the event notification message, and the remaining capacity of the resource sub-pool is greater than a preset capacity threshold.

[0148] In an exemplary embodiment, Figure 8 As shown, an event notification device is provided, which is applied to an event initiation module in an event notification system, including: a generation module 20 and a sending module 21, wherein:

[0149] A generating module 20, configured to generate an event notification message according to the event collaborative processing requirement when the event collaborative processing requirement is met; the event notification message includes an identifier of a target event execution module and a type of the event notification message;

[0150] The sending module is used to send an event notification message to the event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0151] In an exemplary embodiment, Fig. 9As shown, an event notification device is provided, which is applied to an event execution module in an event notification system. The device includes: a receiving module 30 and a processing module 31, including:

[0152] The receiving module 30 is used to receive the event notification message sent by the event notification module in the event notification system and process the event notification message;

[0153] Alternatively, the processing module 31 is used to obtain the event notification message to be processed from the resource pool associated with the event initiating module in the event notification system for processing.

[0154] Each module in the above event notification device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0155] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.10 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store event notification message data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an event notification method is implemented.

[0156] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0157] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0158] Receive an event notification message sent by an event initiation module in the event notification system;

[0159] According to the type of the event notification message, a processing strategy for the event notification message is determined; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0160] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0161] If the type of the event notification message is a synchronous message type, the processing strategy includes notifying the target event execution module to process the event notification message to be processed;

[0162] If the type of the event notification message is an asynchronous message type, the processing strategy includes caching the event notification message so that the target event execution module obtains the event notification message to be processed from the resource pool associated with the event initiation module for processing.

[0163] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0164] Determine the priority of event notification messages;

[0165] A target resource subpool that meets the storage conditions is selected from multiple resource subpools, and the event notification message is cached in the target resource subpool; the storage conditions include that the priority of the resource subpool matches the priority of the event notification message, and the remaining capacity of the resource subpool is greater than a preset capacity threshold.

[0166] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0167] When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes the identifier of the target event execution module and the type of the event notification message;

[0168] An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0169] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0170] Receive event notification messages sent by the event notification module in the event notification system and process the event notification messages;

[0171] Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

[0172] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0173] Receive an event notification message sent by an event initiation module in the event notification system;

[0174] According to the type of the event notification message, a processing strategy for the event notification message is determined; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0175] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0176] If the type of the event notification message is a synchronous message type, the processing strategy includes notifying the target event execution module to process the event notification message to be processed;

[0177] If the type of the event notification message is an asynchronous message type, the processing strategy includes caching the event notification message so that the target event execution module obtains the event notification message to be processed from the resource pool associated with the event initiation module for processing.

[0178] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0179] Determine the priority of event notification messages;

[0180] A target resource subpool that meets the storage conditions is selected from multiple resource subpools, and the event notification message is cached in the target resource subpool; the storage conditions include that the priority of the resource subpool matches the priority of the event notification message, and the remaining capacity of the resource subpool is greater than a preset capacity threshold.

[0181] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0182] When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes the identifier of the target event execution module and the type of the event notification message;

[0183] An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0185] Receive event notification messages sent by the event notification module in the event notification system and process the event notification messages;

[0186] Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

[0187] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0188] Receive an event notification message sent by an event initiation module in the event notification system;

[0189] According to the type of the event notification message, a processing strategy for the event notification message is determined; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

[0190] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0191] If the type of the event notification message is a synchronous message type, the processing strategy includes notifying the target event execution module to process the event notification message to be processed;

[0192] If the type of the event notification message is an asynchronous message type, the processing strategy includes caching the event notification message so that the target event execution module obtains the event notification message to be processed from the resource pool associated with the event initiation module for processing.

[0193] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0194] Determine the priority of event notification messages;

[0195] A target resource subpool that meets the storage conditions is selected from multiple resource subpools, and the event notification message is cached in the target resource subpool; the storage conditions include that the priority of the resource subpool matches the priority of the event notification message, and the remaining capacity of the resource subpool is greater than a preset capacity threshold.

[0196] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0197] When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes the identifier of the target event execution module and the type of the event notification message;

[0198] An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

[0199] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0200] Receive event notification messages sent by the event notification module in the event notification system and process the event notification messages;

[0201] Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

[0202] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0203] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0204] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0205] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An event notification method, characterized in that: An event notification module applied to an event notification system, the event notification method comprising: Receiving an event notification message sent by an event initiation module in the event notification system; Determine a processing strategy for the event notification message according to the type of the event notification message; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

2. The method according to claim 1, characterized in that: The determining, according to the type of the event notification message, a processing strategy for the event notification message includes: If the type of the event notification message is a synchronous message type, the processing strategy includes notifying the target event execution module to process the event notification message to be processed; If the type of the event notification message is an asynchronous message type, the processing strategy includes caching the event notification message so that the target event execution module obtains the event notification message to be processed from the resource pool associated with the event initiation module for processing.

3. The method according to claim 2, characterized in that The resource pool includes a plurality of resource sub-pools, and the caching the event notification message includes: Determining the priority of the event notification message; A target resource sub-pool that meets the storage conditions is selected from the multiple resource sub-pools, and the event notification message is cached in the target resource sub-pool; the storage conditions include that the priority of the resource sub-pool matches the priority of the event notification message, and the remaining capacity of the resource sub-pool is greater than a preset capacity threshold.

4. An event notification method, characterized in that: An event initiation module applied to an event notification system, the event notification method includes: When the event collaborative processing requirement is met, an event notification message is generated according to the event collaborative processing requirement; the event notification message includes an identifier of a target event execution module and a type of the event notification message; An event notification message is sent to an event notification module in the event notification system; the event notification message is used to instruct the event notification module to determine a processing strategy for the event notification message according to the type of the event notification message.

5. An event notification method, characterized in that: An event execution module applied to an event notification system, wherein the event notification method comprises: Receiving an event notification message sent by an event notification module in the event notification system, and processing the event notification message; Alternatively, the event notification message to be processed is obtained from a resource pool associated with the event initiation module in the event notification system for processing.

6. An event notification system, characterized in that: The event notification system includes an event initiation module, an event notification module and an event execution module; The event initiation module is used to execute the method according to claim 4; The event notification module is used to execute the method according to any one of claims 1 to 3 above; The event execution module is used to execute the method as described in claim 5 above.

7. An event notification device, characterized in that: An event notification module applied to an event notification system, the device comprising: A receiving module, used to receive an event notification message sent by an event initiating module in the event notification system; A determination module is used to determine a processing strategy for the event notification message according to the type of the event notification message; the processing strategy includes caching the event notification message, or notifying a target event execution module in the event notification system to process the event notification message to be processed.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Event processing method and device based on domain driving

    CN112486478A

  • Request processing method and device

    CN118672753A

  • Event processing method and device, network equipment and computer readable storage medium

    CN118740589A