Vehicle internal data processing method, device, vehicle and storage medium

By setting up a behavior log protocol and sequentially concatenating structured query languages ​​to create data warehouse tables, the complex issue of warehousing vehicle internal data is resolved, enabling efficient and automated processing.

CN117235072BActive Publication Date: 2025-09-30CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311223102.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-09-30
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

The process of warehousing vehicle internal data is complex and requires manual support.

Method used

Set up a behavior log protocol, including multiple fields and levels. Divide the log into primary and secondary fields based on the levels, and expand the primary fields in the usage scenario. After collecting data, convert it into structured query language and create a data warehouse table by sequentially splicing.

Benefits of technology

It simplifies the process of storing vehicle internal data, improves data processing efficiency, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235072B_ABST
    Figure CN117235072B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, automobile and storage medium for processing vehicle internal data. The method includes: setting a behavior log protocol applied to the vehicle; expanding the first-level fields in the behavior log protocol according to the usage scenario of the behavior log protocol to standardize the behavior log protocol; collecting multiple data in the usage scenario according to the standardized behavior log protocol; converting each collected data into a structured query language corresponding to each data; splicing the structured query language corresponding to each data according to the order of multiple fields in the behavior log protocol to obtain a structured query statement, and creating a data warehouse table based on the structured query statement. The above technical means can solve the problem in the prior art that the process of warehousing vehicle internal data is complicated and requires reliance on manual support.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automobile technology, and in particular to a method and device for processing vehicle internal data, a vehicle, and a storage medium. Background Art

[0002] Because there are many categories of data that need to be collected inside the car, and the log fields involved are very numerous, the collected vehicle data needs to be parsed by the ETL (Extract-Transform-Load) program and stored in the warehouse. The data warehouse table for storage needs to be manually created, and the process of storing internal vehicle data in the warehouse is complicated. Summary of the Invention

[0003] In view of this, the embodiments of the present application provide a method, device, automobile and storage medium for processing vehicle internal data to solve the problem in the prior art that the process of storing vehicle internal data in the warehouse is complicated and requires manual support.

[0004] According to a first aspect of an embodiment of the present application, a method for processing vehicle internal data is provided, comprising: setting a behavior log protocol applied to the vehicle, wherein the behavior log protocol includes multiple fields in a sequence and a level of each field, and according to the level, the fields are divided into first-level fields and second-level fields, and the first-level fields can be expanded, while the second-level fields cannot be expanded; expanding the first-level fields in the behavior log protocol according to the usage scenario of the behavior log protocol to standardize the behavior log protocol; collecting multiple data in the usage scenario according to the standardized behavior log protocol, wherein each data corresponds to a field; converting each collected data into a structured query language corresponding to each data; splicing the structured query language corresponding to each data according to the order of multiple fields in the behavior log protocol to obtain a structured query statement, and creating a data warehouse table based on the structured query statement.

[0005] According to a second aspect of an embodiment of the present application, a vehicle internal data processing device is provided, comprising: a setting module configured to set a behavior log protocol applied to the vehicle, wherein the behavior log protocol includes multiple fields in a sequence and a level of each field, and according to the level, the fields are divided into first-level fields and second-level fields, the first-level fields can be expanded, and the second-level fields cannot be expanded; a standardization module configured to expand the first-level fields in the behavior log protocol according to the usage scenario of the behavior log protocol to standardize the behavior log protocol; a collection module configured to collect multiple data in the usage scenario according to the standardized behavior log protocol, wherein each data corresponds to a field; a conversion module configured to convert each collected data into a structured query language corresponding to each data; a creation module configured to splice the structured query language corresponding to each data according to the order of multiple fields in the behavior log protocol to obtain a structured query statement, and create a data warehouse table based on the structured query statement.

[0006] According to a third aspect of an embodiment of the present application, a car is provided, comprising a memory, a vehicle controller, and a computer program stored in the memory and executable on the vehicle controller. When the vehicle controller executes the computer program, the steps of the above method are implemented.

[0007] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a vehicle controller, the steps of the above method are implemented.

[0008] The beneficial effects of the embodiments of the present application compared with the prior art include at least the following: the embodiments of the present application collect multiple data in the usage scenario based on the behavior log protocol, convert each collected data into a structured query language corresponding to each data, splice the structured query language corresponding to each data according to the behavior log protocol, obtain a structured query statement, and create a data warehouse table based on the structured query statement. Therefore, the above-mentioned technical means can solve the problem in the prior art that the process of warehousing internal vehicle data is complicated and requires reliance on manual support, thereby simplifying the process of warehousing internal vehicle data, improving the efficiency of vehicle internal data processing, and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0010] Figure 1This is a flow chart of a method for processing vehicle internal data provided by an embodiment of the present application;

[0011] Figure 2 This is a flowchart of a method for creating a data warehouse table provided in an embodiment of the present application;

[0012] Figure 3 This is a schematic structural diagram of a vehicle internal data processing device provided by an embodiment of the present application;

[0013] Figure 4 It is a structural schematic diagram of a car provided in an embodiment of the present application. DETAILED DESCRIPTION

[0014] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.

[0015] Figure 1 It is a flow chart of a method for processing vehicle internal data provided in an embodiment of the present application. Figure 1 The vehicle internal data processing method can be executed by the vehicle controller. The vehicle internal data processing method includes:

[0016] S101, setting a behavior log protocol for a vehicle, wherein the behavior log protocol includes a plurality of fields in a sequential order and a level of each field. According to the level, the fields are divided into primary fields and secondary fields. The primary fields can be expanded, while the secondary fields cannot be expanded.

[0017] S102, expanding the first-level fields in the behavior log protocol according to the usage scenario of the behavior log protocol to standardize the behavior log protocol;

[0018] S103, collecting multiple pieces of data in the usage scenario according to the standardized behavior log protocol, where each piece of data corresponds to a field;

[0019] S104, converting each piece of collected data into a structured query language corresponding to each piece of data;

[0020] S105: According to the order of multiple fields in the behavior log protocol, the structured query language corresponding to each piece of data is spliced ​​to obtain a structured query statement, and a data warehouse table is created based on the structured query statement.

[0021] The collected internal vehicle data is actually used to represent the user or vehicle's own operations or processing in a certain scenario, similar to how humans use natural language to express a meaning. When humans use natural language to express a certain meaning, they are based on fixed grammar and sentence components. Therefore, internal vehicle data can also be based on fields (fields are set up analogously to sentence components) to represent the user or vehicle's own operations in a certain scenario. For example, this application uses analogy with the subject, predicate, object, attributive, and adverbial in natural language to set subject fields, behavior fields, object fields, object-qualified fields, and behavior-qualified fields for the behavior log protocol (the protocol used to collect internal vehicle data). The subject field is equivalent to the subject, indicating the performer of the operation, which can be the user or the vehicle itself (the controller inside the vehicle); the behavior field is equivalent to the predicate, indicating information about the operation itself, which can be operations such as clicks, swipes, and favorites; the object field is equivalent to the object, indicating the party affected by the operation, which can be the name of the application, etc.; the object-qualified field is equivalent to the attributive, used to modify the qualified object field, and is detailed information about the party affected by the operation; the behavior-qualified field is equivalent to the adverbial, used to modify the qualified behavior field, and is the time and place where the operation occurred. Based on the above considerations, this application sets up a behavior log protocol containing multiple fields. Because the use of sentence components in natural language requires a fixed grammar, by analogy, multiple fields in the behavior log protocol exist in order. In addition, in order to make different types of fields correspond to different amounts of data as required, it is also necessary to divide the fields into primary fields and secondary fields according to the level. Primary fields can be expanded, while secondary fields cannot be expanded. Fields can be expanded means that there can be multiple fields of a certain type, such as multiple object-qualified fields (object-qualified fields are detailed information about the party affected by the operation. The number of object-qualified fields that can be set depends on the type of information the party affected by the operation has, and object-qualified fields can be increased). Fields cannot be expanded means that there can only be a single field of a certain type, such as the subject field (any operation has only one subject, so the subject field can only be a single field and cannot be increased).

[0022] For example, in a scenario where a user plays music, the subject field represents the user; the action field represents the user's actions, including clicks, favorites, swipes, and long presses; the object field represents the name of the music app; the object-qualified field represents the music app's page information, such as a page representing a music app with categories like hits, popular songs, classics, and classical music; and the action-qualified field represents the time the user spent on the music app. The subject field, action field, object field, and action-qualified field can be set as secondary fields, while the object-qualified field can be set as a primary field. Because detailed information about music apps often includes many categories, each object-qualified field can be used to represent information for each category.

[0023] Because the parties involved in an operation may have multiple types of information, the first-level fields in the behavior log protocol need to be expanded based on their usage scenarios. This means increasing the number of object-specific fields to correspond to various types of information, thereby collecting the most detailed information about the parties involved in the operation. This process can be referred to as standardizing the behavior log protocol. Data corresponding to each field in the behavior log protocol is collected based on the usage scenario. SQL (Structured Query Language) is the full name of the Structured Query Language. To facilitate warehousing (storing data in the corresponding data warehouse table), each piece of collected data is converted to SQL. The SQL statements corresponding to each piece of data are concatenated according to the order of the multiple fields in the behavior log protocol. For example, if a field is the fourth in the behavior log protocol, the SQL statement corresponding to the data corresponding to that field will be the fourth in the structured query statement. Because the data warehouse table is created based on the structured query statement, it effectively implements the warehousing of internal vehicle data. Because the data warehouse table can be automatically created based on the structured query statement, there is no need to manually create the data warehouse table as in the prior art.

[0024] According to the technical solution provided in the embodiment of the present application, a behavior log protocol applied to a vehicle is set, wherein the behavior log protocol includes a plurality of fields in a certain order and a level of each field, and according to the level, the fields are divided into a first-level field and a second-level field, the first-level field can be expanded, and the second-level field cannot be expanded; the first-level field in the behavior log protocol is expanded according to the usage scenario of the behavior log protocol to standardize the behavior log protocol; according to the standardized behavior log protocol, a plurality of data are collected in the usage scenario, wherein each data corresponds to a field; each collected data is converted into a structured query language corresponding to each data; according to the order of the plurality of fields in the behavior log protocol, the structured query language corresponding to each data is spliced ​​to obtain a structured query statement, and a data warehouse table is created based on the structured query statement. The above technical means can be adopted to solve the problem in the prior art that the process of warehousing internal vehicle data is complicated and needs to rely on manual support, thereby simplifying the process of warehousing internal vehicle data, improving the efficiency of vehicle internal data processing, and reducing labor costs.

[0025] Furthermore, after creating the data warehouse table based on the structured query statement, the method also includes: when a change in the behavior log protocol is detected, determining the change type and change content in the behavior log protocol by comparing the behavior log protocol before the change and the behavior log protocol after the change, wherein the change type includes addition and deletion, and the change content is the content corresponding to the change type; determining the data corresponding to the change content, and updating the data warehouse table based on the data corresponding to the change type and the change content.

[0026] Data can be re-collected in the usage scenario based on the changed behavior log protocol, the re-collected data can be converted into the corresponding structured query language, and the data warehouse table can be updated based on the re-obtained structured query language.

[0027] Furthermore, the data corresponding to the change content is determined, and the data warehouse table is updated based on the change type and the data corresponding to the change content, including: when it is detected that one or more fields are newly added to the behavior log protocol, the data corresponding to the newly added fields are collected using change data capture technology, and the data corresponding to the newly added fields are updated with the data warehouse table; when it is detected that one or more fields are deleted in the behavior log protocol, the data corresponding to the deleted fields are cleared from the data warehouse table.

[0028] Change data capture (CDC) is a technology that identifies newly added fields in the behavior log protocol and collects only the data corresponding to these newly added fields. These newly added fields can generally be considered extensions of the primary fields.

[0029] In addition to adding and deleting fields, you can also modify fields. Modifying a field means changing the information associated with a field. For example, in a music playback scenario, an object-defined field originally associated with popular songs on a music app page will now be associated with popular songs on that page. Modifying a field is equivalent to clearing the original data associated with that field in the data warehouse table and then adding the new data. Modifying a field can be considered a combination of deleting and adding fields.

[0030] Furthermore, the data corresponding to the newly added fields is used to update the data warehouse table, including: converting the data corresponding to the newly added fields into the structured query language corresponding to the newly added fields; determining the position where the structured query language corresponding to the newly added fields should be inserted into the structured query statement based on the order of the newly added fields in the behavior log protocol; and writing the structured query language corresponding to the newly added fields into the data warehouse table based on the position where the structured query language corresponding to the newly added fields should be inserted into the structured query statement.

[0031] For example, if a new field expands an existing first-level field, and the existing first-level field is the third in the behavior log protocol, the new field should be placed after the existing first-level field in the behavior log protocol. Therefore, the new field is the fourth in the behavior log protocol. The structured query language corresponding to the data corresponding to the new field should be inserted after the structured query language corresponding to the data corresponding to the existing first-level field in the structured query statement. Therefore, the structured query language corresponding to the data corresponding to the new field is also the fourth in the structured query statement. A new column is added after the third column in the data warehouse table to store the structured query language corresponding to the data corresponding to the new field.

[0032] Furthermore, collecting multiple pieces of data in a usage scenario according to the standardized behavior log protocol includes: persisting the standardized behavior log protocol to a relational database; and collecting multiple pieces of data in the usage scenario by calling the relational database.

[0033] The relational database is the RDS (Relational Database Service) database.

[0034] Furthermore, after collecting multiple data in the usage scenario according to the standardized behavior log protocol, the method also includes: uploading the collected multiple data to the cloud platform, so as to splice the multiple behavior data on the cloud platform according to the order of multiple fields in the behavior log protocol to obtain a structured query statement, and create a data warehouse table based on the structured query statement; modifying the behavior log protocol through the management platform, and updating the data warehouse table according to the changed behavior log protocol.

[0035] The cloud platform can retrieve the order of multiple fields in the behavior log protocol by calling a relational database. In addition to modifying the log protocol, including expanding the first-level fields, the management platform can also implement visualization operations for real-time monitoring.

[0036] Figure 2 This is a flow chart of a method for creating a data warehouse table provided in an embodiment of the present application. Figure 2 Shown, including:

[0037] Execute the following loop algorithm:

[0038] S201, determining whether i is greater than N, where N and i are the number and sequence number of fields in the behavior log protocol, respectively. The initial value of i is 1, and the sequence number of the field represents the order of the field in the behavior log protocol.

[0039] S202: When i is greater than N, a data warehouse table is created based on the i-th structured query statement, and the loop algorithm is exited;

[0040] S203, when i is not greater than N, collecting data corresponding to the i-th field in the usage scenario;

[0041] S204, converting the data corresponding to the i-th field into the structured query language corresponding to the i-th field;

[0042] S205 , concatenate the structured query language corresponding to the i-th field and the i-1-th structured query statement to obtain the i-th structured query statement, i+1, where the first structured query statement is the structured query language corresponding to the first field.

[0043] i plus 1 updates i with the value of i plus 1. If i is not greater than N, it means that the fields in the behavior log protocol have not been traversed yet, and the traversal should continue, that is, collecting, converting, and splicing the data corresponding to the i-th field. If i is greater than N, it means that the fields in the behavior log protocol have been traversed. At this time, the i-th structured query statement contains the structured query language of all fields in the behavior log protocol, so a data warehouse table is created based on the i-th structured query statement, and the loop algorithm exits. The first structured query statement does not need to be spliced, because the 0th structured query statement does not exist. The structured query language corresponding to the first field is used as the first structured query statement.

[0044] All of the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.

[0045] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0046] Figure 3 Schematic diagram of a vehicle internal data processing device provided by an embodiment of the present application. Figure 3 As shown, the vehicle internal data processing device includes:

[0047] A setting module 301 is configured as a setting module and is configured to set a behavior log protocol applied to the vehicle, wherein the behavior log protocol includes a plurality of fields in a sequential order and a level of each field. According to the level, the fields are divided into primary fields and secondary fields. The primary fields can be expanded, while the secondary fields cannot be expanded.

[0048] The standardization module 302 is configured to expand the first-level fields in the behavior log protocol according to the usage scenario of the behavior log protocol to standardize the behavior log protocol;

[0049] The collection module 303 is configured to collect multiple pieces of data in the usage scenario according to the standardized behavior log protocol, wherein each piece of data corresponds to a field;

[0050] The conversion module 304 is configured to convert each piece of collected data into a structured query language corresponding to each piece of data;

[0051] The creation module 305 is configured to splice the structured query language corresponding to each piece of data according to the order of multiple fields in the behavior log protocol to obtain a structured query statement, and create a data warehouse table based on the structured query statement.

[0052] According to the technical solution provided in the embodiment of the present application, a behavior log protocol applied to a vehicle is set, wherein the behavior log protocol includes a plurality of fields in a certain order and a level of each field, and according to the level, the fields are divided into a first-level field and a second-level field, the first-level field can be expanded, and the second-level field cannot be expanded; the first-level field in the behavior log protocol is expanded according to the usage scenario of the behavior log protocol to standardize the behavior log protocol; according to the standardized behavior log protocol, a plurality of data are collected in the usage scenario, wherein each data corresponds to a field; each collected data is converted into a structured query language corresponding to each data; according to the order of the plurality of fields in the behavior log protocol, the structured query language corresponding to each data is spliced ​​to obtain a structured query statement, and a data warehouse table is created based on the structured query statement. The above technical means can be adopted to solve the problem in the prior art that the process of warehousing internal vehicle data is complicated and needs to rely on manual support, thereby simplifying the process of warehousing internal vehicle data, improving the efficiency of vehicle internal data processing, and reducing labor costs.

[0053] In some embodiments, the creation module 305 is also configured to, when a change in the behavior log protocol is detected, determine the change type and change content in the behavior log protocol by comparing the behavior log protocol before the change and the behavior log protocol after the change, wherein the change type includes addition and deletion, and the change content is the content corresponding to the change type; determine the data corresponding to the change content, and update the data warehouse table based on the data corresponding to the change type and the change content.

[0054] In some embodiments, the creation module 305 is also configured to, when it is detected that one or more fields have been added to the behavior log protocol, use change data capture technology to collect data corresponding to the newly added fields, and use the data corresponding to the newly added fields to update the data warehouse table; when it is detected that one or more fields have been deleted in the behavior log protocol, clear the data corresponding to the deleted fields in the data warehouse table.

[0055] In some embodiments, the creation module 305 is also configured to convert the data corresponding to the newly added fields into the structured query language corresponding to the newly added fields; determine the position where the structured query language corresponding to the newly added fields should be inserted into the structured query statement based on the order of the newly added fields in the behavior log protocol; and write the structured query language corresponding to the newly added fields into the data warehouse table based on the position where the structured query language corresponding to the newly added fields should be inserted into the structured query statement.

[0056] In some embodiments, the collection module 303 is further configured to persist the standardized behavior log protocol into a relational database; and collect multiple pieces of data in a usage scenario by calling the relational database.

[0057] In some embodiments, the creation module 305 is also configured to upload the collected multiple data to the cloud platform, so as to splice the multiple behavior data on the cloud platform according to the order of multiple fields in the behavior log protocol, obtain a structured query statement, and create a data warehouse table based on the structured query statement; modify the behavior log protocol through the management platform, and update the data warehouse table according to the changed behavior log protocol.

[0058] In some embodiments, the creation module 305 is also configured to execute the following loop algorithm: determine whether i is greater than N, where N and i are the number and sequence number of fields in the behavior log protocol, respectively, the initial value of i is 1, and the sequence number of the field represents the order of the field in the behavior log protocol; when i is greater than N, create a data warehouse table based on the i-th structured query statement and exit the loop algorithm; when i is not greater than N, collect data corresponding to the i-th field in the usage scenario; convert the data corresponding to the i-th field into the structured query language corresponding to the i-th field; splice the structured query language corresponding to the i-th field and the i-1-th structured query statement to obtain the i-th structured query statement, i+1, where the 1st structured query statement is the structured query language corresponding to the 1st field.

[0059] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0060] Figure 4 Schematic diagram of a car 4 provided in an embodiment of the present disclosure. Figure 4 As shown, the vehicle 4 of this embodiment includes a vehicle controller 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the vehicle controller 401. When the vehicle controller 401 executes the computer program 403, the steps of the aforementioned method embodiments are implemented. Alternatively, when the vehicle controller 401 executes the computer program 403, the functions of the modules / units in the aforementioned device embodiments are implemented.

[0061] The car 4 may include but is not limited to a vehicle controller 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The vehicle 4 is merely an example and does not limit the vehicle 4 . The vehicle 4 may include more or fewer components than shown in the figure, or different components.

[0062] The vehicle controller 401 may be a VMS, which stands for vehicle management system.

[0063] Memory 402 can be an internal storage unit of vehicle 4, such as a hard drive or memory in vehicle 4. Memory 402 can also be an external storage device in vehicle 4, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Memory 402 can also include both an internal storage unit and an external storage device in vehicle 4. Memory 402 is used to store computer programs and other programs and data required by the vehicle.

[0064] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0065] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application can implement all or part of the processes in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the vehicle controller, it can implement the steps of each of the above-mentioned method embodiments. The computer program can include computer program code, which can be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.

[0066] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.

Claims

1. A method for processing vehicle internal data, characterized in that: include: Setting a behavior log protocol applied to the vehicle, wherein the behavior log protocol includes a plurality of fields in a sequential order and a level of each field, wherein the fields are divided into primary fields and secondary fields according to the level, the primary fields can be expanded, and the secondary fields cannot be expanded; Expanding the primary fields in the behavior log protocol according to the usage scenario of the behavior log protocol to standardize the behavior log protocol; Collecting multiple pieces of data in the usage scenario according to the standardized behavior log protocol, wherein each piece of data corresponds to a field; Convert each piece of collected data into the structured query language corresponding to each piece of data; According to the order of multiple fields in the behavior log protocol, the structured query language corresponding to each piece of data is spliced ​​to obtain a structured query statement, and a data warehouse table is created based on the structured query statement.

2. The method according to claim 1, characterized in that After creating a data warehouse table based on the structured query statement, the method further includes: When a change in the behavior log protocol is detected, determining the change type and change content in the behavior log protocol by comparing the behavior log protocol before the change with the behavior log protocol after the change, wherein the change type includes addition and deletion, and the change content is the content corresponding to the change type; Determine the data corresponding to the changed content, and update the data warehouse table according to the change type and the data corresponding to the changed content.

3. The method according to claim 2, characterized in that Determining data corresponding to the changed content, and updating the data warehouse table according to the change type and the data corresponding to the changed content, including: When it is detected that one or more fields are newly added to the behavior log protocol, data corresponding to the newly added fields are collected using a change data capture technology, and the data warehouse table is updated using the data corresponding to the newly added fields; When it is detected that one or more fields are deleted in the behavior log protocol, data corresponding to the deleted fields are cleared from the data warehouse table.

4. The method according to claim 3, characterized in that Updating the data warehouse table using the data corresponding to the newly added fields includes: Convert the data corresponding to the newly added fields into the structured query language corresponding to the newly added fields; Determining, based on the order of the newly added fields in the behavior log protocol, where the structured query language corresponding to the newly added fields should be inserted into the structured query statement; The structured query language corresponding to the newly added field is written into the data warehouse table according to the position where the structured query language corresponding to the newly added field should be inserted into the structured query statement.

5. The method according to claim 1, wherein According to the standardized behavior log protocol, multiple data are collected in the usage scenario, including: Persisting the standardized behavior log protocol in a relational database; A plurality of pieces of data are collected in the usage scenario by calling the relational database.

6. The method according to claim 1, characterized in that After collecting a plurality of pieces of data in the usage scenario according to the standardized behavior log protocol, the method further includes: Uploading the collected multiple data to the cloud platform, so as to splice the multiple behavior data on the cloud platform according to the order of multiple fields in the behavior log protocol to obtain a structured query statement, and creating a data warehouse table based on the structured query statement; The behavior log protocol is modified through the management platform, and the data warehouse table is updated according to the modified behavior log protocol.

7. The method according to claim 1, characterized in that After expanding the primary fields in the behavior log protocol according to the usage scenario of the behavior log protocol to standardize the behavior log protocol, the method further includes: Execute the following loop algorithm: Determine whether i is greater than N, where N and i are the number and sequence number of fields in the behavior log protocol, respectively. The initial value of i is 1, and the sequence number of a field represents the order of the field in the behavior log protocol. When i is greater than N, the data warehouse table is created based on the i-th structured query statement, and the loop algorithm is exited; When i is not greater than N, data corresponding to the i-th field is collected in the usage scenario; Convert the data corresponding to the i-th field into the structured query language corresponding to the i-th field; The structured query language corresponding to the i-th field and the i-1-th structured query statement are concatenated to obtain the i-th structured query statement, i+1, where the first structured query statement is the structured query language corresponding to the first field.

8. A vehicle internal data processing device, characterized in that: include: a setting module configured to set a behavior log protocol applied to the vehicle, wherein the behavior log protocol includes a plurality of fields in a sequential order and a level of each field, wherein the fields are divided into primary fields and secondary fields according to the level, the primary fields are expandable, and the secondary fields are not expandable; a standardization module configured to expand the primary fields in the behavior log protocol according to a usage scenario of the behavior log protocol to standardize the behavior log protocol; a collection module configured to collect a plurality of pieces of data in the usage scenario according to the standardized behavior log protocol, wherein each piece of data corresponds to a field; A conversion module is configured to convert each piece of collected data into a structured query language corresponding to each piece of data; The creation module is configured to splice the structured query language corresponding to each data in the order of multiple fields in the behavior log protocol to obtain a structured query statement, and create a data warehouse table based on the structured query statement.

9. An automobile, characterized in that: The method comprises a memory, a vehicle controller, and a computer program stored in the memory and executable on the vehicle controller, wherein the vehicle controller implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a vehicle controller, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Log structured information extraction method and apparatus

    CN105447099A

  • Log processing method and device, server and computer readable storage medium

    CN112347066A