Vehicle data processing method, device, equipment and medium
By configuring rule engines and dynamic analysis rules in the vehicle, the abnormal problems of vehicle data acquisition controller caused by massive data are solved, efficient vehicle data processing and real-time monitoring are achieved, and data acquisition quality and response speed are improved.
Patent Information
- Application Number
- CN202310180883.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2043-02-28
AI Technical Summary
In the prior art, the performance of the vehicle data acquisition controller and processing controller deteriorates when facing massive data demands, resulting in system paralysis and slow operation, affecting vehicle driving safety and loss of important data, and affecting data processing efficiency through OTA configuration event engines.
Configure each event in the target vehicle, obtain the corresponding rule engine, dynamically determine the analysis rules according to the data transmission protocol type, monitor whether the event data meets the rule engine conditions, and encapsulate the event data according to the preset length and upload it, and use asynchronous task queues and thread pools to manage the data processing process.
By configuring the rule engine and parsing rules on the vehicle end, monitoring and collecting vehicle data in real time, data acquisition quality and processing efficiency are improved, and vehicle data response speed is enhanced.
Smart Images

Figure CN116107624B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software, and specifically to a vehicle data processing method, device, equipment and medium. Background Art
[0002] At present, with the continuous development of vehicle networking and high-level autonomous driving technology, automobile processors have continuously increased their requirements for data scale, accuracy, multi-mode and real-time performance. Data acquisition controllers can no longer meet data needs. Massive data collection tasks have affected the performance of vehicle-side data acquisition controllers and data processing controllers, resulting in shortened lifespans, system paralysis, and slow operation of controllers, thereby affecting vehicle driving safety and loss of important data.
[0003] In related technologies, the vehicle data collection strategy relies on an acquisition controller and a data processing controller, which increases the data processing burden and reduces the vehicle data response speed. On the other hand, the event engine is configured through OTA (Over-the-Air Technology) to collect vehicle data. However, the above vehicle data processing method seriously affects the vehicle data processing efficiency.
[0004] Application Contents
[0005] In view of the above-mentioned shortcomings of the prior art, the present application provides a vehicle data processing method, device, equipment and media product to solve the above-mentioned problem of how to improve the efficiency of vehicle data processing.
[0006] In a first aspect, the present application provides a vehicle data processing method, comprising:
[0007] Configure each event in the target vehicle and obtain a rule engine corresponding to each event;
[0008] Dynamically determine parsing rules based on the type of data transmission protocol corresponding to the event;
[0009] Dynamically analyzing each of the events based on the analysis rules to determine event data on the target vehicle;
[0010] If it is monitored that the event data corresponding to a certain event satisfies the rule engine corresponding to the event, the event data to be collected is obtained;
[0011] The event data to be collected is packaged according to a preset data length to obtain packaged data, and the packaged data is uploaded.
[0012] In one embodiment of the present application, if the event data corresponding to a certain event is monitored to satisfy a rule engine corresponding to the event, the method includes:
[0013] Determine a judgment condition required for triggering a certain event, wherein the judgment condition is composed of multiple judgment factors, and configure the logical relationship between the multiple judgment factors according to the rule engine corresponding to the event to form a conditional expression;
[0014] Based on the recursive idea, the multiple judgment factors in the conditional expression are judged one by one from the beginning to the end in the order of arrangement. If each judgment factor satisfies different engine execution conditions, it is determined that the event data corresponding to a certain event satisfies the rule engine corresponding to the event.
[0015] In one embodiment of the present application, encapsulating the event data to be collected according to a preset data length includes:
[0016] If it is determined that the event data to be collected meets the preset data length, the event data to be collected and the pre-executed business logic are encapsulated according to the preset data length to obtain a function object.
[0017] In one embodiment of the present application, before the event data to be collected is encapsulated according to the preset data length, it includes: if it is determined that the event data to be collected does not meet the preset data length, the event data to be collected is stored in the trigger event cache queue, and the current state of the trigger event is changed to re-monitoring.
[0018] In one embodiment of the present application, it also includes: placing the function object into an asynchronous task execution queue, so that the asynchronous task execution queue is executed in sequence; wherein, when it is detected that the data volume of the asynchronous task execution queue reaches a first threshold, the thread pool execution task is dynamically increased; when it is detected that the data volume of the asynchronous task execution queue does not reach a second threshold, the thread pool is put into sleep; the first threshold is much larger than the second threshold.
[0019] In one embodiment of the present application, dynamically determining a parsing rule based on the type of data transmission protocol corresponding to the event includes:
[0020] The type of the data transmission protocol includes at least one of a data serialization protocol, a lightweight data exchange format, and a structure;
[0021] If the target vehicle has no configuration requirements, the parsing rules for the event are dynamically determined according to the type of the data transmission protocol corresponding to the event.
[0022] In one embodiment of the present application, after determining the event data on the target vehicle, the method further includes:
[0023] The event data is forwarded based on a data distribution service, so that a one-to-many relationship is formed between the event data and the pre-executed business.
[0024] In a second aspect, the present application provides a vehicle data processing device, the device comprising:
[0025] A rule configuration module is used to configure each event in the target vehicle and obtain a rule engine corresponding to each event;
[0026] A rule determination module, configured to dynamically determine a parsing rule based on the type of data transmission protocol corresponding to the event;
[0027] A data analysis module dynamically analyzes each of the events based on the analysis rules to determine event data on the target vehicle;
[0028] A data collection module, configured to obtain the event data to be collected if it is detected that the event data corresponding to a certain event satisfies the rule engine corresponding to the event;
[0029] The data processing module is used to encapsulate the event data to be collected according to a preset data length, obtain encapsulated data, and upload it.
[0030] In a third aspect, the present application provides an electronic device, comprising:
[0031] one or more processors;
[0032] The storage device is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device implements the above-mentioned vehicle data processing method.
[0033] In a fourth aspect, the present application provides a computer-readable storage medium having computer-readable instructions stored thereon. When the computer-readable instructions are executed by a processor of a computer, the computer executes the above-mentioned vehicle data processing method.
[0034] The beneficial effects of the present application are as follows: on the one hand, each event in the target vehicle is configured, and the rule engine corresponding to each of the events is obtained. Different rule engines can be set according to the event type, thereby supporting a variety of vehicle data processing items and meeting the vehicle data processing requirements. Therefore, it is beneficial to improve the processing of different vehicle data. On the other hand, it solves the abnormal situation of the vehicle collection controller caused by massive data. By configuring the rule engine and parsing rules on the vehicle side, it can monitor the vehicle data in real time and collect it, which also improves the collection quality. On the other hand, by detecting the rule engine corresponding to each event to determine whether to trigger the event, the vehicle data processing efficiency and response speed are greatly improved.
[0035] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:
[0037] Figure 1 is a schematic diagram of an implementation environment of a vehicle data processing method according to an exemplary embodiment of the present application;
[0038] Figure 2 is a flow chart of a vehicle data processing method shown in an exemplary embodiment of the present application;
[0039] Figure 3 is a flow chart of recursive function execution shown in an exemplary embodiment of the present application;
[0040] Figure 4 is a logic flow chart of conditional engine design execution shown in an exemplary embodiment of the present application;
[0041] Figure 5 is a structural block diagram of a vehicle data processing device shown in an exemplary embodiment of the present application;
[0042] Figure 6 It is a structural diagram of a computer system of an electronic device shown in an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will describe the embodiments of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand the other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for the purpose of illustrating the present application and are not intended to limit the scope of protection of the present application.
[0044] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. Therefore, the illustrations only show components related to the present application and are not drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component can be changed at will, and the component layout type may also be more complicated.
[0045] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present application. However, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present application difficult to understand.
[0046] See Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an implementation environment of a vehicle data processing method according to an exemplary embodiment of the present application. Figure 1 As shown, the implementation environment application network architecture may include a server 101 (server cluster) and a vehicle-side cluster. The vehicle-side cluster may include one or more target vehicles, and the number of target vehicles is not limited here. Figure 1 As shown, it may specifically include target vehicle 10a, target vehicle 10b, target vehicle 10c, ..., target vehicle 10n. Figure 1 As shown, target vehicles 10a, 10b, 10c, ..., 10n can each be connected to the server 101 through a network connection, so that each target vehicle can exchange data with the server 101 through the network connection. The specific connection method of the network connection is not limited here, for example, the connection can be made directly or indirectly through wireless communication.
[0047] It should be understood that Figure 1 As shown, the server 101 in the embodiment of the present application can be the server corresponding to the target vehicle. The server 101 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0048] For ease of understanding, the embodiments of the present application can be Figure 1 Select one target vehicle from the multiple target vehicles shown as the processing object. For example, the embodiment of the present application can Figure 1 The target vehicle 10a shown in the figure may have a target application integrated into the center console. At this point, the target vehicle may exchange data with the server 101 via the center console.
[0049] See also Figure 2 , Figure 2 FIG1 is a flow chart of a vehicle data processing method shown in an exemplary embodiment of the present application, which is described in detail as follows:
[0050] S201, configuring each event in the target vehicle and obtaining a rule engine corresponding to each event;
[0051] Among them, the target vehicles include but are not limited to fuel vehicles, plug-in hybrid electric vehicles, pure electric vehicles, hydrogen energy vehicles, ethanol vehicles and extended-range hybrid vehicles, etc. Vehicle types include trucks, private cars, buses and tricycles, etc., which are not limited here.
[0052] It should be noted that each event in the target vehicle includes, but is not limited to, data generated by vehicle operations during driving, such as safety events, collision events, and control events. Sensors are responsible for collecting this data (including vehicle speed, driver's seatbelt status, turn signal switch status, brake pedal position, etc.). For example, event data such as speed and acceleration changes, brake pedal status, and seatbelt usage within 5 seconds before a collision can be recorded. Another example is a collision event, which includes vehicle speed, engine speed, brake switch status, longitudinal acceleration, steering wheel angle, and seatbelt usage within a few seconds.
[0053] S202, dynamically determining a parsing rule based on the type of data transmission protocol corresponding to the event;
[0054] The dynamically determining the parsing rules according to the type of the data transmission protocol corresponding to the event includes:
[0055] The type of the data transmission protocol includes at least one of a data serialization protocol, a lightweight data exchange format, and a structure;
[0056] If the target vehicle has no configuration requirements, the parsing rules for the event are dynamically determined according to the type of the data transmission protocol corresponding to the event.
[0057] Through the above method, events of different data transmission protocols can formulate corresponding parsing rules according to different data structures, so that events can be dynamically parsed.
[0058] S203, dynamically analyzing each of the events based on the analysis rules to determine event data on the target vehicle;
[0059] The data serialization protocol, Protocol Buffers, is a lightweight and efficient structured data storage format that can be used for structured data serialization and is well-suited for data storage or RPC data exchange. It provides a language-independent, platform-independent, and scalable serialized structured data format for communication protocols, data storage, and other fields.
[0060] JSON (JavaScript Object Notation) is a lightweight data exchange format. It is easy for humans to read and write, and can exchange data between multiple languages. It is also easy for machines to parse and generate. In addition, a structure is an important data type in the C language. This data type consists of a group of different data called members (or fields, or elements), where each member can have a different type. Structures are often used to represent multiple related data of different types.
[0061] For example, the use of multiple data formats (protobuf, structure, json) supports dynamic data parsing. Protobuf uses libprotobuf for dynamic parsing, the C structure can use memcpy to specify the starting position and length, and the json dynamic parsing uses the libjsoncpp library.
[0062] S204, if the event data corresponding to a certain event is monitored to satisfy the rule engine corresponding to the event, then the event data to be collected is obtained;
[0063] Specifically, if the event data corresponding to a certain event is monitored to satisfy the rule engine corresponding to the event, it includes:
[0064] Determine a judgment condition required for triggering a certain event, wherein the judgment condition is composed of multiple judgment factors, and configure the logical relationship between the multiple judgment factors according to the rule engine corresponding to the event to form a conditional expression;
[0065] Based on the recursive idea, the multiple judgment factors in the conditional expression are judged one by one from the beginning to the end in the order of arrangement. If each judgment factor satisfies different engine execution conditions, it is determined that the event data corresponding to a certain event satisfies the rule engine corresponding to the event.
[0066] See Figure 3 , which is a function recursive execution flow chart shown in an exemplary embodiment of the present application. The execution conditions of the execution event include four judgment factors A, B, C, and D. Starting from the beginning, only after the judgment factor A meets its corresponding condition, according to the recursive idea, after the judgment factor A meets the corresponding condition, it is determined whether the judgment factor B meets the condition. The judgment is made in sequence until the judgment factors A, B, and C all meet the conditions, and then it is determined whether the judgment factor D meets the conditions. If D also meets the conditions based on the previous conditions, it is determined that the event meets the engine execution conditions and can be executed.
[0067] S205: Encapsulate the event data to be collected according to a preset data length, obtain encapsulated data, and upload the encapsulated data.
[0068] The step of encapsulating the event data to be collected according to a preset data length includes:
[0069] Specifically, if it is determined that the event data to be collected meets the preset data length, the event data to be collected and the pre-executed business logic are encapsulated according to the preset data length to obtain a function object.
[0070] By encapsulating event data and pre-executed business logic into function objects, it is easier for vehicles to execute function objects, thereby improving vehicle data processing efficiency.
[0071] On the basis of the above embodiment, before encapsulating the event data to be collected according to the preset data length, the following steps are included: Figure 3 If it is determined that the event data to be collected does not meet the preset data length, the event data to be collected is stored in the trigger event cache queue, and the current state of the trigger event is changed to re-monitoring.
[0072] In this embodiment, since the event data does not reach the preset data length, it cannot be encapsulated into a function object for subsequent business execution. The collected event data can only be stored in the trigger event cache queue and monitored by re-receiving time data.
[0073] In another embodiment, it also includes: placing the function object into an asynchronous task execution queue, so that the asynchronous task execution queue is executed in sequence; wherein, when it is detected that the data volume of the asynchronous task execution queue reaches a first threshold, the thread pool execution task is dynamically increased; when it is detected that the data volume of the asynchronous task execution queue does not reach a second threshold, the thread pool is put into sleep; the first threshold is much larger than the second threshold.
[0074] Through the above method, an event is triggered when all conditions are met. In order not to affect the event judgment performance, the subsequent business logic of the event is handled by the asynchronous thread pool, which greatly improves the efficiency of vehicle data processing.
[0075] In this embodiment, on the one hand, each event in the target vehicle is configured to obtain the rule engine corresponding to each of the events. Different rule engines can be set according to the event type, thereby supporting a variety of vehicle data processing items and meeting the vehicle data processing requirements. Therefore, it is beneficial to improve the processing of different vehicle data. On the other hand, it solves the abnormal situation of the vehicle collection controller caused by massive data. By configuring the rule engine and parsing rules on the vehicle side, it can monitor the vehicle data in real time and collect it, which also improves the collection quality. On the other hand, by detecting the rule engine corresponding to each event to determine whether to trigger the event, the vehicle data processing efficiency and response speed are greatly improved.
[0076] In some other embodiments, after determining the event data on the target vehicle, the method further includes:
[0077] The event data is forwarded based on a data distribution service, so that a one-to-many relationship is formed between the event data and the pre-executed business.
[0078] In the above implementation summary, the data distribution service handles different businesses separately, making each module independent of each other and closely connected, with high scalability.
[0079] For example, you can use the data subscription method and adopt the communication protocol DDS (Direct Digital Frequency Synthesis, which is a digital synthesis technology that converts a series of digital signals into analog signals through a D / A converter). At the same time, after receiving the data, use the observer design pattern to distribute the data. The data engine needed for data distribution uses smart pointers to avoid deep copying of data, greatly reducing the resources consumed by data transfer between threads.
[0080] In this embodiment, data access is handled uniformly. Regardless of whether the communication protocol is DDS or TCP, the incoming data is simply fed into the parser for parsing. To achieve a one-to-many relationship between data and services, and to distribute the acquired data so that multiple modules can use the data, we employ the Observer design pattern for data distribution. This ensures that each service module does not interfere with the others. This design pattern also facilitates scalability: as services expand and the data source remains consistent, only one service observer needs to be added.
[0081] In specific applications, when vehicle-side requirements are uncertain, pulling down cloud-side configurations can essentially resolve this issue. Therefore, when configuration is needed to change parsing rules, dynamic parsing comes into its own. Generally speaking, the most commonly used communication data structures on the vehicle side are protobuf, JSON, and structures. Dynamic parsing of the JSON transmission format is relatively simple; the cloud side only needs to configure and send the corresponding keys to dynamically parse different JSON data. Structures are relatively fixed, so there's little room for change. However, dynamic data parsing is possible. By first understanding the data length and members of the structure, you can dynamically copy the corresponding data using the memcpy memory copy method. For Google's protobuf, Google provides libprotobuf for dynamic data encapsulation and parsing. All protobuf dynamic parsing uses the proto file (a data communication structure defined during development). To use specific data within the proto file or to add new data to the proto file, libproto can be used to dynamically encapsulate and parse the data. The specific parsing rules and code are not detailed here. When the program starts, before initializing the parser, just pull the relevant parsing configuration from the cloud.
[0082] See Figure 4 , is a logic flow chart of the conditional engine design execution shown in an exemplary embodiment of the present application; details are as follows:
[0083] Start by receiving a signal, determine whether there is a triggered event based on the received signal, and determine whether the data length reaches the preset length. If so, encapsulate the data and reset the event status; if not, continue to wait and start receiving data again.
[0084] In addition, if the signal meets the condition, then start to obtain all signals under the condition, that is, the specific judgment factor;
[0085] If all the judgment factors meet the conditions, determine the length of the event data;
[0086] If it is determined that the event data to be collected meets the preset data length, the event data to be collected and the pre-executed business logic are encapsulated according to the preset data length to obtain encapsulated data including function objects and upload them.
[0087] Since the event data does not reach the preset data length, it cannot be encapsulated into a function object for subsequent business execution. The collected event data can only be stored in the trigger event cache queue and monitored by re-receiving time data.
[0088] like Figure 5As shown, the exemplary vehicle data processing device 500 includes:
[0089] A rule configuration module 501 is used to configure each event in the target vehicle and obtain a rule engine corresponding to each event;
[0090] A rule determination module 502, configured to dynamically determine a parsing rule based on the type of data transmission protocol corresponding to the event;
[0091] A data analysis module 503 dynamically analyzes each of the events based on the analysis rules to determine event data on the target vehicle;
[0092] The data collection module 504 is configured to obtain the event data to be collected if the event data corresponding to a certain event is detected to satisfy the rule engine corresponding to the event;
[0093] The data processing module 505 is used to encapsulate the event data to be collected according to the preset data length, obtain the encapsulated data, and upload it
[0094] The beneficial effects of this exemplary vehicle data processing device are, on the one hand, that each event in the target vehicle is configured to obtain the rule engine corresponding to each of the events, and that different rule engines can be set according to the event type, thereby supporting a variety of vehicle data processing items and meeting the vehicle data processing requirements. Therefore, it is beneficial to improve the processing of different vehicle data items. On the other hand, it solves the abnormal situation of the vehicle collection controller caused by massive data. By configuring the rule engine and parsing rules on the vehicle side, it can monitor the vehicle data in real time and collect it, which also improves the collection quality. On the other hand, by detecting the rule engine corresponding to each event to determine whether to trigger the event, the vehicle data processing efficiency and response speed are greatly improved.
[0095] It should be noted that the vehicle data processing device provided in the above-described embodiments and the vehicle data processing method provided in the above-described embodiments share the same concept. The specific manner in which the various modules and units perform their operations has been described in detail in the method embodiments and will not be repeated here. In actual applications, the vehicle data processing device provided in the above-described embodiments can, as needed, allocate the aforementioned functions to different functional modules, i.e., divide the internal structure of the device into different functional modules to perform all or part of the aforementioned functions. This is not a limitation herein.
[0096] An embodiment of the present application also provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements the vehicle data processing method provided in the above-mentioned embodiments.
[0097] See also Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer system of an electronic device according to an exemplary embodiment of the present application. Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0098] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 into the random access memory (RAM) 603, such as executing the method described in the above embodiment. Various programs and data required for system operation are also stored in the RAM 603. The CPU 601, ROM 602 and RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0099] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, and the like; an output section 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 608 including a hard disk; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. Removable media 611, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 610 as needed, so that computer programs read therefrom can be installed into the storage section 608 as needed.
[0100] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 609, and / or installed from a removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the various functions defined in the system of the present application are executed.
[0101] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a 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. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0102] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The units involved in the embodiments described in this application can be implemented by software or hardware, and the units described can also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.
[0104] This application also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements the vehicle data processing method described above. The computer-readable storage medium may be included in the electronic device described in the above embodiments, or may exist independently and not be incorporated into the electronic device.
[0105] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the vehicle data processing method provided in each of the above embodiments.
[0106] The above embodiments are merely illustrative of the principles and effects of this application and are not intended to limit this application. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of this application. Therefore, any equivalent modifications or alterations accomplished by a person of ordinary skill in the art without departing from the spirit and technical concepts disclosed in this application shall be covered by the claims of this application.
Claims
1. A vehicle data processing method, characterized in that: include: Configure each event in the target vehicle and obtain a rule engine corresponding to each event; Dynamically determine parsing rules based on the type of data transmission protocol corresponding to the event; Dynamically analyzing each of the events based on the analysis rules to determine event data on the target vehicle; If the event data corresponding to a certain event is detected to satisfy the rule engine corresponding to the event, the event data to be collected is obtained; wherein, a judgment condition required for triggering a certain event is determined, the judgment condition being composed of a plurality of judgment factors, and the logical relationship between the plurality of judgment factors is configured according to the rule engine corresponding to the event to form a conditional expression; based on the recursive idea, the plurality of judgment factors in the conditional expression are judged one by one from the beginning to the end in the order of arrangement, and if each judgment factor satisfies a different engine execution condition, it is determined that the event data corresponding to the certain event satisfies the rule engine corresponding to the event; The event data to be collected is packaged according to a preset data length to obtain packaged data, and the packaged data is uploaded.
2. The method according to claim 1, characterized in that The step of encapsulating the event data to be collected according to a preset data length includes: If it is determined that the event data to be collected meets the preset data length, the event data to be collected and the pre-executed business logic are encapsulated according to the preset data length to obtain a function object.
3. The method according to claim 2, characterized in that Before encapsulating the event data to be collected according to the preset data length, it includes: if it is determined that the event data to be collected does not meet the preset data length, storing the event data to be collected in the trigger event cache queue, and changing the current state of the trigger event to re-monitoring.
4. The method according to claim 2, characterized in that Also includes: Put the function object into an asynchronous task execution queue, so that the asynchronous task execution queue is executed in sequence; wherein, when it is detected that the data volume of the asynchronous task execution queue reaches a first threshold, dynamically increase the thread pool to execute tasks; when it is detected that the data volume of the asynchronous task execution queue does not reach a second threshold, put the thread pool into hibernation; The first threshold is greater than the second threshold.
5. The method according to any one of claims 1 to 4, characterized in that: The dynamically determining the parsing rule according to the type of the data transmission protocol corresponding to the event includes: The type of the data transmission protocol includes at least one of a data serialization protocol, a lightweight data exchange format, and a structure; If the target vehicle has no configuration requirements, the parsing rules for the event are dynamically determined according to the type of the data transmission protocol corresponding to the event.
6. The method according to claim 2, characterized in that After determining the event data on the target vehicle, the method further includes: The event data is forwarded based on a data distribution service, so that a one-to-many relationship is formed between the event data and the pre-executed business.
7. A vehicle data processing device, characterized in that: The device comprises: A rule configuration module is used to configure each event in the target vehicle and obtain a rule engine corresponding to each event; A rule determination module, configured to dynamically determine a parsing rule based on the type of data transmission protocol corresponding to the event; A data analysis module dynamically analyzes each of the events based on the analysis rules to determine event data on the target vehicle; A data acquisition module is configured to acquire the event data to be collected if the event data corresponding to a certain event is detected to satisfy the rule engine corresponding to the event; wherein the judgment condition required for triggering the certain event is determined, the judgment condition being composed of a plurality of judgment factors, and the logical relationship between the plurality of judgment factors is configured according to the rule engine corresponding to the event to form a conditional expression; based on a recursive concept, the plurality of judgment factors in the conditional expression are judged one by one in the order of arrangement from the beginning to the end, and if each judgment factor satisfies a different engine execution condition, it is determined that the event data corresponding to the certain event satisfies the rule engine corresponding to the event; The data processing module is used to encapsulate the event data to be collected according to a preset data length, obtain encapsulated data, and upload it.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
ECA (Event-Condition-Action) rule based service combination method
CN104618433A
Data acquisition and transmission rule configuration method and device of vehicle terminal, server and medium
CN115529244A