Internet of vehicles communication test method, electronic device, storage medium and program product

By using CAPL scripts and Python scripts in tandem, automated testing of vehicle-to-everything (V2X) communication messages is achieved, solving the problem of low testing efficiency in existing technologies and improving testing accuracy and system compatibility.

CN119603189BActive Publication Date: 2025-11-25Z-ONE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411753266.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-11-25
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

Existing vehicle-to-everything (V2X) communication simulation testing methods require a lot of manual operation, resulting in low testing efficiency and difficulty in ensuring accuracy.

Method used

The system uses CAPL scripts and Python scripts to work together to simulate a vehicle-to-everything (V2X) communication environment and automate the compression, encryption, decryption, and decompression of messages.

Benefits of technology

It significantly reduces manual testing operations, improves testing accuracy and efficiency, and enhances the compatibility and scalability of the simulation testing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119603189B_ABST
    Figure CN119603189B_ABST
Patent Text Reader

Abstract

The application relates to the Internet of Vehicles technical field and discloses an Internet of Vehicles communication test method, an electronic device, a storage medium and a program product. The Internet of Vehicles communication test method disclosed by the application comprises the following steps: a test environment is built based on an Internet of Vehicles communication simulation platform, the test environment comprises a virtual cloud end and a virtual vehicle end, the virtual vehicle end comprises a first virtual unit and a second virtual unit, and the first virtual unit and the second virtual unit communicate through the virtual cloud end; the virtual cloud end receives a first message sent by the first virtual unit, compresses the first message based on a first Python script, and performs encryption processing on the compressed message; after the second virtual unit receives the compressed and encrypted message, the message can be decrypted and decompressed based on a second Python script. In this way, automatic testing can be realized by combining the Python script, manual test operations are greatly reduced, and the testing accuracy and testing efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Vehicles, and particularly relates to an Internet of Vehicles communication testing method, an electronic device, a storage medium and a program product. BACKGROUND

[0002] With the development of intelligent networked vehicles, the communication data volume between the vehicle interior and the external network of the vehicle increases dramatically. In the development process of intelligent networked vehicles, simulation testing of Internet of Vehicles communication is usually performed to ensure the safety, stability and communication efficiency of the communication between the vehicle interior and the external network of the vehicle in actual application. However, in the simulation testing process in actual application, the test procedure has relatively high complexity, and the traditional testing method often needs a large amount of manual operation and repetitive work, resulting in low testing efficiency and difficulty in ensuring the accuracy of testing. SUMMARY

[0003] To solve the above technical problems, the present application provides an Internet of Vehicles communication testing method, an electronic device, a storage medium and a program product. The present application is introduced from multiple aspects as follows, and the implementation manners and beneficial effects of the multiple aspects can be referred to each other.

[0004] In a first aspect, an Internet of Vehicles communication testing method is provided, and the method comprises: building a test environment based on an Internet of Vehicles communication simulation testing platform, the test environment comprising a virtual cloud end and a virtual vehicle end; the virtual vehicle end comprising a first virtual unit and a second virtual unit, the first virtual unit and the second virtual unit communicating through the virtual cloud end; the virtual cloud end receiving a first message sent by the first virtual unit and storing the first message to a first storage space; the virtual cloud end compressing the first message based on a first Python script, obtaining a second message and storing the second message to a second storage space; the first Python script being used to read messages from the first storage space at a preset time interval; the virtual cloud end reading the second message from the second storage space and performing encryption processing on the second message to obtain a third message; the virtual cloud end sending the third message to the second virtual unit; the second virtual unit receiving the third message and performing decryption processing on the third message to obtain the second message and store the second message to a third storage space; the second virtual unit performing decompression processing on the second message based on a second Python script to obtain the first message and store the first message to a fourth storage space; the second Python script being used to read messages from the third storage space at a preset time interval.

[0005] In the present application, by combining the Python script, the automatic testing of compression, encryption, decryption and decompression of the simulation Internet of Vehicles communication message is realized, the manual testing operation is greatly reduced, and the accuracy and efficiency of testing are improved.

[0006] In a possible implementation of the first aspect, the first message is a message queue telemetry transport protocol message, and the second message is a byte stream.

[0007] In a possible implementation of the first aspect, the virtual cloud compresses the first message based on the first Python script to obtain the second message and store the second message in the second storage space, including: in a case where the virtual cloud reads the content of the first storage space based on the first Python script, the virtual cloud compresses the content of the first storage space by using a first compression algorithm to obtain a byte stream; and the virtual cloud stores the byte stream in the second storage space.

[0008] In a possible implementation of the first aspect, the virtual cloud reads the second message from the second storage space, and performs encryption processing on the second message to obtain a third message, including: in a case where the virtual cloud reads the content of the second storage space, the virtual cloud calls an encryption interface to perform encryption processing on the byte stream to obtain the third message.

[0009] In a possible implementation of the first aspect, in a case where the virtual cloud reads the content of the second storage space, the virtual cloud calls an encryption interface to perform encryption processing on the byte stream to obtain the third message, including: the virtual cloud encapsulates and converts the byte stream into a character array; and the virtual cloud calls the encryption interface to perform encryption processing on the character array to obtain the third message.

[0010] In the embodiments of the present application, when the encryption interface is called to perform encryption processing on the byte stream, the byte stream can be converted into a character type of data through appropriate encapsulation and conversion, so that the problem of non-uniform interface types can be solved, and the compatibility and scalability of the simulation test system can be improved.

[0011] In a possible implementation of the first aspect, in a case where the second virtual unit receives the third message, the second virtual unit performs decryption processing on the third message to obtain the second message and store the second message in a third storage space, including: the second virtual unit calls a decryption interface to perform decryption processing on the third message to obtain a byte stream, where the decryption interface corresponds to the encryption interface.

[0012] In a possible implementation of the first aspect, the second virtual unit performs decompression processing on the second message based on a second Python script to obtain the first message and store the first message in a fourth storage space, including: the second virtual unit performs decompression processing on the byte stream by using a first decompression algorithm to obtain the first message, where the first decompression algorithm corresponds to a first compression algorithm.

[0013] In a second aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory is configured to store one or more programs; and the processor is configured to execute the one or more programs to enable the electronic device to implement the vehicle-to-Internet communication test method in any possible implementation of the first aspect.

[0014] In a third aspect, an embodiment of the present application provides a readable storage medium, comprising one or more programs, which when executed on an electronic device, enable the electronic device to implement the vehicle-to-Internet communication test method in any possible implementation of the first aspect.

[0015] In a fourth aspect, an embodiment of the present application provides a program product, which when executed on an electronic device, enable the electronic device to implement the vehicle-to-Internet communication test method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 According to some embodiments of the present application, a test environment schematic diagram of a vehicle-to-Internet communication simulation test platform is shown.

[0017] Figure 2 According to some embodiments of the present application, a flowchart of a vehicle-to-Internet communication test method is shown.

[0018] Figure 3 According to some embodiments of the present application, a timing diagram of data compression and encryption processing is shown.

[0019] Figure 4 According to some embodiments of the present application, a timing diagram of data compression and encryption processing is shown.

[0020] Figure 5 According to some embodiments of the present application, a structural schematic diagram of an electronic device is shown. DETAILED DESCRIPTION

[0021] Illustrative embodiments of the present application include, but are not limited to, a vehicle-to-Internet communication test method, an electronic device, a storage medium, and a program product. The vehicle-to-Internet communication test method of the present application will be described below in conjunction with specific embodiments.

[0022] As described previously, in the simulation test process of vehicle-to-Internet communication, a large amount of manual test operations and repetitive operations are usually required for automobile R&D personnel, which may result in low test efficiency. Moreover, due to the high complexity of the simulation test process, manual testing cannot guarantee the accuracy of the test results.

[0023] Therefore, this application provides a method for testing vehicle-to-everything (V2X) communication. This method utilizes bus simulation software (e.g., CAN access programming language (CAPL) scripts) combined with Python scripts to simulate and build a real V2X communication environment and cloud environment for V2X communication message simulation testing. The bus simulation software can encrypt and decrypt the simulated V2X communication messages, while the Python scripts can compress and decompress them. Thus, this application, through the collaborative operation of CAPL scripts and Python scripts, can achieve automated testing of V2X communication, significantly reducing manual testing operations and improving testing accuracy and efficiency.

[0024] The following is a combination of... Figure 1 This paper introduces a test environment for a vehicle-to-everything (V2X) communication simulation test platform. The V2X communication simulation test platform can refer to V2X communication simulation test software, such as SUMO (Simulation of Urban Mobility) traffic flow simulation software. SUMO is an open-source, microscopic, and spatially continuous traffic simulation software capable of handling large-scale traffic networks, achieving microscopic traffic flow control, and performing traffic simulation. This simulation test platform can also be implemented based on bus simulation software (such as CAN access programming language (CAPL) scripts). CAPL scripts are a programming language used for node simulation, test function development, bus analysis, etc., and can be used to simulate a real V2X communication environment.

[0025] Reference Figure 1 ,like Figure 1 As shown, the test environment provided in this application embodiment includes a virtual cloud 101 and a virtual vehicle terminal 102 built using a vehicle network communication simulation test platform. The virtual vehicle terminal 102 may include a first virtual unit 1021 and a second virtual unit 1022.

[0026] The virtual cloud 101 can encrypt and compress the vehicle network communication message sent by the first virtual unit 1021, and then send the encrypted and compressed data to the second virtual unit 1022.

[0027] It can be understood that the vehicle networking communication message is a vehicle networking communication message in a simulated actual vehicle networking communication scenario, and the message can be an MQTT (message queuing telemetry transport) message. The MQTT is a lightweight message transmission protocol based on a publish / subscribe mode, and is used to implement message transmission between devices in a low-bandwidth and unstable network environment.

[0028] The first virtual unit 1021 in the virtual vehicle end 102 can simulate a message sending end in an actual vehicle networking communication process, and the second virtual unit 1022 can simulate a message receiving end in the actual vehicle networking communication process. The second virtual unit 1022 can receive message data sent by the virtual cloud end 101, and perform decryption and decompression processing on the received data.

[0029] It can be understood that the first virtual unit 1021 and the second virtual unit 1022 can represent different ECU (electronic control unit) nodes in the same vehicle, or can represent ECU nodes in different vehicles. When the first virtual unit 1021 and the second virtual unit 1022 represent different ECU nodes in the same vehicle, the simulation is a vehicle internal communication scenario; when the first virtual unit 1021 and the second virtual unit 1022 represent ECU nodes in different vehicles, the simulation is a vehicle and external communication scenario.

[0030] The following describes a vehicle networking communication test method provided by an embodiment of the present application based on the test environment shown in Figure 1 and in combination with the flowchart shown in Figure 2 . Referring to Figure 2 , as shown in Figure 2 , the method comprises the following steps.

[0031] S201, the first virtual unit 1021 sends a first message to the virtual cloud end 101.

[0032] In some embodiments, when the vehicle networking communication test is performed based on the vehicle networking communication simulation test platform, the first virtual unit 1021 can be controlled to send a first message to the virtual cloud end 101 first, wherein the first message can be an MQTT message, the MQTT message comprises a message header and a message body (i.e. a payload), the message header comprises message type, flag bit and other information, and the payload comprises actual message content, such as JSON (JavaScript object notation) data (or a string).

[0033] S202, the virtual cloud end 101 stores the first message in a first storage space.

[0034] In some embodiments, after receiving the first message, the virtual cloud 101 stores the first message to a first storage space.

[0035] In some embodiments, the virtual cloud 101 can write the message body of the first message, for example, JSON data, into a local text file belonging to the first storage space through the first CAPL script.

[0036] In some embodiments, the virtual cloud 101 reads the content in the local text file in the first storage space through the first Python script in a timing manner.

[0037] It can be understood that the above-mentioned timing reading can be set according to actual needs, for example, messages can be read from the first storage space at a preset time interval (for example, several seconds, several minutes, or several hours, etc.), and the application does not make any limitation on the timing.

[0038] S203, the virtual cloud 101 compresses the first message based on the first Python script to obtain a second message and stores the second message to a second storage space.

[0039] In some embodiments, the virtual cloud 101 reads the content of the first storage space based on the first Python script, and compresses the content of the first storage space by using a first compression algorithm to obtain a second message, wherein the second message can be a byte stream (i.e., a binary data stream). The virtual cloud 101 can store the obtained byte stream to the second storage space.

[0040] For example, the first compression algorithm can be a gzip compression algorithm, a brotli algorithm, a zstandard algorithm, an LZ77 algorithm, an LZSS algorithm, an LZW algorithm, etc. The application does not make any limitation on the specific first compression algorithm, which can be selected according to actual application needs.

[0041] In some embodiments, the virtual cloud 101 can write the obtained byte stream into a local compressed file belonging to the second storage space.

[0042] S204, the virtual cloud 101 reads the second message from the second storage space and performs encryption processing on the second message to obtain a third message.

[0043] In some embodiments, the virtual cloud 101 reads the second message from the second storage space through the first CAPL script, for example, reads the second message in the local compressed file in the second storage space to obtain the compressed byte stream.

[0044] In some embodiments, the virtual cloud 101 reads the content of the second storage space, calls the encryption interface, and encrypts the byte stream to obtain a third message.

[0045] It can be understood that the byte stream read from the second storage space is a compressed byte stream.

[0046] In some embodiments, the virtual cloud 101 can encapsulate and convert the byte stream read from the second storage space into a character array, i.e., convert the byte stream into character (char) type data. Then, the encryption interface is called to encrypt the character array to obtain the third message.

[0047] S205, the virtual cloud 101 sends the third message to the second virtual unit 1022.

[0048] In some embodiments, after the virtual cloud 101 obtains the third message, the third message is sent to the second virtual unit 1022 through the simulation network.

[0049] In this way, through the CAPL script combined with the Python script, the simulation process of data compression and encryption can be automatically realized, and the difficulty of test simulation can be reduced.

[0050] S206, the second virtual unit 1022 decrypts the third message to obtain a second message and stores it in a third storage space.

[0051] In some embodiments, after the second virtual unit 1022 receives the compressed and encrypted data through the simulation network, the third message is decrypted to obtain the second message and store it in the third storage space.

[0052] In some embodiments, the second virtual unit 1022 can call the decryption interface to decrypt the third message to obtain the compressed byte stream, wherein the decryption interface corresponds to the encryption interface mentioned in S204.

[0053] It can be understood that when the decryption interface corresponds to the encryption interface of the encrypted third message, the data before the encrypted third message can be restored, i.e., the compressed byte stream.

[0054] In some embodiments, the second virtual unit 1022 can call the decryption interface through the second CAPL script. After the second CAPL script obtains the compressed byte stream, the byte stream can be written into a temporary local compressed file, and the local compressed file belongs to the third storage space.

[0055] S207, the second virtual unit 1022 decompresses the second message based on the second Python script to obtain a first message and store it in a fourth storage space.

[0056] In some embodiments, the second virtual unit 1022 reads the content in the third storage space in a timed manner through the second Python script, for example, reads the local compressed file in the third storage space in a timed manner.

[0057] In some embodiments, the second virtual unit 1022, in the case of reading the content in the third storage space, that is, in the case of reading the second message, decompresses the second message based on the second Python script to obtain the first message and stores the first message to the fourth storage space.

[0058] In some embodiments, the second virtual unit 1022 can decompress the second message (that is, the compressed byte stream) by using a first decompression algorithm to obtain the first message, where the first decompression algorithm corresponds to the first compression algorithm.

[0059] It can be understood that when the first decompression algorithm corresponds to the first compression algorithm for compressing the first message, the original first message can be guaranteed to be decompressed. For example, the first compression algorithm can be a gzip decompression algorithm, an LZW decompression algorithm, etc. In some embodiments, the second virtual unit 1022 can also decompress the second message by using a decompression tool. The present application does not limit the specific decompression algorithm or decompression tool.

[0060] In some embodiments, after the second virtual unit 1022 decompresses the first message, the first message can be written to a new local text file, which belongs to the fourth storage space.

[0061] It can be understood that the local text file can include the JSON data in the MQTT message mentioned in S201.

[0062] In this way, the vehicle networking communication test method provided by the embodiments of the present application can build a test environment based on a vehicle networking communication simulation test platform, and realize the automatic test of the compression, encryption, decryption and decompression of the simulated vehicle networking communication message in combination with the Python script, thereby greatly reducing the manual test operation and improving the test accuracy and test efficiency. Moreover, the embodiments of the present application simulate to build a test environment, which provides support for the compression, encryption, transmission and reception test of the MQTT message, and further improves the completeness and accuracy of the test. In the simulation environment, the problems that may exist in the vehicle-side business can be found and solved in advance, so as to reduce the risk and cost after actual deployment.

[0063] The method for compressing and encrypting data mentioned in S201 to S204 will be introduced below in combination with the timing diagram shown in FIG. 8. Figure 3

[0064] ​Based on the above description of S201 to S204, the virtual cloud 101 implements compression and encryption of data through the first CAPL script and the first Python script. Specifically, as shown in Figure 3 The process includes:

[0065] S301, the virtual cloud 101 receives a vehicle networking communication message through the first CAPL script.

[0066] In some embodiments, the virtual cloud 101 receives a vehicle networking communication message through the first CAPL script. The message can be the MQTT message mentioned in S201 above. For details, refer to the description of S201 above.

[0067] S302, the virtual cloud 101 reads a first payload through the first CAPL script.

[0068] In some embodiments, after the virtual cloud 101 receives a vehicle networking communication message through the first CAPL script, the first payload can be read. The first payload can be the payload in the MQTT message.

[0069] S303, the virtual cloud 101 writes the payload into a first local text file (original.dat) through the first CAPL script.

[0070] In some embodiments, after the first CAPL script reads the payload, the payload can be written into a first local text file, for example, the original.dat file.

[0071] S304, the virtual cloud 101 sends a first call command (sysExecCmd1) through the first CAPL script.

[0072] In some embodiments, after the first CAPL script writes the payload into the first local text file, a first call command, for example, sysExecCmd1, can be sent. The command is used to call the first Python script.

[0073] S305, the virtual cloud 101 reads the original.dat file through the first Python script.

[0074] In some embodiments, after the first CAPL script calls the first Python script, the first Python script can start the compression process. First, the first Python script can read the content in the original.dat file.

[0075] S306, the virtual cloud 101 compresses the content of the original.dat file by the first Python script using the first compression algorithm.

[0076] In some embodiments, after the first Python script reads the content in the original.dat file, the first Python script compresses the content in the original.dat file using the first compression algorithm.

[0077] S307, the virtual cloud 101 writes the compressed data into the first local compressed file (compressed_output.dat.gz) by the first Python script.

[0078] In some embodiments, after the first Python script compresses the content in the original.dat file, the first Python script writes the compressed data into the compressed_output.dat.gz file.

[0079] S308, the virtual cloud 101 reads the compressed_output.dat.gz file by the first CAPL script.

[0080] In some embodiments, after the first Python script writes the compressed data into the compressed_output.dat.gz file, the first CAPL script can read the compressed_output.dat.gz file.

[0081] S309, the virtual cloud 101 encrypts the content of the compressed_output.dat.gz file by the first CAPL script.

[0082] In some embodiments, after the first CAPL script reads the compressed_output.dat.gz file, the first CAPL script can encrypt the content in the compressed_output.dat.gz file.

[0083] The following describes the method of compressing and encrypting data mentioned in S206 and S207 in conjunction with the timing diagram shown in Figure 4

[0084] Based on the above description of S206 and S207, the second virtual unit 1022 implements decryption and decompression of data by the second CAPL script and the second Python script, specifically, as shown in Figure 4

[0085] ​​S401, the second virtual unit 1022 receives the third message through the second CAPL script.

[0086] In some embodiments, the second CAPL script receives the third message, which can be the message mentioned in S205 above, sent by the virtual cloud 101 to the second virtual unit 1022 through the simulation network.

[0087] S402, the second virtual unit 1022 decrypts the third message through the second CAPL script.

[0088] In some embodiments, after the second CAPL script receives the third message, the third message can be decrypted. For details, please refer to the description of S206 above, which will not be repeated here.

[0089] S403, the second virtual unit 1022 writes the decrypted data into the second local compressed file through the second CAPL script.

[0090] In some embodiments, after the second CAPL script decrypts the third message, the decrypted data can be written into the second local compressed file.

[0091] S404, the second virtual unit 1022 sends a second call command (sysExecCmd2) through the second CAPL script.

[0092] In some embodiments, after the second CAPL script writes the decrypted data into the second local compressed file, a second call command, such as sysExecCmd2, can be sent, which is used to call the second Python script.

[0093] S405, the second virtual unit 1022 reads the second local compressed file through the second Python script.

[0094] In some embodiments, after the second CAPL script calls the second Python script, the second Python script can start to perform the decompression process. First, the second Python script can read the content in the second local compressed file.

[0095] S406, the second virtual unit 1022 decompresses the content in the second local compressed file through the second Python script using the first decompression algorithm.

[0096] In some embodiments, after the second Python script reads the content in the second local compressed file, the content in the second local compressed file is decompressed using the first decompression algorithm.

[0097] S407, the second virtual unit 1022 writes the decompressed data into the second local text file through the second Python script.

[0098] In some embodiments, after the second Python script decompresses the content in the second local compressed file, the second Python script writes the decompressed data into the second local text file.

[0099] S408, the second virtual unit 1022 reads the second local text file through the second CAPL script.

[0100] In some embodiments, after the second Python script writes the decompressed data into the second local text file, the second CAPL script can read the second local text file.

[0101] S409, the second virtual unit 1022 parses the text information in the content of the second local text file through the second CAPL script.

[0102] In some embodiments, after the second virtual unit 1022 reads the content in the second local text file through the second CAPL script, the second virtual unit 1022 can parse the text information in the content of the second local text file. For example, parsing the JSON string in the second local text file for further analysis or use.

[0103] The vehicle networking communication test method provided by the embodiments of the present application can realize the integration of data compression and encryption through the coordinated work of the CAPL script and the Python script, and reduce the difficulty of test simulation.

[0104] The embodiments of the present application also provide a readable storage medium, the readable storage medium includes one or more programs, and the one or more programs are executed on the electronic device to enable the electronic device to implement the vehicle networking communication test method mentioned in the embodiments of the present application.

[0105] The embodiments of the present application also provide a program product, which, when executed on an electronic device, enables the electronic device to implement the vehicle networking communication test method mentioned in the embodiments of the present application. In some embodiments, the program product can be test software, such as a CAPL script.

[0106] The embodiments of the present application also provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more programs; the processor is used to execute the one or more programs to enable the electronic device to implement the vehicle networking communication test method mentioned in the embodiments of the present application.

[0107] The following will introduce the electronic device provided by the embodiments of the present application. Figure 5

[0108] As Figure 5 ​As shown, the electronic device can include a transceiver 511, a processor 512, and a memory 513.

[0109] The transceiver 511 can be configured to obtain a to-be-run task and configuration information of the to-be-run task.

[0110] The processor 512 executes computer-executed instructions stored in the memory, so that the processor 512 performs the solutions in the above embodiments. The processor 512 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; and can also be a digital data processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.

[0111] The memory 513 is connected with the processor 512 through a system bus and completes mutual communication, and the memory 513 is configured to store computer program instructions.

[0112] By way of example, and without limitation, the memory 513 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 513 can include removable or non-removable (or fixed) media. Where appropriate, the memory 513 can be internal or external to the integrated gateway device. In some embodiments, the memory 513 is a non-volatile solid-state memory. In some embodiments, the memory 513 includes read-only memory (ROM). Where appropriate, this read-only memory can be mask-programmed read-only memory, programmable read-only memory (PROM), electrical programmable read-only memory (EPROM), electrical erasable programmable read-only memory (EEPROM), or flash memory, or a combination of two or more of these.

[0113] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like. The system bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in the figure, but it does not represent only one bus or only one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries and read-only libraries). The memory can include random access memory (RAM) and can also include non-volatile memory.

[0114] The method provided by the embodiments of the present application can be applied to any electronic device applicable to a vehicle networking communication simulation test platform, including but not limited to a mobile station (MS), a mobile terminal (MT), and the like. For example, the electronic device can be a mobile phone, a smart television, a wearable device, a tablet computer (Pad), a desktop computer, a laptop computer, a virtual reality (VR) device, an augmented reality (AR) device, a terminal in industrial control, and the like. The embodiments of the present application do not limit the specific form of the electronic device.

[0115] Embodiments disclosed in the present application can be implemented in hardware, software, firmware, or a combination thereof. Embodiments of the present application can be implemented as computer programs or program codes executed on a programmable system, including at least one processor, a storage system (including volatile and non-volatile memories and / or storage elements), at least one input device, and at least one output device.

[0116] Program code can be applied to input instructions to perform functions described in the present application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purpose of the present application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0117] The program code can be implemented in a high level of programming language or a object-oriented programming language to communicate with processing system. In a need, the program code can be implemented in an assembly language or machine language. In fact, the mechanism described in the present application is not limited to the scope of any particular programming language. In any case, the language can be a compiled language or an interpreted language.

[0118] In some cases, the disclosed embodiments can be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments can also be implemented as instructions carried by or stored on a transitory or non-transitory machine-readable (e.g., computer-readable) medium, which can be read and executed by one or more processors. For example, the instructions can be distributed over the network or by other computer readable media. Thus, a machine-readable medium can include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including without limitation, a floppy disk, an optical disc, an optical disk, a magnetic optical disk, a read-only memory, a random access memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a magnetic or optical card, a flash memory, or a tangible machine-readable storage medium. Therefore, the machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0119] In the drawings, some structural or methodological features can be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order can not be required. Rather, in some embodiments, the features can be arranged in a different manner and / or order than shown in the illustrative drawings. Additionally, inclusion of structural or methodological features in a particular figure is not meant to imply that such features are required in all embodiments, and in some embodiments, these features can not be included or can be combined with other features.

[0120] It should be noted that each unit / module mentioned in the device embodiments of the present application is a logical unit / module, in the physical world, one logical unit / module can be one physical unit / module, also can be a part of one physical unit / module, also can be realized in the combination of multiple physical unit / modules, the physical realization of these logical units / modules is not the most important, the combination of the functions realized by these logical units / modules is the key to solve the technical problems proposed in the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce the units / modules which are not closely related to solving the technical problems proposed in the present application, which does not mean that the above-mentioned device embodiments do not have other units / modules.

[0121] It is to be understood that the phrases such as "first" and "second", and the like, used herein do not denote any order, quantity, or importance, but rather are used to identify one element from another, and the "and / or" language includes a variety of configurations of both the unaided use of each item in the list, and the aided use of each item in the list with others of the items in the list. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. The use of the terms "including", "comprising", or "having" containing the term "one" or "at least one" is used herein to represent the inclusion of at least one of the specified components in the described implementations, but does not exclude the inclusion of other components. The use of the term "about" in conjunction with a numerical value refers to a value that is within 10% of the value, preferably within 5% of the value, and more preferably within 1% of the value.

[0122] While the application has been illustrated and described in detail in the drawings and foregoing description, the same is to be considered as illustrative and not restrictive in character, it being understood that only the preferred embodiments have been shown and described and that all changes and modifications that come within the spirit of the application are desired to be protected.

Claims

1. A method for testing Internet of Vehicles communication, characterized in that, The method comprises: A test environment is built based on a vehicle networking communication simulation test platform, the test environment comprising a virtual cloud and a virtual vehicle; the virtual vehicle comprises a first virtual unit and a second virtual unit, and the first virtual unit and the second virtual unit communicate through the virtual cloud; The virtual cloud receives a first message sent by the first virtual unit and stores the first message in a first storage space; The virtual cloud compresses the first message based on a first Python script, obtains a second message and stores the second message in a second storage space; the first Python script is used to read messages from the first storage space at a preset time interval; The virtual cloud reads the second message from the second storage space and encrypts the second message to obtain a third message; The virtual cloud sends the third message to the second virtual unit; Upon receiving the third message, the second virtual unit decrypts the third message to obtain the second message and stores the second message in a third storage space; The second virtual unit decompresses the second message based on a second Python script to obtain the first message and stores the first message in a fourth storage space; the second Python script is used to read messages from the third storage space at a preset time interval.

2. The method of claim 1, wherein, The first message is a message queue telemetry transport protocol message, and the second message is a byte stream.

3. The method of claim 2, wherein, The virtual cloud compresses the first message based on a first Python script to obtain a second message and stores the second message in a second storage space, comprising: Upon reading the content of the first storage space based on the first Python script, the virtual cloud compresses the content of the first storage space using a first compression algorithm to obtain the byte stream; The virtual cloud stores the byte stream in the second storage space.

4. The method of claim 3, wherein, The virtual cloud reads the second message from the second storage space and encrypts the second message to obtain a third message, comprising: Upon reading the content of the second storage space, the virtual cloud calls an encryption interface to encrypt the byte stream to obtain the third message.

5. The method of claim 4, wherein, Upon reading the content of the second storage space, the virtual cloud calls an encryption interface to encrypt the byte stream to obtain the third message, comprising: The virtual cloud encapsulates and converts the byte stream into a character array; The virtual cloud calls the encryption interface to encrypt the character array to obtain the third message.

6. The method of claim 5, wherein, Upon receiving the third message, the second virtual unit decrypts the third message to obtain the second message and stores the second message in a third storage space, comprising: The second virtual unit calls a decryption interface to decrypt the third message to obtain the byte stream, wherein the decryption interface corresponds to the encryption interface.

7. The method of claim 6, wherein, The second virtual unit decompresses the second message based on a second Python script to obtain the first message and store the first message to a fourth storage space, including: The second virtual unit decompresses the byte stream using a first decompression algorithm to obtain the first message, wherein the first decompression algorithm corresponds to the first compression algorithm.

8. An electronic device, comprising: The electronic device includes a memory and a processor, wherein The memory is configured to store one or more programs. The processor is configured to execute the one or more programs to enable the electronic device to implement the vehicle-to-vehicle communication test method of any one of claims 1 to 7.

9. A readable storage medium, characterized by, The readable storage medium includes one or more programs, which, when executed on an electronic device, enable the electronic device to implement the vehicle-to-vehicle communication test method of any one of claims 1 to 7.

10. A program product, characterized by The program product includes computer programs or instructions, which, when executed on an electronic device, enable the electronic device to implement the vehicle-to-vehicle communication test method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Automatic generalization simulation test method and device for automatic driving

    CN115203031A

  • System and methods for generating interactive virtual environments

    US20160293133A1