Vehicle communication method and device

By obtaining the target code data in the autonomous driving system, building a target library, and using the intermediate communication layer to call the target library for data communication, the problem of high dependence on the operating environment of the intermediate communication layer is solved, the independence and flexibility of the intermediate communication layer is realized, and the application scope is expanded.

CN114625551BActive Publication Date: 2025-06-27CHINA FAW CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210171003.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-23
Publication Date
2025-06-27
Estimated Expiration
2042-02-23

AI Technical Summary

Technical Problem

In the prior art, the intermediate communication layer has high dependence on the operating environment, is inconvenient to transplant, and has a small application range.

Method used

By obtaining the target code data in the autonomous driving system, building a target library, and using the intermediate communication layer to call the target library for data communication, the independence and flexibility of the intermediate communication layer are achieved.

Benefits of technology

It realizes the independence of the intermediate communication layer, reduces dependence on the operating environment, simplifies the transplantation process, and expands the scope of application.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114625551B_ABST
    Figure CN114625551B_ABST
Patent Text Reader

Abstract

The present invention discloses a vehicle communication method and apparatus. Among them, the method includes: obtaining target code data in an autonomous driving system, where the target code data is used for data communication between other modules; constructing a target library based on the target code data; and using an intermediate communication layer to call the target library for data communication. The present invention solves the technical problems in the related art that the intermediate communication layer has poor independence, high dependence on the operating environment, inconvenient transplantation, and a small application range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicles, and in particular, to a vehicle communication method and apparatus. Background Art

[0002] The autonomous driving system Apollo introduced CyberRT in version 3.5, replacing the previous variant based on ROS (Robot Operating System). CyberRT realizes user-space scheduling by introducing coroutines. On the one hand, it can avoid the uncertainty brought by kernel scheduling tasks, and on the other hand, it can avoid the overhead caused by user-space to kernel-space switching. However, CyberRT needs to run in the environments of docker and bazel-bin, with high environmental dependence, resulting in inconvenient use and reduced application scope.

[0003] In view of the above problems, no effective solution has been proposed yet. Summary of the Invention

[0004] Embodiments of the present invention provide a vehicle communication method and apparatus to at least solve the technical problems in the related art that the communication framework has high dependence on the operating environment, is inconvenient to transplant, and has a small application scope.

[0005] According to one aspect of the embodiments of the present invention, a vehicle communication method is provided, including: obtaining target code data in an autonomous driving system, where the target code data is used for data communication between other modules; constructing a target library based on the target code data; and using an intermediate communication layer to call the target library for data communication.

[0006] Optionally, constructing a target library based on the target code data includes: installing a preset library file corresponding to the target code data through a preset script; reconstructing the target code data based on a target creation file to obtain reconstructed code data; and compiling the reconstructed code data to obtain an installation package of the target library.

[0007] Optionally, compiling the reconstructed code data to obtain an installation package of the target library includes: compiling the reconstructed code data to obtain compilation data; and packaging the compilation data to obtain an installation package.

[0008] Optionally, after compiling the reconstructed code data to obtain an installation package of the target library, install the installation package.

[0009] Optionally, using an intermediate communication layer to call the target library for data communication includes: introducing the target library into the intermediate communication layer; creating a second communication node by a first communication node of the intermediate communication layer; and performing data communication through the second communication node.

[0010] Optionally, creating a second communication node using a first communication node of an intermediate communication layer includes: creating a second read node and a callback function using a first read node of the intermediate communication layer, where the callback function is used to output received messages; creating a second write node using a first write node of the intermediate communication layer, where the write node is used to send messages.

[0011] Optionally, creating a second read node and a callback function using a first read node of the intermediate communication layer includes: obtaining a first channel name and a callback function through the first read node; looking up a read node corresponding to the first channel name; and creating and saving a second read node when no read node corresponding to the first channel name is found.

[0012] Optionally, creating a second write node using a first write node of the intermediate communication layer includes: obtaining a second channel name through the first write node; looking up a write node corresponding to the second channel name; and creating and saving a second write node when no write node corresponding to the second channel name is found.

[0013] Optionally, the first channel name and the second channel name are the same.

[0014] Optionally, data communication through the second communication node includes: obtaining a third channel name; looking up a write node corresponding to the third channel name; sending a message through the write node corresponding to the third channel name when a write node corresponding to the third channel name is found; and outputting an error message when no write node corresponding to the third channel name is found, where the error message is used to indicate that no write node corresponding to the third channel name is found.

[0015] According to another aspect of the embodiments of the present invention, a vehicle communication device is further provided, including: an acquisition module for acquiring target code data in an autonomous driving system, where the target code data is used for data communication between other modules; a construction module for constructing a target library based on the target code data; and a communication module for using an intermediate communication layer to call the target library for data communication.

[0016] Optionally, the construction module includes: an installation unit for installing a preset library file corresponding to the target code data through a preset script; a reconstruction unit for reconstructing the target code data based on a target creation file to obtain reconstructed code data; and a compilation unit for compiling the reconstructed code data to obtain an installation package of the target library.

[0017] Optionally, the compilation unit is further used to compile the reconstructed code data to obtain compilation data; and package the compilation data to obtain an installation package.

[0018] Optionally, the device further includes: an installation unit for installing the installation package.

[0019] Optionally, the communication module includes: an introduction unit for introducing a target library into the intermediate communication layer; a creation unit for creating a second communication node by using a first communication node of the intermediate communication layer; and a data communication unit for performing data communication through the second communication node.

[0020] Optionally, the creation unit includes: a first creation subunit for creating a second read node and a callback function by using a first read node of the intermediate communication layer, where the callback function is used to output received messages; and a second creation subunit for creating a second write node by using a first write node of the intermediate communication layer, where the write node is used to send messages.

[0021] Optionally, the first creation subunit includes: a first acquisition subunit for acquiring a first channel name and a callback function through the first read node; a first search subunit for searching for a read node corresponding to the first channel name; and a first creation and preservation subunit for creating and saving a second read node when the read node corresponding to the first channel name is not found.

[0022] Optionally, the second creation subunit includes: a second acquisition subunit for acquiring a second channel name through the first write node; a second search subunit for searching for a write node corresponding to the second channel name; and a second creation and preservation subunit for creating and saving a second write node when the write node corresponding to the second channel name is not found.

[0023] Optionally, the first channel name and the second channel name are the same.

[0024] Optionally, the data communication unit includes: a third acquisition subunit for acquiring a third channel name; a third search subunit for searching for a write node corresponding to the third channel name; a sending subunit for sending a message through the write node corresponding to the third channel name when the write node corresponding to the third channel name is found; and an output subunit for outputting an error message when the write node corresponding to the third channel name is not found, where the error message is used to indicate that the write node corresponding to the third channel name is not found.

[0025] On the other hand, according to an embodiment of the present invention, there is also provided a computer-readable storage medium. The computer-readable storage medium includes a stored program, where, when the program runs, it controls a device where the computer-readable storage medium is located to execute the above vehicle communication method.

[0026] On the other hand, according to an embodiment of the present invention, there is also provided a processor. The processor is used to run a program, where, when the program runs, it executes the above vehicle communication method.

[0027] In an embodiment of the present invention, target code data in an autonomous driving system is obtained, where the target code data is used for data communication between other modules; based on the target code data, a target library is constructed; and the target library is called by an intermediate communication layer for data communication. By obtaining the code data for data communication between other modules and using the intermediate communication layer to call the obtained code data, the purpose of constructing an independent intermediate communication layer is achieved, thereby realizing the technical effect of transplanting the intermediate communication layer, and further solving the technical problems in the related art, such as poor independence of the intermediate communication layer, high dependence on the operating environment, inconvenient transplantation, and small application range. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings:

[0029] Figure 1 is a flowchart of a vehicle communication method according to an embodiment of the present invention;

[0030] Figure 2 is an optional architecture design diagram of an intermediate communication layer according to an embodiment of the present invention;

[0031] Figure 3 is a flowchart of an optional method for creating a second read node and a callback function using a first read node of an intermediate communication layer according to an embodiment of the present invention;

[0032] Figure 4 is a flowchart of an optional method for creating a second write node using a first write node of an intermediate communication layer according to an embodiment of the present invention;

[0033] Figure 5 is a flowchart of an optional method for data communication through a second communication node according to an embodiment of the present invention;

[0034] Figure 6 is a schematic structural diagram of a vehicle communication device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0035] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

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

[0037] Embodiment 1

[0038] According to an embodiment of the present invention, there is provided a method embodiment for vehicle communication. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0039] Figure 1 is a flowchart of a vehicle communication method according to an embodiment of the present invention, as Figure 1 shown, the method includes the following steps:

[0040] Step S102, obtain target code data in the autonomous driving system, where the target code data is used for data communication between other modules.

[0041] The target code data in the above steps can be relevant data codes for inter-module communication. For example, it includes installation scripts of third-party libraries required by CyberRT and some dockerfile files, the source code part of CyberRT, cybercore bazel project external dependencies repositorys, the WORCKSAPCE file required by the cybercore bazel project, bazel compilation configuration files, some common.bzl files such as cpplint.bzl and common.bzl, etc. Specifically, it can be code data such as build, cyber, third_party, WORCKSAPCE,.bazelrc, tools, etc.; the Apollo source code can be directly downloaded and the above-mentioned relevant source code data of CyberRT can be copied from it; the other modules in the above steps can be modules that need to communicate in the vehicle, such as vehicle controllers and vehicle actuators, etc., but are not limited thereto.

[0042] Step S104: Build a target library based on the target code data.

[0043] The target library built in the above steps can be a newly built CyberRT library, which mainly includes five parts: lib, hdr, proto, conf, and tools. Among them, lib: stores the.so dynamic library and.a static library files generated by each sub-module in cyber; hdr: contains all the header files in cyber; proto: cyber proto-related header files and the dynamic library files generated by them; conf: cyber-related.conf files; tools: some debug utility tools provided by cyber.

[0044] The target library in the above steps is used to store the target code data and provide data resources to the intermediate communication layer; building the target library includes establishing the minimum system environment, installing the cmake tool, installing the cybercore-dependent third-party libraries, installing the dependent libraries required for visualization, installing the bazel project building tool, and the clean-up operation after installation. The target library can be installed by executing a shell script in the build path.

[0045] In an optional embodiment, download the Apollo source code and copy the CyberRT-related source code from it, such as: build, cyber, third_party, WORCKSAPCE,.bazelrc, tools, etc., and rebuild the cybercore project.

[0046] build: contains the installation scripts for the third-party libraries required by CyberRT and some dockerfile files.

[0047] cyber: the source code part of CyberRT.

[0048] third_party: cybercore bazel project external dependency repositorys.

[0049] WORCKSAPCE; the WORCKSAPCE file required by the cybercore bazel project.

[0050] .bazelrc: the configuration file for bazel compilation.

[0051] tools: contains some common.bzl files such as cpplint.bzl and common.bzl.

[0052] Step S106: Use the intermediate communication layer to call the target library for data communication.

[0053] The intermediate communication layer in the above steps is an existing intermediate communication layer. The intermediate communication layer is used to call the target library, making the intermediate communication layer independent of the previous system and becoming a separate intermediate communication system. The target library built can be called by configuring the environment information and using call instructions.

[0054] In an optional embodiment, the intermediate communication layer can create a read node, a write node, and a callback function. Among them, the channel_name of the read node is printed and received through the callback function, so that the channel_name of the write node is the same as that of the read node. The read node sends data and the write node receives data, thereby realizing data communication.

[0055] In an optional embodiment, the Apollo CyberRT system is part of the Apollo open-source software platform layer. As a runtime computing framework, it is located between the real-time operating system (RTOS) and the application module. As a basic platform, Apollo CyberRT supports the smooth and efficient operation of all application modules. CyberRT can only run in the environments of docker and bazel-bin. By separating CyberRT from Apollo through the above steps, it becomes independent and is no longer restricted by Apollo.

[0056] In the embodiment of the present invention, the method includes obtaining target code data in the autonomous driving system, where the target code data is used for data communication between other modules; building a target library based on the target code data; and using the intermediate communication layer to call the target library for data communication. By obtaining the code data for data communication between other modules and using the intermediate communication layer to call the obtained code data, the purpose of building an independent intermediate communication layer is achieved, thereby realizing the technical effect of transplanting the intermediate communication layer. Furthermore, the technical problems in the related art, such as the poor independence of the intermediate communication layer, high dependence on the operating environment, inconvenient transplantation, and small application range, are solved.

[0057] Optionally, building the target library based on the target code data includes: installing the preset library file corresponding to the target code data through a preset script; reconstructing the target code data based on the target creation file to obtain the reconstructed code data; and compiling the reconstructed code data to obtain the installation package of the target library.

[0058] In the above step of installing the preset library file corresponding to the target code data through a preset script, in an optional embodiment, enter the build path and execute the shell script to install the external third-party dependency library of cybercore, and execute the following commands respectively:

[0059] bash installers / install_minimal_environment.sh / / Establish the minimal system environment.

[0060] bash installers / install_cmake.sh / / Install the cmake tool.

[0061] bash installers / install_llvm_clang.sh / /

[0062] bash installers / install_cyber_deps.sh / / Install the third-party libraries required by cybercore.

[0063] bash installers / install_qa_tools.sh / /

[0064] bash installers / install_visualizer_deps.sh / / Install the dependent libraries required for visualization.

[0065] bash installers / install_bazel.sh / / Install the bazel project construction tool.

[0066] bash installers / post_install.sh / / Post-installation processing, cleaning operations.

[0067] The preset library files in the above steps are the preset library files corresponding to the above target code data, including but not limited to lib, hdr, proto, conf, and tools library files. The target code data can be reconstructed by designing a build file according to the structure and output target of the existing project.

[0068] In an optional embodiment, according to the structure and output target of the existing project, design a build file to reconstruct the cybercore project and output a cybercore deb installation package. The main design of the build file is as follows:

[0069]

[0070]

[0071] Optionally, obtaining the installation package of the target library by compiling the reconstructed code data includes: compiling the reconstructed code data to obtain compilation data; packaging the compilation data to obtain the installation package.

[0072] In an alternative embodiment, cybercore is compiled and packaged into a deb installation package. The packaging method is as follows: execute the following commands in the main project directory: bazel build deb_rules:cybercore-dev --host_force_python=PY2 --build_python_zip; thereby, a cybercore-dev.deb package is generated in the bazel-bin directory under the main project directory, that is, the installation package is obtained.

[0073] Optionally, after compiling the refactored code data to obtain the installation package of the target library, install the installation package.

[0074] In an alternative embodiment, after generating the cybercore-dev.deb package in the bazel-bin directory under the main project directory, install the cybercore deb package. Execute the following commands in the bazel-bin directory: sudo dpkg -i cybercore-dev.deb. Thereafter, the cyberRT library will be installed in the / opt / fawai / cyber_root path.

[0075] In another alternative embodiment, after installing the installation package, configure the environment and implement external reference to the cyberRT library in the intermediate communication layer.

[0076] The Workspace configuration is as follows:

[0077]

[0078]

[0079] Optionally, using the intermediate communication layer to call the target library for data communication includes: introducing the target library into the intermediate communication layer; creating a second communication node using the first communication node of the intermediate communication layer; and performing data communication through the second communication node.

[0080] The first communication node in the above steps can be a message node, and the second communication node can be one or both of a message read node and a message write node.

[0081] In an alternative embodiment, as Figure 2As shown, the message handler design is divided into three parts: the message node, the message reader, and the message writer. The message_node is used to access a singleton of the CyberRT node, through which the cyber reader and writer can be created. The message_reader is used to register and save the reader. The message_writer is used to register and save the writer node and receive messages from the reader node.

[0082] Optionally, creating a second communication node using a first communication node of the intermediate communication layer includes: creating a second read node and a callback function using a first read node of the intermediate communication layer, where the callback function is used to output the received message; creating a second write node using a first write node of the intermediate communication layer, where the write node is used to send messages.

[0083] In the above steps, creating a second read node and a callback function using a first read node of the intermediate communication layer is used to register a new read node, and creating a second write node using a first write node of the intermediate communication layer in the above steps is used to register a new write node.

[0084] Optionally, creating a second read node and a callback function using a first read node of the intermediate communication layer includes: obtaining a first channel name and a callback function through the first read node; finding the read node corresponding to the first channel name; and creating and saving a second read node if the read node corresponding to the first channel name is not found.

[0085] In an optional embodiment, the message reader provides an interface for registering a cyber reader and saves the created reader, as Figure 3 shown, the specific algorithm implementation is as follows:

[0086] STEP1: Obtain the channel name channel_name and the callback function callback_func through parameter passing;

[0087] STEP2: Find the corresponding reader according to the channel name channel_name;

[0088] STEP3: Determine whether the reader is found?

[0089] STEP4: If so, print that the reader already exists;

[0090] STEP5: If not, create and save the reader and register the callback_func.

[0091] Optionally, creating a second write node using the first write node of the intermediate communication layer includes: obtaining a second channel name through the first write node; looking up the write node corresponding to the second channel name; and creating and saving the second write node if the write node corresponding to the second channel name is not found.

[0092] In an optional embodiment, the message writer provides an interface for registering cyber writers and sending messages, and saves the created writers. As Figure 4 shown, the specific algorithm implementation of the program flow for registering cyber writers is as follows:

[0093] STEP1: Obtain the channel name channel_name through parameter passing;

[0094] STEP2: Look up the corresponding writer according to the channel name channel_name;

[0095] STEP3: Determine whether a writer is found?

[0096] STEP4: If so, print that the writer already exists;

[0097] STEP5: If not, create and save the writer.

[0098] Optionally, the first channel name and the second channel name are the same.

[0099] In an optional embodiment, the channels of the read node and the write node are the same.

[0100] Optionally, data communication through the second communication node includes: obtaining a third channel name; looking up the write node corresponding to the third channel name; sending a message through the write node corresponding to the third channel name if the write node corresponding to the third channel name is found; and outputting an error message if the write node corresponding to the third channel name is not found, where the error message is used to indicate that the write node corresponding to the third channel name is not found.

[0101] In an optional embodiment, as Figure 5 shown, the specific steps for the message writer to send a message are as follows:

[0102] STEP1: Obtain the channel name channel_name through parameter passing;

[0103] STEP2: Look up the corresponding writer according to the channel name channel_name;

[0104] STEP3: Determine whether the writer is found?

[0105] STEP4: If so, send the proto message;

[0106] STEP5: If not, print the error message: The writer cannot be found.

[0107] In another alternative embodiment, within a process, a reader node is created using a message reader, and a callback function is registered. The function of the callback function is to print the received message. Assume the channel_name is "test". Within another process, a writer node is created using a message writer, and the channel_name is also set to "test". The channel_names of the reader and the writer should be consistent; message data is sent in real time through the writer. Run the two processes, and the intermediate communication layer message reader sends data, and the message writer receives data to achieve two-way communication between the two ends.

[0108] Embodiment 2

[0109] According to another aspect of the embodiments of the present invention, a vehicle communication device is further provided. It should be noted that this device adopts the vehicle communication method in the above embodiments, and details will not be described herein again.

[0110] Figure 6 A schematic structural diagram of a vehicle communication device according to an embodiment of the present invention is as Figure 6 shown. The device includes: an acquisition module 62, configured to acquire target code data in the autonomous driving system, where the target code data is used for data communication between other modules; a construction module 64, configured to construct a target library based on the target code data; and a communication module 66, configured to use the intermediate communication layer to call the target library for data communication.

[0111] Optionally, the construction module 64 includes: an installation unit, configured to install a preset library file corresponding to the target code data through a preset script; a reconstruction unit, configured to reconstruct the target code data based on a target creation file to obtain reconstructed code data; and a compilation unit, configured to compile the reconstructed code data to obtain an installation package of the target library.

[0112] Optionally, the compilation unit is further configured to compile the reconstructed code data to obtain compilation data; and package the compilation data to obtain an installation package.

[0113] Optionally, the device further includes an installation unit, configured to install the installation package.

[0114] Optionally, the communication module 66 includes: an introduction unit for introducing a target library into the intermediate communication layer; a creation unit for creating a second communication node by using a first communication node of the intermediate communication layer; and a data communication unit for performing data communication through the second communication node.

[0115] Optionally, the creation unit includes: a first creation subunit for creating a second read node and a callback function by using a first read node of the intermediate communication layer, where the callback function is used to output received messages; and a second creation subunit for creating a second write node by using a first write node of the intermediate communication layer, where the write node is used to send messages.

[0116] Optionally, the first creation subunit includes: a first acquisition subunit for acquiring a first channel name and a callback function through the first read node; a first search subunit for searching for a read node corresponding to the first channel name; and a first creation and preservation subunit for creating and saving a second read node when the read node corresponding to the first channel name is not found.

[0117] Optionally, the second creation subunit includes: a second acquisition subunit for acquiring a second channel name through the first write node; a second search subunit for searching for a write node corresponding to the second channel name; and a second creation and preservation subunit for creating and saving a second write node when the write node corresponding to the second channel name is not found.

[0118] Optionally, the first channel name and the second channel name are the same.

[0119] Optionally, the data communication unit includes: a third acquisition subunit for acquiring a third channel name; a third search subunit for searching for a write node corresponding to the third channel name; a sending subunit for sending a message through the write node corresponding to the third channel name when the write node corresponding to the third channel name is found; and an output subunit for outputting an error message when the write node corresponding to the third channel name is not found, where the error message is used to indicate that the write node corresponding to the third channel name is not found.

[0120] Embodiment 3

[0121] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium. The computer-readable storage medium includes a stored program, where when the program runs, it controls the device where the computer-readable storage medium is located to execute the vehicle communication method in Embodiment 1 above.

[0122] Embodiment 4

[0123] According to another aspect of the embodiments of the present invention, there is also provided a processor. The processor is used to run a program, where when the program runs, it executes the vehicle communication method in Embodiment 1 above.

[0124] The serial numbers of the embodiments of the present invention above are only for description and do not represent the superiority or inferiority of the embodiments.

[0125] In the above embodiments of the present invention, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0126] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of units or modules can be in an electrical or other form.

[0127] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0128] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

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

[0130] The above are only the preferred embodiments of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A vehicle communication method, characterized in that, Including: Obtain target code data in the autonomous driving system, where the target code data is used for data communication between other modules, and the target code data is the relevant source code data of CyberRT; Based on the target code data, construct a target library; Use the intermediate communication layer to call the target library for data communication; Among them, based on the target code data, constructing a target library includes: installing the preset library file corresponding to the target code data through a preset script; reconstructing the target code data based on the target creation file to obtain the reconstructed code data; compiling the reconstructed code data to obtain the installation package of the target library; Using the intermediate communication layer to call the target library for data communication includes: introducing the target library into the intermediate communication layer; creating a second communication node using the first communication node of the intermediate communication layer; performing data communication through the second communication node.

2. The method according to claim 1, characterized in that, Compiling the reconstructed code data to obtain the installation package of the target library includes: Compiling the reconstructed code data to obtain compilation data; Packaging the compilation data to obtain the installation package.

3. The method according to claim 1, wherein After compiling the reconstructed code data to obtain the installation package of the target library, install the installation package.

4. The method according to claim 1, characterized in that Using the first communication node of the intermediate communication layer to create a second communication node includes: Using the first read node of the intermediate communication layer to create a second read node and a callback function, where the callback function is used to output the received message; Using the first write node of the intermediate communication layer to create a second write node, where the write node is used to send messages.

5. The method according to claim 4, characterized in that Using the first read node of the intermediate communication layer to create a second read node and a callback function includes: Obtain the first channel name and the callback function through the first read node; Search for the read node corresponding to the first channel name; In the case where the read node corresponding to the first channel name is not found, create and save the second read node.

6. The method according to claim 4, wherein Using the first write node of the intermediate communication layer to create a second write node includes: Obtain the second channel name through the first write node; Search for the write node corresponding to the second channel name; In the case where the write node corresponding to the second channel name is not found, create and save the second write node.

7. The method according to claim 4, characterized in that Performing data communication through the second communication node includes: Obtain the third channel name; Search for the write node corresponding to the third channel name; In the case where the write node corresponding to the third channel name is found, send a message through the write node corresponding to the third channel name; In the case where the write node corresponding to the third channel name is not found, output an error message, where the error message is used to indicate that the write node corresponding to the third channel name is not found.

8. A vehicle communication device, characterized in that, Including: An acquisition module for obtaining target code data in the autonomous driving system, where the target code data is used for data communication between other modules, and the target code data is the relevant source code data of CyberRT; A construction module for constructing a target library based on the target code data; A communication module for using the intermediate communication layer to call the target library for data communication; The building block is also used to install a preset library file corresponding to the target code data through a preset script; reconstruct the target code data based on a target creation file to obtain reconstructed code data; and compile the reconstructed code data to obtain an installation package of the target library. The communication module is also used to introduce the target library into the intermediate communication layer; create a second communication node by using a first communication node of the intermediate communication layer; and perform data communication through the second communication node.

Citation Information

Patent Citations

  • Method, server and system for remotely and dynamically compiling Android project

    CN110427189A

  • Code index management method and device, equipment and medium

    CN113220279A