An event execution method and device, electronic equipment, and storage medium

By injecting asynchronous event-driven classes and creating asynchronous event function queues in SaaS applications, the problem of information and data interaction between components in Web componentization technology is solved, enabling efficient data transfer and event processing across components, and improving the quality and stability of SaaS applications.

CN120295685BActive Publication Date: 2026-01-16粤港澳大湾区(广东)国创中心
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510220008.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2026-01-16
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

In existing Web componentization technologies, information and data cannot be directly passed between sibling components and between components from different generations, resulting in high programming complexity and a decline in the quality of SaaS application software.

Method used

By injecting asynchronous event-driven classes into the software operation service application, an asynchronous event function queue is created, and events are triggered and executed through asynchronous event-driven classes between components, enabling cross-component information and data interaction.

Benefits of technology

It reduces programming complexity, improves the ease of information and data interaction between components, and enhances the quality and stability of SaaS software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295685B_ABST
    Figure CN120295685B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides an event execution method and device, electronic equipment and a storage medium, wherein an asynchronous event driving class is injected into a software operation service application program in response to a starting operation of the software operation service application program; then an asynchronous event function queue is created according to the asynchronous event driving class through a first component, wherein the asynchronous event function queue contains an asynchronous execution function; further, an event is triggered according to the asynchronous event driving class through a second component, and the event is executed according to the asynchronous event function queue through the first component. The application of the asynchronous event driving class makes the information and data interaction between modules or components of the software operation service application program not be limited by the original framework, and the asynchronous execution function corresponding to the event can be automatically executed in sequence through the associated component when the event is triggered by a certain component, so that the programming complexity is effectively reduced, and the SaaS software quality and stability are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of web componentization, and in particular to an event execution method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the continuous development of modern information technology, the technology of WEB browser has also made great progress. In the 1990s and the early 21st century, JavaScript, HTML, CSS are the main technical basis, and various manufacturers provide many services such as portal website, news site, blog, forum, etc. With the continuous improvement of Internet speed and the development of communication technology such as 5G, various manufacturers begin to provide more and more rich WEB-based SaaS (Software as a Service, Software as a Service) services. With more and more services provided by SaaS applications, the concept of web componentization development was proposed around 2010, and then single-page application development frameworks represented by Angular, React, and Vue were used to solve the difficulties of web modularization and componentization development.

[0003] However, with the development of web componentization technology, SaaS applications are often composed of dozens or even hundreds of modules and components, which undoubtedly greatly increases the development complexity of WEB applications; at the same time, modules and components also need to pass information and data to each other to cooperatively complete a complex function, which challenges the ease of use of the information and data interaction framework mode.

[0004] Taking the information and data interaction mechanism provided by the Angular platform as an example, its direct information transmission can only be carried out between the parent and the child, and is realized through the @input / @output method, so the main defects are as follows: (1) sibling components cannot directly transmit information and data; (2) components of different generations cannot directly interact with data and information; (3) the ability of program developers is required to be high, the programming complexity is large, the information and data interaction mode is complex, and the quality of SaaS application software is greatly reduced. SUMMARY

[0005] In view of the above problems, an event execution method and device, electronic equipment and storage medium are provided to overcome the above problems or at least partially solve the above problems, comprising:

[0006] An event execution method, characterized in that the method comprises:

[0007] In response to a start operation of a software operation service application program, an asynchronous event driving class is injected into the software operation service application program;

[0008] creating, by a first component, an asynchronous event function queue according to the asynchronous event driven class, wherein the asynchronous event function queue contains asynchronous execution functions;

[0009] triggering, by a second component, an event according to the asynchronous event driven class, and executing, by the first component, the event according to the asynchronous event function queue.

[0010] Optionally, the method further comprises:

[0011] determining a processing result of the event, and sending the processing result of the event to the second component by the first component.

[0012] Optionally, the injecting the asynchronous event driven class into the software operation service application comprises:

[0013] injecting the asynchronous event driven class into the software operation service application by a dependency injection mechanism.

[0014] Optionally, the executing the event according to the asynchronous event function queue by the first component comprises:

[0015] asynchronously executing, by the first component, asynchronous execution functions corresponding to the event according to the asynchronous event function queue.

[0016] Optionally, the method further comprises:

[0017] in response to a closing operation of the software operation service application, stopping the executing the event according to the asynchronous event function queue by the first component, and clearing the asynchronous event function queue.

[0018] Optionally, the injecting the asynchronous event driven class into the software operation service application by the dependency injection mechanism is in a scope of the entire software operation service application.

[0019] Optionally, after the creating, by the first component, the asynchronous event function queue according to the asynchronous event driven class, the method further comprises:

[0020] establishing, by the asynchronous event driven class, an association relationship between the first component and the second component.

[0021] An event execution apparatus, the apparatus comprising:

[0022] an asynchronous event driven class injection module configured to inject an asynchronous event driven class into a software operation service application in response to a starting operation of the software operation service application;

[0023] The asynchronous event function queue creating module is configured to create an asynchronous event function queue according to the asynchronous event driven class by the first component, wherein the asynchronous event function queue contains asynchronous execution functions.

[0024] The event executing module is configured to trigger an event according to the asynchronous event driven class by the second component, and execute the event according to the asynchronous event function queue by the first component.

[0025] Optionally, the apparatus further comprises:

[0026] The processing result feedback module is configured to determine a processing result of the event, and send the processing result of the event to the second component by the first component.

[0027] Optionally, the asynchronous event driven class injecting module comprises:

[0028] The asynchronous event driven class injecting submodule is configured to inject the asynchronous event driven class into the software operation service application program by a dependency injection mechanism.

[0029] Optionally, the event executing module comprises:

[0030] The event executing submodule is configured to execute the asynchronous execution functions corresponding to the event asynchronously according to the asynchronous event function queue by the first component.

[0031] Optionally, the apparatus further comprises:

[0032] The application program closing response module is configured to, in response to a closing operation of the software operation service application program, stop executing the event according to the asynchronous event function queue by the first component, and clear the asynchronous event function queue.

[0033] Optionally, the apparatus further comprises:

[0034] The correlation relationship establishing module is configured to establish a correlation relationship between the first component and the second component by the asynchronous event driven class.

[0035] An electronic device comprises a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor to implement the event executing method as described above.

[0036] A computer readable storage medium, characterized in that a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to implement the event executing method as described above.

[0037] A computer program product comprises a computer program which, when executed by a processor, implements the event execution method as described above.

[0038] Embodiments of the present application have the following advantages:

[0039] The present application provides an event execution method, by responding to the starting operation of a software operation service application, injecting an asynchronous event driving class into the software operation service application; then creating an asynchronous event function queue according to the asynchronous event driving class through a first component, wherein the asynchronous event function queue contains asynchronous execution functions; further triggering an event according to the asynchronous event driving class through a second component, and executing the event according to the asynchronous event function queue through the first component. The application of the asynchronous event driving class makes the information and data interaction between modules or components of the software operation service application not be limited by the original framework, and the asynchronous execution functions corresponding to the event can be automatically executed in sequence through the associated components when the event is triggered, effectively reducing the programming complexity, improving the ease of use of information and data interaction between modules or even components, further improving the quality of SaaS software, and enhancing the stability. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the description of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0041] Figure 1 is a step flow chart of an event execution method provided by some embodiments of the present application;

[0042] Figure 2 is a schematic diagram of information interaction between components of the present application provided by some embodiments of the present application;

[0043] Figure 3 is an example diagram of the execution flow of the present application provided by some embodiments of the present application;

[0044] Figure 4 is a structural schematic diagram of an event execution device provided by some embodiments of the present application;

[0045] Figure 5 is a block diagram of an electronic device provided by some embodiments of the present application;

[0046] Figure 6 is a schematic diagram of a computer readable medium provided by some embodiments of the present application. DETAILED DESCRIPTION

[0047] In order to make the above objectives, characteristics and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below in combination with the drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0048] In the embodiments of the present application, the same items or similar items with basically the same functions and effects are distinguished by using "first", "second", etc., only for the purpose of clearly describing the technical solutions of the embodiments of the present application, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features.

[0049] In the embodiments of the present application, the positions or position relationships indicated by the terms "upper", "lower", etc. are based on the positions or position relationships shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the indicated devices or elements must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as limiting the present application.

[0050] With the continuous development of modern information technology, the technology of WEB browser has also made great progress. In the 1990s and the early 21st century, JavaScript, HTML, CSS were the main technical basis, and various manufacturers provided many services such as portal websites, news sites, blogs, forums, etc. With the continuous improvement of Internet speed and the development of communication technologies such as 5G, various manufacturers began to provide more and more rich WEB-based SaaS services. With more and more services provided by SaaS applications, the concept of web componentization development was proposed around 2010, and then single-page application development frameworks represented by Angular, React, and Vue appeared to solve the difficulties of web modularization and componentization development.

[0051] However, with the development of web componentization technology, SaaS applications are often composed of dozens or even hundreds of modules and components, which undoubtedly greatly increases the development complexity of WEB applications; at the same time, information and data also need to be transmitted between modules and components to cooperatively complete a complex function, which challenges the ease of use of the information and data interaction framework mode.

[0052] Taking the information and data interaction mechanism provided by the Angular platform as an example, the direct information transmission thereof can only be performed between a parent and a child, and is realized through the @input / @output method, and therefore the main defects thereof are as follows: (1) information and data cannot be directly transmitted between sibling components; (2) data and information cannot be directly interacted between components at different generations; (3) the ability requirement of a program developer is high, the programming complexity is large, the information and data interaction mode is complex, and the quality of the SaaS application software is greatly reduced.

[0053] In order to solve the above problems, the core technical concept that the application of the asynchronous event driving class makes the information and data interaction between modules or components of the software operation service application program not be limited by the original framework is used, the event execution method in the related art is improved, and the application will be described in detail below with reference to the drawings:

[0054] Referring to Figure 1 , a step flowchart of an event execution method provided by some embodiments of the application is shown, and the method can specifically include the following steps:

[0055] In step 101, in response to a starting operation of a software operation service application program, an asynchronous event driving class is injected into the software operation service application program.

[0056] In a specific implementation, after starting the SaaS application program, the asynchronous event driving class can be automatically injected into the SaaS application program through a dependence injection mechanism (Dependence Injection), and the scope thereof can be the entire SaaS application program.

[0057] Through the application of the asynchronous event driving class, the Angular native parent-child component communication limitation can be broken in a subsequent step, direct communication between any components (parent-child, sibling, and generation) is allowed, and the hierarchical relationship does not need to be explicitly defined, so that the component coupling degree is reduced.

[0058] In some embodiments of the application, the injection of the asynchronous event driving class into the software operation service application program includes:

[0059] The asynchronous event driving class is injected into the software operation service application program through a dependence injection mechanism.

[0060] In actual application, the asynchronous event driven class can be automatically injected into the SaaS application through a dependency injection mechanism after the SaaS application is started, and the scope can be the entire SaaS application, thereby ensuring global accessibility of the asynchronous event driven class in the application. Through the dependency injection, the complexity of hard coding can be reduced, and the flexibility of the system can be increased, so that multiple components in the application can conveniently interact with events.

[0061] In some embodiments of the present application, the scope of injecting the asynchronous event driven class into the software operation service application through the dependency injection mechanism is the entire software operation service application.

[0062] In specific implementation, the asynchronous event driven class can be automatically injected into the SaaS application through a dependency injection mechanism after the SaaS application is started, and the scope can be the entire SaaS application, thereby ensuring global accessibility of the asynchronous event driven class in the application. It can ensure that each component in the SaaS application can share the same event driven mechanism. This global scope design reduces the need for multiple instantiations of the asynchronous event driven class in the application, thereby simplifying the structure and management of the system. The various modules of the application can more efficiently interact with data and process events through this global event mechanism, thereby enhancing the scalability and flexibility of the system.

[0063] In step 102, an asynchronous event function queue is created according to the asynchronous event driven class through the first component, wherein the asynchronous event function queue contains asynchronous execution functions.

[0064] In specific implementation, in the created component 1 (first component), an asynchronous event function queue can be created and the asynchronous processing function associated with the event can be automatically added to the asynchronous event function queue through the on method provided by the asynchronous event driven class. When a certain event is triggered, the asynchronous event driven class will asynchronously execute the corresponding asynchronous execution function in the asynchronous event function queue in sequence. In the created component 2 (second component), the event can be automatically triggered for asynchronous execution through the emit method provided by the asynchronous event driven class. This method can be attached to all data objects in JavaScript. The triggered event will be automatically executed asynchronously in sequence by the asynchronous event function queue, and the data returned to the component triggering the event will be returned through the Promise object.

[0065] Specifically, as Figure 2As shown, an asynchronous event-driven framework system can be developed based on the Angular application framework. This system can include multiple modules, each module can include multiple components, and an asynchronous event function queue. When components interact with each other, component 1-3-1, which has the ability to handle event A, can add the asynchronous execution function of event A to the asynchronous event function queue through the `on` method of the asynchronous event-driven class. Component 2-3-1, which needs to handle event A, can trigger event A through the `emit` method of the asynchronous event-driven class and attach relevant data. After component 1-3-1 finishes processing, the function is returned to component 2-3-1 through a promise object. This method enables cross-module and cross-component information and data interaction based on asynchronous event-driven mechanisms.

[0066] In some embodiments of the present invention, after the first component creates the asynchronous event function queue according to the asynchronous event-driven class, the method further includes:

[0067] The association between the first component and the second component is established through the asynchronous event-driven class.

[0068] In practical applications, components created in software operation service applications do not need to be labeled with their relationships, such as parent and child components, sibling components, or generational components. That is, there is no need to explicitly associate relationships between components. These relationships are automatically established through the `on` method of the asynchronous event-driven class after the first component creates an asynchronous event function queue based on the asynchronous event-driven class. This allows information and data interaction between modules and components to be unrestricted by the original framework, thus avoiding developers manually managing dependencies between components and simplifying the interaction between components. Through automatically established event relationships, the system can handle cross-component data transfer and event execution more efficiently, improving code readability and maintainability and reducing errors.

[0069] Step 103: The second component triggers an event based on the asynchronous event-driven class, and the first component executes the event based on the asynchronous event function queue.

[0070] In the specific implementation, in the created component 2 (the second component), the event can be automatically triggered to execute asynchronously through the emit method provided by the asynchronous event-driven class. This method can be attached with any data object in JavaScript as the data type to be processed. The triggered events will be automatically executed asynchronously in order by the asynchronous event function queue, and the data will be returned to the component that triggered the event through a Promise object.

[0071] Specifically, such as Figure 2As shown, a framework system based on an asynchronous event-driven method can be developed based on an Angular application framework, which can include multiple modules, multiple components, and an asynchronous event function queue. When components interact with each other, component 1-3-1 that has the ability to process event A can add an asynchronous execution function of event A to the asynchronous event function queue through the on method of the asynchronous event-driven class, component 2-3-1 that needs to process event A can trigger event A through the emit method of the asynchronous event-driven class and attach relevant data, and after component 1-3-1 is processed, a promise object is returned to component 2-3-1. As described above, the demand for information and data interaction between modules and components based on asynchronous event-driven can be achieved.

[0072] In some embodiments of the application, the method further comprises:

[0073] determining the processing result of the event, and sending the processing result of the event to the second component through the first component.

[0074] In actual application, in the created component 2 (second component), the emit method provided by the asynchronous event-driven class can be used to automatically trigger event asynchronous execution, and the method can attach data types required for processing, which are all data objects in JavaScript; the triggered event will be automatically and sequentially executed asynchronously by the asynchronous event function queue, and the data is returned to the component that triggers the event through the Promise object; thereby further optimizing the fluency and accuracy of information transmission. The processing result of the event can be fed back to the component that triggers the event in time, ensuring the collaborative work of each component in asynchronous execution and avoiding the problems of information loss or improper processing. The transparency and reliability of event processing are increased, and the efficient flow of data and information between components is ensured.

[0075] In some embodiments of the application, the execution of the event by the first component according to the asynchronous event function queue comprises:

[0076] Asynchronously executing the asynchronous execution function corresponding to the event by the first component according to the asynchronous event function queue.

[0077] In a specific implementation, a framework system based on an asynchronous event-driven method can be developed based on an Angular application framework, which can include multiple modules, multiple components, and an asynchronous event function queue. When components interact with each other, component 1-3-1 that has the ability to process event A can add an asynchronous execution function of event A to the asynchronous event function queue through the on method of the asynchronous event-driven class, and component 2-3-1 that needs to process event A can trigger event A through the emit method of the asynchronous event-driven class and attach relevant data, and after component 1-3-1 is processed, a promise object is returned to component 2-3-1. As described above, the demand for information and data interaction between modules and components based on asynchronous event-driven can be met, and the response speed and processing capacity of the system are improved.

[0078] In some embodiments of the application, the method further comprises:

[0079] In response to the closing operation of the software operation service application, stopping the execution of the event by the first component according to the asynchronous event function queue, and clearing the asynchronous event function queue.

[0080] In actual application, when the software operation service application is closed, the asynchronous event function queue will automatically terminate the event being executed and clear the asynchronous event function queue, ensuring the robust operation of the SaaS application, improving its stability, and avoiding possible abnormal state or deadlock.

[0081] The following will be combined with Figure 3 The embodiments of the application are further described:

[0082] As Figure 3 The execution flow example diagram provided by the embodiments of the application is shown, which can specifically include the following steps:

[0083] Starting the SaaS application based on the WEB browser;

[0084] The application automatically injects the asynchronous event-driven class through the dependency injection mechanism of Angular;

[0085] Creating component 1 and establishing an asynchronous event function queue corresponding to a certain event or certain events through the on method of the asynchronous event-driven class;

[0086] Creating component 2 and triggering a certain event through the emit method of the asynchronous event-driven class, and the data type attached by the method supports JavaScript data objects;

[0087] The triggered event will be automatically executed asynchronously in sequence by the asynchronous event function queue, and the result data is returned to the component 2 through the Promise object;

[0088] The components 1 and 2 are created without explicitly establishing an association, and the association is automatically established through the on method of the asynchronous event driving class. The processing result of the component 1 to the event is also automatically returned to the component 2.

[0089] When the SaaS application is closed, the asynchronous event function queue will automatically terminate the event being executed and clear the asynchronous event function queue, ensuring the stability of the SaaS application.

[0090] It should be noted that, for the method embodiments, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited to the action sequence described, because according to the embodiments of the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily necessary for the embodiments of the present application.

[0091] Referring to Figure 4 , a structural schematic diagram of an event execution device provided by some embodiments of the present application is shown; specifically, it can include the following modules:

[0092] The asynchronous event driving class injection module 401 is configured to inject an asynchronous event driving class into a software operation service application in response to a start operation of the software operation service application;

[0093] The asynchronous event function queue creation module 402 is configured to create an asynchronous event function queue according to the asynchronous event driving class through a first component, wherein the asynchronous event function queue contains an asynchronous execution function;

[0094] The event execution module 403 is configured to trigger an event according to the asynchronous event driving class through a second component, and execute the event according to the asynchronous event function queue through the first component.

[0095] In some embodiments of the present application, the device further includes:

[0096] The processing result feedback module is configured to determine the processing result of the event, and send the processing result of the event to the second component through the first component.

[0097] In some embodiments of the present application, the asynchronous event driving class injection module 401 includes:

[0098] The asynchronous event-driven class injection submodule is used to inject the asynchronous event-driven class into the software operation service application through the dependency injection mechanism.

[0099] In some embodiments of the present invention, the event execution module 403 includes:

[0100] The event execution submodule is used to asynchronously execute the asynchronous execution function corresponding to the event according to the asynchronous event function queue through the first component.

[0101] In some embodiments of the present invention, the apparatus further includes:

[0102] The application shutdown response module is used to respond to the shutdown operation of the software operation service application by stopping the execution of the event through the first component according to the asynchronous event function queue and clearing the asynchronous event function queue.

[0103] In some embodiments of the present invention, the apparatus further includes:

[0104] The association establishment module is used to establish the association between the first component and the second component through the asynchronous event-driven class.

[0105] Some embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the above-described event execution method.

[0106] In addition, embodiments of the present invention also provide an electronic device, such as... Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503, and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0107] Memory 503 is used to store computer programs;

[0108] When processor 501 executes the program stored in memory 503, it performs the following steps:

[0109] In response to the startup operation of the software operation service application, an asynchronous event-driven class is injected into the software operation service application;

[0110] An asynchronous event function queue is created by the first component based on the asynchronous event-driven class, wherein the asynchronous event function queue contains asynchronous execution functions;

[0111] The second component triggers the event based on the asynchronous event-driven class, and the first component executes the event based on the asynchronous event function queue.

[0112] In an optional embodiment of the present application, the method further comprises:

[0113] determining a processing result of the event, and sending the processing result of the event to the second component through the first component.

[0114] In an optional embodiment of the present application, the injecting the asynchronous event driving class into the software operation service application comprises:

[0115] injecting the asynchronous event driving class into the software operation service application through a dependency injection mechanism.

[0116] In an optional embodiment of the present application, the executing the event according to the asynchronous event function queue through the first component comprises:

[0117] asynchronously executing an asynchronous execution function corresponding to the event according to the asynchronous event function queue through the first component.

[0118] In an optional embodiment of the present application, the method further comprises:

[0119] in response to a closing operation of the software operation service application, stopping the executing the event according to the asynchronous event function queue through the first component, and clearing the asynchronous event function queue.

[0120] In an optional embodiment of the present application, the scope of injecting the asynchronous event driving class into the software operation service application through the dependency injection mechanism is the entire software operation service application.

[0121] In an optional embodiment of the present application, after the creating the asynchronous event function queue through the first component according to the asynchronous event driving class, the method further comprises:

[0122] establishing an association between the first component and the second component through the asynchronous event driving class.

[0123] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.

[0124] The communication interface is used for communication between the terminal and other devices.

[0125] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0126] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0127] like Figure 6 As shown, in another embodiment of the present invention, a computer-readable storage medium 601 is also provided, which stores instructions that, when run on a computer, cause the computer to execute the event execution method described in the above embodiment.

[0128] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0129] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0130] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0131] Those skilled in the art will appreciate that embodiments of the application can be readily used as software, hardware, or a combination of software and hardware. In one embodiment, the present application can be implemented as a computer program product, which can include a computer-readable storage medium having stored computer program code. Embodiments of the present application can also be implemented as a system on chips (SoC).

[0132] Embodiments of the present application are described in terms of flowcharts and / or block diagrams in which several operational steps or blocks are presented, and various elements of machine according to the embodiments of the present application are described. It will be understood that each operational step or block in a flowchart, and combinations of operational steps or blocks, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart block(s) or a flowchart block(s) combinations. These computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal devices to function in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block(s) or a flowchart block(s) combinations. Figure 1 Figure 1

[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices to cause a series of operational steps to be performed on the computer or other programmable terminal devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal devices provide steps for implementing the functions specified in the flowchart block(s) or a flowchart block(s) combinations. Figure 1 Figure 1

[0134] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices to cause a series of operational steps to be performed on the computer or other programmable terminal devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal devices provide steps for implementing the functions specified in the flowchart block(s) or a flowchart block(s) combinations. Figure 1 Figure 1

[0135] While preferred embodiments of the application have been described, modifications and variations can be effected to such embodiments by those of ordinary skill in the art once the necessary conceptual underpinnings are appreciated. Accordingly, it is to be understood that the appended claims are intended to cover all such modifications and variations as falling within the scope of the application. It shall be understood that the terms and expressions used herein have the ordinary technical meanings at the time of the filing of this patent application.

[0136] ​​​​​​Finally, it needs to be pointed out that in this article, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or terminal device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or terminal device including the above element.

[0137] The above provides a detailed description of an event execution method and device, an electronic device, and a storage medium. The principles and implementation modes of the present application are described by applying specific examples. The above example is only used to help understand the method and core idea of the present application. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed. In summary, the content of the specification should not be understood as a limitation of the present application.

Claims

1. An event execution method characterized by, The method comprises: in response to a starting operation of a software operation service application, injecting an asynchronous event driving class into the software operation service application; creating an asynchronous event function queue according to the asynchronous event driving class by a first component, wherein the asynchronous event function queue contains asynchronous execution functions; triggering an event according to the asynchronous event driving class by a second component, and executing the event according to the asynchronous event function queue by the first component; the method further comprises: injecting the asynchronous event driving class into the software operation service application by a dependency injection mechanism; establishing an association between the first component and the second component by the asynchronous event driving class; after the first component creates the asynchronous event function queue according to the asynchronous event driving class, the automatic association is established by the on method of the asynchronous event driving class.

2. The method of claim 1, wherein, The method further comprises: determining the processing result of the event, and sending the processing result of the event to the second component by the first component.

3. The method of claim 1, wherein, The executing the event according to the asynchronous event function queue by the first component comprises: asynchronously executing the asynchronous execution function corresponding to the event according to the asynchronous event function queue by the first component.

4. The method of claim 2, wherein, The method further comprises: in response to a closing operation of the software operation service application, stopping the execution of the event according to the asynchronous event function queue by the first component, and clearing the asynchronous event function queue.

5. The method of claim 1, wherein, The scope of injecting the asynchronous event driving class into the software operation service application by the dependency injection mechanism is the entire software operation service application.

6. An event execution apparatus characterized by comprising: The device comprises: an asynchronous event driving class injection module, configured to inject an asynchronous event driving class into a software operation service application in response to a starting operation of the software operation service application; an asynchronous event function queue creation module, configured to create an asynchronous event function queue according to the asynchronous event driving class by a first component, wherein the asynchronous event function queue contains asynchronous execution functions; an event execution module, configured to trigger an event according to the asynchronous event driving class by a second component, and execute the event according to the asynchronous event function queue by the first component; an association establishment module, configured to establish an association between the first component and the second component by the asynchronous event driving class; after the first component creates the asynchronous event function queue according to the asynchronous event driving class, the automatic association is established by the on method of the asynchronous event driving class. The asynchronous event driving class injection module further comprises: an asynchronous event driving class injection submodule, configured to inject the asynchronous event driving class into the software operation service application by a dependency injection mechanism.

7. An electronic device, comprising: A computer program comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, wherein the computer program is executed by the processor to implement the event execution method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the event execution method in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Asynchronous operation processing method for computer application program and corresponding system

    CN113032118A