Vehicle active safety early warning real-time calculation system and method, medium and equipment
By dynamically generating and injecting new event rule scripts into the real-time vehicle active safety warning computing system, the problem of recoding and deployment of event rule changes in the existing technology is solved, and rapid response and continuous monitoring of vehicle active safety events are achieved. , improve the transportation monitoring capabilities of hazardous chemicals.
Patent Information
- Application Number
- CN202410952810.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, changes in event rules need to be recoded and deployed, resulting in the persistence of monitoring, and the inability to dynamically adjust event rules, affecting the efficiency of hazardous chemical transportation monitoring.
A real-time computing system for active safety warning of vehicles is designed to generate new event rule scripts through the event rule base, and dynamically inject processing modules through the rule listener to clear cached results, implement dynamic rules engines, and support dynamic adjustment of event rules during operation. , no secondary development deployment is required.
It has achieved rapid and continuous operation and maintenance deployment, improved the monitoring capabilities of hazardous chemical transportation, allowed business personnel to quickly respond to the monitoring results of event rules changes, and improved monitoring flexibility and efficiency.
Smart Images

Figure CN118928434A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle active safety warning, and in particular to a vehicle active safety warning real-time computing system, method, medium and equipment. Background Art
[0002] The messages sent by the on-board active safety equipment are called active safety events, also known as warning events, such as the driver speeding or colliding at a certain point in time. During the transportation of hazardous chemicals, it is particularly important to monitor active safety events of transport vehicles. When monitoring active safety events of vehicles, a series of monitoring decisions, called event rules, will be made, such as the driver speeding more than three times in a row within one hour, yawning more than three times within half an hour, etc. The distributed real-time computing engine pulls the active safety event stream, and performs operations such as filtering, caching, and sorting active safety events according to event rules, and then promptly obtains a set of active safety events and vehicles corresponding to this event rule, so as to facilitate timely processing of alarm vehicles.
[0003] The current technical solutions are as follows: Figure 1 As shown, the vehicle-mounted active safety device 100 sends active safety events to the message queue 200, and the distributed real-time computing engine pulls the active safety events in the message queue 200, caches the active safety events that meet the event rules, and retains them in an intermediate state until all active safety events that meet the event rules are reached and output to the result library 400.
[0004] Since event rules can be adjusted at any time according to relevant policies, the event rules of the distributed real-time computing engine need to be recoded and redeployed. This method is hard-coded and affects the continuity of monitoring. Summary of the invention
[0005] In order to solve the technical problem in the prior art that if the event rules are changed, they need to be redeveloped and deployed, the present invention proposes a real-time computing system, method, medium and equipment for vehicle active safety warning, which realizes a dynamic rule engine and dynamic matching of event rules without the need for secondary development and deployment. It supports dynamic adjustment of event rules during operation, realizes rapid and continuous operation and maintenance deployment, and improves the monitoring capability of hazardous chemical transportation.
[0006] In a first aspect, an embodiment of the present invention provides a vehicle active safety warning real-time computing system, comprising:
[0007] A processing module, used to pull active safety events from a message queue, process the pulled active safety events using an event rule script in an event rule set, and cache processing results of active safety events that comply with the event rules, wherein the message queue stores active safety events generated by active safety devices of the vehicle;
[0008] An event rule library is used to store event rules and generate new event rule scripts according to the changed event rules when the stored event rules change;
[0009] A rule listener is used to inject a new event rule script into the event rule set of the processing module when it detects changes in the event rule script in the event rule library, and clear the processing results of active security events that comply with the original event rules that have been cached in the processing module.
[0010] In some implementations, the monitoring module is further configured to load all event rule scripts in the event rule library when the processing module is first started, and inject all loaded event rule scripts into the event rule set.
[0011] In some implementations, the processing module is further configured to write a set of active security events that meet the event rules into a result library after completing the processing of the pulled active security events.
[0012] In some implementations, the processing module includes:
[0013] An event rule module stores the event rule set, wherein the event rule set includes a set of event rule scripts;
[0014] At least one computing module, used to pull active security events from the message queue, and process the pulled active security events according to the event rule script in the event rule set;
[0015] The cache module is used to cache the processing results of active security events that meet the event rules.
[0016] In some implementations, the event rule library is used to generate a new event rule script according to the new event rule after at least one of the operations of adding, modifying, and deleting the stored event rule occurs.
[0017] In a second aspect, an embodiment of the present invention provides a real-time calculation method for active safety warning of a vehicle, comprising: being applied to a real-time calculation system for active safety warning of a vehicle, the system comprising: a processing module, for pulling active safety events from a message queue, using an event rule script in an event rule set to process the pulled active safety events, and caching processing results of active safety events that comply with the event rules, wherein the message queue stores active safety events generated by active safety devices of the vehicle;
[0018] The method comprises:
[0019] Monitor whether the stored event rules have changed;
[0020] When the stored event rules change, a new event rule script is generated according to the changed event rules;
[0021] The new event rule script is injected into the event rule set of the processing module, and the processing results of the active security events that comply with the original event rules and have been cached in the processing module are cleared.
[0022] In some implementations, the method further includes:
[0023] When the processing module is started for the first time, all event rule scripts generated according to the event rules are injected into the event rule set.
[0024] In some implementations, after at least one of the operations of adding, modifying, and deleting a stored event rule occurs, a new event rule script is generated according to the changed event rule.
[0025] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by at least one processor, the method described in the first aspect is implemented.
[0026] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising a memory and at least one processor, wherein the memory stores a computer program, and when the computer program is executed by the at least one processor, the method described in the first aspect is implemented.
[0027] One or more embodiments of the present invention bring at least the following beneficial effects:
[0028] The present invention generates a new event rule script according to the changed event rule when the stored event rule changes through the event rule library; and after the newly generated event rule script of the event rule library is monitored by the rule listener, the newly generated event rule script is injected into the event rule collection of the dynamic rule engine, and the processing results of the active safety events that comply with the original event rule cached by the dynamic rule engine are cleared, so that the dynamic rule engine can process the active safety events pulled from the message queue according to the new event rule script in the event rule collection during operation. That is, compared with the prior art, the problem of the traditional method of changing the event rule requiring re-modification of the coding logic is solved, and the time problem of changing the event rule requiring re-development is solved, so that business personnel can see the monitoring results after the event rule changes more quickly and flexibly, and the hazardous chemical transportation monitoring capability is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and should not be regarded as limiting the scope.
[0030] Figure 1 This is the structural block diagram of the traditional vehicle active safety warning real-time computing system;
[0031] Figure 2 The architecture diagram of the real-time computing system for active vehicle safety warning provided by the embodiment of the present invention;
[0032] Figure 3 A structural block diagram of a real-time calculation system for active vehicle safety warning provided by an embodiment of the present invention;
[0033] Figure 4 A flow chart of a real-time calculation method for active vehicle safety warning provided by an embodiment of the present invention;
[0034] Figure 5 Another flow chart of the real-time calculation method for active vehicle safety warning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present invention.
[0036] Embodiment 1
[0037] This embodiment provides a vehicle active safety warning real-time computing system, such as Figure 2 and Figure 3 As shown, the system comprises:
[0038] The processing module 310 is used to pull active safety events from the message queue, process the pulled active safety events using the event rule script in the event rule set, cache the processing results of the active safety events that meet the event rules, and after the pulled active safety events are processed, write the set of active safety events that meet the event rules into the result library 400. The message queue stores active safety events generated by the vehicle active safety device. The processing results of the active safety events that meet the event rules in the result library can be visualized later through the web program.
[0039] The event rule library 330 is used to store event rules and generate new event rule scripts according to the changed event rules when the stored event rules change. The event rule library 330 is used to generate new event rule scripts according to the new event rules after at least one of the operations of adding, modifying and deleting the stored event rules occurs.
[0040] The rule listener 320 is used to inject the new event rule script into the event rule set of the processing module 310 when it detects changes in the event rule script in the event rule library 330, and clear the processing results of active security events that comply with the original event rules cached in the processing module 310.
[0041] In some embodiments, the rule monitoring module 320 is also used to load all event rule scripts in the event rule library 330 when the processing module 313 is started for the first time, and inject all loaded event rule scripts into the event rule set.
[0042] The processing module 310 includes:
[0043] An event rule module 312 stores the event rule set, which includes a set of event rule scripts;
[0044] At least one computing module 313, used to pull active security events from the message queue, and process the pulled active security events according to the event rule script in the event rule set;
[0045] The cache module 311 is used to cache the processing results of active security events that meet the event rules.
[0046] The present invention generates a new event rule script according to the changed event rule when the stored event rule changes through the event rule library; and after the newly generated event rule script of the event rule library is monitored by the rule listener, the newly generated event rule script is injected into the event rule collection of the dynamic rule engine, and the processing results of the active security events that comply with the original event rules cached by the dynamic rule engine are cleared, so that the dynamic rule engine can process the active security events pulled from the message queue according to the new event rule script in the event rule collection during operation. That is, compared with the prior art, the dynamic rule engine of the present application realizes dynamic matching of active security rules, does not require secondary development and deployment, supports dynamic addition, modification and deletion of event rules during operation, realizes fast and continuous operation and maintenance deployment, and improves the early warning capability of monitored items.
[0047] Embodiment 2
[0048] This embodiment provides a real-time calculation method for active safety warning of a vehicle, which is applied to a real-time calculation system for active safety warning of a vehicle. The system includes: a processing module for pulling active safety events from a message queue, using an event rule script in an event rule set to process the pulled active safety events, and caching the processing results of active safety events that meet the event rules. The message queue stores active safety events generated by active safety devices of the vehicle. Figure 4 As shown, the method includes:
[0049] Step S100, monitoring whether the stored event rules have changed, specifically monitoring whether at least one of the operations of adding, modifying, deleting, etc., has occurred in the stored event rules.
[0050] Step S200, when the stored event rule changes, a new event rule script is generated according to the changed event rule;
[0051] Step S300, injecting a new event rule script into the event rule set of the processing module, and clearing the processing results of active security events that comply with the original event rules that have been cached in the processing module.
[0052] In some embodiments, Figure 5 As shown, the method further includes: step S000, when the processing module is started for the first time, injecting all event rule scripts generated according to the event rules into the event rule set.
[0053] The method provided in this embodiment no longer adopts the traditional hard-coding mode, and separates the event rules from the application code. Users can customize event rules in the interface, generate corresponding event rule scripts according to the defined event rules, and then update the event rule set used by the computing module, clear the cached processing results of active security events that comply with the original event rules, so as to adjust the processing logic of the computing module and achieve the effect of dynamically adjusting the event rules.
[0054] Embodiment 3
[0055] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by at least one processor, the vehicle active safety warning real-time calculation method of the above-mentioned embodiment is implemented.
[0056] Among them, the computer-readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0057] The vehicle active safety warning real-time calculation method implemented in this embodiment is applied to the vehicle active safety warning real-time calculation system, and the system includes: a processing module, which is used to pull active safety events from the message queue, use the event rule script in the event rule set to process the pulled active safety events, and cache the processing results of active safety events that meet the event rules. It includes:
[0058] Step S000, when the processing module is started for the first time, all event rule scripts generated according to the event rules are injected into the event rule set;
[0059] Step S100, monitoring whether the stored event rules have changed;
[0060] Step S200, when the stored event rule changes, a new event rule script is generated according to the changed event rule;
[0061] Step S300, injecting a new event rule script into the event rule set of the processing module, and clearing the processing results of active security events that comply with the original event rules that have been cached in the processing module.
[0062] Embodiment 4
[0063] This embodiment provides an electronic device, including a memory and at least one processor, wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method of the above-mentioned embodiment is implemented.
[0064] Among them, the processor can be an application specific integrated circuit (Application Specific Integrated Circuit, referred to as ASIC), a digital signal processor (Digital Signal Processor, referred to as DSP), a digital signal processing device (Digital Signal Processing Device, referred to as DSPD), a programmable logic device (Programmable Logic Device, referred to as PLD), a field programmable gate array (Field Programmable Gate Array, referred to as FPGA), a controller, a microcontroller (Microcontroller Unit, MCU), a microprocessor or other electronic components, which are used to execute the real-time calculation method for active vehicle safety warning in the above-mentioned embodiments.
[0065] The vehicle active safety warning real-time calculation method implemented in this embodiment is applied to the vehicle active safety warning real-time calculation system, and the system includes: a processing module, which is used to pull active safety events from the message queue, use the event rule script in the event rule set to process the pulled active safety events, and cache the processing results of active safety events that meet the event rules. It includes:
[0066] Step S000, when the processing module is started for the first time, all event rule scripts generated according to the event rules are injected into the event rule set;
[0067] Step S100, monitoring whether the stored event rules have changed;
[0068] Step S200, when the stored event rule changes, a new event rule script is generated according to the changed event rule;
[0069] Step S300, injecting a new event rule script into the event rule set of the processing module, and clearing the processing results of active security events that comply with the original event rules that have been cached in the processing module.
[0070] Embodiment 5
[0071] This embodiment provides a computer program product. When the computer program product is run on a processor, it executes the vehicle active safety warning real-time calculation method of the above-mentioned embodiment.
[0072] In practical applications, the computer program product can be implemented and run in electronic devices.
[0073] The vehicle active safety warning real-time calculation method implemented in this embodiment includes:
[0074] Step S000, when the processing module is started for the first time, all event rule scripts generated according to the event rules are injected into the event rule set;
[0075] Step S100, monitoring whether the stored event rules have changed;
[0076] Step S200, when the stored event rule changes, a new event rule script is generated according to the changed event rule;
[0077] Step S300, injecting a new event rule script into the event rule set of the processing module, and clearing the processing results of active security events that comply with the original event rules that have been cached in the processing module.
[0078] In the several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely illustrative.
[0079] It should be noted that, in this article, the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. The terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0080] Although the embodiments disclosed in the present invention are as above, the above contents are only embodiments adopted for facilitating the understanding of the present invention and are not intended to limit the present invention. Any technician in the technical field to which the present invention belongs can make any modifications and changes in the form and details of the implementation without departing from the spirit and scope disclosed in the present invention, but the patent protection scope of the present invention shall still be subject to the scope defined in the attached claims.
Claims
1. A vehicle active safety warning real-time computing system, characterized in that: include: A processing module, used to pull active safety events from a message queue, process the pulled active safety events using an event rule script in an event rule set, and cache processing results of active safety events that comply with the event rules, wherein the message queue stores active safety events generated by active safety devices of the vehicle; An event rule library is used to store event rules and generate new event rule scripts according to the changed event rules when the stored event rules change; A rule listener is used to inject a new event rule script into the event rule set of the processing module when it detects changes in the event rule script in the event rule library, and clear the processing results of active security events that comply with the original event rules that have been cached in the processing module.
2. The system according to claim 1, characterized in that The monitoring module is also used to load all event rule scripts in the event rule library when the processing module is started for the first time, and inject all loaded event rule scripts into the event rule set.
3. The system according to claim 1, characterized in that The processing module is further configured to write a set of active security events that meet the event rules into a result library after completing the processing of the pulled active security events.
4. The system according to claim 3, characterized in that The processing module comprises: An event rule module stores the event rule set, wherein the event rule set includes a set of event rule scripts; At least one computing module, used to pull active security events from the message queue, and process the pulled active security events according to the event rule script in the event rule set; The cache module is used to cache the processing results of active security events that meet the event rules.
5. The system according to claim 1, characterized in that The event rule library is used to generate a new event rule script according to the new event rule after at least one of the operations of adding, modifying and deleting the stored event rule occurs.
6. A real-time calculation method for active vehicle safety warning, characterized in that: Applied to a real-time computing system for active safety early warning of a vehicle, the system comprises: a processing module, used to pull active safety events from a message queue, process the pulled active safety events using an event rule script in an event rule set, and cache processing results of active safety events that comply with the event rules, wherein the message queue stores active safety events generated by active safety devices of the vehicle; The method comprises: Monitor whether the stored event rules have changed; When the stored event rules change, a new event rule script is generated according to the changed event rules; The new event rule script is injected into the event rule set of the processing module, and the processing results of the active security events that comply with the original event rules and have been cached in the processing module are cleared.
7. The method according to claim 6, characterized in that Also includes: When the processing module is started for the first time, all event rule scripts generated according to the event rules are injected into the event rule set.
8. The method according to claim 6, characterized in that After at least one of the operations of adding, modifying, and deleting the stored event rules occurs, a new event rule script is generated according to the changed event rules.
9. An electronic device, characterized in that: The method comprises a memory and at least one processor, wherein a computer program is stored in the memory, and when the computer program is executed by the at least one processor, the method according to any one of claims 6 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by at least one processor, the method according to any one of claims 6 to 8 is implemented.
