Event management method, device, computer equipment and storage medium for converter

By configuring the timer unit and event list management method in the converter, the inefficiency and failure problems of the converter when processing multiple events are solved, the decoupling of events and timers and efficient utilization of resources are achieved, and the adaptability is achieved. The need for complex converter functions is achieved.

CN118034955BActive Publication Date: 2025-02-07GUANG DONG MING NENG KE JI YOU XIAN GONG SI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410174267.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2025-02-07
Estimated Expiration
2044-02-07

AI Technical Summary

Technical Problem

In the prior art, when the converter handles multiple events, especially timing events, it is prone to failures such as communication data lag, data incomplete data, data crossing at different times, and inability to send out, and the event management efficiency is low, making it difficult to adapt. Complexity of converter functions.

Method used

By configuring the timer unit in the converter, using the event list management method, traversing the event list to determine whether each event meets the execution conditions, including the time judgment of the timing event, decoupling of the event and the timer, and allowing multiple events to be shared The same timer improves resource utilization efficiency.

Benefits of technology

It effectively avoids timer timing deviations and failures, improves the efficiency and reliability of event management, adapts to the complex needs of converter functions, and realizes flexible and efficient event management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118034955B_ABST
    Figure CN118034955B_ABST
Patent Text Reader

Abstract

The present application provides an event management method, device, computer equipment and storage medium for a converter. The timer unit in the converter counts itself up at a preset interval. The event management method includes: in response to an event configuration request, adding the corresponding event to an event list and determining the execution condition of the event; if the event is a timed event, obtaining an initial count value according to the count value of the timer unit when the timed event is added to the event list; traversing each event in the event list to determine whether the event meets the corresponding execution condition; if the event is a timed event, determining whether the set time is reached according to the initial count value, the current count value of the timer unit and the preset interval; if so, executing the traversed event; if not, returning to traverse each event in the event list, and continuing to execute the step of determining whether the event meets the corresponding execution condition. This solution realizes the decoupling of timers and events, and improves management efficiency and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of converters, and in particular to a method, apparatus, computer equipment and storage medium for event management of converters. Background Art

[0002] As the functions of the converter are added, more and more events need to be handled. Without a perfect event management algorithm, when events are triggered one after another and changes occur, the converter is likely to experience communication data jams, incomplete data, data crossing at different times, and failure to send data, which will become difficult to handle; and if multiple events are maintained, modifications will be a challenge. Especially for the timing-related events in the converter, in many use cases, most of them are directly executed in the timer, which not only adds additional burden to the timer, but also makes the management efficiency of events very low. Calculating and processing a large amount of data, the interval data that originally required strict timing will accumulate large deviations, and due to the increasing complexity of functions, the total number and differences of events are increasing, and the traditional method will make the converter more prone to unpredictable failures. Summary of the invention

[0003] The purpose of the present application is to solve at least one of the above technical defects, especially the problem that the prior art directly uses timers to execute events, which cannot adapt to the increasingly rich functional requirements of converters and is prone to chaotic event management.

[0004] In a first aspect, an embodiment of the present application provides an event management method for a converter, wherein a timer unit is configured in the converter, and the timer unit counts itself up at a preset interval. The event management method includes:

[0005] In response to the event configuration request, the corresponding event is added to the event list, and the execution condition of the event is determined;

[0006] If the event is a timed event, the initial count value is obtained according to the count value of the timer unit when the timed event is added to the event list;

[0007] Traversing each event in the event list to determine whether the event meets the corresponding execution condition; if the event is a timed event, determining whether the timed event meets the corresponding execution condition includes: determining whether the set time is reached according to the initial count value, the current count value of the timer unit and the preset interval;

[0008] If so, execute the traversed event;

[0009] If not, then return to traverse each event in the event list, and continue to execute the step of determining whether the event meets the corresponding execution condition.

[0010] In one embodiment, the timed event includes a recurring event;

[0011] After the loop event is executed, the initial count value is updated to the count value of the timer unit when the execution is completed.

[0012] In one embodiment, in response to the event configuration request, adding the corresponding event to the event list and determining the execution condition of the event further includes:

[0013] Record the initial event status of each event; the event status includes waiting to start, immediate start and pause;

[0014] The events that are traversed include:

[0015] Updates the event status of an event.

[0016] In one embodiment, in the process of traversing each event in the event list, before determining whether the event satisfies the corresponding execution condition, the method further includes:

[0017] If the event state of the event is in the waiting state, determine whether the event meets the corresponding execution condition;

[0018] If the event status of the event is to start immediately, the event will be executed directly;

[0019] If the event status of the event is paused, continue to traverse the next event.

[0020] In one embodiment, the event management method of the converter further includes:

[0021] In response to an event modification request for any event in the event list, the event state and / or execution condition of the event is modified.

[0022] In one embodiment, the event modification request includes an event restart request, an event stop request, an immediate execution request, and a condition modification request; in response to the event modification request for any event in the event list, the event state and / or execution condition of the event is modified, including:

[0023] In response to an event restart request for any event in the event list, the event state is modified to a waiting state, and the initial count value is updated to the count value of the current timer unit;

[0024] In response to an event stop request for any event in the event list, modifying the event state to a pause state;

[0025] In response to an immediate execution request for any event in the event list, modifying the event state to an immediate start state;

[0026] In response to a condition modification request for any event in the event list, the execution condition of the event is modified.

[0027] In one embodiment, the event management method of the converter further includes:

[0028] In response to a status query request for any event in the event list, the event status of the event is fed back.

[0029] In a second aspect, an embodiment of the present application provides an event management device for a converter, wherein a timer unit is configured in the converter, and the timer unit counts itself up at a preset interval, and the event management device comprises:

[0030] A first response module, configured to respond to an event configuration request, add a corresponding event to an event list, and determine an execution condition of the event;

[0031] An initial counting module, used for obtaining an initial counting value according to the counting value of the timer unit when the timed event is added to the event list when the event is a timed event;

[0032] A traversal module traverses each event in the event list to determine whether the event meets the corresponding execution condition; if the event is a timed event, determining whether the timed event meets the corresponding execution condition includes: determining whether the set time is reached according to the initial count value, the current count value of the timer unit and the preset interval;

[0033] An execution module, used for executing the traversed events when the traversed events meet the execution conditions;

[0034] The return module is used to continue returning to the traversal module to traverse each event in the event list to determine whether the event meets the corresponding execution condition when the traversed event does not meet the execution condition.

[0035] In a third aspect, an embodiment of the present application provides a computer device, comprising one or more processors and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the steps of the event management method for the converter in any of the above embodiments are executed.

[0036] In a fourth aspect, an embodiment of the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the event management method for the converter in any of the above embodiments.

[0037] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0038] The event management method in this embodiment establishes an event list for storing all events that need to be executed. When a new event needs to be executed, the event and its execution condition can be added to the event list through an event configuration request. For a timed event, the current count value of the timer unit will be read as the initial count value of the event when it is added to the list. The execution of the event is to loop through the event list and judge whether each event in the event list meets its execution condition one by one. For a timed event, the time elapsed will be calculated based on its initial count value and current count value to determine whether the set time has been reached. Once an event meets the condition, the execution event is triggered. If the current event does not meet the condition, the next event in the list will continue to be judged. This scheme based on the event list and the execution condition judgment realizes the decoupling of the timer unit and the event. Multiple events can share the same timer, which improves the resource utilization efficiency. In addition, due to the elimination of the limitation of the execution time, any complex logic can be executed. Multiple events can achieve a certain timing relationship based on the synchronized timer count to prevent interference between multiple events. In general, this solution can avoid timer timing deviations and failures to a great extent, adapt to the future needs of converter development, and continuously adapt to increasingly complex functions more completely and quickly. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 A flowchart of an event management method for a converter provided in one embodiment of the present application;

[0041] Figure 2 A schematic diagram of the relationship between the event management and the timer unit of the converter provided by one embodiment of the present application;

[0042] Figure 3 A schematic diagram of a module of an event management device for a converter provided by an embodiment of the present application;

[0043] Figure 4 An internal structure diagram of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0045] When the converter in the traditional technology executes events related to timing, it will directly write the flow of the event in the timer unit. When the count value in the timer unit is reached, an interrupt is triggered, and the logic of the event is executed during the duration of the interrupt. In this way, the event and the timer unit are deeply associated, and each timer can only be used to time the corresponding event. Therefore, each event will use an independent counting function. When the number of events is large, there will not be enough timer resources. In addition, the events in this way can only be executed during the interrupt, and the duration of the interrupt is very short, which will result in the event being only a very simple processing logic, and does not support the writing of events that implement complex functions. At the same time, this highly coupled solution between the event and the timer unit, because the timing of each event cannot be determined based on the same timer unit, when one event is sending specific data, another event cannot determine the timing of the event, and modifies the data, resulting in problems such as broken frames and erroneous data in the communication data.

[0046] In order to decouple the timer unit from event management, the present application provides an event management method for a converter, in which a timer unit is configured in the converter, and the timer unit counts up according to a preset interval. The timer unit uses the built-in hardware timer peripheral of the converter, configures the time interval of the timer interrupt, and increments the count value in the interrupt service function. All events can be calculated by multiplying the difference between the count value at the start of the timing and the current count value of the timer unit by the preset interval to obtain the time elapsed from the start of the timing to the present. Please refer to Figure 1 and Figure 2 , the event management method includes steps S102 to S110.

[0047] S102, in response to the event configuration request, adding the corresponding event to the event list and determining the execution condition of the event.

[0048] It can be understood that the event configuration request is a request issued when the external part of the converter needs to configure a new event, which carries the execution condition of the event. All added events will be summarized to form an event list. The execution condition is the condition that needs to be met when the event is triggered and executed. It can be implemented by providing an external interface to input event configuration information. The event list can be implemented using data structures such as linked lists and arrays. For example, to configure an event for timing to obtain power, the execution condition can be set to obtain power once every 30 seconds. At this time, the timed power acquisition event will be added to the event list, and its execution condition is recorded to run once every 30 seconds. Further, the event configuration request can also carry the initial event state of the newly added event, that is, when adding a new event, the user can set the initial execution state of the event in addition to the execution condition. When the system receives the event configuration request, it will record the initial event state of each event. In the case where the initial event state is not configured in the event configuration request, it can be set to the default initial state. The event state includes the waiting state, the immediate start state and the pause state. The default initial state can be the waiting state.

[0049] S104: If the event is a timed event, an initial count value is obtained according to the count value of the timer unit when the timed event is added to the event list.

[0050] It can be understood that for a timed event, that is, an event that needs to be triggered and executed after a specific time interval, its execution condition will at least include whether the time from the start of the timing to the current time reaches the specific time interval. In this embodiment, all timed events will use the count value in a unified timer unit to determine the time interval. Therefore, it is necessary to record the initial count value corresponding to the timed event when adding it to the event list, so as to facilitate its use when making judgments. For other types of events, the time of adding the event list can also be recorded to facilitate the tracing and analysis of the execution status of each event.

[0051] S106, traverse each event in the event list to determine whether the event meets the corresponding execution condition. If the event is a timed event, determining whether the timed event meets the corresponding execution condition includes: determining whether the set time is reached based on the initial count value, the current count value of the timer unit and the preset interval.

[0052] It can be understood that this embodiment will cyclically determine whether each event in the event list meets the execution condition to determine whether to trigger the execution of the event. The execution condition can be determined not only based on the state of the converter itself, but also interact with external devices, such as interacting with other converters, gateways, host computers, etc., to obtain the information required to determine whether the execution condition is met. For timed events, the difference between the current count value and the initial count value can be used to determine how many count values ​​have been added to the timer unit from the beginning of recording the initial count value to the present, and each newly added count value will correspond to the duration of a preset interval. According to their product, the total time interval from the start of the timed event counting to the present can be determined, and based on this, it can be determined whether the configured set time has been reached. Of course, the timed event can also have other execution conditions. When the set time is reached, it is also necessary to determine whether to trigger the event based on the judgment results of other execution conditions.

[0053] S108: If yes, execute the traversed event.

[0054] It can be understood that for a timed event, the execution logic of the timed event can be used as a callback function and input into a function that determines whether its execution condition is met. Once the execution condition is met, the execution logic of the timed event is called back. Different from the traditional method, the event in this embodiment is no longer embedded in the timer unit, but as an independent object, triggered by judging the execution condition. Figure 2 As shown, the timer unit only provides a unified counting function, and the execution of the event will be completely decoupled from the timer unit. Due to the decoupling, one timer unit can promote the timed execution of multiple events, improving the efficiency of resource utilization. Multiple events are counted based on the same timer unit, and a certain timing can be achieved. When an event is sending data, by reading the current timing value, other events can determine its operation timing to avoid communication errors. When executing the traversed event, the event status of the executed event can be updated and set to the executing state. For the event that has been executed, it can be determined to change its event status to the paused state, closed state, waiting to start state, etc., or remove it from the event list according to the type of the event.

[0055] S110, if not, then return to traverse each event in the event list, and continue to execute the step of determining whether the event meets the corresponding execution condition.

[0056] It can be understood that if the event does not meet the execution condition, the event list will continue to be traversed to determine other events.

[0057] The event management method in this embodiment establishes an event list for storing all events that need to be executed. When a new event needs to be executed, the event and its execution condition can be added to the event list through an event configuration request. For a timed event, the current count value of the timer unit will be read as the initial count value of the event when it is added to the list. The execution of the event is to loop through the event list and judge whether each event in the event list meets its execution condition one by one. For a timed event, the time elapsed will be calculated based on its initial count value and current count value to determine whether the set time has been reached. Once an event meets the condition, the execution event is triggered. If the current event does not meet the condition, the next event in the list will continue to be judged. This scheme based on the event list and the execution condition judgment realizes the decoupling of the timer unit and the event. Multiple events can share the same timer, which improves the resource utilization efficiency. In addition, due to the elimination of the limitation of the execution time, any complex logic can be executed. Multiple events can achieve a certain timing relationship based on the synchronized timer count to prevent interference between multiple events. In general, this solution can avoid timer timing deviations and failures to a great extent, adapt to the future needs of converter development, and continuously adapt to increasingly complex functions more completely and quickly.

[0058] In one embodiment, the timing event includes a cyclic event. After the cyclic event is executed, the initial count value is updated to the count value of the timer unit when the execution is completed.

[0059] It can be understood that a cyclic event is a timed event that restarts after each execution is completed. It will be executed cyclically according to a preset time interval. The timing starting point for the first execution of a cyclic event is the moment when the cyclic event is added to the event list, and the initial count value recorded in step S104 can represent the timing starting point. When traversing to the cyclic event, the current count value will be compared with the initial count value until it is determined that the set time of the cyclic event has been reached. After the first execution of the cyclic event is completed, in order to ensure that the cyclic event is triggered to execute at intervals. After each execution is completed, the initial initial count value cannot be retained, and the initial count value must be updated based on the count value when this execution is completed, as the starting point for the next round of execution. This can ensure that the preset time interval is accurately achieved between the last completion and the next execution.

[0060] For example, a common cyclic event in a converter is to continuously obtain the power of the power station to which the converter is connected at a certain interval. Assuming that the execution interval is 10 seconds, the initial count value recorded by step S104 is 1000. After the first round of execution is completed, the timer unit count value is 1500. Then 1500 is assigned to the initial count value field of the cyclic event, overwriting the previous 1000. In the second round of judgment, if the current count value is 2500, then the time interval from the count value 1500 after the previous round is completed to the count value 2500 of this round is 1000 counting units, that is, 10 seconds, and the execution condition is met, then the second round of the cyclic event is executed. This embodiment realizes the precise timing of cyclic events, ensuring that there is no cumulative error in the time interval between each round of events. Cyclic events can be continuously and automatically executed without manual intervention, and are easy to use.

[0061] Furthermore, when a cyclic event is executed, in order to meet the set number of cyclic event executions, when a cyclic event is added, its execution times can be initialized and the number of times it needs to be executed can be recorded. After each execution is completed, its execution times will be updated, and it will be determined whether the required number of executions has been reached. If it has not been reached, its event status can be updated to the waiting state and continue to participate in the execution. If it has been reached, its event status can be updated to the paused state or it can be directly removed from the event list.

[0062] In one embodiment, in the process of traversing each event in the event list, before determining whether the event satisfies the corresponding execution condition, the method further includes:

[0063] (1) If the event status of the event is in the waiting state, determine whether the event meets the corresponding execution condition.

[0064] It can be understood that the pending state is a state where the event is not currently running and will be triggered only after the execution conditions are met. That is, before making conditional judgments, the state of the event needs to be determined first. First, check whether the event is currently in the pending state. This state means that the event has been configured and added, but the triggering conditions have not yet been met. For the pending event, it is necessary to further determine whether its execution conditions are met, that is, whether the activation time has arrived. If it is met, the event will be activated for execution, otherwise it will remain in the pending state.

[0065] (2) If the event status of the event is to start immediately, the event is executed directly.

[0066] It can be understood that the immediate start state is a state where the event is not currently running, but once it is traversed in the event list, it will be triggered to run immediately. If an event is specified to be executed immediately, when the event is traversed, there is no need to judge the execution condition and the event is executed directly.

[0067] (3) If the event status of the event is paused, continue to traverse the next event.

[0068] It can be understood that the pause state is a state where an event does not need to be run temporarily. For an event set to pause, its condition will not be judged during traversal, nor will it be executed, but it will be skipped directly and traversal will continue to the next event.

[0069] In one of the embodiments, the event management method for the converter further includes: in response to an event modification request for any event in the event list, modifying the event state and / or execution condition of the event.

[0070] It can be understood that the system in this embodiment also opens an interface to the outside, and devices outside the communication group, such as other communicators, host computers, gateways, etc., can also modify the events in the event list through this interface. The modified objects include the event status and / or execution conditions of the event. In different situations, the event modification request can be divided into an event restart request, an event stop request, an immediate execution request, and a condition modification request according to the different modification objects.

[0071] Therefore, in response to an event modification request for any event in the event list, the event state and / or execution condition of the event is modified, including:

[0072] (1) In response to an event restart request for any event in the event list, the event state is changed to a waiting state, and the initial count value is updated to the count value of the current timer unit.

[0073] It can be understood that an event restart request is a request for re-triggering a certain event. When an external device needs to restart a configured event, a restart request can be sent to the system. After receiving the request, the system will forcibly set the state of the event to the pending state to prepare for re-triggering the event. And the count value of the current timer is used as the new initial count value, overwriting the old count base value. In this way, the restarted event will start timing with the current time as the new starting point. For example, a backup event that is executed every hour is suspended during operation. When a restart is required, a restart request is sent to the system, the state of the event will be reset to pending, and the initial count value will also be reset to the current count value as the new base.

[0074] (2) In response to an event stop request for any event in the event list, the event state is changed to a pause state.

[0075] It can be understood that an event stop request is a request to stop the triggering operation for a certain event. When the external needs to stop an event that is running or waiting to be triggered, a stop request can be sent to the system. After receiving it, the system will forcibly set the state of the event to the paused state. In this way, the event will be skipped in the next round of traversal to achieve the purpose of stopping. For example, when a non-critical log event needs to be stopped, the external sends a stop request to the event management, and the state of the log event will be updated to pause, so that it will not be executed during traversal.

[0076] (3) In response to an immediate execution request for any event in the event list, the event status is changed to an immediate start status.

[0077] As you can understand, an immediate execution request is a request to execute an event immediately when it is traversed. When an event needs to be executed immediately, an immediate execution request can be sent to the system. After receiving the request, the state of the event will be forced to start immediately. In the next round of traversal, if the event is detected to be in the immediate start state, the event will be executed directly to achieve an immediate response.

[0078] (4) In response to a condition modification request for any event in the event list, modify the execution condition of the event.

[0079] It can be understood that a condition modification request is an external request to modify the execution condition of an event. The execution condition of an event is allowed to be modified dynamically by the external party to adjust the event strategy. After receiving the condition modification request, the system will directly modify the condition data field of the corresponding event object to change its execution condition. For example, in the event of cyclically obtaining the power of the power station connected to the converter, the frequency of power conversion is different during the day and evening. The change is more frequent during the day, so a smaller time interval can be selected. When it is evening, the condition modification request can be used to increase the time interval.

[0080] Furthermore, in some cases, based on the requests acceptable to the above converter, the outside can trigger multiple requests at the same time as needed to implement complex event management functions. For example, when the converter feeds back error information to the upper computer, the upper computer can use an immediate execution request to immediately activate the error correction event in the paused state, or use an event configuration request to configure a new error correction event and set it to the immediate start state at the event state. At the same time, due to an error, the relevant data calculation events in the converter can also be stopped through an event stop request. In addition, in order to determine the progress of error repair, the interval time of the error detection event can also be shortened through a conditional modification request. For another example, when the converter feeds back fault information, the fault upload gateway event in the paused state can also be activated immediately through an immediate execution request.

[0081] In one of the embodiments, the event management method for the converter further includes: in response to a status query request for any event in the event list, feeding back an event status of the event.

[0082] It can be understood that the external system or user queries the current status of the event. This step realizes the external query function of the current status of the event. When the external system or user needs to know the status of the event, it sends a query request to the event management module, and specifies the target event in the request. After receiving the request, the event management module searches for the target event in the event list, reads the value of its status field, and feeds it back to the request initiator. In this way, the external perception of the running status of the event is realized.

[0083] The embodiment of the present application provides an event management device for a converter, wherein a timer unit is configured in the converter, and the timer unit counts itself up at a preset interval. Figure 3 , the event management device includes a first response module 310, an initial counting module 320, a traversal module 330, an execution module 340 and a return module 350. The first response module 310 is used to respond to the event configuration request, add the corresponding event to the event list, and determine the execution condition of the event. The initial counting module 320 is used to obtain the initial count value according to the count value of the timer unit when the timed event is added to the event list when the event is a timed event. The traversal module 330 traverses each event in the event list to determine whether the event meets the corresponding execution condition. If the event is a timed event, then judging whether the timed event meets the corresponding execution condition includes: judging whether the set time is reached according to the initial count value, the current count value of the timer unit and the preset interval. The execution module 340 is used to execute the traversed event when the traversed event meets the execution condition. The return module 350 is used to continue to return to the traversal module when the traversed event does not meet the execution condition, so as to traverse each event in the event list and determine whether the event meets the corresponding execution condition.

[0084] In one embodiment, the timing event includes a cyclic event; the execution module 340 is further configured to update the initial count value to the count value of the timer unit when the execution is completed after the cyclic event is executed.

[0085] In one embodiment, the first response module 310 is also used to record the initial event status of each event; the event status includes a waiting to start state, an immediate start state and a pause state. The execution module 340 is also used to update the event status of the event.

[0086] In one of the embodiments, in the process of traversing each event in the event list, the traversal module 330 is also used to determine whether the event meets the corresponding execution condition if the event status of the event is a to-be-started state; if the event status of the event is an immediate start state, the event is directly executed; if the event status of the event is a paused state, the traversal of the next event continues.

[0087] In one embodiment, the event management device of the converter further includes a second response module. The second response module is used to modify the event state and / or execution condition of the event in response to an event modification request for any event in the event list.

[0088] In one of the embodiments, the event modification request includes an event restart request, an event stop request, an immediate execution request and a condition modification request; the second response module is used to respond to an event restart request for any event in the event list, modify the event status to a pending start status, and update the initial count value to the count value of the current timer unit; respond to an event stop request for any event in the event list, modify the event status to a paused status; respond to an immediate execution request for any event in the event list, modify the event status to an immediate start status; respond to a condition modification request for any event in the event list, modify the execution condition of the event.

[0089] In one embodiment, the event management device of the converter further includes a third response module. The third response module is used to respond to a status query request for any event in the event list and feedback the event status of the event.

[0090] For the specific definition of the event management device of the converter, please refer to the definition of the event management method of the converter above, which will not be repeated here. Each module in the event management device of the converter mentioned above can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0091] An embodiment of the present application provides a computer device, including one or more processors and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the one or more processors, the steps of the event management method for the converter in any of the above embodiments are executed.

[0092] Indicatively, if Figure 4 As shown, Figure 4A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. Figure 4 The computer device 400 includes a processing component 402, which further includes one or more processors, and a memory resource represented by a memory 401, for storing instructions executable by the processing component 402, such as an application. The application stored in the memory 401 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 402 is configured to execute instructions to perform the steps of the event management method for the converter of any of the above embodiments.

[0093] The computer device 400 may further include a power supply component 403 configured to perform power management of the computer device 400 , a wired or wireless network interface 404 configured to connect the computer device 400 to a network, and an input / output (I / O) interface 405 .

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

[0095] An embodiment of the present application provides a storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the event management method for the converter in any of the above embodiments.

[0096] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.

[0097] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for event management of a converter, characterized in that: The converter is provided with a timer unit, and the timer unit counts itself up at a preset interval. The event management method comprises: In response to the event configuration request, add the corresponding event to the event list and determine the execution condition of the event; If the event is a timed event, the initial count value is obtained according to the count value of the timer unit when the timed event is added to the event list; the timed event and the timer unit are independent of each other, and the timer unit only provides a counting function; Traversing each event in the event list, determining whether the event satisfies the corresponding execution condition; if the event is a timed event, determining whether the timed event satisfies the corresponding execution condition comprises: determining whether the set time is reached according to the initial count value, the current count value of the timer unit and the preset interval; If so, execute the event that is traversed; If not, each event in the traversal event list is returned, and the step of determining whether the event satisfies the corresponding execution condition is continued.

2. The event management method for a converter according to claim 1, characterized in that: The timing events include cyclic events; After the loop event is executed, the initial count value is updated to the count value of the timer unit when the execution is completed.

3. The event management method for a converter according to claim 1, characterized in that: The method of responding to the event configuration request, adding the corresponding event to the event list, and determining the execution condition of the event, further includes: Recording the initial event status of each event; the event status includes a waiting to start state, an immediate start state and a pause state; The execution of the events traversed further includes: The event status of the event is updated.

4. The event management method for a converter according to claim 3, characterized in that: In the process of traversing each event in the event list, before determining whether the event satisfies the corresponding execution condition, the method further includes: If the event state of the event is the waiting-to-start state, determining whether the event satisfies the corresponding execution condition; If the event state of the event is the immediate start state, directly executing the event; If the event state of the event is the pause state, continue traversing the next event.

5. The event management method for a converter according to claim 3, characterized in that: Also includes: In response to an event modification request for any of the events in the event list, the event state and / or the execution condition of the event is modified.

6. The event management method for a converter according to claim 5, characterized in that: The event modification request includes an event restart request, an event stop request, an immediate execution request and a condition modification request; The step of modifying the event state and / or the execution condition of the event in response to the event modification request for any event in the event list includes: In response to an event restart request for any of the events in the event list, modifying the event state to the waiting-to-start state, and updating the initial count value to the current count value of the timer unit; In response to an event stop request for any of the events in the event list, modifying the event state to the pause state; In response to an immediate execution request for any of the events in the event list, modifying the event state to the immediate start state; In response to a condition modification request for any of the events in the event list, the execution condition of the event is modified.

7. The event management method for a converter according to claim 3, characterized in that: Also includes: In response to a status query request for any of the events in the event list, the event status of the event is fed back.

8. An event management device for a converter, characterized in that: The converter is provided with a timer unit, the timer unit counts itself up at a preset interval, and the event management device comprises: A first response module, configured to respond to an event configuration request, add a corresponding event to an event list, and determine an execution condition of the event; An initial counting module, used for obtaining an initial counting value according to the counting value of the timer unit when the timed event is added to the event list when the event is a timed event; the timed event and the timer unit are independent of each other, and the timer unit only provides a counting function; A traversal module, traversing each event in the event list, and determining whether the event satisfies the corresponding execution condition; if the event is a timed event, determining whether the timed event satisfies the corresponding execution condition comprises: determining whether the set time is reached according to the initial count value, the current count value of the timer unit and the preset interval; An execution module, used for executing the traversed event when the traversed event meets the execution condition; The return module is used to continue to return to the traversal module when the traversed event does not meet the execution condition, so as to traverse each event in the event list and determine whether the event meets the corresponding execution condition.

9. A computer device, characterized in that: It comprises one or more processors and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the event management method for the converter as described in any one of claims 1 to 7 are executed.

10. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the event management method for the converter according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Timing processing method and device for real-time operating system, equipment and storage medium

    CN112199170A

  • Converter control system task scheduling method based on SYSBIOS

    CN116225546A