CN115658430A - Event monitoring processing method and device, electronic equipment and storage medium - Google Patents
Event monitoring processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN115658430A CN115658430A CN202211282112.1A CN202211282112A CN115658430A CN 115658430 A CN115658430 A CN 115658430A CN 202211282112 A CN202211282112 A CN 202211282112A CN 115658430 A CN115658430 A CN 115658430A
- Authority
- CN
- China
- Prior art keywords
- event
- trigger
- interface
- name
- linked list
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 48
- 238000003672 processing method Methods 0.000 title claims abstract description 31
- 238000012545 processing Methods 0.000 claims abstract description 44
- 238000000034 method Methods 0.000 claims abstract description 15
- 230000006870 function Effects 0.000 claims description 59
- 238000004590 computer program Methods 0.000 claims description 13
- 230000001960 triggered effect Effects 0.000 claims description 13
- 230000007246 mechanism Effects 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 230000000903 blocking effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
Abstract
The application provides an event monitoring processing method, an event monitoring processing device, electronic equipment and a storage medium, which relate to the technical field of computers, and the method comprises the following steps: under the condition that a trigger event is monitored, determining a first event name of the trigger event, wherein the trigger event comprises a hardware layer trigger event or a software layer trigger event; based on the first event name, inquiring target event related information corresponding to the first event name in a secondary linked list, wherein the secondary linked list comprises: the method comprises the following steps that a plurality of event names of hardware layer trigger events and event related information corresponding to the event names, and a plurality of event names of software layer trigger events and event related information corresponding to the event names; and carrying out asynchronous processing on the related information of the target event. The method and the device can realize that the software layer and the hardware layer share one monitoring mechanism, save resources, and improve the response efficiency of event monitoring through asynchronous processing.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to an event monitoring processing method and apparatus, an electronic device, and a storage medium.
Background
In the field of the internet of things, more and more intelligent home and intelligent wearable intelligent devices combine front-end technology and embedded technology to realize corresponding functions. In order to realize the intelligent judgment function, the intelligent device needs to have an event monitoring function to determine the current operation of the user in real time. Event monitoring means that when a certain event occurs, a corresponding event object is transmitted to a corresponding event listener, and the event listener performs corresponding processing on the event object according to event information encapsulated inside. It becomes therefore important to be able to implement a snoop mechanism that triggers events at both the software and hardware layers.
In the prior art, as in the open source project espruno, a set of monitoring mechanisms is respectively designed for hardware layer triggering and software layer triggering, so that a large amount of resources are occupied, and the performance of intelligent equipment is reduced.
Disclosure of Invention
In order to solve the above problems, the present application provides an event monitoring processing method, an event monitoring processing apparatus, an electronic device, and a storage medium.
At least one embodiment of the present application provides an event monitoring processing method, including:
determining a first event name of a trigger event under the condition that the trigger event is monitored, wherein the trigger event comprises a hardware layer trigger event or a software layer trigger event;
based on the first event name, querying target event related information corresponding to the first event name in a secondary linked list, wherein the secondary linked list comprises: the hardware layer comprises a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and the software layer trigger events comprises a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
and carrying out asynchronous processing on the relevant information of the target event.
According to an event monitoring processing method provided by at least one embodiment of the present application, the determining a first event name of the trigger event includes:
acquiring a flag bit in a callback function under the condition that the trigger event comprises a hardware layer trigger event, wherein the callback function is a function received by the event listener under the condition that the event triggers, and the flag bit is a signal used for representing the hardware layer trigger event;
and determining the first event name corresponding to the flag bit based on an asynchronous processing library.
According to an event monitoring processing method provided by at least one embodiment of the present application, the determining a first event name of a trigger event includes:
determining a type of an event interface in the event that the trigger event comprises a software-layer trigger event, the event interface comprising: an event search interface and an event removal interface;
determining a first event-related parameter based on the type of the event interface;
determining the first event name triggered based on the first event-related parameter.
According to the event monitoring processing method provided by at least one embodiment of the present application, in a case that the event interface includes an event search interface, the first event related parameter includes a searched event type;
in a case where the event interface includes an event removal interface, the first event-related parameter includes: a removed event type or a combination thereof and a remove callback function.
According to the event monitoring processing method provided by at least one embodiment of the present application, in a case that the parameter related to the first event only includes the removed event type, the target event related information includes all callback functions corresponding to the first event name and a single linked list in the secondary linked list.
According to the event monitoring processing method provided by at least one embodiment of the present application, when the parameter related to the first event includes the removed event type and the removal callback function, the information related to the target event includes a data node corresponding to the removal callback function in the secondary linked list.
According to the event monitoring processing method provided in at least one embodiment of the present application, the event interface further includes: the event adding interface is used for adding events to the secondary linked list in an initial state;
in a case where the event interface includes an event addition interface, the first event-related parameter includes: the type of the added event, the callback function of the added event and the parameters of the callback function of the added event.
At least one embodiment of the present application further provides an event monitoring processing apparatus, including:
the device comprises a first determining module, a second determining module and a processing module, wherein the first determining module is used for determining a first event name of a trigger event under the condition that the trigger event is monitored, and the trigger event comprises a hardware layer trigger event or a software layer trigger event;
a second determining module, configured to query, based on the first event name, a secondary linked list for target event related information corresponding to the first event name, where the secondary linked list includes: the hardware layer comprises a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and the software layer trigger events comprises a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
and the processing module is used for carrying out asynchronous processing on the related information of the target event.
At least one embodiment of the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement any one of the event monitoring processing methods described above.
At least one embodiment of the present application further provides a non-transitory computer readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, implementing the event listening processing method as described in any one of the above.
The application provides an event monitoring processing method, an event monitoring processing device, an electronic device and a storage medium, wherein a hardware layer trigger event and a software layer trigger event share one set of event monitoring mechanism, after the event is triggered, corresponding events and target event related information are efficiently searched through a secondary linked list, asynchronous processing is carried out on the target event related information, the performance of the intelligent device is improved by saving resources and increasing available resources of the intelligent device, and meanwhile, the performance of the intelligent device is further improved by improving the execution efficiency of the events through efficient searching and asynchronous processing of the events.
Drawings
In order to more clearly illustrate the technical solutions in the present application or prior art, the drawings used in the embodiments or the description of the prior art are briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of an event monitoring processing method according to at least one embodiment of the present disclosure;
FIG. 2 is a schematic structural diagram of a secondary linked list provided in at least one embodiment of the present application;
fig. 3 is a second flowchart illustrating an event monitoring processing method according to at least one embodiment of the present application;
fig. 4 is a third flowchart illustrating an event monitoring processing method according to at least one embodiment of the present application;
fig. 5 is a schematic structural diagram of an event monitoring processing apparatus according to at least one embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to at least one embodiment of the present application.
Detailed Description
To make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the drawings in the present application, and it is obvious that the described embodiments are some, but not all embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In view of the problem in the prior art that a hardware layer trigger and a software layer trigger respectively design a set of monitoring mechanisms, occupy a large amount of resources, and cause performance degradation of an intelligent device, an event monitoring processing method is provided in the present application, and fig. 1 is one of flow diagrams of the event monitoring processing method provided in at least one embodiment of the present application, and as shown in fig. 1, the method includes:
and step 130, carrying out asynchronous processing on the relevant information of the target event.
Specifically, in some technical solutions, a set of event monitoring systems is respectively designed for hardware layer monitoring and software layer monitoring, which occupies resources in an intelligent device and affects performance of the intelligent device, especially for small and medium-sized devices with limited resources, where performance is particularly greatly affected, in at least one embodiment of the present application, a set of event monitoring systems is designed and shared for a hardware layer trigger event and a software layer trigger event, and the hardware layer event and the software layer event are classified and stored in a secondary linked list, so that the event can be efficiently searched or removed and a callback function of the event is executed after the event is triggered.
Optionally, the event may be processed asynchronously by using a libov asynchronous processing library, that is, the found event and the target event related information corresponding to the event are input into a non-blocking I/O model, in the non-blocking I/O model, the time-consuming event is added into a thread pool for execution, and after the execution is completed, the time-consuming event is added into an event processing main thread, so that the main thread is prevented from being blocked, and the processing efficiency of the event is greatly improved.
Optionally, fig. 2 is a schematic structural diagram of a secondary linked list provided in at least one embodiment of the present application, as shown in fig. 2, where the secondary linked list includes a plurality of head nodes, data nodes corresponding to the head nodes, a first pointer and a second pointer, and a single head node, the data nodes corresponding to the head nodes, and the second pointer constitute a single linked list, where the head node represents types of events, such as an event a, an event B, and an event C shown in fig. 2, taking an event source as an example, a triggered event may be a sliding screen, a corresponding event type is a sliding screen event, an event a may be a sliding screen event, a first pointer is used to point from a previous head node to a next head node, such as a pointer existing between the event a and the event B and shown in fig. 2, and a B event C event, a second pointer is used to point from the head node to the data node corresponding to the head node, or, in the same single linked list, a previous data node points to a next data node, the data node stores a second event name and target event related information corresponding to a target event name of the target event a, and a function corresponding to a multiple event a, which are distributed side by side, and a function of the event a corresponding to side. The secondary linked list stores the events according to the event types in a classified manner, the searching range is further reduced through the event types, and meanwhile, the efficiency of adding time, searching the events and removing the events can be improved through the structured design of the secondary linked list.
In addition, the secondary linked list comprises a function for allocating the memory, the memory required by the event can be determined and added into the function for allocating the memory before the event is added, and the memory can be dynamically allocated for the event according to the function for allocating the memory when the secondary linked list is added.
Optionally, when searching for an event, the secondary linked list may find a single linked list of an event type that is the same as the first event name by traversing the head node, further determine a second event name that matches the first event name by a data node in the single linked list, and obtain information related to a target event corresponding to the event. When traversing the head node, the traversal can be performed from the initial position, the traversal can be performed from the end position, and the traversal can be performed from the middle part of the secondary linked list, which is not limited in the present application.
Optionally, the determining a first event name of the trigger event includes:
acquiring a flag bit in a callback function under the condition that the trigger event comprises a hardware layer trigger event, wherein the callback function is a function received by the event listener under the condition that the event triggers, and the flag bit is a signal used for representing the hardware layer trigger event;
and determining the first event name corresponding to the flag bit based on an asynchronous processing library.
Specifically, fig. 3 is a second schematic flow diagram of the event monitoring processing method according to at least one embodiment of the present application, as shown in fig. 3, when hardware is initialized, a callback function is set for an interrupt event, when an interrupt event is triggered by a hardware layer, a flag bit of the corresponding event is set in the callback function, and in an event listener, an asynchronous processing library sets a libuv event loop to detect the flag bit, so that a global variable is used between different threads, and communication between different threads is achieved. After the flag bit is detected, the name of the first event corresponding to the flag bit is further determined, so that the corresponding event is searched in the secondary linked list according to the name of the first event and executed.
Optionally, the determining a first event name of the trigger event includes:
in the event that the triggering event comprises a software-layer triggering event, determining a type of an event interface, the event interface comprising: an event search interface and an event removal interface;
determining a first event-related parameter based on the type of the event interface;
determining the first event name triggered based on the first event related parameter.
Specifically, after a software layer event is triggered, an event object is created and transmitted into an event interface as a parameter, so that before a first event name is determined, the event interface needs to be determined first, then a first event-related parameter included in the event interface needs to be determined, and the triggered first event name is determined according to the first event-related parameter.
Optionally, in a case that the event interface includes an event lookup interface, the first event-related parameter includes a type of event looked up;
in a case where the event interface includes an event removal interface, the first event-related parameter includes: a removed event type or a combination thereof and a remove callback function.
Specifically, fig. 4 is a third schematic flow diagram of the event monitoring processing method according to at least one embodiment of the present application, and as shown in fig. 4, the event searching interface is emitWatch (), the event type searched for may be included in the interface, an event corresponding to the event type searched for may be found through the secondary linked list, and a callback function corresponding to the event is executed. The removal event interface is removeWatch (), and the removal event type can be included in the interface only or the removal event type and the removal callback function are transmitted simultaneously, so that the event corresponding to the removal event type is found through the secondary linked list, and the callback function corresponding to the event is executed.
Optionally, in a case that the parameter related to the first event only includes the removed event type, the target event related information includes all callback functions corresponding to the first event name and a single linked list in the secondary linked list.
Specifically, if the parameters related to the first event in the event interface removeWatch () are removed only include the removed event type, which indicates that all callback functions related to the first event name and the single linked list corresponding to the first event name need to be removed, the corresponding event may be searched through the secondary linked list, and all callback functions corresponding to the event and all the corresponding single linked lists are deleted, so as to update the secondary linked list.
Optionally, in a case that the first event-related parameter includes the removed event type and a removal callback function, the target event-related information includes node data corresponding to the removal callback function on the secondary linked list.
Specifically, if the parameters related to the first event in the remove event interface removeWatch () include the removed event type and the remove callback function, which indicates that the data node corresponding to the remove callback function in the single chain table corresponding to the event needs to be removed, the corresponding event and the single chain table thereof may be searched through the secondary chain table, the data node corresponding to the remove callback function is searched in the single chain table, and the data node is deleted, so as to update the single chain table and the secondary chain table.
Optionally, the event interface further includes: the event adding interface is used for adding an event to the secondary linked list in an initial state;
in a case where the event interface includes an event adding interface, the first event-related parameter includes: the type of the added event, the callback function of the added event and the parameters of the callback function of the added event.
Specifically, as shown in fig. 4, the event adding interface is setWatch (), where the interface includes an added event type, an added event callback function, and parameters of the added event callback function, and when registering an event listener for an event source, the corresponding event can be added to the secondary linked list by determining the three parameters of the event adding interface setWatch (), the added event type can be used as a head node, and the parameters of the added event callback function and the added event callback function can be respectively used as data nodes corresponding to the head node.
Optionally, the event interface may be packaged by a js engine, the js engine is configured to parse the js language and convert the js language into a machine language recognizable to a computer, and the event processing core logic is compiled by using a c language.
According to the event monitoring processing method, the hardware layer trigger event and the software layer trigger event share one set of event monitoring mechanism, after the event is triggered, the corresponding event and the target event related information are efficiently searched through the secondary linked list, the target event related information is asynchronously processed, the performance of the intelligent device is improved by increasing available resources of the intelligent device through resource saving, and meanwhile, the performance of the intelligent device is further improved by efficiently searching and asynchronously processing the event and improving the execution efficiency of the event. In addition, the secondary linked list can store the events as required, and the performance of the intelligent equipment is improved by saving resources.
The following describes an event monitoring processing apparatus provided in the present application, and the event monitoring processing apparatus described below and the event monitoring processing method described above may be referred to correspondingly.
Fig. 5 is a schematic structural diagram of an event monitoring processing apparatus according to at least one embodiment of the present application, and as shown in fig. 5, the event monitoring processing apparatus 500 includes: a first determining module 501, a second determining module 502 and a processing module 503, wherein:
a first determining module 501, configured to determine a first event name of a trigger event when the trigger event is monitored, where the trigger event includes a hardware layer trigger event or a software layer trigger event;
a second determining module 502, configured to query, based on the first event name, a secondary linked list for target event related information corresponding to the first event name, where the secondary linked list includes: a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
the processing module 503 is configured to perform asynchronous processing on the target event related information.
The application provides an event monitoring processing apparatus, through with hardware layer trigger event and software layer trigger event sharing one set of event monitoring mechanism, after the event trigger, through the high-efficient event and the relevant information of target event of looking for of second grade linked list, and carry out asynchronous processing to the relevant information of target event, through saving the resource, through the available resource that increases smart machine, promote smart machine's performance, simultaneously, through the high-efficient seeking and asynchronous processing to the event, through the execution efficiency who improves the event, further promote smart machine's performance. In addition, the secondary linked list can store the events as required, and the performance of the intelligent equipment is improved by saving resources.
Optionally, the first determining module 501 is specifically configured to:
acquiring a flag bit in a callback function under the condition that the triggering event comprises a hardware layer triggering event, wherein the callback function is a function received under the condition that the event is triggered, and the flag bit is a signal used for representing the hardware layer triggering event;
and determining the first event name corresponding to the flag bit based on an asynchronous processing library.
Optionally, the first determining module 501 is specifically configured to:
in the event that the triggering event comprises a software-layer triggering event, determining a type of an event interface, the event interface comprising: an event search interface and an event removal interface;
determining a first event-related parameter based on the type of the event interface;
determining the first event name triggered based on the first event related parameter.
Optionally, the first determining module 501 is specifically configured to:
in the case that the event interface comprises an event lookup interface, the first event-related parameter comprises a type of event looked up;
in a case where the event interface includes an event removal interface, the first event-related parameter includes: a removed event type or a combination thereof and a remove callback function.
Optionally, the first determining module 501 is specifically configured to:
the event interface further comprises: the event adding interface is used for adding events to the secondary linked list in an initial state;
in a case where the event interface includes an event adding interface, the first event-related parameter includes: the type of the added event, the callback function of the added event and the parameters of the callback function of the added event.
Optionally, the second determining module 502 is specifically configured to:
and under the condition that the first event related parameter only comprises the removed event type, the target event related information comprises all callback functions corresponding to the first event name and a single linked list in the secondary linked list.
Optionally, the second determining module 502 is specifically configured to:
and under the condition that the first event related parameter comprises the removed event type and the removed callback function, the target event related information comprises a data node corresponding to the removed callback function on the secondary linked list.
Fig. 6 is a schematic structural diagram of an electronic device according to at least one embodiment of the present application, and as shown in fig. 6, the electronic device may include: a processor (processor) 610, a communication Interface (Communications Interface) 620, a memory (memory) 630 and a communication bus 640, wherein the processor 610, the communication Interface 620 and the memory 630 communicate with each other via the communication bus 640. The processor 610 may call logic instructions in the memory 630 to perform an event snoop handling method comprising:
under the condition that a trigger event is monitored, determining a first event name of the trigger event, wherein the trigger event comprises a hardware layer trigger event or a software layer trigger event;
based on the first event name, querying target event related information corresponding to the first event name in a secondary linked list, wherein the secondary linked list comprises: a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
and carrying out asynchronous processing on the relevant information of the target event.
In addition, the logic instructions in the memory 630 may be implemented in the form of software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, and various media capable of storing program codes.
In another aspect, the present application further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer readable storage medium, when the computer program is executed by a processor, a computer can execute the event monitoring processing method provided by the above methods, and the method includes:
under the condition that a trigger event is monitored, determining a first event name of the trigger event, wherein the trigger event comprises a hardware layer trigger event or a software layer trigger event;
based on the first event name, querying target event related information corresponding to the first event name in a secondary linked list, wherein the secondary linked list comprises: the hardware layer comprises a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and the software layer trigger events comprises a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
and carrying out asynchronous processing on the relevant information of the target event.
In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements a method for event listening processing provided by the above methods, the method including:
under the condition that a trigger event is monitored, determining a first event name of the trigger event, wherein the trigger event comprises a hardware layer trigger event or a software layer trigger event;
based on the first event name, querying target event related information corresponding to the first event name in a secondary linked list, wherein the secondary linked list comprises: the hardware layer comprises a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and the software layer trigger events comprises a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
and carrying out asynchronous processing on the relevant information of the target event.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present application.
Claims (10)
1. An event monitoring processing method is characterized by comprising the following steps:
under the condition that a trigger event is monitored, determining a first event name of the trigger event, wherein the trigger event comprises a hardware layer trigger event or a software layer trigger event;
based on the first event name, querying target event related information corresponding to the first event name in a secondary linked list, wherein the secondary linked list comprises: a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
and carrying out asynchronous processing on the relevant information of the target event.
2. The method according to claim 1, wherein the determining the first event name of the trigger event includes:
acquiring a flag bit in a callback function under the condition that the triggering event comprises a hardware layer triggering event, wherein the callback function is a function received under the condition that the event is triggered, and the flag bit is a signal used for representing the hardware layer triggering event;
and determining the first event name corresponding to the flag bit based on an asynchronous processing library.
3. The method according to claim 1, wherein the determining the first event name of the trigger event includes:
in the event that the triggering event comprises a software-layer triggering event, determining a type of an event interface, the event interface comprising: an event search interface and an event removal interface;
determining a first event-related parameter based on the type of the event interface;
determining the first event name triggered based on the first event related parameter.
4. The event snoop processing method according to claim 3,
in the case that the event interface comprises an event lookup interface, the first event-related parameter comprises a type of event looked up;
in a case where the event interface includes an event removal interface, the first event-related parameter includes: a removed event type or a combination thereof and a remove callback function.
5. The event snoop processing method according to claim 3 or 4, wherein in case that the first event related parameter only includes the removed event type, the target event related information includes all callback functions corresponding to the first event name and a single linked list in the secondary linked list.
6. The event snoop processing method according to claim 3 or 4, wherein in the case that the first event-related parameter includes the removed event type and a removal callback function, the target event-related information includes a data node corresponding to the removal callback function on the secondary linked list.
7. The event snoop processing method according to claim 3 or 4, wherein the event interface further comprises: the event adding interface is used for adding an event to the secondary linked list in an initial state;
in a case where the event interface includes an event adding interface, the first event-related parameter includes: the type of the added event, the callback function of the added event and the parameters of the callback function of the added event.
8. An event snoop processing apparatus, comprising:
the device comprises a first determining module, a second determining module and a processing module, wherein the first determining module is used for determining a first event name of a trigger event under the condition that the trigger event is monitored, and the trigger event comprises a hardware layer trigger event or a software layer trigger event;
a second determining module, configured to query, in a secondary linked list, target event related information corresponding to the first event name based on the first event name, where the secondary linked list includes: the hardware layer comprises a plurality of event names of the hardware layer trigger events and event related information corresponding to the event names, and the software layer trigger events comprises a plurality of event names of the software layer trigger events and event related information corresponding to the event names;
and the processing module is used for carrying out asynchronous processing on the related information of the target event.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the event snoop handling method according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the event listening processing method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211282112.1A CN115658430A (en) | 2022-10-19 | 2022-10-19 | Event monitoring processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211282112.1A CN115658430A (en) | 2022-10-19 | 2022-10-19 | Event monitoring processing method and device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115658430A true CN115658430A (en) | 2023-01-31 |
Family
ID=84990093
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211282112.1A Pending CN115658430A (en) | 2022-10-19 | 2022-10-19 | Event monitoring processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115658430A (en) |
-
2022
- 2022-10-19 CN CN202211282112.1A patent/CN115658430A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109240876A (en) | Example monitoring method, computer readable storage medium and terminal device | |
CN109189496A (en) | The dynamic base information acquisition method and device of application program | |
CN112000350A (en) | Dynamic rule updating method, device and storage medium | |
CN112231102A (en) | Method, device, equipment and product for improving performance of storage system | |
CN115145806A (en) | Data acquisition method and device and computer readable storage medium | |
CN114490527A (en) | Metadata retrieval method, system, terminal and storage medium | |
CN114168352B (en) | Multi-core task scheduling method and device, electronic equipment and storage medium | |
CN113778644A (en) | Task processing method, device, equipment and storage medium | |
CN107526690B (en) | Method and device for clearing cache | |
CN115658430A (en) | Event monitoring processing method and device, electronic equipment and storage medium | |
CN104536784B (en) | Real-time system update method and device | |
CN115705294B (en) | Method, device, electronic equipment and medium for acquiring function call information | |
CN115580497A (en) | Data transmission control method and equipment in container environment and storage medium | |
CN115858499A (en) | Database partition processing method and device, computer equipment and storage medium | |
CN112907198B (en) | Service state circulation maintenance method and device and electronic equipment | |
EP3793171B1 (en) | Message processing method, apparatus, and system | |
CN109582595B (en) | Memory management method, device, server and storage medium | |
CN114691781A (en) | Data synchronization method, system, device, equipment and medium | |
CN111090513B (en) | Method for detecting link health state of Internet of vehicles platform terminal and storage medium | |
CN113536074B (en) | Keyword query method and device in vue framework, computer equipment and medium | |
CN111124923B (en) | Running state query method and device, server equipment and storage medium | |
CN118035042B (en) | Application program performance analysis method and device, electronic equipment and storage medium | |
CN117331600A (en) | Data interaction self-adaption method for heterogeneous software system | |
CN106293635B (en) | Instruction block processing method and processing device | |
CN117632492A (en) | Resource management method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |