Rule engine operation method and device of vehicle, equipment and medium
By using tree structure and change inspection methods propagating to the top layer in the rule engine on the vehicle side, the problem of slow running speed of the rule engine is solved, and more efficient conditional judgment processing is achieved.
Patent Information
- Application Number
- CN202311515988.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, the running speed of the rule engine at the vehicle side is slow, which affects the timeliness of vehicle control. How to improve the running speed of the rule engine is a technical problem that needs to be solved urgently.
By responding to the input of the target signal, the judgment conditions corresponding to the target signal are obtained and whether the conditions are met. If the condition is met, the tree structure associated with the target signal is determined from the preset tree structure, and a change check is performed on the tree structure in a propagation manner to generate the judgment result of the conditional expression to determine whether the action is executed.
Using a tree-based judgment method can reduce the number of calculations and improve the running speed and processing efficiency of the rule engine.
Smart Images

Figure CN120010939A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of vehicle technology, and more particularly to a method, device, equipment and medium for running a rule engine of a vehicle. Background Art
[0002] The rule engine on the vehicle side is used to configure conditional expressions and make conditional judgments on conditional expressions, and execute corresponding actions when the judgment result of the conditional expression satisfies the condition.
[0003] The running speed of the rule engine will affect the timeliness of vehicle control. Currently, how to improve the running speed of the rule engine is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides a vehicle rule engine operation method, device, equipment and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for operating a rule engine of a vehicle, comprising:
[0006] In response to receiving an input of a target signal, obtaining a judgment condition corresponding to the target signal;
[0007] Determine whether the target signal satisfies the determination condition, and obtain a determination result of the determination condition;
[0008] If the judgment result is that the condition is met, then at least one tree structure associated with the target signal is determined from a preset tree structure; wherein the tree structure is obtained by parsing the conditional expression;
[0009] A change check is performed on the at least one tree structure in a manner of propagating toward the top level, and a judgment result of at least one conditional expression corresponding to the at least one tree structure is generated to determine whether to execute an action corresponding to the at least one conditional expression.
[0010] In a second aspect, an embodiment of the present disclosure provides a rule engine operation device for a vehicle, comprising:
[0011] an acquisition module, configured to acquire a judgment condition corresponding to the target signal in response to receiving an input of the target signal;
[0012] An execution module, used for judging whether the target signal satisfies the judgment condition and obtaining a judgment result of the judgment condition;
[0013] A determination module, configured to determine at least one tree structure associated with the target signal from a preset tree structure if the judgment result satisfies the condition; wherein the tree structure is obtained by parsing the conditional expression;
[0014] A generation module is used to perform change check on the at least one tree structure in a manner of propagating toward the top level, and generate a judgment result of at least one conditional expression corresponding to the at least one tree structure to determine whether to execute an action corresponding to the at least one conditional expression.
[0015] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the vehicle rule engine operation method described in the first aspect above.
[0016] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the vehicle rule engine operation method described in the first aspect is implemented.
[0017] In a fifth aspect, an embodiment of the present disclosure provides a vehicle, comprising a rule engine operating device for a vehicle as described in the second aspect above, or an electronic device as described in the third aspect above.
[0018] The technical solution provided by the embodiment of the present disclosure has the following advantages over the prior art: in response to receiving an input of a target signal, a judgment condition corresponding to the target signal is obtained; if the judgment result of the judgment condition is that the condition is met, at least one tree structure associated with the target signal is determined from a preset tree structure; and then, a change check is performed on at least one tree structure by propagating to the top level, and a judgment result of at least one conditional expression corresponding to at least one tree structure is generated to determine whether to execute an action corresponding to at least one conditional expression; therefore, when the conditional expression is conditionally judged by the above-mentioned tree structure-based judgment method, compared with the calculation method of directly judging the conditional expression, there is no need to calculate all the judgment conditions, and the number of calculations can be reduced to increase the running speed of the rule engine and improve processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0020] In order to more clearly illustrate the embodiments of the present invention 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0021] Figure 1A schematic diagram of a flow chart of a vehicle rule engine operation method provided by an embodiment of the present disclosure;
[0022] Figure 2 A tree structure diagram of a conditional expression provided by an embodiment of the present disclosure;
[0023] Figure 3 A flowchart of another vehicle rule engine operation method provided by an embodiment of the present disclosure;
[0024] Figure 4 A schematic diagram of the structure of a rule engine operating device for a vehicle provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0026] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0027] Figure 1 This is a flow chart of a method for operating a rule engine for a vehicle provided in an embodiment of the present disclosure. The method provided in an embodiment of the present disclosure can be executed by a rule engine operating device for a vehicle, which can be implemented in software and / or hardware and can be integrated on any electronic device with computing capabilities, such as a vehicle-mounted terminal.
[0028] like Figure 1 As shown, the rule engine operation method of a vehicle provided by the embodiment of the present disclosure may include:
[0029] Step 101, in response to receiving an input of a target signal, obtaining a judgment condition corresponding to the target signal.
[0030] The method of the disclosed embodiment is applied to the operation of a rule engine of a vehicle. The rule engine involves conditional expressions. The conditional expressions are used for conditional judgments in various control scenarios of the vehicle, including but not limited to vehicle locking, vehicle alarm, assisted driving, human-computer interaction control of vehicle-mounted equipment, and other scenarios. The conditional expression is, for example, (s1==1||s2==1)&&(s3==1||s4==1)&&s5==1. The above conditional expression is only an example. The specific conditional expression is set according to the actual application scenario and needs, and is not limited here.
[0031] In this embodiment, each conditional expression may be composed of one or more judgment conditions, and the input of the target signal may be a received signal value. As an example, for the conditional expression "(s1==1||s2==1)&&(s3==1||s4==1)&&s5==1", "s1==1", "s2==1", "s3==1", "s4==1", "s5==1" represent multiple judgment conditions, "s1", "s2", "s3", "s4", "s5" represent multiple signal names, and for the target signal s1, the corresponding judgment condition is "s1==1".
[0032] Step 102, determine whether the target signal meets the determination condition, and obtain the determination result of the determination condition.
[0033] In this embodiment, based on the signal value of the target signal, the judgment condition corresponding to the target signal is executed to obtain a judgment result of the judgment condition, wherein the judgment result indicates whether the input signal value satisfies the condition, and the judgment result includes satisfying the condition and not satisfying the condition. For example, when the judgment result is True, it indicates that the condition is satisfied, and when the judgment result is False, it indicates that the condition is not satisfied.
[0034] As an example, the judgment condition corresponding to the target signal s1 is "s1==1". When the signal value of the target signal s1 is 2, the judgment result of the judgment condition is determined to be that the condition is not met. When the signal value of the target signal s1 is 1, the judgment result of the judgment condition is determined to be that the condition is met.
[0035] Step 103: If the judgment result is that the condition is met, at least one tree structure associated with the target signal is determined from the preset tree structures.
[0036] The tree structure is obtained by parsing the conditional expression.
[0037] In this embodiment, the rule engine may have multiple conditional expressions pre-set, and each conditional expression is parsed to obtain a corresponding tree structure, that is, there may be multiple pre-set tree structures, and the conditional expression associated with the target signal is an expression containing the judgment condition corresponding to the target signal, and there may be one or more conditional expressions associated with the target signal, and the tree structure parsed by the conditional expression is determined as the tree structure associated with the target signal. When the judgment result of the judgment condition corresponding to the target signal is that the condition is satisfied, at least one tree structure associated with the target signal is determined, and the subsequent step of performing a change check on the at least one tree structure is triggered.
[0038] The tree structure of the conditional expression is explained below.
[0039] As an example, see Figure 2For the conditional expression "(s1==1||s2==1)&&(s3==1||s4==1)&&s5==1", the tree structure obtained by parsing is as follows Figure 2 As shown, each judgment condition corresponds to a leaf node of the tree structure. The value V1, V2, V3, V4, V5, V6, V7, V8, and bool of the node in the figure represents the judgment result of the node, and its specific value can be True or False.
[0040] Step 104 , performing a change check on at least one tree structure by propagating toward the top level, generating a judgment result of at least one conditional expression corresponding to the at least one tree structure, so as to determine whether to execute an action corresponding to the at least one conditional expression.
[0041] In this embodiment, for each node in the tree structure, the bottom leaf nodes determine whether the conditions are met in turn based on the tree structure and propagate the changes to the top layer. When a certain condition is met, the propagation upward stops. The above operation is performed until all nodes stop propagating upward, or the judgment result of the top node of the tree structure indicates that the condition is met, and the action corresponding to the conditional expression is determined. Among them, the action is configured by the rule engine according to the actual scenario, such as an alarm action.
[0042] In one embodiment of the present disclosure, a change check is performed on at least one tree structure by propagating toward the top level, including: for each tree structure in the at least one tree structure, starting from the leaf node of the tree structure, judging in turn whether each node of the tree structure satisfies the corresponding judgment condition, obtaining the current judgment result of each node, comparing the current judgment result of the node with the historical judgment result, if the current judgment result of all child nodes of any node in the tree structure has not changed compared with the historical judgment result, then no judgment operation is performed on the node.
[0043] In this embodiment, if the current judgment results of all child nodes of any node meet the conditions and are the same as the historical judgment results recorded last time, the node will no longer be judged. Figure 2 In the tree structure shown, if V5, V6, V7, and V8 are all True and unchanged, the operations of V3 and V4 will no longer be executed, and the operation of V1 will no longer be executed, and propagation will stop at this branch. In this way, the number of calculations can be reduced to improve the running speed of condition judgment when the rule engine is running.
[0044] In one embodiment of the present disclosure, a change check is performed on at least one tree structure by propagating toward the top level, including: for each tree structure in the at least one tree structure, each leaf node of the tree structure is judged in turn whether it satisfies the corresponding judgment condition; if any leaf node in the tree structure is judged to not satisfy the judgment condition, the judgment operation on other leaf nodes is stopped, and it is determined that the conditional expression corresponding to the tree structure does not satisfy the execution condition.
[0045] In this embodiment, if the current judgment result of any leaf node is not satisfied with the condition, it is determined that the current judgment results from the leaf node to the top node do not not satisfy the condition, so it is determined that the conditional expression corresponding to the tree structure does not satisfy the execution condition, and the action corresponding to the conditional expression is not executed. Figure 2 In the tree structure shown, if V5 is False, the top-level node bool is determined to be False, and the conditional expression does not meet the execution condition. Therefore, when it is determined that a certain node does not meet the condition, there is no need to perform subsequent judgment operations, which can reduce the number of calculations and improve the running speed of conditional judgment when the rule engine is running.
[0046] It should be noted that the steps of this embodiment are not limited to leaf nodes, but can also be applied to any node between a leaf node and a top-level node, and are not limited here.
[0047] According to the technical solution of the embodiment of the present disclosure, in response to receiving the input of the target signal, a judgment condition corresponding to the target signal is obtained. If the judgment result of the judgment condition is that the condition is met, at least one tree structure associated with the target signal is determined from the preset tree structure, and then, a change check is performed on the at least one tree structure in a manner of propagating to the top level, and a judgment result of at least one conditional expression corresponding to the at least one tree structure is generated to determine whether to execute the action corresponding to the at least one conditional expression. Therefore, when the conditional expression is conditionally judged by the above-mentioned tree structure-based judgment method, compared with the calculation method of directly judging the conditional expression, there is no need to calculate all the judgment conditions, which can reduce the number of calculations, thereby improving the running speed of the rule engine and improving processing efficiency.
[0048] Based on the above embodiments, Figure 3 A flow chart of another vehicle rule engine operation method provided by an embodiment of the present disclosure is shown as follows: Figure 3 As shown, the method includes:
[0049] Step 301, obtaining the configuration content of the rule engine sent by the server.
[0050] The configuration content includes a conditional expression.
[0051] In this embodiment, the conditional expression is configured as a preset configuration format on the server side, and the preset configuration format is as follows:
[0052] For the conditional expression "(s1==1||s2==1)&&(s3==1||s4==1)&&s5==1", the configuration format is:
[0053]
[0054] Step 302: parse the conditional expression in the configuration content into a tree structure.
[0055] In this embodiment, a conditional expression in the above-mentioned preset configuration format is generated on the server side and sent to the vehicle side. The vehicle side parses the conditional expression in the above-mentioned configuration format to generate a tree structure corresponding to the conditional expression. The expression language based on the tree structure description in this embodiment is used to define the judgment expression in the rule engine. Compared with the original form of conditional expressions, the speed of conditional loading and parsing when the rule engine is running can be improved.
[0056] The conditional expression includes a signal name and a judgment condition, and each signal name and its corresponding judgment condition constitute a leaf node of the tree structure.
[0057] Step 303: Store the leaf nodes of the tree structure using hash mapping.
[0058] In this embodiment, the leaf nodes of the tree structure are stored using a HashMap data structure, the key of the HashMap includes the signal name, and the value of the HashMap includes the judgment condition corresponding to the signal name and the tree structure information.
[0059] Among them, the data structure of HashMap is as follows:
[0060] K: signal name
[0061] V: k: judgment condition
[0062] v: [Tree1, Tree2…]
[0063] As an example, K: s1; k: s1 == 1; v: [Tree1, Tree2], Tree1 and Tree2 represent the tree structure corresponding to the expression of the conditional expression containing the judgment condition s1 == 1. In this example, the leaf nodes of the tree structure are stored in HashMap, which can realize the normalization of the same judgment conditions of the same signal, without repeated judgment, reducing the number of calculations and improving processing efficiency.
[0064] After parsing each conditional expression into a tree structure and using a hash map to store each leaf node, further, in the application process, in response to receiving the input of the target signal, obtain the judgment condition corresponding to the target signal, execute the judgment condition, and obtain the judgment result of the judgment condition; if the judgment result satisfies the condition, determine at least one tree structure associated with the target signal from the preset tree structure; perform a change check on the at least one tree structure by propagating to the top level, and generate a judgment result of at least one conditional expression corresponding to the at least one tree structure to determine whether to execute the action corresponding to the at least one conditional expression.
[0065] Wherein, obtaining the judgment condition corresponding to the target signal includes: matching the signal name of the target signal with a pre-stored mapping relationship to obtain the judgment condition corresponding to the target signal. For example, for the target signal s1, a hash mapping with K as s1 is determined from each hash mapping, and the k: judgment condition of the above hash mapping is used as the judgment condition corresponding to the target signal.
[0066] Among them, determining at least one tree structure associated with the target signal from the preset tree structures includes: querying the hash map according to the signal name of the target signal, obtaining the target hash map whose key is the signal name of the target signal, and determining at least one tree structure associated with the target signal according to the tree structure information included in the value of the target hash map. For example, for the target signal s1, determine the hash map whose K is s1 from each hash map, and use v: [Tree1, Tree2...] of the above hash map as the tree structure associated with the target signal.
[0067] In the disclosed embodiment, by presetting a conditional expression of a specified configuration format on the server side and sending it to the vehicle side for parsing, the speed of conditional loading and parsing during the runtime of the rule engine can be improved compared to the original form of conditional expressions. In addition, the leaf nodes of the tree structure are stored in a HashMap, which can realize the normalization of the same judgment conditions of the same signal without repeated judgment, reducing the number of calculations and improving processing efficiency.
[0068] The disclosed embodiment also provides a rule engine operation device for a vehicle.
[0069] Figure 4 A schematic diagram of the structure of a vehicle rule engine operation device provided by an embodiment of the present disclosure, such as Figure 4 As shown, the rule engine running device of the vehicle includes: an acquisition module 41, an execution module 42, a determination module 43, and a generation module 44.
[0070] The acquisition module 41 is used to obtain a judgment condition corresponding to the target signal in response to receiving an input of the target signal;
[0071] An execution module 42 is used to determine whether the target signal meets the determination condition and obtain a determination result of the determination condition;
[0072] A determination module 43, configured to determine at least one tree structure associated with the target signal from a preset tree structure if the judgment result satisfies the condition; wherein the tree structure is obtained by parsing the conditional expression;
[0073] The generation module 44 is used to perform change check on the at least one tree structure in a manner of propagating toward the top level, and generate a judgment result of at least one conditional expression corresponding to the at least one tree structure to determine whether to execute an action corresponding to the at least one conditional expression.
[0074] In one embodiment of the present disclosure, the device also includes: a receiving module, used to obtain the configuration content of the rule engine sent by the server; the configuration content includes a conditional expression; the conditional expression in the configuration content is parsed into a tree structure; the conditional expression includes a signal name and a judgment condition, and each signal name and its corresponding judgment condition constitute a leaf node of the tree structure.
[0075] In one embodiment of the present disclosure, the leaf nodes of the tree structure are stored using a hash map, the key of the hash map includes a signal name, the value of the hash map includes a judgment condition corresponding to the signal name and tree structure information, and the determination module 43 is specifically used to:
[0076] According to the signal name of the target signal, the hash map is queried to obtain a target hash map whose key is the signal name of the target signal; and according to the tree structure information included in the value of the target hash map, at least one tree structure associated with the target signal is determined.
[0077] In one embodiment of the present disclosure, the generation module 44 is specifically used to: for each tree structure in the at least one tree structure, judge in turn whether each leaf node of the tree structure satisfies the corresponding judgment condition; if any leaf node in the tree structure is judged to not satisfy the judgment condition, stop the judgment operation on other leaf nodes, and determine that the conditional expression corresponding to the tree structure does not satisfy the execution condition.
[0078] In one embodiment of the present disclosure, the generation module 44 is specifically used to: for each tree structure in the at least one tree structure, start from the leaf node of the tree structure to judge in turn whether each node of the tree structure meets the corresponding judgment condition, and obtain the current judgment result of each node; compare the current judgment result of the node with the historical judgment result, if the current judgment result of all child nodes of any node in the tree structure has not changed compared with the historical judgment result, then no judgment operation will be performed on any node.
[0079] The vehicle rule engine operation device provided in the embodiment of the present disclosure can execute any vehicle rule engine operation method provided in the embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. The contents not described in detail in the embodiment of the device of the present disclosure can refer to the description in any method embodiment of the present disclosure.
[0080] An embodiment of the present disclosure also provides an electronic device, which includes one or more processors and a memory.
[0081] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0082] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and a processor may run the program instructions to implement the method of the embodiments of the present disclosure above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.
[0083] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms. In addition, the input device may also include, for example, a keyboard, a mouse, etc. The output device may output various information to the outside, including determined distance information, direction information, etc. The output device may include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, etc.
[0084] Of course, for simplicity, only some of the components in the electronic device related to the present disclosure are shown, omitting components such as a bus, an input / output interface, etc. In addition, the electronic device may further include any other appropriate components according to specific application scenarios.
[0085] In addition to the above methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0086] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0087] In addition, the embodiments of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes any method provided by the embodiments of the present disclosure.
[0088] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0089] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0090] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. 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 disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A vehicle rule engine operation method, characterized in that: include: In response to receiving an input of a target signal, obtaining a judgment condition corresponding to the target signal; Determine whether the target signal satisfies the determination condition, and obtain a determination result of the determination condition; If the judgment result is that the condition is met, then at least one tree structure associated with the target signal is determined from a preset tree structure; wherein the tree structure is obtained by parsing the conditional expression; A change check is performed on the at least one tree structure in a manner of propagating toward the top level, and a judgment result of at least one conditional expression corresponding to the at least one tree structure is generated to determine whether to execute an action corresponding to the at least one conditional expression.
2. The method according to claim 1, characterized in that Before receiving the input of the target signal, it also includes: Obtaining the configuration content of the rule engine sent by the server; the configuration content includes a conditional expression; The conditional expression in the configuration content is parsed into a tree structure; the conditional expression includes a signal name and a judgment condition, and each signal name and its corresponding judgment condition constitute a leaf node of the tree structure.
3. The method according to claim 2, characterized in that The leaf nodes of the tree structure are stored using a hash map, the key of the hash map includes a signal name, the value of the hash map includes a judgment condition corresponding to the signal name and tree structure information, and determining at least one tree structure associated with the target signal from a preset tree structure includes: According to the signal name of the target signal, query the hash map to obtain a target hash map whose key is the signal name of the target signal; At least one tree structure associated with the target signal is determined according to the tree structure information included in the value of the target hash map.
4. The method according to claim 1, characterized in that The performing change check on the at least one tree structure in a top-level propagation manner includes: For each tree structure in the at least one tree structure, judging in turn whether each leaf node of the tree structure satisfies a corresponding judgment condition; If any leaf node in the tree structure is judged to not satisfy the judgment condition, the judgment operation on other leaf nodes is stopped, and it is determined that the conditional expression corresponding to the tree structure does not satisfy the execution condition.
5. The method according to claim 1, characterized in that The performing change check on the at least one tree structure in a top-level propagation manner includes: For each tree structure in the at least one tree structure, starting from the leaf node of the tree structure, sequentially judging whether each node of the tree structure satisfies a corresponding judgment condition, and obtaining a current judgment result of each node; Compare the current judgment result of the node with the historical judgment result. If the current judgment results of all child nodes of the first node in the tree structure have not changed compared with the historical judgment results, no judgment operation will be performed on the first node; the first node is any node in the tree structure.
6. A rule engine operation device for a vehicle, characterized in that: include: an acquisition module, configured to acquire a judgment condition corresponding to the target signal in response to receiving an input of the target signal; An execution module, used for judging whether the target signal satisfies the judgment condition and obtaining a judgment result of the judgment condition; A determination module, configured to determine at least one tree structure associated with the target signal from a preset tree structure if the judgment result satisfies the condition; wherein the tree structure is obtained by parsing the conditional expression; A generation module is used to perform change check on the at least one tree structure in a manner of propagating toward the top level, and generate a judgment result of at least one conditional expression corresponding to the at least one tree structure to determine whether to execute an action corresponding to the at least one conditional expression.
7. The device according to claim 6, characterized in that Also includes: A receiving module, used to obtain the configuration content of the rule engine sent by the server; the configuration content includes a conditional expression; The conditional expression in the configuration content is parsed into a tree structure; the conditional expression includes a signal name and a judgment condition, and each signal name and its corresponding judgment condition constitute a leaf node of the tree structure.
8. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the vehicle rule engine operation method described in any one of claims 1-5.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the rule engine operation method of the vehicle described in any one of claims 1-5 is implemented.
10. A vehicle, characterized in that: include: The device as claimed in claim 6, or the electronic device as claimed in claim 8.