Testing method and device of Internet of Vehicles software, server and medium
By receiving and parsing messages from Internet of Vehicles software, determining business scenarios and generating response messages, the problem of Internet of Vehicles software testing in the existing technology relying on real vehicles, achieving large-scale, high-concurrency, and automated testing, and simplifying OTA protocol management.
Patent Information
- Application Number
- CN202311444226.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-01
- Publication Date
- 2025-05-06
AI Technical Summary
The existing technology is difficult to meet the needs of large-volume, high-concurrency, and automated testing of Internet of Vehicles software, and the testing depends on real vehicles, making it difficult to manage the update of OTA protocols.
By receiving the first message, the business scenario triggered by the Internet of Vehicles software is determined based on the protocol version information and parameter configuration information, and the reply message is generated to realize communication tests between the on-board terminal, the cloud and the Internet of Vehicles software without the need for actual vehicle communication.
It can meet the needs of large-scale, high-concurrency and automated testing without the need for real vehicle joint commissioning, and simplify the management and version comparison of OTA protocols.
Smart Images

Figure CN119945956A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of testing, and in particular to a testing method, device, server and medium for Internet of Vehicles software. Background Art
[0002] The Internet of Vehicles refers to the use of wireless communication technology by on-board devices to effectively utilize vehicle dynamic information in the information network platform and provide different functional services during vehicle operation. In the Internet of Vehicles, the communication between the on-board terminal (such as TBOX), the cloud and the user terminal (i.e. the Internet of Vehicles software) is achieved through the Over-The-Air Technology (OTA) protocol.
[0003] With the update of OTA protocol, vehicle manufacturers need to conduct tests to ensure smooth communication between vehicle terminals and the cloud and user terminals. Usually, the testing of Internet of Vehicles software needs to be completed in the vehicle. However, the above test methods are completely dependent on real vehicles and are difficult to meet the needs of large-scale, high-concurrency, and automated testing. Summary of the invention
[0004] The present application provides a method for testing Internet of Vehicles software, which does not require testing on a vehicle and can meet the requirements of large-scale, high-concurrency, and automated testing. The present application also provides a device, server, and medium corresponding to the above method.
[0005] In a first aspect, the present application provides a method for testing Internet of Vehicles software. The method comprises:
[0006] receiving a first message;
[0007] Determining a candidate service scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message;
[0008] Decoding the first message according to the parameter configuration information indicated by the first message to obtain a second message, where the second message includes parameter values corresponding to a plurality of parameter items;
[0009] Comparing parameter values corresponding to multiple parameter items of the candidate business scenario with parameter values corresponding to multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software;
[0010] Generate a response message for the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0011] In some possible implementations, after receiving the first message, the method further includes:
[0012] Determining the key of the vehicle-mounted terminal from pre-configured key information according to the identification information of the vehicle-mounted terminal;
[0013] The first message is decrypted using the key of the vehicle-mounted terminal.
[0014] In some possible implementations, determining, according to the protocol version information indicated by the first message, a candidate service scenario triggered by the Internet of Vehicles software includes:
[0015] Determine the protocol version information according to the protocol version number, application version number, application identifier and message identifier of the first message;
[0016] According to the protocol version information, candidate business scenarios triggered by the Internet of Vehicles software are determined.
[0017] In some possible implementations, decoding the first message according to the parameter configuration information indicated by the first message to obtain the second message includes:
[0018] Determine the parameter configuration information according to the protocol version number, application version number, application identifier and message identifier of the first message;
[0019] The first message is decoded using the parameter configuration information to obtain a second message.
[0020] In some possible implementations, the decoding the first message by using the parameter configuration information to obtain the second message includes:
[0021] Storing the parameter configuration information in the form of a class;
[0022] The first message is decoded according to the class corresponding to the parameter configuration information to obtain a second message.
[0023] In some possible implementations, generating a response message for the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software includes:
[0024] Determine a response parameter item and a parameter value corresponding to the response parameter item according to the business scenario triggered by the Internet of Vehicles software;
[0025] Storing the response parameter items in the form of classes;
[0026] Using the parameter value corresponding to the response parameter item, assign a value to the class corresponding to the response parameter item to generate a response message for the first message.
[0027] In some possible implementations, the method further includes:
[0028] Encoding the response message to obtain an encoded response message;
[0029] The encoded response message is encrypted using the key of the vehicle-mounted terminal.
[0030] In a second aspect, the present application provides a testing device for Internet of Vehicles software. The device comprises:
[0031] A receiving module, used for receiving a first message;
[0032] A determination module, configured to determine a candidate service scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message;
[0033] A decoding module, configured to decode the first message according to the parameter configuration information indicated by the first message to obtain a second message, wherein the second message includes parameter values corresponding to a plurality of parameter items;
[0034] The determination module is further configured to compare parameter values corresponding to the multiple parameter items of the candidate business scenario with parameter values corresponding to the multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software;
[0035] A generation module is used to generate a response message of the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0036] In some possible implementations, the device further includes a decryption module, and the decryption module is configured to:
[0037] Determining the key of the vehicle-mounted terminal from pre-configured key information according to the identification information of the vehicle-mounted terminal;
[0038] The first message is decrypted using the key of the vehicle-mounted terminal.
[0039] In some possible implementations, the determining module is specifically configured to:
[0040] Determine the protocol version information according to the protocol version number, application version number, application identifier and message identifier of the first message;
[0041] According to the protocol version information, candidate business scenarios triggered by the Internet of Vehicles software are determined.
[0042] In some possible implementations, the decoding module is specifically used to:
[0043] Determine the parameter configuration information according to the protocol version number, application version number, application identifier and message identifier of the first message;
[0044] The first message is decoded using the parameter configuration information to obtain a second message.
[0045] In some possible implementations, the decoding module is specifically used to:
[0046] Storing the parameter configuration information in the form of a class;
[0047] The first message is decoded according to the class corresponding to the parameter configuration information to obtain a second message.
[0048] In some possible implementations, the generating module is specifically used to:
[0049] Determine a response parameter item and a parameter value corresponding to the response parameter item according to the business scenario triggered by the Internet of Vehicles software;
[0050] Storing the response parameter items in the form of classes;
[0051] Using the parameter value corresponding to the response parameter item, assign a value to the class corresponding to the response parameter item to generate a response message for the first message.
[0052] In some possible implementations, the device further includes an encryption module, and the encryption module is used to:
[0053] Encoding the response message to obtain an encoded response message;
[0054] The encoded response message is encrypted using the key of the vehicle-mounted terminal.
[0055] In a third aspect, the present application provides a server, wherein the server comprises a processor and a memory, wherein the memory stores instructions, and the processor executes the instructions so that the server executes the method as described in the first aspect of the present application or any implementation of the first aspect.
[0056] In a fourth aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores instructions, which, when executed on a server, enable the server to execute the method described in the first aspect or any one of the implementations of the first aspect.
[0057] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations.
[0058] Based on the above description, it can be seen that the technical solution of this application has the following beneficial effects:
[0059] Specifically, the method first receives a first message, determines a candidate business scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message, decodes the first message according to the parameter configuration information indicated by the first message, and obtains a second message, wherein the second message includes parameter values corresponding to multiple parameter items, then compares the parameter values corresponding to the multiple parameter items of the candidate business scenario with the parameter values corresponding to the multiple parameter items of the second message, determines the business scenario triggered by the Internet of Vehicles software, and generates a response message for the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0060] In this method, the protocol version and business scenario are pre-configured, and then the hit business scenario can be matched according to the protocol version information and parameter configuration information indicated in the received message, and a response message under the business scenario can be generated. Under different protocol versions, by simulating different business scenarios, communication testing between the vehicle terminal, the cloud and the Internet of Vehicles software can be achieved without actual vehicle joint debugging, thus meeting diverse testing needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0062] Figure 1 A flowchart of a method for testing Internet of Vehicles software provided in an embodiment of the present application;
[0063] Figure 2 A schematic diagram of the structure of a vehicle networking software testing platform provided in an embodiment of the present application;
[0064] Figure 3 A schematic diagram of the structure of a vehicle networking software testing device provided in an embodiment of the present application;
[0065] Figure 4 A schematic diagram of the structure of a server for implementing Internet of Vehicles software testing provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0067] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0068] It should be noted that the concepts such as "first" and "second" mentioned in this application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0069] It should be noted that the modifications of "one" and "plurality" mentioned in the present application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0070] In order to facilitate understanding of the technical solution of the present application, the specific application scenarios in the present application are described below.
[0071] The Internet of Vehicles refers to the use of wireless communication technology by on-board equipment to effectively utilize vehicle dynamic information in the information network platform and provide different functional services during vehicle operation. In the Internet of Vehicles, communication is achieved through the Over-The-Air Technology (OTA) protocol. Specifically, through the OTA protocol, the vehicle side can establish communication with the cloud through the on-board terminal (such as TBOX), and then interact with the user terminal (i.e., the Internet of Vehicles software) through the cloud, thereby realizing two-way communication between the user terminal, the cloud, and the vehicle side.
[0072] With the update of OTA protocol, vehicle manufacturers need to conduct tests to ensure smooth communication between vehicle terminals and the cloud and user terminals. Due to the complex interaction and cumbersome configuration of OTA protocol, the testing of Internet of Vehicles software usually requires the use of real vehicles to achieve end-to-end verification capabilities, that is, the testing of Internet of Vehicles software needs to be completed in the vehicle.
[0073] However, the above test methods are completely dependent on real vehicles and are difficult to meet the needs of large-scale, high-concurrency, and automated testing. In addition, the above methods are not conducive to the management, review, and version comparison of OTA protocols, and are time-consuming and labor-intensive.
[0074] Based on this, an embodiment of the present application provides a method for testing Internet of Vehicles software. Specifically, firstly, a first message is received, and a candidate business scenario triggered by the Internet of Vehicles software is determined according to the protocol version information indicated by the first message, and the first message is decoded according to the parameter configuration information indicated by the first message to obtain a second message, the second message including parameter values corresponding to multiple parameter items, and then the parameter values corresponding to the multiple parameter items of the candidate business scenario are compared with the parameter values corresponding to the multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software, and a response message of the first message is generated according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0075] In this method, the protocol version and business scenario are pre-configured, and then the hit business scenario can be matched according to the protocol version information and parameter configuration information indicated in the received message, and a response message under the business scenario can be generated. Under different protocol versions, by simulating different business scenarios, communication testing between the vehicle terminal, the cloud and the Internet of Vehicles software can be achieved without actual vehicle joint debugging, thus meeting diverse testing needs.
[0076] Next, the testing method of the Internet of Vehicles software provided in the embodiment of the present application is described in detail with reference to the accompanying drawings.
[0077] See also Figure 1 The flowchart of a method for testing Internet of Vehicles software shown in FIG. 1 specifically includes the following steps:
[0078] S101: Receive a first message.
[0079] The first message, also called a downlink message, refers to a message sent by a user terminal (ie, the Internet of Vehicles software). In some possible implementations, the first message can be received in real time by monitoring the gateway via a User Datagram Protocol (UDP) channel.
[0080] In some embodiments, after receiving the first message, the first message needs to be decrypted. In specific implementation, the key of the vehicle terminal (such as TBOX) can be determined from pre-configured key information according to the identification information of the vehicle terminal, and the first message can be decrypted using the key of the vehicle terminal.
[0081] The identification information of the vehicle-mounted terminal can be obtained from the first message. For example, the identification information of the vehicle-mounted terminal can be the unique code tboxCommId of TBOX. For another example, the identification information of the vehicle-mounted terminal can also be the unique identifier tboxSn of TBOX.
[0082] In the embodiment of the present application, the tester can pre-configure the key information of multiple vehicle terminals, for example, configure the correspondence between the identification information of the vehicle terminal and the key of the vehicle terminal. In this way, the key of the vehicle terminal can be determined by querying from the pre-configured key information using the identification information of the vehicle terminal.
[0083] After the key of the vehicle-mounted terminal is determined, the first message can be decrypted. For example, the first message can be decrypted using the advanced encryption standard (AES) algorithm. In this way, subsequent processing of the first message is facilitated.
[0084] S102: Determine a candidate service scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message.
[0085] Protocol version information refers to information used to characterize a protocol version. In some possible implementations, the protocol version information can be determined by message data in the first message. Specifically, the protocol version information can be determined based on the protocol version number, application version number, application identifier (AID) and message identifier (MID) of the first message, thereby determining the candidate business scenarios triggered by the Internet of Vehicles software based on the protocol version information.
[0086] The candidate service scenario refers to a possible source service scenario of the first message, that is, the first message is a message generated from the candidate service scenario. In the embodiment of the present application, by pre-configuring the correspondence between different protocol versions and different service scenarios, the candidate service scenario can be determined using the protocol version information.
[0087] Specifically, the business scenarios that meet the current version protocol information may be queried based on the identification information and version protocol information of the vehicle-mounted terminal, thereby determining the candidate business scenarios.
[0088] It should be noted that when testers configure business scenarios, they can configure from multiple dimensions. For example, testers can configure business scenarios from the dimensions of vehicle model, vehicle group, and vehicle to meet different configuration requirements.
[0089] S103: Decode the first message according to the parameter configuration information indicated by the first message to obtain a second message.
[0090] Parameter configuration information refers to information used to characterize message parameters. In some possible implementations, the parameter configuration information can be determined by message data in the first message. Specifically, the parameter configuration information can be determined based on the protocol version number, application version number, application identifier (AID) and message identifier (MID) of the first message, so that the first message is decoded using the parameter configuration information to obtain the second message.
[0091] Since the first message has not been decoded yet, it is impossible to determine the parameter items and corresponding parameter values of the first message by parsing the first message. Therefore, in the embodiment of the present application, by pre-configuring parameter configuration information, the parameter items of the first message can be determined according to the parameter configuration information, so as to facilitate subsequent decoding of the first message.
[0092] The following example is used to illustrate that the protocol version number in the first message is 201, the application version number is 2.0, the application identifier is 111, and the message identifier is 1. At this time, based on the above four message data, the parameter configuration information of the first message can be determined, and the parameter configuration information may include the parameter items of the first message.
[0093] After determining the parameter configuration information, the parameter configuration information can be stored in the form of a class, for example, a Java source code of a class (including a main class and a subclass) is generated according to the parameter configuration information and stored in a string type. Then, according to the class corresponding to the parameter configuration information, the first message is decoded to obtain a second message. For example, the Java source code of the string type can be dynamically compiled and loaded by reflection to achieve decoding of the first message, and the second message obtained after decoding includes parameter values corresponding to multiple parameter items.
[0094] S104: Compare parameter values corresponding to multiple parameter items of the candidate business scenario with parameter values corresponding to multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software.
[0095] In the embodiment of the present application, when the tester configures the business scenario, the parameter values corresponding to the parameter items under the business scenario can be configured at the same time. In this way, the parameter values corresponding to the multiple parameter items of the candidate business scenario can be extracted from the second message for the multiple parameter items of the candidate business scenario, and the business scenario triggered by the Internet of Vehicles software can be determined by comparing the parameter values.
[0096] The following example is used for explanation. The candidate business scenarios include business scenario 1 and business scenario 2. The parameter items of business scenario 1 include parameter item A and parameter item B. The parameter value corresponding to parameter item A is a1, and the parameter value corresponding to parameter item B is b. The parameter items of business scenario 2 include parameter item A and parameter item C. The parameter value corresponding to parameter item A is a2, and the parameter value corresponding to parameter item C is c. That is, when the parameter value of parameter item A is a1 and the parameter value of parameter item B is b, business scenario 1 is satisfied, and when the parameter value of parameter item A is a2 and the parameter value of parameter item C is c, business scenario 2 is satisfied.
[0097] At this time, for business scenario 1, parameter item A and parameter item B can be extracted from the second message to determine whether the parameter value corresponding to parameter item A and the parameter value corresponding to parameter item B in the second message meet business scenario 1, that is, whether the parameter value corresponding to parameter item A in the second message is a1, and whether the parameter value corresponding to parameter item B in the second message is b. If not, for business scenario 2, parameter item A and parameter item C are extracted from the second message to determine whether the parameter value corresponding to parameter item A and the parameter value corresponding to parameter item C in the second message meet business scenario 2, that is, whether the parameter value corresponding to parameter item A in the second message is a2, and whether the parameter value corresponding to parameter item C in the second message is c, thereby determining the business scenario triggered by the Internet of Vehicles software.
[0098] S105: Generate a response message for the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0099] Response parameter information refers to the parameter information of the response message in the current business scenario. In the embodiment of the present application, the tester can pre-configure the parameter information of the response message in different business scenarios, such as the response parameter items, the parameter values corresponding to the response parameter items, etc. In this way, after determining the business scenario triggered by the Internet of Vehicles software, the response parameter information can be determined according to the business scenario, thereby generating a response message.
[0100] In specific implementation, the response parameter items and the parameter values corresponding to the response parameter items can be determined first according to the business scenario triggered by the Internet of Vehicles software. It should be noted that when there are multiple responses to the business scenario triggered by the Internet of Vehicles software, the response parameter items and the parameter values corresponding to the response parameter items of the multiple responses can be determined respectively according to the pre-configured response steps.
[0101] Next, the response parameter item is stored in the form of a class, for example, a Java source code of a class (including a main class and a subclass) is generated according to the response parameter item and stored in a string type. Then, the class corresponding to the response parameter item is assigned a value using the parameter value corresponding to the response parameter item to generate a response message of the first message. For example, the Java source code of the string type can be dynamically compiled and loaded by reflection, and the parameter value corresponding to the response parameter item is assigned to the class instance, thereby generating a response message of the first message.
[0102] After generating the response message, the response message can also be encoded to obtain the encoded response message, and the encoded response message can be encrypted using the key of the vehicle terminal (for example, using the AES algorithm to encrypt). In this way, the encoded and encrypted response message can be sent to the gateway to complete the message response.
[0103] The method provided in the embodiment of the present application can be executed by a vehicle networking software testing platform. Figure 2The structural diagram of a vehicle networking software testing platform shown in the figure includes a TBOX scheduling engine and an OTA scenario engine. The TBOX scheduling engine listens through the UDP channel, receives a first message from the TBOX gateway, decrypts the first message, and sends the decrypted first message to the OTA scenario engine. The OTA scenario engine determines the candidate business scenarios triggered by the vehicle networking software, determines the parameter configuration information, and stores the class of the parameter configuration information as a string type. Then, the TBOX scheduling engine compiles and loads the string type class, decodes the first message, and obtains the second message.
[0104] Next, the TBOX scheduling engine extracts the parameter value of the parameter item in the second message and sends it to the OTA scenario engine. The OTA scenario engine determines the business scenario triggered by the Internet of Vehicles software, stores the class of the response parameter item as a string type, and determines the parameter value of the response parameter item. Then, the TBOX scheduling engine compiles and loads the string type class, assigns it to the class instance, generates a response message, encodes and encrypts the response message, and then sends the response message to the TBOX gateway through the UDP channel to realize the message response.
[0105] Based on the above description, an embodiment of the present application provides a method for testing Internet of Vehicles software. The method first receives a first message, determines a candidate business scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message, decodes the first message according to the parameter configuration information indicated by the first message, obtains a second message, the second message includes parameter values corresponding to multiple parameter items, then compares the parameter values corresponding to the multiple parameter items of the candidate business scenario with the parameter values corresponding to the multiple parameter items of the second message, determines the business scenario triggered by the Internet of Vehicles software, and generates a response message for the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0106] In this method, the protocol version and business scenario are pre-configured, and then the hit business scenario can be matched according to the protocol version information and parameter configuration information indicated in the received message, and a response message under the business scenario can be generated. Under different protocol versions, by simulating different business scenarios, communication testing between the vehicle terminal, the cloud and the Internet of Vehicles software can be achieved without actual vehicle joint debugging, thus meeting diverse testing needs.
[0107] Based on the above method provided in the embodiment of the present application, the embodiment of the present application also provides a test device for the Internet of Vehicles software corresponding to the above method. The units / modules involved in the embodiments of the present application can be implemented by software or by hardware. The name of the unit / module does not constitute a limitation on the unit / module itself in some cases.
[0108] See also Figure 3 The structural diagram of the test device of the Internet of Vehicles software shown in FIG. 300 includes:
[0109] The receiving module 301 is used to receive a first message;
[0110] A determination module 302, configured to determine a candidate service scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message;
[0111] A decoding module 303, configured to decode the first message according to the parameter configuration information indicated by the first message to obtain a second message, where the second message includes parameter values corresponding to a plurality of parameter items;
[0112] The determination module 302 is further configured to compare parameter values corresponding to the multiple parameter items of the candidate business scenario with parameter values corresponding to the multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software;
[0113] The generation module 304 is used to generate a response message of the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0114] In some possible implementations, the device further includes a decryption module, and the decryption module is configured to:
[0115] Determining the key of the vehicle-mounted terminal from pre-configured key information according to the identification information of the vehicle-mounted terminal;
[0116] The first message is decrypted using the key of the vehicle-mounted terminal.
[0117] In some possible implementations, the determining module 302 is specifically configured to:
[0118] Determine the protocol version information according to the protocol version number, application version number, application identifier and message identifier of the first message;
[0119] According to the protocol version information, candidate business scenarios triggered by the Internet of Vehicles software are determined.
[0120] In some possible implementations, the decoding module 303 is specifically configured to:
[0121] Determine the parameter configuration information according to the protocol version number, application version number, application identifier and message identifier of the first message;
[0122] The first message is decoded using the parameter configuration information to obtain a second message.
[0123] In some possible implementations, the decoding module 303 is specifically configured to:
[0124] Storing the parameter configuration information in the form of a class;
[0125] The first message is decoded according to the class corresponding to the parameter configuration information to obtain a second message.
[0126] In some possible implementations, the generating module 304 is specifically configured to:
[0127] Determine a response parameter item and a parameter value corresponding to the response parameter item according to the business scenario triggered by the Internet of Vehicles software;
[0128] Storing the response parameter items in the form of classes;
[0129] Using the parameter value corresponding to the response parameter item, assign a value to the class corresponding to the response parameter item to generate a response message for the first message.
[0130] In some possible implementations, the device further includes an encryption module, and the encryption module is used to:
[0131] Encoding the response message to obtain an encoded response message;
[0132] The encoded response message is encrypted using the key of the vehicle-mounted terminal.
[0133] The vehicle networking software testing device 300 according to the embodiment of the present application may correspond to the method described in the embodiment of the present application, and the above and other operations and / or functions of each module / unit of the vehicle networking software testing device 300 are respectively to implement Figure 1 For the sake of brevity, the corresponding processes of each method in the illustrated embodiment are not described in detail here.
[0134] The functions described above in this document may be performed at least in part by one or more hardware logic components. Figure 4 The schematic diagram of the structure of the server 400 for implementing the Internet of Vehicles software test is shown in FIG. Figure 4 The server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0135] like Figure 4As shown, the server 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 to a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the server 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0136] Typically, the following devices may be connected to the I / O interface 405: input devices 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 408 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 409. The communication devices 409 may allow the server 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The server 400 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0137] The present application also provides a computer-readable storage medium, also referred to as a machine-readable medium. In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0138] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0139] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the server, the server: receives a first message; determines a candidate business scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message; decodes the first message according to the parameter configuration information indicated by the first message to obtain a second message; compares the parameter values corresponding to multiple parameter items of the candidate business scenario with the parameter values corresponding to multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software; generates a response message for the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
[0140] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device. When the computer program is executed by a processing device, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0141] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
[0142] Although several specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present application. Certain features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0143] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for testing Internet of Vehicles software, characterized in that: The method comprises: receiving a first message; Determining a candidate service scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message; Decoding the first message according to the parameter configuration information indicated by the first message to obtain a second message, where the second message includes parameter values corresponding to a plurality of parameter items; Comparing parameter values corresponding to multiple parameter items of the candidate business scenario with parameter values corresponding to multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software; Generate a response message for the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
2. The method according to claim 1, characterized in that After receiving the first message, the method further includes: Determining the key of the vehicle-mounted terminal from pre-configured key information according to the identification information of the vehicle-mounted terminal; The first message is decrypted using the key of the vehicle-mounted terminal.
3. The method according to claim 1, characterized in that The determining, according to the protocol version information indicated by the first message, a candidate service scenario triggered by the Internet of Vehicles software includes: Determine the protocol version information according to the protocol version number, application version number, application identifier and message identifier of the first message; According to the protocol version information, candidate business scenarios triggered by the Internet of Vehicles software are determined.
4. The method according to claim 1, characterized in that: The decoding the first message according to the parameter configuration information indicated by the first message to obtain the second message includes: Determine the parameter configuration information according to the protocol version number, application version number, application identifier and message identifier of the first message; The first message is decoded using the parameter configuration information to obtain a second message.
5. The method according to claim 4, characterized in that The step of decoding the first message by using the parameter configuration information to obtain the second message includes: Storing the parameter configuration information in the form of a class; The first message is decoded according to the class corresponding to the parameter configuration information to obtain a second message.
6. The method according to claim 1, characterized in that The generating a response message of the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software includes: Determine a response parameter item and a parameter value corresponding to the response parameter item according to the business scenario triggered by the Internet of Vehicles software; Storing the response parameter items in the form of classes; Using the parameter value corresponding to the response parameter item, assign a value to the class corresponding to the response parameter item to generate a response message for the first message.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Encoding the response message to obtain an encoded response message; The encoded response message is encrypted using the key of the vehicle-mounted terminal.
8. A testing device for Internet of Vehicles software, characterized in that: The device comprises: A receiving module, used for receiving a first message; A determination module, configured to determine a candidate service scenario triggered by the Internet of Vehicles software according to the protocol version information indicated by the first message; A decoding module, configured to decode the first message according to the parameter configuration information indicated by the first message to obtain a second message, wherein the second message includes parameter values corresponding to a plurality of parameter items; The determination module is further configured to compare parameter values corresponding to the multiple parameter items of the candidate business scenario with parameter values corresponding to the multiple parameter items of the second message to determine the business scenario triggered by the Internet of Vehicles software; A generation module is used to generate a response message of the first message according to the response parameter information corresponding to the business scenario triggered by the Internet of Vehicles software.
9. A server, characterized in that: The server includes a processor and a memory, wherein instructions are stored in the memory, and the processor executes the instructions so that the server executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The method comprises computer-readable instructions, which, when executed on a server, cause the server to execute the method according to any one of claims 1 to 7.