[go: up one dir, main page]

CN116248772A - Data transmission method, device, equipment and medium under virtualization management - Google Patents

Data transmission method, device, equipment and medium under virtualization management Download PDF

Info

Publication number
CN116248772A
CN116248772A CN202310134855.2A CN202310134855A CN116248772A CN 116248772 A CN116248772 A CN 116248772A CN 202310134855 A CN202310134855 A CN 202310134855A CN 116248772 A CN116248772 A CN 116248772A
Authority
CN
China
Prior art keywords
data
platform domain
target
domain
data packet
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.)
Pending
Application number
CN202310134855.2A
Other languages
Chinese (zh)
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.)
Ecarx Hubei Tech Co Ltd
Original Assignee
Ecarx Hubei Tech 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 Ecarx Hubei Tech Co Ltd filed Critical Ecarx Hubei Tech Co Ltd
Priority to CN202310134855.2A priority Critical patent/CN116248772A/en
Publication of CN116248772A publication Critical patent/CN116248772A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • G06F15/7825Globally asynchronous, locally synchronous, e.g. network on chip
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data transmission method, device, equipment and medium under virtualization management. The method is applied to the same system-on-chip SOC, wherein the SOC comprises a first platform domain and a second platform domain, and the method comprises the following steps: receiving service data of a user space through a first platform domain, determining a target data packet of the service data under a target format by combining a first driver of a first virtual Ethernet in a kernel space, writing the target data packet into a designated memory area, and sending a notification message to a second platform domain; and receiving the notification message through the second platform domain, and acquiring service data in the user space of the second platform domain according to the notification message and combining a second driver of the second virtual Ethernet in the kernel space of the second platform domain. Through the virtual Ethernet, the supporting of standard network communication related APIs between different platform domains and the supporting of various network protocol stacks are realized; different platform domain standards, high efficiency, simplicity and convenience and general communication modes are realized.

Description

虚拟化管理下的数据传输方法、装置、设备及介质Data transmission method, device, equipment and medium under virtualization management

技术领域technical field

本发明涉及虚拟化技术领域,尤其涉及虚拟化管理下的数据传输方法、装置、设备及介质。The invention relates to the technical field of virtualization, in particular to a data transmission method, device, equipment and medium under virtualization management.

背景技术Background technique

智能座舱芯片含有三个独立的CPU单元,分别是自适应平台(Adaptive Platform,AP)域,AP域为CPU Cluster0,其包含2个Cortex-A55以及4个Cortex-A76;经典平台(Classic Platform,CP)域,CP域为CPU Cluster1,其包含2个Cortex-A55、RP域为安全处理器,其包含1个Cortex-R52);另外E04含有LPDDR5、UFS、GPU、VPU、HIFI5、Audio、DPU、Ethernet等子系统模块,这些子系统模块可分配到不同的CPU域进行处理。在车机系统软件中,AP域与CP域需要交互大量数据,例如:车辆的信号数据、AVM业务的控制数据、导航投屏到仪表屏的图像数据等等。The smart cockpit chip contains three independent CPU units, which are the adaptive platform (Adaptive Platform, AP) domain, and the AP domain is CPU Cluster0, which contains 2 Cortex-A55 and 4 Cortex-A76; Classic Platform (Classic Platform, CP) domain, CP domain is CPU Cluster1, which contains 2 Cortex-A55, RP domain is security processor, which contains 1 Cortex-R52); In addition, E04 contains LPDDR5, UFS, GPU, VPU, HIFI5, Audio, DPU , Ethernet and other subsystem modules, these subsystem modules can be assigned to different CPU domains for processing. In the vehicle-machine system software, the AP domain and the CP domain need to interact with a large amount of data, such as: vehicle signal data, AVM business control data, image data projected from the navigation screen to the instrument screen, and so on.

目前AP域与CP域之间的数据交互,是通过Mailbox以及Share Memory底层软件来实现,但业务数据属于应用空间,即对应为驱动层的机制,并不适合业务需求的软件设计与开发。At present, the data interaction between the AP domain and the CP domain is realized through the underlying software of Mailbox and Share Memory, but the business data belongs to the application space, that is, the mechanism corresponding to the driver layer, which is not suitable for the software design and development of business requirements.

发明内容Contents of the invention

本发明提供了一种虚拟化管理下的数据传输方法、装置、设备及介质,以实现不同平台域间的通讯。The invention provides a data transmission method, device, equipment and medium under virtualization management, so as to realize communication between domains of different platforms.

根据本发明的一方面,提供了一种虚拟化管理下的数据传输方法,应用于同一系统级芯片SOC中,所述SOC中包括第一平台域及第二平台域,所述方法包括:According to one aspect of the present invention, a data transmission method under virtualization management is provided, which is applied in the same system-on-chip SOC, the SOC includes a first platform domain and a second platform domain, and the method includes:

通过所述第一平台域接收用户空间的业务数据,结合内核空间中第一虚拟以太网的第一驱动程序,确定所述业务数据在目标格式下的目标数据包,将所述目标数据包写入指定内存区域中,并向所述第二平台域发送通知消息;Receive the business data of the user space through the first platform domain, combine the first driver program of the first virtual Ethernet in the kernel space, determine the target data packet of the business data in the target format, and write the target data packet into the specified memory area, and send a notification message to the second platform domain;

通过所述第二平台域接收所述通知消息,并根据所述通知消息结合所述第二平台域内核空间中第二虚拟以太网的第二驱动程序,在所述第二平台域的用户空间内获取所述业务数据。Receive the notification message through the second platform domain, and combine the second driver program of the second virtual Ethernet in the kernel space of the second platform domain according to the notification message, in the user space of the second platform domain Obtain the business data within.

根据本发明的另一方面,提供了一种虚拟化管理下的数据传输装置,应用于同一系统级芯片SOC中,所述SOC中包括第一平台域及第二平台域,所述装置包括:According to another aspect of the present invention, a data transmission device under virtualization management is provided, which is applied in the same system-on-chip SOC, the SOC includes a first platform domain and a second platform domain, and the device includes:

发送模块,用于通过所述第一平台域接收用户空间的业务数据,结合内核空间中第一虚拟以太网的第一驱动程序,确定所述业务数据在目标格式下的目标数据包,将所述目标数据包写入指定内存区域中,并向所述第二平台域发送通知消息;The sending module is configured to receive the service data of the user space through the first platform domain, and determine the target data packet of the service data in the target format in combination with the first driver program of the first virtual Ethernet in the kernel space, and send the Writing the target data packet into the specified memory area, and sending a notification message to the second platform domain;

获取模块,用于通过所述第二平台域接收所述通知消息,并根据所述通知消息结合所述第二平台域内核空间中第二虚拟以太网的第二驱动程序,在所述第二平台域的用户空间内获取所述业务数据。An acquisition module, configured to receive the notification message through the second platform domain, and combine the second driver program of the second virtual Ethernet in the kernel space of the second platform domain according to the notification message, in the second The service data is acquired in the user space of the platform domain.

根据本发明的第三方面,提供了一种电子设备,所述电子设备包括:According to a third aspect of the present invention, an electronic device is provided, and the electronic device includes:

至少一个处理器;以及at least one processor; and

与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein,

所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器能够执行本发明任一实施例所述的虚拟化管理下的数据传输方法。The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the method described in any embodiment of the present invention. Data transfer method under virtualization management.

根据本发明的第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的虚拟化管理下的数据传输方法。According to a fourth aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement any of the embodiments of the present invention when executed. Data transfer method under virtualization management.

本发明实施例的技术方案,应用于同一系统级芯片SOC中,SOC中包括第一平台域及第二平台域,方法包括:通过第一平台域接收用户空间的业务数据,结合内核空间中第一虚拟以太网的第一驱动程序,确定业务数据在目标格式下的目标数据包,将目标数据包写入指定内存区域中,并向第二平台域发送通知消息;通过第二平台域接收通知消息,并根据通知消息结合第二平台域内核空间中第二虚拟以太网的第二驱动程序,在第二平台域的用户空间内获取业务数据。通过虚拟以太网,实现了不同平台域之间支持标准网络socket通讯相关API,以及支持多种网络协议栈;实现了不同平台域标准、高效、简便以及通用的通讯方式。The technical solution of the embodiment of the present invention is applied to the same system-on-chip SOC, and the SOC includes the first platform domain and the second platform domain. The method includes: receiving the service data of the user space through the first platform domain, and combining the second The first driver program of a virtual Ethernet determines the target data packet of the service data in the target format, writes the target data packet into the specified memory area, and sends a notification message to the second platform domain; receives the notification through the second platform domain message, and according to the notification message combined with the second driver program of the second virtual Ethernet in the kernel space of the second platform domain, obtain service data in the user space of the second platform domain. Through the virtual Ethernet, it realizes the support of standard network socket communication related APIs between different platform domains, and supports multiple network protocol stacks; realizes the standard, efficient, simple and common communication methods of different platform domains.

应当理解,本部分所描述的内容并非旨在标识本发明的实施例的关键或重要特征,也不用于限制本发明的范围。本发明的其它特征将通过以下的说明书而变得容易理解。It should be understood that the content described in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will be easily understood from the following description.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings that need to be used in the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those skilled in the art, other drawings can also be obtained based on these drawings without creative effort.

图1是根据本发明实施例一提供的一种虚拟化管理下的数据传输方法的流程图;FIG. 1 is a flowchart of a data transmission method under virtualization management according to Embodiment 1 of the present invention;

图2是根据本发明实施例二提供的一种虚拟化管理下的数据传输方法的流程图;FIG. 2 is a flow chart of a data transmission method under virtualization management according to Embodiment 2 of the present invention;

图3是根据本发明实施例二提供的一种虚拟化管理下的数据传输方法的软件架构示意图;FIG. 3 is a schematic diagram of a software architecture of a data transmission method under virtualization management according to Embodiment 2 of the present invention;

图4是根据本发明实施例三提供的一种虚拟化管理下的数据传输装置的结构示意图;FIG. 4 is a schematic structural diagram of a data transmission device under virtualization management according to Embodiment 3 of the present invention;

图5是实现本发明实施例的电子设备的结构示意图。Fig. 5 is a schematic structural diagram of an electronic device implementing an embodiment of the present invention.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only It is an embodiment of a part of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the description and claims of the present invention and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.

实施例一Embodiment one

图1为本发明实施例一提供了一种虚拟化管理下的数据传输方法的流程图,本实施例可适用于跨域交互数据的情况,该方法应用于同一系统级芯片SOC中,SOC中包括第一平台域及第二平台域,可以由虚拟化管理下的数据传输装置来执行,该虚拟化管理下的数据传输装置可以采用硬件和/或软件的形式实现,该虚拟化管理下的数据传输装置可配置于电子设备中。Figure 1 is a flow chart of a data transmission method under virtualization management provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of cross-domain interaction data. This method is applied to the same system-on-chip SOC, and the SOC Including the first platform domain and the second platform domain, can be executed by the data transmission device under virtualization management, the data transmission device under virtualization management can be implemented in the form of hardware and/or software, the virtualization management The data transmission device can be configured in electronic equipment.

如图1所示,该方法包括:As shown in Figure 1, the method includes:

S110、通过第一平台域接收用户空间的业务数据,结合内核空间中第一虚拟以太网的第一驱动程序,确定业务数据在目标格式下的目标数据包,将目标数据包写入指定内存区域中,并向第二平台域发送通知消息。S110. Receive the business data of the user space through the first platform domain, combine the first driver program of the first virtual Ethernet in the kernel space, determine the target data packet of the business data in the target format, and write the target data packet into the designated memory area , and send a notification message to the second platform domain.

在本实施例中,第一平台域可以理解为独立的CPU单元,如AP域或CP域等。用户空间可以理解为用户程序的运行空间。内核空间可以理解为linux内核的运行空间,如kernalspace。第一虚拟以太网可以理解为在真实的互联网中,通过软件方法在数据链路层实现一个按以太网原理工作的虚拟网络,该第一虚拟以太网运行在第一平台域中。业务数据可以理解为需要进行处理的数据,如车辆的信号数据、AVM业务的控制数据、导航投屏到仪表屏的图像数据等。目标格式可以理解为用于写入的格式,可以优选为raw格式。第一驱动程序可以理解为在第一平台域中设定的用于实现虚拟网卡的业务功能的程序,例如:开启关闭网卡,传递网络帧数据,接收网络帧数据等。In this embodiment, the first platform domain can be understood as an independent CPU unit, such as an AP domain or a CP domain. User space can be understood as the running space of user programs. Kernel space can be understood as the running space of the linux kernel, such as kernalspace. The first virtual Ethernet can be understood as implementing a virtual network that works according to the principle of Ethernet at the data link layer through a software method in the real Internet, and the first virtual Ethernet runs in the first platform domain. Business data can be understood as data that needs to be processed, such as vehicle signal data, AVM business control data, and image data projected from navigation to the instrument screen. The target format can be understood as a format for writing, and may preferably be a raw format. The first driver program can be understood as a program set in the first platform domain to realize the business functions of the virtual network card, such as: opening and closing the network card, transmitting network frame data, receiving network frame data, and so on.

在本实施例中,第二平台域可以理解为独立的CPU单元,如AP域或CP域。目标数据包可以理解为将业务数据进行处理后形成的第二平台域可以接收的数据包。存储信息可以理解为包括存放目标数据包地址的信息。通知消息可以理解为传送给第二平台域的消息,用于通知第二平台域目标数据包的存储信息。In this embodiment, the second platform domain can be understood as an independent CPU unit, such as an AP domain or a CP domain. The target data packet can be understood as a data packet that can be received by the second platform domain formed after the service data is processed. The storing information can be understood as including information storing the address of the target data packet. The notification message can be understood as a message sent to the second platform domain, for notifying the second platform domain of the storage information of the target data packet.

具体的,通过第一平台域可以接收用户空间发送的业务数据,在传送至内核空间后,可以将业务数据转换为虚拟以太网可以接收的形式,进而结合内核空间中第一虚拟以太网的第一驱动程序将转换形式后的业务数据进行封装,按照目标格式对封装后的业务数据进行二次封装,形成目标数据包,可以通过对内存硬件划分出共享内存区域,将目标数据包写入指定内存区域中,第一平台域可以通过硬件通道向第二平台域发送通知消息。其中,内存硬件可以为LPDDR,硬件通道可以为Mailbox,本发明仅以此作为示例,并不对内存硬件及硬件通道进行具体限定。Specifically, the service data sent by the user space can be received through the first platform domain, and after being transmitted to the kernel space, the service data can be converted into a form that can be received by the virtual Ethernet, and then combined with the first virtual Ethernet in the kernel space A driver encapsulates the converted business data, and re-encapsulates the encapsulated business data according to the target format to form a target data packet. By dividing the memory hardware into a shared memory area, the target data packet can be written into the specified In the memory area, the first platform domain may send a notification message to the second platform domain through a hardware channel. Wherein, the memory hardware may be LPDDR, and the hardware channel may be Mailbox, which is only used as an example in the present invention, and the memory hardware and the hardware channel are not specifically limited.

S120、通过第二平台域接收通知消息,并根据通知消息结合第二平台域内核空间中第二虚拟以太网的第二驱动程序,在第二平台域的用户空间内获取业务数据。S120. Receive a notification message through the second platform domain, and obtain service data in the user space of the second platform domain according to the notification message in conjunction with the second driver of the second virtual Ethernet in the kernel space of the second platform domain.

在本实施例中,第二虚拟以太网可以理解为运行于第二平台域的在真实的互联网中,通过软件方法在数据链路层实现一个按以太网原理工作的虚拟网络。第二驱动程序可以理解为在第二平台域中设定的用于实现虚拟网卡的业务功能的程序。In this embodiment, the second virtual Ethernet can be understood as a virtual network that operates on the real Internet in the second platform domain and implements a virtual network that works according to the principle of Ethernet at the data link layer through a software method. The second driver can be understood as a program set in the second platform domain for realizing the service function of the virtual network card.

具体的,可以通过第二平台域的硬件通道接收第一平台域发送的通知消息,第二平台域按照通知消息从内存硬件中读取目标数据包,通过第二平台域内核空间中第二虚拟以太网的第二驱动程序对目标数据包进行解析,再将解析后的目标数据包转换为用户空间可以接收的形式,即转换为业务数据形式,并将业务数据发送至第二平台域的用户空间,以在第二平台域的用户空间内获取业务数据。Specifically, the notification message sent by the first platform domain can be received through the hardware channel of the second platform domain, and the second platform domain reads the target data packet from the memory hardware according to the notification message, and passes the second virtual The second driver of Ethernet parses the target data packet, and then converts the parsed target data packet into a form that can be received by the user space, that is, converts it into a form of business data, and sends the business data to users in the second platform domain space to obtain business data in the user space of the second platform domain.

本发明实施例的技术方案,应用于同一系统级芯片SOC中,SOC中包括第一平台域及第二平台域,方法包括:通过第一平台域接收用户空间的业务数据,结合内核空间中第一虚拟以太网的第一驱动程序,确定业务数据在目标格式下的目标数据包,将目标数据包写入指定内存区域中,并向第二平台域发送通知消息;通过第二平台域接收通知消息,并根据通知消息结合第二平台域内核空间中第二虚拟以太网的第二驱动程序,在第二平台域的用户空间内获取业务数据。通过虚拟以太网,实现了不同平台域之间支持标准网络socket通讯相关API,以及支持多种网络协议栈;实现了不同平台域标准、高效、简便以及通用的通讯方式。The technical solution of the embodiment of the present invention is applied to the same system-on-chip SOC, and the SOC includes the first platform domain and the second platform domain. The method includes: receiving the service data of the user space through the first platform domain, and combining the second The first driver program of a virtual Ethernet determines the target data packet of the service data in the target format, writes the target data packet into the specified memory area, and sends a notification message to the second platform domain; receives the notification through the second platform domain message, and according to the notification message combined with the second driver program of the second virtual Ethernet in the kernel space of the second platform domain, obtain service data in the user space of the second platform domain. Through the virtual Ethernet, it realizes the support of standard network socket communication related APIs between different platform domains, and supports multiple network protocol stacks; realizes the standard, efficient, simple and common communication methods of different platform domains.

实施例二Embodiment two

图2为本发明实施例二提供的一种虚拟化管理下的数据传输方法的流程图,本实施例是在上述实施例的基础上的进一步细化。如图2所示,该方法包括:FIG. 2 is a flow chart of a data transmission method under virtualization management provided by Embodiment 2 of the present invention. This embodiment is further refined on the basis of the foregoing embodiments. As shown in Figure 2, the method includes:

S201、通过第一平台域接收用户空间的业务数据,通过设定的网络协议栈将业务数据转换为第一数据流。S201. Receive user space service data through the first platform domain, and convert the service data into a first data stream through a set network protocol stack.

在本实施例中,第一数据流可以理解为第一平台域中的一组有序,有起点和终点的字节的数据序列。网络协议栈可以理解为用于完成通信而设定的协议栈。In this embodiment, the first data stream can be understood as a set of ordered data sequences in the first platform domain, with a start point and an end point byte data sequence. The network protocol stack can be understood as a protocol stack set for completing communication.

其中,网络协议栈配置有至少一个标准网络协议,如socket API、HTTP、TCP/UDP、SOME/IP等网络协议。Wherein, the network protocol stack is configured with at least one standard network protocol, such as socket API, HTTP, TCP/UDP, SOME/IP and other network protocols.

具体的,通过第一平台域可以在用户空间接收业务数据,将业务数据发送至内核空间,在内核空间通过设定的网络协议栈对业务数据进行转换,形成相应网络协议下的第一数据流。Specifically, through the first platform domain, business data can be received in the user space, and the business data can be sent to the kernel space, and the business data can be converted through the set network protocol stack in the kernel space to form the first data stream under the corresponding network protocol .

S202、将第一数据流封装为指定协议下的第一网络帧数据。S202. Encapsulate the first data stream into first network frame data under a specified protocol.

在本实施例中,指定协议可以理解为第一平台域所配置的协议。第一网络帧数据可以理解为第一平台域中在以太网中进行传输时的数据。In this embodiment, the specified protocol may be understood as a protocol configured by the first platform domain. The first network frame data can be understood as data during transmission in the Ethernet in the first platform domain.

具体的,第一平台域可以按照指定协议对第一数据流进行封装,形成第一数据流对应的网络帧数据。Specifically, the first platform domain may encapsulate the first data stream according to a specified protocol to form network frame data corresponding to the first data stream.

示例性的,指定协议可以为TCP/IP协议栈,通过TCP/IP协议栈对第一数据流进行封装,封装成TCP/IP协议网络帧数据。Exemplarily, the specified protocol may be a TCP/IP protocol stack, and the first data stream is encapsulated by the TCP/IP protocol stack, and encapsulated into TCP/IP protocol network frame data.

S203、通过第一驱动程序驱动第一虚拟网卡对第一网络帧数据进行封装,得到中间数据包。S203. Drive the first virtual network card through the first driver to encapsulate the first network frame data to obtain an intermediate data packet.

在本实施例中,第一虚拟网卡可以理解为第一平台域下的通过软件模拟网络环境,模拟网络适配器功能的虚拟网卡。中间数据包可以理解为封装为内存格式下的数据包。In this embodiment, the first virtual network card can be understood as a virtual network card under the first platform domain that simulates a network environment through software and simulates a function of a network adapter. The intermediate data packet can be understood as a data packet encapsulated in memory format.

具体的,当形成第一网络帧数据后,第一平台域可以通过第一驱动程序驱动第一虚拟网卡,按照设定的格式对第一数据帧数据进行封装,得到中间数据包。Specifically, after the first network frame data is formed, the first platform domain may drive the first virtual network card through the first driver, and encapsulate the first data frame data according to a set format to obtain an intermediate data packet.

示例性的,当形成了TCP/IP协议网络帧数据后,通过第一驱动程序驱动第一虚拟网卡对第一网络帧数据进行封装,封装成RPMSG格式的中间数据包。Exemplarily, after the TCP/IP protocol network frame data is formed, the first driver program drives the first virtual network card to encapsulate the first network frame data into an intermediate data packet in RPMSG format.

S204、按照目标格式对中间数据包进行封装,得到目标数据包。S204. Encapsulate the intermediate data packet according to the target format to obtain the target data packet.

具体的,当形成了中间数据包后,第一平台域可以按照目标格式对中间数据包进行封装,得到目标格式下的目标数据包。Specifically, after the intermediate data packet is formed, the first platform domain may encapsulate the intermediate data packet according to the target format to obtain the target data packet in the target format.

示例性的,第一平台域可以对RPMSG格式的中间数据包进行封装,形成raw格式下的目标数据包。Exemplarily, the first platform domain may encapsulate the intermediate data packet in the RPMSG format to form the target data packet in the raw format.

S205、通过预设总线协议将目标数据包写入至指定内存区域。S205. Write the target data packet into a designated memory area through a preset bus protocol.

在本实施例中,预设总线协议可以理解为预设的硬件机制下的总线协议。存储地址可以理解为目标数据包存放的位置。In this embodiment, the preset bus protocol may be understood as a bus protocol under a preset hardware mechanism. The storage address can be understood as the location where the target data packet is stored.

具体的,第一平台域可以通过预设总线协议将目标数据包传送至指定内存区域。Specifically, the first platform domain can transmit the target data packet to a designated memory area through a preset bus protocol.

S206、当写入完成后,向第二平台域发送通知消息。S206. After the writing is completed, send a notification message to the second platform domain.

具体的,当第一平台域写入目标数据包完成后,第一平台域可以自动生成通知消息,并将通知消息按照设定的传送方式,发送至第二平台域。Specifically, after the first platform domain finishes writing the target data packet, the first platform domain can automatically generate a notification message, and send the notification message to the second platform domain according to a set transmission method.

示例性的,第一平台域与第二平台域可以分别通过Mailbox硬件互联,第一平台域根据存储信息生成Mailbox消息,并将Mailbox消息发送至第二平台域。其中,Mailbox:指不同的两个平台域可以通过Mailbox硬件通道互相传递消息;Mailbox包含2个FIFOs、一些状态以及控制寄存器,是一个双向消息通道。Exemplarily, the first platform domain and the second platform domain may be interconnected through Mailbox hardware respectively, the first platform domain generates a Mailbox message according to the stored information, and sends the Mailbox message to the second platform domain. Among them, Mailbox: means that two different platform domains can transmit messages to each other through the Mailbox hardware channel; Mailbox includes 2 FIFOs, some status and control registers, and is a two-way message channel.

S207、根据通知消息,确定指定内存区域。S207. Determine a designated memory area according to the notification message.

具体的,第二平台域可以通过硬件通道接收第一平台域发送的通知消息,当接收到通知消息后,第二平台域可以根据预先的配置确定指定内存区域。Specifically, the second platform domain may receive a notification message sent by the first platform domain through a hardware channel, and after receiving the notification message, the second platform domain may determine a designated memory area according to a pre-configured configuration.

示例性的,第二平台域通过AXI连接到LPDDR硬件上,通过存储信息确定LPDDR上的指定内存区域。Exemplarily, the second platform domain is connected to the LPDDR hardware through the AXI, and the designated memory area on the LPDDR is determined by storing information.

S208、从指定内存区域中读取目标数据包。S208. Read the target data packet from the specified memory area.

具体的,第二平台域可以通过设定的总线协议从指定内存区域中读取目标数据包。Specifically, the second platform domain can read the target data packet from the specified memory area through the set bus protocol.

S209、根据目标数据包及第二驱动程序,确定目标协议下的第二数据流。S209. Determine the second data flow under the target protocol according to the target data packet and the second driver program.

在本实施例中,第二数据流可以理解为第二平台域中的一组有序,有起点和终点的字节的数据序列。目标协议可以理解为第二平台域所配置的通信协议。In this embodiment, the second data stream can be understood as a set of ordered data sequences in the domain of the second platform, with a start point and an end point. The target protocol can be understood as the communication protocol configured by the second platform domain.

具体的,第二平台域可以通过内核空间中第二虚拟以太网的第二驱动程序对目标数据包进行解析,对解析后的目标数据包进行转换,形成目标协议下的第二数据流,如目标协议可以为TCP/IP协议,则第二数据流则对应为TCP/IP协议下的数据流。Specifically, the second platform domain can analyze the target data packet through the second driver program of the second virtual Ethernet in the kernel space, convert the parsed target data packet, and form the second data flow under the target protocol, as The target protocol may be a TCP/IP protocol, and the second data stream corresponds to a data stream under the TCP/IP protocol.

进一步地,根据目标数据包及第二驱动程序,确定目标协议下的第二数据流的步骤可以为:Further, according to the target data packet and the second driver, the step of determining the second data stream under the target protocol can be:

通过第二驱动程序驱动第二虚拟网卡对目标数据包进行解析,确定第二网络帧数据;对第二网络帧数据进行解析,确定第二数据流。The second virtual network card is driven by the second driver to analyze the target data packet to determine the second network frame data; the second network frame data is analyzed to determine the second data flow.

在本实施例中,第二虚拟网卡可以理解为第二平台域下的通过软件模拟网络环境,模拟网络适配器功能的虚拟网卡。第二网络帧数据可以理解为第二平台域中在以太网中进行传输时的数据。In this embodiment, the second virtual network card can be understood as a virtual network card under the second platform domain that simulates a network environment through software and simulates a function of a network adapter. The second network frame data can be understood as data during transmission in the Ethernet in the second platform domain.

具体的,第二平台域可以通过第二驱动程序驱动第二虚拟网卡对目标数据包进行解析,确定第二网络帧数据,第二平台域再对第二网络帧数据进行解析,确定第二数据流。Specifically, the second platform domain can drive the second virtual network card through the second driver to analyze the target data packet to determine the second network frame data, and then the second platform domain can analyze the second network frame data to determine the second data packet flow.

示例性的,第二平台域首先可以对raw格式下的目标数据表进行解析,形成RPMSG格式下的目标数据表,通过第二驱动程序驱动第二虚拟网卡对RPMSG格式下的目标数据包进行解析,确定第二网络帧数据,第二平台域再对第二网络帧数据进行解析,确定TCP/IP协议下的第二数据流。Exemplarily, the second platform domain can first analyze the target data table in the raw format to form the target data table in the RPMSG format, and drive the second virtual network card through the second driver to analyze the target data packet in the RPMSG format , determine the second network frame data, and then the second platform domain analyzes the second network frame data to determine the second data flow under the TCP/IP protocol.

S210、通过设定的网络协议栈对第二数据流进行解析,在用户空间内获取业务数据。S210. Analyze the second data stream through the set network protocol stack, and obtain service data in the user space.

具体的,通过设定的网络协议栈对第二数据流进行解析,得到业务数据,并发送至用户空间,在用户空间内获取业务数据。Specifically, the second data stream is analyzed through the set network protocol stack to obtain service data, and sent to the user space, and the service data is acquired in the user space.

本发明实施例的技术方案,通过第一平台域的网络协议栈对业务数据进行封装,形成数据流,并将数据流封装为指定协议下的网络帧数据,通过虚拟以太网的驱动程序驱动虚拟网卡对网络帧数据进行封装,得到中间数据包,并按照相应的存储格式进行封装并存储于共享内存中,通过硬件通道向第二平台域发送通知消息,通过第二平台域根据通知消息进行目标数据包,对目标数据包进行解析,并通过虚拟以太网的驱动程序驱动虚拟网卡对目标数据包进行解析,得到网络帧数据,进而通过网络协议栈将网络帧数据转换为业务数据发送至第二平台域的用户空间。实现了不同平台域之间支持标准网络socket通讯相关API,以及支持多种网络协议栈;实现了不同平台域标准、高效、简便以及通用的通讯方式。In the technical solution of the embodiment of the present invention, the service data is encapsulated through the network protocol stack of the first platform domain to form a data stream, and the data stream is encapsulated into network frame data under a specified protocol, and the virtual Ethernet driver is used to drive the virtual The network card encapsulates the network frame data to obtain the intermediate data packet, encapsulates it according to the corresponding storage format and stores it in the shared memory, sends a notification message to the second platform domain through the hardware channel, and executes the target through the second platform domain according to the notification message. Data packet, analyze the target data packet, and drive the virtual network card to analyze the target data packet through the virtual Ethernet driver to obtain the network frame data, and then convert the network frame data into business data through the network protocol stack and send it to the second The user space of the platform domain. Realized support for standard network socket communication related APIs between different platform domains, and supported multiple network protocol stacks; realized standard, efficient, simple and common communication methods for different platform domains.

示例性的,为了便于理解本发明,以车辆数据业务为例,第一平台域以AP域为例,第二平台域以CP域为例,其中,AP域也可以作为第二平台域,CP域也可以作为第一平台域,通过软件架构的形式进行示例性的描述,图3为本发明实施例二提供的一种虚拟化管理下的数据传输方法的软件架构示意图,如图3所示:Exemplarily, in order to facilitate the understanding of the present invention, the vehicle data service is taken as an example, the first platform domain is an AP domain, and the second platform domain is an example of a CP domain, wherein the AP domain can also be used as the second platform domain, and the CP domain The domain can also be used as the first platform domain, and an exemplary description is made in the form of software architecture. FIG. 3 is a schematic diagram of the software architecture of a data transmission method under virtualization management provided by Embodiment 2 of the present invention, as shown in FIG. 3 :

1.车辆服务层:AP域车辆数据服务程序,可以将业务数据通过标准的socket API、HTTP、TCP/UDP、SOME/IP等网络协议栈,传递到AP域TCP/IP协议栈;同时也从AP域TCP/IP协议栈接收业务数据;1. Vehicle service layer: AP domain vehicle data service program, which can transfer business data to AP domain TCP/IP protocol stack through standard socket API, HTTP, TCP/UDP, SOME/IP and other network protocol stacks; The AP domain TCP/IP protocol stack receives business data;

2.TCP/IP协议栈:AP域Linux kernel实现的TCP/IP协议栈;用于接收AP域车辆服务层的数据流,并封装成TCP/IP协议网络帧数据,传递到虚拟以太网的驱动程序;同时也接收虚拟以太网的驱动程序的网络帧数据,解析成TCP/IP协议数据流,传递给车辆服务层;2. TCP/IP protocol stack: the TCP/IP protocol stack implemented by the AP domain Linux kernel; used to receive the data stream of the vehicle service layer in the AP domain, encapsulate it into TCP/IP protocol network frame data, and transmit it to the driver of the virtual Ethernet Program; at the same time, it also receives the network frame data of the virtual Ethernet driver, parses it into a TCP/IP protocol data stream, and passes it to the vehicle service layer;

3.虚拟以太网的驱动程序:负责实现虚拟网卡的API,例如:开启关闭网卡,传递网络帧数据,接收网络帧数据等等,是虚拟网卡的核心程序;接收AP域TCP/IP协议栈的网络帧数据,封装成RPMSG格式的数据包,传递给AP域RPMSG软件层;同时也接收AP域RPMSG格式的数据包,解析成网络帧数据格式,传递给AP域TCP/IP协议栈;3. Virtual Ethernet driver: responsible for realizing the API of the virtual network card, for example: opening and closing the network card, transmitting network frame data, receiving network frame data, etc., is the core program of the virtual network card; receiving the AP domain TCP/IP protocol stack Network frame data, encapsulated into data packets in RPMSG format, and passed to the AP domain RPMSG software layer; at the same time, it also receives data packets in AP domain RPMSG format, parses them into network frame data format, and passes them to the AP domain TCP/IP protocol stack;

4.RPMSG软件层:指AP域Remote Processor Messaging,是异构多核SOC中跨域之间通信的标准接口;接收AP域虚拟以太网的驱动程序的RPMSG格式的数据包,封装成raw格式,写入到AP域共享内存的指定内存区域,并向CP域发送Mailbox消息;同时也接收CP域的Mailbox消息,然后从AP域共享内存的指定内存区域取出raw格式数据,传递给AP域的虚拟以太网的驱动程序。4. RPMSG software layer: Refers to AP domain Remote Processor Messaging, which is a standard interface for cross-domain communication in heterogeneous multi-core SOC; receives the RPMSG format data packet of the driver program of AP domain virtual Ethernet, encapsulates it into raw format, and writes Enter the specified memory area of the shared memory of the AP domain, and send Mailbox messages to the CP domain; at the same time, it also receives the Mailbox message of the CP domain, and then takes out the data in raw format from the specified memory area of the shared memory of the AP domain, and passes it to the virtual Ethernet of the AP domain. net driver.

5.Mailbox&共享内存:指AP域通信的底层软件实现方式,Mailbox主要负责事件的收发,共享内存是大数据量AP域与CP域的共享内存;AP Mailbox将消息通知CP域Mailbox;AP Mailbox同时也接收CP域Mailbox的消息;5. Mailbox & shared memory: refers to the underlying software implementation of AP domain communication. Mailbox is mainly responsible for sending and receiving events. Shared memory is the shared memory between AP domain and CP domain with a large amount of data; AP Mailbox notifies CP domain Mailbox of the message; AP Mailbox simultaneously Also receive messages from the CP domain Mailbox;

6.车辆服务层:指CP域车辆服务层;作用与“1.车辆服务层”一致;6. Vehicle service layer: refers to the CP domain vehicle service layer; its function is consistent with "1. Vehicle service layer";

7.TCP/IP协议栈:指CP域下的TCP/IP协议栈;作用与“2.TCP/IP协议栈”一致;7. TCP/IP protocol stack: refers to the TCP/IP protocol stack under the CP domain; its function is consistent with "2.TCP/IP protocol stack";

8.虚拟以太网的驱动程序:指CP域虚拟以太网的驱动程序;作用与“3.虚拟以太网的驱动程序”一致;8. Driver of virtual Ethernet: refers to the driver of virtual Ethernet in CP domain; its function is consistent with "3. Driver of virtual Ethernet";

9.RPMSG软件层:指CP域RPMSG软件层;作用与“4.RPMSG软件层”一致;9. RPMSG software layer: refers to the CP domain RPMSG software layer; its function is consistent with "4. RPMSG software layer";

10.Mailbox&共享内存:指CP域Mailbox&共享内存;作用与“5.Mailbox&共享内存”一致。10. Mailbox& shared memory: refers to the CP domain Mailbox& shared memory; its function is consistent with "5. Mailbox& shared memory".

实施例三Embodiment Three

图4为本发明实施例三提供的一种虚拟化管理下的数据传输装置的结构示意图。如图4所示,该装置包括:发送模块31及获取模块32。其中,FIG. 4 is a schematic structural diagram of a data transmission device under virtualization management provided by Embodiment 3 of the present invention. As shown in FIG. 4 , the device includes: a sending module 31 and an acquiring module 32 . in,

发送模块31,用于通过所述第一平台域接收用户空间的业务数据,结合内核空间中第一虚拟以太网的第一驱动程序,确定所述业务数据在目标格式下的目标数据包,将所述目标数据包写入指定内存区域中,并向所述第二平台域发送通知消息;The sending module 31 is configured to receive the service data of the user space through the first platform domain, and determine the target data packet of the service data in the target format in combination with the first driver program of the first virtual Ethernet in the kernel space, and send The target data packet is written into a specified memory area, and a notification message is sent to the second platform domain;

获取模块32,用于通过所述第二平台域接收所述通知消息,并根据所述通知消息结合所述第二平台域内核空间中第二虚拟以太网的第二驱动程序,在所述第二平台域的用户空间内获取所述业务数据。The acquisition module 32 is configured to receive the notification message through the second platform domain, and combine the second driver program of the second virtual Ethernet in the kernel space of the second platform domain according to the notification message, The service data is acquired in the user space of the second platform domain.

本发明实施例的技术方案,应用于同一系统级芯片SOC中,SOC中包括第一平台域及第二平台域,方法包括:通过第一平台域接收用户空间的业务数据,结合内核空间中第一虚拟以太网的第一驱动程序,确定业务数据在目标格式下的目标数据包,将目标数据包写入指定内存区域中,并向第二平台域发送通知消息;通过第二平台域接收通知消息,并根据通知消息结合第二平台域内核空间中第二虚拟以太网的第二驱动程序,在第二平台域的用户空间内获取业务数据。通过虚拟以太网,实现了不同平台域之间支持标准网络socket通讯相关API,以及支持多种网络协议栈;实现了不同平台域标准、高效、简便以及通用的通讯方式。The technical solution of the embodiment of the present invention is applied to the same system-on-chip SOC, and the SOC includes the first platform domain and the second platform domain. The method includes: receiving the service data of the user space through the first platform domain, and combining the second The first driver program of a virtual Ethernet determines the target data packet of the service data in the target format, writes the target data packet into the specified memory area, and sends a notification message to the second platform domain; receives the notification through the second platform domain message, and according to the notification message combined with the second driver program of the second virtual Ethernet in the kernel space of the second platform domain, obtain service data in the user space of the second platform domain. Through the virtual Ethernet, it realizes the support of standard network socket communication related APIs between different platform domains, and supports multiple network protocol stacks; realizes the standard, efficient, simple and common communication methods of different platform domains.

可选的,发送模块31用于:Optionally, the sending module 31 is used for:

通过设定的网络协议栈将所述业务数据转换为第一数据流;converting the service data into a first data stream through a set network protocol stack;

将所述第一数据流封装为指定协议下的第一网络帧数据;Encapsulating the first data stream into first network frame data under a specified protocol;

通过所述第一驱动程序驱动第一虚拟网卡对所述第一网络帧数据进行封装,得到中间数据包;Encapsulating the first network frame data by driving the first virtual network card through the first driver program to obtain an intermediate data packet;

按照所述目标格式对所述中间数据包进行封装,得到所述目标数据包。Encapsulating the intermediate data packet according to the target format to obtain the target data packet.

其中,网络协议栈配置有至少一个标准网络协议。Wherein, the network protocol stack is configured with at least one standard network protocol.

可选的,发送模块31,包括:Optionally, the sending module 31 includes:

第一确定单元,用于将所述目标数据包写入共享内存中的指定内存区域;A first determination unit, configured to write the target data packet into a specified memory area in the shared memory;

消息通知单元,用于当写入完成后,向所述第二平台域发送所述通知消息。。A message notification unit, configured to send the notification message to the second platform domain after writing is completed. .

其中,第一确定单元具体用于:Wherein, the first determination unit is specifically used for:

通过预设总线协议将所述目标数据包传送至所述指定内存区域;transmitting the target data packet to the designated memory area through a preset bus protocol;

获取所述指定内存区域的存储地址,并根据所述存储地址确定存储信息。Obtain the storage address of the specified memory area, and determine storage information according to the storage address.

可选的,获取模块32,包括:Optionally, obtain module 32, including:

第二确定单元,用于根据所述通知消息,确定所述指定内存区域;a second determining unit, configured to determine the specified memory area according to the notification message;

读取单元,用于从所述指定内存区域中读取所述目标数据包;a reading unit, configured to read the target data packet from the specified memory area;

第三确定单元,用于根据所述目标数据包及所述第二驱动程序,确定目标协议下的第二数据流;a third determining unit, configured to determine a second data flow under the target protocol according to the target data packet and the second driver;

获取单元,用于通过设定的网络协议栈对所述第二数据流进行解析,在所述用户空间内获取所述业务数据。The obtaining unit is configured to analyze the second data stream through a set network protocol stack, and obtain the service data in the user space.

进一步的,第三确定单元,具体用于:Further, the third determination unit is specifically used for:

通过所述第二驱动程序驱动第二虚拟网卡对所述目标数据包进行解析,确定第二网络帧数据;Drive the second virtual network card through the second driver to analyze the target data packet, and determine the second network frame data;

对所述第二网络帧数据进行解析,确定所述第二数据流。Analyzing the second network frame data to determine the second data stream.

本发明实施例所提供的虚拟化管理下的数据传输装置可执行本发明任意实施例所提供的虚拟化管理下的数据传输方法,具备执行方法相应的功能模块和有益效果。The data transmission device under virtualization management provided by the embodiment of the present invention can execute the data transmission method under virtualization management provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

实施例四Embodiment Four

图5示出了可以用来实施本发明的实施例的电子设备40的结构示意图。电子设备旨在表示各种形式的数字计算机,诸如,膝上型计算机、台式计算机、工作台、个人数字助理、服务器、刀片式服务器、大型计算机、和其它适合的计算机。电子设备还可以表示各种形式的移动装置,诸如,个人数字处理、蜂窝电话、智能电话、可穿戴设备(如头盔、眼镜、手表等)和其它类似的计算装置。本文所示的部件、它们的连接和关系、以及它们的功能仅仅作为示例,并且不意在限制本文中描述的和/或者要求的本发明的实现。FIG. 5 shows a schematic structural diagram of an electronic device 40 that can be used to implement an embodiment of the present invention. Electronic device is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (eg, helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are by way of example only, and are not intended to limit implementations of the inventions described and/or claimed herein.

如图5所示,电子设备40包括至少一个处理器41,以及与至少一个处理器41通信连接的存储器,如只读存储器(ROM)42、随机访问存储器(RAM)43等,其中,存储器存储有可被至少一个处理器执行的计算机程序,处理器41可以根据存储在只读存储器(ROM)42中的计算机程序或者从存储单元48加载到随机访问存储器(RAM)43中的计算机程序,来执行各种适当的动作和处理。在RAM 43中,还可存储电子设备40操作所需的各种程序和数据。处理器41、ROM 42以及RAM 43通过总线44彼此相连。输入/输出(I/O)接口45也连接至总线44。As shown in FIG. 5 , the electronic device 40 includes at least one processor 41, and a memory connected in communication with the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores There is a computer program executable by at least one processor, and the processor 41 can operate according to a computer program stored in a read-only memory (ROM) 42 or loaded from a storage unit 48 into a random access memory (RAM) 43. Various appropriate actions and processes are performed. In the RAM 43, various programs and data necessary for the operation of the electronic device 40 are also stored. The processor 41 , ROM 42 and RAM 43 are connected to each other through a bus 44 . An input/output (I/O) interface 45 is also connected to the bus 44 .

电子设备40中的多个部件连接至I/O接口45,包括:输入单元46,例如键盘、鼠标等;输出单元47,例如各种类型的显示器、扬声器等;存储单元48,例如磁盘、光盘等;以及通信单元49,例如网卡、调制解调器、无线通信收发机等。通信单元49允许电子设备40通过诸如因特网的计算机网络和/或各种电信网络与其他设备交换信息/数据。Multiple components in the electronic device 40 are connected to the I/O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a magnetic disk, an optical disk etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 49 allows the electronic device 40 to exchange information/data with other devices through a computer network such as the Internet and/or various telecommunication networks.

处理器41可以是各种具有处理和计算能力的通用和/或专用处理组件。处理器41的一些示例包括但不限于中央处理单元(CPU)、图形处理单元(GPU)、各种专用的人工智能(AI)计算芯片、各种运行机器学习模型算法的处理器、数字信号处理器(DSP)、以及任何适当的处理器、控制器、微控制器等。处理器41执行上文所描述的各个方法和处理,例如虚拟化管理下的数据传输方法。Processor 41 may be various general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 41 include, but are not limited to, central processing units (CPUs), graphics processing units (GPUs), various dedicated artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processing processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 41 executes various methods and processes described above, such as a data transmission method under virtualization management.

在一些实施例中,虚拟化管理下的数据传输方法可被实现为计算机程序,其被有形地包含于计算机可读存储介质,例如存储单元48。在一些实施例中,计算机程序的部分或者全部可以经由ROM 42和/或通信单元49而被载入和/或安装到电子设备40上。当计算机程序加载到RAM 43并由处理器41执行时,可以执行上文描述的虚拟化管理下的数据传输方法的一个或多个步骤。备选地,在其他实施例中,处理器41可以通过其他任何适当的方式(例如,借助于固件)而被配置为执行虚拟化管理下的数据传输方法。In some embodiments, the data transmission method under virtualization management can be implemented as a computer program, which is tangibly embodied in a computer-readable storage medium, such as the storage unit 48 . In some embodiments, part or all of the computer program may be loaded and/or installed on the electronic device 40 via the ROM 42 and/or the communication unit 49 . When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the data transmission method under virtualization management described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured in any other appropriate manner (for example, by means of firmware) to execute the data transmission method under virtualization management.

本文中以上描述的系统和技术的各种实施方式可以在数字电子电路系统、集成电路系统、场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、芯片上系统的系统(SOC)、负载可编程逻辑设备(CPLD)、计算机硬件、固件、软件、和/或它们的组合中实现。这些各种实施方式可以包括:实施在一个或者多个计算机程序中,该一个或者多个计算机程序可在包括至少一个可编程处理器的可编程系统上执行和/或解释,该可编程处理器可以是专用或者通用可编程处理器,可以从存储系统、至少一个输入装置、和至少一个输出装置接收数据和指令,并且将数据和指令传输至该存储系统、该至少一个输入装置、和该至少一个输出装置。Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips Implemented in a system of systems (SOC), load programmable logic device (CPLD), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include being implemented in one or more computer programs executable and/or interpreted on a programmable system including at least one programmable processor, the programmable processor Can be special-purpose or general-purpose programmable processor, can receive data and instruction from storage system, at least one input device, and at least one output device, and transmit data and instruction to this storage system, this at least one input device, and this at least one output device an output device.

用于实施本发明的方法的计算机程序可以采用一个或多个编程语言的任何组合来编写。这些计算机程序可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理器,使得计算机程序当由处理器执行时使流程图和/或框图中所规定的功能/操作被实施。计算机程序可以完全在机器上执行、部分地在机器上执行,作为独立软件包部分地在机器上执行且部分地在远程机器上执行或完全在远程机器或服务器上执行。Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, so that the computer program causes the functions/operations specified in the flowcharts and/or block diagrams to be implemented when executed by the processor. A computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

在本发明的上下文中,计算机可读存储介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的计算机程序。计算机可读存储介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。备选地,计算机可读存储介质可以是机器可读信号介质。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of the present invention, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus or device. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. More specific examples of machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.

为了提供与用户的交互,可以在电子设备上实施此处描述的系统和技术,该电子设备具有:用于向用户显示信息的显示装置(例如,CRT(阴极射线管)或者LCD(液晶显示器)监视器);以及键盘和指向装置(例如,鼠标或者轨迹球),用户可以通过该键盘和该指向装置来将输入提供给电子设备。其它种类的装置还可以用于提供与用户的交互;例如,提供给用户的反馈可以是任何形式的传感反馈(例如,视觉反馈、听觉反馈、或者触觉反馈);并且可以用任何形式(包括声输入、语音输入或者、触觉输入)来接收来自用户的输入。In order to provide interaction with the user, the systems and techniques described herein can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display)) for displaying information to the user. monitor); and a keyboard and pointing device (eg, a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and can be in any form (including Acoustic input, speech input or, tactile input) to receive input from the user.

可以将此处描述的系统和技术实施在包括后台部件的计算系统(例如,作为数据服务器)、或者包括第一件部件的计算系统(例如,应用服务器)、或者包括前端部件的计算系统(例如,具有图形用户界面或者网络浏览器的用户计算机,用户可以通过该图形用户界面或者该网络浏览器来与此处描述的系统和技术的实施方式交互)、或者包括这种后台部件、第一件部件、或者前端部件的任何组合的计算系统中。可以通过任何形式或者介质的数字数据通信(例如,通信网络)来将系统的部件相互连接。通信网络的示例包括:局域网(LAN)、广域网(WAN)、区块链网络和互联网。The systems and techniques described herein can be implemented on a computing system that includes a backend component (e.g., as a data server), or a computing system that includes a first component (e.g., an application server), or a computing system that includes a front-end component (e.g., , a user computer having a graphical user interface or a web browser through which a user may interact with embodiments of the systems and techniques described herein), or including such background components, the first components, or any combination of front-end components in a computing system. The components of the system can be interconnected by any form or medium of digital data communication, eg, a communication network. Examples of communication networks include: local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

计算系统可以包括客户端和服务器。客户端和服务器一般远离彼此并且通常通过通信网络进行交互。通过在相应的计算机上运行并且彼此具有客户端-服务器关系的计算机程序来产生客户端和服务器的关系。服务器可以是云服务器,又称为云计算服务器或云主机,是云计算服务体系中的一项主机产品,以解决了传统物理主机与VPS服务中,存在的管理难度大,业务扩展性弱的缺陷。A computing system can include clients and servers. Clients and servers are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also known as a cloud computing server or a cloud host. It is a host product in the cloud computing service system to solve the problems of difficult management and weak business expansion in traditional physical hosts and VPS services. defect.

应该理解,可以使用上面所示的各种形式的流程,重新排序、增加或删除步骤。例如,本发明中记载的各步骤可以并行地执行也可以顺序地执行也可以不同的次序执行,只要能够实现本发明的技术方案所期望的结果,本文在此不进行限制。It should be understood that steps may be reordered, added or deleted using the various forms of flow shown above. For example, each step described in the present invention may be executed in parallel, sequentially, or in a different order, as long as the desired result of the technical solution of the present invention can be achieved, there is no limitation herein.

上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,根据设计要求和其他因素,可以进行各种修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above specific implementation methods do not constitute a limitation to the protection scope of the present invention. It should be apparent to those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (10)

1. The data transmission method under the virtualization management is characterized by being applied to the same system-on-chip (SOC), wherein the SOC comprises a first platform domain and a second platform domain, and the method comprises the following steps:
receiving service data of a user space through the first platform domain, determining a target data packet of the service data under a target format by combining a first driver of a first virtual Ethernet in a kernel space, writing the target data packet into a designated memory area, and sending a notification message to the second platform domain;
and receiving the notification message through the second platform domain, and acquiring the service data in the user space of the second platform domain according to the notification message and combining a second driver of a second virtual Ethernet in the kernel space of the second platform domain.
2. The method of claim 1, wherein the determining, in conjunction with the first driver of the first virtual ethernet in the kernel space, the target packet of the traffic data in the target format comprises:
converting the service data into a first data stream through a set network protocol stack;
encapsulating the first data stream into first network frame data under a specified protocol;
driving a first virtual network card to encapsulate the first network frame data through the first driver to obtain a middle data packet;
and packaging the intermediate data packet according to the target format to obtain the target data packet.
3. The method of claim 1, wherein writing the target data packet into a designated memory area and sending a notification message to the second platform domain comprises:
writing the target data packet into the appointed memory region through a preset bus protocol;
and after the writing is completed, sending the notification message to the second platform domain.
4. The method of claim 1, wherein the acquiring the traffic data in the user space of the second platform domain according to the notification message in combination with a second driver of a second virtual ethernet in the kernel space of the second platform domain comprises:
determining the appointed memory region according to the notification message;
reading the target data packet from the appointed memory region;
determining a second data flow under a target protocol according to the target data packet and the second driver;
and analyzing the second data stream through a set network protocol stack, and acquiring the service data in the user space.
5. The method of claim 4, wherein determining a second data flow under a target protocol based on the target data packet and the second driver comprises:
the second virtual network card is driven by the second driving program to analyze the target data packet, and second network frame data is determined;
and analyzing the second network frame data to determine the second data stream.
6. The method of claim 2, wherein the network protocol stack is configured with at least one standard network protocol.
7. The data transmission device under the virtualization management is characterized by being applied to the same system-on-chip (SOC), wherein the SOC comprises a first platform domain and a second platform domain, and the device comprises:
the sending module is used for receiving service data of a user space through the first platform domain, combining a first driver of a first virtual Ethernet in a kernel space, determining a target data packet of the service data in a target format, writing the target data packet into a designated memory area, and sending a notification message to the second platform domain;
and the acquisition module is used for receiving the notification message through the second platform domain, and acquiring the service data in the user space of the second platform domain according to the notification message and combining a second driver of a second virtual Ethernet in the kernel space of the second platform domain.
8. The data transmission device under the virtualization management is characterized in that the sending module is specifically configured to:
converting the service data into a first data stream through a set network protocol stack;
encapsulating the first data stream into first network frame data under a specified protocol;
driving a first virtual network card to encapsulate the first network frame data through the first driver to obtain a middle data packet;
and packaging the intermediate data packet according to the target format to obtain the target data packet.
9. An electronic device, the electronic device comprising:
at least one system on chip, SOC, comprising a first platform domain and a second platform domain; and
a memory communicatively coupled to the at least one SOC;
wherein,,
the memory stores a computer program executable by the at least one SOC to enable the at least one SOC to perform the data transfer method under virtualization management of any of claims 1-6.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the method of data transmission under virtualization management of any one of claims 1-6 when executed.
CN202310134855.2A 2023-02-20 2023-02-20 Data transmission method, device, equipment and medium under virtualization management Pending CN116248772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310134855.2A CN116248772A (en) 2023-02-20 2023-02-20 Data transmission method, device, equipment and medium under virtualization management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310134855.2A CN116248772A (en) 2023-02-20 2023-02-20 Data transmission method, device, equipment and medium under virtualization management

Publications (1)

Publication Number Publication Date
CN116248772A true CN116248772A (en) 2023-06-09

Family

ID=86630825

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310134855.2A Pending CN116248772A (en) 2023-02-20 2023-02-20 Data transmission method, device, equipment and medium under virtualization management

Country Status (1)

Country Link
CN (1) CN116248772A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932454A (en) * 2023-09-15 2023-10-24 湖北芯擎科技有限公司 Data transmission method, device, electronic equipment and computer readable storage medium
CN118732736A (en) * 2024-09-02 2024-10-01 亿咖通(湖北)技术有限公司 A chip and its temperature control method, electronic device and computer storage medium
CN118939456A (en) * 2024-10-14 2024-11-12 亿咖通(湖北)技术有限公司 Cross-domain touch data transmission method, device, electronic device and storage medium
CN119155174A (en) * 2024-09-11 2024-12-17 西安易朴通讯技术有限公司 Communication method and device applied to BMC chip, computer equipment, storage medium and program product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1805441A (en) * 2005-11-23 2006-07-19 西安电子科技大学 Integrated WLAN authentication architecture and method of implementing structural layers
CN114268666A (en) * 2021-12-08 2022-04-01 东软睿驰汽车技术(沈阳)有限公司 Universal domain controller, vehicle and interactive system supporting service oriented architecture SOA
CN115103036A (en) * 2022-05-20 2022-09-23 中国科学院计算技术研究所 Efficient TCP/IP datagram processing method and system
CN115344226A (en) * 2022-10-20 2022-11-15 亿咖通(北京)科技有限公司 Screen projection method, device, equipment and medium under virtualization management
CN115686748A (en) * 2022-10-26 2023-02-03 亿咖通(湖北)技术有限公司 Service request response method, device, equipment and medium under virtualization management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1805441A (en) * 2005-11-23 2006-07-19 西安电子科技大学 Integrated WLAN authentication architecture and method of implementing structural layers
CN114268666A (en) * 2021-12-08 2022-04-01 东软睿驰汽车技术(沈阳)有限公司 Universal domain controller, vehicle and interactive system supporting service oriented architecture SOA
CN115103036A (en) * 2022-05-20 2022-09-23 中国科学院计算技术研究所 Efficient TCP/IP datagram processing method and system
CN115344226A (en) * 2022-10-20 2022-11-15 亿咖通(北京)科技有限公司 Screen projection method, device, equipment and medium under virtualization management
CN115686748A (en) * 2022-10-26 2023-02-03 亿咖通(湖北)技术有限公司 Service request response method, device, equipment and medium under virtualization management

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932454A (en) * 2023-09-15 2023-10-24 湖北芯擎科技有限公司 Data transmission method, device, electronic equipment and computer readable storage medium
CN116932454B (en) * 2023-09-15 2024-05-17 湖北芯擎科技有限公司 Data transmission method, device, electronic equipment and computer readable storage medium
CN118732736A (en) * 2024-09-02 2024-10-01 亿咖通(湖北)技术有限公司 A chip and its temperature control method, electronic device and computer storage medium
CN118732736B (en) * 2024-09-02 2025-02-07 亿咖通(湖北)技术有限公司 A chip and its temperature control method, electronic device and computer storage medium
CN119155174A (en) * 2024-09-11 2024-12-17 西安易朴通讯技术有限公司 Communication method and device applied to BMC chip, computer equipment, storage medium and program product
CN118939456A (en) * 2024-10-14 2024-11-12 亿咖通(湖北)技术有限公司 Cross-domain touch data transmission method, device, electronic device and storage medium

Similar Documents

Publication Publication Date Title
CN116248772A (en) Data transmission method, device, equipment and medium under virtualization management
WO2022134428A1 (en) Applet page rendering method and apparatus, electronic device, and storage medium
CN104021069B (en) The management method and system of the software performance test based on distributed virtual machine system
US10320886B2 (en) Image display method and apparatus
CN116668564A (en) Multi-mode network message processing method, device, equipment and readable storage medium
CN113778593A (en) Cloud desktop control method and device, electronic equipment, storage medium and program product
WO2019178754A1 (en) Method and apparatus for capturing screenshots of guest operating system in computer device
WO2023066183A1 (en) Data processing method and apparatus, device, and storage medium
US10552240B2 (en) Automatically generating efficient remote procedure call (RPC) code for heterogeneous systems
JP2023510450A (en) Applet page rendering method, apparatus, electronic device and storage medium
WO2024230176A1 (en) Video stream synchronization method and apparatus, platform, and storage medium
WO2016095377A1 (en) Image display method and device for thin client and electronic equipment
WO2024244224A1 (en) Video synchronous display method and apparatus, device and medium
CN116737403A (en) Data processing method, device, electronic equipment and storage medium
CN115883676A (en) A data packet transmission method, device, electronic equipment and storage medium
CN114684167A (en) Method, device and automatic driving vehicle for controlling vehicle based on multi-controller domain network
CN115190097A (en) A message push method, device, device and storage medium
CN115826898A (en) Cross-screen display method, system, device, equipment and storage medium
US10901820B1 (en) Error state message management
CN114840159A (en) A method, device, device and medium for rendering on-screen
CN114595080A (en) Data processing method, apparatus, electronic device, and computer-readable storage medium
CN113835816A (en) Virtual machine desktop display method, device, equipment and readable storage medium
US8984167B1 (en) Real-time frame streaming from remote graphics processing unit
CN118170499B (en) Virtual cloud disk segmentation method and device, electronic equipment and storage medium
WO2019127475A1 (en) Method and apparatus for implementing virtual sim card, storage medium, and electronic device

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