Event processing method and related equipment
By acquiring additional status information beyond event messages through the event bus platform and filtering it in conjunction with additional conditions, the problem that the event bus in the existing technology cannot meet the specific business requirements is solved. This enables accurate filtering and delivery of events, and improves the effectiveness and ease of use of event processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- PETAL CLOUD TECH CO LTD
- Filing Date
- 2024-11-08
- Publication Date
- 2026-05-08
AI Technical Summary
Existing event buses cannot meet specific business requirements when filtering and delivering events based solely on the content of the event messages. In particular, when key content is missing from the event messages or the information of interest does not originate from the event source, accurate filtering and distribution cannot be achieved.
The event bus platform acquires additional status information beyond event messages, and filters it by combining additional conditions. It supports the combination and arrangement of multiple additional conditions to achieve higher-order filtering methods and improve filtering accuracy.
It enables accurate filtering and delivery of events in special business scenarios, reduces false alarms, and improves the effectiveness and ease of use of event handling.
Smart Images

Figure CN121996441A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an event processing method and related equipment. Background Technology
[0002] EventBridge is typically used in cloud computing scenarios. It is a serverless event bus service provided by cloud providers in the industry. It can decouple the access of massive event sources from event consumption, solve the problems of lack of standards, difficulty in acquisition, information silos, and weak response of business events, and help businesses quickly build a distributed event-driven architecture.
[0003] Currently, when creating an event bus, the industry can filter and deliver event messages by customizing the filtering rules for the event message content. However, this method only supports filtering based on the event message content itself. If some relevant content is missing in the current event message, it cannot meet the event filtering requirements under specific business needs. Summary of the Invention
[0004] This application provides an event processing method and related equipment that can provide a mechanism with additional conditions to filter events based on states other than the event message content, thereby improving the accuracy of event filtering and addressing special business expansion needs.
[0005] In a first aspect, embodiments of this application provide an event processing method, the method comprising: an event bus platform acquiring first information and second information, the first information including information of a first event, and the second information including status information associated with the first event; when the event bus platform determines that the first information satisfies a first condition and the second information satisfies a second condition, the event bus platform sends a first message to a terminal device, the first message being used to indicate that the first information satisfies the first condition and the second information satisfies the second condition.
[0006] The first event can be an event generated by the event source, the first information can be the event message described in the following embodiments, and the second information can be state information outside the content of the event message, such as other states not provided by the event source in the event message, or the surrounding environment state unrelated to the event source.
[0007] By implementing the method provided in the first aspect, the event bus platform can support the ability to judge additional conditions, thereby combining event messages and business status. When both meet certain conditions, events can be delivered to event consumers, such as alarm events, so that fault handling can be responded to immediately.
[0008] In one possible implementation, the first event is a fluctuation event in the CPU utilization rate, and the first information includes information about the CPU utilization rate.
[0009] In this way, the event bus platform can monitor the business health status when CPU utilization fluctuates by listening to CPU utilization fluctuations in the business environment and according to event filtering rules.
[0010] In one possible implementation, the second information includes one or more of the following: business success rate information, memory usage rate information.
[0011] In this way, the event bus platform can support the ability to judge one or more additional conditions, thereby combining CPU events (such as CPU utilization fluctuation events), business status (such as business success rate), and memory information (such as memory utilization). When CPU, business status, and / or memory all meet certain conditions, an alarm event can be sent to the event consumer so that fault handling can be responded to immediately.
[0012] In one possible implementation, the second condition includes at least two sub-conditions, which are generated by combining and arranging the at least two sub-conditions on a first user interface, which is a user interface provided by an event bus platform.
[0013] The first user interface can be one of the following embodiments. Figure 10 An example user interface is shown.
[0014] In this way, the event bus platform can support the combination and arrangement of multiple additional conditions through the user interface, thereby automatically completing the filling of condition parameters and the generation of additional condition process data definitions. This improves the applicability of additional conditions and the possibility of combining and arranging complex additional conditions, simplifies the process of combining and arranging multiple additional conditions, and enhances ease of use.
[0015] In one possible implementation, the second information satisfies the second condition, specifically including: the second information satisfies at least one of at least two sub-conditions.
[0016] In this way, the event bus platform can implement the "AND" and "OR" combination logic of conditions through the combination and arrangement of multiple additional conditions, thereby generating higher-order filtering methods.
[0017] In one possible implementation, the first condition is that the CPU utilization rate is greater than a first preset threshold.
[0018] The first preset threshold can be set by the user, such as 80%, etc. The specific value of the threshold is not limited in this application embodiment.
[0019] In this way, after obtaining the CPU utilization rate, the event bus platform can determine whether the CPU utilization rate is greater than the first preset threshold. If the CPU utilization rate is greater than the first preset threshold, then the subsequent steps will be executed.
[0020] In one possible implementation, the second condition is that the business success rate is less than a second preset threshold, and / or that the memory utilization rate is greater than a third preset threshold.
[0021] The second preset threshold can be set by the user, such as 90%, etc. The specific value is not limited in this embodiment.
[0022] The third preset threshold can also be set by the user, such as 90%, etc. The specific value is not limited in this application embodiment.
[0023] In this way, after obtaining the business success rate and memory usage, the event bus platform can determine whether the business success rate is less than the second preset threshold and / or whether the memory usage is greater than the first preset threshold. If so, it will then execute the subsequent steps.
[0024] In one possible implementation, the first information is obtained from the event source, and the second information is obtained from either the event source or the state source.
[0025] The first information and the second information can both be obtained from the event source, but the first information is the event message obtained from the event source, while the second information is information about other states that are not provided in the event message, obtained from the event source; or, the first information is obtained from the event source, and the second information is information about the surrounding environment state that is unrelated to the event source, obtained from the state source.
[0026] In one possible implementation, the event bus platform includes a first processing module and a second processing module. The first processing module is used to determine whether the first information meets the first condition, and the second processing module is used to determine whether the second information meets the second condition.
[0027] The first processing module can be the event rule processing module described in the following embodiments, and the second processing module can be the additional condition processing module described in the following embodiments. The second processing module can be a newly added module in this application embodiment, which can support supplementary filtering of events through additional conditions, thereby improving the effectiveness of event delivery in special business scenarios.
[0028] In one possible implementation, before the event bus platform acquires the first information and the second information, the method further includes: the event bus platform recording first setting information, which is set by the user of the terminal device, and the first setting information is used to indicate the information acquired by the event bus platform and the conditions that the information meets. The information includes the first information and the second information, and the conditions include the first condition and the second condition.
[0029] The first setting information may be generated during the event bus creation process described in the following embodiments. After the setting is completed, the event bus operation process can be executed based on the first setting information.
[0030] In one possible implementation, the event bus platform sends a first message to the terminal device, specifically by sending the first message to the terminal device through a connector.
[0031] In a second aspect, embodiments of this application provide a chip system, including: a processor coupled to a memory, the memory being used to store programs or instructions, wherein when the program or instructions are executed by the processor, the chip system performs the method described in any possible implementation of the first aspect above.
[0032] Thirdly, embodiments of this application provide an electronic device including one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code including computer instructions, which, when the one or more processors execute the computer instructions, cause the electronic device to perform the method described in any possible implementation of the first aspect above.
[0033] Fourthly, embodiments of this application provide a computer storage medium storing a computer program, the computer program including program instructions that, when executed on an electronic device, cause the electronic device to perform the method described in any possible implementation of the first aspect above.
[0034] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to perform the method described in any possible implementation of the first aspect above. Attached Figure Description
[0035] Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application;
[0036] Figure 2This is a schematic diagram illustrating filtering based solely on event filtering rules, provided in an embodiment of this application.
[0037] Figure 3 This is a schematic diagram illustrating filtering based on event filtering rules and additional filtering rules, provided in an embodiment of this application.
[0038] Figure 4 This is a schematic diagram of the architecture of a communication system involved in the event handling method provided in the embodiments of this application;
[0039] Figure 5 This is a schematic diagram illustrating the relationship between two embodiments provided in this application.
[0040] Figure 6 This is a flowchart illustrating an event handling method provided in an embodiment of this application;
[0041] Figure 7 This is a schematic diagram illustrating the specific execution process of a condition judgment provided in an embodiment of this application;
[0042] Figure 8 This is a schematic diagram illustrating the effect of an event handling method provided in an embodiment of this application;
[0043] Figure 9 This is a flowchart illustrating another event handling method provided in an embodiment of this application;
[0044] Figure 10 This is a user interface diagram related to another event handling method provided in this application embodiment;
[0045] Figure 11 This is a schematic diagram illustrating another specific execution process of condition judgment provided in an embodiment of this application;
[0046] Figure 12 This is a schematic diagram illustrating the effect of another event handling method provided in the embodiments of this application;
[0047] Figure 13 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.
[0049] It should be understood that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0050] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.
[0051] The term "user interface (UI)" used in the following embodiments of this application refers to the medium interface through which an application or operating system interacts and exchanges information with the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface is source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the electronic device, ultimately presenting content that the user can recognize. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be visible interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets displayed on the screen of an electronic device.
[0052] For ease of understanding, some related concepts involved in the embodiments of this application are explained below.
[0053] 1. Event
[0054] An event, also known as an event message, can include data records of event state changes.
[0055] 2. Source of the event
[0056] An event source, also known as an event publisher, can refer to the origin of an event. It can be used to produce events or to publish the produced events to the event bus platform, and so on.
[0057] 3. Event Bus Platform (or Event Bus)
[0058] An event bus platform acts as an event relay station. It can be used for intermediate event dumping (e.g., storing received events from event sources), and for routing events to event consumers based on event rules, among other things. Event rules can refer to rules used to monitor certain types of events. When a matching event occurs, it is routed to the event consumer associated with that event rule.
[0059] Event buses are typically used in scenarios such as cloud services (e.g., event flow between services), Internet of Things (IoT) & mobile applications (e.g., event flow between applications), and serverless services (e.g., triggers).
[0060] 4. Event Consumers
[0061] Event consumers, also known as event targets or event subscribers, can refer to the processing terminals of events and can be used to consume events.
[0062] 5. Additional Status
[0063] Additional states can refer to state information outside the event message content. These can be other states not provided by the event source in the event message, or surrounding environmental states unrelated to the event source.
[0064] 6. Additional conditions
[0065] Additional conditions can be conditions for performing judgments based on additional state content.
[0066] Currently, when creating an event bus, the industry can filter and deliver event messages by customizing the filtering rules for the event message content. However, this method only supports filtering based on the event message content itself. If some relevant content is missing in the current event message, it cannot meet the event filtering requirements under specific business needs.
[0067] The typical problems encountered currently include the following two:
[0068] 1. Due to special security and privacy controls, event messages may lack key information, making it impossible to meet the expansion needs of specific businesses. For example, in the door lock business scenario, due to privacy controls, the "opening the door" event will not show the specific person who opened the door, making it impossible to handle the situation on a person-by-person basis.
[0069] 2. If the information being monitored does not originate from the event source, then the extended requirements of the scenario cannot be met when the event message cannot provide the monitored information. For example, during service maintenance, monitoring business health through alarms on fluctuations in the central processing unit (CPU) usage of cloud service virtual machines may result in frequent receiving of junk alarm messages. While it's necessary to consider business success rates to reduce the alarm frequency, CPU alarm messages do not contain business success rate metrics, thus preventing optimization.
[0070] Figure 1 This is a schematic diagram of the architecture of a communication system provided in an embodiment of this application.
[0071] The industry typically uses event buses when employing them. Figure 1 The architecture shown. See also... Figure 1 The communication system may include an event source, an event bus platform, and an event consumer.
[0072] An event source can be used to generate event data. Event sources can be of various types, such as cloud servers, mobile phones, personal computers, in-vehicle systems, IoT ecosystem devices, and various applications (such as custom applications, mobile applications, software as a service (SaaS) applications, etc.), etc. This application embodiment does not limit them in this way.
[0073] An event bus platform is a standardized event processing platform that provides standardized event access, decoupling event sources from event consumers and solving problems such as lack of standards, difficulty in obtaining event data, information silos, and weak response in business events. An event bus platform typically includes the following core modules: event access channel, event rule processing module, event content conversion module, and event routing and delivery module.
[0074] The event access channel can be used to provide standardized access channels for different types of events, and to standardize the access of event messages.
[0075] The event rule processing module can be used to provide custom event filtering rules for event consumers and to handle the filtering of unmatched events.
[0076] The event content transformation module can be used to provide custom event content transformation for event consumers.
[0077] The event routing and delivery module can be used to deliver the transformed matching event routes to event consumers.
[0078] In one possible implementation, the event routing delivery module can deliver the aforementioned four matching items to the event consumer via the target connector.
[0079] Event consumers can be used to consume events, and can include, but are not limited to, the target services / applications / users for consuming events, such as cloud services, mobile applications, monitoring dashboards, etc.
[0080] Currently, the industry only supports filtering event messages based on the content of the event message when using event buses, which cannot meet the event filtering requirements under specific business needs.
[0081] For example, see Figure 2 Event consumers can customize an event bus on the event bus platform. This event bus can monitor the business health when CPU utilization fluctuates by listening to events that cause fluctuations in CPU utilization in the business environment, and by using "CPU utilization > 80%" as an event filtering rule.
[0082] Continue reading Figure 2 In one possible implementation, the event bus platform can obtain CPU utilization information through the virtual machine resource metrics monitoring service module, and then send the CPU utilization information to the event rule processing module through the CPU event access channel.
[0083] In practical applications, for example, if CPU utilization is >80% and the business success rate is 100%, the business is considered to be in a healthy operating state, and fluctuations in CPU utilization can be considered normal. If CPU utilization is >80% and the business success rate is <95%, then fluctuations in CPU utilization may lead to a decline in business health indicators. Therefore, in this case, the actual business requirement is often to issue an alert when CPU utilization is >80% and the business success rate is <95%.
[0084] However, since CPU utilization data and business success rate data come from different management service modules, the reported CPU-related event messages do not carry business success rate information, which prevents the event bus from enhancing message filtering based on existing event messages.
[0085] In summary, the current problems are as follows: when the context information provided by the event in the event source is insufficient, the event bus platform cannot perform normal event message filtering and distribution. Furthermore, when an event occurs, it cannot obtain environmental state data related to the surrounding environment outside the event source object, resulting in inaccurate event message filtering and distribution.
[0086] To address the aforementioned issues, this application provides an event processing method. In this method, filtering can be performed based on additional states beyond the event message content; that is, filtering is performed based on filtering rules based on additional conditions. Specifically, additional states (such as other states not provided in the event message, or surrounding environmental states unrelated to the event source) can be actively acquired, and event message filtering and distribution can be implemented based on filtering conditions of these additional states. Furthermore, "AND" and "OR" combination logic of conditions can be implemented through the arrangement of multiple additional conditions, thereby generating higher-order filtering methods. An arrangement page can also be provided, allowing for drag-and-drop arrangement, which can quickly generate combinations of additional conditions and improve usability.
[0087] When users / businesses need to use the event bus, if they need to use additional information beyond the event message content as auxiliary filtering conditions, they can use the event processing method provided in this application to customize the filtering conditions to meet the expansion requirements.
[0088] For example, see Figure 3 When using the event processing method provided in the embodiments of this application, additional filtering rules can be added by obtaining additional states from the event source / surrounding environment on the basis of the original event filtering rules, and the event filtering rules and additional filtering rules can be used as filtering conditions to meet the requirements of expansion.
[0089] Figure 4 This is a schematic diagram of the architecture of a communication system involved in the event handling method provided in the embodiments of this application.
[0090] See Figure 4 The communication system may include an event source / status source, an event bus platform, and an event consumer.
[0091] Event sources / state sources can be used to generate event data and provide state data. Event sources / state sources can be of various types, such as cloud servers, mobile phones, personal computers, in-vehicle systems, IoT ecosystem devices, and various applications (such as custom applications, mobile applications, software as a service (SaaS) applications, etc.), etc. This application embodiment does not limit them in this way.
[0092] An event bus platform is a standardized event processing platform that provides standardized event access, decoupling event sources / state sources from event consumers and solving the problems of lack of standards, difficulty in obtaining, information silos, and weak response in business events. The event bus platform can include the following core modules: event access channel, event rule processing module, additional condition processing module, event content conversion module, and event routing and delivery module. It can be seen that, compared with the aforementioned... Figure 1 The difference in the event bus platform lies in the addition of an additional condition processing module. This module can query the additional condition status from the event source / status source to support supplementary filtering of events through additional conditions, thereby improving the effectiveness of event delivery in special business scenarios. The functions of the event access channel, event rule processing module, event content conversion module, and event routing and delivery module can be found in the preceding text. Figure 1 The relevant textual descriptions will not be repeated here.
[0093] In one possible implementation, the event routing and delivery module can deliver the matching events to the event consumer via the target connector.
[0094] Event consumers can be used to consume events, and can include, but are not limited to, the target service / application / user of the event.
[0095] Based on the event handling method provided in the embodiments of this application, two embodiments are described below, namely Embodiment 1 and Embodiment 2, for reference. Figure 5 First, a custom event bus can be defined. Then, additional conditions can be added to the event bus, and then the event bus can be run. If there are multiple additional conditions, these additional conditions can be combined and arranged to run the event bus. Example 1 describes how to add additional conditions to the event bus, while Example 2 describes how to generate advanced additional conditions through the combination and arrangement of multiple additional conditions. In other words, Example 2 is a detailed supplement to Example 1.
[0096] The following provides a detailed description of Embodiment 1 and Embodiment 2, respectively.
[0097] Example 1
[0098] In this embodiment, the event consumer can customize an event bus on the event bus platform. For example, it can monitor CPU utilization fluctuations in the business environment and add a filtering rule to the event message content that the CPU utilization is greater than a preset threshold (e.g., "CPU utilization > 80%)", thereby monitoring the business health when the CPU exceeds the limit. Currently, when monitoring business conditions, focusing solely on whether the CPU exceeds the limit often leads to frequent false alarms, reducing the effectiveness of alerts. Therefore, to improve the effectiveness of message alerts, it is often necessary to add a condition that the business success rate is less than a preset threshold (e.g., "business success rate < 90%)" as an additional judgment condition. However, since business success rate information is usually not included in the event message content, i.e., the event message typically does not provide business success rate information, a customizable additional acquisition method is needed.
[0099] The event handling method provided in this application can solve the above problems. (See also...) Figure 6 This method can include two processes: an event bus creation process and an event bus execution process. The specific steps of these two processes are described in detail below:
[0100] Event bus creation process:
[0101] S101. Set up a listener for CPU usage fluctuation events.
[0102] S102. Set a filter for events with "CPU usage > 80%".
[0103] Specifically, an event bus can be customized on the event bus platform. This event bus can be configured to listen for CPU utilization fluctuation events. It can also be configured to execute filtering rules for event message content after receiving CPU utilization fluctuation events, such as filtering events when "CPU utilization > 80%".
[0104] It should be noted that the above description only uses "CPU utilization > 80%" as an example of filtering conditions and should not be construed as limiting this application. In some embodiments of this application, the filtering conditions may also be other information included in the event message. In other embodiments of this application, the threshold for CPU utilization may not be 80% but other values.
[0105] S103, Add the additional condition "Business success rate < 90%".
[0106] It is easy to understand that step S103 is the aforementioned Figure 4 The instantiation of the additional condition processing module creation logic in the exemplary embodiment of this application is shown.
[0107] Typically, the formation of a conditional judgment capability can involve two parts: one is obtaining the state on which the additional condition judgment depends, and the other is performing conditional judgment on the obtained state. Therefore, taking the above additional condition "business success rate < 90%" as an example, the definition of the condition "business success rate < 90%" needs to be broken down into two parts: one is obtaining information on the business success rate, and the other is judging whether the obtained business success rate is less than 90%.
[0108] For example, the independent additional condition "business success rate < 90%" can be defined as follows:
[0109] Condition name: Business success rate <90%
[0110] functionRef:getServiceSuccessRate(parameters) / / This function retrieves the service success rate. Parameters represent the relevant parameters for obtaining the service success rate.
[0111] expression:{result}<90% / / {result}<90% indicates whether the success rate of the acquired business is less than 90%.
[0112] It should be noted that the above is only an example of the additional condition "business success rate < 90%" and should not be construed as a limitation of this application. In some embodiments of this application, the additional condition may be other information not included in the event message. In other embodiments of this application, the threshold for business success rate may not be 90% but other values.
[0113] S104, Set content conversion logic.
[0114] Specifically, you can set up logic to transform the content of the filtered event messages so that the events can be converted into the desired format.
[0115] In some examples, the logic described above for transforming the content of the filtered event message can be a single method.
[0116] S105. Set delivery target.
[0117] Specifically, a delivery target can be added to the filtered events.
[0118] It is easy to understand that the target audience for the above delivery is the event consumer.
[0119] After the event bus creation process is completed, the event bus creation is finished. The created event bus can then enter the listening and running phase, which means that the following event bus running process can be executed.
[0120] Event bus operation flow:
[0121] S201, Transmitting CPU utilization fluctuation events.
[0122] Specifically, when CPU utilization fluctuates, a CPU utilization fluctuation event can be generated, which can be transmitted to the event bus platform through the CPU event access channel.
[0123] S202, Filter events with "CPU utilization > 80%".
[0124] Specifically, after receiving the CPU utilization fluctuation event message in step S201 above, the event bus platform can filter the event according to the event message content filtering rules set in step S102 of the aforementioned event bus creation process.
[0125] For example, taking the filtering of events when "CPU utilization > 80%" as an example, if the condition of CPU utilization > 80% is met, the following step S203 can be executed. If the condition of CPU utilization > 80% is not met, the process can be terminated and no further steps will be executed.
[0126] S203. Obtain the business success rate and determine whether the business success rate is <90%.
[0127] Specifically, step S203 can filter events according to the filtering rules of the additional conditions set in step S103 of the aforementioned event bus creation process.
[0128] In one possible implementation, the event bus platform can obtain the business success rate from the event source / state source.
[0129] For example, taking the judgment of the additional condition "business success rate <90%" as an example, if the additional condition of business success rate <90% is met, the following step S204 can be executed. If the additional condition of business success rate <90% is not met, the process can be terminated and no further steps will be executed.
[0130] It is easy to understand that step S203 is the aforementioned Figure 4 The example shown is an instantiation of the additional condition processing module's runtime logic in this application embodiment.
[0131] When executing step S203, the additional condition processing module can complete a condition judgment based on the definition data of the additional conditions set in step S103 of the aforementioned event bus creation process. For example, see [link to relevant documentation]. Figure 7 The specific execution process of conditional judgment may include the following steps:
[0132] S103a, Conditional execution call.
[0133] Specifically, first, the relevant functions for performing conditional judgments can be called, such as the functions defining additional conditions in step S103 of the aforementioned event bus creation process. Then, step S103b can be executed.
[0134] S103b, Obtain the state based on the definition.
[0135] In this context, "definition" can refer to the definition data of the additional conditions, and "state" can refer to the state information of the additional conditions.
[0136] Specifically, the definition data of the additional conditions can be used to determine which additional condition needs to be obtained, and the status information of that additional condition can be obtained.
[0137] In one possible implementation, step S103b above can be achieved by running getServiceSuccessRate(parameters).
[0138] S103c, Execute condition judgment based on state.
[0139] Specifically, conditional judgments can be performed based on the status information of the acquired additional conditions.
[0140] In one possible implementation, taking the determination of whether the business success rate is <90% as an example, the above step S103c can be implemented by running {result}<90%.
[0141] S103d: Returns the judgment result (true / false).
[0142] Taking the determination of whether the business success rate is less than 90% as an example, if the business success rate is less than 90%, the result returned is true; if the business success rate is not less than 90%, the result returned is false.
[0143] S204, Change event content.
[0144] Specifically, step S204 can convert the content of the event message (i.e., the event content) according to the content conversion logic set in step S104 of the aforementioned event bus creation process.
[0145] S205, Delivery Event.
[0146] Specifically, after the event undergoes filtering and content format conversion as described above, the event bus platform can deliver the event message according to the delivery target set in step S105 of the aforementioned event bus creation process. At this point, the event bus platform has completed an event message delivery process.
[0147] In one possible implementation, the event bus platform can send the aforementioned event messages to the delivery target (i.e., the event consumer) via the target connector.
[0148] It should be noted that the event bus platform can deliver events to the delivery target in various ways, such as... Figure 6 The exemplary SMS notifications shown are not limited to this application embodiment.
[0149] By implementing Figure 6 For the event handling methods shown, please refer to [link / reference]. Figure 8 The event bus platform can support the ability to judge additional conditions, thereby combining CPU events (such as CPU utilization fluctuation events) and business status (such as business success rate). When both CPU and business status meet certain conditions, such as when CPU utilization is greater than a certain preset threshold (e.g., 80%) and business success rate is less than a certain preset threshold (e.g., 90%), an alarm event can be sent to the event consumer so that fault handling can be responded to immediately.
[0150] It is easy to see that Figure 6 The event handling method shown can provide an extended way to obtain additional states of the event source service, thereby compensating for the inadequacy of event message content due to information control. In addition, more surrounding environmental states can be attached to form richer state information of business content, thereby forming more accurate filtering.
[0151] Example 2
[0152] Example 2 can be implemented based on Example 1. Taking the event consumer as an example, to improve the effectiveness of message alerts, it may not only focus on whether the business success rate is less than a certain preset threshold (e.g., 90%), but also on whether the memory utilization rate is greater than a certain preset threshold (e.g., 90%). If the CPU utilization rate is greater than a certain preset threshold (e.g., 80%), and the business success rate is less than a certain preset threshold (e.g., 90%), or the memory utilization rate (or memory efficiency) is greater than a certain preset threshold (e.g., 90%), then the event bus platform can send an alarm event (or warning event) to the event consumer.
[0153] The event handling method provided in this application embodiment can achieve the above functions. (See also...) Figure 9 This method can include two processes: an event bus creation process and an event bus execution process. The specific steps of these two processes are described in detail below:
[0154] Event bus creation process:
[0155] S301, Configure the monitoring of CPU usage fluctuation events.
[0156] S302, Set a filter for events with "CPU utilization > 80%".
[0157] Specifically, an event bus can be customized on the event bus platform. This event bus can be configured to listen for CPU utilization fluctuation events. It can also be configured to execute filtering rules for event message content after receiving CPU utilization fluctuation events, such as filtering events when "CPU utilization > 80%".
[0158] It should be noted that the above description only uses "CPU utilization > 80%" as an example of filtering conditions and should not be construed as limiting this application. In some embodiments of this application, the filtering conditions may also be other information included in the event message. In other embodiments of this application, the threshold for CPU utilization may not be 80% but other values.
[0159] S303, add a combination of additional conditions: "Business success rate < 90%" or "Memory usage > 90%".
[0160] It is easy to understand that step S303 is the aforementioned Figure 4 The instantiation of the additional condition processing module creation logic in the exemplary embodiment of this application is shown.
[0161] The difference from the aforementioned Embodiment 1 is that Embodiment 2 focuses on describing how multiple additional conditions are combined and arranged to form a relatively complex combined additional condition.
[0162] Taking the combined additional conditions of "business success rate < 90%" or "memory utilization rate > 90%" as an example, this combined additional condition can be defined as follows:
[0163] conditions:
[0164] -name: Business success rate <90%
[0165] functionRef:getServiceSuccessRate(parameters)
[0166] expression:{result}<90%
[0167] onSuccess:
[0168] nextState:end
[0169] default:
[0170] nextState: Memory usage > 90%
[0171] -name: Memory usage > 90%
[0172] functionRef:getMemUsageRate(parameters)
[0173] expression:{result}>90%
[0174] nextState:end
[0175] default:
[0176] nextState:end
[0177] It should be noted that the above explanation only uses the example of "business success rate < 90%" or "memory utilization > 90%" as examples, and should not be construed as limiting this application. In some embodiments of this application, the combined additional conditions may also be other information not included in the event message. In other embodiments of this application, the threshold for business success rate may not be 90%, but other values, and the threshold for memory utilization may not be 90%, but other values. In other embodiments of this application, the combined additional conditions may also be formed by combining and arranging two or more additional conditions. In other embodiments of this application, the combined additional conditions may also be combined and arranged in an "AND" manner, instead of the "OR" manner described above.
[0178] To enable more flexible use and combination of multiple additional conditions, this application also provides a user interface that facilitates easy combination of additional conditions, supporting the rapid construction of high-level combinations of additional conditions and the input of condition parameters through drag-and-drop.
[0179] See Figure 10 , Figure 10 The user interface shown as an example is a user interface used for combining and arranging additional conditions.
[0180] In one possible implementation, the user interface may be delivered to the event bus platform in the form of a software development kit (SDK) (e.g., to the event bus user interface platform) and integrated into the event bus platform's pages, serving as an input user interface during the event bus creation process.
[0181] S304, Set content conversion logic.
[0182] Specifically, you can set up logic to transform the content of the filtered event messages so that the events can be converted into the desired format.
[0183] In some examples, the logic described above for transforming the content of the filtered event message can be a single method.
[0184] S305. Set delivery target.
[0185] Specifically, a delivery target can be added to the filtered events.
[0186] It is easy to understand that the target audience for the above delivery is the event consumer.
[0187] After the event bus creation process is completed, the event bus creation is finished. The created event bus can then enter the listening and running phase, which means that the following event bus running process can be executed.
[0188] Event bus operation flow:
[0189] S401, Transmitting CPU utilization fluctuation events.
[0190] Specifically, when CPU utilization fluctuates, a CPU utilization fluctuation event can be generated, which can be transmitted to the event bus platform through the CPU event access channel.
[0191] S402, Filter events with "CPU utilization > 80%".
[0192] Specifically, after receiving the CPU utilization fluctuation event message in step S401 above, the event bus platform can filter the event according to the filtering rules of the event message content set in step S302 of the aforementioned event bus creation process.
[0193] For example, taking the filtering of events when "CPU utilization > 80%" as an example, if the condition of CPU utilization > 80% is met, the following steps S403a or S403b can be executed. If the condition of CPU utilization > 80% is not met, the process can be terminated and no further steps will be executed.
[0194] S403a. Obtain the business success rate and determine whether the business success rate is <90%.
[0195] Specifically, step S403a can filter events according to the filtering rules of the additional conditions set in step S303 of the aforementioned event bus creation process.
[0196] In one possible implementation, the event bus platform can obtain the business success rate from the event source / state source.
[0197] For example, taking the judgment of the additional condition "business success rate <90%" as an example, if the additional condition of business success rate <90% is met, the following step S404 can be executed and the following step S403b can no longer be executed. If the additional condition of business success rate <90% is not met, the following step S403b can be executed.
[0198] S403b: Obtain memory usage and determine if memory usage is >90%.
[0199] Specifically, step S403b can filter events according to the filtering rules of the additional conditions set in step S303 of the aforementioned event bus creation process.
[0200] In one possible implementation, the event bus platform can obtain memory usage from event sources / state sources.
[0201] For example, taking the judgment of the additional condition "memory usage > 90%" as an example, if the additional condition of memory usage > 90% is met, the following step S404 can be executed. If the additional condition of memory usage > 90% is not met, the process can be terminated and no further steps will be executed.
[0202] It is easy to understand that the above steps S403a and S403b are the aforementioned Figure 4 The example shown is an instantiation of the additional condition processing module's runtime logic in this application embodiment.
[0203] When executing steps S403a and S403b above, the additional condition processing module can complete the execution of a combined additional condition judgment based on the definition data of the additional conditions set in step S303 of the aforementioned event bus creation process. The specific execution process of the combined additional condition judgment can be found in [reference needed]. Figure 11 The process is illustrated as an example. Following... Figure 11 As can be easily seen from the exemplified process, assuming a business success rate of 99% and a memory utilization rate of 96%, the conclusion is "yes".
[0204] It is understood that the above description, which uses the example of executing step S403a first and then step S403b, should not be construed as limiting this application. In some other embodiments of this application, step S403b can also be executed first and then step S403a. In this case, the execution process can be as follows: Taking "memory utilization > 90%" and "business success rate < 90%" as examples, when executing step S403b, if the additional condition of memory utilization > 90% is met, step S404 can be executed instead of step S403a. If the additional condition of memory utilization > 90% is not met, step S403a can be executed. When executing step S403a, if the additional condition of business success rate < 90% is met, step S404 can be executed. If the additional condition of business success rate < 90% is not met, the process can be terminated and subsequent steps can be stopped.
[0205] S404, Change event content.
[0206] Specifically, step S404 can convert the content of the event message (i.e., the event content) according to the content conversion logic set in step S304 of the aforementioned event bus creation process.
[0207] S405, Delivery Event.
[0208] Specifically, after the event undergoes filtering and content format conversion as described above, the event bus platform can deliver the event message according to the delivery target set in step S305 of the aforementioned event bus creation process. At this point, the event bus platform has completed an event message delivery process.
[0209] In one possible implementation, the event bus platform can send the aforementioned event messages to the delivery target (i.e., the event consumer) via the target connector.
[0210] It should be noted that the event bus platform can deliver events to the delivery target in various ways, such as... Figure 9 The exemplary SMS notifications shown are not limited to this application embodiment.
[0211] By implementing Figure 9 For the event handling methods shown, please refer to [link / reference]. Figure 12The event bus platform can support the combination and arrangement of multiple additional conditions to form a combined additional condition, and supports complex judgment capabilities for combined additional conditions. In this embodiment, multiple additional conditions can be combined and arranged through the user interface, thereby automatically completing the filling of condition parameters and the generation of additional condition process data definitions, improving the applicability of additional conditions and the possibility of combining and arranging complex additional conditions. In this embodiment, when memory information and business status information are not provided in the event message, memory information (e.g., memory utilization rate) and business status (e.g., business success rate) can be combined to supplement the judgment of CPU events (e.g., CPU utilization fluctuation events), improving the effectiveness of event delivery.
[0212] It is easy to see that Embodiment 2 is an extension of Embodiment 1 to support complex combinations of multiple additional conditions and to simplify the combination of multiple additional conditions through interface combination arrangement.
[0213] The following is a schematic diagram of the structure of a terminal device provided in an embodiment of this application.
[0214] Figure 13 The structure of a terminal device provided in an embodiment of this application is illustrated by way of example.
[0215] like Figure 13 As shown, the terminal device (also known as an electronic device) may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0216] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the terminal device. In other embodiments of this application, the terminal device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0217] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0218] The controller can serve as the nerve center and command center of the terminal device. Based on the instruction opcode and timing signals, the controller generates operation control signals to control the fetching and execution of instructions.
[0219] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0220] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0221] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the terminal device.
[0222] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.
[0223] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0224] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.
[0225] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the terminal device's shooting function. The processor 110 and the display screen 194 communicate via the DSI interface to enable the terminal device's display function.
[0226] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0227] USB port 130 is a USB standard compliant interface, which can be a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge terminal devices, and can also be used for data transfer between terminal devices and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other terminal devices, such as AR devices.
[0228] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the terminal device. In other embodiments of this application, the terminal device may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0229] The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0230] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0231] The mobile communication module 150 can provide solutions for wireless communication applications including 2G / 3G / 4G / 5G on terminal devices. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0232] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0233] The wireless communication module 160 can provide solutions for wireless communication applications on terminal devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0234] In some embodiments, antenna 1 of the terminal device is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling the terminal device to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0235] The terminal device implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0236] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device may include one or N displays 194, where N is a positive integer greater than 1.
[0237] Terminal devices can achieve shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.
[0238] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.
[0239] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the terminal device by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of the terminal device (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0240] The terminal device can implement audio functions such as music playback and recording through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor.
[0241] In the embodiments of this application, the aforementioned terminal device may be an event processing terminal, which may be used to receive notification messages sent by the event bus platform, etc.
[0242] It should be understood that, Figure 13 The terminal device shown is merely an example, and terminal devices can have more than... Figure 13 The more or fewer components shown can be combined into two or more components, or they can have different component configurations. Figure 13 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0243] This application provides a chip system including: a processor coupled to a memory for storing programs or instructions, wherein when the program or instructions are executed by the processor, the chip system implements the methods described in any of the above method embodiments.
[0244] Optionally, the chip system may contain one or more processors. These processors can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, an integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0245] Optionally, the chip system may contain one or more memories. The memory may be integrated with the processor or disposed separately from it; this application embodiment does not limit this. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or disposed separately on different chips. This application embodiment does not specifically limit the type of memory or the arrangement of the memory and processor.
[0246] For example, the chip system may be a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a system on chip (SoC), a central processor (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD), or other integrated chips.
[0247] It should be understood that each step in the above method embodiments can be completed by integrated logic circuits in the processor hardware or by instructions in software form. The method steps disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor.
[0248] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0249] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0250] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. An event handling method, characterized in that, The method includes: The event bus platform acquires first information and second information, wherein the first information includes information about a first event and the second information includes status information associated with the first event; When the event bus platform determines that the first information satisfies the first condition and the second information satisfies the second condition, the event bus platform sends a first message to the terminal device. The first message is used to indicate that the first information satisfies the first condition and the second information satisfies the second condition.
2. The method according to claim 1, characterized in that, The first event is a fluctuation event in the CPU utilization rate of the central processing unit, and the first information includes information about the CPU utilization rate.
3. The method according to claim 1 or 2, characterized in that, The second information includes any one or more of the following: business success rate information, memory usage rate information.
4. The method according to any one of claims 1-3, characterized in that, The second condition includes at least two sub-conditions, which are generated by combining and arranging the at least two sub-conditions on a first user interface, which is a user interface provided by the event bus platform.
5. The method according to claim 4, characterized in that, The second information satisfies the second condition, specifically including: the second information satisfies at least one of the at least two sub-conditions.
6. The method according to any one of claims 2-5, characterized in that, The first condition is that the CPU utilization rate is greater than a first preset threshold.
7. The method according to any one of claims 3-6, characterized in that, The second condition is that the success rate of the service is less than a second preset threshold, and / or that the memory utilization rate is greater than a third preset threshold.
8. The method according to any one of claims 1-7, characterized in that, The first information is obtained from the event source, and the second information is obtained from the event source or the state source.
9. The method according to any one of claims 1-8, characterized in that, The event bus platform includes a first processing module and a second processing module. The first processing module is used to determine whether the first information meets the first condition, and the second processing module is used to determine whether the second information meets the second condition.
10. The method according to any one of claims 1-9, characterized in that, Before the event bus platform acquires the first and second information, the method further includes: The event bus platform records first setting information, which is set by the user of the terminal device. The first setting information is used to indicate the information acquired by the event bus platform and the conditions satisfied by the information. The information includes the first information and the second information, and the conditions include the first condition and the second condition.
11. The method according to any one of claims 1-10, characterized in that, The event bus platform sends a first message to the terminal device, specifically including: The event bus platform sends the first message to the terminal device through a connector.
12. An electronic device, characterized in that, The electronic device includes one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, the computer program code including computer instructions, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1-11.
13. A computer storage medium, characterized in that, The computer storage medium stores a computer program, the computer program including program instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1-11.
14. A computer program product, when run on a computer, causes the computer to perform the method as described in any one of claims 1-11.