CN112235210B - Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet - Google Patents

Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet Download PDF

Info

Publication number
CN112235210B
CN112235210B CN202010877738.1A CN202010877738A CN112235210B CN 112235210 B CN112235210 B CN 112235210B CN 202010877738 A CN202010877738 A CN 202010877738A CN 112235210 B CN112235210 B CN 112235210B
Authority
CN
China
Prior art keywords
virtual machine
shared memory
data
domain
domain controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010877738.1A
Other languages
Chinese (zh)
Other versions
CN112235210A (en
Inventor
肖文平
何敖东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Hinge Electronic Technologies Co Ltd
Original Assignee
Shanghai Hinge Electronic Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Hinge Electronic Technologies Co Ltd filed Critical Shanghai Hinge Electronic Technologies Co Ltd
Priority to CN202010877738.1A priority Critical patent/CN112235210B/en
Publication of CN112235210A publication Critical patent/CN112235210A/en
Application granted granted Critical
Publication of CN112235210B publication Critical patent/CN112235210B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/30Network architectures or network communication protocols for network security for supporting lawful interception, monitoring or retaining of communications or communication related information
    • H04L63/306Network architectures or network communication protocols for network security for supporting lawful interception, monitoring or retaining of communications or communication related information intercepting packet switched data communications, e.g. Web, Internet or IMS communications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Technology Law (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a data communication method and a device of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet, which comprises the following steps: the system comprises a first multi-domain controller and a second multi-domain controller, wherein the multi-domain controller comprises a hardware platform and a virtual machine manager positioned on the hardware platform, and a virtual machine runs on the virtual machine manager; the method comprises the following steps that a first multi-domain controller obtains data from a chassis domain and a power domain and analyzes and processes the data through a plurality of virtual machines; the second multi-domain controller obtains data from an intelligent driving domain, an information entertainment domain and a vehicle body domain, and carries out analysis processing through a plurality of virtual machines, and the virtual machines on the multi-domain controller communicate in a shared memory mode of a dynamic adjustable storage space. The invention has the advantages of independent operation and safe isolation of data between domains, efficiency improvement and cost reduction.

Description

Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet
Technical Field
The invention relates to the field of automobiles, in particular to a data communication method and a data communication device for multiple virtual machines under a multi-domain controller of a vehicle-mounted Ethernet.
Background
With the increasing functional demands of automobiles on comfort, informatization and intelligence, electronic and Electrical systems of automobiles become more and more complex and huge, and Electronic and Electrical Architectures (EEAs) are in force. Meanwhile, the continuous development of the automobile electronic and electrical technology puts forward the requirements on EEA development such as platformization, modularization, evaluation, modification and the like. At present, the network architecture of the automobile is still based on a distributed architecture scheme mainly based on CAN bus communication, under the architecture, functional characteristics are distributed to functional modules of a plurality of ECUs, and a large number of ECUs CAN work in a mutual cooperation mode to meet various functional requirements of a driver. However, as the electronic and electrical functions of the automobile become more and more complex and the requirements of customers are greatly improved, the distributed architecture scheme only becomes more and more complex, and a large amount of functional interaction may cause functional coupling and fault coupling. With the application of domain distribution, cloud computing and big data, compared with a distributed architecture scheme, a centralized architecture scheme integrates a plurality of functional modules into a domain controller, the scheme of the current mature domain system is to divide the whole automobile into five functional domains, namely a power assembly domain, a chassis domain, an automobile body domain, an information entertainment domain and an auxiliary/automatic driving domain, the calculation and control of the middle layer comprises seven elements including main control, ethernet communication and wireless communication of the five domains, for example, although the system logics are mutually independent from many domains, the realization of control logics is convenient and fast, and meanwhile, the function management is convenient, for example, the construction of a safety level, the design of a communication method and the like, if the domains greatly increase the cost, because the domain controller is newly added cost, the material cost of the whole automobile electronic and electric system is increased on the premise that the cost is reduced due to the fact that a standardized actuator and a sensor controller of the bottom layer are not standardized by standardization, and the material cost of the whole automobile electronic and electric system is difficult to be popularized in all whole automobile enterprises at the present stage. How to reduce the cost and simultaneously give consideration to the management of safety, high efficiency and reliability becomes the challenge of domain controller research and development in the prior art, some solutions exist in the prior art, namely different domains are fused, but because different domains have different characteristics, how to make the problem of domain fusion such as automobile reliability, real-time performance, safety and data communication become a great challenge of automobile domain fusion.
In addition, how to safely and efficiently share data among the ECUs with more automobiles is still a major problem facing the use of the central computing platform. At present, although some technologies for solving data sharing of multiple virtual machines exist, for example, patent CN200910080933.5, which provides a method for sharing a memory for a computer and an operating system, and a method for sharing a memory is adopted for data communication between users on the system, the method only provides address mapping of the technology, and has the problem of how to transmit and integrity user data, and cannot be applied to a vehicle-mounted central computing platform. Patent CN 109684042a provides a method for dynamic adjustment of virtual machine memory in a virtualization platform, where the adjustment relates to memory adjustment of allocation among virtual machines, and is not shared memory adjustment among virtual machines. Memory allocation adjustment between virtual machines is more convenient due to the limited number of virtual machines involved and the simplicity of scheduling. However, since the shared memory between the virtual machines relates to data communication between the multiple virtual machines and each virtual machine has several processes, the transient data processing capacity and frequency of each process are different, and it is obvious that the requirement cannot be met by simply allocating the remaining memory. Such as patents CN103838633A, CN 109684042a, CN 106598697A, etc. still cannot solve the problem.
Based on the defects of the prior art, the invention provides a method for data communication between virtual machines after better domain control fusion.
Disclosure of Invention
In order to solve the technical defects in the prior art, the invention provides a data communication method for a multi-domain controller virtual machine based on a vehicle-mounted Ethernet, which comprises the following steps: the system comprises a first multi-domain controller and a second multi-domain controller, wherein the first multi-domain controller is connected with the second multi-domain controller through a vehicle-mounted Ethernet gateway; the multi-domain controller comprises a hardware platform and a virtual machine manager positioned on the hardware platform, wherein the virtual machine runs on the virtual machine manager;
the communication among a plurality of virtual machines in the same multi-domain controller at least comprises a shared memory, and the size of the space of the shared memory is dynamically adjusted according to the workload or the requirement of a process or a thread running in the virtual machine;
when a virtual machine of a sender sends a data packet to a virtual machine of a receiver in a shared memory mode, loading a dynamic variable priority through a priority layer, and sending the data packet to a created shared memory channel after encapsulation processing is carried out through a transmission layer; the memory blocks of the shared memory channel adopt a circular link list and are controlled and managed through unit data of shared memory management.
A multi-domain controller virtual machine data communication method based on a vehicle-mounted Ethernet is characterized in that a first multi-domain controller obtains data from a chassis domain and a power domain and analyzes and processes the data through a plurality of virtual machines; the second multi-domain controller acquires data from an intelligent driving domain, an infotainment domain and a vehicle body domain and performs analysis processing through a plurality of virtual machines;
the first multi-domain controller comprises a first virtual machine and a second virtual machine which are provided with real-time operating systems and are respectively used for processing data of a chassis domain and data of a power domain; the first virtual machine and the second virtual machine run based on an Autosar architecture;
and the second multi-domain controller is provided with a fourth virtual machine of a real-time operating system and a fifth virtual machine of a non-real-time operating system, the fourth virtual machine acquires and processes data of the intelligent driving domain, and the fifth virtual machine acquires and processes data of the infotainment domain and the vehicle body domain.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that a fourth virtual machine adopts an Rtlinux operating system, and a fifth virtual machine adopts one of Android, window, carpaly and linux;
the Rtliux operating system comprises the following components from top to bottom: the system comprises an application layer, a system layer and a base layer, wherein the layers are connected through a data I/O interface and a software defined interface;
the base layer comprises a hardware driver;
the system layer comprises an automatic driving system with a fusion perception layer, a decision-making layer and a control layer;
the fusion perception layer includes: the system comprises a data processing layer and a fusion positioning module, wherein the data processing layer is used for carrying out target detection, traffic sign identification, pedestrian identification and barrier identification based on deep learning;
the decision layer makes a decision to judge the vehicle execution action according to the data of the fusion sensing layer;
and the control layer issues an instruction to a corresponding ECU to execute a corresponding action according to the decision layer.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that when a priority virtual machine with a high security level in a multi-domain controller carries out remote communication, a data packet is sent to a local credible low-priority virtual machine in a mode of establishing a shared memory, and then the data packet is remotely communicated through a kernel protocol stack through the low-priority virtual machine;
when the high-priority virtual machine with the high security level of the multi-domain controller receives remote data, the trusted local low-priority virtual machine receives the remote data through the kernel protocol stack, and sends a data packet to the high-priority virtual machine in a mode of creating a shared memory.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that the size of a shared memory space is dynamically adjusted according to the workload or the requirement of a process or a thread running in the virtual machine; the virtual machine of the sending party needs to establish a shared memory channel and send a data packet to the virtual machine of the receiving party through the shared memory channel;
each virtual machine puts the sending data packet into the shared memory channel of the virtual machine, and obtains the receiving data from the shared memory channel of the corresponding virtual machine; the memory blocks belonging to each shared memory channel use a circular linked list.
A data communication method for a multi-domain controller virtual machine based on a vehicle-mounted Ethernet, further comprising the following steps of: idle data identification data, channel identification data, cell block maintenance data;
the idle data identification data is used as global metadata, is positioned at the initial position of the shared memory and is accessed by all virtual machines using a shared memory channel; the channel identification data is used for recording the channel of each memory; the cell block maintenance data is for maintaining a single memory block;
the virtual machine obtains the reference of the position of a new data packet in the shared memory by reading the channel identification data, and the channel identification data is used for maintaining the real-time utilization rate of the shared memory pipeline so as to carry out dynamic allocation/de-allocation;
the cell block maintenance data is used to store location references in each memory block that point to the beginning and end of the available data and to maintain pointers to the next block in the same shared memory pipeline.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that channel identification data comprise a first pair of pointers and a second pair of pointers, and the first pair of pointers are used for pointing to the starting position and the ending position of a shared memory area occupied by a data packet; the second pair of pointers are used for designating two memory blocks before and after separation;
the cell block maintenance data includes a third pair of pointers by which different memory blocks are linked to the circular linked list.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that an operating system runs on the virtual machine, a shared memory core component is arranged in the operating system, and the shared memory core component is used for controlling and managing a shared memory;
the shared memory core component comprises: the system comprises a data judger, an event manager and a dynamic shared memory controller.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that a data judger is used for intercepting a data packet sent by a virtual machine of a sender, analyzing a destination address of the data packet and judging whether the destination address is a local terminal or not, if the destination address is the local terminal, the data packet is transmitted through a shared memory core component, and if the destination address is a non-local terminal, the data packet is transmitted through a default kernel path;
the event manager passes an interrupt notification between the sender virtual machine and the receiver virtual machine; and the event manager informs the receiving virtual machine of being ready to acquire data from the shared memory, and after the data is successfully moved from the shared memory to the kernel buffer of the receiving virtual machine, the corresponding shared memory space is released.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that a dynamic shared memory controller is responsible for workload perception and demand-driven shared memory allocation and revocation; the dynamic shared memory controller dynamically adjusts channel capacity by monitoring the utilization of each shared memory channel.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that when a data packet is judged to be intercepted and identified to be communicated through a shared memory, a shared memory core component informs a sending party virtual machine to adopt a socket redirection strategy, and the socket redirection strategy comprises that socket buffering is established and is directly transmitted to a shared memory space from an application layer;
the socket redirection policy is for the sender virtual machine and not for the receiver virtual machine.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that a dynamic priority layer adds and dynamically adjusts the priority of a data packet according to one or more of a process identifier, an address identifier, a processor running load and a trigger identifier.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that when a plurality of processes or threads exist in the virtual machine and need to communicate through a shared memory, a virtual CPU interrupts responses in sequence according to a priority sequence;
the high priority process preferentially obtains the processing right of the virtual CPU and is not interrupted by the low priority CPU.
A data communication method for a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that when a sending party virtual machine sends a data packet to a receiving party virtual machine in a shared memory mode, if the receiving party virtual machine has a plurality of real-time processes and needs to obtain the data packet, the sending party virtual machine simultaneously creates shared memory channels with the same number as the number of the processes needing the data packet in the receiving party virtual machine, and respectively sends the data packet to the created shared memory channels, and the shared memory channels are released after the receiving party virtual machine obtains the data packet.
A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is further characterized in that a global storage space for sharing memory exchange is managed and distributed through the virtual machine, the address of the global storage space is mapped to a virtual space, and the storage space is divided into a plurality of elastic areas with adjustable capacity and distributed to the corresponding virtual machine;
monitoring the utilization rate of each shared elastic pool through a dynamic shared memory manager, and dynamically adjusting the size of an elastic area according to the memory exchange flow from the virtual machine;
if the virtual machine uses all the memory tiles in the elastic region and there are no memory tiles available in the globally allocated global memory space region, then the swap traffic will be automatically transferred to the non-volatile memory disk partition.
A multi-domain controller virtual machine data communication device based on an in-vehicle Ethernet comprises: the system comprises a first multi-domain controller and a second multi-domain controller, wherein the first multi-domain controller is connected with the second multi-domain controller through a vehicle-mounted Ethernet gateway; the multi-domain controller comprises a hardware platform and a virtual machine manager positioned on the hardware platform, wherein the virtual machine runs on the virtual machine manager;
the communication among a plurality of virtual machines in the same multi-domain controller at least comprises a shared memory;
the operating system runs on the virtual machine, a shared memory core component is arranged in the operating system, and the shared memory core component is used for controlling and managing a shared memory;
the shared memory core component comprises: the system comprises a data judger, an event manager and a dynamic shared memory controller; the dynamic shared memory controller is responsible for workload aware and demand driven shared memory allocation and retraction.
An in-vehicle ethernet-based multi-domain controller virtual machine data communication device, preferably, comprising: the data judger is used for intercepting a data packet sent by a virtual machine of a sender, analyzing a destination address of the data packet and judging whether the destination address is a local terminal or not, if the destination address is the local terminal, transmitting the data packet through a shared memory core component, and if the destination address is a non-local terminal, transmitting the data packet through a default kernel path;
the event manager passes an interrupt notification between the sender virtual machine and the receiver virtual machine; and the event manager informs the receiving virtual machine of being ready to acquire data from the shared memory, and after the data is successfully moved from the shared memory to the kernel buffer of the receiving virtual machine, the corresponding shared memory space is released.
Has the advantages that:
1. in the technical scheme provided by the invention, the priority is set on the encryption layer and the transmission layer and the dynamic variable priority is loaded, so that the priority setting on the application layer is avoided, and different suppliers can set different priorities under the condition that the APPs with the same function exist during the development of the APPs. The problem that the APP occupies system resources out of order and in the host is caused. By setting the same priority level on the priority level, the problem of priority level does not need to be considered in the development of APP functions by suppliers, because the set priority levels of different manufacturers possibly have contradictions in different scenes, and the problem can be solved by uniformly setting the priority levels on the priority level. In addition, when the priority is set, the priority of the same process is not fixed, and when the priority is set, the priority of the process is dynamically set by considering various factors such as process identification, address identification, processor running load and trigger identification, so that the process scheduling or data communication is flexible, and the self-adaptive adjustment can be realized.
2. In the technical scheme provided by the invention, the virtual machines in the vehicle-mounted central computing platform adopt the dynamic shared memory for communication by adopting a dynamic memory sharing mode, and the size of the shared memory of each virtual machine is dynamically shared according to the workload of a process or a thread in the running process. The unit data used for management is arranged in the shared memory, and the three pairs of pointers are arranged through the unit data, so that a plurality of memory blocks can be managed efficiently, a discontinuous memory address space can be used, and storage fragments are reduced.
3. In the technical scheme provided by the invention, the communication mode of the high-priority virtual machine in the multi-domain controller is not directly communicated with the low-priority virtual machine through the kernel protocol stack of the multi-domain controller, but is communicated with the outside through the kernel protocol stack of the low-priority virtual machine in a mode of establishing a shared memory. By adopting the method, when the data packet is hijacked by the virus in the transmission process, the virus starts to enter the virtual machine with low priority, and when the data packet is attacked, the virus is easily found by a security module, a firewall and the like in the virtual machine with low priority, so that the virus is intercepted or eliminated in time. Even if the high-priority process causes the CPU to be interrupted or traps the current security module process to unnecessarily clear or kill viruses so as to cause the low-priority virtual machine to be infected, the execution security module performs virus killing or clearing again after the CPU is interrupted or traps the current security module process, and the low-priority virtual machine cannot be dangerous to the high-priority security virtual machine even if infected in this period of time.
4. The invention fuses five domains of the automobile into two domains, namely the first multi-domain controller and the second multi-domain controller, and adopts a plurality of virtual machines to independently operate, analyze and process data from different domains, thereby achieving safety isolation and mutual independence, and being capable of improving efficiency and reducing cost. In addition, the first multi-domain controller also receives data of the intelligent driving domain from the second multi-domain controller, the data are calculated by the third virtual machine and serve as backup data of the fourth virtual machine, and when the fourth virtual machine breaks down, data input of the third virtual machine can be adopted in time, so that the safe running of the automobile is ensured.
5. In the technical scheme provided by the invention, when the virtual machine of the sending party sends the data packet to the virtual machine of the receiving party in a memory sharing mode, if the virtual machine of the receiving party has a plurality of real-time processes and needs to acquire the data packet, the plurality of processes can be simultaneously read and written by establishing a plurality of memory sharing channels, so that the real-time requirement of an automobile is met, and the defect that a larger memory space needs to be occupied is that the data packet is not required to be transmitted to the virtual machine of the receiving party.
6. In the technical scheme provided by the invention, the virtual machine manages and allocates the global storage space for sharing memory exchange, maps the address of the global storage space into the virtual, and divides the storage space into a plurality of elastic areas with adjustable capacity to be allocated to the corresponding virtual machine; monitoring the utilization rate of each shared elastic pool through a dynamic shared memory manager, and dynamically adjusting the size of an elastic area according to the memory exchange flow from the virtual machine; if the virtual machine uses all the memory tiles in the elastic region and there are no memory tiles available in the globally allocated global memory space region, then the swap traffic will be automatically transferred to the non-volatile memory disk partition. By the technical scheme, the technical problems that the data exchange performance is reduced and the system operation efficiency is seriously reduced due to the fact that the shared memory possibly overflows when the space of the shared memory is insufficient due to the sharing of large-capacity data or the shared memory reaches the upper limit can be solved.
Drawings
The following drawings are only schematic illustrations and explanations of the present invention, and do not limit the scope of the present invention.
Fig. 1 is a schematic diagram of an automotive network architecture based on a vehicle ethernet according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a first multi-domain controller according to an embodiment of the present invention.
Fig. 3 is a schematic structural diagram of a second multi-domain controller according to an embodiment of the present invention.
FIG. 4 shows a unit data according to an embodiment of the present invention, including: and the idle data identification data, the channel identification data and the cell block maintenance data are in the schematic diagram of the shared memory block.
Fig. 5 is a schematic diagram of a protocol stack framework for sharing memory according to an embodiment of the present invention.
Fig. 6 is a schematic diagram of an Rtlinux system architecture based on an intelligent driver in a fourth virtual machine according to an embodiment of the present invention.
Detailed Description
For a more clear understanding of the technical features, objects, and effects herein, embodiments of the present invention will now be described with reference to the accompanying drawings, in which like reference numerals refer to like parts throughout. For the sake of simplicity, the drawings are schematic representations of relevant parts of the invention and are not intended to represent actual structures as products. Moreover, in the drawings, components having the same structure or function are illustrated schematically or labeled schematically for simplicity and understanding.
As for the control system, the functional module, application program (APP), is well known to those skilled in the art, and may take any suitable form, either hardware or software, and may be a plurality of functional modules arranged discretely, or a plurality of functional units integrated into one piece of hardware. In its simplest form, the control system may be a controller, such as a combinational logic controller, a micro-programmed controller, or the like, so long as the operations described herein are enabled. Of course, the control system may also be integrated as a different module into one physical device without departing from the basic principle and scope of the invention.
The term "connected" in the present invention may include direct connection, indirect connection, communication connection, and electrical connection, unless otherwise specified.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, values, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, values, steps, operations, elements, components, and/or groups thereof. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items
It should be understood that the term "vehicle" or "vehicular" or other similar terms as used herein generally includes motor vehicles such as passenger automobiles including Sport Utility Vehicles (SUVs), buses, trucks, various commercial vehicles, watercraft including a variety of boats, ships, aircraft, and the like, and includes hybrid vehicles, electric vehicles, plug-in hybrid electric vehicles, hydrogen-powered vehicles, and other alternative fuel vehicles (e.g., fuels derived from non-petroleum sources). As referred to herein, a hybrid vehicle is a vehicle having two or more power sources, such as both gasoline-powered and electric-powered vehicles.
Specifically, the multi-domain controller virtual machine data communication apparatus provided by this embodiment, as shown in fig. 1 to 3, specifically includes: the system comprises a first multi-domain controller and a second multi-domain controller, wherein the first multi-domain controller is connected with the second multi-domain controller through a vehicle-mounted Ethernet gateway; the multi-domain controller comprises a hardware platform and a virtual machine manager positioned on the hardware platform, wherein the virtual machine runs on the virtual machine manager;
specifically, the embodiment provides an automobile network EE architecture based on a vehicle-mounted ethernet, and the integration of domain controllers is performed on a chassis domain, a power domain, an intelligent driving domain, an infotainment domain and an automobile body domain related to a traditional automobile, so that the use of the domain controllers is reduced. Specifically, a chassis domain comprises an ECU of a transmission system, a driving system, a steering system and an ECU of a braking system, a power domain comprises an engine, a clutch and an ECU of a gearbox, the ECU of the chassis domain transmits data to a first multi-domain controller, the ECU of the power domain transmits data to the first multi-domain controller, and because the two domains are relatively independent functional domains, the safety of a bottom layer and the implementation reliability of an automobile are considered, the safety level of the ASIL automobile is required to be met, the chassis domain and the power domain are fused, but the chassis domain and the power domain need to be separated independently, the first multi-domain controller is designed in the implementation, a first virtual machine and a second virtual machine are arranged in the multi-domain controller, the first virtual machine is used for computing the data of the chassis domain, the second virtual machine is used for computing the power domain, and a dynamic memory sharing mode is adopted for communication between the first virtual machine and the second virtual machine. The first multi-domain controller comprises a first virtual machine and a second virtual machine which are provided with real-time operating systems and are respectively used for processing data of a chassis domain and a power domain; the first virtual machine and the second virtual machine operate based on an Autosar architecture.
Because the intelligent driving domain and the information entertainment domain relate to a CPU and a GPU with high computational power, the built hardware platform is different from a chassis domain and a power domain, and in addition, the safety level is different, therefore, the implementation adopts a second multi-domain controller, the intelligent driving domain, the information entertainment domain and the vehicle body domain are fused into the second multi-domain controller, the second multi-domain control adopts a fourth virtual machine and a fifth virtual machine, the fourth virtual machine is responsible for processing data of the intelligent driving domain, the fifth virtual machine is responsible for processing data of the information entertainment domain and the vehicle body domain, in addition, information exchange among the intelligent driving domain, the information entertainment domain and the vehicle body domain is frequent, for example, a camera is required to be called by the intelligent driving domain to identify pedestrians or lanes, the information entertainment domain calls the camera to be used for photographing, face identification and the like, and the intelligent driving domain obtains information of vehicle doors, windows and the like of the vehicle body domain to be used for controlling and managing the vehicles. However, because the real-time performance and the safety level of the intelligent driving domain are different from those of the infotainment domain and the vehicle body domain, the intelligent driving domain and the infotainment domain are in charge of two independent virtual machines which are independent from each other and do not interfere with each other. And the second multi-domain controller is provided with a fourth virtual machine of a real-time operating system and a fifth virtual machine of a non-real-time operating system, the fourth virtual machine acquires and processes data of the intelligent driving domain, and the fifth virtual machine acquires and processes data of the infotainment domain and the vehicle body domain.
The fourth virtual machine adopts an Rtlinux operating system and is used for an intelligent driving domain, and the fifth virtual machine adopts one of Android, window, carpaly and linux;
as shown in fig. 6, in the Rtlinux operating system adopted in the intelligent driving area, the system includes, from top to bottom: the system comprises an application layer, a system layer and a base layer, wherein the layers are connected through a data I/O interface and a software defined interface;
the base layer comprises a hardware driver;
the system layer comprises an automatic driving system with a fusion perception layer, a decision-making layer and a control layer;
the fusion perception layer includes: the system comprises a data processing layer and a fusion positioning module, wherein the data processing layer is used for target detection, traffic sign identification, pedestrian identification and barrier identification based on deep learning;
the decision layer makes a decision to judge the vehicle execution action according to the data of the fusion sensing layer;
and the control layer issues an instruction to a corresponding ECU to execute a corresponding action according to the decision layer.
The vehicle-mounted Ethernet bus is used for high-speed transmission rate and real-time performance, and data transmission among the multi-domain controllers is carried out through the vehicle-mounted Ethernet bus.
The virtual machines comprise local virtual machine communication and remote communication, when the local virtual machines are communicated with each other, the communication among a plurality of virtual machines in the same multi-domain controller at least comprises a shared memory, and the size of the space of the shared memory is dynamically adjusted according to the workload or the requirement of a process or a thread running in the virtual machine;
when a virtual machine of a sender sends a data packet to a virtual machine of a receiver in a shared memory mode, loading a dynamic variable priority through a priority layer, and sending the data packet to a created shared memory channel after encapsulation processing is carried out through a transmission layer; the memory blocks of the shared memory channel adopt a circular link list and are controlled and managed through unit data of shared memory management.
The hardware layer comprises chips such as a processor, a memory, a hard disk, a display card and the like, and the chips form the hardware layer and are responsible for data operation and decision making of the whole automobile;
for example: the system comprises an English Webida Tegra K1 processor, an EyeQ3 chip of Mobileleye and a Cyclone 5FPGA chip hardware layer of Altera;
the hardware layer still is equipped with multiple different communication interface, includes: the vehicle-mounted Ethernet interface (100 base-T1, 1000base-T1), the Ethernet interface, the USB interface, the CAN interface, the LIN interface, the HDMI, the VGA and the LVDS interface;
the virtual machine manager runs on a hardware layer, is distributed with privileged instructions and sensitive instructions, and can directly operate hardware in the hardware layer, such as calling a processor, distributing storage space, memory space and the like;
the implementation adopts a domain fusion mode, the safety levels and the reliability levels related to different domains are different, after the domains are fused, different virtual machines are adopted to independently operate, for example, a fourth virtual machine in a second domain control domain is used for an intelligent driving domain, and a fifth virtual machine is used for an infotainment domain and a vehicle body domain. In order to reduce the risk, the implementation provides that a data packet sent by a high-security-level virtual machine is sent to a low-priority-level data packet to a low-priority-level virtual machine in a shared memory mode, then the data packet is sent through a kernel protocol stack of a bottom-line priority-level virtual machine for remote communication, otherwise, the data packet is received through the kernel protocol stack of the low-priority-level virtual machine, and then the data packet is sent to the high-priority-level virtual machine in a shared memory mode established by the low-priority-level virtual machine.
By adopting the method, when the data packet is hijacked by the virus in the transmission process, the virus starts to enter the virtual machine with low priority, and is easy to be found by a security module, a firewall and the like in the virtual machine with low priority when the data packet is transmitted and attacked, so that the virus is intercepted or cleared in time. The low-priority virtual machine is infected by the fact that the high-priority process enables the CPU to be interrupted or traps the current security module process to remove or kill viruses urgently, but the low-priority virtual machine is infected or removed by virus checking and killing after the CPU is interrupted or traps the current security module process for recovery, and the low-priority virtual machine is infected in time and is not dangerous to the high-priority security virtual machine.
Specifically, when a priority virtual machine with high security level in the multi-domain controller carries out remote communication, a data packet is sent to a local trusted low-priority virtual machine in a shared memory creating mode when data is sent, and then the data packet is carried out remote communication through a kernel protocol stack by the low-priority virtual machine;
when the priority virtual machine with high security level of the multi-domain controller receives remote data, the trusted local low-priority virtual machine receives the remote data through the kernel protocol stack, and sends a data packet to the high-priority virtual machine in a mode of establishing a shared memory.
In order to ensure the safety and reliability of the system, particularly the intelligent driving domain, if the virtual machine of the intelligent driving domain breaks down, an accident may happen. In order to reduce the occurrence of such a situation, in the prior art, a controller with weak performance is separately added for backup operation, a redundancy mechanism of a domain controller needs to be designed, and two independent operation units are set in the domain controller, but this way may cause cost increase.
In the multi-domain controller, a plurality of virtual machines run on a virtual machine manager, an operating system is installed on each virtual machine, if any virtual machine is provided with a real-time operating system, some virtual machines are provided with non-real-time operating systems, and in the operating system of the virtual machines, an operating system kernel accesses the virtual machine manager through a virtual I/O interface so as to realize the calling of hardware. The real-time operating system VxWorks, RT-Thread, uCOS, QNX, winCE and the non-real-time operating system comprise: android, carplay, etc.
The implementation provides a data communication method of a multi-domain controller virtual machine based on an on-board Ethernet, which runs on a multi-domain controller.
The virtual machine communication at least comprises a shared memory; the size of the shared memory space is dynamically adjusted according to the workload or the requirement of a process or a thread running in the virtual machine;
the operating system is arranged on the virtual machine, a shared memory core component is arranged in the operating system, and the shared memory core component is used for controlling and managing a shared memory;
the channel identification data comprises a first pair of pointers and a second pair of pointers, wherein the first pair of pointers are used for pointing to the starting position and the ending position of the shared memory area occupied by the data packet; the second pair of pointers are used for designating two memory blocks before and after separation; the cell block maintenance data includes a third pair of pointers by which different memory blocks are linked to the circular linked list.
The shared memory core component comprises: the system comprises a data judger, an event manager and a dynamic shared memory controller;
the data judger intercepts the outgoing data packet of each sender virtual machine and checks whether the data packet is moving to the local virtual machine at the same position, if so, the data packet is transmitted by using a preset shared memory transmission path; otherwise, sending the data packet through a default kernel path;
the event manager passes an interrupt notification between the sender virtual machine and the receiver virtual machine; the dynamic shared memory controller is responsible for workload aware and demand driven shared memory allocation and retraction. When a certain data packet is intercepted by the data packet analyzer and identified as to be sent to the local virtual machine, the shared memory core component informs the virtual machine core to allocate a socket buffer area, the data packet is obtained from the shared memory instead of the default core buffer area, and the data packet is directly copied from the user-level application program buffer area to the shared memory. The event manager notifies the recipient virtual machine that it is ready to retrieve data from the shared memory. After successfully moving the data from the shared memory to the kernel buffer of the recipient virtual machine, the corresponding shared memory space is released and the recipient virtual machine passes the data packet to its application through the default kernel path.
The data judger is positioned in the operating system of each virtual machine to intercept and analyze the data packets sent by the virtual machines. In the prior art, data packets are usually intercepted at an application layer and then directly put into a shared memory, so that the communication path is shortest and the realizable performance is better. Also by doing at the socket-level caching layer, packet interception can be achieved by modifying the socket APIs, but the application needs to be rewritten to incorporate these APIs, resulting in poor user-level transparency. In addition, if a packet is intercepted at the socket level, the kernel network stack will be skipped, and problems are likely to occur when data integrity needs to be guaranteed.
However, in the vehicle-mounted central computing platform, due to the real-time performance, reliability and safety of the vehicle, the safety and reliability are the first, and the transmitted data packets need to be guaranteed to be correct and reliable in the shared memory. Therefore, in this embodiment, the data determinator selects to block the data packet below the transport layer. The data packet is intercepted at the transmission layer by selecting, so as to ensure the correctness of data packet transmission under an unpredictable network environment.
As shown in fig. 5, the present implementation provides a protocol stack for performing communication by sharing a memory, which specifically includes: the system comprises an application layer, a socket buffer layer, an encryption layer, a priority layer and a transmission layer, wherein the encryption layer and the priority layer are non-essential channels below the socket buffer layer according to message information of a data packet, only the data packet with a local target address and needing to be transmitted through a shared memory passes through the two layers, and the rest of the data packets are communicated through a kernel protocol stack which is default by the system;
intercepting a data packet of a shared memory into two steps, wherein the first step of intercepting is performed after a socket buffer layer, the purpose of the intercepting is not to place the data packet into the shared memory, but to judge whether the destination address of the data packet is a local virtual machine, if the destination address of the data packet is the local virtual machine, a data packet analyzer places the data packet into a shared memory processing path for processing, and performs second intercepting on the processed data packet under a transmission layer;
intercepting for the second time under a transmission layer, and directly putting the intercepted data packet into a shared memory channel established by a virtual machine of a sender at the moment;
the shared memory processing path comprises an encryption layer and a priority layer, wherein the encryption layer is used for encrypting the data packet, and the priority layer is used for adding priority to the data packet.
In the prior art, the encryption of the data packet is performed at the application layer. However, considering the special factors of the automobile, different applications of the automobile are mostly from different tier1 manufacturers, and if encryption is performed in an application layer, the encryption method and the encryption mode of each APP are different, so that a large amount of resources are consumed for decryption between virtual machines. Therefore, an encryption layer is added independently to encrypt the data packets needing to pass through the shared memory, so that application programs of different manufacturers do not need to set an encryption method independently, in addition, the universality and the safety of the programs are ensured, and the link that a tier1 supplier needs to add encryption during application and development is saved. The encryption mode of adding the encryption layer is flexible, and the modification and the operation can be easily carried out.
And the dynamic priority layer adds and dynamically adjusts the priority of the data packet according to one or more of the process identifier, the address identifier, the processor running load and the trigger identifier.
Specifically, the traditional priority is set in an application layer, and when different suppliers develop APPs, the situation that APPs with the same function may set different priorities may occur, so that the problem that system resources are seized by key processes in a host out of order may occur. By setting the priority level uniformly, the supplier concentrates on developing the functions realized by the APP without considering the priority problem. Since the set priorities of different manufacturers may be contradictory in different scenarios, the problem can be solved by uniformly setting the priorities in the priority layer. In addition, when the priority is set, the priority of the same process is not fixed, and when the priority is set, the priority of the process is dynamically set by considering various factors such as process identification, address identification, processor running load and trigger identification, so that the process scheduling or data communication is flexible, and the self-adaptive adjustment can be realized. Such as: setting priorities including process priorities and virtual machine priorities; the trigger identifier comprises manual or periodic calling of a system scheduler, and when the process is caused to run manually, the priority added by the priority layer is greater than the priority added under the condition that the system scheduler is periodically called.
When a plurality of processes or threads exist in the virtual machine and need to communicate through the shared memory, the virtual CPU interrupts the response in sequence according to the priority order;
the high-priority process preferentially obtains the processing authority of the virtual CPU and is not interrupted by the low-priority CPU;
and if the transmitted address is not the local virtual machine, the data packet is not sent through the shared memory path, but the data packet is sent through a default kernel path to communicate with the remote end. At this time, the data judger does not have to perform a second interception.
The memory of the traditional virtual machine is in a virtualization platform such as a Grant table mechanism, so that memory pages are shared among virtual machines running on the same physical computer. In Xen, each virtual machine is initialized with a set of pages shared with the hypervisor, and the authorization table for each virtual machine is located in these shared pages. The entry in the grant table is used to locate a shared memory page between the two virtual machines. The authorization table mechanism provides a common interface for convenient memory sharing between virtual machines, but it suffers from a number of limitations. For example, shared memory is statically allocated. Thus, allocating a large shared memory region may waste memory resources needed by other applications running on the same guest VM. On the other hand, if the allocated shared memory region is insufficient to meet the workload demands, performance may be degraded.
In this embodiment, shared memory allocation is completed by PCI I/O memory remapping, and a shared memory allocator is provided in the virtual machine manager, and configures a memory region by a privilege instruction and returns an address of the memory region, and other processes can map the address into their own address spaces, and at the same time, a virtual PCI IO interface is created and allocated to a virtual machine.
With the rapid development of automobile electronic systems, they are becoming important parts of automobiles. In the process that the automobile adopts a distributed architecture to a centralized architecture, information processing of the ECUs needs to be processed on a central computing platform, so that a plurality of processes exist in a virtual machine, a plurality of threads exist in each process, different ECUs can belong to different domains according to functions of the ECUs and run on different virtual machines, and a great problem exists in the current vehicle-mounted central computing platform when how to manage a plurality of processes to communicate by using a shared memory.
In order to design a shared memory space for special design, in the implementation, specifically, a memory block of a shared memory channel adopts a circular link list, and is controlled and managed through unit data managed by a shared memory; the unit data includes: idle data identification data, channel identification data, cell block maintenance data; as shown in fig. 4, the number of the cell blocks allocated to the shared memory by the vm manager is 12, of which 1,4,8,11 is in a free state, and these free blocks are connected by a list; the virtual machine 1 uses 6,7,8, where the channel identification data in number 6 records the block number used by the shared memory channel, and each block has a block maintenance data. Similarly, virtual machine 2 employs 2,3,5,9,10. And recording the block number adopted by the shared memory channel in the memory block with the starting number of 2, wherein each block has unit block maintenance data.
The idle data identification data is global metadata which is positioned at the beginning of the shared memory and is accessed by all virtual machines using the shared memory channel; channel identification data records each shared memory channel. The key attribute is two pairs of pointers, the first pair being a front and back pointer, pointing to the beginning and end of the region where the data packet is stored, the values of the front and back pointers depending on the offset in the globally allocated shared memory region. Given that the shared memory regions are organized in memory blocks, it is likely that the packet size will not match the block size. Thus, the second pair of pointers, the front and back pointers, is used to specify the two memory blocks in which the front and back are located, respectively. A block of cells maintains data that maintains metadata for each individual block of memory. It contains a front and back pointer, a pointer linking different memory blocks to a list. Each shared memory channel is initialized using a single memory block. Depending on workload requirements, each virtual machine may need to allocate more shared memory blocks for its shared memory channel. Thus, the size of different shared memory channels may vary according to the workload requirements of each virtual machine;
specifically, a separate thread is created to implement this dynamic allocation, such as a dynamic shared memory controller, which monitors the utilization of each shared memory channel and dynamically adjusts the channel capacity. The process of setting up the shared memory channel involves three handshakes, which specifically includes: when the virtual machine of the sending party needs to send the data packet to the virtual machine of the receiving party, the channel creating message is generated by the virtual machine of the sending party and is sent to the virtual machine of the receiving party;
after receiving the channel creation message, the virtual machine of the receiving party initializes the shared memory channel from the memory area allocated by the host machine, and then sends an ACK message containing the newly initialized shared memory channel back to the virtual machine of the sending party;
after the virtual machine of the sending party receives the ACK message, the VM1 extracts the shared memory channel information from the ACK message and connects the shared memory channel information to the channel, and the virtual machine of the sending party sends the created FIN message to the virtual machine of the receiving party.
Through three-way handshake, it is confirmed that the shared memory channel is successfully connected, so that the problem in the creating process is avoided, the creating failure is avoided, the sending end or the receiving end does not know the problem of the creating failure, and the reliability can be improved through the three-way handshake.
When a certain data packet is intercepted by the data judger and identified as needing to be communicated through the shared memory, the shared memory core component informs the virtual machine of a sender of adopting a socket redirection strategy;
creating a shared memory by using a byte redirection strategy, including byte buffering;
the socket redirection policy is for the sender virtual machine and not for the receiver virtual machine;
specifically, the traditional set of byte buffers is created by creating a set of byte buffers in the kernel of the virtual machine, while the present implementation creates a set of byte buffers in the shared kernel and only used in the sending virtual machine.
Thus, data replication costs can be saved by socket redirection. Additionally, the application of socket redirection only to the sender virtual machine may provide efficiency. Because, if socket redirection is also applied at the receiver, packets containing a valid packet in the shared memory buffer cannot be released directly, it needs to wait for the packet to be successfully delivered to the application layer before it can be released. In addition, socket redirection can reduce risk compared to existing approaches by mapping the entire memory address space to the recipient. Socket redirection only allows packets to be placed from the user layer into virtual machine memory instead of the kernel.
Because the vehicle-mounted central computing platform has more involved processes and a large number of processes, such as pictures shot by a camera, three-dimensional data obtained by a laser radar, millimeter wave radar collected data and data transmission among intelligent automobiles, the data volume is very large.
In order to deal with the situation that large-capacity data is shared and overflow is possible after the shared memory is exceeded or the data exchange performance is reduced because the shared memory reaches a bottleneck, the implementation provides an exchange mode of the shared memory, specifically:
the method comprises the steps that a virtual machine manager allocates a global storage space for shared memory exchange, the storage space is divided into a plurality of elastic areas capable of adjusting the size of the storage space, each virtual machine has a corresponding elastic area of the shared memory, and each elastic area is composed of a plurality of small storage blocks; mapping the address of the global storage space into the virtual machine;
the small storage blocks belonging to the same elastic area form a linked list, and the virtual memory ID and the virtual machine address are recorded through a Hash table; the virtual machine obtains exchangeable storage small blocks by looking up the hash table; monitoring the utilization rate of each shared elastic pool through a dynamic shared memory manager, and dynamically adjusting the size of an elastic area according to the memory exchange flow from the virtual machine; if the virtual machine uses all the storage small blocks in the elastic region and no available storage small blocks exist in the globally allocated global storage space region, the exchange traffic is automatically transferred to the non-volatile storage disk partition;
or applying for distributing redundant shared memory space to the virtual machine manager, judging the use condition of all virtual machine memories on the whole hardware platform by the virtual machine manager, and when the use ratio of all the virtual machine memories is smaller than a preset threshold value, distributing redundant memory space by the virtual machine according to the requirement to meet the shared memory exchange requirement of the virtual machine, otherwise, automatically transferring the exchange flow to the disk partition of the nonvolatile memory.
In the prior art, a balloon area is adopted to dynamically adjust the internal use condition between virtual machines, but the balloon driving technology still has more problems, more and more memories are recycled by utilizing the balloon driving technology, and the performance is gradually reduced. If the balloon drives cause swapping at a high frequency, the performance of the entire virtual machine may be reduced. By the management method provided by the implementation, the size of the elastic region of the available shared memory is dynamically adjusted, and when the load is exceeded, data exchange is transferred to the nonvolatile memory for exchange, so that the system memory is prevented from being reduced due to high-frequency exchange.
In the intelligent automobile, a great number of ECUs are involved, the movement of the automobile is a coordinated operation, a plurality of units are required for matching, and therefore the problem of communication among a plurality of real-time processes can exist in a domain controller, for example: the method has the advantages that one process sends data through the shared memory, the situation that a plurality of memories read data at the same time can exist, and only one process is allowed to read data or write data at one time in the traditional mode through mutual exclusion locking. In order to solve this problem, the present implementation proposes a solution, specifically as follows:
when a sending party virtual machine sends a data packet to a receiving party virtual machine in a shared memory mode, if the receiving party virtual machine has a plurality of real-time processes and needs to acquire the data packet, the sending party virtual machine simultaneously creates shared memory channels with the same number as the processes needing the data packet in the receiving party virtual machine, respectively sends the data packet to the created shared memory channels, and releases the shared memory channels after the receiving party virtual machine acquires the data packet.
By creating a plurality of shared memory channels, a plurality of processes can read and write simultaneously, the requirement of real-time performance of the automobile is met, and the defect is that a larger memory space is required to be occupied.
What has been described above is only a preferred embodiment of the present invention, and the present invention is not limited to the above examples. It is clear to those skilled in the art that the form in this embodiment is not limited thereto, and the adjustable manner is not limited thereto. It is to be understood that other modifications and variations, which may be directly derived or suggested to one skilled in the art without departing from the basic concept of the invention, are to be considered as included within the scope of the invention.

Claims (15)

1. A data communication method of a multi-domain controller virtual machine based on a vehicle-mounted Ethernet is characterized by comprising the following steps: the system comprises a first multi-domain controller and a second multi-domain controller, wherein the first multi-domain controller is connected with the second multi-domain controller through a vehicle-mounted Ethernet gateway; the multi-domain controller comprises a hardware platform and a virtual machine manager positioned on the hardware platform, wherein the virtual machine runs on the virtual machine manager;
the communication among a plurality of virtual machines in the same multi-domain controller at least comprises a shared memory, and the size of the space of the shared memory is dynamically adjusted according to the workload or the requirement of a process or a thread running in the virtual machine;
when a virtual machine of a sender sends a data packet to a virtual machine of a receiver in a shared memory mode, loading a dynamic variable priority through a priority layer, and sending the data packet to a created shared memory channel after encapsulation processing is carried out through a transmission layer; the memory blocks of the shared memory channel adopt a circular link list and are controlled and managed through unit data managed by the shared memory;
when a priority virtual machine with high security level in the multi-domain controller carries out remote communication and sends data, a data packet is sent to a local credible low-priority virtual machine in a mode of establishing a shared memory, and then the data packet is carried out remote communication through a kernel protocol stack by the low-priority virtual machine;
when the high-priority virtual machine with the high security level of the multi-domain controller receives remote data, the trusted local low-priority virtual machine receives the remote data through the kernel protocol stack, and sends a data packet to the high-priority virtual machine in a mode of creating a shared memory.
2. The data communication method of the multi-domain controller virtual machine based on the vehicle-mounted Ethernet as claimed in claim 1, wherein the first multi-domain controller obtains data from a chassis domain and a power domain and analyzes and processes the data through a plurality of virtual machines; the second multi-domain controller acquires data from an intelligent driving domain, an infotainment domain and a vehicle body domain and performs analysis processing through a plurality of virtual machines;
the first multi-domain controller comprises a first virtual machine and a second virtual machine which are provided with real-time operating systems and are respectively used for processing data of a chassis domain and a power domain; the first virtual machine and the second virtual machine run based on an Autosar architecture;
and the second multi-domain controller is provided with a fourth virtual machine of a real-time operating system and a fifth virtual machine of a non-real-time operating system, the fourth virtual machine acquires and processes data of the intelligent driving domain, and the fifth virtual machine acquires and processes data of the infotainment domain and the vehicle body domain.
3. The data communication method of the virtual machine of the multi-domain controller based on the vehicular ethernet according to claim 2, wherein the fourth virtual machine adopts an Rtlinux operating system, and the fifth virtual machine adopts one of Android, window, carpaly and linux;
the Rtliux operating system comprises the following components from top to bottom: the system comprises an application layer, a system layer and a base layer, wherein the layers are connected through a data I/O interface and a software defined interface;
the base layer comprises a hardware driver;
the system layer comprises an automatic driving system with a fusion perception layer, a decision-making layer and a control layer;
the fusion perception layer includes: the system comprises a data processing layer and a fusion positioning module, wherein the data processing layer is used for carrying out target detection, traffic sign identification, pedestrian identification and barrier identification based on deep learning;
the decision layer makes a decision according to the data of the fusion sensing layer to judge the vehicle execution action;
and the control layer issues an instruction to a corresponding ECU according to the decision layer to execute a corresponding action.
4. The data communication method of the multi-domain controller virtual machine based on the vehicle-mounted Ethernet as claimed in claim 1, wherein the size of the shared memory space is dynamically adjusted according to the workload or the requirement of the process or the thread running in the virtual machine; the virtual machine of the sending party needs to establish a shared memory channel and send a data packet to the virtual machine of the receiving party through the shared memory channel;
each virtual machine puts the sending data packet into a shared memory channel of the virtual machine, and obtains receiving data from the shared memory channel of the corresponding virtual machine; the memory blocks belonging to each shared memory channel use a circular linked list.
5. The method for data communication of the virtual machine of the multi-domain controller based on the vehicular ethernet according to claim 1, wherein the unit data comprises: idle data identification data, channel identification data, cell block maintenance data;
the idle data identification data is used as global metadata, is positioned at the initial position of the shared memory and is accessed by all virtual machines using a shared memory channel; the channel identification data is used for recording the channel of each memory; the cell block maintenance data is for maintaining a single memory block;
the virtual machine obtains the reference of the position of a new data packet in the shared memory by reading the channel identification data, and the channel identification data is used for maintaining the real-time utilization rate of the shared memory pipeline so as to carry out dynamic allocation/de-allocation;
the cell block maintenance data is used to store location references in each memory block that point to the beginning and end of the available data and to maintain pointers to the next block in the same shared memory pipeline.
6. The data communication method of the vehicle-mounted Ethernet-based multi-domain controller virtual machine, according to claim 5, wherein the channel identification data comprises a first pair of pointers and a second pair of pointers, the first pair of pointers are used for pointing to a starting position and an ending position of the shared memory area occupied by the data packet; the second pair of pointers are used for designating two memory blocks before and after separation;
the cell block maintenance data includes a third pair of pointers by which different memory blocks are linked to the circular linked list.
7. The data communication method of the multi-domain controller virtual machine based on the vehicle-mounted Ethernet as claimed in claim 1, wherein an operating system runs on the virtual machine, a shared memory core component is arranged in the operating system, and the shared memory core component is used for controlling and managing the shared memory;
the shared memory core component comprises: the system comprises a data judger, an event manager and a dynamic shared memory controller.
8. The method as claimed in claim 7, wherein the data determiner is configured to intercept a data packet sent by the virtual machine of the sender, analyze a destination address of the data packet, and determine whether the destination address is a local terminal, if the destination address is the local terminal, transmit the data packet through the shared memory core component, and if the destination address is a non-local terminal, transmit the data packet through a default kernel path;
the event manager passes an interrupt notification between the sender virtual machine and the receiver virtual machine; the event manager notifies the recipient virtual machine that it is ready to retrieve data from the shared memory, and after successfully moving the data from the shared memory to the kernel buffer of the recipient virtual machine, the corresponding shared memory space is released.
9. The method as claimed in claim 7, wherein the dynamic shared memory controller is responsible for workload-aware and demand-driven shared memory allocation and revocation; the dynamic shared memory controller dynamically adjusts channel capacity by monitoring the utilization of each shared memory channel.
10. The method as claimed in claim 7, wherein when the data packet is intercepted by the data judgment and identified as to be communicated through the shared memory, the shared memory core component notifies the sending virtual machine to adopt a socket redirection policy, the socket redirection policy includes creation of socket buffering directly from the application layer to the shared memory space;
the socket redirection policy is for the sender virtual machine and not for the receiver virtual machine.
11. The method as claimed in claim 1, wherein the dynamic priority layer adds and dynamically adjusts the priority of the data packet according to one or more of process identifier, address identifier, processor operation load and trigger identifier.
12. The data communication method of the multi-domain controller virtual machine based on the vehicle-mounted Ethernet as claimed in claim 11, wherein when a plurality of processes or threads exist in the virtual machine and need to communicate through the shared memory at the same time, the virtual CPU interrupts the response in sequence according to the priority order;
the high priority process preferentially obtains the processing right of the virtual CPU and is not interrupted by the low priority CPU.
13. The data communication method of the multi-domain controller virtual machine based on the vehicle-mounted Ethernet as claimed in claim 1, wherein when the sending side virtual machine sends the data packet to the receiving side virtual machine in a shared memory manner, if the receiving side virtual machine has a plurality of real-time processes to acquire the data packet, the sending side virtual machine simultaneously creates a shared memory channel with the same number as the number of the processes requiring the data packet in the receiving side virtual machine, and respectively sends the data packet to the created shared memory channel, and the shared memory channel is released after the receiving side virtual machine acquires the data packet.
14. A multi-domain controller virtual machine data communication device based on vehicle-mounted Ethernet is characterized in that,
a communication device performing the multi-domain controller virtual machine data communication method of any one of claims 1 to 13;
the communication apparatus includes: the system comprises a first multi-domain controller and a second multi-domain controller, wherein the first multi-domain controller is connected with the second multi-domain controller through a vehicle-mounted Ethernet gateway; the multi-domain controller comprises a hardware platform and a virtual machine manager positioned on the hardware platform, wherein the virtual machine runs on the virtual machine manager;
the communication among a plurality of virtual machines in the same multi-domain controller at least comprises a shared memory;
the operating system runs on the virtual machine, a shared memory core component is arranged in the operating system, and the shared memory core component is used for controlling and managing a shared memory;
the shared memory core component comprises: the system comprises a data judger, an event manager and a dynamic shared memory controller; the dynamic shared memory controller is responsible for workload aware and demand driven shared memory allocation and retraction.
15. The device as claimed in claim 14, wherein the data determiner is configured to intercept a data packet sent by the virtual machine of the sender, analyze a destination address of the data packet, and determine whether the destination address is a local terminal, if the destination address is the local terminal, transmit the data packet through the shared memory core component, and if the destination address is a non-local terminal, transmit the data packet through a default kernel path;
the event manager passes an interrupt notification between the sender virtual machine and the receiver virtual machine; and the event manager informs the receiving virtual machine of being ready to acquire data from the shared memory, and after the data is successfully moved from the shared memory to the kernel buffer of the receiving virtual machine, the corresponding shared memory space is released.
CN202010877738.1A 2020-08-27 2020-08-27 Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet Active CN112235210B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010877738.1A CN112235210B (en) 2020-08-27 2020-08-27 Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010877738.1A CN112235210B (en) 2020-08-27 2020-08-27 Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet

Publications (2)

Publication Number Publication Date
CN112235210A CN112235210A (en) 2021-01-15
CN112235210B true CN112235210B (en) 2023-01-10

Family

ID=74117176

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010877738.1A Active CN112235210B (en) 2020-08-27 2020-08-27 Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet

Country Status (1)

Country Link
CN (1) CN112235210B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112860249B (en) * 2021-03-10 2022-10-14 上海交通大学 Modularization implementation method of intelligent driving domain controller software
CN113022478B (en) * 2021-03-23 2022-07-01 阿尔特汽车技术股份有限公司 Design method of domain controller for vehicle, domain controller and vehicle
CN113734072B (en) * 2021-09-15 2024-04-09 重庆长安汽车股份有限公司 Vehicle body domain open interface control system and vehicle
CN115220417B (en) * 2021-12-08 2024-01-30 广州汽车集团股份有限公司 Vehicle-mounted flow acquisition method and device and vehicle-mounted flow acquisition terminal
CN114285693B (en) * 2021-12-23 2023-04-21 延锋伟世通电子科技(上海)有限公司 Implementation method and system for automatic sar network flexray hardware buffer multiplexing
CN114578776B (en) * 2022-03-09 2023-06-20 武汉理工大学 Electronic and electric architecture topological structure and system of inland ship remote control system
CN114629773A (en) * 2022-03-17 2022-06-14 奥特酷智能科技(南京)有限公司 Domain-controlled vehicle-mounted network communication architecture based on virtualization layer
CN114884907B (en) * 2022-04-19 2023-07-25 中汽创智科技有限公司 Communication method, device, system, equipment and medium based on automatic driving
CN115051778B (en) * 2022-06-07 2023-06-27 西安微电子技术研究所 Linux modularized PRP protocol stack system
CN115412394B (en) * 2022-08-22 2023-08-18 奥特酷智能科技(南京)有限公司 Heterogeneous domain controller inter-core communication method based on AutoSar
CN115309715A (en) * 2022-10-12 2022-11-08 亿咖通(湖北)技术有限公司 Inter-domain data access method, vehicle-mounted system, processing equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005278215A (en) * 2005-04-28 2005-10-06 Hitachi Ltd Communication system and communication method
US8429675B1 (en) * 2008-06-13 2013-04-23 Netapp, Inc. Virtual machine communication
CN106844007A (en) * 2016-12-29 2017-06-13 中国科学院计算技术研究所 A kind of virtual method and system based on spatial reuse
CN107783821A (en) * 2017-01-25 2018-03-09 问众智能信息科技(北京)有限公司 Vehicle-mounted integral virtual method and device
CN109800050A (en) * 2018-11-22 2019-05-24 海光信息技术有限公司 A kind of EMS memory management process of virtual machine, device, relevant device and system
CN110891023A (en) * 2019-10-31 2020-03-17 上海赫千电子科技有限公司 Signal routing conversion method and device based on priority strategy
CN111216660A (en) * 2020-01-10 2020-06-02 上海掇联电子科技有限公司 Universal electronic and electric framework for new energy automobile
CN111427669A (en) * 2020-04-27 2020-07-17 安谋科技(中国)有限公司 Method, apparatus, medium, and system for managing virtual machines on computer device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101088260A (en) * 2004-12-28 2007-12-12 松下电器产业株式会社 Communication device, storage medium, integrated circuit, and communication system
US9311133B1 (en) * 2014-10-09 2016-04-12 Cisco Technology, Inc. Touchless multi-domain VLAN based orchestration in a network environment
EP3572939A1 (en) * 2018-05-25 2019-11-27 TTTech Auto AG Method, device and real-time network for highly-integrated automotive systems
EP3587194B1 (en) * 2018-06-29 2022-08-03 Aptiv Technologies Limited Power and data center (pdc) for automotive applications
CN108965437A (en) * 2018-07-21 2018-12-07 北京理工大学 Domain framework vehicle netbios, domain cooperative processing method and the domain control device of electric car
CN109515351B (en) * 2018-11-15 2019-08-27 上海赫千电子科技有限公司 Distributed state machine and vehicle-carrying distribution system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005278215A (en) * 2005-04-28 2005-10-06 Hitachi Ltd Communication system and communication method
US8429675B1 (en) * 2008-06-13 2013-04-23 Netapp, Inc. Virtual machine communication
CN106844007A (en) * 2016-12-29 2017-06-13 中国科学院计算技术研究所 A kind of virtual method and system based on spatial reuse
CN107783821A (en) * 2017-01-25 2018-03-09 问众智能信息科技(北京)有限公司 Vehicle-mounted integral virtual method and device
CN109800050A (en) * 2018-11-22 2019-05-24 海光信息技术有限公司 A kind of EMS memory management process of virtual machine, device, relevant device and system
CN110891023A (en) * 2019-10-31 2020-03-17 上海赫千电子科技有限公司 Signal routing conversion method and device based on priority strategy
CN111216660A (en) * 2020-01-10 2020-06-02 上海掇联电子科技有限公司 Universal electronic and electric framework for new energy automobile
CN111427669A (en) * 2020-04-27 2020-07-17 安谋科技(中国)有限公司 Method, apparatus, medium, and system for managing virtual machines on computer device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Optimized Inter-domain Communications Among Multiple Virtual Machines Based on Shared Memory;Jiang Congfeng,Wan Jian , Wu Hongyuan;《2015 IEEE 17th International Conference on High Performance Computing and Communications》;20151130;全文 *
硬件支持的多虚拟机数据交换及动态带宽分配方法;李龙飞等;《微电子学与计算机》;20200105(第01期);全文 *
肖文平 ; 杨斌.基于Android的车载导航系统的研究与设计.《单片机与嵌入式系统应用》.2012, *

Also Published As

Publication number Publication date
CN112235210A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN112235210B (en) Multi-domain controller virtual machine data communication method and device based on vehicle-mounted Ethernet
CN112153116B (en) Data sharing method for multiple virtual machines of central computing platform based on vehicle-mounted Ethernet
EP3748510A1 (en) Network interface for data transport in heterogeneous computing environments
JP5989862B2 (en) Computing device, method and machine readable storage medium for shared memory communication between secure virtual machines
US10127071B2 (en) Virtual switch for multi-compartment mixed critical network communications
EP3074865B1 (en) Hardware virtualization module for exclusive controlled access to cpu
US20080189432A1 (en) Method and system for vm migration in an infiniband network
US20210359955A1 (en) Cache allocation system
EP3461086B1 (en) Communication apparatus, communication method and computer-readable medium
US20230146364A1 (en) Process running method and apparatus
CN112817780A (en) Method and system for realizing safety and high-performance interprocess communication
CN109857517B (en) Virtualization system and data exchange method thereof
CN113254220A (en) Networked automobile load cooperative control method, device, equipment and storage medium
CN115509726A (en) Sensor data access system
CN111791886B (en) Real-time control system for vehicle and method for performing vehicle control via real-time control system
US20200278897A1 (en) Method and apparatus to provide an improved fail-safe system
US20220269546A1 (en) Control device, method, program, and vehicle
CN111737187A (en) Vehicle-mounted system on chip and chip
US20220058062A1 (en) System resource allocation for code execution
WO2024074090A1 (en) Smart cockpit implementation method, smart cockpit, and computer readable medium
US20230367910A1 (en) System for providing a plurality of functions for a device, in particular for a vehicle
US20230385189A1 (en) Information processing device, information processing method, and non-transitory storage medium
US20240101054A1 (en) In-vehicle device and method for starting the same
WO2023195468A1 (en) Vehicle control system, access control device, and access control method
US20240036941A1 (en) Vehicle-mounted computer, computer execution method, and computer program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant