Communication method and device based on configurable communication protocol
By adopting a configurable communication protocol between vehicle equipment and the Internet of Vehicles platform, and using global data dictionary and vehicle model data model to automatically identify and analyze data, the problem of high development cost and insufficient compatibility of communication protocols between vehicle equipment and the Internet of Vehicles platform is solved. , achieving more efficient protocol compatibility and shorter development cycles.
Patent Information
- Application Number
- CN202110432980.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-21
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-04-21
AI Technical Summary
The communication protocol development cost between vehicle equipment and the Internet of Vehicles platform is high, the cycle is long and the compatibility is insufficient. Especially when accessing new models, it requires a lot of manpower and time to modify the code to adapt to the new protocol.
Using a method based on configurable communication protocol, the global data dictionary and model data model are constructed to automatically identify and analyze model data, realize model data collection, improve the compatibility of communication protocols, and analyze the vehicle end through the configurable protocol analysis engine. Message data.
It reduces development difficulty and cost, shortens development cycle, improves communication protocol compatibility, and realizes flexibility and automated processing of data acquisition for new models.
Smart Images

Figure CN115225654B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and more specifically, to a communication method and device based on a configurable communication protocol. Background Art
[0002] At present, the communication between vehicle-side equipment and the Internet of Vehicles platform mostly adopts private customized air protocols. When the vehicle-side data collection requirements change, such as the access of new models, or the model needs to collect and upload a new data item, the business side, the vehicle-side side and the platform side need to communicate the requirements together. The business side lists all the data items that need to be uploaded for the new model, and the vehicle-side and platform side personnel compare them with the current data items to determine which ones are the same and reusable, which ones are different, and which ones need to be added, formulate the communication protocol, and then compile the communication protocol based on the original communication protocol, and finally conduct joint debugging and testing.
[0003] However, revising the communication protocol can easily lead to incompatibility between the upper and lower protocols. Moreover, when the data collected by the new model is quite different, both the vehicle side and the platform side need to invest a lot of time and manpower to modify the code to adapt to the new communication protocol. Given that the Internet of Vehicles platform needs to connect with more and more new models, the development difficulty has increased, and it is urgent to develop a configurable communication protocol. Summary of the invention
[0004] The technical problem to be solved by the present invention is that, in view of the problems existing in the communication technology scheme between the above-mentioned vehicle equipment and the Internet of Vehicles platform, such as new data collection items or access to new vehicle models, high communication protocol development cost, long cycle, and insufficient compatibility, a communication method, system and equipment based on a configurable communication protocol are proposed.
[0005] The technical solution to the above technical problem provided by the embodiment of the present invention is to provide a communication method based on a configurable communication protocol, which is executed by a vehicle networking platform, and the method comprises the following steps:
[0006] Constructing a data dictionary, wherein the data dictionary includes vehicle data items set according to a dictionary configuration rule, and the vehicle data items include a dictionary ID corresponding to the vehicle-side data one by one;
[0007] Establishing a vehicle model data model corresponding to each vehicle model, and synchronously sending the vehicle model data model to the vehicle end, wherein the vehicle model data includes multiple vehicle data items of the data dictionary;
[0008] The vehicle-side data collected according to the vehicle model data model is received, and vehicle-side message data is generated after encapsulation, and the vehicle-side message data is parsed according to the data dictionary and formatted data is output. In the above communication method based on the configurable communication protocol, the vehicle data item also includes data collection source, device ID, data collection rule, data type, data size, and data annotation; the construction of the data dictionary includes:
[0009] The data dictionary is managed according to the dictionary authority, including adding data, deleting data, changing data and querying data in the data dictionary.
[0010] In the above communication method based on the configurable communication protocol, the step of establishing a vehicle model data model corresponding to each vehicle model and synchronously sending the vehicle model data model to the vehicle end includes:
[0011] Managing the vehicle model data model, including adding data, deleting data, changing data and querying data in the vehicle model data model;
[0012] Accessing the vehicle end, and comparing the vehicle model data model stored in the vehicle end with the vehicle model data model on the Internet of Vehicles platform end to see whether they are consistent;
[0013] When the comparison result between the vehicle model data model stored on the vehicle side and the vehicle model data model on the Internet of Vehicles platform side is inconsistent, the vehicle model data model on the Internet of Vehicles platform side is sent to the vehicle side for loading.
[0014] In the above-mentioned communication method based on the configurable communication protocol, the receiving of the vehicle-side data collected according to the vehicle model data model, generating vehicle-side message data after encapsulation, and parsing the vehicle-side message data according to the data dictionary and outputting format data include:
[0015] Presetting the collection conditions of the vehicle-side data;
[0016] When receiving a trigger collection condition, encapsulating the vehicle-side data collected according to the vehicle model data model to generate vehicle-side message data;
[0017] The configurable protocol parsing engine is called to parse the vehicle-side message data and output format data.
[0018] In the above communication method based on the configurable communication protocol, the calling of the configurable protocol parsing engine to parse the vehicle-side message data and output format data includes:
[0019] Load the data of the data dictionary and the data of all vehicle model data models;
[0020] Transmitting the vehicle-side message data to the configurable protocol parsing engine, and the configurable protocol parsing engine starts a new thread;
[0021] Parsing the vehicle-side message data protocol header, obtaining the configurable protocol version and device ID, retrieving the corresponding vehicle model data model according to the device ID, and binding the vehicle model data model with the vehicle-side message data;
[0022] Parse the vehicle-side message data, obtain the dictionary ID, and determine whether the bound vehicle model data model corresponds to the dictionary ID, retrieve the data type corresponding to the dictionary ID from the data dictionary, call the corresponding data engine library for parsing, obtain the data length and data information, organize the data, dynamically construct the memory data block, and output the memory data list.
[0023] The embodiment of the present invention further provides another communication method based on a configurable communication protocol, which is executed by a vehicle end and includes the following steps:
[0024] Loading a data dictionary, the data dictionary including vehicle data items set according to dictionary configuration rules, the vehicle data items including dictionary IDs corresponding one-to-one to vehicle-side data;
[0025] Loading a corresponding vehicle model data model according to the vehicle model, the vehicle model data including a plurality of vehicle data items of the data dictionary;
[0026] The vehicle-side message data generated by encapsulating the vehicle-side data collected according to the vehicle model data model is uploaded to the vehicle networking platform, so that the vehicle networking platform parses the vehicle-side message data according to the data dictionary and outputs format data.
[0027] In the above-mentioned communication method based on the configurable communication protocol, the vehicle data items also include data collection source, device ID, data collection rules, data type, data size, and data annotation.
[0028] In the above communication method based on the configurable communication protocol, the vehicle model data model corresponding to the vehicle model is loaded according to the vehicle model, and the vehicle model data includes a plurality of vehicle data items of the data dictionary including:
[0029] The vehicle networking platform is connected, and when the comparison result between the vehicle model data model stored on the vehicle side and the vehicle model data model on the vehicle networking platform side is inconsistent, the vehicle model data model on the vehicle networking platform side is loaded.
[0030] In the above communication method based on the configurable communication protocol, the uploading of the vehicle-side data collected and packaged according to the vehicle model data model to the Internet of Vehicles platform, so that the Internet of Vehicles platform parses the vehicle-side data according to the data dictionary and outputs format data includes:
[0031] When the collection condition is triggered, the vehicle-side data is collected according to the vehicle model data model, and the vehicle-side message data is encapsulated and generated and then uploaded to the Internet of Vehicles platform.
[0032] An embodiment of the present invention also provides a communication device based on a configurable communication protocol, comprising a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and the processor executes the computer program to implement any of the steps of the communication method based on the configurable communication protocol described above.
[0033] The communication method and device based on the configurable communication protocol of the embodiment of the present invention builds a global data dictionary. When the vehicle model data collection changes or a new vehicle model is connected, the vehicle model data model is built and combined with the global data dictionary to automatically identify and parse the vehicle model data, complete the vehicle model data collection, improve the compatibility of the communication protocol, reduce the development difficulty, and shorten the development cycle and cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a flow chart of a communication method based on a configurable communication protocol according to a first embodiment of the present invention;
[0035] Figure 2 This is a flow chart of vehicle-side message data analysis in the first embodiment of the present invention;
[0036] Figure 3 is a flow chart of a communication method based on a configurable communication protocol according to a second embodiment of the present invention;
[0037] Figure 4 It is a schematic diagram of a communication device based on a configurable communication protocol according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0039] It should be noted that the data used in the specification and claims of the present invention and the above-mentioned drawings can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0040] like Figure 1 FIG. 1 is a flow chart of a communication method based on a configurable communication protocol according to an embodiment of the present invention. The communication method based on a configurable communication protocol is executed by a vehicle networking platform, and specifically includes the following steps:
[0041] S110. Construct a data dictionary, wherein the data dictionary includes vehicle data items set according to dictionary configuration rules, and the vehicle data items include dictionary IDs corresponding one-to-one to vehicle-side data.
[0042] In step S110, the vehicle data item also includes data collection source, device ID, data collection rule, data type, data size, and data annotation. Preferably, the dictionary configuration rules are shown in Table 1 below:
[0043] Table 1 Dictionary configuration rules table
[0044]
[0045] Specifically, the building of the data dictionary includes: managing the data dictionary according to the dictionary authority, including adding data, deleting data, changing data and querying data in the data dictionary. After obtaining the data dictionary management authority, the vehicle networking platform operator manages the configurable data dictionary.
[0046] Through the above-mentioned global data dictionary design, a dictionary ID with a unique serial number is set for each vehicle-side data, which corresponds one-to-one to the vehicle-side data.
[0047] S120, establishing a vehicle model data model corresponding to each vehicle model, and synchronously sending the vehicle model data model to the vehicle end, wherein the vehicle model data includes multiple vehicle data items of the data dictionary.
[0048] Step S120 also includes:
[0049] Managing the vehicle model data model, including adding data, deleting data, changing data and querying data in the vehicle model data model;
[0050] Accessing the vehicle end, and comparing the vehicle model data model stored in the vehicle end with the vehicle model data model on the Internet of Vehicles platform end to see whether they are consistent;
[0051] When the comparison result between the vehicle model data model stored on the vehicle side and the vehicle model data model on the Internet of Vehicles platform side is inconsistent, the vehicle model data model on the Internet of Vehicles platform side is sent to the vehicle side for loading.
[0052] Specifically, the vehicle networking platform operator manages the vehicle model list corresponding to all vehicle model data models, and each vehicle model has an independent vehicle model data model. The vehicle networking platform operator can add, delete, modify and query the vehicle model data model, where the vehicle model list data is a subset of multiple data items in the data dictionary.
[0053] S130, receiving the vehicle-side data collected according to the vehicle model data model, generating vehicle-side message data after encapsulation, and parsing the vehicle-side message data according to the data dictionary and outputting format data.
[0054] In the above step S130, it also includes:
[0055] The vehicle-side data collection conditions are preset; specifically, the vehicle-side data collection conditions set according to the data collection rules are expressed using the rule engine Rete algorithm, such as collecting the airbag status, and the rule is to collect and upload when a collision occurs. If no collection rules are set, the vehicle-side data is collected normally.
[0056] When receiving the trigger collection condition, the vehicle-side data collected according to the vehicle model data model is encapsulated to generate vehicle-side message data; the vehicle-side message data includes a protocol header and packet data, wherein the protocol header is defined according to the air protocol.
[0057] The configurable protocol parsing engine is called to parse the vehicle-side message data and output format data.
[0058] In the above step S130, it also includes:
[0059] Load the data of the data dictionary and the data of all vehicle model data models;
[0060] Transmitting the vehicle-side message data to the configurable protocol parsing engine, and the configurable protocol parsing engine starts a new thread;
[0061] Parsing the vehicle-side message data protocol header, obtaining the configurable protocol version and device ID, retrieving the corresponding vehicle model data model according to the device ID, and binding the vehicle model data model with the vehicle-side message data;
[0062] Parse the vehicle-side message data, obtain the dictionary ID, and determine whether the bound vehicle model data model corresponds to the dictionary ID, retrieve the data type corresponding to the dictionary ID from the data dictionary, call the corresponding data engine library for parsing, obtain the data length and data information, organize the data, dynamically construct the memory data block, and output the memory data list.
[0063] Specifically, if Figure 2 The figure shows the parsing process of vehicle-side message data. (1) Parse the protocol header according to the protocol header format defined by the air protocol, and obtain information such as the protocol version and device ID. Retrieve the corresponding vehicle model according to the device ID, and bind the vehicle model data model to the message data. (2) Parse the message body according to the configurable protocol format, parse out the dictionary ID, and retrieve whether the bound vehicle model supports this dictionary ID. If supported, retrieve the data type corresponding to this dictionary ID from the data dictionary, and call the corresponding data engine library for parsing. The engine library parses according to this type of data format, parses out the data length, data information and other information, and arranges the data to dynamically construct a memory data block. Then continue to parse the next data dictionary ID until the parsing is completed, and output the constructed memory data list.
[0064] The above method builds a global data dictionary. When the vehicle model data changes or a new vehicle model is connected, the vehicle model data model is built and combined with the global data dictionary to automatically identify and parse the vehicle model data, complete the vehicle model data collection, improve the compatibility of the communication protocol, reduce the development difficulty, and shorten the development cycle and cost.
[0065] like Figure 3 As shown, the embodiment of the present invention also provides another communication method based on a configurable communication protocol, which is executed by the vehicle end and includes the following steps:
[0066] S310. Load a data dictionary, wherein the data dictionary includes vehicle data items set according to dictionary configuration rules, and the vehicle data items include dictionary IDs corresponding one-to-one to vehicle-side data.
[0067] In the above step S310, the vehicle data items also include data collection source, device ID, data collection rules, data type, data size, and data annotation.
[0068] S320. Load a corresponding vehicle model data model according to the vehicle model, wherein the vehicle model data includes a plurality of vehicle data items of the data dictionary.
[0069] The above step S320 includes:
[0070] Connect to the Internet of Vehicles platform, and when the comparison result of the vehicle model data model stored on the vehicle end is inconsistent with the vehicle model data model on the Internet of Vehicles platform end, load the vehicle model data model on the Internet of Vehicles platform end. That is, after the vehicle end is connected to the Internet of Vehicles platform, when it senses that the vehicle model data model has changed, the vehicle end automatically loads the new vehicle model data model to ensure that the vehicle model data model is updated in real time.
[0071] S330, uploading the vehicle-side message data generated by encapsulating the vehicle-side data collected according to the vehicle model data model to the Internet of Vehicles platform, so that the Internet of Vehicles platform parses the vehicle-side message data according to the data dictionary and outputs format data.
[0072] The above step S330 includes:
[0073] When the collection condition is triggered, the vehicle-side data is collected according to the vehicle model data model, and the vehicle-side message data is encapsulated and generated and then uploaded to the Internet of Vehicles platform.
[0074] Specifically, the vehicle-side data collection conditions set according to the data collection rules are expressed using the rule engine Rete algorithm. For example, to collect the airbag status, the rule is to collect and upload when a collision occurs. If no collection rules are set, the vehicle-side data is collected normally.
[0075] like Figure 4 As shown, the embodiment of the present invention further provides a communication device based on a configurable communication protocol, including a memory 41 and a processor 42, wherein the memory 41 stores a computer program that can be run on the processor, and when the processor 42 executes the computer program, the steps of the communication method based on the configurable communication protocol are implemented. The communication device based on the configurable communication protocol in this embodiment is similar to the above Figure 1 or Figure 2 The methods in the corresponding embodiments belong to the same concept, and their specific implementation processes are detailed in the corresponding method embodiments. The technical features in the method embodiments are applicable to the device embodiments and will not be repeated here.
[0076] The communication method and device based on the configurable communication protocol in the embodiment of the present invention automatically identify and parse the vehicle model data through vehicle model data modeling when the vehicle model collection data changes or a new vehicle model is connected, completes vehicle model data collection, improves communication protocol compatibility, reduces development difficulty, and shortens development cycle and cost.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiments can be implemented by means of software plus a necessary general hardware platform, or by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the embodiments of the present invention.
[0078] Therefore, the above is only a preferred specific implementation mode of the present invention, and the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. The protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A communication method based on a configurable communication protocol, which is executed by a vehicle networking platform, characterized in that: The method comprises the following steps: Constructing a data dictionary, wherein the data dictionary includes vehicle data items set according to a dictionary configuration rule, and the vehicle data items include a dictionary ID corresponding to the vehicle-side data one by one; Establishing a vehicle model data model corresponding to each vehicle model, and synchronously sending the vehicle model data model to the vehicle end, wherein the vehicle model data includes multiple vehicle data items of the data dictionary; Receiving the vehicle-side data collected according to the vehicle model data model, generating vehicle-side message data after encapsulation, and parsing the vehicle-side message data according to the data dictionary and outputting format data; The vehicle data items also include data collection source, device ID, data collection rules, data type, data size, and data annotations; The receiving the vehicle-side data collected according to the vehicle model data model, generating vehicle-side message data after encapsulation, and parsing the vehicle-side message data according to the data dictionary and outputting format data includes: Presetting the collection conditions of the vehicle-side data; When receiving a trigger collection condition, encapsulating the vehicle-side data collected according to the vehicle model data model to generate vehicle-side message data; Calling a configurable protocol parsing engine to parse the vehicle-side message data and output format data; The calling of the configurable protocol parsing engine to parse the vehicle-side message data and output format data includes: Load the data of the data dictionary and the data of all vehicle model data models; Transmitting the vehicle-side message data to the configurable protocol parsing engine, and the configurable protocol parsing engine starts a new thread; Parsing the vehicle-side message data protocol header, obtaining the configurable protocol version and the device ID, retrieving the corresponding vehicle model data model according to the device ID, and binding the vehicle model data model with the vehicle-side message data; Parse the vehicle-side message data, obtain the dictionary ID, and determine whether the bound vehicle model data model corresponds to the dictionary ID, retrieve the data type corresponding to the dictionary ID from the data dictionary, call the corresponding data engine library for parsing, obtain the data length and data information, organize the data, dynamically construct the memory data block, and output the memory data list.
2. The communication method based on the configurable communication protocol according to claim 1, characterized in that: The construction of the data dictionary includes: The data dictionary is managed according to the dictionary authority, including adding data, deleting data, changing data and querying data in the data dictionary.
3. The communication method based on the configurable communication protocol according to claim 1, characterized in that: The step of establishing a vehicle model data model corresponding to each vehicle model and synchronously sending the vehicle model data model to the vehicle end includes: Managing the vehicle model data model, including adding data, deleting data, changing data and querying data in the vehicle model data model; Accessing the vehicle end and comparing the vehicle model data model stored in the vehicle end with the vehicle model data model on the Internet of Vehicles platform end to see whether they are consistent; When the comparison result between the vehicle model data model stored on the vehicle side and the vehicle model data model on the Internet of Vehicles platform side is inconsistent, the vehicle model data model on the Internet of Vehicles platform side is sent to the vehicle side for loading.
4. A communication method based on a configurable communication protocol, which is executed by a vehicle end, characterized in that: The method comprises the following steps: Loading a data dictionary, the data dictionary including vehicle data items set according to dictionary configuration rules, the vehicle data items including dictionary IDs corresponding one-to-one to vehicle-side data; Loading a corresponding vehicle model data model according to the vehicle model, the vehicle model data including a plurality of vehicle data items of the data dictionary; Uploading the vehicle-side message data generated by encapsulating the vehicle-side data collected according to the vehicle model data model to the vehicle networking platform end, so that the vehicle networking platform end parses the vehicle-side message data according to the data dictionary and outputs format data; The vehicle data items also include data collection source, device ID, data collection rules, data type, data size, and data annotations; The specific method for the Internet of Vehicles platform to parse the vehicle-side message data according to the data dictionary and output format data is: Load the data of the data dictionary and the data of all vehicle model data models; Transmitting the vehicle-side message data to a configurable protocol parsing engine, and the configurable protocol parsing engine starts a new thread; Parsing the vehicle-side message data protocol header, obtaining the configurable protocol version and the device ID, retrieving the corresponding vehicle model data model according to the device ID, and binding the vehicle model data model with the vehicle-side message data; Parse the vehicle-side message data, obtain the dictionary ID, and determine whether the bound vehicle model data model corresponds to the dictionary ID, retrieve the data type corresponding to the dictionary ID from the data dictionary, call the corresponding data engine library for parsing, obtain the data length and data information, organize the data, dynamically construct the memory data block, and output the memory data list.
5. The communication method based on the configurable communication protocol according to claim 4, characterized in that: The vehicle model data model corresponding to the vehicle model is loaded according to the vehicle model, and the vehicle model data includes a plurality of vehicle data items in the data dictionary including: The vehicle networking platform is connected, and when the comparison result between the vehicle model data model stored on the vehicle side and the vehicle model data model on the vehicle networking platform side is inconsistent, the vehicle model data model on the vehicle networking platform side is loaded.
6. The communication method based on the configurable communication protocol according to claim 5, characterized in that: The uploading of the vehicle-side data collected and packaged according to the vehicle model data model to the Internet of Vehicles platform, so that the Internet of Vehicles platform parses the vehicle-side data according to the data dictionary and outputs format data includes: When the collection condition is triggered, the vehicle-side data is collected according to the vehicle model data model, and the vehicle-side message data is encapsulated and generated and then uploaded to the Internet of Vehicles platform.
7. A communication device based on a configurable communication protocol, characterized in that: The invention comprises a memory and a processor, wherein the memory stores a computer program executable by the processor, and the processor executes the computer program to implement the steps of the communication method based on the configurable communication protocol as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Motorcycle type identifying method in complex scene
CN102646199A
A method for dynamically analyze locomotive event data
CN109491660A
Vehicle parking point data processing method and device, storage medium and terminal
CN112612427A
Methods and apparatus for generating a data dictionary
US20100169361A1
Method and system for deconstructing and searching binary based vehicular data
US20190258727A1
