Vehicle communication data conversion methods and related equipment
By parsing the communication matrix to generate configuration data, the automated bidirectional conversion of vehicle communication data is realized, which solves the problems of low efficiency and low reusability caused by manually writing interface mappings in the existing technology, and improves the automation and consistency of data processing.
Patent Information
- Application Number
- CN202611291310.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-25
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, vehicle communication data conversion relies on manually written communication interface mapping programs, resulting in low automation, poor reusability, and low processing efficiency, making it difficult to achieve accuracy and consistency in communication data processing.
By parsing the communication matrix to generate configuration data, an automated bidirectional conversion between vehicle communication message payload and physical signal value is realized, generating first configuration information describing the binding relationship between service methods and parameter data types, and second configuration information describing the composition structure of each data type.
It improves the automation and applicability of communication data processing, reduces reliance on manual coding, and ensures consistency and efficiency in data processing under different communication definition scenarios.
Smart Images

Figure CN123123432A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle communication technology, and more specifically, to a vehicle communication data conversion method and related equipment. Background Technology
[0002] With the rapid development of automotive intelligence and connectivity technologies, the functional complexity of in-vehicle electronic systems is constantly increasing, leading to a growing demand for data interaction between various Electronic Control Units (ECUs). Service-oriented in-vehicle communication architectures, due to their flexibility, efficiency, and scalability, are widely used in in-vehicle Ethernet communication systems. In such systems, the communication matrix, as a crucial technical document describing service interfaces, data types, and communication behaviors, carries the data interaction rules between different ECUs and is a fundamental basis for realizing in-vehicle communication data transmission and parsing. Therefore, efficient and accurate data conversion processing of the communication matrix is of great significance for ensuring the development, testing, and operation of in-vehicle communication systems.
[0003] In related technologies, the conversion of vehicle communication data typically relies on manual coding of communication interface mapping programs and message packet assembly and parsing logic based on the communication matrix content. Since the communication matrix is usually stored in tabular form, developers need to manually extract relevant information and convert it into a data structure recognizable by the program. When the communication matrix content changes or is applied to different vehicle models, the conversion code often needs to be modified, resulting in a large workload for development and maintenance. This makes it difficult to achieve unified reuse of communication data processing logic and is prone to introducing errors during the manual conversion process, affecting the accuracy and consistency of communication data processing. In other words, related technologies suffer from low automation, poor reusability, and low processing efficiency in vehicle communication data conversion. Summary of the Invention
[0004] In the summary section of this application, the relevant technical solutions are described in general terms, and a series of simplified concepts are introduced. These concepts will be further elaborated in the detailed embodiments section. This summary section should not be construed as limiting the key or essential technical features of the claimed solutions, nor is it intended to limit the scope of protection of the claimed solutions.
[0005] The vehicle communication data conversion method and related equipment provided in this application can generate configuration data by parsing the communication matrix, and realize the automatic bidirectional conversion between vehicle communication message payload and physical signal value based on the configuration data. This enables the configuration and automation of communication data processing, improving the efficiency and applicability of communication data processing.
[0006] In a first aspect, this application provides a method for converting vehicle-mounted communication data, comprising: acquiring a target communication matrix file; parsing the target communication matrix file to obtain first configuration information and second configuration information, wherein the first configuration information describes the binding relationship between a service method and parameter data types, and the second configuration information describes the composition structure of each data type; responding to a first processing request, based on the first configuration information and the second configuration information, converting a first target service method identifier and a first physical signal value set carried in the first processing request into a first message payload byte sequence; and responding to a second processing request, based on the first configuration information and the second configuration information, converting a second target service method identifier and a second message payload byte sequence carried in the second processing request into a second physical signal value set.
[0007] In some implementations, the step of parsing to obtain the first configuration information includes: extracting service interface records from a first preset worksheet of the target communication matrix file, wherein the service interface records include service identifier, method event identifier, request response type, and parameter definition fields; converting the service interface records into a first tree structure data with services as root nodes and method events as child nodes to obtain the first configuration information, wherein each method event node in the first tree structure data is associated with a corresponding parameter data type name.
[0008] In some implementations, the step of parsing to obtain the second configuration information includes: extracting data type records from a second preset worksheet of the target communication matrix file, wherein the data type records include data type name, data type category, and member definition information; recursively constructing a second tree structure data based on the data type category to obtain the second configuration information, wherein when the data type category is a structure type or an array type, the members of the data type category are nested and parsed to generate corresponding subtree nodes.
[0009] In some implementations, the step of converting the first target service method identifier and the first physical signal value set carried in the first processing request into a first message payload byte sequence based on the first configuration information and the second configuration information includes: determining the corresponding first target data type from the first configuration information according to the first target service method identifier; obtaining the corresponding first target data type tree definition from the second configuration information according to the first target data type; recursively expanding the first target data type tree definition to obtain a first linear signal list, wherein each leaf node in the first linear signal list records the member position, data type category, and basic type respectively; traversing the first linear signal list to obtain the first physical signal value corresponding to the current leaf node from the first physical signal value set; determining the bus value of the current leaf node according to the first physical signal value and the data type category; generating the byte sequence of the current leaf node based on the bus value and the basic type; and concatenating all byte sequences according to the member positions of each leaf node to obtain the first message payload byte sequence.
[0010] In some implementations, determining the bus value of the current leaf node based on the first physical signal value and the data type category includes: when the data type category is an integer type or a floating-point type, obtaining the preset resolution and preset offset corresponding to the current leaf node in the second configuration information; performing a linear transformation and rounding based on the first physical signal value, the preset resolution, and the preset offset to obtain the bus value; when the data type category is an enumeration type, converting the first physical signal value into a corresponding integer value based on the preset discrete value mapping relationship corresponding to the current leaf node in the second configuration information to obtain the bus value.
[0011] In some implementations, generating the byte sequence of the current leaf node based on the bus value and the base type includes: when the base type is a string type and the length mode is fixed length, encoding the first physical signal value according to a preset fixed length and filling it with a terminator to obtain the byte sequence; when the length mode of the string type is dynamic length, generating a first length header byte sequence and a content byte sequence; concatenating the first length header byte sequence with the content byte sequence to obtain the byte sequence, wherein the first length header byte sequence is used to indicate the byte length of the content byte sequence; when the data type is an array type and the length mode is fixed length, repeatedly generating the byte sequence of the array members until the fixed length is reached; when the length mode of the array type is dynamic length, generating a second length header byte sequence; concatenating the second length header byte sequence with the byte sequences of each array member to obtain the byte sequence, wherein the second length header byte sequence is used to indicate the number of array members.
[0012] In some implementations, the step of converting the second target service method identifier and the second message payload byte sequence carried in the second processing request into a second physical signal value set based on the first configuration information and the second configuration information includes: determining the corresponding second target data type from the first configuration information according to the second target service method identifier; obtaining the corresponding second target data type tree definition from the second configuration information according to the second target data type; recursively expanding the second target data type tree definition to obtain a second linear signal list, wherein each leaf node in the second linear signal list records the member position, data type category, and basic type respectively; extracting byte segments corresponding to each leaf node sequentially from the second message payload byte sequence according to the order of each leaf node in the second linear signal list; for each leaf node, restoring the physical value of the extracted byte segment according to the data type category and basic type of the leaf node to obtain the physical value of the leaf node; and combining the signal names of all leaf nodes and their corresponding physical values to obtain the second physical signal value set.
[0013] In some implementations, the step of restoring the physical value of the extracted byte segment based on the data type category and base type of the leaf node includes: when the data type category is an integer type or a floating-point type, obtaining the preset resolution and preset offset corresponding to the leaf node in the second configuration information, and converting the extracted byte segment into an integer bus value in big-endian order; restoring the physical value based on the integer bus value, the preset resolution, and the preset offset; when the data type category is an enumeration type, after converting the extracted byte segment into a target integer, searching for an enumeration name matching the target integer in the second configuration information to obtain the physical value; when the base type is a string type and long... When the length mode is fixed length, the extracted byte segments are read and decoded according to a preset fixed length to obtain the physical value; when the length mode of the string type is dynamic length, a first length header is read from the extracted byte segments to determine the content byte length; the content byte segments are read and decoded according to the content byte length to obtain the physical value; when the data type is array type and the length mode is fixed length, the extracted byte segments are read cyclically according to the fixed length; the physical value is restored for each array member; when the length mode of the array type is dynamic length, a second length header is read from the extracted byte segments to determine the number of members; the physical value is restored for each array member sequentially according to the number of members.
[0014] Secondly, this application also provides a vehicle-mounted communication data conversion device, comprising: a file acquisition unit for acquiring a target communication matrix file; a file parsing unit for parsing the target communication matrix file to obtain first configuration information and second configuration information, wherein the first configuration information describes the binding relationship between service methods and parameter data types, and the second configuration information describes the composition structure of each data type; a first processing unit for responding to a first processing request and, based on the first configuration information and the second configuration information, converting a first target service method identifier and a first physical signal value set carried in the first processing request into a first message payload byte sequence; and a second processing unit for responding to a second processing request and, based on the first configuration information and the second configuration information, converting a second target service method identifier and a second message payload byte sequence carried in the second processing request into a second physical signal value set.
[0015] Thirdly, this application also provides a vehicle, including: a memory and a processor, the processor being configured to execute a computer program stored in the memory to implement the steps of the vehicle communication data conversion method described in the first aspect.
[0016] Fourthly, this application also provides a computer-readable storage medium storing computer-executable instructions or a computer program, wherein when the computer-executable instructions or the computer program are executed by a processor, the steps of the vehicle communication data conversion method described in the first aspect are implemented.
[0017] Fifthly, this application also provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implement the steps of the vehicle communication data conversion method provided in the embodiments of this application.
[0018] In summary, this application obtains and parses a target communication matrix file to generate first configuration information describing the binding relationship between service methods and parameter data types, and second configuration information describing the composition structure of each data type. This allows the service definition information and data type definition information, originally existing in file form in the communication matrix, to be converted into configuration data that can be directly read by the processing program. Therefore, when processing vehicle communication data, it is unnecessary to manually write service interface mapping relationships and data structure parsing logic for different communication matrices, thus improving the automation level of communication matrix information utilization. Furthermore, after obtaining the first and second configuration information, in response to the first processing request, the corresponding service method is determined based on the first target service method identifier, and the parameter data type corresponding to the service method is obtained based on the first configuration information. Then, the specific composition structure of the parameter data type is determined in conjunction with the second configuration information. This enables the automatic conversion and generation of the message payload byte sequence based on the first physical signal value set. Since the generation process of the message payload is driven by the configuration information, it is not necessary to consider different service methods. Developing separate manual packet assembly logic reduces the reliance on manual coding in the message generation process. Simultaneously, upon receiving a second processing request, using the same first and second configuration information, the data structure to be parsed is determined based on the second target service method identifier. The corresponding physical signal value set is then restored based on the data content in the second message payload byte sequence, enabling automatic conversion from message payload byte sequence to physical signal values. Since the data type composition structure is uniformly described by the second configuration information, parsing messages for different service methods can be completed according to the data structure defined by the communication matrix, thereby improving the consistency of the communication data parsing process. By parsing the communication matrix to form service method association configuration and data type structure configuration, and using these configurations to complete the bidirectional conversion between the message payload byte sequence and the physical signal value set, configurable processing of the vehicle communication data conversion process can be achieved. Compared to repeatedly developing conversion logic for each communication project, this reduces software modifications caused by changes in the communication matrix and improves the applicability of the vehicle communication data processing solution under different communication definition scenarios. In summary, the vehicle communication data conversion method provided in this application generates configuration data by parsing the communication matrix, and realizes automatic bidirectional conversion between vehicle communication message payload and physical signal value based on the configuration data. This enables the configuration and automation of communication data processing, improving the efficiency and applicability of communication data processing. Attached Figure Description
[0019] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit this specification. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a vehicle communication data conversion method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the composition structure of an in-vehicle communication data conversion device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the composition structure of a vehicle provided in an embodiment of this application. Detailed Implementation
[0020] The terms used in the specification, claims, and drawings of this application, such as "first," "second," "third," "fourth," etc. (if any), are used to distinguish similar objects and not to describe a specific order or sequence. Therefore, it is to be understood that these terms can be used interchangeably where appropriate, allowing the described embodiments to be used in different orders, unless specifically required by the illustrations or description. Furthermore, the terms "is" and "has," and any variations thereof, are intended to cover, non-exclusively, all possible constituent elements. For example, a process, method, system, product, or apparatus comprising several steps or units is not necessarily limited to the steps or units explicitly listed, but may also include other steps or units not explicitly listed, or steps or units inherent to the process, method, product, or apparatus.
[0021] In this application, a "module" or "unit" refers to a computer program or part of a computer program that has a specific function and works in conjunction with other related parts to achieve a predetermined goal. These modules or units can be implemented by software, hardware (e.g., processing circuitry or memory), or a combination of both. One or more processors or memories can implement one or more modules or units. Furthermore, each module or unit can also be part of a larger module or unit.
[0022] The technical solutions of this application will be described in detail below with reference to the accompanying drawings of the embodiments. It should be noted that the described embodiments are only a part of this application, and not all embodiments. In the following description, the "some embodiments" mentioned are only a subset of all possible embodiments, which may be the same or different subsets, and different embodiments can be combined with each other without conflict.
[0023] Figure 1 This is a schematic flowchart illustrating a vehicle communication data conversion method provided in an embodiment of this application. For example, see [link to example]. Figure 1 The vehicle communication data conversion method provided in this application embodiment may include the following steps 101 to 104: Step 101: Obtain the target communication matrix file.
[0024] In some examples, the target communication matrix file is a scalable service-oriented middleware over IP (SOME / IP) communication contract file uniformly formulated and issued by the vehicle architecture design department under the Service-Oriented Architecture (SOA) system. It is an Excel standard spreadsheet file with the .xlsx extension and serves as the sole standardized basis for SOME / IP communication interaction between various electronic control units in the vehicle. The target communication matrix file uniformly defines the service interface rules, data type specifications, and network communication behavior parameters required for the interaction of all ECUs in the vehicle. It provides a complete and authoritative raw data benchmark for the subsequent automated conversion of vehicle communication data, unifies the standardization of communication development and testing in the vehicle project, and avoids interaction anomalies caused by different developers' custom communication rules. The target communication matrix file integrates three business worksheets: a service definition worksheet, a data type definition worksheet (second preset worksheet), and a SOME / IP communication behavior definition worksheet (first preset worksheet). The service definition worksheet records the service interface binding rules for all vehicle communication services, including service identifiers, instance identifiers, method / event identifiers, remote procedure call interaction types, and parameter information. The data type definition worksheet standardizes the composition attributes of various data structures, such as basic data types, enumerated data types, structure data types, and array data types, corresponding to all communication signals. The SOME / IP communication behavior definition worksheet defines the network configuration parameters required for communication interaction between each ECU, fully covering all rule definitions for vehicle SOME / IP communication. For example, by entering the vehicle model project code Project2 and version number V6.5.0, the corresponding target communication matrix file can be automatically retrieved and downloaded from the resource library, ensuring the uniformity and standardization of file versions.
[0025] For example, after the device starts the vehicle communication data conversion program, it first triggers a file acquisition command. The program prioritizes reading the pre-configured file acquisition mode and search parameters. If it is in local reading mode, the program traverses the preset local folder directory layer by layer to search for table files with the .xlsx extension. It matches and filters out the unique target communication matrix file by the project identifier and version identifier in the file name, and completes file loading and format verification. After confirming that the file is complete and the format is compliant, the acquisition operation is completed. If it is in resource library pull mode, the program generates a search command based on the currently bound project information and version information, uploads it to the background project resource management system, the resource management system matches the corresponding archive file and completes remote transmission. After the terminal receives the file, it automatically verifies the file integrity and version validity, and finally completes the acquisition of the target communication matrix file.
[0026] By implementing step 101, a unified data source is provided for subsequent communication data conversion, enabling the service information, parameter information, and data type information defined in the vehicle communication system to be input into the processing flow in the form of standardized files. This avoids the need to establish separate data definitions for different communication scenarios and improves the uniformity of the communication data processing flow.
[0027] Step 102: Parse the target communication matrix file to obtain the first configuration information and the second configuration information.
[0028] The first configuration information describes the binding relationship between the service method and the parameter data type, while the second configuration information describes the composition structure of each data type.
[0029] In some examples, a service method is a collection of communication and interaction capabilities provided or invoked by various electronic control units in the vehicle under a scalable service-oriented middleware communication architecture based on Internet protocols. It is a specific interaction unit of the service node in the in-vehicle service-oriented architecture. A single communication service can contain multiple service methods, each with its own independent interaction logic and parameter specifications. These methods cover various forms of in-vehicle communication interaction, such as remote procedure call request and response, event notification, and single-trigger call. Each service method has a unique service identifier and method identifier for global positioning. For example, the front-end air conditioning setting service corresponding to the in-vehicle air conditioning control system contains multiple independent service methods such as air conditioning on / off request and air conditioning temperature adjustment. Each service method is independent of the others and performs its own function, corresponding to different in-vehicle communication interaction scenarios.
[0030] Parameter data types are standardized data format definitions corresponding to the input and output parameters required during the communication interaction process of service methods. They are the core basis for constraining the transmission format, numerical range, and parsing rules of vehicle communication signals. All service method interaction parameters must match the corresponding data type specifications to ensure the consistency and universality of data interaction between different ECUs. For example, the interaction parameters corresponding to the air conditioning switch request can match the vehicle enumeration data type, the air conditioning temperature parameter can match the floating-point data type, and the vehicle status feedback parameter can match the structure data type.
[0031] The first configuration information is structured and standardized data used to completely record the one-to-one binding relationship between all service methods of the vehicle and their corresponding parameter data types, realizing the precise association between service interaction units and data format specifications. This first configuration information is generated using the service definition worksheet in the target communication matrix file as the data source, enabling the system to quickly retrieve the parameter data type corresponding to the interaction parameters of any service method identifier, providing a service dimension retrieval basis for subsequent communication data conversion. For example, the air conditioner switch request method under the front-end air conditioner setting service can be parsed and bound to the corresponding switch status structure data type. This one-to-one binding relationship will be completely stored in the first configuration information.
[0032] The composition structure of each data type is a complete hierarchical structure and attribute definition of various parameter data types, including all contents of basic attributes, member composition, hierarchical relationships, and constraint rules. For basic data types, its composition structure includes basic attributes such as data byte length, numerical resolution, numerical offset, and physical value range. For composite data types, its composition structure includes hierarchical attributes such as nested sub-member names, sub-member data types, sub-member arrangement, and member quantity constraints. For example, the vehicle equipment status structure data type has two sub-members: device source identifier and device on / off status. Each sub-member corresponds to an independent enumerated data type and numerical constraint rule.
[0033] The second configuration information is also structured and standardized data, used to fully record the detailed composition structure and constraint attributes of all parameter data types in vehicle communication, covering the complete definitions of all basic data types and composite data types. This second configuration information is generated using the data type definition worksheet in the target communication matrix file as the sole data source, enabling the system to accurately obtain all structural attributes and numerical rules of a type through its data type name, providing a data structure basis for subsequent conversion between physical signal values and bus byte sequences. For example, it can parse the discrete numerical mapping rules of the air conditioner switch enumeration data type, the resolution and offset parameters of the temperature floating-point data type, and the nested member structure of the device status structure. All structural rules are integrated and stored in the second configuration information.
[0034] For example, firstly, the service definition worksheet built into the target communication matrix file can be located. The service interface records within the worksheet are traversed row by row, and core fields such as unique service identifier, service function description, unique method / event identifier, remote procedure call interaction type, and input / output parameter definitions are precisely extracted from each record. The binding association between each service method and its corresponding parameter data type is then established. Invalid comments and blank rows in the table are removed, and the data is stored in a standardized format, ultimately generating the first configuration information with global retrieval capabilities. Simultaneously, the data type definition worksheet of the target communication matrix file is located, and all data type records are traversed. The category attributes of basic data types, enumerated data types, structure data types, and array data types are identified. All information such as the value rules, structural composition, and member constraints of each data type is fully collected, completely restoring the standardized composition structure of each parameter data type. This data is then uniformly organized into structured data to generate the second configuration information.
[0035] By implementing step 102, the service definition information and data type definition information in the communication matrix are converted into configuration data that can be recognized and called by the program. This enables the subsequent message processing process to complete service location and data structure parsing based on the configuration, eliminating the need for manual maintenance of service interface mapping relationships and data type parsing logic, and improving the automation level of communication matrix information processing.
[0036] Step 103: In response to the first processing request, based on the first configuration information and the second configuration information, the first target service method identifier and the first physical signal value set carried in the first processing request are converted into a first message payload byte sequence.
[0037] In some examples, the first processing request is an upper-layer business call instruction that triggers the serialization conversion of in-vehicle communication data. It is a trigger signal that initiates the process of converting physical signal values into message payload byte sequences, corresponding to the message sending requirements under the in-vehicle service-oriented architecture. The role of the first processing request is to pass all the input parameters required for this message packet assembly to the data conversion program, and the driver executes the automated packet assembly process. The first processing request can be actively invoked by local testing or passively triggered by the in-vehicle business system. Active invocation by local testing means that the message sending instruction is actively issued manually or by a test script, which is mostly used in early communication function verification scenarios of projects. Passive triggering by the in-vehicle business system means that the vehicle application automatically generates the sending request based on the vehicle's operating status, which is mostly used in actual vehicle operation communication scenarios. For example, when the in-vehicle air conditioning system needs to report the switch status signal, the in-vehicle business system automatically generates the corresponding first processing request, triggering the subsequent message packet assembly and conversion process.
[0038] The first target service method identifier is a unique identification code used to identify various service methods in the vehicle's SOME / IP communication. It can accurately locate the communication service and interaction method corresponding to the data to be converted. It is the index basis for associating the first configuration information and matching the service parameter binding relationship. All vehicle communication services and subordinate method events are configured with service method identifiers, and there is no duplicate identification. The first target service method identifier can be directly parsed and extracted from the request parameters of the first processing request. When the first processing request is generated, the service method code corresponding to the business to be sent will be pre-bound. For example, the vehicle front-end air conditioning turn-on request method corresponds to a unique service method identifier. The service interface and parameter definition corresponding to the air conditioning status reporting can be accurately matched through this identifier.
[0039] The first physical signal value set is a collection of signal values that can be directly identified at the vehicle business layer and have actual physical meaning. It is the raw business data that can be directly read and used by the vehicle business system and testers, and is different from the binary bus data used for network transmission. The first physical signal value set fully conforms to the signal physical attributes defined by the vehicle communication matrix, including various switch states, temperature values, device states and other business signal values. The first physical signal value set can be collected and reported by vehicle sensors or generated by upper-layer business logic calculations. During vehicle operation, vehicle sensors collect various hardware status signals in real time to form physical values, or the vehicle upper-layer business program generates control-type physical values through logical operations, which are finally integrated into a complete physical signal value set and encapsulated in the first processing request. For example, the switch on / off status and set temperature value generated by the vehicle air conditioning control system can together form the first physical signal value set required for a message transmission.
[0040] The first message payload byte sequence is binary byte data generated after standardization and conversion. It is valid message payload data that conforms to the SOME / IP communication protocol specification and can be directly used for in-vehicle Ethernet transmission, serving as the transmission carrier for data interaction between in-vehicle ECUs. The first message payload byte sequence is generated by data conversion, byte regularization, and sequential concatenation of physical signal values, fully adapting to the data structure and transmission rules defined by the communication matrix. For example, the physical signal values of air conditioner switch on and temperature 25 degrees Celsius can be automatically converted by the program to generate a binary byte sequence of corresponding length and numerical rules for in-vehicle Ethernet message transmission.
[0041] For example, the data conversion program routinely listens for service processing requests in vehicle communication. When a valid first processing request is detected, the automated serialization conversion process is immediately initiated. First, the first processing request is parsed to accurately extract the first target service method identifier and the first physical signal value set carried within the request, completing the validity verification of the input parameters and eliminating invalid parameters with abnormal or null values. Then, the first configuration information pre-generated in step 102 is called to retrieve the corresponding service method record through the first target service method identifier, locking all parameter data types bound to the service method. At the same time, the second configuration information is called to obtain the complete composition structure definition of the corresponding parameter data type, clarifying the data category, structural attributes, and conversion constraints of the signal to be converted. Based on the above standardized configuration information, the batch conversion and byte encapsulation of the first physical signal value set are completed, and the byte data is orderly spliced according to the signal arrangement rules preset by the communication matrix. Finally, a first message payload byte sequence that fully conforms to the SOME / IP communication transmission standard is generated, completing the automated conversion output of the vehicle communication data and providing standardized binary data support for subsequent vehicle Ethernet message transmission.
[0042] By implementing step 103, the message payload generation process can automatically complete data conversion based on the service methods and data type structures defined in the communication matrix, eliminating the need to write separate message assembly programs for different service methods. This reduces the amount of manual development work in the message generation process and improves message generation efficiency and applicability.
[0043] Step 104: In response to the second processing request, based on the first configuration information and the second configuration information, convert the second target service method identifier and the second message payload byte sequence carried in the second processing request into a second physical signal value set.
[0044] In some examples, the second processing request is a service call instruction that triggers the deserialization and parsing conversion of in-vehicle communication data. It is the trigger entry point for starting the process of restoring the binary message payload to physical signal values, corresponding to the message reception and parsing service requirements under the in-vehicle service-oriented architecture. The second processing request is used to notify the data conversion program to enter the message parsing working mode and carries all the input elements required for this parsing. The second processing request can be passively triggered by the in-vehicle Ethernet link or actively called by the host computer debugging tool. Passive triggering by the in-vehicle Ethernet link is when the device detects the presence of a valid SOME / IP message reception on the bus and automatically generates the corresponding parsing request, which is suitable for real-time communication scenarios during normal vehicle operation. Active calling by the host computer debugging tool is when the tester imports the captured message data and manually triggers the parsing instruction, which is suitable for test scenarios such as later problem review and functional verification. For example, when the in-vehicle body control electronic control unit pushes a status notification message to the air conditioning control ECU, the second processing request is automatically generated to start the message parsing process.
[0045] The second target service method identifier is a unique identification code that identifies the communication service and method event corresponding to the current message to be parsed. It is a retrieval index for accurately matching service interface definitions and locking message data structure rules. All SOME / IP services in the vehicle have globally recognized identifier codes for their corresponding methods and events, enabling accurate differentiation and positioning of different message services. The second target service method identifier can be extracted from the request parameters of the second processing request. When receiving a message, the device will identify the service and method identifier information carried in the message header and encapsulate this identifier information into the second processing request. For example, the vehicle air conditioning status feedback event corresponds to a fixed service method identifier. Through this identifier, it can be determined that the current message belongs to the air conditioning status reporting service and matches the corresponding standardized parameter definition.
[0046] The second message payload byte sequence is the raw binary payload data actually received by the vehicle-mounted Ethernet link, conforming to the SOME / IP protocol specification. It is the underlying data carrier in the network transmission process and does not have an intuitive physical meaning of the business. It can only be restored to a readable signal through protocol parsing and data conversion. The second message payload byte sequence is the effective data payload part of the message. It is different from the message protocol header information and carries the real business signal data content. The second message payload byte sequence can be extracted by the vehicle-mounted communication network card by listening to the bus messages in real time, filtering out redundant fields in the protocol header, and extracting the pure payload binary byte data. For example, the effective binary byte data stream obtained after stripping the protocol header of the air conditioning status report message captured by the bus is the second message payload byte sequence required for this parsing.
[0047] The second physical signal value set is a structured set of signal values that has actual vehicle physical meaning and is output after automatic parsing and conversion. It is standardized business data that can be directly identified, called, and displayed by the vehicle business layer, application layer, and test personnel. The second physical signal value set restores the original sensor status, equipment control status, environmental parameters, and other real vehicle operating data, completely shielding the complexity of the underlying binary bus data. For example, by parsing the byte sequence of the air conditioning report message payload, a series of physical signal values such as air conditioning switch status, set temperature, and working mode can be restored and combined to form a complete second physical signal value set.
[0048] For example, the data conversion program continuously monitors the vehicle Ethernet bus data and upper-layer parsing call instructions. When a valid second processing request is detected, the automated message parsing and restoration process is immediately initiated. First, the parameters of the second processing request are parsed to accurately extract the second target service method identifier and the second message payload byte sequence carried within the request. The integrity and validity of the byte sequence are then checked to exclude damaged or truncated abnormal message data. The pre-stored first configuration information is retrieved, and the corresponding service method parameter binding relationship is accurately matched through the second target service method identifier to determine all parameter data types corresponding to the current message. At the same time, the second configuration information is retrieved to obtain the complete composition structure and standardized conversion rules of the corresponding data type, clarifying the parsing basis for various signals. Based on the two types of configuration information, the ordered reading of binary byte sequences, data inverse conversion, signal matching, and value restoration are completed. The obscure underlying binary bus data is batch-converted into intuitive and readable vehicle physical signal values. Finally, a structured second physical signal value set is formed and output, completing the automated parsing and conversion of vehicle communication messages. This provides accurate and reliable upper-layer business data for vehicle business logic operations, equipment status judgment, and communication testing and verification.
[0049] By implementing step 104, the received communication messages can be automatically parsed according to the data structure defined by the communication matrix, realizing the automatic restoration of message data to physical signals. At the same time, since the parsing process relies on unified configuration data, the consistency of the message parsing process of different service methods can be guaranteed, improving the reliability and reusability of vehicle communication data parsing.
[0050] In summary, this embodiment of the application obtains a target communication matrix file and parses it to generate first configuration information describing the binding relationship between service methods and parameter data types, and second configuration information describing the composition structure of each data type. This allows the service definition information and data type definition information, originally existing in file form in the communication matrix, to be converted into configuration data that can be directly read by the processing program. Therefore, when processing vehicle communication data, it is unnecessary to manually write service interface mapping relationships and data structure parsing logic for different communication matrices, thus improving the automation level of communication matrix information utilization. Furthermore, after obtaining the first and second configuration information, in response to the first processing request, the corresponding service method is determined according to the first target service method identifier, and the parameter data type corresponding to the service method is obtained based on the first configuration information. Then, the specific composition structure of the parameter data type is determined in combination with the second configuration information. This enables the automatic conversion and generation of message payload byte sequences based on the first physical signal value set. Since the generation process of the message payload is driven by the configuration information, it is not necessary to consider different service methods. The method develops manual packet assembly logic separately, which reduces the reliance on manual coding in the message generation process. Simultaneously, upon receiving a second processing request, it uses the same first and second configuration information to determine the data structure to be parsed based on the second target service method identifier. It then reconstructs the corresponding physical signal value set based on the data content in the second message payload byte sequence, enabling automatic conversion from message payload byte sequence to physical signal values. Since the data type composition structure is uniformly described by the second configuration information, it can complete the parsing of different service method messages according to the data structure defined by the communication matrix, thereby improving the consistency of the communication data parsing process. By parsing the communication matrix to form service method association configuration and data type structure configuration, and using the configuration to complete the bidirectional conversion between the message payload byte sequence and the physical signal value set, it enables configurable processing of the vehicle communication data conversion process. Compared to the method of repeatedly developing conversion logic for each communication item, it reduces software modification work caused by changes in the communication matrix, improving the applicability of the vehicle communication data processing solution under different communication definition scenarios. In summary, the vehicle communication data conversion method provided in this application generates configuration data by parsing the communication matrix, and realizes automated bidirectional conversion between vehicle communication message payload and physical signal value based on the configuration data. This enables the configuration and automation of communication data processing, improving the efficiency and applicability of communication data processing.
[0051] In some embodiments, the step of parsing to obtain the aforementioned first configuration information may include: extracting service interface records from the first preset worksheet of the aforementioned target communication matrix file, wherein the service interface records may include service identifier, method event identifier, request response type and parameter definition fields; converting the service interface records into a first tree structure data with services as root nodes and method events as child nodes to obtain the first configuration information, wherein each method event node in the first tree structure data is associated with a corresponding parameter data type name.
[0052] In some examples, the first preset worksheet is a standardized worksheet within the target communication matrix file specifically used to define the rules for vehicle communication services. It serves as an archive carrier for all SOME / IP service interaction rules under the vehicle service-oriented architecture. It is a table page with a preset fixed name and fixed field structure, distinct from the data type definition worksheet and the communication behavior definition worksheet. For example, the dedicated worksheet named "Service Definition Table" within the vehicle project communication matrix file is the first preset worksheet. This worksheet uniformly stores the communication service-related definition content of all electronic control units in the vehicle.
[0053] A service interface record is a single, complete data entry for a single communication service interaction stored as a single row in the first preset worksheet. It is the basic data unit that constitutes the vehicle's SOME / IP service system. Each service interface record corresponds to an independent service method or service event interaction capability. Service interface records can be generated by traversing the valid data rows of the first preset worksheet line by line, filtering out blank rows, comment rows, and invalid redundant data, and then extracting each record. Service interface records may include service identifier, method / event identifier, request / response type, and parameter definition fields. For example, the on / off request interaction entry and the temperature adjustment request interaction entry under the vehicle front-end air conditioning control service each correspond to an independent service interface record.
[0054] Service identifiers are coded information that identifies a single SOME / IP communication service within the entire vehicle. They are used to globally distinguish in-vehicle communication services with different functions. They are the top-level identifiers for all methods, events, and interaction parameters, and are global with no duplicate definitions. Service identifiers can be directly read and extracted from fixed field columns in the first preset worksheet. They are fixed codes predefined in the matrix design phase. For example, the vehicle air conditioning setting service has an independent service identifier, and the vehicle lighting control service has another set of independent service identifiers. The two types of services are accurately distinguished through service identifiers.
[0055] Method event identifiers are coded information belonging to a single communication service and used to distinguish various interactive actions within the service. They include two categories: service method identifiers and service event identifiers. They are used to accurately locate specific interactive behaviors within a service. All method event identifiers within the same service are mutually exclusive. For example, the on / off request action and the temperature calibration notification action under the air conditioner setting service correspond to different method event identifiers, enabling the differentiation and location of multiple interactive behaviors within the same service.
[0056] The request / response type is an attribute field used to define the communication mode of SOME / IP service interaction. It standardizes the message interaction mechanism and data sending and receiving logic of a single service interaction, and adapts to various real-time communication interaction scenarios in vehicles. For example, the single request without response trigger type, request-response interaction type, and status event notification type are all conventional request / response types, which correspond to different business communication scenarios in vehicles.
[0057] The parameter definition field is used to record the interaction parameters required for the corresponding method event. It fully records the names of input parameters, output parameters or event notification parameters and their corresponding data types during a single service interaction. It serves as the basis for establishing the binding relationship between service methods and parameter data types. For example, the parameter definition field corresponding to the air conditioner switch request method can record the switch status parameter and the name of the structure data type corresponding to that parameter.
[0058] The first tree-structured data is a hierarchical and structured data model reconstructed from flattened tabular service data. It addresses the problems of fragmented original tabular data, ambiguous relationships, and inability to quickly retrieve information. This tree structure uses an independent communication service as the top-level root node. The root node uniformly mounts the service's basic attributes, and each root node extends to multiple child nodes. Each child node corresponds to a single method or event under the service, and each child node is bound to a corresponding request / response type and parameter data type name. For example, using the air conditioner setting service as the root node, multiple method / event child nodes such as air conditioner on / off requests, temperature adjustment, and status reporting are mounted under the root node. Each child node is bound to its corresponding parameter data type, forming the complete first tree-structured data.
[0059] In the implementation process, the functional module that executes this parsing logic is the Service Definition Parser. This module is specifically designed to perform full information parsing and extraction on the first preset worksheet named "Service Definition." Each complete record in the worksheet includes the service name, service unique code, service description text, remote procedure call interaction mode, method event name, method event unique code, input parameters, output parameters, event notification parameters, signal reporting strategy, periodic sending duration, and all fields labeled with the roles of each electronic control unit as the server and client. Among these, the parameter fields uniformly adopt the standardized writing format of signal name paired with data type. After r completes the reading and filtering of all row records, it executes a unified conversion logic from flat table data to tree-structured data. Taking a single communication service as the top-level root node, the root node is bound to all basic attributes such as service code, service name, service description, server affiliation, and client affiliation. Then, the various methods and events extracted from the worksheet are constructed as independent child nodes under the root node. Each child node synchronously attaches the corresponding interaction mode and input / output parameter association information. After all the tree-structured data is converted, it is uniformly output as a service definition JSON file service_define.json. This file is the first configuration information that carries the complete first tree-structured data and can be quickly retrieved and called by the program.
[0060] For example, after loading and verifying the target communication matrix file, the system automatically locates and opens the first preset worksheet. It then iterates through all valid data entries in the worksheet from top to bottom, removing non-business data such as table titles, notes, and blank or invalid rows. It then extracts the complete content of the service identifier, method event identifier, request / response type, and parameter definition fields for each service interface record. All extracted service interface records are categorized and integrated. All method event data belonging to the same service identifier are aggregated, and a top-level root node of a tree structure is built using independent services as units. The basic attributes corresponding to this service are then associated with the root node. Subsequently, each aggregated method event is constructed as an independent child node under the root node, and the request / response type and parameter definition information corresponding to each method event are simultaneously mounted to the corresponding child node, accurately matching the parameter data type names corresponding to each method event node.
[0061] Through the implementation of the above embodiments, service interface records containing service identifiers, method event identifiers, request response types, and parameter definition fields are extracted from the first preset worksheet of the target communication matrix file. The service interface records are then converted into a first tree structure data with services as root nodes and method events as child nodes. This enables the service interface relationships in vehicle communication to be organized and managed according to a hierarchical structure. Since each method event node is associated with a corresponding parameter data type name, the corresponding data type definition can be quickly located according to the target service method during subsequent communication data conversion, reducing manual search and matching processes and improving the efficiency of service interface parsing and the accuracy of communication data conversion.
[0062] In some embodiments, the step of parsing to obtain the aforementioned second configuration information may include: extracting data type records from the second preset worksheet of the aforementioned target communication matrix file, wherein the data type records may include data type name, data type category and member definition information; recursively constructing a second tree structure data based on the data type category to obtain the second configuration information, wherein when the data type category is a structure type or an array type, the members of the data type category are nested and parsed to generate corresponding subtree nodes.
[0063] In some examples, the second preset worksheet is a dedicated worksheet within the target communication matrix file used to uniformly define the rules for all vehicle communication data types. It serves as the data structure source for all SOME / IP message parameters under the vehicle service-oriented architecture and is independent of the service definition worksheet and communication behavior definition worksheet. This second preset worksheet predefines the complete attributes of all basic and composite data types used in vehicle communication, serving as a compliant data source for data type parsing. For example, the dedicated worksheet named "Data Type Definition Table" in the vehicle communication matrix file, which stores the standardized definitions of all enumerations, integers, floating-point numbers, strings, structures, and arrays, is the second preset worksheet.
[0064] A data type record is a single, complete data type definition entry stored in the second preset worksheet. It is the smallest data unit that constitutes the vehicle communication data type system. Each data type record corresponds to an independent communication parameter data structure definition. The effective data area of the second preset worksheet can be traversed row by row, automatically filtering table titles, comments, and blank or invalid rows, and extracting structured entries one by one to form a set of data type records. For example, the enumeration definition of vehicle switch status, the floating-point value definition of vehicle temperature, and the structure definition of vehicle equipment status each correspond to an independent data type record.
[0065] Data type names are naming identifiers used to globally distinguish various communication data structures. They are also search keywords associated with service parameters and data structure rules, and are used to establish the association mapping relationship between the first configuration information and the second configuration information. For example, vehicle switch status structure, vehicle ambient temperature signal, and vehicle equipment status enumeration each correspond to different data type names.
[0066] Data type categories are classification identifiers used to distinguish different data structure forms. They guide programs to complete data structure modeling using corresponding parsing rules, covering all standard data forms in vehicle SOME / IP communication. Data type categories include two main categories: basic types and composite types, specifically covering integer types, floating-point types, boolean types, string types, enumeration types, structure types, and array types. For example, signals containing only a single value are identified as basic value types, composite signals containing multiple nested members are identified as structure types, and signals composed of a batch of members of the same type are identified as array types.
[0067] Member definition information is a set of structural details and constraint attributes recorded within a single data type record. It is used to fully define the structural composition, arrangement rules, and value characteristics of the current data type. For basic data types, member definition information includes resolution, offset, physical value range, unit, and default value. For enumerated data types, member definition information includes the mapping relationship between discrete values and state names. For composite data types of structures and arrays, member definition information includes the position of sub-members, sub-member names, sub-member data type references, nesting level, and length constraints. For example, the member definition information of an on-board temperature signal includes resolution and offset values, the member definition information of an on-board switch enumeration includes multiple sets of discrete state mapping relationships, and the member definition information of an on-board equipment structure includes the position and type reference information of multiple sub-members.
[0068] The second tree-structured data is a hierarchical structured data model automatically constructed based on various data type definitions. It is used to fully restore the nested hierarchy and subordinate relationships of vehicle communication data, solving the problems of flattened original table data, unintuitive nested relationships, and the inability of machines to directly recognize multi-layered structures. The second tree-structured data uses a single data type as the top-level node, and attaches different levels of child nodes according to the data type category, fully preserving member positions, data type references, and nested subordinate relationships to form a standardized and recursively searchable data structure tree. For example, the second tree-structured data corresponding to the device status structure uses the structure itself as the top-level node, and the lower levels are attached with child member nodes such as device source identifier and device on / off status, forming a complete hierarchical tree structure.
[0069] The structure type contains multiple sub-members of different types, and some sub-members can still nest other structures or arrays; the array type has two modes: fixed length and dynamic length, and the members inside the array can reference any basic type or composite type; after identifying the current data type as a structure type or array type, the single-level parsing method is no longer used, but the definition information of all internal sub-members is continuously read, and the data type corresponding to the sub-member is judged and the structure is parsed again, generating the lower-level subtree nodes layer by layer, until all nesting levels are parsed and all leaf nodes are landed, finally forming a complete multi-level nested tree structure; for example, the vehicle body status composite structure contains equipment status array members. After parsing the top-level structure, the array length constraint and array member structure are parsed recursively, automatically generating second-level and third-level subtree nodes, and completely restoring the multi-level nested data structure.
[0070] In the implementation process, the functional module that executes the entire set of data type parsing logic is the DataType data type definition parser. This module is specifically designed to complete full field reading and classification parsing for the second preset worksheet. For enumeration types, it extracts the enumeration name, underlying basic data type, discrete value and status name mapping string, and corresponding Chinese explanatory text. For example, a switch request enumeration will be parsed to obtain hexadecimal encoding, English status identifier, and corresponding Chinese meaning. For integer and floating-point types, it uniformly extracts the underlying basic type, resolution, offset, physical value upper and lower limits, initial value, invalid value, and physical unit. Taking a temperature signal as an example, it can completely read the 0.5 resolution and zero offset parameters. For Boolean types, it only records the Boolean basic identifier. The string type stores the UTF-8 encoding standard, fixed or dynamic length mode, and length constraint threshold; for the structure type, it performs recursive traversal, extracting the position index, member name, description text, and associated data type reference of each sub-member, and is compatible with multi-level nested structures; for the array type, it distinguishes between fixed-length and dynamic-length modes and records the corresponding byte capacity limit, and synchronously recursively parses the data type bound to the array members; after DataTypeParser completes the parsing of all types of data type records and multi-level nested recursive modeling, it uniformly outputs the data type JSON file datatype_define.json that carries the complete tree definition of the data type. This file is the standardized second configuration information that can be recursively retrieved and called by the program.
[0071] For example, the process begins by accurately locating the second preset worksheet, batch reading all valid data type records within the worksheet, and extracting the data type name, data type category, and complete member definition information for each record. Based on the identified data type categories, a differentiated structure construction logic is executed. For basic data types such as integers, floating-point numbers, enumerations, and strings, single-level independent tree nodes are directly generated, and all corresponding member constraint attributes are bound. For structure types and array types, a recursive nested parsing mechanism is initiated, traversing all internal sub-member definition information, identifying the data type category corresponding to the sub-member, and iteratively constructing lower-level subtree nodes, progressively improving the nesting level until all deeply nested members are parsed and corresponding subtree nodes are generated. After all data type records have completed structured modeling, all independent tree structures are uniformly summarized and integrated to form a second tree structure data that covers all communication data types of the entire vehicle, with complete hierarchy and rules. Finally, standardized second configuration information is solidified, providing comprehensive and accurate data structure rules support for the subsequent automated serialization and deserialization of SOME / IP message payloads.
[0072] Through the implementation of the above embodiments, data type records are extracted from the second preset worksheet of the target communication matrix file, and a second tree structure data is recursively constructed according to the data type category. This enables complex data structures such as basic types, structure types, and array types involved in vehicle communication data to be described in a hierarchical manner. In particular, when the data type is a structure or array type, by nesting and parsing the members and generating corresponding subtree nodes, the composition relationship of the communication data can be completely preserved. This eliminates the need to manually write complex data structure parsing logic during subsequent message payload processing, thereby improving the automation and adaptability of complex vehicle communication data type processing.
[0073] In some embodiments, the aforementioned conversion of the first target service method identifier and the first physical signal value set carried in the first processing request into a first message payload byte sequence based on the first configuration information and the second configuration information may include: determining the corresponding first target data type from the first configuration information according to the first target service method identifier; obtaining the corresponding first target data type tree definition from the second configuration information according to the first target data type; recursively expanding the first target data type tree definition to obtain a first linear signal list, wherein each leaf node in the first linear signal list records the member position, data type category, and basic type respectively; traversing the first linear signal list to obtain the first physical signal value corresponding to the current leaf node from the first physical signal value set; determining the bus value of the current leaf node according to the first physical signal value and the data type category; generating the byte sequence of the current leaf node based on the bus value and the basic type; and concatenating all byte sequences according to the member positions of each leaf node to obtain the first message payload byte sequence.
[0074] In some examples, the first target data type is a standardized data structure name bound to the current service method to be processed. It is an associated field that connects the first configuration information and the second configuration information, and is used to accurately match all signal structure rules corresponding to a single message packet. The first target data type can be retrieved from the first configuration information based on the first target service method identifier, and can be directly determined by the parameter data type name associated with the service method node. For example, the structure data type corresponding to the vehicle front-end air conditioning switch request service method is the first target data type for this message conversion. This data type completely defines all the signal components of the air conditioning switch request message.
[0075] The first target data type tree definition is the complete hierarchical structure data for the first target data type stored in the second configuration information. It records all hierarchical members, nesting relationships, data attributes, and structural constraints of the current data type in a tree-like hierarchical form. This tree definition includes top-level structure nodes and nested child nodes at all levels, completely restoring the hierarchical relationship of complex data such as structures and arrays. It is the structural basis for realizing the automatic disassembly and reassembly of complex messages. For example, the tree definition corresponding to the air conditioner switch request structure has the main structure node at the top level, and subordinate child nodes such as device source signals and switch status signals are attached to the lower levels in sequence.
[0076] The first linear signal list is a flattened, ordered set of signals generated by recursively traversing and decomposing a hierarchical tree data structure layer by layer. It is used to convert complex, multi-layered nested data structures into a one-dimensional signal list that can be traversed and processed item by item. The first linear signal list uniformly records the attributes of each independent signal, including member position, data type category, and basic type, ensuring the orderly execution of subsequent signal value retrieval, conversion, byte generation, and sequential concatenation. A recursive expansion algorithm can be executed on the tree definition of the first target data type, traversing all level nodes and filtering the final signal nodes to form the first linear signal list. For example, a multi-level nested vehicle body status structure, after recursive expansion, is decomposed into a linear ordered list composed of multiple independent signals such as equipment number, working status, and operating mode.
[0077] The current leaf node is the smallest signal unit node pointed to by a single traversal of the first linear signal list. It is the terminal node in the data structure that no longer contains lower-level child members and is the smallest data processing unit in the message packet assembly process. All valid vehicle communication signals ultimately exist in the form of leaf nodes. Non-leaf nodes are only used for structural nesting and do not participate in actual numerical conversion and byte generation. For example, the air conditioner switch status signal and the device source identification signal are leaf nodes after the structure is disassembled, and can independently complete numerical conversion and byte generation.
[0078] The process of traversing the first linear signal list and obtaining the first physical signal value corresponding to the current leaf node from the first physical signal value set involves traversing all terminal signal nodes one by one in the predetermined order of the linear list. The signal name corresponding to the node is accurately matched with the key value information in the physical signal value set to read the actual physical value at the vehicle business level. For signal nodes not included in the physical signal value set, the default value preset by the communication matrix can be used to fill the gap. For example, when traversing to the leaf node of the air conditioner switch status, the physical value corresponding to the on state is matched and read from the physical signal value set as the input physical signal value of the node.
[0079] Bus values are standardized integer values adapted to the transmission rules of automotive Ethernet buses. They are pure bus transmission values obtained by converting and mapping signal values with physical meaning from the service layer through rule conversion. They shield the service attributes of physical units, offsets, and resolutions and are only used for generating binary byte sequences. Bus values are different from physical signal values and are a dedicated numerical form for transmission at the protocol layer. Bus values can be obtained by standardizing or mapping the first physical signal value according to the conversion rules of different data types. For example, the temperature physical value is converted into an integer bus value through resolution and offset conversion, and the physical enumeration identifier of the switch status is discretely mapped to obtain the corresponding integer bus value.
[0080] A byte sequence is an independent binary data segment corresponding to a single leaf node. It is the smallest binary data unit generated after encoding the bus value according to the byte length, storage rules, and endianness requirements of the basic data type. All independent byte sequences together constitute the data foundation of the complete message payload. A byte sequence can be generated by encoding and formatting the converted bus value according to the basic type attributes of the current leaf node. For example, a single-byte enumeration of a bus value can generate a one-byte binary byte sequence, and a multi-byte floating-point bus value can generate a regularized byte sequence of the corresponding length.
[0081] The process of concatenating all byte sequences according to the member positions of each leaf node to obtain the first message payload byte sequence is based on the signal arrangement rules predefined in the communication matrix. Using the preset member positions of each leaf node as the sorting basis, all independent byte sequences are continuously concatenated in a fixed order from front to back, integrating them into a complete, continuous binary payload data that conforms to the SOME / IP protocol specification. The member positions are fixed arrangement sequence numbers defined by the matrix, which can ensure that the byte arrangement order of each packet is consistent and fully conforms to the vehicle communication interaction standard. For example, according to the member position order of device source signal first and switch status signal second, two independent byte sequences are concatenated in sequence to generate a complete air conditioning request message payload byte sequence.
[0082] In the implementation process, the entire process of executing message payload serialization and packet assembly logic is called the Build process. When it is necessary to generate a message payload corresponding to a specified method or event under a specified extensible service-oriented middleware communication service based on Internet Protocol, the program will complete the automated packet assembly process step by step. The first step is to perform a data type lookup operation. Based on the service code and method event code corresponding to the first target service method identifier, the corresponding method event is searched and matched in the service_define.json which is the first configuration information. The remote procedure call type and parameter definition bound to the method event are extracted, and the associated data type name is parsed out. For example, for the air conditioning switch request method under the vehicle front-end air conditioning setting service, the corresponding structure name Basic_strt_OnOffReq can be extracted from the parameter definition text. The second step is to perform a data structure expansion operation. Based on the extracted data type name, the complete tree definition in the datatype_define.json which is the second configuration information is called. The tree-to-linear list algorithm is called to recursively traverse the entire hierarchical structure to generate the first linear signal list. Each leaf node in the list completely records the member position, signal name, data type category, basic type, and whether it is a leaf. Child node identifiers, and non-leaf nodes of structs and arrays synchronously record the number of their own child members; the third step performs signal value filling and bus value conversion operations. The program reads the key-value pairs of the first physical signal value set passed in from the outside, traverses the first linear signal list in order and matches the physical values corresponding to each leaf node, performs differentiated conversion rules for different data categories, validates the input value of the enumerated type and maps it to the corresponding integer, and generates the bus value by substituting the preset resolution and offset into the conversion formula for integer and floating-point types based on preset resolution and offset, and splits it into big-endian bytes. Boolean types output single-byte fixed content according to the input value, and fills a fixed-length string with a specified length. The encoding and termination markers are used, and the dynamic length string is appended with a four-byte header before the text content. The fourth step is to perform byte encapsulation processing separately for the array structure. The fixed-length array is used to generate the corresponding number of member byte sequences in a loop, and the dynamic-length array is appended with a four-byte big-endian header indicating the number of members at the beginning of all member data. Finally, the payload integration and generation operation is performed. All leaf nodes and the independent byte sequences encapsulated by the array are concatenated in order according to the preset member positions in the linear list. The final output is a complete and compliant first message payload byte sequence, forming a SOME / IP message payload that can be directly used for vehicle Ethernet transmission.
[0083] For example, firstly, the identifier of the first target service method carried in the request can be extracted. By searching the service tree structure inside the first configuration information, the parameter data type bound to the current service method can be accurately located, and the corresponding first target data type can be determined. Next, the tree definition of the first target data type stored in the second configuration information is retrieved, and the nesting level, member attributes, and structural constraints of the current data type are fully loaded. Then, a global recursive expansion process is performed on the multi-level tree structure, stripping away all nested structural relationships, filtering all terminal leaf nodes, and uniformly organizing them to generate a first linear signal list containing member positions, data type categories, and basic type attributes. Each current leaf node is then polled sequentially according to the list order, and signals are used to... The name matching rule accurately reads the corresponding physical signal value from the first physical signal value set and fills in the service value of all nodes. According to the data type category of each leaf node, the corresponding conversion logic is executed to convert the signal values with physical meaning into standard bus values. Then, the byte encoding of the bus value is completed by combining the basic data type of each node, and an independent byte sequence corresponding to each leaf node is generated one by one. After all byte sequences are generated, according to the member position sorting rules defined by the communication matrix, all independent byte fragments are sequentially spliced together. Finally, the first message payload byte sequence with complete structure, compliant order, and protocol adaptation is integrated and output, completing the fully automatic serialization and packet assembly process of the vehicle SOME / IP communication message payload.
[0084] Through the implementation of the above embodiments, the corresponding data type is determined according to the target service method identifier, and a linear signal list containing member positions, data type categories, and basic types is obtained by recursively expanding based on the data type tree definition. This enables the complex data type structure to be converted into a set of signals that can be processed sequentially. On this basis, the bus value corresponding to each leaf node is determined according to the physical signal value set, and byte sequences are generated and concatenated according to the member positions to realize automatic packet assembly from physical signals to message payload. As a result, there is no need to design a separate message generation program for each service method, which can improve the versatility and processing efficiency of the vehicle communication message generation process.
[0085] In some embodiments, the aforementioned determination of the bus value of the current leaf node based on the first physical signal value and the data type category may include: when the data type category is an integer type or a floating-point type, obtaining the preset resolution and preset offset corresponding to the current leaf node in the second configuration information; performing linear transformation and rounding based on the first physical signal value, the preset resolution, and the preset offset to obtain the bus value; when the data type category is an enumeration type, converting the first physical signal value into the corresponding integer value based on the preset discrete value mapping relationship corresponding to the current leaf node in the second configuration information to obtain the bus value.
[0086] In some examples, integer type is a basic numerical data type category in the automotive SOME / IP communication system, used to define discrete physical signals without decimal precision, adapting to integer-type automotive signal scenarios such as vehicle gear positions, device counts, and status positions; for example, communication signals such as automotive device fault codes, signal counts, and gear numbers are all integer type signals. Floating-point type is a numerical data type category in the automotive SOME / IP communication system with decimal precision, used to define continuous physical signals requiring fine-grained display, adapting to high-precision automotive sensor signal scenarios such as vehicle temperature, pressure, and speed; for example, high-precision sensor signals such as automotive air conditioning ambient temperature, tire pressure, and real-time vehicle speed are all floating-point type signals. Enumerated type is a special data type category in the automotive SOME / IP communication system used to define discrete state signals, without continuous numerical change characteristics, containing only a finite number of preset status positions, used to characterize qualitative signals such as automotive device on / off status, operating mode, and fault status; for example, automotive air conditioning on / off status, vehicle operating mode, and device fault status indication signals are all enumerated type signals.
[0087] The preset resolution is a signal accuracy coefficient that is pre-calibrated in the communication matrix and embedded in the second configuration information. It is used to characterize the difference in the actual physical quantity change corresponding to each minimum bus value of the vehicle physical signal. It is a coefficient for the linear conversion between the physical signal value and the bus value. The preset resolution can be referenced by the data type of the current leaf node and directly retrieved from the member attributes of the corresponding data type in the second configuration information. For example, if the preset resolution of the vehicle temperature signal is set to 0.5 degrees Celsius, it means that for every unit change in the bus value, the actual physical temperature changes by 0.5 degrees Celsius.
[0088] The preset offset is a numerical correction parameter pre-calibrated in the communication matrix and fixed in the second configuration information. It is used to correct the numerical reference deviation of the vehicle physical signal, eliminate the conversion error caused by the zero-point offset of the physical quantity, and ensure the accurate correspondence between the bus value and the physical value. The preset offset is a standardized fixed configuration parameter of the project and is uniformly stored in the data type attribute field of the second configuration information. After matching the data type of the current leaf node, the corresponding bound preset offset can be automatically retrieved. For example, some vehicle pressure signals will be configured with fixed offset parameters to compensate for the zero-point deviation of the sensor and achieve accurate alignment between the physical value and the bus value.
[0089] The process of obtaining the bus value through linear transformation and rounding based on the first physical signal value, preset resolution, and preset offset is established based on the signal conversion benchmark commonly used in the vehicle communication industry. A fixed linear algorithm converts the upper-layer physical signal value, which has physical units and practical meaning, into an integer bus value suitable for Ethernet bus transmission. The linear transformation, based on the physical signal value, combines resolution and offset to complete benchmark correction and accuracy convergence. Finally, a rounding operation yields an integer bus value that conforms to the bus transmission specification, ensuring the uniformity and standardization of conversion for all numerical signals. For example, when the vehicle temperature physical signal value is 25 degrees Celsius, the preset resolution is 0.5 degrees Celsius, and the preset offset is 0 degrees Celsius, the original value is calculated through linear transformation, and then rounded to obtain a standard bus integer value for subsequent binary byte sequence generation.
[0090] The preset discrete value mapping relationship is a one-to-one correspondence rule between enumerated states and integer values that is predefined in the communication matrix and solidified in the second configuration information. It is the basis for the state to value conversion of enumerated signals. This mapping relationship clearly defines the bus integer value corresponding to each text state, covering all valid states of the enumeration type, and there are no duplicate or missing mappings. The exclusive mapping form of the current enumeration data type in the second configuration information can be read to obtain the binding relationship between all states and values, and obtain the preset discrete value mapping relationship. For example, the preset discrete mapping relationship of air conditioner state enumeration defines no request as value 0, closed as value 1, and open as value 2, forming a complete state mapping rule.
[0091] The first physical signal value of the vehicle enumeration class is usually a status identifier with business meaning and cannot be directly used for bus binary transmission. By retrieving the discrete value mapping relationship built into the second configuration information, the standard integer value corresponding to the current input physical state can be matched and used as the bus value of the enumeration signal. For example, when the physical state signal of air conditioner being turned on is input, the preset discrete mapping relationship is retrieved and the corresponding integer value is matched. This value is the bus value of the current enumeration leaf node.
[0092] For example, if the current leaf node is determined to be of integer or floating-point type, the second configuration information is immediately accessed to accurately extract the preset resolution and preset offset parameters specific to the signal. The first physical signal value transmitted by the upper layer service is substituted into the standardized linear conversion logic to complete the benchmark offset correction and precision scaling calculation of the physical value. Finally, the value is converged to a standard integer value through a rounding operation to generate the bus value of the current numerical signal. If the current leaf node is determined to be of enumeration type, the corresponding preset discrete value mapping relationship stored in the second configuration information is automatically retrieved. The input first physical signal state is matched with the mapping form one by one to retrieve the standard integer value corresponding to the state, which is used as the bus value of the enumeration signal. The entire conversion logic is automatically executed based on the pre-parsed second configuration information, without the need for manual intervention in parameter configuration and numerical calculation. Different projects and different versions of vehicle communication signals only need to rely on the corresponding configuration file to complete the adaptation, effectively improving the automation level, conversion accuracy and cross-scenario reuse capability of vehicle communication data bus value conversion.
[0093] Through the implementation of the above embodiments, for integer or floating-point types, the physical signal value is linearly transformed and rounded according to a preset resolution and preset offset to obtain the corresponding bus value. For enumerated types, the physical signal value is converted into the corresponding integer value according to a preset discrete value mapping relationship. This enables different types of vehicle communication signals to complete the conversion from physical value to bus value according to the communication matrix definition rules. As a result, data conversion errors caused by manual processing of signal conversion rules can be reduced, and the accuracy and consistency of the message payload generation process can be improved.
[0094] In some embodiments, the aforementioned generation of the byte sequence of the current leaf node based on the bus value and the base type may include: when the base type is a string type and the length mode is fixed length, encoding the first physical signal value according to a preset fixed length and filling it with a terminator to obtain a byte sequence; when the length mode of the string type is dynamic length, generating a first length header byte sequence and a content byte sequence; concatenating the first length header byte sequence with the content byte sequence to obtain a byte sequence, wherein the first length header byte sequence is used to indicate the byte length of the content byte sequence; when the data type is an array type and the length mode is fixed length, repeatedly generating the byte sequence of the array members until the fixed length is reached; when the length mode of the array type is dynamic length, generating a second length header byte sequence; concatenating the second length header byte sequence with the byte sequences of each array member to obtain a byte sequence, wherein the second length header byte sequence is used to indicate the number of array members.
[0095] In some examples, the string type is a basic data type used in the automotive SOME / IP communication system to carry text-based business information. It is mainly used to transmit character-based automotive data such as device numbers, version information, status descriptions, and interactive text, distinguishing it from numeric and enumerated data types. For example, communication signals such as automotive firmware version numbers, device codes, and vehicle status description text are all defined and transmitted using the string type. The array type is a composite data type used in the automotive SOME / IP communication system to carry batch sets of data of the same type. It is used to integrate multiple sub-signals with the same attributes and data types to form structured batch data messages, adapting to batch transmission scenarios such as multi-channel sensor data and multi-device status sets. For example, multi-channel temperature sensor data sets and multi-device fault status sets are both array type data.
[0096] Length mode is a classification attribute used to constrain the data storage length rules of string and array types. It is an identifier that distinguishes between fixed and dynamic data formats and directly determines the encoding, padding, and encapsulation logic of byte sequences. Length mode only includes two forms: fixed length and dynamic length, which can fully cover all string and array data scenarios in vehicle SOME / IP communication.
[0097] Fixed length is the standard constraint type in length mode, which means that the data storage byte length and number of members of the current string or array are fixed constants and do not change with the changes in business data content. The message structure has fixed regularity. For example, the vehicle equipment encoding string is uniformly set to a fixed length of 30 bytes, and the vehicle reserved status array is uniformly set to a fixed length of 16 members. These are all fixed length constraint scenarios.
[0098] Dynamic length is a variable constraint type in length mode, which means that the data storage length and number of members of the current string or array can be adaptively changed according to the actual business data content, adapting to business scenarios where the length of in-vehicle interactive content is not fixed; for example, in-vehicle interactive prompt text, dynamically displayed information, and variable number of sensor data sets are all defined using dynamic length mode.
[0099] The process of encoding the first physical signal value to a preset fixed length and padding it with a terminator to obtain a byte sequence involves first performing unified character encoding on the text-type first physical signal value, using the UTF-8 encoding format commonly used in vehicle communication to complete the text-to-byte conversion operation; if the length of the encoded content bytes is less than the preset fixed length, blank bytes and standard string terminators are automatically padded to the end of the bytes to reach the preset fixed length; if the length of the encoded content bytes is equal to the preset fixed length, the encoded byte content is directly retained; for example, for a device number string with a preset fixed length of 30 bytes, if the valid text encoding occupies 20 bytes, the remaining bytes are automatically padded and a terminator is added to generate a complete 30-byte fixed-length byte sequence.
[0100] The first length header byte sequence is a pre-identification byte segment exclusive to dynamic length strings. It is used to record the actual length of the subsequent string content bytes and serves as the length basis for the message parser to read bytes, avoiding truncation or redundant reading problems during dynamic string parsing. For example, using four-byte big-endian as the length header format, the corresponding first length header byte sequence is generated based on the actual number of bytes in the text content.
[0101] The content byte sequence is a valid text data byte segment generated after encoding a string. It carries the actual business information corresponding to the string and is the effective payload content of the dynamic string message. The content byte sequence only contains the valid bytes after encoding the physical signal value and does not contain any padding or redundant bytes. The content byte sequence can be generated by performing UTF-8 encoding on the first physical signal value corresponding to the string and removing the whitespace padding characters. For example, the valid byte content generated after encoding vehicle version information text is the content byte sequence.
[0102] The process of concatenating the first length header byte sequence with the content byte sequence to obtain the byte sequence is as follows: after the first length header byte sequence and the content byte sequence are generated independently, the length header byte segment is placed at the beginning of the message and the valid content byte segment is placed at the end of the message according to the front order of the protocol specification, so as to complete the orderly concatenation of the two byte data segments and form a complete dynamic string byte sequence.
[0103] The total number of members in a fixed-length array is a preset fixed value. Based on the basic data type of the sub-members within the array, the byte sequence corresponding to each member is generated in a loop, and the member data is continuously filled in iteratively until the number of array members reaches the preset fixed length threshold. For positions where there is insufficient valid data, a default base byte is automatically filled in to ensure that the overall array byte length is fixed and uniform. For example, for a fixed-length temperature array with a preset of 16 members, even if there are only eight valid data entries, 16 sets of member byte sequences are still added in a loop to complete the fixed-length array encapsulation.
[0104] The second length header byte sequence is a pre-identifier byte segment exclusive to dynamic length arrays. It is used to record the actual number of valid members contained in the current array. It is the basis for the parser to provide the number of array traversal reads and adapts to the business characteristics of dynamic arrays with variable number of members. It can count the actual number of valid array members and generate corresponding number identifier bytes according to fixed encoding rules as the second length header byte sequence. For example, a four-byte big-endian length header can be used to identify the real-time number of members in a dynamic array.
[0105] First, a second-length header byte sequence can be generated based on the actual number of valid members. Then, independent byte sequences corresponding to all valid array members can be generated one by one. Finally, the bytes are concatenated in a fixed order with the length header at the beginning and the member data at the end to form a complete dynamic array byte sequence. This encapsulation method can accurately distinguish the valid data range of the dynamic array, avoid invalid empty data interfering with message parsing, and adapt to the transmission requirements of variable batch data in vehicles.
[0106] For example, for string data, the length mode identifier is first determined. If it is a fixed-length mode, the first physical signal value is encoded using standard UTF-8, and byte padding is performed according to the fixed byte length preset in the second configuration information. A standard string terminator is added to the end of the bytes to generate a regular and uniform fixed-length string byte sequence. If it is a dynamic-length mode, the physical signal value is first encoded to generate a clean content byte sequence. The actual length of the content bytes is counted and a corresponding first length header byte sequence is generated. The two byte data segments are concatenated and integrated according to the protocol order to obtain a complete dynamic string byte sequence. For array data, the length mode is also distinguished and processed. If it is a fixed-length mode, the byte sequence of each member is generated iteratively according to the preset total number of members, and the filling continues until the preset fixed member length is reached. If the length is insufficient, the default base byte is automatically filled. If it is a dynamic-length mode, the number of valid array members in the current business scenario is counted, and a second length header byte sequence is generated to identify the number of members. The independent byte sequences of all valid members are generated one by one. Finally, the length header byte sequence and all member byte sequences are concatenated in order to output a complete dynamic array byte sequence.
[0107] Through the implementation of the above embodiments, corresponding byte sequences are generated for string types and array types according to fixed-length or dynamic-length modes, respectively, so that data types with different length characteristics can complete message payload encoding according to preset rules. Among them, the fixed-length mode ensures data format consistency through length padding, while the dynamic-length mode indicates the actual data length by generating a length header, enabling the receiving end to accurately identify subsequent data content. Thus, the compatibility processing capability of complex data types in vehicle communication can be improved, message parsing errors caused by different data length processing methods can be avoided, and the reliability of communication data conversion can be improved.
[0108] In some embodiments, the aforementioned conversion of the second target service method identifier and the second message payload byte sequence carried in the second processing request into a second physical signal value set based on the first configuration information and the second configuration information may include: determining the corresponding second target data type from the first configuration information according to the second target service method identifier; obtaining the corresponding second target data type tree definition from the second configuration information according to the second target data type; recursively expanding the second target data type tree definition to obtain a second linear signal list, wherein each leaf node in the second linear signal list records the member position, data type category, and basic type respectively; extracting byte segments corresponding to each leaf node sequentially from the second message payload byte sequence according to the order of each leaf node in the second linear signal list; for each leaf node, restoring the physical value of the extracted byte segment according to the data type category and basic type of the leaf node to obtain the physical value of the leaf node; and combining the signal names of all leaf nodes and their corresponding physical values to obtain the second physical signal value set.
[0109] In some examples, the second target data type is a standardized data structure name bound to the second target service method to be parsed. It is an association field connecting the first configuration information and the second configuration information, used to accurately define the complete signal structure system corresponding to the current message payload, and constrain all data rules and signal composition of this message parsing. For example, the structure data type corresponding to the vehicle air conditioning status reporting event is the second target data type corresponding to this message parsing. This data type uniformly defines all signal composition and structural specifications of the air conditioning status feedback message.
[0110] The second target data type tree definition is a complete hierarchical structure data corresponding to the second target data type stored in the second configuration information. It records all nested members, hierarchical relationships, data type categories, and basic type attributes of the current message data in a tree-like hierarchical form. It includes multi-level nested structure information of composite data such as structures and arrays. The second target data type tree definition is the structural basis for realizing accurate decomposition and hierarchical parsing of complex messages. The second target data type tree definition can be accurately retrieved and used in the full-domain data type tree library of the second configuration information based on the matched second target data type name. For example, the tree definition corresponding to the vehicle air conditioning status feedback structure has the top level carrying the basic attributes of the structure, and the lower level sequentially attaching multiple levels of child nodes such as temperature signals, mode signals, and switch status signals, completely restoring the internal structure of the message.
[0111] The second linear signal list is an ordered list of signals generated by the program through a global recursive traversal and layer-by-layer decomposition and flattening of the tree definition of the second target data type. It transforms the multi-layered nested tree structure into a one-dimensional set of terminal signal nodes that can be ordered and traversed. All leaf nodes within the second linear signal list fully record the member position, data type category, and basic type attributes, providing a standardized index basis for subsequent accurate extraction of byte segments and reverse reconstruction of physical values. It can execute a tree recursive expansion algorithm, traverse all levels of nodes in the tree definition, remove intermediate carrying nodes, retain all terminal leaf nodes that can participate in parsing calculations, and generate the second linear signal list by ordering according to the standard member positions. For example, a multi-level nested vehicle body status message structure, after recursive decomposition, generates a second linear signal list composed of independent terminal signals such as equipment status, working gear, and fault codes.
[0112] The process of extracting the corresponding byte segments from the second message payload byte sequence according to the order of the leaf nodes in the second linear signal list is based on the fixed member positions and byte length rules of the linear list. Following the byte arrangement order in the message packet assembly stage, the continuous binary payload byte sequence is segmented to ensure that each leaf node can accurately match its own original byte data, avoiding parsing anomalies such as byte misalignment, data crosstalk, and field omission. For example, according to the order of the air conditioning status signal list, the single-byte segment corresponding to the switch status and the multi-byte segment corresponding to the temperature data are extracted from the message byte sequence in sequence to achieve accurate separation of the original byte data of each signal.
[0113] For each leaf node, the process of restoring the physical value of the extracted byte segment based on the data type and base type of the leaf node is the reverse operation of converting binary bus data into vehicle business physical data. This step adapts differentiated restoration rules for different data type and base type, and uniformly realizes the decoding, conversion and state mapping of the original bus byte data. It converts binary byte segments without actual business meaning into signal values with vehicle physical meaning that can be directly recognized by the business system. For example, the temperature signal byte segment is converted into the actual temperature physical value by inverse numerical conversion, and the switch status byte segment is enumerated and mapped to obtain the physical identifier of the device switch status.
[0114] The final summary output step of the message parsing process is to combine the signal names of all leaf nodes and their corresponding physical values to obtain the second physical signal value set. This step binds the independent physical signal values parsed from all terminal leaf nodes with preset standardized signal names, integrating them into a structured, key-value complete signal set, forming a clear and directly callable business data result. For example, all parsed physical signal values such as air conditioner on / off status, set temperature, and working mode are organized and integrated according to signal names to form a complete second physical signal value set for air conditioner status reporting.
[0115] In the implementation process, the entire binary payload reverse parsing logic corresponds to the payload parsing process, which is the reverse execution logic of the aforementioned serialization build process. The program first reuses the data retrieval and structure expansion logic, matches the second target data type based on the second target service method identifier, calls the corresponding second target data type tree definition and recursively expands it to generate the second linear signal list; then, referring to the predetermined node order of the second linear signal list, it extracts the exclusive byte segment of each leaf node from the complete second message payload byte sequence, and performs differentiated physical value restoration operations according to data type. For integer and floating-point byte segments, it first restores the bus integer according to big-endian order, and then substitutes it into the reverse conversion formula to calculate the real physical value. For enumerated words... After the segments are converted into target integers, they are matched with preset discrete mappings to obtain enumerated names. For fixed-length strings, they are read according to the preset byte length and UTF-8 decoding is performed. For dynamic strings, the first four bytes of the first-length header are read first to determine the effective content length before decoding the text. For fixed-length arrays, bytes are truncated in a loop according to the preset number of members and restored one by one. For dynamic arrays, the second four-byte header is parsed first to obtain the number of effective members and then each sub-member is parsed in turn. After all leaf nodes have completed the physical value restoration, the program binds and summarizes each group of signal names with the corresponding parsed physical values, generating a second physical signal value set in the form of a structured dictionary for external output. The upper-layer test business logic can directly read and use this set without processing the underlying binary byte-related operations.
[0116] For example, after responding to the second processing request, the second target service method identifier carried in the request can first be parsed and extracted. By searching the service tree structure inside the first configuration information, the parameter data type corresponding to the current message is accurately matched to determine the corresponding second target data type. Then, the second target data type tree definition stored in the second configuration information is retrieved, and the nesting level, member arrangement, and type constraint rules of the current message data are fully loaded. A global recursive expansion process is performed on the multi-level tree structure to remove all nested subordinate relationships, filter all terminal leaf nodes, and complete the ordered sorting according to the member position information to generate a second linear signal list containing complete signal attributes. According to the node arrangement order of the linear list, combined with the byte length and offset position of each leaf node, from The second message payload byte sequence is segmented point by point to extract corresponding independent byte segments, achieving precise separation of all signal raw bus data. For each independent leaf node, the corresponding reverse parsing rules are called according to its data type and basic type. Combined with the resolution, offset, enumeration mapping, length constraint and other parameters built into the second configuration information, the byte segment is decoded and the physical value is restored, obtaining the standard physical value corresponding to each signal. Finally, the program binds and integrates the standardized signal names of all leaf nodes with the restored physical values, and organizes them into a structured set of signal values. Finally, the complete second physical signal value set is output, completing the fully automated reverse parsing process of the vehicle SOME / IP message payload from binary raw data to vehicle service physical signals.
[0117] Through the implementation of the above embodiments, the corresponding data type is determined according to the second target service method identifier, and the second linear signal list is obtained by recursively expanding according to the tree definition of the second target data type. Then, the corresponding byte segment is extracted from the message payload byte sequence according to the order of each leaf node and the physical value is restored. This realizes the automatic parsing of vehicle communication messages from binary payload to physical signal value. Since the parsing process is completed based on the configuration data generated by the communication matrix, there is no need to develop separate parsing programs for different service methods. Therefore, the automation, uniformity and reusability of the communication message parsing process can be improved.
[0118] In some embodiments, the aforementioned physical value restoration of the extracted byte segments based on the data type category and base type of the leaf node may include: when the data type category is an integer or floating-point type, obtaining the preset resolution and preset offset corresponding to the leaf node in the second configuration information, converting the extracted byte segments into integer bus values in big-endian order; restoring the physical value based on the integer bus value, preset resolution, and preset offset; when the data type category is an enumeration type, after converting the extracted byte segments into a target integer, searching for an enumeration name matching the target integer in the second configuration information to obtain the physical value; when the base type is a string type and the length mode is... When the length is fixed, the extracted byte segment is read and decoded according to the preset fixed length to obtain the physical value; when the string type length mode is dynamic, the first length header is read from the extracted byte segment to determine the content byte length; the content byte segment is read and decoded according to the content byte length to obtain the physical value; when the data type is array type and the length mode is fixed, the extracted byte segment is read cyclically according to the fixed length; the physical value is restored for each array member; when the array type length mode is dynamic, the second length header is read from the extracted byte segment to determine the number of members; the physical value is restored for each array member in sequence according to the number of members.
[0119] In some examples, the preset resolution and preset offset are static parameters pre-calibrated in the communication matrix and embedded in the second configuration information. They correspond to each leaf node of a numerical type and are used to define the conversion relationship between bus integer values and actual physical values. Big-endian is a byte storage arrangement standard uniformly defined by the vehicle SOME / IP protocol, ensuring complete alignment of byte parsing order at both ends. The integer bus value is the original bus integer value obtained after endianness conversion of the byte segment, without physical units or offset correction information. When the data type is integer or floating-point, the resolution and offset parameters stored in the second configuration information can be automatically retrieved through the data type index of the current leaf node. Simultaneously, the extracted original byte segment is reassembled and converted according to the unified big-endian rule of vehicle Ethernet to obtain a standard integer bus value. For example, if the vehicle speed signal and air conditioning temperature signal are both floating-point mapped numerical types, after reading the corresponding byte segment, byte parsing is completed according to the big-endian rule, and parameter loading is completed by combining the preset resolution and offset parameters, providing a reference bus value for subsequent physical value restoration.
[0120] The process of restoring physical values based on integer bus values, preset resolution, and preset offset is necessary because the vehicle communication bus transmission only supports integer data flow. Real physical values with precision and reference offset cannot be directly transmitted and need to be restored through reverse conversion. Therefore, a standardized reverse linear operation logic is adopted, using the integer bus value as the reference, combining the resolution to complete the precision restoration, and combining the offset to complete the reference correction. Finally, the output is a vehicle physical signal value with actual physical meaning, units, and precision. For example, after resolution scaling and offset correction, the bus integer value can be restored to obtain accurate ambient temperature physical value and real-time vehicle speed physical value.
[0121] Enumeration type signals have no continuous physical quantity characteristics and are only used to identify qualitative information such as vehicle equipment status, working mode, and fault level. During bus transmission, they are exchanged using integer values as the carrier, and the business layer needs to convert them into recognizable enumeration text status. The target integer is the enumeration bus encoded value obtained after decoding the byte segment, and the enumeration name is a status identifier text with business readability. When the data type is enumeration type, the enumeration byte segment can be converted into an integer to obtain the target integer first, and then the pre-stored enumeration discrete mapping relationship in the second configuration information can be retrieved. The corresponding enumeration text name can be locked through a forward matching method, which is used as the final physical value of the enumeration signal. For example, the bus integer value corresponding to the air conditioning working mode can be matched through the mapping table to obtain readable enumeration physical values such as cooling mode, heating mode, and air supply mode.
[0122] The byte length of a fixed-length string is predefined by the communication matrix and embedded in the second configuration information. The message structure is fixed without dynamic offset, and the parsing process does not require length calculation. It only needs to extract the complete byte content according to the preset fixed byte length and perform character decoding. When the basic type is string and the length mode is fixed length, the corresponding byte segment can be accurately extracted according to the fixed length parameter recorded in the second configuration information. Decoding is completed using the unified character encoding format of vehicle communication, and the readable text physical signal value is output. For example, fixed field text signals such as vehicle equipment code and hardware version number can be restored to the complete string physical value through fixed-length decoding.
[0123] The first length header is a length identifier byte segment carried at the front end of a dynamic length string message. It records the actual length occupied by subsequent valid text content bytes and serves as the benchmark for accurate parsing of dynamic strings. It guides the parser to accurately distinguish between valid text bytes and redundant padding bytes, avoiding anomalies such as truncation, garbled characters, and excessive data reading during dynamic text parsing. The valid text length of a dynamic string changes dynamically with the business scenario and has no fixed byte arrangement length. It is necessary to rely on the length header identifier to define the range of valid data. The first length header at the front end of the byte segment can be parsed first to obtain the actual content byte length. Then, based on the calculated length, subsequent valid content byte segments can be accurately truncated. Finally, standard character decoding is performed to generate readable text physical values. For example, dynamic length signals such as real-time vehicle status prompts and custom interactive information can be accurately parsed using this method.
[0124] The number of members and the length of a single member in a fixed-length array are both preset fixed parameters of the matrix. The overall message structure is regular and fixed, and the number of members does not change with the business data. When the data type is array type and the length mode is fixed length, the total number of array members preset in the second configuration information can be used to cyclically divide the byte segments equally, and the corresponding physical value restoration logic can be executed on each array member byte segment one by one to finally obtain the physical data of the entire array. For example, for a fixed eight-channel temperature sensor acquisition array, the eight independent signals are cyclically parsed according to the fixed number of members to complete the restoration of the entire sensor data.
[0125] The second length header is a quantity identifier byte field carried at the front end of a dynamic length array message. It records the actual number of valid data members in the current array and serves as the basis for accurate traversal and parsing of dynamic arrays. It addresses the parsing challenges of dynamic arrays with variable member counts and variable message lengths. Dynamic arrays are suitable for scenarios such as variable quantity sensor data in vehicles and variable device status sets, where the volume of valid data in the message changes in real time. When the array type's length mode is dynamic, the second length header can be parsed first to obtain the number of valid members. Then, based on the actual number of members, the corresponding byte segments are extracted one by one, and the physical value is restored one by one according to the data type rules of each member. Finally, the complete physical signal set corresponding to the dynamic array is obtained. For example, a dynamic array of vehicle fault codes can dynamically load member data according to the actual number of faults, and after determining the number of valid faults through the second length header, the data can be parsed and restored one by one.
[0126] For example, for integer and floating-point leaf nodes, the resolution and offset parameters stored in the second configuration information can be automatically loaded. The original byte segments are then converted to standard integer bus values according to the big-endian order specified by the vehicle SOME / IP protocol. Precision scaling and benchmark correction are then performed through inverse linear conversion logic to output the final physical value. For enumeration type leaf nodes, the extracted byte segments are converted to target integers, and the preset enumeration discrete mapping relationship within the second configuration information is retrieved to match the corresponding enumeration text name as the physical value result. For string type leaf nodes, fixed-length and dynamic-length values are distinguished. The mode performs differentiated decoding. In fixed-length mode, byte segments are directly truncated according to the preset fixed length and the character decoding is completed. In dynamic-length mode, the first length header at the front end is read first to determine the effective content length, and then the content byte segments are accurately truncated to complete the decoding and output the text physical value. For array-type leaf nodes, fixed-length and dynamic-length modes are also distinguished to complete batch parsing. In fixed-length mode, byte segments are truncated in a loop according to the preset number of members and the physical value is restored member by member. In dynamic-length mode, the second length header at the front end is read first to determine the current effective number of members, and then the byte truncation and physical value restoration of all array members are completed in turn according to the actual number.
[0127] By implementing the above embodiments, corresponding physical value restoration methods are adopted for different data types, enabling accurate parsing of various data types in vehicle communication messages. Specifically, for integer or floating-point types, the conversion from bus value to physical value is completed based on resolution and offset; for enumeration types, the corresponding enumeration meaning is restored by looking up the mapping relationship; for string and array types, content parsing is completed by reading length information or fixed-length rules. Thus, it can cover the parsing requirements of various data structures in vehicle communication scenarios, improve the accuracy and consistency of message parsing results, and further expand the applicability of vehicle communication data conversion solutions.
[0128] Furthermore, as an implementation of the foregoing method embodiments, this application also provides a vehicle-mounted communication data conversion device for implementing the foregoing method embodiments. This device embodiment corresponds to the foregoing method embodiments. For ease of reading, this vehicle-mounted communication data conversion device embodiment will not repeat the details of the foregoing method embodiments one by one, but it should be understood that the device in this application embodiment can correspondingly implement all the contents of the foregoing method embodiments. For example... Figure 2As shown, the vehicle-mounted communication data conversion device 20 includes: a file acquisition unit 201, a file parsing unit 202, a first processing unit 203, and a second processing unit 204. The file acquisition unit 201 is used to acquire a target communication matrix file; the file parsing unit 202 is used to parse the target communication matrix file to obtain first configuration information and second configuration information, wherein the first configuration information describes the binding relationship between service methods and parameter data types, and the second configuration information describes the composition structure of each data type; the first processing unit 203 is used, in response to a first processing request, to convert the first target service method identifier and the first physical signal value set carried in the first processing request into a first message payload byte sequence based on the first configuration information and the second configuration information; the second processing unit 204 is used, in response to a second processing request, to convert the second target service method identifier and the second message payload byte sequence carried in the second processing request into a second physical signal value set based on the first configuration information and the second configuration information.
[0129] In some embodiments, the file parsing unit 202 is further configured to extract service interface records from a first preset worksheet of the target communication matrix file, wherein the service interface records include service identifier, method event identifier, request response type and parameter definition fields; convert the service interface records into a first tree structure data with services as root nodes and method events as child nodes to obtain first configuration information, wherein each method event node in the first tree structure data is associated with a corresponding parameter data type name.
[0130] In some embodiments, the file parsing unit 202 is further configured to extract data type records from the second preset worksheet of the target communication matrix file. The data type records include data type name, data type category and member definition information. Based on the data type category, a second tree structure data is recursively constructed to obtain the second configuration information. When the data type category is a structure type or an array type, the members of the data type category are nested and parsed to generate corresponding subtree nodes.
[0131] In some embodiments, the first processing unit 203 is further configured to: determine the corresponding first target data type from the first configuration information according to the first target service method identifier; obtain the corresponding first target data type tree definition from the second configuration information according to the first target data type; recursively expand the first target data type tree definition to obtain a first linear signal list, wherein each leaf node in the first linear signal list records the member position, data type category, and basic type respectively; traverse the first linear signal list to obtain the first physical signal value corresponding to the current leaf node from the first physical signal value set; determine the bus value of the current leaf node according to the first physical signal value and data type category; generate the byte sequence of the current leaf node based on the bus value and basic type; and concatenate all byte sequences according to the member positions of each leaf node to obtain the first message payload byte sequence.
[0132] In some embodiments, the first processing unit 203 is further configured to, when the data type is an integer type or a floating-point type, obtain the preset resolution and preset offset corresponding to the current leaf node in the second configuration information; perform linear transformation and rounding according to the first physical signal value, the preset resolution and the preset offset to obtain the bus value; when the data type is an enumeration type, convert the first physical signal value into the corresponding integer value according to the preset discrete value mapping relationship corresponding to the current leaf node in the second configuration information to obtain the bus value.
[0133] In some embodiments, the first processing unit 203 is further configured to: encode the first physical signal value according to a preset fixed length and fill it with a terminator to obtain a byte sequence when the basic type is a string type and the length mode is fixed length; generate a first length header byte sequence and a content byte sequence when the string type length mode is dynamic length; concatenate the first length header byte sequence with the content byte sequence to obtain a byte sequence, wherein the first length header byte sequence is used to indicate the byte length of the content byte sequence; repeatedly generate the byte sequence of array members when the data type is an array type and the length mode is fixed length, until the fixed length is reached; generate a second length header byte sequence when the array type length mode is dynamic length; concatenate the second length header byte sequence with the byte sequence of each array member to obtain a byte sequence, wherein the second length header byte sequence is used to indicate the number of array members.
[0134] In some embodiments, the second processing unit 204 is further configured to: determine the corresponding second target data type from the first configuration information according to the second target service method identifier; obtain the corresponding second target data type tree definition from the second configuration information according to the second target data type; recursively expand the second target data type tree definition to obtain a second linear signal list, wherein each leaf node in the second linear signal list records the member position, data type category, and basic type respectively; extract the byte segments corresponding to each leaf node from the second message payload byte sequence in the order of each leaf node in the second linear signal list; for each leaf node, restore the physical value of the extracted byte segment according to the data type category and basic type of the leaf node to obtain the physical value of the leaf node; and combine the signal names of all leaf nodes and their corresponding physical values to obtain a second physical signal value set.
[0135] In some embodiments, the second processing unit 204 is further configured to: when the data type is an integer or floating-point type, obtain the preset resolution and preset offset corresponding to the leaf node in the second configuration information, convert the extracted byte segment into an integer bus value in big-endian order; restore the physical value based on the integer bus value, preset resolution, and preset offset; when the data type is an enumeration type, convert the extracted byte segment into a target integer, search for an enumeration name matching the target integer in the second configuration information, and obtain the physical value; when the base type is a string type and the length mode is fixed length, read the data according to the preset fixed length. The extracted byte segments are decoded to obtain physical values. When the string type's length mode is dynamic, the first length header is read from the extracted byte segments to determine the content byte length. The content byte segments are then read and decoded according to the content byte length to obtain physical values. When the data type is an array type and the length mode is fixed, the extracted byte segments are read cyclically according to the fixed length. The physical values of each array member are restored. When the array type's length mode is dynamic, the second length header is read from the extracted byte segments to determine the number of members. The physical values of each array member are then restored sequentially according to the number of members.
[0136] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, will cause the processor to perform any step of the vehicle communication data conversion method provided in this application.
[0137] In some embodiments, the computer-readable storage medium may be a random access memory (RAM), a read-only memory (ROM), flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); or it may be a variety of devices that include one or any combination of the above-mentioned memories.
[0138] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0139] In some embodiments, computer-executable instructions may, but do not necessarily, correspond to files in a file system, and may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0140] like Figure 3 As shown, this application also provides a vehicle 30, including a memory 310, a processor 320, and a computer program 311 stored in the memory 310 and executable on the processor. When the processor 320 executes the computer program 311, it implements any step of the above-described vehicle communication data conversion method.
[0141] This application also provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. A vehicle's processor reads the computer program or computer-executable instructions from the computer-readable storage medium and executes the computer program or computer-executable instructions, causing the vehicle to perform any step of the vehicle communication data conversion method described above.
[0142] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for converting vehicle-mounted communication data, characterized in that, include: Obtain the target communication matrix file; The target communication matrix file is parsed to obtain first configuration information and second configuration information, wherein the first configuration information describes the binding relationship between the service method and the parameter data type, and the second configuration information describes the composition structure of each data type; In response to the first processing request, based on the first configuration information and the second configuration information, the first target service method identifier and the first physical signal value set carried in the first processing request are converted into a first message payload byte sequence; In response to the second processing request, based on the first configuration information and the second configuration information, the second target service method identifier and the second message payload byte sequence carried in the second processing request are converted into a second physical signal value set.
2. The vehicle communication data conversion method according to claim 1, characterized in that, The steps for parsing to obtain the first configuration information include: Extract service interface records from the first preset worksheet of the target communication matrix file, wherein the service interface records include service identifier, method event identifier, request response type and parameter definition fields; The service interface record is converted into a first tree structure data with services as the root node and method events as child nodes to obtain the first configuration information. Each method event node in the first tree structure data is associated with a corresponding parameter data type name.
3. The vehicle communication data conversion method according to claim 1, characterized in that, The steps for parsing to obtain the second configuration information include: Extract data type records from the second preset worksheet of the target communication matrix file. The data type records include data type name, data type category, and member definition information. Based on the data type category, a second tree structure data is recursively constructed to obtain the second configuration information. When the data type category is a structure type or an array type, the members of the data type category are nested and parsed to generate corresponding subtree nodes.
4. The vehicle communication data conversion method according to claim 1, characterized in that, The step of converting the first target service method identifier and the first physical signal value set carried in the first processing request into a first message payload byte sequence based on the first configuration information and the second configuration information includes: Based on the first target service method identifier, determine the corresponding first target data type from the first configuration information; Based on the first target data type, obtain the corresponding first target data type tree definition from the second configuration information; The tree definition of the first target data type is recursively expanded to obtain a first linear signal list, wherein each leaf node in the first linear signal list records the member position, data type category and basic type respectively; Traverse the first linear signal list and obtain the first physical signal value corresponding to the current leaf node from the first physical signal value set; The bus value of the current leaf node is determined based on the first physical signal value and the data type category; Based on the bus value and the basic type, generate the byte sequence of the current leaf node; According to the member positions of each leaf node, all byte sequences are concatenated to obtain the first message payload byte sequence.
5. The vehicle communication data conversion method according to claim 4, characterized in that, Determining the bus value of the current leaf node based on the first physical signal value and the data type category includes: When the data type is an integer or floating-point type, obtain the preset resolution and preset offset corresponding to the current leaf node from the second configuration information; The bus value is obtained by performing a linear transformation and rounding based on the first physical signal value, the preset resolution, and the preset offset; When the data type is an enumeration type, the first physical signal value is converted into the corresponding integer value according to the preset discrete value mapping relationship between the second configuration information and the current leaf node, so as to obtain the bus value.
6. The vehicle communication data conversion method according to claim 4, characterized in that, The step of generating the byte sequence of the current leaf node based on the bus value and the basic type includes: When the base type is a string and the length mode is fixed length, the first physical signal value is encoded according to a preset fixed length and filled with a terminator to obtain the byte sequence; When the length mode of the string type is dynamic length, a first length header byte sequence and a content byte sequence are generated; The first length header byte sequence is concatenated with the content byte sequence to obtain the byte sequence, wherein the first length header byte sequence is used to indicate the byte length of the content byte sequence; When the data type is an array type and the length mode is fixed length, the byte sequence of the array members is repeatedly generated until the fixed length is reached; When the length mode of the array type is dynamic length, a second length header byte sequence is generated; The second-length header byte sequence is concatenated with the byte sequences of each array member to obtain the byte sequence, wherein the second-length header byte sequence is used to indicate the number of array members.
7. The vehicle communication data conversion method according to claim 1, characterized in that, The step of converting the second target service method identifier and the second message payload byte sequence carried in the second processing request into a second physical signal value set based on the first configuration information and the second configuration information includes: Based on the second target service method identifier, the corresponding second target data type is determined from the first configuration information; Based on the second target data type, obtain the corresponding second target data type tree definition from the second configuration information; The tree definition of the second target data type is recursively expanded to obtain the second linear signal list, wherein each leaf node in the second linear signal list records the member position, data type category and basic type respectively; According to the order of each leaf node in the second linear signal list, extract the byte segments corresponding to each leaf node sequentially from the second message payload byte sequence; For each leaf node, the physical value of the extracted byte segment is restored according to the data type category and basic type of the leaf node to obtain the physical value of the leaf node. The second set of physical signal values is obtained by combining the signal names of all leaf nodes and their corresponding physical values.
8. The vehicle communication data conversion method according to claim 7, characterized in that, The step of restoring the physical values of the extracted byte segments based on the data type category and basic type of the leaf nodes includes: When the data type is an integer or floating-point type, obtain the preset resolution and preset offset corresponding to the leaf node in the second configuration information, and convert the extracted byte segment into an integer bus value in big-endian order; The physical value is reconstructed based on the integer bus value, the preset resolution, and the preset offset; When the data type is an enumeration type, the extracted byte segment is converted into a target integer, and then the enumeration name that matches the target integer is searched in the second configuration information to obtain the physical value. When the base type is a string and the length mode is fixed length, the extracted byte segment is read and decoded according to the preset fixed length to obtain the physical value; When the length mode of the string type is dynamic length, a first length header is read from the extracted byte segment to determine the content byte length; The content byte segment is read and decoded according to the specified content byte length to obtain the physical value; When the data type is array type and the length mode is fixed length, the extracted byte segments are read in a loop according to the fixed length; Perform physical value restoration on each array member; When the array type's length mode is dynamic length, a second length header is read from the extracted byte segment to determine the number of members; Based on the number of members, each array member is read sequentially to restore the physical value.
9. A vehicle-mounted communication data conversion device, characterized in that, include: The file acquisition unit is used to acquire the target communication matrix file; The file parsing unit is used to parse the target communication matrix file to obtain first configuration information and second configuration information, wherein the first configuration information describes the binding relationship between the service method and the parameter data type, and the second configuration information describes the composition structure of each data type; The first processing unit is configured to, in response to the first processing request, convert the first target service method identifier and the first physical signal value set carried in the first processing request into a first message payload byte sequence based on the first configuration information and the second configuration information; The second processing unit is configured to, in response to the second processing request, convert the second target service method identifier and the second message payload byte sequence carried in the second processing request into a second physical signal value set based on the first configuration information and the second configuration information.
10. A vehicle comprising: The memory and processor are characterized in that the processor, when executing a computer program stored in the memory, implements the steps of the vehicle communication data conversion method as described in any one of claims 1 to 8.
