Digital key testing method and device, electronic equipment and medium
The CANFD tool sends and receives messages, parses response messages to determine the test results, solving the complexity of the digital key operation function test on the vehicle side and improving the testing efficiency.
Patent Information
- Application Number
- CN202411212351.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2024-12-06
AI Technical Summary
In the prior art, the digital key module integrated on the vehicle end results in complex operational function testing process and low testing efficiency.
Send and receive messages through the CANFD tool, parse response messages to determine test results, and simplify the test process of digital key operation function.
Improves the testing efficiency of the digital key operation function, simplifies the testing process, and avoids complexity.
Smart Images

Figure CN119094414A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital key testing, and more specifically, to a digital key testing method, device, electronic device and medium. Background Art
[0002] Currently, more and more car companies have integrated digital key modules on the vehicle side. Usually, the digital key-related information on the vehicle side will be displayed on the large screen on the vehicle. However, the large screen on the vehicle also displays other functional modules besides the digital key, which makes the testing process of the digital key-related operation functions complicated and leads to low testing efficiency. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a digital key testing method, device, electronic device and medium, so as to solve the above-mentioned problems existing in the prior art and improve the testing efficiency of the operating functions of the digital key.
[0004] In a first aspect, a digital key testing method is provided, which is applied to a testing system. The method may include:
[0005] Generate a sending message according to the acquired test request of the operation function of the digital key, wherein the sending message includes an operation instruction;
[0006] Sending the sending message to the vehicle end corresponding to the digital key through the CANFD tool, and after the vehicle end processes the sending message, receiving multiple receiving messages returned by the vehicle end through the CANFD tool;
[0007] Determining a response message among a plurality of received messages according to the operation instruction of sending the message;
[0008] Parsing the response message to obtain readable information;
[0009] A test result is determined according to the readable information.
[0010] In a possible implementation, before obtaining a test request for an operation function of a digital key, the method includes:
[0011] According to the communication data format of the car manufacturer, the sending message corresponding to the CANFD channel function and the operation function of the digital key is encapsulated in the form of a function to obtain the encapsulation result of the CANFD channel function and the operation function of the digital key;
[0012] And, the CANFD channel function and the operation function of the digital key are key-encapsulated to obtain a plurality of function keys;
[0013] A test system is determined according to the encapsulation results of the CANFD channel function and the operation function of the digital key and the corresponding function keys.
[0014] In a possible implementation, the CANFD channel function includes: starting the CANFD channel and closing the CANFD channel;
[0015] The operating functions of the digital key include obtaining a key list, obtaining the currently connected key, physical card pairing, owner pairing, deleting a key, freezing a key, unfreezing a key, and deleting all keys.
[0016] In a possible implementation, before sending the transmission message to the vehicle end corresponding to the digital key through the CANFD tool, the method further includes:
[0017] Generate a connection instruction according to the acquired channel connection request; the connection instruction includes a library function defined by the manufacturer of the CANFD tool;
[0018] According to the library function, determine the calling script;
[0019] According to the calling script, connect the CANFD hardware on the vehicle side.
[0020] In a possible implementation, the structure of the received message includes: a start delimiter, an identifier, a control field, a data field, a CRC field, an ACK field, an end delimiter and an inter-frame space.
[0021] In a possible implementation, the fields in the data field are bit fields.
[0022] In a second aspect, a digital key testing device is provided, which may include:
[0023] A generating unit, configured to generate a sending message according to the acquired test request of the operation function of the digital key, wherein the sending message includes an operation instruction;
[0024] A sending unit, used for sending the sending message to the vehicle end corresponding to the digital key through a CANFD tool;
[0025] A receiving unit, configured to receive a plurality of received messages returned by the vehicle end through a CANFD tool after the vehicle end processes the sent message;
[0026] A determination unit, configured to determine a response message among a plurality of received messages according to the operation instruction of sending the message;
[0027] A parsing unit, used for parsing the response message to obtain readable information;
[0028] The determining unit is further configured to determine a test result according to the readable information.
[0029] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0030] Memory, used to store computer programs;
[0031] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.
[0032] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0033] The present application provides a method for testing a digital key, the method comprising: generating a transmission message according to a test request for the operation function of the digital key obtained, the transmission message including an operation instruction; sending the transmission message to the vehicle end corresponding to the digital key through a CANFD tool, and receiving multiple reception messages returned by the vehicle end through the CANFD tool after the vehicle end processes the transmission message; determining a response message among multiple reception messages according to the operation instruction of the transmission message; parsing the response message to obtain readable information; and determining the test result according to the readable information. The method can realize the requirements of the development test of the operation function of the digital key through the test system, avoids the problem of complex operation function test process related to the digital key, and thus improves the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 A flowchart of a method for testing a digital key provided in an embodiment of the present application;
[0036] Figure 2 A schematic diagram of a test system provided in an embodiment of the present application;
[0037] Figure 3 A schematic diagram of the structure of a digital key testing device provided in an embodiment of the present application;
[0038] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] Currently, more and more car companies have integrated digital key modules on the vehicle side. Usually, the digital key-related information on the vehicle side will be displayed on the large screen on the vehicle. However, the large screen on the vehicle also displays other functional modules besides the digital key, which makes the testing process of the digital key-related operation functions complicated and leads to low testing efficiency.
[0041] Therefore, the present application provides a digital key testing method to solve the above-mentioned problems existing in the prior art and improve the testing efficiency of the operating functions of the digital key.
[0042] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0043] Figure 1 A flowchart of a method for testing a digital key provided in an embodiment of the present application is shown below. Figure 1 As shown, the method is applied to a test system, and the method may include:
[0044] Step S110: Generate a sending message according to the acquired test request of the operation function of the digital key.
[0045] Before executing step S110, the method further includes creating a test system, combining Figure 2 As shown, the test system can include two functions: CANFD channel function and digital key operation function, as well as the clearing function and operation results corresponding to each function.
[0046] Specifically, according to the communication data format of the car manufacturer, the sending messages corresponding to the CANFD channel function and the operation function of the digital key are encapsulated in the form of functions to obtain the encapsulation results of the CANFD channel function and the digital key function;
[0047] Furthermore, the CANFD channel function and the operation function of the digital key are key-encapsulated to obtain multiple function keys; the CANFD channel function includes: starting the CANFD channel and closing the CANFD channel;
[0048] Determine the test system based on the encapsulation results of the CANFD channel function and the operating function of the digital key and the corresponding function buttons.
[0049] For example: according to the communication data format requirements provided by the car manufacturer, the sending messages corresponding to functions such as digital key activation (physical card pairing), obtaining key list, obtaining currently connected keys, owner pairing, deleting keys, deleting all keys, freezing keys, and unfreezing keys are encapsulated in the form of functions for calling when using the corresponding functions, and the process messages and parsing result messages are automatically obtained after the operation function is called.
[0050] In this method, Figure 2 The simulation case in the interface system shown is used to realize the operation function of the simulated vehicle-side large-screen digital key.
[0051] Step S110 may specifically include: obtaining a channel connection request corresponding to the CANFD channel function triggered by the operator, and generating a connection instruction according to the channel connection request; the connection instruction includes a library function defined by the manufacturer of the CANFD tool; determining a call script according to the library function, and connecting the CANFD hardware on the vehicle side according to the call script. This process can be understood as: writing a script to call and connect the CANFD hardware according to the library function defined by the CANFD tool manufacturer, and obtaining all the original message data generated by large-screen communication, BNCM communication, Tbox communication, etc. through the CANFD hardware connection, and saving the original message data; writing the interface provided by the CANFD tool manufacturer to call the tool as the entry for obtaining and sending messages.
[0052] After connecting to the CANFD hardware on the vehicle side, obtain the test request of the operator to trigger the function button corresponding to any operation function; for example, if the operator wants to test the operation function corresponding to the delete key, the operator only needs to click the function button corresponding to the delete key.
[0053] Afterwards, according to the triggering action (clicking the function button corresponding to the delete key), the test request is determined, and according to the test request, a send message is generated. It can be understood that when configuring the test system, since the send messages corresponding to the CANFD channel function and the operation function of the digital key are encapsulated in the form of functions, once the function button is triggered, a corresponding send message will be generated. The send message includes an operation instruction. For example, if the delete key is triggered, the generated send message contains an operation instruction to delete key X (the specific key identifier to be deleted can be selected in the test system), and there is a corresponding identifier in the operation instruction.
[0054] In some embodiments, the structure of the received message includes: a start delimiter, an identifier, a control field, a data field, a CRC field, an ACK field, an end delimiter and an inter-frame space; wherein the fields in the data field are bit fields. In the data field, an 8-bit byte is usually used as the basic unit. If a data item can be represented by less than 8 bits, a bit field can be defined to store the data item. Multiple bit fields are combined in one byte. For example, assuming that there are three data items A, B, and C that require 2 bits, 3 bits, and 3 bits of space respectively, each data item in the prior art occupies one byte separately, requiring a total of 3 bytes. These three data items can be placed in the same byte. In this method, the bit field is used instead of the byte field in the prior art to reduce the data width. This approach can effectively reduce the total length of the message, especially when a large amount of data needs to be transmitted frequently, thereby improving network communication efficiency.
[0055] It should be noted that the start delimiter is used to indicate the beginning of the message; the identifier is used to distinguish different messages; the control field contains the data length code and reserved bits; the data field is used to store data; the CRC field is used for error detection; the ACK field is used to confirm reception; the end delimiter is used to mark the end of the message; and the interframe space is used to separate the time interval between two consecutive messages.
[0056] In some embodiments, CAN FD message error detection and correction may include: the CRC field calculates a checksum based on polynomial division, and the checksum is appended to the sent data. The test system recalculates the CRC through the same polynomial division and compares it with the received CRC value to determine whether the data is complete and correct;
[0057] In some embodiments, CANFD message error detection and correction may also include: adding additional error correction codes to the data so that the test system can correct a certain number of error bits without retransmission. Specifically, the original data (which can be understood as the data with transmission) is divided into groups of fixed size; FEC coding is added to each group of data, for example, using a simple linear coding such as Hamming code. After receiving, the test system decodes each group of data and corrects the errors.
[0058] Step S120: Send the sending message to the vehicle end corresponding to the digital key through the CANFD tool. After the vehicle end processes the sending message, multiple receiving messages returned by the vehicle end are received through the CANFD tool.
[0059] Specifically, in step S110, the interface provided by the CANFD tool manufacturer is written to call the tool as an entry for obtaining and sending messages, and the message is sent to the vehicle end corresponding to the digital key through the entry.
[0060] The vehicle side will process the sent message to generate a response message and return the response message to the test system. It should be noted that the CANFD tool returns not only the response message, but also multiple received messages from all functional modules on the vehicle side, and all received messages are saved.
[0061] Step S130: Filter multiple received messages to determine a response message.
[0062] Specifically, according to the operation instruction in the sent message, it can also be understood that the multiple received messages are filtered one by one through the identification bit information (identifier) in the sent message, so as to determine the response message.
[0063] Step S140: parse the response message to obtain readable information, and determine the test result based on the readable information.
[0064] Specifically, the response message is parsed word by word into readable information according to a preset data format.
[0065] The readable information is displayed in a display column corresponding to the message information in the test system to determine the test result.
[0066] For example, the test is for the operation function corresponding to the deletion key, and the operator triggers the deletion of key A. The readable information corresponding to the message information is that key A has been deleted; if key A exists in the acquired key list, the test result is that there is a problem with the deletion function. If key A does not exist in the acquired key list, the test result is that there is no problem with the deletion function.
[0067] In some embodiments, data of the response message is differentiated to determine multi-frame data and single-frame data; the multi-frame data is parsed to output readable information corresponding to the multi-frame data; and the single-frame data is parsed to output readable information corresponding to the single-frame data.
[0068] This method is based on the interface display function of the test system, encapsulating hardware connection, message sending, message display, key selection and other functions into button form for use and displaying test results, realizing message sending and message receiving and parsing, so as to meet the requirements of digital key operation function development and testing.
[0069] The present application provides a method for testing a digital key, the method comprising: generating a transmission message according to a test request for the operation function of the digital key obtained, the transmission message including an operation instruction; sending the transmission message to the vehicle end corresponding to the digital key through a CANFD tool, and receiving multiple reception messages returned by the vehicle end through the CANFD tool after the vehicle end processes the transmission message; determining a response message among multiple reception messages according to the operation instruction of the transmission message; parsing the response message to obtain readable information; and determining the test result according to the readable information. The method can realize the requirements of the development test of the operation function of the digital key through the test system, avoids the problem of complex operation function test process related to the digital key, and thus improves the test efficiency.
[0070] Corresponding to the above method, the embodiment of the present application also provides a digital key testing device, such as Figure 3 As shown, the device comprises:
[0071] A generating unit 310, configured to generate a sending message according to the acquired test request of the operation function of the digital key, wherein the sending message includes an operation instruction;
[0072] The sending unit 320 is used to send the sending message to the vehicle end corresponding to the digital key through a CANFD tool;
[0073] A receiving unit 330, configured to receive a plurality of received messages returned by the vehicle end through a CANFD tool after the vehicle end processes the sent message;
[0074] A determination unit 340, configured to determine a response message among the plurality of received messages according to the operation instruction of sending the message;
[0075] The parsing unit 350 is used to parse the response message to obtain readable information;
[0076] The determining unit 340 is further configured to determine a test result according to the readable information.
[0077] The functions of each functional unit of a digital key testing device provided in the above embodiment of the present application can be achieved through the above method steps. Therefore, the specific working process and beneficial effects of each unit in a digital key testing device provided in the embodiment of the present application will not be repeated here.
[0078] The present application also provides an electronic device, such as Figure 4 As shown, it includes a processor 410 , a communication interface 420 , a memory 430 and a communication bus 440 , wherein the processor 410 , the communication interface 420 , and the memory 430 communicate with each other via the communication bus 440 .
[0079] Memory 430, for storing computer programs;
[0080] The processor 410 is used to execute the program stored in the memory 430 to implement the following steps:
[0081] Generate a sending message according to the acquired test request of the operation function of the digital key, wherein the sending message includes an operation instruction;
[0082] Sending the sending message to the vehicle end corresponding to the digital key through the CANFD tool, and after the vehicle end processes the sending message, receiving multiple receiving messages returned by the vehicle end through the CANFD tool;
[0083] Determining a response message among a plurality of received messages according to the operation instruction of sending the message;
[0084] Parsing the response message to obtain readable information;
[0085] A test result is determined according to the readable information.
[0086] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0087] The communication interface is used for communication between the above electronic device and other devices.
[0088] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0089] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0090] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be seen in Figure 1 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.
[0091] In another embodiment provided in the present application, a computer-readable storage medium is also provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes a digital key testing method described in any of the above embodiments.
[0092] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute a digital key testing method described in any one of the above embodiments.
[0093] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0094] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] Unless otherwise defined, the technical terms or scientific terms used in this application should be understood by people with ordinary skills in the field to which the present invention belongs. "First", "second" and similar words used in this application do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect", "couple" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0098] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the present application embodiments are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application embodiments.
[0099] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application are within the scope of the embodiments in the present application and their equivalents, the embodiments in the present application are also intended to include these modifications and variations.
Claims
1. A method for testing a digital key, characterized in that: Applied to a test system, the method comprises: Generate a sending message according to the acquired test request of the operation function of the digital key, wherein the sending message includes an operation instruction; Sending the sending message to the vehicle end corresponding to the digital key through the CANFD tool, and after the vehicle end processes the sending message, receiving multiple receiving messages returned by the vehicle end through the CANFD tool; Determining a response message among a plurality of received messages according to the operation instruction of sending the message; Parsing the response message to obtain readable information; A test result is determined according to the readable information.
2. The method according to claim 1, characterized in that Before obtaining a test request for an operation function of the digital key, the method includes: According to the communication data format of the car manufacturer, the sending message corresponding to the CANFD channel function and the operation function of the digital key is encapsulated in the form of a function to obtain the encapsulation result of the CANFD channel function and the operation function of the digital key; And, the CANFD channel function and the operation function of the digital key are key-encapsulated to obtain a plurality of function keys; A test system is determined according to the encapsulation results of the CANFD channel function and the operation function of the digital key and the corresponding function keys.
3. The method according to claim 2, characterized in that The CANFD channel functions include: starting the CANFD channel and closing the CANFD channel; The operating functions of the digital key include obtaining a key list, obtaining the currently connected key, physical card pairing, owner pairing, deleting a key, freezing a key, unfreezing a key, and deleting all keys.
4. The method according to claim 1, characterized in that Before sending the transmission message to the vehicle end corresponding to the digital key through the CANFD tool, the method further includes: Generate a connection instruction according to the acquired channel connection request; the connection instruction includes a library function defined by the manufacturer of the CANFD tool; According to the library function, determine the calling script; According to the calling script, connect the CANFD hardware on the vehicle side.
5. The method according to claim 1, characterized in that The structure of the received message includes: a start delimiter, an identifier, a control field, a data field, a CRC field, an ACK field, an end delimiter and an inter-frame space.
6. The method according to claim 5, characterized in that The fields in the data field are bit fields.
7. A digital key testing device, characterized in that: Applied in a test system, the device comprises: A generating unit, configured to generate a sending message according to the acquired test request of the operation function of the digital key, wherein the sending message includes an operation instruction; A sending unit, used for sending the sending message to the vehicle end corresponding to the digital key through a CANFD tool; A receiving unit, configured to receive a plurality of received messages returned by the vehicle end through a CANFD tool after the vehicle end processes the sent message; A determination unit, configured to determine a response message among a plurality of received messages according to the operation instruction of sending the message; A parsing unit, used for parsing the response message to obtain readable information; The determining unit is further configured to determine a test result according to the readable information.
8. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.
