TLV format data processing method and device, vehicle and medium

By obtaining the target vehicle condition in the TLV format data processing and matching its label domain, determining the data model for assembly and processing, the problem of ineffective data attribute orchestration in the prior art is solved, and the attribute orchestration of complex scenarios and TLV data processing efficiency is improved.

CN119938762APending Publication Date: 2025-05-06CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510041788.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-10
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The lack of effective arrangement of data attributes in the data processing process of existing TLV formats, resulting in cumbersome manual assembly, high error rate, low efficiency, and tools require special code logic when processing complex scenarios, which reduces program stability and processing efficiency.

Method used

By obtaining the target vehicle condition and matching its corresponding tag domain, determining the current tag length model and attribute model based on the tag domain, and then determining the data model, and assembling and processing based on the data model to obtain the TLV format vehicle condition data. This method realizes effective arrangement of complex scene attributes through modeled design, ensures the stability of program operation, and improves the processing efficiency of TLV format data.

Benefits of technology

It realizes effective arrangement of attributes of complex scenarios, ensures the stability of program operation, and greatly improves the processing efficiency of TLV format data, and meets the attribute orchestration requirements of complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938762A_ABST
    Figure CN119938762A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile data processing, and discloses a TLV format data processing method and device, a vehicle and a medium, and the method comprises the steps: carrying out the simulation of a preset function demand based on a target vehicle, obtaining a target vehicle condition, and carrying out the matching of a tag domain corresponding to the target vehicle condition; matching a corresponding current label length model from a preset label length model based on the label domains, wherein the preset label length model comprises a plurality of label domains and a length domain and data domain attribute arrangement rule corresponding to each label domain; searching a corresponding current attribute model from preset attribute models based on the current label length model, wherein the preset attribute model comprises data structures of various attributes and a data type, a value range, a data mapping relation and a data generation strategy corresponding to each attribute; and the current data model is determined based on the current label length model and the current attribute model, and assembling processing is performed based on the current data model to obtain the vehicle condition data in the TLV format, so that the TLV processing efficiency can be improved, and the program operation stability is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automobile data processing, and in particular to a method, device, vehicle and medium for processing data in a TLV format. Background Art

[0002] In the field of Internet of Vehicles, TLV (Type-Length-Value abbreviation, where Type is the data type or data tag field, Length is the data length or length field, and Value is the data value or data field) protocol is widely used in vehicle-to-cloud transmission, and can realize vehicle data transmission, remote control, positioning navigation, safety monitoring and other functions. Data transmission based on TLV format focuses on the design of data field V. The existing mainstream data field V structure can be roughly divided into two categories, flat attribute arrangement or nested attribute arrangement, that is, the bits in the data field are divided into several segments according to the rules, and each continuous bit represents an attribute. Some of these attributes identify the actual transmission value, while others are nested TLV subfield structures.

[0003] In the field of automotive testing, it is usually necessary to simulate vehicle-side responses, such as vehicle condition signals. Simulating TLV format messages usually includes manual simulation methods and generation methods using TLV tools. Among them, manual simulation is relatively complicated, and it is necessary to simulate each segment of attributes first, and then splice and arrange them before conversion. For complex vehicle condition data, this method has the defects of cumbersome manual assembly, high error rate and relatively low efficiency due to the complex attribute arrangement and numerous attribute data structures. In addition, some tools specifically used to generate TLV usually provide a graphical interface, allowing users to specify the data type, length and attribute value for splicing. This type of method is often limited by the difficulty of arranging the attributes in the data domain V, and the flat-arranged data domain V is relatively simple, but the number of attributes is not known in advance, such as the speed value of the drive motor of a new energy vehicle. The transmission of this attribute depends on the number of drive motors, so the arrangement needs to describe this dependency. In addition, the attributes are not closely arranged, and bits may need to be reserved as extended attributes, so the arrangement needs to skip this attribute; if the attributes are nested, the hierarchical structure of the subdomain will be more complicated and the above problems still exist, so this type of tool often requires special code logic to handle the above special logic, thereby reducing the stability of the program.

[0004] Based on the above problems, the related technology uses JSON format data as input, and solves the problem of variable data attributes and attribute nesting parsing in TLV format through the attribute extensibility and nested data structure of JSON format itself. However, the numerous data attributes will also increase the complexity of JSON format design, and at the same time, the dependency relationship between attributes cannot be directly described in JSON format.

[0005] In summary, as new energy vehicles become more and more intelligent, the accompanying signal types become more and more complicated, the complexity of the assembled TLV messages will also increase, and the above problems will also exist in the parsing of TLV, making it difficult to meet the attribute arrangement of complex scenarios, seriously affecting the stability of program operation and greatly reducing the processing efficiency of TLV format data. Summary of the invention

[0006] In view of this, the present invention provides a TLV format data processing method, device, vehicle and medium to solve the problem that the existing TLV format data processing process proposed in the above technical background lacks effective arrangement of data attributes, resulting in many defects and seriously affecting the data processing efficiency.

[0007] In a first aspect, the present invention provides a method for processing data in a TLV format, the method comprising:

[0008] Obtain the target vehicle condition and match the label domain corresponding to the target vehicle condition, wherein the target vehicle condition is obtained by simulating the preset functional requirements of the target vehicle;

[0009] Matching a corresponding current label length model from a preset label length model based on the label field, wherein the preset label length model includes multiple label fields and a length field and data field attribute arrangement rule corresponding to each label field;

[0010] Based on the current tag length model, a corresponding current attribute model is searched from a preset attribute model, where the preset attribute model includes a data structure of multiple attributes and a data type, a value range, a data mapping relationship, and a data generation strategy corresponding to each attribute;

[0011] The current data model is determined based on the current tag length model and the current attribute model, and assembly processing is performed based on the current data model to obtain vehicle condition data in TLV format.

[0012] The present invention simulates the preset functional requirements of the target vehicle to obtain the target vehicle condition to match its corresponding label domain, determines the current label length model and the current attribute model based on the label domain, and then determines the current data model, and assembles and processes based on the current data model to obtain the vehicle condition data in TLV format. Through modeling design, effective arrangement of complex scene attributes is achieved, which ensures the stability of program operation to a certain extent and greatly improves the processing efficiency of TLV format data.

[0013] In an optional implementation, searching for a corresponding current attribute model from a preset attribute model based on the current tag length model includes:

[0014] Find the corresponding data domain attribute based on the label domain in the current label length model;

[0015] Determine the attribute model corresponding to each data domain attribute respectively;

[0016] All attribute models constitute an attribute model set, and the attribute model set is determined as the current attribute model.

[0017] The present invention searches for corresponding data domain attributes through the tag domain in the current tag length model, and determines the corresponding current attribute model based on all data domain attributes, which can realize flexible processing of data domain attributes and meet the attribute arrangement requirements of complex scenarios.

[0018] In an optional implementation, the current data model is determined based on the current tag length model and the current attribute model, and assembly processing is performed based on the current data model to obtain vehicle condition data in TLV format, including:

[0019] Based on the data generation strategy in the current attribute model, a corresponding data model is generated, wherein the data model is used for assembling the data domain;

[0020] Arrange the data model based on the data domain attribute arrangement rule in the current label length model to generate multiple TLV messages;

[0021] Each TLV message is concatenated in sequence to obtain the vehicle condition data in TLV format.

[0022] The present invention separates the concepts of attributes and data through modeling design of TLV format data, thereby solving the problem of multiple and difficult attribute data structures. The data model is arranged according to the data domain attribute arrangement rules to obtain vehicle condition data in TLV format, which can improve the processing efficiency of TLV and ensure the stable operation of the program.

[0023] In an optional implementation, the data domain attribute arrangement rule is defined by a preset parameter expression, wherein the preset parameter expression is determined based on whether there is a dependency relationship between attributes in the data domain, and / or whether there are retained attributes, and / or whether there are nested attributes.

[0024] The data domain attribute arrangement rule of the present invention is determined according to whether there are dependencies between the attributes in the data domain, whether there are reserved attributes, and whether there are nested attributes. It can realize flexible expression of data domain attribute arrangement, which not only meets the attribute arrangement requirements of complex scenarios, but also greatly improves the processing efficiency of TLV format data.

[0025] In an optional embodiment, the data generation strategy is determined according to the preset functional requirements of the target vehicle and the data types contained in its corresponding demand data, the preset functional requirements include a variety of vehicle condition functional requirements and custom functional requirements corresponding to typical driving scenarios, and the data generation strategy includes a first generation strategy and a second generation strategy, wherein the first generation strategy is composed of at least one preset strategy defined corresponding to each vehicle condition functional requirement, and the second generation strategy is defined according to the custom functional requirement.

[0026] The data generation strategy of the present invention is determined according to the preset functional requirements of the target vehicle and the data types contained in its corresponding demand data. The automatic generation of corresponding data can be achieved by setting at least one preset strategy in advance for each vehicle condition functional requirement under a typical driving scenario. At the same time, manual adjustment of corresponding data can be achieved according to custom functional requirements. The data generation strategy definition form is more flexible, which can comprehensively cover various functional requirements corresponding to vehicle driving scenarios, and further improves the generation efficiency of TLV format data.

[0027] In an optional implementation, after obtaining the vehicle condition data in TLV format, the data processing method in TLV format further includes:

[0028] Split the vehicle condition data to obtain multiple TLV messages;

[0029] For each TLV message, parse it separately to obtain the corresponding segment parsing result;

[0030] All segment parsing results are concatenated in sequence to obtain the TLV message parsing result of the vehicle condition data.

[0031] The present invention splits the vehicle condition data, parses each TLV message separately to obtain the corresponding segment parsing result, and splices all the segment parsing results to obtain the TLV message parsing result of the vehicle condition data. This can achieve effective parsing of the TLV message, which not only ensures the stability of program operation, but also improves the processing efficiency of TLV format data.

[0032] In an optional implementation, the vehicle condition data is split to obtain multiple TLV messages, including:

[0033] The vehicle condition data is split according to the length field to obtain multiple TLV messages.

[0034] The present invention splits the vehicle condition data according to the length field, which can ensure the rationality of TLV message acquisition and further ensure the subsequent effective analysis of the TLV message.

[0035] In an optional implementation, each segment of the TLV message is parsed to obtain a corresponding segment parsing result, including:

[0036] Find the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message;

[0037] Performing an arrangement rule analysis on the target attribute arrangement rule to obtain a reorganized attribute arrangement rule;

[0038] Attribute parsing is performed according to the reorganized attribute arrangement rule and the target attribute model to obtain an attribute parsing result, and the attribute parsing result is determined as a corresponding segment parsing result.

[0039] The present invention searches for the corresponding target attribute arrangement rule and target attribute model through the label field in each TLV message segment, and performs arrangement rule analysis and attribute analysis respectively to obtain the segment analysis result corresponding to each TLV message segment, which can ensure the accuracy of the segment analysis result and further improve the data processing efficiency of the TLV format.

[0040] In an optional implementation, the target attribute arrangement rule is parsed to obtain a reorganized attribute arrangement rule, including:

[0041] Obtaining a current attribute to be parsed according to the arrangement rule, wherein the current attribute is any data domain attribute in the target attribute arrangement rule;

[0042] If the current attribute is a reserved attribute, the number of reserved bits is determined, and the current attribute is arranged based on the number of reserved bits to obtain the current reserved attribute;

[0043] If the current attribute has a dependency relationship, the dependency relationship is parsed to obtain the parsed current dependency attribute;

[0044] If the current attribute is a nested attribute, determine the corresponding nested subdomain TLV, and perform the steps of searching the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message for the nested subdomain TLV to obtain the parsed current nested attribute;

[0045] The reorganization attribute arrangement rule is determined based on the current retained attributes, and / or the current dependent attributes, and / or the current nested attributes.

[0046] The present invention performs arrangement rule analysis on any data domain attribute in the target attribute arrangement rule according to the retained attributes and / or dependency relationships and / or nested attributes, and determines the final reorganized attribute arrangement rule based on the corresponding analysis results, which can ensure the accuracy of the arrangement rule analysis and make the expression and arrangement of the data domain attributes more flexible, thus meeting the attribute arrangement requirements of complex scenarios.

[0047] In an optional implementation, attribute parsing is performed according to the reorganized attribute arrangement rule and the target attribute model to obtain an attribute parsing result, including:

[0048] Obtaining a corresponding target attribute according to the reorganized attribute arrangement rule, wherein the target attribute includes at least one data domain attribute;

[0049] The true value of the corresponding attribute is calculated based on the target attribute and the target attribute model, and the attribute parsing result is obtained based on all the true values.

[0050] The present invention obtains the corresponding target attribute by reorganizing the attribute arrangement rules, and calculates the real value of the corresponding attribute according to the target attribute model to obtain the attribute parsing result, which can ensure the authenticity and validity of the attribute parsing result and further improve the parsing accuracy and efficiency of the TLV message.

[0051] In an optional implementation, in the process of performing attribute parsing according to the reorganized attribute arrangement rule and the target attribute model, the data processing method in TLV format further includes:

[0052] Check whether there is an attribute parsing anomaly;

[0053] If it exists, obtain and record the corresponding parsing exception reason.

[0054] The present invention uses attribute parsing anomaly detection to obtain in real time the anomalies of the attribute parsing process of the reorganized attribute arrangement rules and the target attribute model, and promptly obtains the corresponding parsing anomaly cause when the parsing anomaly occurs so that relevant personnel can handle it as soon as possible, thereby ensuring the normal operation of the parsing process to a great extent.

[0055] In a second aspect, the present invention provides a data processing device in a TLV format, the device comprising:

[0056] An acquisition module is used to acquire a target vehicle condition and match a label domain corresponding to the target vehicle condition, wherein the target vehicle condition is obtained by simulating preset functional requirements of the target vehicle;

[0057] A matching module is used to match the corresponding current label length model from a preset label length model based on the label field. The preset label length model is entered and stored in advance, and includes multiple label fields, the length field corresponding to each label field, and the data field attribute arrangement rules;

[0058] A search module is used to search for the corresponding current attribute model from the preset attribute model based on the current tag length model. The preset attribute model is entered and stored in advance, and includes the data structure of multiple attributes, the data type corresponding to each attribute, the value range, the data mapping relationship and the data generation strategy;

[0059] The assembly module is used to determine the current data model based on the current label length model and the current attribute model, and perform assembly processing based on the current data model to obtain the vehicle condition data in TLV format.

[0060] The data processing device in TLV format of the present invention obtains the target vehicle condition by simulating the preset functional requirements of the target vehicle, matches the label field corresponding to the target vehicle condition, determines the current label length model and the current attribute model based on the label field, and selects the corresponding current data model for assembly processing to obtain the vehicle condition data in TLV format. The effective arrangement of complex scene attributes is realized through the modeling design of TLV, which not only ensures the stability of program operation, but also improves the processing efficiency of TLV format data.

[0061] In a third aspect, the present invention provides a vehicle, comprising a controller, the controller comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes a TLV format data processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0062] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute a TLV format data processing method according to the first aspect or any corresponding embodiment thereof.

[0063] The data processing method and device in TLV format of the present invention simulates preset functional requirements of a target vehicle to obtain a target vehicle condition, determines the corresponding label domain by matching the target vehicle condition and determines the current label length model and the current attribute model based thereon, and selects the corresponding current data model for assembly processing according to the current label length model and the current attribute model to obtain vehicle condition data in TLV format. Through the modeling design of TLV, effective arrangement of complex scene attributes is realized, the stability of program operation is guaranteed, and the processing efficiency of TLV format data is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0065] Figure 1 is a flow chart of a method for processing data in a TLV format according to an embodiment of the present invention;

[0066] Figure 2 is a flow chart of another method for processing data in TLV format according to an embodiment of the present invention;

[0067] Figure 3 It is a schematic diagram of the structure of TLV;

[0068] Figure 4 It is a schematic diagram of the design of the TLV data model;

[0069] Figure 5 It is a schematic diagram of model structure transformation;

[0070] Figure 6 It is a schematic diagram of the data domain attribute arrangement rules;

[0071] Figure 7 It is a flowchart of TLV message assembly operation;

[0072] Figure 8 It is a flowchart of the TLV message parsing logic;

[0073] Fig. 9 is a structural block diagram of a data processing device in TLV format according to an embodiment of the present invention;

[0074] Fig.10 It is a schematic diagram of the structure of a controller of a vehicle according to an embodiment of the present invention. DETAILED DESCRIPTION

[0075] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0076] An embodiment of the present invention provides an embodiment of a data processing method in a TLV format. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0077] In this embodiment, a method for processing data in TLV format is provided. Figure 1 FIG. 1 is a flow chart of a method for processing data in a TLV format according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0078] Step S101, obtaining a target vehicle condition and matching a label domain corresponding to the target vehicle condition, wherein the target vehicle condition is obtained by simulating preset functional requirements of the target vehicle.

[0079] It should be noted that the specific content of the preset functional requirements in this embodiment is not limited here, and is adaptively adjusted based on actual project needs. For example, if the preset functional requirements are vehicle data transmission function or vehicle remote control function, the target vehicle condition corresponding to the vehicle data transmission function is the overall state of the car in the data transmission scenario, wherein the specific content of the target vehicle condition and the expression method of its corresponding label domain can be adaptively set according to actual needs.

[0080] Step S102, matching the corresponding current label length model from a preset label length model based on the label field, wherein the preset label length model includes multiple label fields and a length field and data field attribute arrangement rule corresponding to each label field.

[0081] It should be noted that the preset label length model in this embodiment is a corresponding model obtained by processing the label field T and the length field L in the TLV transmission protocol into a structured format of data, wherein the label length model is also called the TL model, which is used to define labels, divide the current label length range, describe the nested relationship of data fields, and specify the data field attribute arrangement rules. Specifically, the nested relationship can be described by a special attribute reference; if there is a sub-label field in the current data field, then it is only necessary to reference the sub-label in the data field. If there is no sub-label field, it is necessary to process the arrangement relationship of the attributes in the data field. The attributes in the data field are arranged in a fixed order. When assembling data, according to the position of the attribute, the pre-prepared data model is taken out, converted into bits, and then arranged.

[0082] Step S103, searching for a corresponding current attribute model from a preset attribute model based on the current tag length model, wherein the preset attribute model includes data structures of multiple attributes and data types, value ranges, data mapping relationships and data generation strategies corresponding to each attribute.

[0083] It should be noted that the preset attribute model in this embodiment is the corresponding model obtained by processing the data field V in the TLV transmission protocol into a structured format, wherein the attribute model is also called the V model, and its function is to describe the bit position of the attribute in the data field and provide a mapping relationship for calculation, including data type, precision, offset, etc.

[0084] Step S104, determining the current data model based on the current tag length model and the current attribute model, and performing assembly processing based on the current data model to obtain vehicle condition data in TLV format.

[0085] It should be noted that in this embodiment, the current data model is also called the current D model, which is the data layer based on the current V model. According to the attribute data structure and value range defined by the current V model, the data of the D model, such as normal values, boundary values, abnormal values, etc., are generated by the specified generation strategy; at the same time, the generation strategy can also be customized to generate the data of the D model. It is the basic unit of the data domain and can be used for the subsequent assembly of the data domain to obtain the corresponding vehicle condition data.

[0086] The data processing method in the TLV format of the embodiment of the present invention simulates the preset functional requirements of the target vehicle to obtain the target vehicle condition to match its corresponding label domain, determines the current label length model and the current attribute model based on the label domain, and then determines the current data model, and assembles and processes based on the current data model to obtain the vehicle condition data in the TLV format. Through modeling design, effective arrangement of complex scene attributes is achieved, which ensures the stability of program operation to a certain extent and improves the processing efficiency of TLV format data.

[0087] In this embodiment, a method for processing data in TLV format is provided. Figure 2 FIG. 1 is a flow chart of another method for processing data in a TLV format according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0088] Step S201, obtain the target vehicle condition and match the label domain corresponding to the target vehicle condition, wherein the target vehicle condition is obtained by simulating the preset functional requirements of the target vehicle. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0089] Step S202, matching the corresponding current tag length model from a preset tag length model based on the tag field, wherein the preset tag length model includes multiple tag fields and a length field and data field attribute arrangement rule corresponding to each tag field.

[0090] It should be noted that the data domain attribute arrangement rule is an effective arrangement of complex data domain attributes, which can realize efficient assembly of the data domain, that is, starting from each attribute in the data domain, define its data structure and the bit length it occupies (such as fixed length or variable length), so as to construct attribute data that can be used for assembly; arrange such attribute data in a specified manner, that is, specify an arrangement rule for each label field, and arrange the attribute data according to the rule to obtain the message data in TLV format.

[0091] In this embodiment, the data domain attribute arrangement rule is defined by a preset parameter expression, wherein the preset parameter expression is determined based on whether there is a dependency relationship between the attributes in the data domain, and / or whether there is a reserved attribute, and / or whether there is a nested attribute. It should be explained that a dependency relationship refers to the existence of an association relationship between two or more attributes, and the association relationship of the attributes needs to be considered in the process of packaging them to achieve effective assembly; reserved attributes are also called extended attributes, and their corresponding attribute positions can be used for subsequent function expansion, which helps to improve program development efficiency; nested attributes are used to characterize that the current TLV is a nested structure containing nested subdomains, and the nested subdomains need to be packaged and parsed at the same time to ensure the processing efficiency of TLV format data.

[0092] In a specific embodiment, in order to describe the arrangement relationship of data domain attributes, three parameters are introduced, namely, attribute name, attribute number, special attribute (i.e., reserved attribute or nested attribute), and the data domain attribute arrangement rule is defined in the form of an expression. Specifically, when defining the arrangement rule, it is necessary to confirm whether the attributes in the current data domain are closely arranged, that is, whether there are reserved bits; whether there is a dependency relationship between the attributes; whether there is a nested structure, etc. In a complex scenario, if a label domain T1 contains 7 attributes, represented as T11, k1-k6, the specific arrangement rules are as follows:

[0093] 1. T11 is a sub-tag domain reference, that is, a nested attribute, which contains two attributes k11 and k12.

[0094] 2. T11 is closely aligned with other attributes.

[0095] 3. T11, k1-k6 attributes are arranged from left to right, where the number of k3 attributes is determined by the value of k2, and the number of k5 and k6 attributes is determined by the value of k4.

[0096] 4. The reserved bits are arranged behind k6. The reserved 2 bits are calculated by the number of bytes occupied by T1 and the number of bits and quantities occupied by each attribute.

[0097] Based on the above conditions, the data field attribute arrangement rule of the tag field T1 is defined as: T11, k1, k2, k3 × v2, k4, (k5 + k6) × v4, bit × 2. If v2 = 3, v4 = 2, then the above arrangement will be parsed as: k11, k12, k1, k2, k3, k3, k3, k4, k5, k6, k5, k6, bit, bit.

[0098] The data domain attribute arrangement rules in the embodiment of the present invention are determined according to whether there are dependencies between the attributes in the data domain, whether there are reserved attributes, and whether there are nested attributes. This can achieve flexible expression of the data domain attribute arrangement, which not only meets the attribute arrangement requirements of complex scenarios, but also greatly improves the processing efficiency of TLV format data.

[0099] Step S203, searching for a corresponding current attribute model from a preset attribute model based on the current tag length model, wherein the preset attribute model includes data structures of multiple attributes and data types, value ranges, data mapping relationships and data generation strategies corresponding to each attribute.

[0100] In this embodiment, the data generation strategy is determined according to the preset functional requirements of the target vehicle and the data types contained in its corresponding demand data. The preset functional requirements include a variety of vehicle condition functional requirements and custom functional requirements corresponding to typical driving scenarios. The data generation strategy includes a first generation strategy and a second generation strategy, wherein the first generation strategy is composed of at least one preset strategy defined corresponding to each vehicle condition functional requirement, and the second generation strategy is defined according to the custom functional requirement.

[0101] It should be noted that the demand data in this embodiment refers to at least one data included in the preset functional requirements of the target vehicle, and its specific content is adaptively adjusted according to the actual vehicle functional requirements. For example, for the remote control function of the vehicle, the demand data includes air-conditioning temperature, air-conditioning wind speed, window opening and closing degree, etc.; the specific content of the data type is not limited here, and is determined according to the conventional data type possessed by the functional requirement data related to the actual driving scenario, such as numeric type (such as integer data, floating-point data), character type (such as string), time type, etc.; the typical driving scenario is essentially a common driving scenario in the field of vehicle technology, such as the vehicle remote control scenario; the custom functional requirement essentially refers to the actual vehicle optimization requirement, and its specific content can be adaptively adjusted as the actual function of the vehicle increases; the first generation strategy is essentially a data automatic generation strategy with multiple preset strategies built in, wherein the specific content of the preset strategy is adaptively set according to the actual needs, such as boundary strategy, exception strategy, random strategy, etc.; the second generation strategy is essentially a custom generation strategy.

[0102] In a specific embodiment, it is assumed that the preset functional requirement of the target vehicle is a typical driving scenario, that is, the vehicle condition functional requirement corresponding to the remote air-conditioning temperature control of the vehicle, the corresponding demand data is the air-conditioning temperature, and the corresponding data type is a numerical type. It should be noted that in actual applications, different car manufacturers have different numerical setting ranges for the air-conditioning temperature. For example, the set temperature range is 17 to 33 degrees Celsius to ensure that the temperature inside the car is not too different from the external ambient temperature, thereby avoiding causing discomfort to the occupants. This is only an exemplary description and can be adaptively adjusted according to actual needs. Based on the needs generated by the above data, different temperatures are generated through corresponding temperature data generation strategies. Specifically, the corresponding multiple available temperature values ​​can be generated through the built-in preset strategy, that is, at least one of the boundary strategy, abnormal strategy and random strategy; the corresponding temperature value can also be automatically entered and generated according to custom needs.

[0103] In the embodiment of the present invention, a corresponding data generation strategy is determined according to the preset functional requirements of the target vehicle and the data type contained in its requirement data to generate the corresponding data. Specifically, the automatic generation of the corresponding data is achieved by setting at least one preset strategy in advance for each vehicle condition functional requirement under a typical driving scenario. At the same time, the manual adjustment of the corresponding data can be achieved by customizing the functional requirements. The definition form of the data generation strategy is more flexible, which can comprehensively cover various functional requirements corresponding to vehicle driving scenarios, and help to improve the generation efficiency of TLV format data.

[0104] It should be noted that the current label length model in this embodiment is the current TL model, which has multiple label domains built in, each of which contains at least one data domain attribute; the current attribute model is the current V model, which defines multiple attributes; therefore, this embodiment can obtain the corresponding data domain attribute through the label domain and determine the current attribute model based on it. Specifically, the above step S203 searches for the corresponding current attribute model from the preset attribute model based on the current label length model, including:

[0105] Step S2031, searching for corresponding data domain attributes based on the tag domain in the current tag length model.

[0106] Step S2032: determine the attribute model corresponding to each data domain attribute.

[0107] Step S2033: All attribute models are combined into an attribute model set, and the attribute model set is determined as the current attribute model.

[0108] In the embodiment of the present invention, the corresponding data domain attribute is searched through the label domain in the current label length model, and the corresponding current attribute model is determined based on all data domain attributes, which can realize flexible processing of data domain attributes and meet the attribute arrangement requirements of complex scenarios.

[0109] Step S204, determining the current data model based on the current tag length model and the current attribute model, and performing assembly processing based on the current data model to obtain vehicle condition data in TLV format.

[0110] Specifically, the above step S204 includes:

[0111] Step S2041, based on the data generation strategy in the current attribute model, generate a corresponding data model, wherein the data model is used for assembling the data domain.

[0112] In this embodiment, the current attribute model is the current V model, and a variety of data generation strategies are defined in the model. Therefore, different D models (ie, data models) can be generated according to different data generation strategies defined in the model.

[0113] Step S2042: Arrange the data model based on the data field attribute arrangement rule in the current label length model to generate multiple TLV messages.

[0114] In this embodiment, according to the arrangement rule defined in the current TL model, the data of the D model is arranged accordingly to obtain a message.

[0115] Step S2043, sequentially splicing each TLV message to obtain vehicle condition data in TLV format.

[0116] In the embodiment of the present invention, the concepts of attributes and data are separated through the modeling design of TLV format data, thereby solving the problem of multiple and difficult attribute data structures. The data model is arranged according to the data domain attribute arrangement rules to obtain the vehicle condition data in TLV format, which can improve the processing efficiency of TLV and ensure the stable operation of the program.

[0117] It should be noted that the vehicle condition data in the TLV format in this embodiment is the message data obtained after assembly, and in actual use, the message data needs to be parsed to obtain the corresponding message content, that is, the parsing result. Therefore, the data processing method in the TLV format of this embodiment also includes a message parsing process, that is, the relevant content of steps S205 to S207.

[0118] Step S205, splitting the vehicle condition data to obtain multiple TLV messages.

[0119] In practical applications, splitting and parsing message data can not only improve query performance, reduce management complexity, adapt to the growth of data volume, optimize resource utilization, ensure balanced data distribution, etc., but also meet business needs and goals to ensure data sensitivity and security, and further improve the scalability and maintainability of data after splitting.

[0120] In this embodiment, the vehicle condition data is split according to the length field to obtain multiple TLV messages. Specifically, the vehicle condition data is split according to the length field to ensure the rationality of TLV message acquisition, thereby ensuring the subsequent effective analysis of the TLV message.

[0121] Step S206: parse each TLV message segment to obtain a corresponding segment parsing result.

[0122] Specifically, the above step S206 includes:

[0123] Step S2061: searching for the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message.

[0124] Step S2062, performing arrangement rule analysis on the target attribute arrangement rule to obtain a reorganized attribute arrangement rule.

[0125] Specifically, the above step 2062 includes:

[0126] Step A1, obtaining a current attribute to be parsed according to an arrangement rule, wherein the current attribute is any data domain attribute in a target attribute arrangement rule.

[0127] In this embodiment, the specific method for obtaining the current attribute is not limited here and is determined based on conventional data acquisition means in the art.

[0128] Step A2: If the current attribute is a reserved attribute, the number of reserved bits is determined, and the current attribute is arranged based on the number of reserved bits to obtain the current reserved attribute.

[0129] Step A3: If the current attribute has a dependency relationship, the dependency relationship is parsed to obtain the parsed current dependency attribute.

[0130] Step A4: if the current attribute is a nested attribute, determine the corresponding nested subdomain TLV, and perform the steps of searching the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message for the nested subdomain TLV to obtain the parsed current nested attribute.

[0131] Step A5: determining a reorganized attribute arrangement rule based on the current retained attributes, and / or the current dependent attributes, and / or the current nested attributes.

[0132] In the embodiment of the present invention, arrangement rule parsing is performed on any data domain attribute in the target attribute arrangement rule according to the retained attributes and / or dependency relationships and / or nested attributes, and the final reorganized attribute arrangement rule is determined based on the corresponding parsing results. This can ensure the accuracy of the arrangement rule parsing and make the expression and arrangement of the data domain attributes more flexible, thereby meeting the attribute arrangement requirements of complex scenarios.

[0133] Step S2063, performing attribute parsing according to the reorganized attribute arrangement rule and the target attribute model to obtain an attribute parsing result, and determining the attribute parsing result as the corresponding segment parsing result.

[0134] Specifically, in the above step S2063, attribute parsing is performed according to the reorganized attribute arrangement rule and the target attribute model to obtain the attribute parsing result, including:

[0135] Step B1, obtaining a corresponding target attribute according to a reorganized attribute arrangement rule, wherein the target attribute includes at least one data domain attribute.

[0136] Step B2, calculating the true value of the corresponding attribute based on the target attribute and the target attribute model, and obtaining the attribute analysis result based on all the true values.

[0137] In this embodiment, since the bit position occupied by the attribute is defined in the attribute model, namely the V model, the original transmission value can be obtained through the model, and then the corresponding attribute real value can be calculated according to the data structure and value mapping relationship defined by the attribute.

[0138] In the embodiment of the present invention, the corresponding target attribute is obtained by reorganizing the attribute arrangement rules, and the real value of the corresponding attribute is calculated according to the target attribute model to obtain the attribute parsing result, which can ensure the authenticity and validity of the attribute parsing result and further improve the parsing accuracy and efficiency of the TLV message.

[0139] It should be noted that there may be exceptions in the attribute parsing process. In this embodiment, an exception detection is designed to ensure the normal operation of the TLV parsing process. Therefore, in the process of performing attribute parsing according to the reorganized attribute arrangement rules and the target attribute model, the data processing method in the TLV format of this embodiment also includes:

[0140] Step C1, detecting whether there is an attribute parsing anomaly.

[0141] In this embodiment, the specific detection method of attribute parsing anomaly is not limited here, and can be adaptively set based on actual needs. For example, whether the attribute parsing anomaly exists is determined by detecting whether the fault code generated by the anomaly exists; or the key indicators in the attribute parsing process are tracked and detected to determine whether the attribute parsing anomaly exists, which is only an exemplary description.

[0142] Step C2: if it exists, obtain and record the corresponding analysis exception reason.

[0143] In the embodiment of the present invention, attribute parsing anomaly detection is used to obtain in real time the anomalies in the attribute parsing process of the reorganized attribute arrangement rules and the target attribute model, and the corresponding parsing anomaly causes are promptly known when the parsing anomaly occurs so that relevant personnel can handle it as soon as possible, thereby ensuring the normal operation of the parsing process to a great extent.

[0144] In a specific embodiment, the parsing process of the TLV to be parsed (i.e., vehicle condition data in TLV format) includes:

[0145] 1. Get the TLV to be parsed and split it into sub-TLV tag data according to the length L.

[0146] 2. Query the arrangement rules and V model attribute sets contained in the T model of each TLV tag data segment in turn.

[0147] 3. Parse each attribute in turn according to the arrangement rules. If the current attribute is a nested attribute, query the current nested attribute arrangement rules and parse each attribute in the sub-tag domain in turn; if the current attribute is a reserved attribute, skip the current bit; if the current attribute has a dependency relationship with the previous attribute (i.e., dependency), obtain the value of the previous attribute, reorganize the current attribute arrangement, and then calculate its transmission value according to the bits occupied by the current attribute and its attribute data structure. If there is an exception during the parsing process, the current parsing exception reason can be recorded, such as the transmission value range exceeds the defined range; if there is no exception, record the parsing result of the current sub-TLV tag.

[0148] 4. Finally, summarize the parsing results of the TLV to be parsed.

[0149] In the embodiment of the present invention, the corresponding target attribute arrangement rule and target attribute model are searched through the label field in each TLV message segment, and the arrangement rule parsing and attribute parsing are performed respectively to obtain the segment parsing result corresponding to each TLV message segment, which can ensure the accuracy of the segment parsing result and further improve the data processing efficiency of the TLV format.

[0150] Step S207, sequentially concatenate all the segment parsing results to obtain the TLV message parsing result of the vehicle condition data.

[0151] In this embodiment, the TLV message parsing result can be used for further analysis of preset functional requirements corresponding to the target vehicle, such as the vehicle remote control function, and effective remote control of the target vehicle can be further achieved based on the message parsing result.

[0152] In a specific embodiment, a TLV message simulation assembly and parsing solution is provided. Figure 3The original structure model of TLV, where T is the label field of the data, L is the length field, and V is the data field. The data field attributes (i.e., V1, V2, V3, V4, etc.) are arranged according to the transmission rules, and multiple TLV messages are arranged compactly. In this embodiment, the TLV format data is modeled to separate the concepts of attributes and data, thereby solving the problem of multiple and difficult attribute data structures. Figure 4 This is a schematic diagram of the TLV data model design. Figure 4 It can be seen that in this embodiment, the label field T and the length field L are defined as the TL model, which is used to define the label type, length, and V model arrangement rules, wherein the arrangement rules describe the TLV subfield structure through nested attributes; the data field is divided into a structure layer and a data layer; the structure layer defines the attributes in the data field, namely, multiple V models; the V model defines the bit position, data type, value range, data mapping relationship (such as precision and offset) and data generation strategy of the attributes in the current data field; the D model is a data layer based on the V model, and different D models are generated according to the generation strategy defined in the V model, and then the D models are arranged according to the arrangement rules defined in the TL model to obtain a message.

[0153] It should be noted that, due to the different input data types of the models, in order to improve the processing efficiency of TLV data, a corresponding model conversion process is designed in this embodiment to achieve the unification of data formats. Figure 5 is a schematic diagram of model structure transformation, consisting of Figure 5 It can be seen that different types of input formats, such as Excel, JSON, etc., are converted into structured models and stored. This processing flow provides a standardized data foundation for subsequent message assembly and parsing.

[0154] In this embodiment, Figure 6 It is a schematic diagram of the data domain attribute arrangement rules. Figure 6 It can be seen that the calculation logic of the attribute arrangement rule of the V model is to first find the V model set (i.e., attribute set) contained in the current data domain T as the basic data for the arrangement rule calculation; then confirm the arrangement position for each attribute in the V model set in turn. The specific rules are as follows:

[0155] 1. If the current attribute is a nested attribute, directly arrange the nested attribute. In the subsequent assembly and parsing, use its arrangement rules to replace the nested attribute and reorganize the current arrangement.

[0156] 2. Determine whether the current attribute and the previous attribute are closely arranged. If not, there is a special reserved attribute. Calculate the number of reserved bits (i.e., the number of bits) between the current attribute and the previous attribute, and arrange the bit special attributes, i.e., fill in the expression, such as bit×3.

[0157] 3. Whether the current attribute depends on the previous attribute. If there is no dependency, arrange the current attribute; if there is a dependency, describe the dependency of the current attribute. This dependency is convertible and computable. For example, there are three attributes in the data domain, namely the number of drive motors attribute p1, value v1; drive motor temperature p2 and drive motor speed p3. It is defined that p1, p2 and p3 are closely arranged and the number of p2 and p3 depends on v1. Then the arrangement of the dependency can be expressed as p1, (p2+p3)×v1.

[0158] In this embodiment, Figure 7 The following is a flowchart of the TLV message assembly operation. Figure 7 It can be seen that the TL model and the V model are first structured and stored (i.e., the TL model and the V model are entered). Figure 6 Generate the corresponding data domain attribute arrangement rules. The V model has a built-in data generation strategy for automatically generating the D model as the assembled data unit. When simulating the vehicle condition data, the labels contained in the current vehicle condition are identified according to the defined simulated vehicle condition, and the label domain corresponding to the vehicle condition is selected in turn. The label domain displays all the attributes of the data domain and the corresponding D model data; select the D model data under the label domain, and the program will generate the vehicle condition, that is, the TLV message, according to the arrangement rules defined by the label; finally, each TLV message is spliced ​​to generate the vehicle condition data.

[0159] In this embodiment, Figure 8 This is a flow chart of the TLV message parsing logic. Figure 8 It can be seen that for the TLV that needs to be parsed (i.e. Figure 7 The vehicle condition data generated by assembling in the above example is first split according to the length field to obtain each TLV message (i.e., each sub-TLV). Each TLV message needs to be parsed in turn. Then, the attribute arrangement rule and attribute model of the current label field are searched and the arrangement rule is parsed. The specific parsing process is as follows:

[0160] 1. Whether the current attribute is a special attribute (i.e., reserved bit). If the attribute is a reserved bit attribute, record the number of reserved bits and arrange the current attributes according to the number.

[0161] 2. Does the current attribute have a pre-dependency? If so, you need to parse the dependency and then reorganize the arrangement rules. For example, the mathematical expression used to describe the arrangement relationship is: p1, (p2+p3)×v1, bit×2. If v1=2 is obtained after parsing, the reorganized arrangement is parsed as: p1, p2, p3, p2, p3, bit, bit.

[0162] 3. Check whether the current attribute is a nested attribute. If it is a nested attribute, there is a subdomain TLV structure. You need to obtain the label field of the subdomain and then parse the attribute arrangement rules in sequence according to the above parsing process.

[0163] After the above process is parsed, the reorganized attribute arrangement rule can be obtained. According to the arrangement rule, the attributes are taken out in turn, and the attributes are parsed according to the V model (that is, the original transmission value is obtained according to the occupied bit position defined in the V model, and then the real value is calculated according to the data structure and value mapping relationship defined by the attribute. If there is an exception in the process, the exception is recorded (that is, the cause of the exception is parsed). If there is no exception (that is, no exception), the actual value of the attribute is obtained, and then the parsing result of each attribute is obtained in turn, and finally the parsing result of each TLV segment (that is, the sub-TLV parsing result) is obtained. The sub-TLV parsing results are spliced ​​in turn to obtain the parsing result of the TLV message.

[0164] In summary, the TLV format data processing method of the embodiment of the present invention constructs TL model, V model, and D model by structuring TLV format data, defines arrangement rules according to the attributes of the data domain, and assembles and parses TLV format data in combination with the model and arrangement rules. It can achieve effective arrangement of complex scene attributes, which not only ensures the stability of program operation, but also improves the processing efficiency of TLV format data.

[0165] In the present embodiment, a data processing device in TLV format is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" refers to a combination of software and / or hardware that can implement a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0166] The present invention provides a data processing device in TLV format, such as Fig. 9 As shown, the device comprises:

[0167] The acquisition module 901 is used to acquire the target vehicle condition and match the label domain corresponding to the target vehicle condition, wherein the target vehicle condition is obtained by simulating the preset functional requirements of the target vehicle.

[0168] The matching module 902 is used to match the corresponding current label length model from the preset label length model based on the label field. The preset label length model is entered and stored in advance, and includes multiple label fields, the length field corresponding to each label field, and the data field attribute arrangement rules.

[0169] The search module 903 is used to search for the corresponding current attribute model from the preset attribute model based on the current label length model. The preset attribute model is entered and stored in advance, and includes the data structure of multiple attributes, the data type corresponding to each attribute, the value range, the data mapping relationship and the data generation strategy.

[0170] The assembly module 904 is used to determine the current data model based on the current tag length model and the current attribute model, and perform assembly processing based on the current data model to obtain the vehicle condition data in TLV format.

[0171] In some optional embodiments, the matching module 902 includes: a definition submodule, used to illustrate that the data domain attribute arrangement rule is defined by a preset parameter expression, wherein the preset parameter expression is determined based on whether there is a dependency relationship between the attributes in the data domain, and / or whether there are retained attributes, and / or whether there are nested attributes.

[0172] In some optional embodiments, the search module 903 includes: a first search submodule, a second search submodule and a third search submodule; wherein the first search submodule is used to search for corresponding data domain attributes based on the label domain in the current label length model; the second search submodule is used to respectively determine the attribute model corresponding to each data domain attribute; the third search submodule is used to form an attribute model set from all attribute models, and determine the attribute model set as the current attribute model.

[0173] In some optional embodiments, the search module 903 also includes: a generation submodule, which is used to illustrate that the data generation strategy is determined according to the preset functional requirements of the target vehicle and the data type contained in the corresponding requirement data, the preset functional requirements include a variety of vehicle condition functional requirements and custom functional requirements corresponding to typical driving scenarios, and the data generation strategy includes a first generation strategy and a second generation strategy, wherein the first generation strategy is composed of at least one preset strategy defined corresponding to each vehicle condition functional requirement, and the second generation strategy is defined according to the custom functional requirement.

[0174] In some optional embodiments, the assembly module 904 includes: a first assembly sub-module, a second assembly sub-module and a third assembly sub-module; wherein the first assembly sub-module is used to generate a corresponding data model based on the data generation strategy in the current attribute model, wherein the data model is used for assembling the data domain; the second assembly sub-module is used to arrange the data model based on the data domain attribute arrangement rule in the current label length model to generate multiple TLV messages; the third assembly sub-module is used to splice each TLV message in turn to obtain vehicle condition data in TLV format.

[0175] In some optional embodiments, the device also includes: a splitting module, a parsing module and a splicing module; wherein the splitting module is used to split the vehicle condition data to obtain multiple TLV messages; the parsing module is used to parse each TLV message separately to obtain the corresponding segment parsing result; the splicing module is used to splice all the segment parsing results in sequence to obtain the TLV message parsing result of the vehicle condition data.

[0176] In some optional implementations, the splitting module includes: a splitting submodule, which is used to split according to the length field in the vehicle condition data to obtain multiple TLV messages.

[0177] In some optional embodiments, the parsing module includes: a first parsing submodule, a second parsing submodule and a third parsing submodule; wherein the first parsing submodule is used to search for the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message segment; the second parsing submodule is used to perform arrangement rule parsing on the target attribute arrangement rule to obtain a reorganized attribute arrangement rule; the third parsing submodule is used to perform attribute parsing according to the reorganized attribute arrangement rule and the target attribute model to obtain an attribute parsing result, and determine the attribute parsing result as the corresponding segment parsing result.

[0178] In some optional embodiments, the second parsing submodule includes: a first parsing unit, a second parsing unit, a third parsing unit, a fourth parsing unit and a fifth parsing unit; wherein the first parsing unit is used to obtain the current attribute to be parsed by the arrangement rule, wherein the current attribute is any data domain attribute in the target attribute arrangement rule; the second parsing unit is used to determine the number of reserved bits if the current attribute is a reserved attribute, and arrange the current attribute based on the number of reserved bits to obtain the current reserved attribute; the third parsing unit is used to parse the dependency if the current attribute has a dependency relationship to obtain the parsed current dependent attribute; the fourth parsing unit is used to determine the corresponding nested subdomain TLV if the current attribute is a nested attribute, and perform the step of searching the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message for the nested subdomain TLV to obtain the parsed current nested attribute; the fifth parsing unit is used to determine the reorganized attribute arrangement rule based on the current reserved attribute, and / or the current dependent attribute, and / or the current nested attribute.

[0179] In some optional embodiments, the third parsing submodule includes: a first calculation unit and a second calculation unit; wherein the first calculation unit is used to obtain the corresponding target attribute according to the reorganization attribute arrangement rule, wherein the target attribute includes at least one data domain attribute; the second calculation unit is used to calculate the true value of the corresponding attribute based on the target attribute and the target attribute model, and obtain the attribute parsing result based on all the true values.

[0180] In some optional embodiments, the third parsing submodule further includes: a first detection unit and a second detection unit; wherein the first detection unit is used to detect whether there is an attribute parsing anomaly; and the second detection unit is used to obtain and record the corresponding parsing anomaly cause if so.

[0181] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0182] The data processing device in the TLV format in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0183] The TLV format data processing device of the embodiment of the present invention realizes the effective arrangement of complex scene attributes through the modeling design of TLV, ensures the stability of program operation, and improves the processing efficiency of TLV format data.

[0184] A vehicle is also provided in an embodiment of the present invention, and the vehicle includes a controller. The controller in this embodiment is a vehicle controller, which is used to perform operations such as power supply / power off, sleep and wake up of the sub-controllers and network nodes under it, and each power supply interface thereof can collect the real-time current output. Other controllers with the above functions are applicable.

[0185] Fig.10 is a schematic diagram of the structure of the controller provided in an optional embodiment of the present invention, such as Fig.10 As shown, the controller includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the controller, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple controllers can be connected, and each controller provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig.10 A processor 10 is taken as an example.

[0186] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0187] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0188] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the controller, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0189] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0190] The controller also includes a communication interface 30 for the main control chip to communicate with other devices or a communication network.

[0191] A computer-readable storage medium is also provided in an embodiment of the present invention. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor main control chip or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0192] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for processing data in TLV format, characterized in that: The method comprises: Obtaining a target vehicle condition and matching a label domain corresponding to the target vehicle condition, wherein the target vehicle condition is obtained by simulating a preset functional requirement of the target vehicle; Matching a corresponding current label length model from a preset label length model based on the label field, wherein the preset label length model includes multiple label fields and a length field and data field attribute arrangement rule corresponding to each label field; Based on the current tag length model, searching for a corresponding current attribute model from a preset attribute model, wherein the preset attribute model includes a data structure of multiple attributes and a data type, a value range, a data mapping relationship and a data generation strategy corresponding to each attribute; A current data model is determined based on the current tag length model and the current attribute model, and assembly processing is performed based on the current data model to obtain vehicle condition data in a TLV format.

2. The method for processing data in TLV format according to claim 1, characterized in that: The searching a corresponding current attribute model from a preset attribute model based on the current tag length model includes: Searching for a corresponding data domain attribute based on the label domain in the current label length model; Determine the attribute model corresponding to each data domain attribute respectively; All attribute models constitute an attribute model set, and the attribute model set is determined as the current attribute model.

3. The method for processing data in TLV format according to claim 2, characterized in that: The determining of the current data model based on the current tag length model and the current attribute model, and performing assembly processing based on the current data model to obtain vehicle condition data in TLV format includes: Based on the data generation strategy in the current attribute model, a corresponding data model is generated, wherein the data model is used for assembling the data domain; Arrange the data model based on the data domain attribute arrangement rule in the current label length model to generate multiple TLV messages; Each TLV message is concatenated in sequence to obtain the vehicle condition data in TLV format.

4. The method for processing data in TLV format according to claim 1, characterized in that: The data domain attribute arrangement rule is defined by a preset parameter expression, wherein the preset parameter expression is determined based on whether there is a dependency relationship between attributes in the data domain, and / or whether there are reserved attributes, and / or whether there are nested attributes.

5. The method for processing data in TLV format according to claim 1, characterized in that: The data generation strategy is determined according to the preset functional requirements of the target vehicle and the data types contained in its corresponding requirement data. The preset functional requirements include a variety of vehicle condition functional requirements and custom functional requirements corresponding to typical driving scenarios. The data generation strategy includes a first generation strategy and a second generation strategy, wherein the first generation strategy is composed of at least one preset strategy defined corresponding to each vehicle condition functional requirement, and the second generation strategy is defined according to the custom functional requirements.

6. The method for processing data in TLV format according to any one of claims 1 to 5, characterized in that: After obtaining the vehicle condition data in TLV format, the method further includes: Splitting the vehicle condition data to obtain multiple TLV messages; For each TLV message, parse it separately to obtain the corresponding segment parsing result; All the segment parsing results are concatenated in sequence to obtain the TLV message parsing result of the vehicle condition data.

7. The method for processing data in TLV format according to claim 6, characterized in that: The splitting of the vehicle condition data to obtain multiple segments of TLV messages includes: The vehicle condition data is split according to the length field to obtain multiple TLV messages.

8. The method for processing data in TLV format according to claim 6, characterized in that: The step of parsing each TLV message segment to obtain a corresponding segment parsing result includes: Find the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message; Performing an arrangement rule analysis on the target attribute arrangement rule to obtain a reorganized attribute arrangement rule; Attribute parsing is performed according to the reorganized attribute arrangement rule and the target attribute model to obtain an attribute parsing result, and the attribute parsing result is determined as a corresponding segment parsing result.

9. The method for processing data in TLV format according to claim 8, characterized in that: The step of performing arrangement rule analysis on the target attribute arrangement rule to obtain a reorganized attribute arrangement rule includes: Acquire a current attribute to be parsed according to the arrangement rule, wherein the current attribute is any data domain attribute in the target attribute arrangement rule; If the current attribute is a reserved attribute, determining the number of reserved bits, and arranging the current attribute based on the number of reserved bits to obtain the current reserved attribute; If the current attribute has a dependency relationship, the dependency relationship is parsed to obtain the parsed current dependency attribute; If the current attribute is a nested attribute, determine the corresponding nested subdomain TLV, and perform the steps of searching the corresponding target attribute arrangement rule and target attribute model according to the label field in each TLV message for the nested subdomain TLV to obtain the parsed current nested attribute; A reorganization attribute arrangement rule is determined based on the current reserved attribute, and / or the current dependent attribute, and / or the current nested attribute.

10. The method for processing data in TLV format according to claim 8, characterized in that: The performing attribute parsing according to the reorganized attribute arrangement rule and the target attribute model to obtain an attribute parsing result includes: Acquire a corresponding target attribute according to the reorganized attribute arrangement rule, wherein the target attribute includes at least one data domain attribute; The real value of the corresponding attribute is calculated based on the target attribute and the target attribute model, and the attribute parsing result is obtained based on all the real values.

11. The method for processing data in TLV format according to claim 8, characterized in that: In the process of performing attribute parsing according to the reorganized attribute arrangement rule and the target attribute model, the method further includes: Check whether there is an attribute parsing anomaly; If it exists, obtain and record the corresponding parsing exception reason.

12. A data processing device in TLV format, characterized in that: The device comprises: An acquisition module, used to acquire a target vehicle condition and match a label domain corresponding to the target vehicle condition, wherein the target vehicle condition is obtained by simulating a preset functional requirement of the target vehicle; A matching module, used for matching a corresponding current label length model from a preset label length model based on the label field, wherein the preset label length model is entered and stored in advance, and includes multiple label fields, a length field corresponding to each label field, and a data field attribute arrangement rule; A search module, used to search for a corresponding current attribute model from a preset attribute model based on the current tag length model, wherein the preset attribute model is pre-entered and stored, and includes a data structure of multiple attributes, a data type corresponding to each attribute, a value range, a data mapping relationship, and a data generation strategy; An assembling module is used to determine a current data model based on the current tag length model and the current attribute model, and perform assembly processing based on the current data model to obtain vehicle condition data in TLV format.

13. A vehicle, characterized in that: The vehicle includes a controller, which includes: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the TLV format data processing method described in any one of claims 1 to 11 by executing the computer instructions.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the TLV format data processing method according to any one of claims 1 to 11.