Method and system for collecting and converting log data based on vehicle cloud
By creating a vehicle cloud field relationship configuration file in the cloud and dynamically converting the vehicle log data, the problem of inconsistency between the vehicle and cloud log fields is solved, the cost of vehicle development is reduced, and data processing efficiency and adaptability are improved.
Patent Information
- Application Number
- CN202510174234.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the existing automotive information security field, it is difficult to achieve the unification of vehicle-side log fields and cloud-side analysis fields, resulting in high cost of model development and adaptation, and it is impossible to dynamically convert vehicle-side data.
By creating a car cloud field relationship configuration file in the cloud, dynamically converting the car-side log data, and adding a correspondence between the car model and log type, the compatibility of car cloud log data is achieved.
It reduces the cost of model development and adaptation, improves data processing efficiency, realizes the adaptability of the cloud platform to different models, and reduces workload.
Smart Images

Figure CN119652984A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of vehicle log processing, and in particular relates to a method and system based on vehicle-cloud log data collection and conversion. Background Art
[0002] Intelligent connected vehicles are a combination of new-generation communication technology, sensing technology, artificial intelligence technology, big data technology and other advanced technologies. They have the typical characteristics of intelligence, networking and electrification. The development of related technologies is driving rapid changes in the global automotive industry.
[0003] There are many directions in the field of vehicle group network security, including data privacy issues, network intrusion issues, etc. The monitoring of attack behaviors in vehicle information systems must be considered in the design of intelligent vehicle security. The ability to monitor vehicle network security issues can not only help car owners maintain their vehicles, but also assist in the supervision of vehicle network security. This type of monitoring technology can detect attacks on vehicles in real time, avoid possible vehicle hijacking problems, and better maintain the safety of vehicles and owners. At the same time, with the development of vehicle intelligence and informatization, more and more related intelligent hardware devices and software will appear, which will bring convenience to people's lives while increasing the exposure of vehicles to network attacks.
[0004] At present, in the field of automobile information security, in order to collect and analyze the in-vehicle system log data of vehicles on the road, it is necessary to unify the vehicle-side log fields and the cloud-side analysis fields and complete the log data analysis on the cloud; however, the current cloud platforms for vehicle-side data collection are all processed according to the vehicle-side fields and cannot be dynamically converted, resulting in high vehicle model development and adaptation costs. Summary of the invention
[0005] In order to improve the efficiency of cloud platform for vehicle-side data collection and improve the adaptability of data processing, this paper proposes a method and system based on vehicle-cloud log data collection and conversion.
[0006] Specifically, the log data required by the cloud platform is collected, and multiple log data are packaged and sent to the cloud; log data packets are received, and the structure and fields of the log data packets are analyzed; a vehicle-cloud field relationship configuration file is created according to the vehicle-side fields, cloud-side fields and their corresponding relationships; it is determined whether the vehicle model field of the log data packet exists in the configuration file, and if not, a corresponding relationship of the vehicle model field is added to the configuration file; it is determined whether the log type of the log data packet exists in the configuration file; if not, a corresponding relationship of the log type is added to the configuration file; the cloud data adds the field of this type of log as the default field and saves the data value type under the field; the vehicle-side log data is replaced with the field name according to the field correspondence and the data value is assigned to the cloud, the cloud receives the matrix data value under the vehicle-side field, extracts and replaces it in the matrix under the cloud field; the cloud completes the conversion of the vehicle-cloud log data to generate the cloud log data, and provides it to the cloud for analysis. Although there is no unified standard and development protocol for vehicle-cloud interaction development in the industry, this conversion method can also ensure that the cloud does not need secondary development to adapt to more vehicle models. Dynamic conversion of vehicle-cloud data according to the configuration file improves data processing efficiency, achieves data compatibility only through partial data mapping, and reduces the amount of data processed.
[0007] The technical solution adopted by the present invention to solve the above technical problems is: A method for collecting and converting vehicle-to-cloud log data, the method comprising the following steps: S1. The vehicle collects the log data required by the cloud platform and packages multiple log data and sends them to the cloud; S2. The cloud receives the log data packet and analyzes the structure and fields of the log data packet; the fields include vehicle type and log type; S3, the cloud creates a vehicle-cloud field relationship configuration file according to the vehicle-side fields, the cloud-side fields and their corresponding relationships; the cloud-side fields include at least three of timestamp, vehicle identification, location information, speed, engine status, fault code, sensor data, communication information, log level, spare field, vehicle model, and log type; the vehicle-side fields include at least vehicle model and log type; S4, judging whether there is a vehicle type field of the log data packet in the configuration file, if not, adding a corresponding relationship of the vehicle type field in the configuration file; if it exists, executing step S5; the corresponding relationship of the vehicle type field is: the vehicle type field is associated with the first spare field; S5, determine whether the log type of the log data packet exists in the configuration file; if not, add a corresponding relationship of the log type in the configuration file; if it exists, execute step S6; the corresponding relationship of the log type is: the log type is associated with the second spare field; S6. Cloud data adds the fields of this type of log as default fields and saves the data value type under the fields; S7, replace the field name of the vehicle-side log data according to the field correspondence and assign the data value to the cloud, the cloud receives the matrix data value under the vehicle-side field, extracts and replaces it in the matrix under the cloud field; S8. The cloud completes the conversion of the vehicle-to-cloud log data to generate cloud-to-cloud log data, and provides it to the cloud for analysis; wherein the vehicle-to-cloud log data is the log data required by the cloud and collected by the vehicle, that is, the log data of the interaction between the vehicle and the cloud.
[0008] Furthermore, there are multiple clouds, and the vehicle side collects the log data required by the cloud platform, packages the multiple log data and sends them to multiple clouds respectively, and the multiple clouds are independent of each other.
[0009] Furthermore, the structure of the log data packet includes a timestamp and a log packet level.
[0010] Furthermore, the corresponding relationship of the newly added vehicle type field in the configuration file includes: S41, determining the name and format of the vehicle model field in the log; S42, determining the name of the first spare field and the type of information stored therein; S43. Map the vehicle model field to the first spare field.
[0011] Furthermore, the corresponding relationship of the newly added log types in the configuration file includes: S51, determining the name and format of the log type in the log; S52, determining the name of the second spare field and the maximum value of the stored data; S53, mapping the vehicle model field to the second spare field.
[0012] Furthermore, the log data in the first cloud generated based on the same vehicle-side collected log data and the log data in the second cloud are analyzed for similarity. If there are differences, the difference information is located; if the data is wrong, the data is re-extracted; if the storage type is wrong, the maximum value of the stored data is reset.
[0013] Furthermore, the similarity analysis includes: Generate data vectors from data values under multiple fields, set the log data of the first cloud as vector A=(a1, a2, ..., an); set the log data of the second cloud as vector B=(b1, b2, ..., bn); where an and bn are the data values under the nth field of the log data of the first and second clouds respectively; Calculate the cosine similarity of vectors A and B:
[0014] If S=1, it means that the two log data are the same and there is no problem in the log generation process; If S<1, it means that the cause of the fault needs to be found.
[0015] A system based on vehicle-to-cloud log data collection and conversion, the system comprising: The vehicle side is used to collect the log data required by the cloud platform, package multiple log data and send them to the cloud, replace the field names of the log data according to the field correspondence and assign the data values to the cloud; The cloud is used to receive log data packets, analyze the structure and fields of log data packets; the fields include vehicle type and log type; add the fields of a specific type of log as default fields, save the data value type under the field, receive the matrix data value under the vehicle field, extract and replace it in the matrix under the cloud field, and complete the conversion of vehicle-to-cloud log data to generate cloud log data, and provide it to other cloud-based analysis; The configuration file module is set in the cloud and is used to determine whether the vehicle type field of the log data packet exists in the configuration file, and whether the log type of the field name of the log data packet exists in the configuration file; A verification module, used for performing similarity analysis on the log data of the first cloud and the log data of the second cloud generated based on the same vehicle-side collected log data; Among them, the vehicle-cloud log data is the log data required by the cloud and collected by the vehicle side, that is, the log data of the interaction between the vehicle side and the cloud side.
[0016] The beneficial effects of the present invention are as follows: 1) Although there is no unified standard and development protocol for vehicle-cloud interaction development in the industry, this conversion method can also ensure that the cloud does not require secondary development to adapt to more car models.
[0017] 2) Dynamic conversion of vehicle-cloud data based on configuration files improves data processing efficiency, and data compatibility can be achieved through partial data mapping, reducing the amount of data to be processed. This can help R&D and operation and maintenance personnel of the vehicle-cloud interaction platform reduce their workload, lower vehicle model development and adaptation costs, and improve the adaptability of the cloud platform to different vehicle models and even different enterprise models.
[0018] 3) The accuracy of data setting is improved through multiple data verification methods.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above description and other purposes, features and advantages of the present invention more obvious and easy to understand, the preferred embodiments are specifically cited and described in detail as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings: Figure 1 It is a flow chart of the method for collecting and converting car-cloud log data; Figure 2 This is the structural diagram of the system based on vehicle-to-cloud log data collection and conversion. DETAILED DESCRIPTION
[0021] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0022] In the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be connected, detachably connected, or integrated; it can be mechanically connected or electrically connected; it can be directly connected or indirectly connected through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0023] Example 1 A method for collecting and converting vehicle-to-cloud log data, the method comprising the following steps: S1. The vehicle collects the log data required by the cloud platform and packages multiple log data and sends them to the cloud; S2. The cloud receives the log data packet and analyzes the structure and fields of the log data packet; the fields include vehicle type and log type; S3, the cloud creates a vehicle-cloud field relationship configuration file according to the vehicle-side fields, the cloud-side fields and their corresponding relationships; the cloud-side fields include at least three of timestamp, vehicle identification, location information, speed, engine status, fault code, sensor data, communication information, log level, spare field, vehicle model, and log type; the vehicle-side fields include at least vehicle model and log type; For example, the cloud preset fields include [timestamp, log level, location information, spare fields], and the spare fields can be split as needed; S4, judging whether there is a vehicle type field of the log data packet in the configuration file, if not, adding a corresponding relationship of the vehicle type field in the configuration file; if it exists, executing step S5; the corresponding relationship of the vehicle type field is: the vehicle type field is associated with the first spare field; Through judgment, if the cloud preset fields include [timestamp, log level, location information, first spare field, second spare field] and do not include the vehicle model field, then the vehicle model field is associated with the first spare field; After association: Cloud fields include [timestamp, log level, location information, first backup field (car model field), second backup field] S5, determine whether there is a log type of the log data packet field name in the configuration file; if not, add a corresponding relationship of the log type in the configuration file; if it exists, execute step S6; the corresponding relationship of the log type is: the log type is associated with the second spare field; By judging that the cloud fields include [timestamp, log level, location information, first spare field (car model field), second spare field] but do not include log type, the log type is associated with the second spare field; After association: Cloud fields include [timestamp, log level, location information, first backup field (car model field), second backup field (log type)] S6. Cloud data adds the fields of this type of log as default fields and saves the data value type under the fields; That is, select timestamp, log level, location information, first alternative field, and second alternative field as the default fields; S7, replace the field name of the vehicle-side log data according to the field correspondence and assign the data value to the cloud, the cloud receives the matrix data value under the vehicle-side field, extracts and replaces it in the matrix under the cloud field; At this time, the cloud fields include [timestamp, log level, location information, vehicle type field, log type], and replace the corresponding values under the current matrix; [Timestamp, log level, location information, vehicle type field, log type] [202408080801,01,395426.37-1162329.22,02,01] S8. The cloud completes the conversion of the vehicle-to-cloud log data to generate cloud log data, and provides it to the cloud for analysis.
[0024] Among them, the vehicle-cloud log data is the log data required by the cloud and collected by the vehicle side, that is, the log data of the interaction between the vehicle side and the cloud side.
[0025] Furthermore, there are multiple clouds, and the vehicle side collects the log data required by the cloud platform, packages the multiple log data and sends them to multiple clouds respectively, and the multiple clouds are independent of each other.
[0026] Furthermore, the structure of the log data packet includes a timestamp and a log packet level.
[0027] Furthermore, the corresponding relationship of the newly added vehicle type field in the configuration file includes: S41, determining the name and format of the vehicle model field in the log; S42, determining the name of the first spare field and the type of information stored therein; S43. Map the vehicle model field to the first spare field.
[0028] Furthermore, the corresponding relationship of the newly added log types in the configuration file includes: S51, determining the name and format of the log type in the log; S52, determining the name of the second spare field and the maximum value of the stored data; S53, mapping the vehicle model field to the second spare field.
[0029] Furthermore, the log data in the first cloud generated based on the same vehicle-side collected log data and the log data in the second cloud are analyzed for similarity. If there are differences, the difference information is located; if the data is wrong, the data is re-extracted; if the storage type is wrong, the maximum value of the stored data is reset.
[0030] Furthermore, the similarity analysis includes: Generate data vectors from data values under multiple fields, set the log data of the first cloud as vector A=(a1, a2, ..., an); set the log data of the second cloud as vector B=(b1, b2, ..., bn); where an and bn are the data values under the nth field of the log data of the first and second clouds respectively; Calculate the cosine similarity of vectors A and B:
[0031] If S=1, it means that the two log data are the same and there is no problem in the log generation process; If S<1, it means that the cause of the fault needs to be found.
[0032] Example 2 A system based on vehicle-to-cloud log data collection and conversion, the system comprising: The vehicle side is used to collect the log data required by the cloud platform, package multiple log data and send them to the cloud, replace the field names of the log data according to the field correspondence and assign the data values to the cloud; The cloud is used to receive log data packets, analyze the structure and fields of log data packets; the fields include vehicle type and log type; add the fields of a specific type of log as default fields, save the data value type under the field, receive the matrix data value under the vehicle field, extract and replace it in the matrix under the cloud field, and complete the conversion of vehicle-to-cloud log data to generate cloud log data, and provide it to other cloud-based analysis; The configuration file module is set in the cloud and is used to determine whether the vehicle type field of the log data packet exists in the configuration file, and whether the log type of the field name of the log data packet exists in the configuration file; A verification module, used for performing similarity analysis on the log data of the first cloud and the log data of the second cloud generated based on the same vehicle-side collected log data; Among them, the vehicle-cloud log data is the log data required by the cloud and collected by the vehicle side, that is, the log data of the interaction between the vehicle side and the cloud side.
[0033] The beneficial effects of the present invention are as follows: 1) Although there is no unified standard and development protocol for vehicle-cloud interaction development in the industry, this conversion method can also ensure that the cloud does not require secondary development to adapt to more car models.
[0034] 2) Dynamic conversion of vehicle-cloud data is performed according to the configuration file, which improves data processing efficiency. Data compatibility can be achieved through only partial data mapping, reducing the amount of data processing.
[0035] 3) The accuracy of data setting is improved through multiple data verification methods.
[0036] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for collecting and converting vehicle-to-cloud log data, characterized in that: The method comprises the following steps: S1. The vehicle collects the log data required by the cloud platform and packages multiple log data and sends them to the cloud; S2. The cloud receives the log data packet and analyzes the structure and fields of the log data packet; the fields include vehicle type and log type; S3, the cloud creates a vehicle-cloud field relationship configuration file according to the vehicle-side fields, the cloud-side fields and their corresponding relationships; the cloud-side fields include at least three of timestamp, vehicle identification, location information, speed, engine status, fault code, sensor data, communication information, log level, spare field, vehicle model, and log type; the vehicle-side fields include at least vehicle model and log type; S4. Determine whether the vehicle type field of the log data packet exists in the configuration file. If not, add a corresponding relationship of the vehicle type field to the configuration file; If it exists, execute step S5; the corresponding relationship of the vehicle type field is: the vehicle type field is associated with the first spare field; S5, determine whether there is a log data packet log type in the configuration file; if not, add a corresponding relationship of the log type in the configuration file; if it exists, execute step S6; the corresponding relationship of the log type is: the log type is associated with the second spare field; S6. Cloud data adds the fields of this type of log as default fields and saves the data value type under the fields; S7, replace the field name of the vehicle-side log data according to the field correspondence and assign the data value to the cloud, the cloud receives the matrix data value under the vehicle-side field, extracts and replaces it in the matrix under the cloud field; S8. The cloud completes the conversion of the vehicle-to-cloud log data to generate cloud-to-cloud log data, and provides it to the cloud for analysis; wherein the vehicle-to-cloud log data is log data required by the cloud and collected by the vehicle.
2. The method for collecting and converting vehicle-to-cloud log data according to claim 1 is characterized in that: There are multiple clouds, and the vehicle side collects the log data required by the cloud platform, packages the multiple log data and sends them to multiple clouds respectively, and the multiple clouds are independent of each other.
3. The method for collecting and converting vehicle-to-cloud log data according to claim 1 is characterized in that: The structure of the log data packet includes timestamp and log packet level.
4. The method for collecting and converting vehicle-to-cloud log data according to claim 1 is characterized in that: The corresponding relationships of the newly added vehicle model fields in the configuration file include: S41, determining the name and format of the vehicle model field in the log; S42, determining the name of the first spare field and the type of information stored therein; S43. Map the vehicle model field to the first spare field.
5. The method for collecting and converting vehicle-to-cloud log data according to claim 1 is characterized in that: The corresponding relationships of the newly added log types in the configuration file include: S51, determining the name and format of the log type in the log; S52, determining the name of the second spare field and the maximum value of the stored data; S53, mapping the vehicle model field to the second spare field.
6. The method for collecting and converting vehicle-to-cloud log data according to claim 1 is characterized in that: The log data of the first cloud generated based on the same vehicle-side collected log data and the log data of the second cloud are analyzed for similarity. If there is a difference, the difference information is located; if the data is wrong, the data is extracted again; if the storage type is wrong, the maximum value of the stored data is reset.
7. The method for collecting and converting vehicle-to-cloud log data according to claim 6 is characterized in that: Similarity analysis includes: Generate data vectors from data values under multiple fields, set the log data of the first cloud as vector A=(a1, a2, ..., an); set the log data of the second cloud as vector B=(b1, b2, ..., bn); where an and bn are the data values under the nth field of the log data of the first and second clouds respectively; Calculate the cosine similarity of vectors A and B: If S=1, it means that the two log data are the same and there is no problem in the log generation process; If S<1, it means that the cause of the fault needs to be found.
8. A system based on vehicle-to-cloud log data collection and conversion, characterized in that: The system includes: The vehicle side is used to collect the log data required by the cloud platform, package multiple log data and send them to the cloud, replace the field names of the log data according to the field correspondence and assign the data values to the cloud; The cloud is used to receive log data packets, analyze the structure and fields of log data packets; the fields include vehicle type and log type; add the fields of a specific type of log as default fields, save the data value type under the field, receive the matrix data value under the vehicle field, extract and replace it in the matrix under the cloud field, and complete the conversion of vehicle-to-cloud log data to generate cloud log data, and provide it to other cloud-based analysis; The configuration file module is set in the cloud and is used to determine whether the vehicle type field of the log data packet exists in the configuration file, and whether the log type of the field name of the log data packet exists in the configuration file; A verification module, used for performing similarity analysis on the log data of the first cloud and the log data of the second cloud generated based on the same vehicle-side collected log data; Among them, the vehicle-to-cloud log data is the log data required by the cloud and collected by the vehicle.
Citation Information
Patent Citations
Method and device for synchronizing batch data
CN106325933A
Real-time whole library synchronization method, system and device based on FlinkCDC and storage medium
CN116628090A
Data synchronization method and device, computer equipment and storage medium
CN116932642A
Data management system and method for low-code platform
CN118628031A
Workflow calling method, workbench, equipment, storage medium and product
CN118886836A