Event processing method and related device

By identifying the running state variable values ​​of communication nodes and executing events in a pre-defined linked list when their state changes, the latency problem caused by resource lock configuration is solved, improving system stability and development efficiency, and ensuring the accuracy of data interaction.

CN121900984APending Publication Date: 2026-04-21SHANGHAI LIXIANG AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI LIXIANG AUTOMOBILE CO LTD
Filing Date
2024-10-18
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

During data interaction, the increased number of resource locks can lead to latency issues, affecting system stability and data interaction efficiency, and may even cause security incidents, especially in vehicle communication middleware.

Method used

By identifying the running status variable values ​​of communication nodes and adding modification events to a preset linked list when the node is in the running state, and executing the events in the linked list sequentially when the state changes to the ready state, resource lock configuration and locking/releasing operations are avoided, ensuring accurate execution of events.

Benefits of technology

It reduces latency during data interaction, improves system stability and development efficiency, ensures accurate data interaction, and reduces the number of resource locks required.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900984A_ABST
    Figure CN121900984A_ABST
Patent Text Reader

Abstract

The invention discloses an event processing method and a related device, and relates to the field of data interaction, and the method comprises the steps: recognizing an operation state variable value of a first target communication node under the condition that at least one operation request for modifying an event is received, and if the operation state variable value of the first target communication node is a variable value representing that the first target communication node is in an operation state, determining that the first target communication node is in an operation state; if yes, adding the modification events into a preset linked list, and when the operation state variable value of the first target communication node is updated from the variable value representing that the first target communication node is in the operation state to the variable value representing that the first target communication node is in the preparation state, sequentially executing the modification events in the preset linked list. According to the method, the modification events are added to the preset linked list under the condition that the running state variable value is the variable value representing that the running state is in the running state, and the modification events are executed when the running state variable value is changed, so that the risk of resource abnormity caused by concurrent events is avoided under the condition that a large number of resource locks do not need to be configured; and the time delay of the data interaction process is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data interaction technology, and in particular to an event processing method and related apparatus. Background Technology

[0002] During data interaction, to avoid the risk of concurrent node modification events that modify the target node while sending and receiving messages in the same process, thus causing resource anomalies, a large number of resource locks are usually set on the resources of the target node. This is done by restricting the objects that the target node can access, thereby avoiding the aforementioned risk of resource anomalies.

[0003] As resource storage demands increase, the number of nodes grows, leading to a greater number of resource locks required for different event scenarios. This necessitates numerous locking and unlocking operations during a given event, inevitably introducing latency. Such latency is unacceptable for systems performing data interactions. For example, in vehicle communication middleware, message sending and receiving events are commonly used for data interaction in vehicle driver assistance systems, onboard equipment control systems, and vehicle status monitoring systems, all of which have high latency requirements. If the latency caused by numerous locking and unlocking operations reduces data interaction efficiency, it will threaten the normal operation of these systems, potentially causing safety incidents and reducing system stability. Therefore, how to improve system stability while reducing the number of resource locks has become an urgent problem to solve. Summary of the Invention

[0004] In view of the above problems, this application provides an event handling method and related apparatus to improve system stability while reducing the number of resource lock configurations. The specific solution is as follows:

[0005] The first aspect of this application provides a method for handling events, including:

[0006] Upon receiving a request to run at least one modification event, the running status variable value of the first target communication node is identified. The first target communication node is the object of the modification event. The modification event is an event used to modify the configuration information of the first target communication node. The configuration information of the first target communication node includes system resource information required for the node to run, as well as information of interactive communication nodes that generate data interaction with the node.

[0007] If the running status variable value of the first target communication node is a variable value representing the running state, then the modification event is added to the preset linked list associated with the first target communication node;

[0008] When the running status variable value of the first target communication node is updated from the variable value representing the running state to the variable value representing the ready state, each of the modification events in the preset linked list associated with the first target communication node is executed sequentially.

[0009] In one possible implementation, the method further includes:

[0010] Upon receiving a request to send or receive a business data packet, identify the running status variable value of the second target communication node;

[0011] If the running status variable of the second target communication node is a variable value representing a ready state, determine whether the modification event exists in the preset linked list associated with the second target communication node. If not, update the running status variable value of the second target communication node from the variable value representing a ready state to the variable value representing a running state, and trigger the second target communication node to process the sending and receiving of the service data packet.

[0012] In one possible implementation, the method further includes:

[0013] If the modification event exists in the preset linked list associated with the second target communication node, the modification event is executed sequentially, and the configuration resources of the second target communication node are modified based on the change information generated after executing each modification event.

[0014] In one possible implementation, the preset linked list includes: a preset node deletion linked list and a preset node modification linked list.

[0015] The preset node deletion list is used to store the first type of modification event, which is an event used to delete the first target communication node or the second target communication node;

[0016] The preset node modification list is used to store the second type of modification events, which are events used to modify the business logic of the first target communication node or the second target communication node.

[0017] In one possible implementation, the sequential execution of each of the modification events in the preset linked list associated with the first target communication node includes:

[0018] Determine whether there is at least one modification event of the first type in the preset node deletion list. If so, execute each modification event of the first type in sequence according to the order in which the modification events of the first type were added to the preset node deletion list.

[0019] If at least one of the first type of modification events does not exist in the preset node deletion chain, the second type of modification events in the preset node modification chain are executed sequentially according to the order in which the second type of modification events were added to the preset node modification chain.

[0020] In one possible implementation, the preset linked list includes a preset node deletion linked list and a preset node modification linked list. If a modification event exists in the preset linked list associated with the second target communication node, the modification events are executed sequentially, including:

[0021] If the modification event exists in the preset linked list associated with the second target communication node, determine whether there is at least one modification event of the first type in the preset node deletion linked list. If so, execute each modification event of the first type in sequence according to the order in which the modification events of the first type were added to the preset node deletion linked list. The modification event of the first type is an event used to delete the second target communication node.

[0022] If no first type of modification event exists in the preset node deletion list, the second type of modification events in the preset node modification list are executed sequentially according to the order in which they were added. The second type of modification event is an event used to modify the business logic of the second target communication node.

[0023] A second aspect of this application provides an event processing system, comprising:

[0024] The first identification module is used to identify the running status variable value of the first target communication node when receiving a running request for at least one modification event. The first target communication node is the operation object of the modification event. The modification event is an event used to modify the configuration information of the first target communication node. The configuration information of the first target communication node includes system resource information required for the node to run, and interactive communication node information that generates data interaction with the node.

[0025] The first action module is used to add the modification event to a preset linked list associated with the first target communication node if the value of the running status variable of the first target communication node is a variable value representing the running state.

[0026] The second action module is used to sequentially execute each of the modification events in the preset linked list associated with the first target communication node when the value of the running state variable of the first target communication node is updated from the value of the variable representing the running state to the value of the variable representing the ready state.

[0027] In one possible implementation, the event handling system further includes:

[0028] The second identification module is used to identify the running status variable value of the second target communication node when a request to send or receive a service data packet is received.

[0029] The third action module is used to determine whether the modification event exists in the preset linked list associated with the second target communication node when the running status variable value of the second target communication node is a variable value representing the ready state. If not, the running status variable value of the second target communication node is updated from the variable value representing the ready state to the variable value representing the running state, and the second target communication node is triggered to send and receive the service data packet.

[0030] In one possible implementation, the event handling system further includes:

[0031] The fourth action module is used to execute the modification events sequentially when the modification events exist in the preset linked list associated with the second target communication node, and to modify the configuration information of the second target communication node based on the change information generated after executing each modification event.

[0032] In one possible implementation, the preset linked list includes: a preset node deletion linked list and a preset node modification linked list.

[0033] The preset node deletion list is used to store the first type of modification event, which is an event used to delete the first target communication node;

[0034] The preset node modification list is used to store the second type of modification events, which are events used to modify the interactive communication node information of the first target communication node.

[0035] In one possible implementation, the second action module is configured to, when sequentially executing each of the modification events in a preset linked list associated with the first target communication node, be:

[0036] Determine whether there is at least one modification event of the first type in the preset node deletion list. If so, execute each modification event of the first type in sequence according to the order in which the modification events of the first type were added to the preset node deletion list.

[0037] If at least one of the first type of modification events does not exist in the preset node deletion chain, the second type of modification events in the preset node modification chain are executed sequentially according to the order in which the second type of modification events were added to the preset node modification chain.

[0038] In one possible implementation, the preset linked list includes a preset node deletion linked list and a preset node modification linked list. When the fourth action module executes the modification events sequentially in the preset linked list associated with the second target communication node, it is configured as follows:

[0039] If the modification event exists in the preset linked list associated with the second target communication node, determine whether there is at least one modification event of the first type in the preset node deletion linked list. If so, execute each modification event of the first type in sequence according to the order in which the modification events of the first type were added to the preset node deletion linked list. The modification event of the first type is an event used to delete the second target communication node.

[0040] If no first type of modification event exists in the preset node deletion list, the second type of modification events in the preset node modification list are executed sequentially according to the order in which they were added. The second type of modification event is an event used to modify the interactive communication node information in the configuration information of the second target communication node.

[0041] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to perform an event processing method according to the first aspect or any implementation thereof.

[0042] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0043] The memory is used to store computer programs;

[0044] The processor is used to execute the computer program to enable the electronic device to implement the event handling method of the first aspect or any implementation thereof.

[0045] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs that, when executed by an electronic device, enable the electronic device to perform an event processing method according to the first aspect or any implementation thereof.

[0046] By employing the aforementioned technical solution, the event processing method and related apparatus provided in this application, through configuration to identify the running status variable value of the first target communication node, and when the identified running status variable value of the first target communication node is a variable value representing a running state, add the modification event to a preset linked list associated with the first target communication node. This eliminates the need for resource lock configuration and extensive locking and unlocking operations, thereby avoiding the risk of resource anomalies caused by concurrent operations of multiple events, reducing latency during data interaction, and improving system stability. Furthermore, by configuring the execution of each modification event in the preset linked list associated with the first target communication node sequentially when the running status variable value of the first target communication node is updated from a variable value representing a running state to a variable value representing a ready state, the execution of modification events is ensured, thereby guaranteeing accurate data interaction and improving system stability. Finally, since this application does not require consideration of the data interaction scenario and node architecture, but only needs to configure the running status variable value and the corresponding preset linked list for each communication node used for data interaction, the amount of code development for the software or system used for data interaction is reduced, thereby improving the development efficiency of the software or system. It is evident that this application improves the development efficiency of software or systems used for data interaction while reducing the number of resource lock configurations and enhancing system stability. Attached Figure Description

[0047] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0048] Figure 1 A flowchart illustrating an event handling method provided in this application;

[0049] Figure 2 A flowchart illustrating an implementation method for identifying the operating state variable values ​​of a first target communication node, as provided in this application;

[0050] Figure 3This application provides a flowchart of the operation after receiving a service data packet;

[0051] Figure 4 A schematic diagram illustrating the execution sequence of an event handling method provided in this application;

[0052] Figure 5 A block diagram of an event processing system provided in this application;

[0053] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0054] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0055] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0056] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0057] The first aspect of this application provides a method for handling events, such as... Figure 1 As shown, the methods for handling this event include:

[0058] S101. Upon receiving a run request for at least one modification event, identify the running status variable value of the first target communication node. The first target communication node is the operation object of the modification event. The modification event is an event used to modify the configuration information of the first target communication node. The configuration information of the first target communication node includes system resource information required for the node to run, as well as information of interactive communication nodes that generate data interaction with the node.

[0059] It should be noted that, in practical applications, the aforementioned modification operations can refer to write operations such as resource modification (Modify) and node deletion (Deleted) performed on the first target communication node by the modification event. Specifically, the resource modification write operation modifies the interactive communication node information of the first target communication node, which includes at least: the identifier of the interactive communication node and the number of service data packets received or sent per unit time. The node deletion write operation releases the system resources of the first target communication node.

[0060] It should be noted that, in practical application scenarios, the above-mentioned running status variable values ​​are used to characterize whether the communication node is subjected to read or write operations by the target event. The target event can be a modification event, a data packet receiving event, or a data packet sending event.

[0061] It should be noted that in practical application scenarios, the above-mentioned... Figure 1 There are multiple ways to implement step S101 shown; one example is provided here:

[0062] For each modification event-initiated run request, perform the following... Figure 2 The operation steps shown include the following steps A1 to A2:

[0063] Step A1: Upon receiving a request to run a modification event, parse the modification event to obtain the identifier of the first target communication node, and then trigger step A2.

[0064] Step A2 involves retrieving the running status variable value corresponding to the identifier of the first target communication node from the preset node status list, and identifying the running status scalar value. The preset node status list stores the identifiers of each communication node and the running status variable values ​​for each communication node; these running status variable values ​​are dynamically updated in real time.

[0065] In one possible implementation, the above is as follows: Figure 2 The list of preset node states in step A2 shown can be a list that is pre-built during the development of the interactive system.

[0066] S102. If the running status variable of the first target communication node is a variable value that represents the running state, then the modification event is added to the preset linked list associated with the first target communication node.

[0067] It should be noted that, in practical application scenarios, the above-mentioned running state variable values, which represent the running state, indicate that the first target communication node is performing a read or write operation corresponding to an event.

[0068] It should be noted that, in practical applications, the aforementioned preset linked list can be a data storage linked list constructed by sequentially connecting multiple storage nodes. Assuming the running state variable value of the first target communication node represents its running state, and multiple modification event execution requests are received for the first target communication node, the modification events are added to the storage nodes in the preset linked list sequentially according to the order in which the execution requests were initiated. If the execution requests for each modification event are initiated simultaneously, then the modification events are added to the storage nodes in the preset linked list in a random order.

[0069] It should be noted that this application identifies the running status variable value of the first target communication node by configuring it, and adds the modification event to the preset linked list associated with the first target communication node when the identified running status variable value of the first target communication node is a variable value that represents the running state. This avoids concurrent operations of multiple events on the first target communication node and avoids the risk of resource anomalies.

[0070] S103. When the value of the running status variable of the first target communication node is updated from the value representing the running state to the value representing the preparation state, each modification event in the preset linked list associated with the first target communication node is executed in sequence.

[0071] It should be noted that, in practical application scenarios, the variable values ​​representing the ready state indicate that the first target communication node is in an idle state, with no events performing read or write operations on it. This application configures the execution of modification events sequentially in a preset linked list associated with the first target communication node when the running state variable value of the first target communication node is updated from a value representing the running state to a value representing the ready state. This avoids missing events, ensures the accurate and normal execution of modification events, and thus guarantees the accurate operation of data interaction.

[0072] It should be noted that in practical application scenarios, the above-mentioned methods are used... Figure 1 The event handling methods shown can be applied to various fields; one example is provided here:

[0073] Assume the current application is vehicle communication middleware. The first target communication node is currently running an event that sends a vehicle collision warning data packet. Assume that running this data packet sending event requires the following resource operation steps: Step 1, resource access object verification; Step 2, retrieving the vehicle collision warning information to be sent from the information cache pool; Step 3, receiving object verification.

[0074] To prevent concurrent modification events from writing to the vehicle collision warning information resource of the first target communication node, thus avoiding the risk of resource anomalies, the existing vehicle communication middleware adds a first resource lock to the resource access object in step 1 to prevent other modification events besides the vehicle collision warning information data packet sending event from accessing the vehicle collision information resource in the first target communication node. In step 2, it adds a second resource lock to the information cache pool to prevent other information besides vehicle collision warning information from being read or written. Therefore, before the first target communication node starts running the vehicle collision warning information data packet sending event, the first and second resource locks need to be locked sequentially. After the first target communication node finishes running the vehicle collision warning information data packet sending event, the second and first resource locks need to be released sequentially. This locking and releasing operation is repeated when running other modification events.

[0075] When the vehicle's communication middleware uses the event handling method provided in this application, only the running status variable value of the first target communication node needs to be configured. When the first target communication node starts executing the data packet sending event for vehicle collision warning information, the running status variable value of the first target communication node is automatically updated from the value representing the ready state to the value representing the running state. At this time, if other modification events that modify the first target communication node are generated, the vehicle's communication middleware will add the modification events to the preset linked list associated with the first target communication node and temporarily suspend the execution of the aforementioned modification events. Upon recognizing that the running status variable value of the first target communication node has been updated from the value representing the running state to the value representing the ready state, the modification events in the preset linked list associated with the first target communication node are executed sequentially, thereby avoiding the risk of resource anomalies caused by concurrent event execution. Obviously, since the event handling method provided in this application eliminates the need to perform locking and unlocking operations before and after event execution, it reduces the latency caused by locking and unlocking during data interaction and improves system stability.

[0076] It should be noted that in practical applications, during the development of existing software or systems for data interaction, developers need to configure numerous resource locks and combinations thereof to avoid the risk of resource anomalies caused by concurrent event execution. This increases the amount of code required for the software or system, thus reducing development efficiency. This application, however, eliminates the need to consider data interaction scenarios and node architectures. It only requires configuring runtime status variable values ​​and corresponding pre-defined linked lists for each communication node used for data interaction, reducing the amount of code required and thus improving development efficiency.

[0077] This application identifies the running status variable value of the first target communication node and, when the identified running status variable value of the first target communication node is a variable value indicating that it is in a running state, adds a modification event to a preset linked list associated with the first target communication node. This eliminates the need for resource lock configuration and numerous locking and unlocking operations, thereby avoiding the risk of resource anomalies caused by concurrent operations of multiple events, reducing latency during data interaction, and improving system stability. Furthermore, by configuring the modification events in the preset linked list associated with the first target communication node to be executed sequentially when the running status variable value of the first target communication node changes from a variable value indicating that it is in a running state to a variable value indicating that it is in a ready state, the application ensures the execution of modification events, thereby guaranteeing accurate data interaction and improving system stability. Finally, since this application does not require consideration of the data interaction scenario and node architecture, but only needs to configure the running status variable value and the corresponding preset linked list for each communication node used for data interaction, it reduces the amount of code development required for the software or system used for data interaction, thereby improving the development efficiency of the software or system. It is evident that this application improves the development efficiency of software or systems used for data interaction while reducing the number of resource lock configurations and enhancing system stability.

[0078] In one possible implementation, the above is as follows: Figure 1 The event handling methods shown also include:

[0079] Upon receiving a request to send or receive a business data packet, identify the running status variable value of the second target communication node;

[0080] If the running status variable of the second target communication node is a variable value representing the ready state, determine whether there is a modification event in the preset linked list associated with the second target communication node. If not, update the running status variable value of the second target communication node from the variable value representing the ready state to the variable value representing the running state, and trigger the second target communication node to process the sending and receiving of service data packets.

[0081] It should be noted that in actual application scenarios, the second target communication node and the first target communication node may be the same communication node, or the second target communication node and the first target communication node may be different communication nodes.

[0082] It should be noted that this application configures the system to determine whether a modification event exists in the preset linked list associated with the second target communication node when a request to send or receive a service data packet is received and the running status variable of the second target communication node is a value representing a ready state. This avoids the risk that the link state might change after a modification event is executed, causing the second target communication node to be unable to process service data packets normally, thus reducing the reliability of data interaction. Specifically, the aforementioned change in link state occurs when the modification event modifies the system resource information in the configuration information of the second target communication node, resulting in the deletion of the second target communication node, or when it modifies the information of the interactive communication nodes that interact with the second target communication node in its configuration information, causing a change in the interactive communication nodes of the second target communication node.

[0083] In one possible implementation, when the running status variable value of the second target communication node is a variable value representing the ready state, the trigger condition for determining whether there is a modification event in the preset linked list associated with the second target communication node can also be executed after the send / receive request is completed and the running status variable value of the second target communication node is updated from the variable value representing the running state to the variable value representing the ready state, thereby further improving the efficiency of data interaction.

[0084] In one possible implementation, the above is as follows: Figure 1 The event handling methods shown also include:

[0085] If a modification event exists in the preset linked list associated with the second target communication node, the modification events are executed sequentially, and the configuration information of the second target communication node is modified based on the change information generated after each modification event is executed.

[0086] It should be noted that in practical application scenarios, multiple modification events generated during the processing of business data packets in the first moment are added to a pre-defined linked list associated with the second target communication node. This avoids the use of numerous locks and the risk of logical errors caused by concurrent event execution. Since modification events involve write operations such as modification or deletion of the second target communication node, modifying or deleting the communication node will cause changes in the communication link, thus affecting the transmission and processing of subsequent business data packets. Therefore, this application configures the system to execute modification events sequentially when they exist in the pre-defined linked list associated with the second target communication node, and modifies the configuration information of the second target communication node based on the change information generated after each modification event. This improves the communication link, avoids logical errors in the transmission and processing of subsequent business data packets, and enhances the reliability of data interaction.

[0087] It should be noted that in practical application scenarios, there are multiple ways to implement the above-mentioned operations after receiving the business data packet. Here, one example is provided:

[0088] like Figure 3 The diagram shows a flowchart of the event handling method executed after receiving a business data packet. The specific operation steps are as follows:

[0089] Step S301: A request to send and receive a service data packet is received, and step S302 is triggered.

[0090] Step S302: Determine whether the running status variable value of the second target communication node that received the service data packet transmission and reception request is a variable value that represents the ready state. If yes, then trigger step S303; otherwise, trigger step S302.

[0091] It should be noted that in practical applications, sending and receiving service data packets does not affect the communication link. Therefore, when the running status variable of the second target communication node is not the value indicating a ready state, the second target communication node only needs to store the corresponding service data packets sequentially according to the order of receiving the service data packet sending and receiving requests. When the running status variable of the second target communication node changes to the value indicating a ready state, it can sequentially execute the sending and receiving processing of each service data packet.

[0092] Step S303: Determine whether there is a modification event in the preset linked list associated with the second target communication node. If yes, then trigger step S304; otherwise, trigger step S305.

[0093] Step S304: Execute each modification event in the preset linked list sequentially. This triggers step S306.

[0094] Step S305: Update the running status variable value of the second target communication node from the variable value representing the ready state to the variable value representing the running state. Then trigger step S308.

[0095] Step S306: After all modification events have been executed, modify the configuration information of the second target communication node based on the change information generated after executing each modification event. This triggers step S307.

[0096] Step S307: Update the link status based on the configuration resources of the second target communication node after the configuration information has been modified, and trigger step S305.

[0097] In one possible implementation, the above is as follows: Figure 3Step S307 shown can be an operation performed by the link monitoring system. The link mentioned above is a data interaction link composed of multiple communication nodes, and the second target communication node can be any one of these communication nodes. By configuring step S307, this application enables the link monitoring system to update the link status based on the modified configuration resources of the second target communication node, thereby adjusting the subsequent business data interaction path and improving the reliability of data interaction.

[0098] In step S308, the second target communication node processes the sending and receiving of service data packets, triggering step S309.

[0099] Step S309: Determine whether the sending and receiving of business data packets has been completed. If yes, the process ends; otherwise, step S310 is triggered.

[0100] In step S310, the communication link monitoring system updates the communication link based on the updated configuration information of the second target communication node, and triggers each application to regenerate service data packets based on the updated communication link. This triggers step S301.

[0101] In one possible implementation, if the configuration information of the second target communication node changes, causing a change in the communication link, there is a risk that service data packets already received but not yet processed by the second target communication node may not be processed correctly. Therefore, after modifying the configuration information of the second target communication node based on the change information generated after executing each modification event and updating the communication link, if the service data packets already received by the second target communication node cannot be processed correctly, the communication link monitoring system will trigger the application that initiated the service data packets to generate new service data packet transmission and reception requests based on the updated data interaction link.

[0102] In one possible implementation, the aforementioned preset linked list includes: a preset node deletion linked list and a preset node modification linked list.

[0103] The preset node deletion list is used to store the first type of modification event, which is used to delete the first target communication node;

[0104] The preset node modification list is used to store the second type of modification events, which are events used to modify the interactive communication node information of the first target communication node.

[0105] It should be noted that in practical applications, since node deletion means the deleted node cannot execute any events, while after a node undergoes modifications other than deletion, some business data packet transmission and reception requests can still be executed by the modified node. Therefore, this application configures two linked lists: a preset node deletion linked list and a preset node modification linked list, and configures the execution priority of each modification event in the preset node deletion linked list to be higher than the highest execution priority of the modification events in the preset node modification linked list. This ensures that during the sequential execution of modification events, modification events in the preset node deletion linked list are executed first. If a communication node is deleted after a certain modification event is executed, there is no need to execute other unexecuted modification events in the preset linked list, thus improving the execution efficiency of the data interaction process.

[0106] In one possible implementation, modification events in a pre-defined linked list associated with the first target communication node are executed sequentially, including:

[0107] Determine whether there is at least one first-type modification event in the preset node deletion list. If so, execute each first-type modification event in turn according to the order in which the first-type modification events were added to the preset node deletion list.

[0108] If there is no first-type modification event in the preset node deletion list, the second-type modification events in the preset node modification list are executed sequentially according to the order in which they were added.

[0109] In one possible implementation, the preset linked list includes a preset node deletion linked list and a preset node modification linked list. If a modification event exists in the preset linked list associated with the second target communication node, the modification events are executed sequentially, including:

[0110] If there is a modification event in the preset linked list associated with the second target communication node, determine whether there is at least one first type of modification event in the preset node deletion linked list. If so, execute each first type of modification event in sequence according to the order in which the first type of modification events were added to the preset node deletion linked list. The first type of modification event is an event used to delete the second target communication node.

[0111] If there is no first-type modification event in the preset node deletion list, the second-type modification events in the preset node modification list are executed sequentially according to the order in which they were added. The second-type modification events are used to modify the interactive communication node information in the configuration information of the second target communication node.

[0112] In one possible implementation, the modification event is added to a pre-defined linked list associated with the first target communication node, including:

[0113] Based on the event identifier of each modification event, the parameters of the preset resource lock of the preset linked list are configured so that each modification event is added to the preset linked list associated with the first target communication node one by one.

[0114] It should be noted that, since there is a risk that the initiation time of each modification event may overlap, in order to avoid the risk of concurrently initiated modification events being imported into the preset linked list at the same time, which could lead to event storage errors in the preset linked list, this application adds a resource lock to the preset linked list. By configuring the parameters of the preset resource lock of the preset linked list according to the identifier of each modification event, the import order of each modification event can be restricted.

[0115] To facilitate understanding of the event handling method provided in this application, a possible implementation of this application is described below:

[0116] like Figure 4 The diagram illustrates the execution sequence of an event processing method provided in this application. Assuming a request to send / receive a service data packet is received, the running status variable value of the target communication node is identified. If the running status variable value of the target communication node is "Ready" (Ready being a variable indicating the node is in a ready state), and there are no modification events in the preset linked list associated with the target communication node, the running status variable value of the target communication node is updated from "Ready" to "Running" (Running being a variable indicating the node is in an event running state), and step S401 is executed to process the sending / receiving of the service data packet.

[0117] After the processing of the service data packet transmission and reception ends in step S402, the running status variable value of the target communication node is updated from "Running" to "Ready". Assuming that a concurrent modification event request is received while processing the service data packet, the modification event is imported into a preset linked list. If the running status variable value of the target communication node is detected to have changed from "Running" to "Ready", and a modification event exists in the preset linked list, the running status variable value of the target communication node is updated from "Ready" to "Modify" (Modify is a variable value representing the node's modified running state), and step S403 is executed to delete or modify the node. After the modification event is completed, the running status variable value of the target communication node is updated from "Modify" to "Ready". Then, step S404 is executed to update the configuration information of the target communication node based on the change information.

[0118] It should be noted that, in order to avoid implementing the above... Figure 4 During steps S401 to S404, due to the risk of resource errors caused by multiple concurrent modification events, the target communication node can be configured to be in a locked state (e.g., Block until Ready) during the execution of steps S401 to S404 to restrict the target communication node to execute only one modification event at a time.

[0119] A second aspect of this application provides an event processing system, such as... Figure 5 As shown, it includes:

[0120] The first identification module 501 is used to identify the running status variable value of the first target communication node when a running request for at least one modification event is received. The first target communication node is the operation object of the modification event. The modification event is an event used to modify the configuration information of the first target communication node. The configuration information of the first target communication node includes the system resource information required for the node to run, and the information of the interactive communication node that generates data interaction with the node.

[0121] The first action module 502 is used to add the modification event to the preset linked list associated with the first target communication node if the value of the running status variable of the first target communication node is a variable value that represents the running state.

[0122] The second action module 503 is used to sequentially execute each modification event in the preset linked list associated with the first target communication node when the value of the running status variable of the first target communication node is updated from the value of the variable representing the running state to the value of the variable representing the ready state.

[0123] In one possible implementation, the above is as follows: Figure 5 The event handling system shown also includes:

[0124] The second identification module is used to identify the running status variable value of the second target communication node when a request to send or receive a service data packet is received.

[0125] The third action module is used to determine whether there is a modification event in the preset linked list associated with the second target communication node when the running status variable value of the second target communication node is a variable value that represents the ready state. If not, the running status variable value of the second target communication node is updated from the variable value that represents the ready state to the variable value that represents the running state, and the second target communication node is triggered to send and receive service data packets.

[0126] In one possible implementation, the above is as follows: Figure 5 The event handling system shown also includes:

[0127] The fourth action module is used to execute the modification events sequentially when there are modification events in the preset linked list associated with the second target communication node, and modify the configuration information of the second target communication node based on the change information generated after executing each modification event.

[0128] In one possible implementation, the above is as follows: Figure 5 The event handling system shown includes preset linked lists: a preset node deletion linked list and a preset node modification linked list.

[0129] The preset node deletion list is used to store the first type of modification event, which is used to delete the first target communication node;

[0130] The preset node modification list is used to store the second type of modification events, which are events used to modify the interactive communication node information of the first target communication node.

[0131] In one possible implementation, the second action module 503 is configured to, when sequentially executing each modification event in a preset linked list associated with the first target communication node, as follows:

[0132] Determine whether there is at least one first-type modification event in the preset node deletion list. If so, execute each first-type modification event in turn according to the order in which the first-type modification events were added to the preset node deletion list.

[0133] If there is no first-type modification event in the preset node deletion list, the second-type modification events in the preset node modification list are executed sequentially according to the order in which they were added.

[0134] In one possible implementation, the above is as follows: Figure 5 The event handling system shown includes a preset linked list for deleting preset nodes and a preset linked list for modifying preset nodes. When the fourth action module executes modification events sequentially in the preset linked list associated with the second target communication node, it is configured as follows:

[0135] If there is a modification event in the preset linked list associated with the second target communication node, determine whether there is at least one first type of modification event in the preset node deletion linked list. If so, execute each first type of modification event in sequence according to the order in which the first type of modification events were added to the preset node deletion linked list. The first type of modification event is an event used to delete the second target communication node.

[0136] If there is no first-type modification event in the preset node deletion list, the second-type modification events in the preset node modification list are executed sequentially according to the order in which they were added. The second-type modification events are used to modify the interactive communication node information in the configuration information of the second target communication node.

[0137] A third aspect of this application provides a computer program product including computer-readable instructions that, when executed on an electronic device, cause the electronic device to perform an event processing method for the first aspect or any implementation thereof.

[0138] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0139] Memory is used to store computer programs;

[0140] The processor is used to execute computer programs to enable electronic devices to implement the event handling method of the first aspect or any implementation thereof.

[0141] A schematic diagram of the structure of an electronic device is provided in the fourth aspect of this application, as shown below. Figure 6 As shown. The electronic devices in the embodiments of this application may include, but are not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0142] like Figure 6 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0143] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0144] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to perform an event processing method according to the first aspect or any implementation thereof.

[0145] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0147] 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.

[0148] 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 the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method for handling events, characterized in that, include: Upon receiving a run request for at least one modification event, the running status variable value of the first target communication node is identified. The modification event is an event used to modify the configuration information of the first target communication node. The configuration information of the first target communication node includes system resource information required for the node to run, and information of interactive communication nodes that generate data interaction with the node. If the running status variable value of the first target communication node is a variable value representing the running state, then the modification event is added to the preset linked list associated with the first target communication node; When the running status variable value of the first target communication node is updated from the variable value representing the running state to the variable value representing the ready state, each of the modification events in the preset linked list associated with the first target communication node is executed sequentially.

2. The event handling method according to claim 1, characterized in that, The method further includes: Upon receiving a request to send or receive a business data packet, identify the running status variable value of the second target communication node; If the running status variable of the second target communication node is a variable value representing a ready state, determine whether the modification event exists in the preset linked list associated with the second target communication node. If not, update the running status variable value of the second target communication node from the variable value representing a ready state to the variable value representing a running state, and trigger the second target communication node to process the sending and receiving of the service data packet.

3. The event handling method according to claim 2, characterized in that, The method further includes: If the modification event exists in the preset linked list associated with the second target communication node, the modification event is executed sequentially, and the configuration information of the second target communication node is modified based on the change information generated after executing each modification event.

4. The event handling method according to claim 2, characterized in that, The preset linked list includes: a preset node deletion linked list and a preset node modification linked list. The preset node deletion list is used to store the first type of modification event, which is an event used to delete the first target communication node; The preset node modification list is used to store the second type of modification events, which are events used to modify the interactive communication node information of the first target communication node.

5. The event handling method according to claim 4, characterized in that, The sequential execution of each modification event in the preset linked list associated with the first target communication node includes: Determine whether there is at least one modification event of the first type in the preset node deletion list. If so, execute each modification event of the first type in sequence according to the order in which the modification events of the first type were added to the preset node deletion list. If at least one of the first type of modification events does not exist in the preset node deletion chain, the second type of modification events in the preset node modification chain are executed sequentially according to the order in which the second type of modification events were added to the preset node modification chain.

6. The event handling method according to claim 3, characterized in that, The preset linked list includes a preset node deletion linked list and a preset node modification linked list. If a modification event exists in the preset linked list associated with the second target communication node, the modification events are executed sequentially, including: If the modification event exists in the preset linked list associated with the second target communication node, determine whether there is at least one modification event of the first type in the preset node deletion linked list. If so, execute each modification event of the first type in sequence according to the order in which the modification events of the first type were added to the preset node deletion linked list. The modification event of the first type is an event used to delete the second target communication node. If no first type of modification event exists in the preset node deletion list, the second type of modification events in the preset node modification list are executed sequentially according to the order in which they were added. The second type of modification event is an event used to modify the interactive communication node information in the configuration information of the second target communication node.

7. An event processing system, characterized in that, include: The first identification module is used to identify the running status variable value of the first target communication node when a running request for at least one modification event is received. The first target communication node is the operation object of the modification event, and the modification event is an event used to modify the configuration information of the first target communication node. The first action module is used to add the modification event to a preset linked list associated with the first target communication node if the value of the running status variable of the first target communication node is a variable value representing the running state. The second action module is used to sequentially execute each of the modification events in the preset linked list associated with the first target communication node when the value of the running state variable of the first target communication node is updated from the value of the variable representing the running state to the value of the variable representing the ready state.

8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the event processing method as described in any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the event processing method as described in any one of claims 1 to 6.

10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the event processing method as described in any one of claims 1 to 6.