Vehicle control protocol conversion method and system and related equipment

By automatically accessing and processing the vehicle control API interface, a hash code mapping table is built, which solves the problem of manual intervention in the conversion of new and old vehicle control protocols, and improves the conversion efficiency.

CN120166151APending Publication Date: 2025-06-17SHENZHEN TONGXINGZHE TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510367648.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-06-17

AI Technical Summary

Technical Problem

In the on-board development scenario, the vehicle control protocol of the new supplier needs to be converted into the vehicle control protocol of the existing supplier, which usually requires manual relationship construction, which is huge and inefficient.

Method used

By responding to the addition of the API interface, the project vehicle control instructions are used to access the vehicle control API interfaces of the old and new suppliers, receive and process the returned protocols, perform hashing operations and mapping table construction, so as to automatically establish the relationship between the new and old protocols.

Benefits of technology

It realizes automatic conversion of new and old car control protocols without manual intervention, significantly improving the efficiency of protocol conversion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120166151A_ABST
    Figure CN120166151A_ABST
Patent Text Reader

Abstract

The invention provides a conversion method and system of a vehicle control protocol and related equipment. The method comprises the steps that a vehicle control AP I interface for accessing an old / new supplier is newly added in response to an AP I interface; receiving an old vehicle control protocol and a new vehicle control protocol returned by the old / new supplier vehicle control AP I interface; performing field removal and replacement processing of a preset rule on the newly-added vehicle control protocol to obtain newly-added protocol verification data; performing hash operation on the newly-added protocol verification data to obtain a newly-added protocol hash code; constructing a map mapping table between the newly added protocol hash code and the old vehicle control protocol; when a vehicle control request is received, protocol verification data of a vehicle control protocol used by the vehicle control request is extracted, and a request protocol hash code is obtained through hash operation; and obtaining a target old vehicle control protocol from the map mapping table based on the request protocol hash code to perform vehicle control. According to the invention, when the newly-added AP I interface is identified, the newly-added protocol is automatically obtained, and the relationship between the newly-added protocol and the old protocol is constructed based on the preset rule, so that manpower is not needed, and the protocol conversion efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle control technology, and in particular, to a method and system for converting vehicle control protocols and related devices. Background Art

[0002] In the vehicle development scenario, there are many vehicle models and many suppliers. Each supplier has its own vehicle control protocol. If a new supplier enters this vehicle enterprise or project, it is necessary to convert the vehicle control protocol of the new supplier into the vehicle control protocol of the original supplier. The existing technology mainly constructs the relationship between the new and old protocols manually, with a huge workload and low efficiency.

[0003] Therefore, the existing technology still needs to be improved and developed. Summary of the Invention

[0004] The present invention provides a method and system for converting vehicle control protocols and related devices. The main purpose of the present invention is to solve the technical problems mentioned in the background art of the existing technology.

[0005] The first aspect of the present invention provides a method for converting vehicle control protocols, including:

[0006] In response to the addition of an API interface, use the vehicle control instructions of the project to access the vehicle control API interface of the old supplier and the newly added supplier's vehicle control API interface respectively;

[0007] Receive the old vehicle control protocol and the newly added vehicle control protocol returned by the old supplier's vehicle control API interface and the newly added supplier's vehicle control API interface respectively;

[0008] Perform field removal and field replacement processing on the newly added vehicle control protocol according to preset rules to obtain newly added protocol verification data;

[0009] Perform a hash operation on the newly added protocol verification data to obtain a newly added protocol hash code;

[0010] Construct a map mapping table between the newly added protocol hash code and the old vehicle control protocol;

[0011] When a vehicle control request from a user terminal is received, extract the protocol verification data of the vehicle control protocol used in the vehicle control request, and perform a hash operation to obtain a request protocol hash code;

[0012] Based on the request protocol hash code, obtain the target old vehicle control protocol from the map mapping table for vehicle control.

[0013] In an optional implementation manner of the first aspect of the present invention, the performing field removal and field replacement processing on the newly added vehicle control protocol according to preset rules to obtain newly added protocol verification data includes:

[0014] Traverse each field in the newly added vehicle control protocol, and determine whether the field is an essential field;

[0015] If the field does not belong to the essential fields, remove the field from the newly added vehicle control protocol;

[0016] If the field belongs to the essential fields, further obtain the type of the field. If the type of the field belongs to the target type, perform fixed-field replacement processing on the field. If the type of the field does not belong to the target type, do not process the field.

[0017] In an optional implementation manner of the first aspect of the present invention, the traversing each field in the newly added vehicle control protocol and determining whether the field is an essential field includes:

[0018] Traverse each field in the newly added vehicle control protocol, and determine whether the field is the target field defined by the parameter;

[0019] If the field is the target field defined by the parameter, determine that the field is an essential field;

[0020] If the field is not the target field defined by the parameter, determine that the field is a non-essential field.

[0021] In an optional implementation manner of the first aspect of the present invention, the if the field belongs to the essential fields, further obtain the type of the field. If the type of the field belongs to the target type, perform fixed-field replacement processing on the field. If the type of the field does not belong to the target type, do not process the field includes:

[0022] If the field belongs to the essential fields, further obtain the type of the field;

[0023] If the type of the field is text type, replace the field with a fixed field;

[0024] If the type of the field is enumeration type, keep the field unchanged.

[0025] In an optional implementation manner of the first aspect of the present invention, the when receiving a vehicle control request from a user terminal, extracting protocol verification data of the vehicle control protocol used in the vehicle control request and performing hash operation to obtain a request protocol hash code includes:

[0026] Parse the vehicle control request of the user terminal to obtain the vehicle control protocol used in the vehicle control request;

[0027] Perform field removal and field replacement processing on the vehicle control protocol used in the vehicle control request according to the preset rules to obtain protocol verification data;

[0028] Perform a hash operation on the protocol verification data to obtain a request protocol hash code.

[0029] In an optional implementation manner of the first aspect of the present invention, the vehicle control based on obtaining the target old vehicle control protocol from the map mapping table according to the request protocol hash code includes:

[0030] Determine whether a target hash code identical to the request protocol hash code is recorded in the map mapping table;

[0031] If a target hash code identical to the request protocol hash code is recorded in the map mapping table, obtain the target old vehicle control protocol based on the target hash code for vehicle control;

[0032] If no target hash code identical to the request protocol hash code is recorded in the map mapping table, generate an alarm to prompt that the vehicle control protocol has changed and the old vehicle control protocol cannot be compatible.

[0033] In an optional implementation manner of the first aspect of the present invention, the construction of the map mapping table between the new protocol hash code and the old vehicle control protocol includes:

[0034] Use the new protocol hash code as the key value and the old vehicle control protocol as the value value to perform key-value binding between the new protocol hash code and the old vehicle control protocol to obtain a map mapping table.

[0035] The second aspect of the present invention provides a conversion system for a vehicle control protocol, and the conversion system for the vehicle control protocol includes:

[0036] An interface access module, configured to, in response to the addition of an API interface, use project vehicle control instructions to respectively access an old supplier vehicle control API interface and a new supplier vehicle control API interface;

[0037] A protocol receiving module, configured to receive the old vehicle control protocol and the new vehicle control protocol respectively returned by the old supplier vehicle control API interface and the new supplier vehicle control API interface;

[0038] A protocol processing module, configured to perform field removal and field replacement processing on the new vehicle control protocol according to preset rules to obtain new protocol verification data;

[0039] A hash operation module, configured to perform a hash operation on the new protocol verification data to obtain a new protocol hash code;

[0040] A map mapping construction module, configured to construct a map mapping table between the new protocol hash code and the old vehicle control protocol;

[0041] A request hash code acquisition module, configured to extract protocol verification data of a vehicle control protocol used in the vehicle control request when receiving a vehicle control request from a user terminal, and perform a hash operation to obtain a request protocol hash code;

[0042] A protocol lookup module, configured to obtain a target old vehicle control protocol from the map mapping table based on the request protocol hash code for vehicle control.

[0043] A third aspect of the present invention provides a conversion device for a vehicle control protocol, where the conversion device for the vehicle control protocol includes: a memory and at least one processor, instructions are stored in the memory, and the memory and the at least one processor are interconnected through a line;

[0044] The at least one processor invokes the instructions in the memory to cause the conversion device for the vehicle control protocol to execute the vehicle control protocol conversion method according to any one of the first aspects of the present invention above.

[0045] A fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the vehicle control protocol conversion method according to any one of the first aspects of the present invention above.

[0046] Beneficial effects: The present invention provides a vehicle control protocol conversion method, system and related devices. The method includes responding to the API interface to newly access the vehicle control API interfaces of old / new suppliers; receiving the old vehicle control protocol and the newly added vehicle control protocol returned by the old / new supplier vehicle control API interfaces; performing field removal and replacement processing on the newly added vehicle control protocol according to preset rules to obtain newly added protocol verification data; performing a hash operation on the newly added protocol verification data to obtain a newly added protocol hash code; constructing a map mapping table between the newly added protocol hash code and the old vehicle control protocol; when receiving a vehicle control request, extracting the protocol verification data of the vehicle control protocol used in the vehicle control request and performing a hash operation to obtain a request protocol hash code; obtaining a target old vehicle control protocol from the map mapping table based on the request protocol hash code for vehicle control. When the present invention identifies a newly added API interface, it will automatically obtain the newly added protocol and build a relationship with the old protocol based on preset rules, without manual intervention, improving the protocol conversion efficiency. Description of the Drawings

[0047] Figure 1 It is a schematic diagram of an embodiment of the main method steps of a vehicle control protocol conversion method of the present invention;

[0048] Figure 2 It is a schematic diagram of an embodiment of a vehicle control protocol conversion system of the present invention;

[0049] Figure 3 It is a schematic diagram of an embodiment of a conversion device for a vehicle control protocol of the present invention. Specific implementation mode

[0050] In the specification, claims and above-mentioned drawings of the present invention, terms such as "first", "second", "third", "fourth", etc. (if any) are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described here can be implemented in an order other than those illustrated or described here. In addition, the term "comprising" or "having" and any variation thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0051] For ease of understanding, the specific process of the embodiments of the present invention will be described below. Please refer to Figure 1 , the first aspect of the present invention provides a method for converting vehicle control protocols, including:

[0052] S100. In response to the addition of an API interface, use the project vehicle control instruction to access the old supplier vehicle control API interface and the newly added supplier vehicle control API interface respectively; in the present invention, for the convenience of vehicle control protocol management, the API interfaces of all suppliers can be maintained in an API interface set, and the changes in the set are monitored in real time. When there is a newly added API interface in the API interface set, the system is triggered to automatically use the project vehicle control instruction to access the old supplier vehicle control API interface and the newly added supplier vehicle control API interface respectively. It should be noted that the old supplier vehicle control API interface here in the present invention can be a benchmark supplier vehicle control API interface specified in advance by humans. The benchmark supplier vehicle control API interface can be the earliest vehicle control API interface added to the API interface set. All subsequent newly added vehicle control protocols will be converted into the vehicle control protocol of the benchmark supplier vehicle control API interface. In the present invention, the project vehicle control instruction can be an interface access instruction compatible with all manufacturers. After receiving the project vehicle control instruction, it will automatically send its own vehicle control protocol to the vehicle control protocol conversion system.

[0053] S200. Receive the old vehicle control protocol and the newly added vehicle control protocol returned by the old supplier vehicle control API interface and the newly added supplier vehicle control API interface respectively; in the present invention, after the old supplier vehicle control API interface receives the project vehicle control instruction, it will automatically return the old vehicle control protocol (i.e., the benchmark vehicle control protocol) it has to the vehicle control protocol conversion system, and the newly added supplier vehicle control API interface will return the newly added vehicle control protocol it has to the vehicle control protocol conversion system. In the present invention, the old vehicle control protocol and the newly added vehicle control protocol can be vehicle control protocols defined in json format.

[0054] S300. Remove fields and replace fields according to preset rules for the newly added vehicle control protocol to obtain newly added protocol verification data. In the present invention, before establishing the relationship between the newly added vehicle control protocol and the old vehicle control protocol, certain processing is performed on the newly added vehicle control protocol to obtain useful verification data in the newly added vehicle control protocol, thereby avoiding the problem that the verification process is easily cracked when directly processing the newly added vehicle control protocol.

[0055] In an optional implementation manner of step S300 of the present invention, the removing fields and replacing fields according to preset rules for the newly added vehicle control protocol to obtain newly added protocol verification data includes:

[0056] S301. Traverse each field in the newly added vehicle control protocol and determine whether the field belongs to a necessary field. The basis for determining whether the field is a necessary field can be whether the field is meaningful in the specific control of the protocol. In other words, it is whether the field is meaningful in guiding control. Therefore, in an exemplary implementation manner of the present invention, this step may include: traversing each field in the newly added vehicle control protocol and determining whether the field is the target field defined by the parameter; if the field is the target field defined by the parameter, it is determined that the field is a necessary field; if the field is not the target field defined by the parameter, it is determined that the field is a non-necessary field. It should be noted that the parameter definition in the present invention can be a function definition or a numerical value and range definition.

[0057] S302. If the field does not belong to the necessary fields, remove the field from the newly added vehicle control protocol. In this implementation manner of the present invention, when the newly added vehicle control protocol extracts verification information, fields that are meaningless for vehicle control in the protocol are deleted, that is, the present invention only retains the valid fields in the newly added vehicle control protocol.

[0058] S303. If the field belongs to the necessary field, the type of the field is further obtained. If the type of the field belongs to the target type, the field is replaced with a fixed field. If the type of the field does not belong to the target type, the field is not processed. In the present invention, after eliminating the meaningless fields in the newly added vehicle control protocol, the remaining fields in the newly added vehicle control protocol are further processed. Specifically, this step may include: if the field belongs to the necessary field, the type of the field is further obtained; if the type of the field is text type, the field is replaced with a fixed field; if the type of the field is an enumeration type, the field remains unchanged. In the present invention, the way to further process the remaining fields in the newly added vehicle control protocol is to set the text type fields (infinite content) in the remaining fields to fixed content, such as NULL. The advantage of the present invention is that it can further retain the meaningful fields in the newly added vehicle control protocol, reduce the amount of data processing required for subsequent hash operations, and thus improve data processing efficiency.

[0059] S400, performing a hash operation on the newly added protocol verification data to obtain a newly added protocol hash code; a hash operation (Hash Function) is a mathematical function that converts input data of any length into a fixed-length output (hash value). It has the characteristics of irreversibility, uniqueness (anti-collision) and determinism, and is widely used in fields such as data integrity verification, password storage, and digital signatures. Using a hash operation on the newly added protocol verification data can ensure the standardization of generated data. In the present invention, the hash algorithms used can be MD5, SHA-1, and SHA-256, and SHA-256 can be used as an example.

[0060] S500, constructing a map mapping table between the newly added protocol hash code and the old vehicle control protocol; in the present invention, the newly added protocol hash code is used as the identifier of the new protocol to replace the new protocol and the old protocol for relationship binding, and the newly added protocol hash code replaces the overall content of the new protocol to construct the map mapping table, which can reduce the storage volume of the mapping table data while ensuring the uniqueness of the mapping between the new and old protocols. In an optional implementation of the first aspect of the present invention, the construction of the map mapping table between the newly added protocol hash code and the old vehicle control protocol includes: using the newly added protocol hash code as the key value and the old vehicle control protocol as the value value, performing key-value binding between the newly added protocol hash code and the old vehicle control protocol to obtain a map mapping table. In the present invention, after the map mapping table is constructed, the subsequent terminal control request can match the corresponding old protocol in the map mapping table according to the protocol it carries, thereby converting it into the corresponding old protocol to control the vehicle-mounted product.

[0061] S600. When receiving a vehicle control request from a user terminal, extract the protocol verification data of the vehicle control protocol used in the vehicle control request, and perform a hash operation to obtain a request protocol hash code; in the present invention, the method for obtaining the protocol verification data of the vehicle control protocol used in the vehicle control request is the same as the method for obtaining the verification data of the new vehicle control protocol, and the specific algorithm used in the hash operation is also the same. In this way, it can be ensured that the request protocol hash code finally obtained from the vehicle control protocol used in the vehicle control request can be accurately matched if there is a recorded new vehicle control protocol in the map mapping table. Specifically, step S600 of the present invention may specifically include: parsing the vehicle control request of the user terminal to obtain the vehicle control protocol used in the vehicle control request; performing field removal and field replacement processing on the vehicle control protocol used in the vehicle control request according to the preset rules to obtain protocol verification data; performing a hash operation on the protocol verification data to obtain a request protocol hash code.

[0062] S700. Based on the request protocol hash code, obtain a target old vehicle control protocol from the map mapping table for vehicle control. In the present invention, the protocol used in the vehicle control request of the user terminal may not belong to the recorded new vehicle control protocol. Therefore, in this step, there are also two results for whether a target old vehicle control protocol can be matched. Specifically, step S700 of the present invention may include: determining whether there is a target hash code recorded in the map mapping table that is the same as the request protocol hash code; if there is a target hash code recorded in the map mapping table that is the same as the request protocol hash code, obtain a target old vehicle control protocol based on the target hash code for vehicle control; if there is no target hash code recorded in the map mapping table that is the same as the request protocol hash code, generate an alarm to prompt that the vehicle control protocol has changed and the old vehicle control protocol cannot be compatible.

[0063] Generally speaking, the specific idea of the vehicle control protocol conversion method of the present invention can be summarized as follows:

[0064] 1. Obtain the interface API of the old supplier, obtain the interface API of the new supplier, and obtain the project vehicle control instruction.

[0065] 2. Use the vehicle control instruction to request the interface APIs of the old supplier and the new supplier, record the results on both sides respectively, and call them the old protocol and the new protocol respectively.

[0066] 3. For each field of the new protocol:

[0067] 3.1 If this field is not necessary, directly remove it.

[0068] 3.2 If this field is necessary, then perform the following operations.

[0069] 3.2.1 If it is text type (unlimited content), set it to a fixed content, such as NULL.

[0070] 3.2.3 If it is an enumeration type, keep it unchanged.

[0071] 4. Perform a hash operation on the remaining content of the new protocol and save it as the new protocol key for the information to be verified in the new protocol.

[0072] 5. Use the new protocol key as the hash key and the content of the old protocol as the hash value, and save this map mapping.

[0073] 6. When a user requests the new protocol using a vehicle control command, obtain the instruction key according to the rules in steps 3 and 4, and find the old protocol from the map table in step 5 to achieve protocol conversion.

[0074] 7. If the old protocol cannot be found in the map, give an alarm, indicating that the new protocol has changed and is not compatible with the old protocol.

[0075] The advantages of using the method of the present invention are as follows: 1. For the vehicle control protocol of a vehicle, there are at least one thousand and at most several thousand items. If all the old and new protocols are manually aligned, the workload is extremely huge. This method can quickly find the protocol alignment and save a lot of workload; 2. Different inspections are performed according to the necessity of the fields and the different types of the results of the field values, which can meet the use in various different situations; 3. Monitor whether the new protocol changes at one time, reducing the development difficulty of the new protocol.

[0076] See Figure 2 , the second aspect of the present invention provides a vehicle control protocol conversion system, and the vehicle control protocol conversion system includes:

[0077] An interface access module 10, which is used to respond to the addition of an API interface and use the vehicle control instructions of the project to access the old supplier vehicle control API interface and the newly added supplier vehicle control API interface respectively;

[0078] A protocol receiving module 20, which is used to receive the old vehicle control protocol and the newly added vehicle control protocol respectively returned by the old supplier vehicle control API interface and the newly added supplier vehicle control API interface;

[0079] A protocol processing module 30, which is used to perform field removal and field replacement processing on the newly added vehicle control protocol according to preset rules to obtain newly added protocol verification data;

[0080] A hash operation module 40, which is used to perform a hash operation on the newly added protocol verification data to obtain a newly added protocol hash code;

[0081] The map mapping construction module 50 is used to construct a map mapping table between the newly added protocol hash code and the old vehicle control protocol;

[0082] The request hash code acquisition module 60 is used to, when receiving a vehicle control request from a user terminal, extract the protocol verification data of the vehicle control protocol used in the vehicle control request and perform a hash operation to obtain a request protocol hash code;

[0083] The protocol lookup module 70 is used to obtain a target old vehicle control protocol from the map mapping table based on the request protocol hash code for vehicle control.

[0084] In an optional implementation manner of the second aspect of the present invention, the protocol processing module includes:

[0085] The field necessity judgment unit is used to traverse each field in the newly added vehicle control protocol and judge whether the field belongs to a necessary field;

[0086] The removal processing unit is used to, if the field does not belong to the necessary field, remove the field from the newly added vehicle control protocol;

[0087] The replacement processing unit is used to, if the field belongs to the necessary field, further obtain the type of the field, and if the type of the field belongs to the target type, perform a fixed field replacement process on the field, and if the type of the field does not belong to the target type, do not process the field.

[0088] In an optional implementation manner of the second aspect of the present invention, the field necessity judgment unit includes:

[0089] The field traversal subunit is used to traverse each field in the newly added vehicle control protocol and judge whether the field is the target field defined by the parameter;

[0090] The necessary field determination subunit is used to, if the field is the target field defined by the parameter, determine that the field is a necessary field;

[0091] The non-necessary field determination subunit is used to, if the field is not the target field defined by the parameter, determine that the field is a non-necessary field.

[0092] In an optional implementation manner of the second aspect of the present invention, the replacement processing unit includes:

[0093] The field type acquisition subunit is used to, if the field belongs to the necessary field, further obtain the type of the field;

[0094] The field replacement subunit is used to, if the type of the field is text type, replace the field with a fixed field;

[0095] A field maintenance subunit, configured to keep the field unchanged if the type of the field is an enumeration type.

[0096] In an alternative embodiment of the second aspect of the present invention, the request hash code acquisition module includes:

[0097] A request parsing unit, configured to parse a vehicle control request of a user terminal to obtain the vehicle control protocol used in the vehicle control request;

[0098] A request verification data acquisition unit, configured to perform field removal and field replacement processing of the preset rules on the vehicle control protocol used in the vehicle control request to obtain protocol verification data;

[0099] A request hash operation unit, configured to perform a hash operation on the protocol verification data to obtain a request protocol hash code.

[0100] In an alternative embodiment of the second aspect of the present invention, the protocol lookup module includes:

[0101] A record lookup unit, configured to determine whether a target hash code identical to the request protocol hash code is recorded in the map mapping table;

[0102] A protocol acquisition unit, configured to, if a target hash code identical to the request protocol hash code is recorded in the map mapping table, obtain a target old vehicle control protocol based on the target hash code for vehicle control;

[0103] An alarm unit, configured to, if no target hash code identical to the request protocol hash code is recorded in the map mapping table, generate an alarm to prompt that the vehicle control protocol has changed and the old vehicle control protocol cannot be compatible.

[0104] In an alternative embodiment of the second aspect of the present invention, the map mapping construction module includes:

[0105] A key-value relationship construction unit, configured to bind the new protocol hash code and the old vehicle control protocol in a key-value form with the new protocol hash code as the key value and the old vehicle control protocol as the value value to obtain a map mapping table.

[0106] Figure 3FIG. 0 is a schematic structural diagram of a vehicle control protocol conversion device provided by an embodiment of the present invention. The vehicle control protocol conversion device may vary greatly due to different configurations or performances, and may include one or more processors 80 (central processing units, CPUs) (for example, one or more processors) and a memory 90, and one or more storage media 100 for storing application programs or data (for example, one or more mass storage devices). Among them, the memory and the storage medium may be transient storage or persistent storage. The program stored in the storage medium may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the vehicle control protocol conversion device. Further, the processor may be configured to communicate with the storage medium and execute a series of instruction operations in the storage medium on the vehicle control protocol conversion device.

[0107] The vehicle control protocol conversion device of the present invention may further include one or more power supplies 110, one or more wired or wireless network interfaces 120, one or more input / output interfaces 130, and / or one or more operating systems, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and so on. Those skilled in the art can understand that Figure 3 the shown structural diagram of the vehicle control protocol conversion device does not constitute a limitation on the vehicle control protocol conversion device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0108] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are run on a computer, the computer is caused to execute the steps of the vehicle control protocol conversion method.

[0109] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described system or system and unit can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0111] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of various embodiments of the present invention.

Claims

1. A method for converting a vehicle control protocol, characterized in that: include: In response to the addition of the API interface, the project vehicle control command is used to access the vehicle control API interface of the old supplier and the vehicle control API interface of the new supplier respectively; Receiving the old vehicle control protocol and the newly added vehicle control protocol returned by the old supplier vehicle control API interface and the newly added supplier vehicle control API interface respectively; Performing field removal and field replacement processing of preset rules on the newly added vehicle control protocol to obtain new protocol verification data; Performing a hash operation on the newly added protocol verification data to obtain a newly added protocol hash code; Constructing a map mapping table between the newly added protocol hash code and the old vehicle control protocol; When receiving a vehicle control request from a user terminal, extracting protocol verification data of the vehicle control protocol used by the vehicle control request, and performing a hash operation to obtain a request protocol hash code; Based on the request protocol hash code, the target old vehicle control protocol is obtained from the map mapping table to perform vehicle control.

2. The vehicle control protocol conversion method according to claim 1, characterized in that: The performing of field removal and field replacement processing of preset rules on the newly added vehicle control protocol to obtain the newly added protocol verification data includes: Traversing each field in the newly added vehicle control protocol to determine whether the field is a necessary field; If the field does not belong to the necessary field, the field is removed from the newly added vehicle control protocol; If the field belongs to the necessary field, the type of the field is further obtained. If the type of the field belongs to the target type, the field is subjected to fixed field replacement processing. If the type of the field does not belong to the target type, the field is not processed.

3. The vehicle control protocol conversion method according to claim 2, characterized in that: The traversing each field in the newly added vehicle control protocol and determining whether the field is a necessary field includes: Traversing each field in the newly added vehicle control protocol to determine whether the field is a target field defined by the parameter; If the field is a target field defined by a parameter, determining that the field is a necessary field; If the field is not a target field defined by the parameter, the field is determined to be a non-essential field.

4. The vehicle control protocol conversion method according to claim 2, characterized in that: If the field belongs to the necessary field, further obtaining the type of the field, if the type of the field belongs to the target type, performing fixed field replacement processing on the field, and if the type of the field does not belong to the target type, not processing the field includes: If the field belongs to the necessary field, further obtaining the type of the field; If the type of the field is text type, the field is replaced with a fixed field; If the type of the field is an enumeration type, the field remains unchanged.

5. The vehicle control protocol conversion method according to claim 1, characterized in that: When receiving a vehicle control request from a user terminal, extracting the protocol verification data of the vehicle control protocol used by the vehicle control request, and performing a hash operation to obtain a request protocol hash code includes: Parsing the vehicle control request of the user terminal to obtain the vehicle control protocol used by the vehicle control request; The vehicle control request uses the vehicle control protocol to perform field removal and field replacement processing of the preset rule to obtain protocol verification data; A hash operation is performed on the protocol verification data to obtain a request protocol hash code.

6. The vehicle control protocol conversion method according to claim 1, characterized in that: The obtaining of the target old vehicle control protocol from the map mapping table based on the request protocol hash code to perform vehicle control includes: Determine whether the map mapping table contains a target hash code that is the same as the request protocol hash code; If the map table records a target hash code that is the same as the request protocol hash code, the target old vehicle control protocol is obtained based on the target hash code to perform vehicle control; If the map mapping table does not record the target hash code that is the same as the request protocol hash code, an alarm is generated to prompt that the vehicle control protocol has changed and is incompatible with the old vehicle control protocol.

7. The vehicle control protocol conversion method according to claim 1, characterized in that: The constructing of a map mapping table between the newly added protocol hash code and the old vehicle control protocol includes: Using the newly added protocol hash code as the key value and the old vehicle control protocol as the value, the newly added protocol hash code and the old vehicle control protocol are bound in key-value form to obtain a map mapping table.

8. A vehicle control protocol conversion system, characterized in that: The vehicle control protocol conversion system includes: An interface access module, used to respond to the addition of an API interface and use the project vehicle control instruction to access the vehicle control API interface of the old supplier and the vehicle control API interface of the new supplier respectively; A protocol receiving module, used to receive the old vehicle control protocol and the newly added vehicle control protocol returned by the old supplier vehicle control API interface and the newly added supplier vehicle control API interface respectively; A protocol processing module, used to perform field removal and field replacement processing of preset rules on the newly added vehicle control protocol to obtain new protocol verification data; A hash operation module, used to perform a hash operation on the newly added protocol verification data to obtain a newly added protocol hash code; A map mapping construction module, used to construct a map mapping table between the newly added protocol hash code and the old vehicle control protocol; A request hash code acquisition module is used to extract the protocol verification data of the vehicle control protocol used by the vehicle control request when receiving the vehicle control request from the user terminal, and perform hash operation to obtain the request protocol hash code; The protocol search module is used to obtain the target old vehicle control protocol from the map mapping table based on the request protocol hash code to perform vehicle control.

9. A vehicle control protocol conversion device, characterized in that: The vehicle control protocol conversion device comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instruction in the memory so that the vehicle control protocol conversion device executes the vehicle control protocol conversion method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, a vehicle control protocol conversion method as described in any one of claims 1 to 7 is implemented.