Internet of vehicles communication test method, electronic equipment, storage medium and program product
By using the collaborative operation of Python scripts and CAPL scripts on the Internet of Vehicles communication simulation test platform, the automated compression, encryption, decryption and decompression of Internet of Vehicles communication messages is achieved, solving the problems of inefficiency and difficulty in ensuring the accuracy of traditional testing methods, and significantly improving the testing efficiency and accuracy.
Patent Information
- Application Number
- CN202411753266.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-12-02
Smart Images

Figure CN119603189A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of Internet of Vehicles, and in particular to an Internet of Vehicles communication testing method, electronic equipment, storage medium and program product. Background Art
[0002] With the development of intelligent connected vehicles, the amount of communication data inside vehicles and between vehicles and external networks has increased dramatically. In the development process of intelligent connected vehicles, simulation tests are usually performed on vehicle network communications to ensure the security, stability and communication efficiency of communications inside vehicles and between vehicles and external networks in actual applications. However, in the simulation test process of actual applications, the test process is relatively complex, and traditional testing methods often require a lot of manual operations and repetitive work, resulting in low test efficiency and difficulty in ensuring test accuracy. Summary of the invention
[0003] In order to solve the above technical problems, the embodiments of the present application provide a vehicle networking communication test method, electronic device, storage medium and program product. The present application is introduced from multiple aspects below, and the implementation methods and beneficial effects of the following aspects can be referenced to each other.
[0004] In the first aspect, an embodiment of the present application provides a method for testing vehicle network communication, the method comprising: building a test environment based on a vehicle network communication simulation test platform, the test environment comprising a virtual cloud 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; 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 it 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; when the second virtual unit receives the third message, it decrypts the third message to obtain the second message and stores it in a third storage space; the second virtual unit decompresses the second message based on the second Python script, obtains the first message and stores it in a fourth storage space; the second Python script is used to read messages from the third storage space at a preset time interval.
[0005] In the embodiment of the present application, by combining with Python scripts, automated testing of compression, encryption, decryption and decompression of simulated Internet of Vehicles communication messages is implemented, which greatly reduces manual testing operations and improves test accuracy and efficiency.
[0006] In a possible implementation of the first aspect above, the first message is a message queue telemetry transmission protocol message, and the second message is a byte stream.
[0007] In a possible implementation of the first aspect above, the virtual cloud compresses the first message based on the first Python script to obtain the second message and stores it in the second storage space, including: when the virtual cloud reads the content of the first storage space based on the first Python script, the content of the first storage space is compressed using the first compression algorithm to obtain a byte stream; the virtual cloud stores the byte stream in the second storage space.
[0008] In a possible implementation of the first aspect above, the virtual cloud reads the second message from the second storage space, and encrypts the second message to obtain a third message, including: when the virtual cloud reads the content of the second storage space, calling the encryption interface, encrypting the byte stream, and obtaining the third message.
[0009] In a possible implementation of the first aspect above, when the virtual cloud reads the content of the second storage space, an encryption interface is called to encrypt the byte stream to obtain a third message, including: the virtual cloud encapsulates the byte stream and converts it into a character array; the virtual cloud calls the encryption interface to encrypt the character array to obtain the third message.
[0010] In an embodiment of the present application, when calling the encryption interface and encrypting the byte stream, the byte stream can be converted into character type data through appropriate encapsulation and conversion. In this way, the problem of inconsistent 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 above, when the second virtual unit receives the third message, it decrypts the third message to obtain the second message and stores it in a third storage space, including: the second virtual unit calls the decryption interface, decrypts the third message to obtain a byte stream, wherein the decryption interface corresponds to the encryption interface.
[0012] In a possible implementation of the first aspect above, the second virtual unit decompresses the second message based on the second Python script to obtain the first message and stores it in a fourth storage space, including: the second virtual unit decompresses the byte stream using the first decompression algorithm to obtain the first message, wherein the first decompression algorithm corresponds to the first compression algorithm.
[0013] In a second aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory is used to store one or more programs; and the processor is used to execute one or more programs so that the electronic device can implement a vehicle network communication test method in any possible implementation of the first aspect mentioned above.
[0014] In a third aspect, an embodiment of the present application provides a readable storage medium, which includes one or more programs. When the one or more programs are executed on an electronic device, the electronic device implements the vehicle network communication test method in any possible implementation of the first aspect mentioned above.
[0015] In a fourth aspect, an embodiment of the present application provides a program product, which, when executed on an electronic device, enables the electronic device to implement the vehicle network communication testing method in any possible implementation of the first aspect mentioned above. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 According to some embodiments of the present application, a test environment schematic diagram of a vehicle networking communication simulation test platform is shown;
[0017] Figure 2 According to some embodiments of the present application, a flow chart of a vehicle networking communication testing method is shown;
[0018] Figure 3 According to some embodiments of the present application, a timing diagram for compressing and encrypting data is shown;
[0019] Figure 4 According to some embodiments of the present application, a timing diagram of compressing and encrypting data is shown;
[0020] Figure 5 According to some embodiments of the present application, a schematic structural diagram of an electronic device is shown. DETAILED DESCRIPTION
[0021] The illustrative embodiments of the present application include, but are not limited to, a vehicle networking communication test method, an electronic device, a storage medium, and a program product. The vehicle networking communication test method of the present application is introduced below in conjunction with specific embodiments.
[0022] As mentioned above, in the simulation test process of Internet of Vehicles communication, automotive R&D personnel are usually required to perform a large number of manual test operations and repetitive operations, which may lead to low test efficiency. In addition, due to the high complexity of the simulation test process, manual testing is difficult to ensure the accuracy of the test results.
[0023] Therefore, a method for testing Internet of Vehicles communication is provided in an embodiment of the present application, which utilizes bus simulation software (such as a CAN access programming language (CAPL) script) integrated with a Python script to simulate and build a real Internet of Vehicles communication environment and a cloud environment, and conducts Internet of Vehicles communication message simulation testing. Among them, the bus simulation software can encrypt and decrypt the simulated Internet of Vehicles communication messages, and the Python script can compress and decompress the simulated Internet of Vehicles communication messages. In this way, the present application can realize automated testing of Internet of Vehicles communication through the collaborative operation of CAPL scripts and Python scripts, greatly reducing manual testing operations and improving test accuracy and test efficiency.
[0024] Let's first combine Figure 1 , introduces a test environment of a vehicle network communication simulation test platform. The vehicle network communication simulation test platform may refer to vehicle network communication simulation test software, such as SUMO (simulation of urban mobility) traffic flow simulation software. SUMO traffic flow simulation software is an open source, microscopic and spatially continuous traffic simulation software that can handle large-scale traffic networks, realize microscopic control of traffic flows, and perform traffic simulation. The simulation test platform can also be implemented based on bus simulation software (such as communication access programming language (CAN access programming language, CAPL) script). Among them, CAPL script is a programming language that can be used for node simulation, test function development, bus analysis, etc. CAPL script can be used to simulate a real vehicle network communication environment.
[0025] Reference Figure 1 ,like Figure 1 As shown, the test environment provided by the embodiment of the present application includes a virtual cloud 101 and a virtual vehicle end 102 built using a vehicle network communication simulation test platform, wherein the virtual vehicle end 102 may include a first virtual unit 1021 and a second virtual unit 1022.
[0026] When the virtual cloud 101 obtains the Internet of Vehicles communication message sent by the first virtual unit 1021 , it can encrypt and compress the Internet of Vehicles communication message and send the encrypted and compressed data to the second virtual unit 1022 .
[0027] It can be understood that the IoV communication message is the IoV communication message in the simulated actual IoV communication scenario, and the message can be a message queuing telemetry transport (MQTT) message. MQTT is a lightweight, publish / subscribe-based message transmission protocol used to implement message transmission between devices in a low-bandwidth, unstable network environment.
[0028] The first virtual unit 1021 in the virtual vehicle end 102 can simulate the message sending end in the actual vehicle network communication process, and the second virtual unit 1022 can simulate the message receiving end in the actual vehicle network communication process. The second virtual unit 1022 can receive the message data sent by the virtual cloud end 101, and decrypt and decompress the received data.
[0029] It can be understood that the first virtual unit 1021 and the second virtual unit 1022 can represent different electronic control unit (ECU) 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 scene of internal communication in the vehicle; when the first virtual unit 1021 and the second virtual unit 1022 represent ECU nodes in different vehicles, the simulation is a scene of communication between the vehicle and the outside.
[0030] The following is based on Figure 1 The test environment shown, combined with Figure 2 The flowchart shown in FIG. 1 introduces a vehicle networking communication test method provided by an embodiment of the present application. Figure 2 ,like Figure 2 As shown, the method includes:
[0031] S201 , the first virtual unit 1021 sends a first message to the virtual cloud 101 .
[0032] In some embodiments, when performing a vehicle network communication test based on a vehicle network communication simulation test platform, the first virtual unit 1021 can be controlled to send a first message to the virtual cloud 101, wherein the first message can be an MQTT message, and the MQTT message includes a message header and a message body (i.e., a payload), the message header includes information such as a message type and a flag, and the payload includes actual message content, such as JavaScript object notation (JSON) data (or a string).
[0033] S202: The virtual cloud 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 in the first storage space.
[0035] In some embodiments, the virtual cloud 101 may write the message body of the first message, such as JSON data, into a local text file through a first CAPL script, and the local text file belongs to the first storage space.
[0036] In some embodiments, the virtual cloud 101 periodically reads the content of the local text file in the first storage space through the first Python script.
[0037] It can be understood that the above-mentioned timed 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, a few seconds, minutes or hours, etc.). This application does not impose any restrictions on this timing.
[0038] S203, the virtual cloud 101 compresses the first message based on the first Python script to obtain a second message and stores it in a second storage space.
[0039] In some embodiments, when the virtual cloud 101 reads the content of the first storage space based on the first Python script, it compresses the content of the first storage space using the first compression algorithm to obtain a second message, wherein the second message may be a byte stream (i.e., a binary data stream). The virtual cloud 101 may store the obtained byte stream in the second storage space.
[0040] Exemplarily, the first compression algorithm may be a gzip compression algorithm, a brotli algorithm, a zstandard algorithm, an LZ77 algorithm, an LZSS algorithm, an LZW algorithm, etc. The present application does not limit the specific first compression algorithm, and it may be selected according to actual application requirements.
[0041] In some embodiments, the virtual cloud 101 may write the obtained byte stream into a local compressed file, which belongs to the second storage space.
[0042] S204, the virtual cloud 101 reads the second message from the second storage space, and encrypts 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 a local compressed file in the second storage space to obtain a compressed byte stream.
[0044] In some embodiments, when the virtual cloud 101 reads the content of the second storage space, it calls the encryption interface to encrypt the byte stream to obtain the 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 may encapsulate the byte stream read from the second storage space and convert it into a character array, that is, convert the byte stream into character (char) type data, and then call the encryption interface to encrypt the character array to obtain the third message.
[0047] S205 , the virtual cloud 101 sends a third message to the second virtual unit 1022 .
[0048] In some embodiments, after receiving the third message, the virtual cloud 101 sends the third message to the second virtual unit 1022 through the simulated network.
[0049] In this way, by combining CAPL scripts with Python scripts, the simulation process of data compression and encryption can be automated, which can reduce the difficulty of test simulation.
[0050] S206, the second virtual unit 1022 decrypts the third message to obtain the second message and stores it in the third storage space.
[0051] In some embodiments, after receiving the compressed and encrypted data through the simulated network, the second virtual unit 1022 decrypts the third message to obtain the second message and stores it in the third storage space.
[0052] In some embodiments, the second virtual unit 1022 may call a decryption interface to decrypt the third message to obtain a 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 for encrypting the third message, it can ensure that the data before the third message is encrypted, that is, the compressed byte stream, can be restored.
[0054] In some embodiments, the second virtual unit 1022 may call the decryption interface through the second CAPL script. Furthermore, after obtaining the compressed byte stream, the second CAPL script may write the byte stream into a temporary local compressed file, which 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 the first message and stores it in the fourth storage space.
[0056] In some embodiments, the second virtual unit 1022 periodically reads the content in the third storage space through the second Python script, for example, periodically reads the local compressed file in the third storage space.
[0057] In some embodiments, when the second virtual unit 1022 reads the content in the third storage space, that is, reads the second message, it decompresses the second message based on the second Python script to obtain the first message and stores it in the fourth storage space.
[0058] In some embodiments, the second virtual unit 1022 may use a first decompression algorithm to decompress the second message (ie, the compressed byte stream) to obtain a first message, wherein 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, it can be ensured that the original first message is decompressed. Exemplarily, 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 use a decompression tool to decompress the second message. This application does not limit the specific decompression algorithm or decompression tool.
[0060] In some embodiments, after decompressing the first message, the second virtual unit 1022 may write the first message into a new local text file, and the local text file belongs to the fourth storage space.
[0061] It can be understood that the local text file may include the JSON data in the MQTT message mentioned in S201 above.
[0062] In this way, the Internet of Vehicles communication test method provided in the embodiment of the present application can build a test environment based on the Internet of Vehicles communication simulation test platform, and combine with Python scripts to realize the automated testing of the compression, encryption, decryption and decompression of simulated Internet of Vehicles communication messages, which greatly reduces manual testing operations and improves the accuracy and efficiency of the test. In addition, the embodiment of the present application provides support for the compression, encryption, transmission and reception tests of MQTT messages by simulating the construction of a test environment, further improving the integrity and accuracy of the test. Testing in a simulation environment can also discover and solve possible problems in the vehicle-side business in advance, thereby reducing the risks and costs after actual deployment.
[0063] Combine the following Figure 3 The timing diagram shown introduces the method of compressing and encrypting data mentioned in S201 to S204.
[0064] Based on the above description of S201 to S204, the virtual cloud 101 implements data compression and encryption processing through the first CAPL script and the first Python script. Specifically, Figure 3 As shown, the process includes:
[0065] S301, the virtual cloud 101 receives a vehicle networking communication message through a first CAPL script.
[0066] In some embodiments, the virtual cloud 1011 receives an Internet of Vehicles communication message through a first CAPL script. The message may be the MQTT message mentioned in S201 above. For details, please refer to the above description of S201.
[0067] S302, the virtual cloud 101 reads a first payload through a first CAPL script.
[0068] In some embodiments, after receiving the Internet of Vehicles communication message through the first CAPL script, the virtual cloud 101 can read the first valid part, where the first valid part 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 a first CAPL script.
[0070] In some embodiments, after the first CAPL script reads the payload, the payload may be written into a first local text file, for example, the file may be an original.dat file.
[0071] S304, the virtual cloud 101 sends a first call command (sysExecCmd1) through a first CAPL script.
[0072] In some embodiments, after the first CAPL script writes the payload into the first local text file, it may send a first calling command, such as sysExecCmd1, which 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 may start to execute the compression process. First, the first Python script may read the content in the original.dat file.
[0075] S306 , the virtual cloud 101 compresses the content of the original.dat file using a first compression algorithm through a first Python script.
[0076] In some embodiments, after the first Python script reads the content in the original.dat file, it uses a first compression algorithm to compress the content in the original.dat file.
[0077] S307 , the virtual cloud 101 writes the compressed data into a first local compressed file (compressed_output.dat.gz) through a first Python script.
[0078] In some embodiments, after the first Python script compresses the content in the original.dat file, it writes the compressed data into the compressed_output.dat.gz file.
[0079] S308 , the virtual cloud 101 reads the compressed_output.dat.gz file through the first CAPL script.
[0080] In some embodiments, after the first Python script writes the compressed data to the compressed_output.dat.gz file, the first CAPL script may read the compressed_output.dat.gz file.
[0081] S309 , the virtual cloud 101 encrypts the content of the compressed_output.dat.gz file through the first CAPL script.
[0082] In some embodiments, after the first CAPL script reads the compressed_output.dat.gz file, it can encrypt the content in the compressed_output.dat.gz file.
[0083] Combine the following Figure 4 The timing diagram shown introduces the method of compressing and encrypting data mentioned in S206 and S207 above.
[0084] Based on the above description of S206 and S207, the second virtual unit 1022 implements the decryption and decompression processing of the data through the second CAPL script and the second Python script. Specifically, Figure 4 As shown, the process includes:
[0085] S401, the second virtual unit 1022 receives a third message through a second CAPL script.
[0086] In some embodiments, the second CAPL script receives a third message, which may be the message mentioned in S205 above, which is 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 receiving the third message, the second CAPL script may decrypt the third message. For details, please refer to the above description of S206, which will not be repeated here.
[0089] S403, the second virtual unit 1022 writes the decrypted data into a second local compressed file through a second CAPL script.
[0090] In some embodiments, after the second CAPL script decrypts the third message, the decrypted data may be written into the second local compressed file.
[0091] S404, the second virtual unit 1022 sends a second calling command (sysExecCmd2) through a second CAPL script.
[0092] In some embodiments, after the second CAPL script writes the decrypted data into the second local compressed file, a second calling command, such as sysExecCmd2, may 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 a second Python script.
[0094] In some embodiments, after the second CAPL script calls the second Python script, the second Python script can start to execute 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 of the second local compressed file using the first decompression algorithm through the second Python script.
[0096] In some embodiments, after the second Python script reads the content in the second local compressed file, it uses the first decompression algorithm to decompress the content in the second local compressed file.
[0097] S407, the second virtual unit 1022 writes the decompressed data into a second local text file through a second Python script.
[0098] In some embodiments, after the second Python script decompresses the content in the second local compressed file, it 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 may read the second local text file.
[0101] S409: The second virtual unit 1022 parses 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, it can parse the text information in the content of the second local text file, for example, parse the JSON string in the second local text file for further analysis or use.
[0103] The vehicle network communication test method provided in the embodiment of the present application can achieve the integration of data compression and encryption through the coordinated work of CAPL scripts and Python scripts, thereby reducing the difficulty of test simulation.
[0104] An embodiment of the present application also provides a readable storage medium, which includes one or more programs. When the one or more programs are executed on an electronic device, the electronic device implements the vehicle network communication test method mentioned in the embodiment of the present application.
[0105] The present application also provides 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 present application embodiment. In some embodiments, the program product can be test software, such as a CAPL script.
[0106] An embodiment of the present application also provides 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 one or more programs so that the electronic device can implement the vehicle network communication test method mentioned in the embodiment of the present application.
[0107] Combine the following Figure 5 , introduces an electronic device provided in an embodiment of the present application.
[0108] like Figure 5As shown, the electronic device may include a transceiver 511 , a processor 512 , and a memory 513 .
[0109] The transceiver 511 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.
[0110] The processor 512 executes the computer execution instructions stored in the memory, so that the processor 512 executes the scheme in the above embodiment. The processor 512 can be a general-purpose processor, including a central processing unit CPU, a network processor (network processor, NP), etc.; it can also be a digital data processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0111] The memory 513 is connected to the processor 512 via a system bus and completes communication between them. The memory 513 is used to store computer program instructions.
[0112] By way of example and not limitation, the memory 513 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 513 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 513 may be inside or outside the integrated gateway device. In some embodiments, the memory 513 is a non-volatile solid-state memory. In some embodiments, the memory 513 includes a read-only memory (ROM). Where appropriate, the read-only memory may be a mask-programmed read-only memory, a programmable read-only memory (PROM), an electrically programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a 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, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. 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 may include random access memory (RAM) and may also include non-volatile memory.
[0114] The method provided in the embodiment of the present application can be applied to any electronic device to which the Internet of Vehicles communication simulation test platform can be applied, including but not limited to a mobile station (MS), a mobile terminal (MT), etc. For example, the electronic device can be a mobile phone, a smart TV, 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, etc. The embodiment of the present application does not limit the specific form of the electronic device.
[0115] The various embodiments disclosed in the present application may be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application may be implemented as a computer program or program code executed on a programmable system, the programmable system including at least one processor, a storage system (including volatile and non-volatile memory 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 the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this 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] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0118] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, a floppy disk, an optical disk, an optical disk, a magneto-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 card or an optical card, a flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signal digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
[0119] In the accompanying drawings, some structural or method features may be shown in a specific arrangement and / or order. However, it should be understood that such a specific arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
[0120] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation method of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems proposed by 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 units / modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units / modules in the above-mentioned device embodiments.
[0121] It should be noted that, in the examples and description of the present application, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of further restrictions, the elements defined by the statement "comprise one" do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.
[0122] Although the present application has been illustrated and described with reference to certain embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the scope of the present application.
Claims
1. A vehicle networking communication test method, characterized in that: The method comprises: Building a test environment based on the Internet of Vehicles communication simulation test platform, the test environment includes a virtual cloud and a virtual vehicle end; the virtual vehicle end includes 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 the first Python script to obtain a second message and stores it 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; When the second virtual unit receives the third message, it decrypts the third message to obtain the second message and stores it in the third storage space; The second virtual unit decompresses the second message based on the second Python script to obtain the first message and stores it 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 according to claim 1, characterized in that: The first message is a message queue telemetry transmission protocol message, and the second message is a byte stream.
3. The method according to claim 2, characterized in that The virtual cloud compresses the first message based on the first Python script to obtain a second message and stores it in a second storage space, including: When the virtual cloud reads the content of the first storage space based on the first Python script, the content of the first storage space is compressed 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 according to claim 3, characterized in that The virtual cloud reads the second message from the second storage space, and encrypts the second message to obtain a third message, including: When the virtual cloud reads the content of the second storage space, an encryption interface is called to encrypt the byte stream to obtain the third message.
5. The method according to claim 4, characterized in that When the virtual cloud reads the content of the second storage space, calling the encryption interface to encrypt the byte stream to obtain the third message includes: The virtual cloud encapsulates the byte stream and converts it into a character array; The virtual cloud calls the encryption interface to encrypt the character array to obtain the third message.
6. The method according to claim 5, characterized in that When the second virtual unit receives the third message, decrypting the third message to obtain the second message and storing it in the third storage space includes: 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 according to claim 6, characterized in that The second virtual unit decompresses the second message based on the second Python script to obtain the first message and stores it in 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, characterized in that: comprising 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 so that the electronic device implements the vehicle network communication testing method described in any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium includes one or more programs, and when the one or more programs are executed on an electronic device, the electronic device implements any one of the vehicle network communication testing methods of claims 1 to 7.
10. A program product, characterized in that When the program product is executed on an electronic device, the electronic device implements any one of the vehicle network communication testing methods in claims 1 to 7.
Citation Information
Patent Citations
System and methods for generating interactive virtual environments
CA2963609A1
Method for compression of emulation time line in presence of dynamic re-programming of clocks
CN110785761A
Intelligent driving virtual simulation cloud platform
CN111259545A
Automatic generalization simulation test method and device for automatic driving
CN115203031A
Internet-of-vehicles automatic test method and system based on cloud management end, and electronic equipment
CN118567326A