[go: up one dir, main page]

CN117215803A - Process communication method and device, electronic equipment and readable storage medium - Google Patents

Process communication method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN117215803A
CN117215803A CN202210625529.7A CN202210625529A CN117215803A CN 117215803 A CN117215803 A CN 117215803A CN 202210625529 A CN202210625529 A CN 202210625529A CN 117215803 A CN117215803 A CN 117215803A
Authority
CN
China
Prior art keywords
data
memory space
storage unit
memory
reads
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.)
Granted
Application number
CN202210625529.7A
Other languages
Chinese (zh)
Other versions
CN117215803B (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.)
China Mobile Communications Group Co Ltd
China Mobile IoT Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile IoT 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 China Mobile Communications Group Co Ltd, China Mobile IoT Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210625529.7A priority Critical patent/CN117215803B/en
Publication of CN117215803A publication Critical patent/CN117215803A/en
Application granted granted Critical
Publication of CN117215803B publication Critical patent/CN117215803B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Multi Processors (AREA)

Abstract

The application provides a process communication method, a device, an electronic device and a readable storage medium, wherein the method comprises the following steps: the method comprises the steps that a first process writes first data into a first memory space, and a second process reads the first data in the first memory space; and/or the second process writes second data into a second memory space, and the first process reads the second data in the second memory space; the first process is in a kernel mode, the second process is in a user mode, and the first memory space and the second memory space are memory spaces shared by the first process and the second process. The application can improve the communication efficiency.

Description

一种进程通信方法、装置、电子设备及可读存储介质A process communication method, device, electronic equipment and readable storage medium

技术领域Technical field

本申请涉及通信技术领域,尤其涉及一种进程通信方法、装置、电子设备及可读存储介质。The present application relates to the field of communication technology, and in particular, to a process communication method, device, electronic equipment and readable storage medium.

背景技术Background technique

操作系统中,由于中央处理器(Central Processing Unit,CPU)权限的限制,对于内核态与用户态之间的数据交互通信,主要通过设备驱动程序中设备控制接口函数(input/output control,ioctl)的方式实现内核态与用户态之间的数据通信。但ioctl主要是针对用户态往内核态方向传输信息,是单向的,只能在用户态主动发起。用户态需要获取内核态主动发起的消息传输时,只能通过轮询的方式查询,导致通信效率较低。In the operating system, due to the limitations of the central processing unit (Central Processing Unit, CPU) permissions, data interaction and communication between the kernel state and the user state are mainly through the device control interface function (input/output control, ioctl) in the device driver. way to achieve data communication between kernel mode and user mode. However, ioctl is mainly used to transmit information from user mode to kernel mode. It is one-way and can only be initiated actively in user mode. When the user state needs to obtain the message transmission actively initiated by the kernel state, it can only query through polling, resulting in low communication efficiency.

发明内容Contents of the invention

本申请提供一种进程通信方法、装置、电子设备及可读存储介质,以解决的问题。This application provides a process communication method, device, electronic equipment and readable storage medium to solve the problem.

第一方面,本申请实施例提供了一种进程通信方法,其特征在于,包括:In a first aspect, embodiments of the present application provide a process communication method, which is characterized by including:

第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据;和/或,The first process writes the first data into the first memory space, and the second process reads the first data in the first memory space; and/or,

第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据;The second process writes the second data into the second memory space, and the first process reads the second data in the second memory space;

其中,所述第一进程处于内核态,所述第二进程处于用户态,所述第一内存空间和所述第二内存空间为所述第一进程和所述第二进程共享的内存空间。Wherein, the first process is in the kernel state, the second process is in the user state, and the first memory space and the second memory space are memory spaces shared by the first process and the second process.

第二方面,本申请实施例还提供一种进程通信装置,其特征在于,包括:In a second aspect, the embodiment of the present application also provides a process communication device, which is characterized in that it includes:

第一通信模块,用于第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据;和/或,The first communication module is used for the first process to write the first data into the first memory space, and the second process to read the first data in the first memory space; and/or,

第二通信模块,用于第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据;The second communication module is used for the second process to write the second data into the second memory space, and the first process to read the second data in the second memory space;

其中,所述第一进程处于内核态,所述第二进程处于用户态,所述第一内存空间和所述第二内存空间为所述第一进程和所述第二进程共享的内存空间。Wherein, the first process is in the kernel state, the second process is in the user state, and the first memory space and the second memory space are memory spaces shared by the first process and the second process.

第三方面,本申请实施例还提供一种电子设备,包括:收发机、存储器、处理器及存储在所述存储器上并可在所述处理器上运行的程序;所述处理器,用于读取存储器中的程序实现如本申请实施例第一方面所述方法中的步骤。In a third aspect, embodiments of the present application further provide an electronic device, including: a transceiver, a memory, a processor, and a program stored on the memory and executable on the processor; the processor is configured to Reading the program in the memory implements the steps in the method described in the first aspect of the embodiment of this application.

第四方面,本申请实施例还提供一种可读存储介质,所述可读存储介质上存储程序,所述程序被处理器执行时实现如本申请实施例第一方面所述方法中的步骤。In a fourth aspect, embodiments of the present application further provide a readable storage medium. A program is stored on the readable storage medium. When the program is executed by a processor, the steps in the method described in the first aspect of the embodiment of the present application are implemented. .

本申请实施例中,第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据;和/或,第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据。即可分别通过第一内存空间实现内核态向用户态发送数据,以及通过第二内存空间实现用户态向内核态发送数据,从而提高通信效率。In this embodiment of the present application, the first process writes the first data into the first memory space, and the second process reads the first data in the first memory space; and/or the second process writes the second data into the first memory space. Write to the second memory space, and the first process reads the second data in the second memory space. That is, the kernel state can send data to the user state through the first memory space, and the user state can send data to the kernel state through the second memory space, thereby improving communication efficiency.

附图说明Description of drawings

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

图1是本申请实施例提供的一种进程通信的流程示意图;Figure 1 is a schematic flow chart of process communication provided by an embodiment of the present application;

图2是本申请实施例提供的一种内核态初始化的示意图;Figure 2 is a schematic diagram of kernel state initialization provided by an embodiment of the present application;

图3是本申请实施例提供的一种共享内存空间的示意图;Figure 3 is a schematic diagram of a shared memory space provided by an embodiment of the present application;

图4是本申请实施例提供的一种用户态初始化的示意图;Figure 4 is a schematic diagram of user mode initialization provided by an embodiment of the present application;

图5是本申请实施例提供的一种内核态向用户态发送数据的示意图;Figure 5 is a schematic diagram of a kernel state sending data to a user state provided by an embodiment of the present application;

图6是本申请实施例提供的一种用户态接收内核态发送的数据的示意图;Figure 6 is a schematic diagram of a user mode receiving data sent by a kernel mode according to an embodiment of the present application;

图7是本申请实施例提供的一种用户态向内核态发送数据的示意图;Figure 7 is a schematic diagram of a user state sending data to the kernel state provided by an embodiment of the present application;

图8是本申请实施例提供的一种内核态接收用户态发送的数据的示意图;Figure 8 is a schematic diagram of a kernel state receiving data sent by a user state provided by an embodiment of the present application;

图9是本申请实施例提供的一种进程通信装置的结构示意图;Figure 9 is a schematic structural diagram of a process communication device provided by an embodiment of the present application;

图10是本申请实施例提供的一种电子设备的结构示意图。Figure 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of this application.

本申请实施例中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。此外,本申请中使用“和/或”表示所连接对象的至少其中之一,例如A和/或B和/或C,表示包含单独A,单独B,单独C,以及A和B都存在,B和C都存在,A和C都存在,以及A、B和C都存在的7种情况。The terms "first", "second", etc. in the embodiments of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus that encompasses a series of steps or units and need not be limited to those explicitly listed. Those steps or elements may instead include other steps or elements not expressly listed or inherent to the process, method, product or apparatus. In addition, the use of "and/or" in this application indicates at least one of the connected objects, such as A and/or B and/or C, indicating that A alone, B alone, C alone, and both A and B exist, There are 7 situations in which both B and C exist, both A and C exist, and A, B, and C all exist.

请参阅图1,图1是本申请实施例提供的一种进程通信方法的流程示意图,如图1所示,包括以下步骤:Please refer to Figure 1. Figure 1 is a schematic flow chart of a process communication method provided by an embodiment of the present application. As shown in Figure 1, it includes the following steps:

步骤101、第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据;和/或,Step 101. The first process writes the first data into the first memory space, and the second process reads the first data in the first memory space; and/or,

第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据;The second process writes the second data into the second memory space, and the first process reads the second data in the second memory space;

其中,所述第一进程处于内核态,所述第二进程处于用户态,所述第一内存空间和所述第二内存空间为所述第一进程和所述第二进程共享的内存空间。Wherein, the first process is in the kernel state, the second process is in the user state, and the first memory space and the second memory space are memory spaces shared by the first process and the second process.

可以理解,上述第一内存空间和上述第二内存空间是两块独立的内存空间,上述第一内存空间用于内核态写入数据和用户态读取数据,上述第二内存空间用于用户态写入数据和内核态读取数据。It can be understood that the above-mentioned first memory space and the above-mentioned second memory space are two independent memory spaces. The above-mentioned first memory space is used for writing data in the kernel mode and reading data in the user mode, and the above-mentioned second memory space is used for user mode. Write data and read data in kernel mode.

其中,上述第一数据由第一进程写入上述第一内存空间,并由上述第二进程读取的过程即为内核态向用户态传输数据的过程;上述第二数据由第二进程写入上述第二内存空间,并由上述第一进程读取的过程即为用户态向内核态传输数据的过程。上述两个过程可并行执行,即第一进程将第一数据写入第一内存空间的同时,第二进程可将第二数据写入第二内存空间,或第一进程也可从上述第二内存空间中读取数据;第二进程从第一内存空间中读取第一数据的同时,第二进程可将第二数据写入第二内存空间,或第一进程也可从上述第二内存空间中读取数据。也即内核态与用户态之间进行通信时,可分别通过上述第一内存空间和上述第二内存空间并行执行发送或接收数据。Wherein, the process in which the above-mentioned first data is written into the above-mentioned first memory space by the first process and read by the above-mentioned second process is the process of transmitting data from kernel mode to user mode; the above-mentioned second data is written by the second process The process of reading the above-mentioned second memory space by the above-mentioned first process is the process of transmitting data from the user state to the kernel state. The above two processes can be executed in parallel, that is, while the first process writes the first data into the first memory space, the second process can write the second data into the second memory space, or the first process can also write the second data from the above-mentioned second memory space. Read data from the memory space; while the second process reads the first data from the first memory space, the second process can write the second data into the second memory space, or the first process can also read the second data from the second memory space. Read data from space. That is, when communicating between the kernel state and the user state, data can be sent or received in parallel through the first memory space and the second memory space respectively.

这样,通过将第一内存空间的数据写入权限分配给处于内核态的第一进程,将第二内存空间的数据写入权限分配给处于用户态的第二进程,第一进程和第二进程不会向同一内存空间写入数据,也即可以确保内核态与用户态之间通信数据的可靠性。In this way, by assigning the data writing permission of the first memory space to the first process in the kernel state, and assigning the data writing permission of the second memory space to the second process in the user state, the first process and the second process Data will not be written to the same memory space, which ensures the reliability of communication data between kernel mode and user mode.

本申请实施例中,第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据;和/或,第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据。即可分别通过第一内存空间实现内核态向用户态发送数据,以及通过第二内存空间实现用户态向内核态发送数据,从而提高通信效率。In this embodiment of the present application, the first process writes the first data into the first memory space, and the second process reads the first data in the first memory space; and/or the second process writes the second data into the first memory space. Write to the second memory space, and the first process reads the second data in the second memory space. That is, the kernel state can send data to the user state through the first memory space, and the user state can send data to the kernel state through the second memory space, thereby improving communication efficiency.

并且,内核态向用户态传输数据基于所述第一内存空间实现,用户态向内核态传输数据基于所述第二内存空间实现,也即内核态向用户态发送数据的过程,与用户态向内核态发送数据的过程可并行执行,互不影响,可靠性较高。这样,内核态与用户态的通信过程无需锁或者信号量等原子性保护操作来防止数据被篡改,可避免原子性保护操作对通信效率的影响。Moreover, the data transmission from the kernel state to the user state is implemented based on the first memory space, and the data transmission from the user state to the kernel state is implemented based on the second memory space. That is, the process of sending data from the kernel state to the user state is different from the process of sending data from the user state to the user state. The process of sending data in the kernel state can be executed in parallel without affecting each other and has high reliability. In this way, the communication process between the kernel state and the user state does not require atomic protection operations such as locks or semaphores to prevent data from being tampered with, and can avoid the impact of atomic protection operations on communication efficiency.

可选地,所述方法还包括:Optionally, the method also includes:

所述第一进程创建所述第一内存空间和所述第二内存空间;The first process creates the first memory space and the second memory space;

所述第一进程将所述第一内存空间和所述第二内存空间映射至所述第二进程,以使所述第一进程和所述第二进程共享所述第一内存空间和所述第二内存空间。The first process maps the first memory space and the second memory space to the second process, so that the first process and the second process share the first memory space and the second memory space. Second memory space.

在内核态与用户态进行通信之前,可通过第一进程创建第一存储空间和第二内存空间,并将上述第一内存空间和上述第二内存空间映射至第二进程,以使第一进程和第二进程共享上述第一内存空间和上述第二内存空间。Before the kernel mode communicates with the user mode, the first storage space and the second memory space can be created by the first process, and the above-mentioned first memory space and the above-mentioned second memory space can be mapped to the second process, so that the first process Share the above-mentioned first memory space and the above-mentioned second memory space with the second process.

具体的,在Linux系统中,上述映射可通过创建并初始化第一虚拟设备(/dev/mem设备)实现,/dev/mem设备用于用户态映射内核态创建的第一内存空间和第二内存空间。Specifically, in the Linux system, the above mapping can be achieved by creating and initializing the first virtual device (/dev/mem device). The /dev/mem device is used for user mode mapping of the first memory space and the second memory created by the kernel mode. space.

该实施方式中,通过所述第一进程和所述第二进程共享的第一内存空间和第二内存空间,所述第一进程和所述第二进程可以实现并行通信,从而提高内核态与用户态之间的通信效率。In this embodiment, through the first memory space and the second memory space shared by the first process and the second process, the first process and the second process can achieve parallel communication, thereby improving the kernel state and Communication efficiency between user states.

可选地,所述第一内存空间包括M个存储单元,M为正整数;Optionally, the first memory space includes M storage units, where M is a positive integer;

所述第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据,包括:The first process writes the first data into the first memory space, and the second process reads the first data in the first memory space, including:

所述第一进程获取所述第一数据;The first process obtains the first data;

在所述M个存储单元中存在空闲的第一存储单元的情况下,所述第一进程将所述第一数据写入第一存储单元中;When there is a free first storage unit among the M storage units, the first process writes the first data into the first storage unit;

所述第一进程更新所述第一存储单元的状态信息;The first process updates the status information of the first storage unit;

所述第二进程在监听到所述第一存储单元的状态信息变化的情况下,读取所述第一存储单元中的所述第一数据。The second process reads the first data in the first storage unit when it monitors changes in the status information of the first storage unit.

对于第一内存空间中,可按照系统资源和实际业务需求确定第一内存空间的容量大小以及每一存储单元的容量大小,并且每一存储单元的数据结构可包括多个域段,例如,用于表示存储单元当前使用状态的域段、用于表示存储单元中可用于传输数据的有效数据长度的域段,用于存储数据的域段等。For the first memory space, the capacity of the first memory space and the capacity of each storage unit can be determined according to system resources and actual business requirements, and the data structure of each storage unit can include multiple domain segments, for example, using Field segments used to represent the current usage status of the storage unit, field segments used to represent the effective data length that can be used to transmit data in the storage unit, field segments used to store data, etc.

需要说明的是,存储单元的使用状态可分为空闲和已满,空闲的存储单元即该存储单元可以写入数据,已满的存储单元即该存储单元无法写入数据。It should be noted that the usage status of the storage unit can be divided into idle and full. An idle storage unit means that the storage unit can write data, and a full storage unit means that the storage unit cannot write data.

其中,上述第一存储单元即为M个存储单元中使用状态为空闲的任一存储单元,可以在第一存储单元中写入数据。若上述M个存储单元均为已满的使用状态,可等待有空闲的存储单元时再进行数据的重新写入。Wherein, the above-mentioned first storage unit is any storage unit whose use status is idle among the M storage units, and data can be written in the first storage unit. If the above-mentioned M storage units are all in full use, you can wait until there are free storage units before rewriting data.

其中,上述第一存储单元的状态信息可用于告知第二进程第一存储单元中有新写入的数据,上述第一存储单元的状态信息可包括第一存储单元的使用状态和第一存储单元中的数据长度,具体的,可通过上述存储单元中的不同域段的信息表示,例如,在用于表示存储单元使用状态的域段的长度可为1比特(bit):取值为“0”时表示存储单元的使用状态为空闲,取值为“1”时表示存储单元的使用状态为已满;或取值为“0”时表示存储单元的使用状态为已满,取值为“1”时表示存储单元的使用状态为空闲。其中,用于表示存储单元中的数据长度的域段的长度可按照该存储单元中可存储数据的长度设置,本申请对此不做限制。The status information of the first storage unit may be used to inform the second process that there is newly written data in the first storage unit. The status information of the first storage unit may include the usage status of the first storage unit and the first storage unit. The data length in , specifically, can be represented by the information of different field segments in the above-mentioned storage unit. For example, the length of the field segment used to represent the usage status of the storage unit can be 1 bit (bit): the value is "0 " means that the usage status of the storage unit is idle, and a value of "1" means that the usage status of the storage unit is full; or a value of "0" means that the usage status of the storage unit is full, and the value is " "1" indicates that the storage unit is idle. The length of the field segment used to represent the data length in the storage unit can be set according to the length of data that can be stored in the storage unit, and this application does not limit this.

具体的,在Linux系统中,上述第二进程监听上述第一存储单元的状态信息可通过监听函数(如epoll函数、select函数)等实现监听,当监听到第一存储单元的状态信息变更时,通知第二进程从第一存储单元中读取写入的第一数据。Specifically, in the Linux system, the above-mentioned second process can monitor the status information of the above-mentioned first storage unit through a monitoring function (such as the epoll function, select function), etc., when monitoring changes in the status information of the first storage unit, Notify the second process to read the written first data from the first storage unit.

该实施方式中,所述第一进程获取所述第一数据;在所述M个存储单元中存在空闲的第一存储单元的情况下,所述第一进程将所述第一数据写入第一存储单元中;所述第一进程更新所述第一存储单元的状态信息;所述第二进程在监听到所述第一存储单元的状态信息变化的情况下,读取所述第一存储单元中的所述第一数据。即所述第一进程通过在空闲的第一存储单元中写入第一数据并更新所述第一存储单元的状态信息,所述第二进程可通过监听所述第一存储单元的状态信息结果读取所述第一存储单元中写入的第一数据,从而实现内核态向用户态发送所述第一数据,提高了内核态与用户态之间通信的实时性。In this implementation, the first process obtains the first data; when there is a free first storage unit among the M storage units, the first process writes the first data into the In a storage unit; the first process updates the status information of the first storage unit; the second process reads the first storage when monitoring changes in the status information of the first storage unit. the first data in the unit. That is, the first process writes the first data in the free first storage unit and updates the status information of the first storage unit, and the second process can monitor the status information results of the first storage unit. Reading the first data written in the first storage unit enables the kernel state to send the first data to the user state, thereby improving the real-time nature of communication between the kernel state and the user state.

另外,通过所述第一内存空间,若内核态需向多个用户态发送数据,可通过拓展所述M个存储单元实现,内核态向各用户态发送数据的过程如上述内容所述。In addition, through the first memory space, if the kernel state needs to send data to multiple user states, this can be achieved by expanding the M storage units. The process of sending data from the kernel state to each user state is as described above.

可选地,所述第一进程更新所述第一存储单元的状态信息,包括:Optionally, the first process updates the status information of the first storage unit, including:

在所述第一数据写入第一存储单元后,满足如下至少一项的情况下所述第一进程更新所述第一存储单元的状态信息:After the first data is written into the first storage unit, the first process updates the status information of the first storage unit if at least one of the following conditions is met:

所述第一存储单元的数据长度大于或等于第一预设阈值;The data length of the first storage unit is greater than or equal to the first preset threshold;

第一定时器超时。The first timer has expired.

其中,上述第一预设阈值和上述第一定时器可根据实际需求或经验值预先设置,例如,对于时效性较高的数据,可设置较小的第一预设阈值或较小的第一定时器的超时时间,以尽快将该数据从内核态发送至用户态。又例如,为节约传输资源,可设置较大的第一预设阈值或较大的第一定时器的超时时间,以避免第一存储单元的状态信息频繁更新,从而避免第二进程在第一存储单元中频繁进行数据读取。并且,对于内核态与用户态通信的过程中,通过上述第一预设阈值可从数据长度上考虑第一存储单元的状态更新频率,通过上述第一定时器可从时间上考虑第一存储单元的状态更新频率。The above-mentioned first preset threshold and the above-mentioned first timer can be set in advance according to actual needs or experience values. For example, for data with high timeliness, a smaller first preset threshold or a smaller first timer can be set. The timeout time of the timer is used to send the data from the kernel state to the user state as soon as possible. For another example, in order to save transmission resources, a larger first preset threshold or a larger timeout period of the first timer can be set to avoid frequent updates of the status information of the first storage unit, thereby preventing the second process from being updated in the first Frequent data reads occur in the storage unit. Moreover, during the communication process between the kernel state and the user state, the state update frequency of the first storage unit can be considered from the data length through the first preset threshold, and the first storage unit can be considered from the time through the first timer. frequency of status updates.

可以理解,上述第一预设阈值需小于上述第一存储单元可存储的数据长度。It can be understood that the above-mentioned first preset threshold needs to be smaller than the length of data that can be stored in the above-mentioned first storage unit.

需要说明的是,本申请实施例中,对于上述第一存储单元的状态信息更新,可根据新写入的数据长度或按照一定的时间间隔进行,具体的,可在第一进程写入第一存储单元的数据的数据长度大于或等于上述第一预设阈值后再更新第一存储单元的状态信息。例如,在上述第一数据的数据长度大于或等于上述第一预设阈值的情况下即可更新上述第一存储单元的状态信息;在上述第一数据的数据长度小于上述第一预设阈值的情况下,若在上一次更新第一存储单元的状态信息后第一进程写入的所有数据的数据长度大于或等于上述第一预设阈值,则也可更新上述第一存储单元的状态信息;在上一次更新第一存储单元的状态信息后第一进程写入的所有数据的数据长度仍小于上述第一预设阈值的情况下,则需等待第一进程继续向第一存储单元中写入数据直至第一存储单元中写入的数据长度大于或等于上述第一预设阈值。It should be noted that in this embodiment of the present application, the status information of the above-mentioned first storage unit can be updated according to the newly written data length or according to a certain time interval. Specifically, the first process can write the first The status information of the first storage unit is updated after the data length of the data in the storage unit is greater than or equal to the above-mentioned first preset threshold. For example, when the data length of the first data is greater than or equal to the first preset threshold, the status information of the first storage unit can be updated; when the data length of the first data is less than the first preset threshold, In this case, if the data length of all data written by the first process after the last update of the status information of the first storage unit is greater than or equal to the above-mentioned first preset threshold, the status information of the above-mentioned first storage unit may also be updated; If the data length of all data written by the first process after the last update of the status information of the first storage unit is still less than the above-mentioned first preset threshold, then it is necessary to wait for the first process to continue writing to the first storage unit. The data until the data length written in the first storage unit is greater than or equal to the above-mentioned first preset threshold.

该实施方式中,在所述第一数据写入第一存储单元后,满足如下至少一项的情况下所述第一进程更新所述第一存储单元的状态信息:所述第一存储单元的数据长度大于或等于第一预设阈值;第一定时器超时。即可以从数据长度和时间上控制所述第一存储单元的状态信息的更新频率,在确保数据传输的实时性的同时,避免第一存储单元的状态信息的频繁更新,从而减少数据传输所需资源。In this implementation, after the first data is written into the first storage unit, the first process updates the status information of the first storage unit if at least one of the following conditions is met: The data length is greater than or equal to the first preset threshold; the first timer times out. That is, the update frequency of the status information of the first storage unit can be controlled from the data length and time, while ensuring the real-time nature of data transmission, avoiding frequent updates of the status information of the first storage unit, thereby reducing the need for data transmission. resource.

可选地,所述第一内存空间包括N个存储单元,N为正整数;Optionally, the first memory space includes N storage units, where N is a positive integer;

所述第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据,包括:The second process writes the second data into the second memory space, and the first process reads the second data in the second memory space, including:

所述第二进程获取所述第二数据;The second process obtains the second data;

在所述N个存储单元中存在空闲的第二存储单元的情况下,所述第二进程将所述第二数据写入第二存储单元中;When there is a free second storage unit among the N storage units, the second process writes the second data into the second storage unit;

所述第二进程更新所述第二存储单元的状态信息;The second process updates the status information of the second storage unit;

所述第一进程在监听到所述第二存储单元的状态信息变化的情况下,读取所述第二存储单元中的所述第二数据。The first process reads the second data in the second storage unit when monitoring changes in the status information of the second storage unit.

需要说明的是,上述第二进程将第二数据写入第二内存空间,以及第一进程读取所述第二内存空间中的所述第二数据的过程,可参照上述第一进程将第一数据写入第一内存空间,以及第二进程读取所述第一内存空间中的所述第一数据的过程,在此不再赘述。It should be noted that the above-mentioned second process writes the second data into the second memory space, and the first process reads the second data in the second memory space. The process of writing the second data into the second memory space by the above-mentioned first process can be referred to. The process of writing a piece of data into the first memory space and the second process reading the first data in the first memory space will not be described again here.

其中,上述第二内存空间的数据写入权限由第二进程获得,而上述第一内存空间的数据写入权限由第一进程获得,且上述第一进程和上述第二进程均享有上述第一内存空间和上述第二内存空间的数据读取权限。Among them, the data writing permission of the above-mentioned second memory space is obtained by the second process, and the data writing permission of the above-mentioned first memory space is obtained by the first process, and the above-mentioned first process and the above-mentioned second process both enjoy the above-mentioned first process. Data reading permissions for the memory space and the above-mentioned second memory space.

具体的,在Linux系统中,上述第一进程监听上述第二存储单元的状态信息可通过创建第二虚拟设备(通知设备)实现,通知设备可用于通知内核态上述第二存储单元的状态信息是否发生变化。上述第一进程读取第二存储单元中的第二数据可通过创建一工作队列(workqueue)实现,workqueue的工作项内容是从第二存储单元中读取用户态发送的数据。例如,在第二存储单元中写入数据后,上述通知设备可监听到第二存储单元中存储的数据增加,从而第一进程可根据该监听结果通过workqueue读取第二存储单元中新写入的数据。Specifically, in the Linux system, the above-mentioned first process can monitor the status information of the above-mentioned second storage unit by creating a second virtual device (notification device). The notification device can be used to notify the kernel state whether the status information of the above-mentioned second storage unit is changes occur. The first process reading the second data in the second storage unit can be implemented by creating a work queue (workqueue). The work item content of the workqueue is to read the data sent by the user mode from the second storage unit. For example, after writing data in the second storage unit, the above-mentioned notification device can monitor the increase in the data stored in the second storage unit, so that the first process can read the newly written data in the second storage unit through the workqueue based on the monitoring result. The data.

该实施方式中,所述第二进程获取所述第二数据;在所述N个存储单元中存在空闲的第二存储单元的情况下,所述第二进程将所述第二数据写入第二存储单元中;所述第二进程更新所述第二存储单元的状态信息;所述第一进程在监听到所述第二存储单元的状态信息变化的情况下,读取所述第二存储单元中的所述第二数据。即所述第二进程通过在空闲的第二存储单元中写入第二数据并更新所述第二存储单元的状态信息,所述第一进程可通过监听所述第二存储单元的状态信息结果读取所述第二存储单元中写入的第二数据,从而实现用户态向内核态发送所述第二数据,提高了内核态与用户态之间通信的实时性。In this implementation, the second process obtains the second data; when there is a free second storage unit among the N storage units, the second process writes the second data into the Nth storage unit. Among the two storage units; the second process updates the status information of the second storage unit; the first process reads the second storage when monitoring changes in the status information of the second storage unit. the second data in the unit. That is, the second process writes the second data in the free second storage unit and updates the status information of the second storage unit. The first process can monitor the status information results of the second storage unit. Reading the second data written in the second storage unit enables the user state to send the second data to the kernel state, thereby improving the real-time performance of communication between the kernel state and the user state.

可选地,所述第二进程更新所述第二存储单元的状态信息,包括:Optionally, the second process updates the status information of the second storage unit, including:

在所述第二数据写入第二存储单元后,满足如下至少一项的情况下所述第二进程更新所述第二存储单元的状态信息:After the second data is written into the second storage unit, the second process updates the status information of the second storage unit if at least one of the following conditions is met:

所述第二存储单元的数据长度大于或等于第二预设阈值;The data length of the second storage unit is greater than or equal to the second preset threshold;

第二定时器超时。The second timer times out.

需要说明的是,上述第二进程更新第二存储单元的状态信息的过程,可参照上述第一进行更新第一存储单元的状态信息的过程,在此不再赘述。It should be noted that the process of updating the status information of the second storage unit by the second process may refer to the process of updating the status information of the first storage unit by the above-mentioned first process, which will not be described again here.

该实施方式中,在所述第二数据写入第二存储单元后,满足如下至少一项的情况下所述第二进程更新所述第二存储单元的状态信息:所述第二存储单元的数据长度大于或等于第二预设阈值;第二定时器超时。即可以从数据长度和时间上控制所述第二存储单元的状态信息的更新频率,在确保数据传输的实时性的同时,避免第二存储单元的状态信息的频繁更新,从而减少数据传输所需资源。In this implementation, after the second data is written into the second storage unit, the second process updates the status information of the second storage unit if at least one of the following conditions is met: The data length is greater than or equal to the second preset threshold; the second timer times out. That is, the update frequency of the status information of the second storage unit can be controlled from the data length and time, while ensuring the real-time nature of data transmission, avoiding frequent updates of the status information of the second storage unit, thereby reducing the need for data transmission. resource.

可选地,所述第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据之后,所述方法还包括:Optionally, after the first process writes the first data into the first memory space and the second process reads the first data in the first memory space, the method further includes:

所述第二进程更新所述第一内存空间的状态信息和第一指针,所述第一指针指向第一地址,所述第一地址为所述第二进程在所述第一内存空间中最新读取的数据地址;The second process updates the status information and the first pointer of the first memory space. The first pointer points to a first address. The first address is the latest address of the second process in the first memory space. Read data address;

和/或,and / or,

所述第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据之后,所述方法还包括:The second process writes the second data into the second memory space, and after the first process reads the second data in the second memory space, the method further includes:

所述第一进程更新所述第二内存空间的状态信息和第二指针,所述第二指针指向第二地址,所述第二地址为所述第一进程在所述第二内存空间中最新读取的数据地址。The first process updates the status information and the second pointer of the second memory space. The second pointer points to a second address. The second address is the latest address of the first process in the second memory space. The data address to be read.

在第二进程读取上述第一内存空间中的数据过程中,可通过上述第一内存空间的状态信息In the process of the second process reading the data in the first memory space, the status information of the first memory space can be used to

其中,上述第一内存空间的状态信息还可用于告知第一进程在第一内存空间中写入的数据已被第二进程读取。The status information of the first memory space may also be used to inform the first process that the data written in the first memory space has been read by the second process.

其中,上述第二内存空间的状态信息可用于告知第一进程在第二内存空间中存在新写入的数据等待被读取,或告知第二进程在在第二内存空间中写入的数据已被第一进程读取。Among them, the status information of the second memory space can be used to inform the first process that there is newly written data in the second memory space waiting to be read, or to inform the second process that the data written in the second memory space has been Read by the first process.

该实施方式中,通过所述第一内存空间的状态信息和所述第一指针,所述第二进程可以确定是否需要读取所述第一内存空间中的数据以及在所述第一内存空间中最新读取的数据地址,便于所述第二进程可以完整地读取所述第一进程写入到第一内存空间中的数据;通过所述第二内存空间的状态信息和所述第二指针,所述第一进程可以确定是否需要读取所述第二内存空间中的数据以及在所述第二内存空间中最新读取的数据地址,便于所述第一进程可以完整地读取所述第二进程写入到第二内存空间中的数据,从而提高所述内核态与用户态之间通信的可靠性和实时性。In this implementation, through the status information of the first memory space and the first pointer, the second process can determine whether it is necessary to read the data in the first memory space and the data in the first memory space. The latest read data address in the first memory space allows the second process to completely read the data written by the first process into the first memory space; through the status information of the second memory space and the second Pointer, the first process can determine whether it needs to read the data in the second memory space and the latest data address read in the second memory space, so that the first process can completely read all the data. The second process writes the data into the second memory space, thereby improving the reliability and real-time performance of the communication between the kernel state and the user state.

为更好地理解,下面结合附图对本申请的具体实施方式作进一步详细说明:For better understanding, the specific implementation modes of the present application are further described in detail below in conjunction with the accompanying drawings:

步骤S1、分别初始化内核态和用户态;Step S1: Initialize the kernel state and user state respectively;

其中,内核态初始化过程,如图2所示,具体包括如下过程:Among them, the kernel state initialization process, as shown in Figure 2, specifically includes the following processes:

在Linux系统内核驱动加载阶段,申请两块内存空间,其中用于内核态发送用户态接收的内存空间记为MK,用于用户态发送内核态接收的内存空间记为MUDuring the kernel driver loading phase of the Linux system, two memory spaces are applied for. The memory space used for kernel mode sending and user mode receiving is marked as M K , and the memory space used for user mode sending and kernel state receiving is marked as M U ;

其中,内存空间MK和内存空间MU可使用同样的空间布局和数据结构,每块共享内存空间容量大小及存储单元容量大小可以根据系统资源和实际业务需求进行灵活调整,内存空间的空间布局如图3所示,可将每一内存空间分为多个存储单元。Among them, memory space M K and memory space M U can use the same space layout and data structure. The capacity of each shared memory space and the capacity of the storage unit can be flexibly adjusted according to system resources and actual business needs. The spatial layout of the memory space As shown in Figure 3, each memory space can be divided into multiple storage units.

按照表1所示的存储单元数据结构对内存空间MK和内存空间MU进行初始化,其中每块共享内存空间容量大小及存储单元容量大小可以根据系统资源和实际业务需求进行灵活调整;Initialize the memory space M K and the memory space M U according to the storage unit data structure shown in Table 1. The capacity of each shared memory space and the capacity of the storage unit can be flexibly adjusted according to system resources and actual business needs;

以设置内存空间MK(或内存空间MU)的空间容量大小为4MB、存储单元容量大小为4KB为例,设置存储单元中各域段:Taking the example of setting the space capacity of memory space M K (or memory space M U ) to 4MB and the storage unit capacity to 4KB, set each domain segment in the storage unit:

表1Table 1

创建一个workqueue,工作项内容是从内存空间MU中读取用户态发送过来的数据,需要说明的是,该工作项内容可以结合实际业务添加相应操作;Create a workqueue. The content of the work item is to read the data sent from the user state from the memory space M U. It should be noted that the content of the work item can be combined with the actual business to add corresponding operations;

创建并初始化第一虚拟设备(/dev/mem设备),该设备用于用户态映射内存态创建的内存空间MK、MUCreate and initialize the first virtual device (/dev/mem device), which is used to map the memory space M K and MU created by the user state to the memory state;

创建第二虚拟设备(通知设备),该设备用于通知内核态和用户态当前/dev/mem设备发生变更,可以进行数据接收;Create a second virtual device (notification device), which is used to notify the kernel state and user state that the current /dev/mem device has changed and data can be received;

至此完成内核态初始化过程。This completes the kernel state initialization process.

其中,用户态初始化过程,如图4所示,具体包括如下过程:Among them, the user mode initialization process, as shown in Figure 4, specifically includes the following processes:

系统内核初始化完成后,运行用户态应用程序,此时内核态已经完成相关初始化过程;After the system kernel initialization is completed, run the user mode application. At this time, the kernel mode has completed the relevant initialization process;

打开/dev/mem设备,映射内存空间MK、MUOpen the /dev/mem device and map the memory space M K and M U ;

创建监听函数(epoll函数或select函数),用于监听/dev/mem设备的状态变更,监听状态变更对应的执行实体用于从内存空间MK中读取内核态发送过来的数据;同样地,该部分可以结合实际业务添加相应操作。Create a listening function (epoll function or select function) to monitor the status changes of the /dev/mem device. The execution entity corresponding to the monitoring status changes is used to read the data sent from the kernel state from the memory space M K ; similarly, This part can add corresponding operations based on actual business.

至此完成用户态初始化过程。This completes the user mode initialization process.

步骤S2、内核态向用户态发送数据,如图5所示,具体包括如下过程:Step S2: The kernel state sends data to the user state, as shown in Figure 5, which specifically includes the following processes:

内核态获取到需要向用户态发送的数据信息DKThe kernel state obtains the data information D K that needs to be sent to the user state;

判断内存空间MK中是否还有空闲可用的存储单元;Determine whether there are any free storage units in memory space M K ;

此时如果内存空间MK中无空闲存储单元,记录错误信息,等待并尝试重传;At this time, if there is no free storage unit in the memory space M K , record the error message, wait and try to retransmit;

此时如果内存空间MK中有空闲存储单元,将数据信息DK填入内存空间MK中空闲存储单元中。同时地,更新该存储单元使用状态及数据长度;At this time, if there is a free storage unit in the memory space M K , fill the data information D K into the free storage unit in the memory space M K. At the same time, update the storage unit usage status and data length;

判断存储单元中数据长度是否达到存储阈值;Determine whether the data length in the storage unit reaches the storage threshold;

如果当前已填充数据的存储单元对应数据长度未达到预设阈值,判断是否已创建发送定时器;If the data length corresponding to the currently filled storage unit does not reach the preset threshold, determine whether a sending timer has been created;

如果当前未创建发送定时器,创建发送定时器,超时时间根据实际场景定义,超时任务为刷新通知设备用于通知用户态/dev/mem设备状态变更;If a send timer is not currently created, create a send timer. The timeout time is defined according to the actual scenario. The timeout task is to refresh the notification device to notify user mode/dev/mem device status changes;

当发送定时器已创建时,判断发送定时器是否超时;When the sending timer has been created, determine whether the sending timer has timed out;

如果发送定时器未超时,返回上一步继续判断;If the sending timer has not expired, return to the previous step to continue judging;

如果发送定时器超时,执行超时任务,刷新通知设备通知用户态/dev/mem设备状态变更;If the sending timer times out, execute the timeout task and refresh the notification device to notify the user mode /dev/mem device status change;

如果当前已填充数据的存储单元对应数据长度已达到预设阈值,删除已存在的发送定时器;If the data length corresponding to the currently filled storage unit reaches the preset threshold, delete the existing sending timer;

刷新通知设备通知用户态/dev/mem设备状态变更;Refresh notification device notifies user mode/dev/mem device status changes;

至此完成内核态向用户态发送数据过程。At this point, the process of sending data from kernel mode to user mode is completed.

步骤S3、用户态接收内核态发送的数据,如图6所示,具体包括如下过程:Step S3: The user mode receives the data sent by the kernel mode, as shown in Figure 6, which specifically includes the following processes:

用户态通过epoll或select监听/dev/mem设备变更状态;The user mode monitors the status change of the /dev/mem device through epoll or select;

当监听到/dev/mem设备变更通知时执行任务实体;Execute the task entity when listening to the /dev/mem device change notification;

从内存空间MK中读取已填充的数据DK直至读取完毕;Read the filled data D K from the memory space M K until the reading is completed;

更新已读取的数据DK对应的存储单元状态为空闲状态,同时刷新用户态单元指针;Update the memory unit status corresponding to the read data D K to the idle state, and refresh the user mode unit pointer at the same time;

至此完成用户态接收内核态发送数据过程。At this point, the process of receiving data from the user mode and sending data from the kernel mode is completed.

步骤S4、用户态向内核态发送数据,如图7所示,具体包括如下过程:Step S4: The user state sends data to the kernel state, as shown in Figure 7, which specifically includes the following processes:

用户态获取到需要向内核态发送的数据信息DUThe user state obtains the data information DU that needs to be sent to the kernel state;

判断内存空间MU中是否还有空闲可用的存储单元;Determine whether there are any free storage units in the memory space M U ;

此时如果内存空间MU中无空闲存储单元,记录错误信息,等待并尝试重传;At this time, if there is no free storage unit in the memory space M U , record the error message, wait and try to retransmit;

此时如果内存空间MU中有空闲存储单元,将数据信息DU填入内存空间MU中空闲存储单元中。同时地,更新该存储单元使用状态及数据长度;At this time, if there is a free storage unit in the memory space M U , fill the data information D U into the free storage unit in the memory space M U. At the same time, update the storage unit usage status and data length;

判断存储单元中数据长度是否达到存储阈值;Determine whether the data length in the storage unit reaches the storage threshold;

如果当前已填充数据的存储单元对应数据长度未达到预设阈值,判断是否已创建发送定时器;If the data length corresponding to the currently filled storage unit does not reach the preset threshold, determine whether a sending timer has been created;

如果当前未创建发送定时器,创建发送定时器,超时时间根据实际场景定义,超时任务为刷新通知设备用于通知用户态/dev/mem设备状态变更;If a send timer is not currently created, create a send timer. The timeout time is defined according to the actual scenario. The timeout task is to refresh the notification device to notify user mode/dev/mem device status changes;

当发送定时器已创建时,判断发送定时器是否超时;When the sending timer has been created, determine whether the sending timer has timed out;

如果发送定时器未超时,返回上一步继续判断;If the sending timer has not expired, return to the previous step to continue judging;

如果发送定时器超时,执行超时任务,刷新通知设备通知用户态/dev/mem设备状态变更;If the sending timer times out, execute the timeout task and refresh the notification device to notify the user mode /dev/mem device status change;

如果当前已填充数据的存储单元对应数据长度已达到预设阈值,删除已存在的发送定时器;If the data length corresponding to the currently filled storage unit reaches the preset threshold, delete the existing sending timer;

刷新通知设备通知内核态/dev/mem设备状态变更;Refresh notification device notifies kernel state/dev/mem device status changes;

至此完成用户态向内核态发送数据过程。At this point, the process of sending data from user mode to kernel mode is completed.

步骤S5、内核态接收用户态发送的数据,如图8所示,具体包括如下过程:Step S5: The kernel state receives the data sent by the user state, as shown in Figure 8, which specifically includes the following processes:

当/dev/mem设备变更时,设备状态更新函数被调用;When the /dev/mem device changes, the device status update function is called;

更新在初始化阶段创建的workqueue,执行工作队列实体;Update the workqueue created during the initialization phase and execute the work queue entity;

从内存空间MU中读取已填充的数据DU直至读取完毕;Read the filled data D U from the memory space M U until the reading is completed;

更新已读取的数据DU对应的存储单元状态为空闲状态,同时刷新内核态单元指针;Update the memory unit status corresponding to the read data D U to the idle state, and refresh the kernel state unit pointer at the same time;

至此完成内核态接收用户态发送数据过程。At this point, the process of receiving and sending data in the kernel mode is completed.

需要说明的是,上述步骤S1可在内核态与用户态首次进行通信时执行,后续通信过程可不执行。并且,由于本申请实施方式通过两块内存空间分别执行不同功能,即上述步骤S2至步骤S3与步骤S4至步骤S5之间可并行执行,互不影响。It should be noted that the above step S1 may be executed when the kernel mode and the user mode communicate for the first time, and subsequent communication processes may not be executed. Moreover, since the embodiment of the present application performs different functions through two memory spaces, the above steps S2 to S3 and steps S4 to S5 can be executed in parallel without affecting each other.

本申请实施例中,用户态和内核态采用两块独立的内存空间交互,相互不影响,可靠性较高;由于两块内存有不同功能,不存在交互,故用户态与内核态之间无需锁或者信号量方式的原子性保护,且只需要1次拷贝,就能通信完成,大大提高了通信效率。In the embodiment of this application, the user state and the kernel state use two independent memory spaces to interact, which do not affect each other and have high reliability. Since the two memories have different functions and there is no interaction, there is no need for interaction between the user state and the kernel state. Atomic protection in the form of locks or semaphores, and only one copy is needed to complete the communication, which greatly improves communication efficiency.

另外,在存在多发多收的情况下,即内核态需要跟多个用户态交互,或者用户态需要跟多个内核态交互,可以直接扩展内存,交互方式不变,扩展性强。In addition, when there are multiple senders and multiple receivers, that is, the kernel state needs to interact with multiple user states, or the user state needs to interact with multiple kernel states, the memory can be directly expanded, the interaction method remains unchanged, and the scalability is strong.

参见图9,图9是本申请实施例提供的一种进程通信装置的结构示意图。如图9所示,进程通信装置900包括:Referring to Figure 9, Figure 9 is a schematic structural diagram of a process communication device provided by an embodiment of the present application. As shown in Figure 9, the process communication device 900 includes:

第一通信模块901,用于第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据;和/或,The first communication module 901 is used for the first process to write the first data into the first memory space, and the second process to read the first data in the first memory space; and/or,

第二通信模块902,用于第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据;The second communication module 902 is used for the second process to write the second data into the second memory space, and the first process to read the second data in the second memory space;

其中,所述第一进程处于内核态,所述第二进程处于用户态,所述第一内存空间和所述第二内存空间为所述第一进程和所述第二进程共享的内存空间。Wherein, the first process is in the kernel state, the second process is in the user state, and the first memory space and the second memory space are memory spaces shared by the first process and the second process.

可选地,所述第一内存空间包括M个存储单元,M为正整数;Optionally, the first memory space includes M storage units, where M is a positive integer;

所述第一通信模块901,包括:The first communication module 901 includes:

第一获取单元,用于所述第一进程获取所述第一数据;A first acquisition unit, used for the first process to acquire the first data;

第一写入单元,用于在所述M个存储单元中存在空闲的第一存储单元的情况下,所述第一进程将所述第一数据写入第一存储单元中;A first writing unit, configured for the first process to write the first data into the first storage unit when there is a free first storage unit among the M storage units;

第一更新单元,用于所述第一进程更新所述第一存储单元的状态信息;A first update unit, used by the first process to update the status information of the first storage unit;

第一读取单元,用于所述第二进程在监听到所述第一存储单元的状态信息变化的情况下,读取所述第一存储单元中的所述第一数据。The first reading unit is used for the second process to read the first data in the first storage unit when the second process detects changes in the status information of the first storage unit.

可选地,所述第一更新单元,包括:Optionally, the first update unit includes:

第一更新子单元,用于在所述第一数据写入第一存储单元后,满足如下至少一项的情况下所述第一进程更新所述第一存储单元的状态信息:The first update subunit is used to update the status information of the first storage unit by the first process when at least one of the following is satisfied after the first data is written into the first storage unit:

所述第一存储单元的数据长度大于或等于第一预设阈值;The data length of the first storage unit is greater than or equal to the first preset threshold;

第一定时器超时。The first timer has expired.

可选地,进程通信装置900还包括:Optionally, the process communication device 900 also includes:

第一更新模块,用于所述第二进程更新所述第一内存空间的状态信息和第一指针,所述第一指针指向第一地址,所述第一地址为所述第二进程在所述第一内存空间中最新读取的数据地址;The first update module is used by the second process to update the status information and the first pointer of the first memory space. The first pointer points to a first address, and the first address is where the second process is located. The latest read data address in the first memory space;

和/或,and / or,

第二更新模块,用于所述第一进程更新所述第二内存空间的状态信息和第二指针,所述第二指针指向第二地址,所述第二地址为所述第一进程在所述第二内存空间中最新读取的数据地址。The second update module is used by the first process to update the status information and the second pointer of the second memory space. The second pointer points to a second address. The second address is where the first process is located. The latest read data address in the second memory space.

可选地,所述第一内存空间包括N个存储单元,N为正整数;Optionally, the first memory space includes N storage units, where N is a positive integer;

所述第二通信模块902,包括:The second communication module 902 includes:

第二获取模块,用于所述第二进程获取所述第二数据;a second acquisition module, used by the second process to acquire the second data;

第二写入单元,用于在所述N个存储单元中存在空闲的第二存储单元的情况下,所述第二进程将所述第二数据写入第二存储单元中;A second writing unit, configured for the second process to write the second data into the second storage unit when there is a free second storage unit among the N storage units;

第二更新单元,用于所述第二进程更新所述第二存储单元的状态信息;a second update unit, used by the second process to update the status information of the second storage unit;

第二读取单元,用于所述第一进程在监听到所述第二存储单元的状态信息变化的情况下,读取所述第二存储单元中的所述第二数据。The second reading unit is used for the first process to read the second data in the second storage unit when the first process detects changes in the status information of the second storage unit.

可选地,所述第二更新单元,包括:Optionally, the second update unit includes:

第二子更新单元,用于在所述第二数据写入第二存储单元后,满足如下至少一项的情况下所述第二进程更新所述第二存储单元的状态信息:The second sub-update unit is used to update the status information of the second storage unit by the second process when at least one of the following is satisfied after the second data is written into the second storage unit:

所述第二存储单元的数据长度大于或等于第二预设阈值;The data length of the second storage unit is greater than or equal to the second preset threshold;

第二定时器超时。The second timer times out.

可选地,进程通信装置900还包括:Optionally, the process communication device 900 also includes:

创建模块,用于所述第一进程创建所述第一内存空间和所述第二内存空间;A creation module, used by the first process to create the first memory space and the second memory space;

映射模块,用于所述第一进程将所述第一内存空间和所述第二内存空间映射至所述第二进程,以使所述第一进程和所述第二进程共享所述第一内存空间和所述第二内存空间。A mapping module configured for the first process to map the first memory space and the second memory space to the second process, so that the first process and the second process share the first memory space and the second memory space.

进程通信装置900能够实现本申请实施例中图1方法实施例的各个过程,以及达到相同的有益效果,为避免重复,这里不再赘述。The process communication device 900 can implement each process of the method embodiment in Figure 1 in the embodiment of the present application, and achieve the same beneficial effects. To avoid duplication, the details will not be described here.

本申请实施例还提供一种电子设备。由于电子设备解决问题的原理与本申请实施例中图1所示的进程通信方法相似,因此该电子设备的实施可以参见方法的实施,重复之处不再赘述。An embodiment of the present application also provides an electronic device. Since the problem-solving principle of the electronic device is similar to the process communication method shown in Figure 1 in the embodiment of the present application, the implementation of the electronic device can be referred to the implementation of the method, and repeated details will not be repeated.

如图10所示,本申请实施例的电子设备,包括存储器1020,收发机1010,处理器1000;As shown in Figure 10, the electronic device according to the embodiment of the present application includes a memory 1020, a transceiver 1010, and a processor 1000;

存储器1020,用于存储计算机程序;收发机1010,用于在所述处理器1000的控制下收发数据;处理器1000,用于读取所述存储器1020中的计算机程序并执行以下操作:Memory 1020 is used to store computer programs; transceiver 1010 is used to send and receive data under the control of the processor 1000; processor 1000 is used to read the computer program in the memory 1020 and perform the following operations:

第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据;和/或,The first process writes the first data into the first memory space, and the second process reads the first data in the first memory space; and/or,

第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据;The second process writes the second data into the second memory space, and the first process reads the second data in the second memory space;

其中,所述第一进程处于内核态,所述第二进程处于用户态,所述第一内存空间和所述第二内存空间为所述第一进程和所述第二进程共享的内存空间。Wherein, the first process is in the kernel state, the second process is in the user state, and the first memory space and the second memory space are memory spaces shared by the first process and the second process.

其中,在图10中,总线架构可以包括任意数量的互联的总线和桥,具体由处理器1000代表的一个或多个处理器和存储器1020代表的存储器的各种电路链接在一起。总线架构还可以将诸如外围设备、稳压器和功率管理电路等之类的各种其他电路链接在一起,这些都是本领域所公知的,因此,本文不再对其进行进一步描述。总线接口提供接口。收发机1010可以是多个元件,即包括发送机和收发机,提供用于在传输介质上与各种其他装置通信的单元。处理器1000负责管理总线架构和通常的处理,存储器1020可以存储处理器1000在执行操作时所使用的数据。In FIG. 10 , the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1000 and various circuits of the memory represented by memory 1020 are linked together. The bus architecture can also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are all well known in the art and therefore will not be described further herein. The bus interface provides the interface. Transceiver 1010 may be a plurality of elements, including a transmitter and a transceiver, providing a unit for communicating with various other devices over a transmission medium. The processor 1000 is responsible for managing the bus architecture and general processing, and the memory 1020 can store data used by the processor 1000 when performing operations.

处理器1000可以是中央处理器(Central Processing Unit,CPU)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或复杂可编程逻辑器件(Complex Programmable LogicDevice,CPLD),处理器也可以采用多核架构。The processor 1000 may be a central processing unit (Central Processing Unit, CPU), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or a complex programmable logic device (Complex Programmable LogicDevice (CPLD), the processor can also adopt a multi-core architecture.

可选地,所述第一内存空间包括M个存储单元,M为正整数;Optionally, the first memory space includes M storage units, where M is a positive integer;

所述第一进程将第一数据写入第一内存空间,第二进程读取所述第一内存空间中的所述第一数据,包括:The first process writes the first data into the first memory space, and the second process reads the first data in the first memory space, including:

所述第一进程获取所述第一数据;The first process obtains the first data;

在所述M个存储单元中存在空闲的第一存储单元的情况下,所述第一进程将所述第一数据写入第一存储单元中;When there is a free first storage unit among the M storage units, the first process writes the first data into the first storage unit;

所述第一进程更新所述第一存储单元的状态信息;The first process updates the status information of the first storage unit;

所述第二进程在监听到所述第一存储单元的状态信息变化的情况下,读取所述第一存储单元中的所述第一数据。The second process reads the first data in the first storage unit when it monitors changes in the status information of the first storage unit.

可选地,所述第一进程更新所述第一存储单元的状态信息,包括:Optionally, the first process updates the status information of the first storage unit, including:

在所述第一数据写入第一存储单元后,满足如下至少一项的情况下所述第一进程更新所述第一存储单元的状态信息:After the first data is written into the first storage unit, the first process updates the status information of the first storage unit if at least one of the following conditions is met:

所述第一存储单元的数据长度大于或等于第一预设阈值;The data length of the first storage unit is greater than or equal to the first preset threshold;

第一定时器超时。The first timer has expired.

可选地,处理器1000,还用于读取所述存储器1020中的计算机程序并执行以下操作:Optionally, the processor 1000 is also used to read the computer program in the memory 1020 and perform the following operations:

所述第二进程更新所述第一内存空间的状态信息和第一指针,所述第一指针指向第一地址,所述第一地址为所述第二进程在所述第一内存空间中最新读取的数据地址;The second process updates the status information and the first pointer of the first memory space. The first pointer points to a first address. The first address is the latest address of the second process in the first memory space. Read data address;

和/或,and / or,

所述第一进程更新所述第二内存空间的状态信息和第二指针,所述第二指针指向第二地址,所述第二地址为所述第一进程在所述第二内存空间中最新读取的数据地址。The first process updates the status information and the second pointer of the second memory space. The second pointer points to a second address. The second address is the latest address of the first process in the second memory space. The data address to be read.

可选地,所述第一内存空间包括N个存储单元,N为正整数;Optionally, the first memory space includes N storage units, where N is a positive integer;

所述第二进程将第二数据写入第二内存空间,第一进程读取所述第二内存空间中的所述第二数据,包括:The second process writes the second data into the second memory space, and the first process reads the second data in the second memory space, including:

所述第二进程获取所述第二数据;The second process obtains the second data;

在所述N个存储单元中存在空闲的第二存储单元的情况下,所述第二进程将所述第二数据写入第二存储单元中;When there is a free second storage unit among the N storage units, the second process writes the second data into the second storage unit;

所述第二进程更新所述第二存储单元的状态信息;The second process updates the status information of the second storage unit;

所述第一进程在监听到所述第二存储单元的状态信息变化的情况下,读取所述第二存储单元中的所述第二数据。The first process reads the second data in the second storage unit when monitoring changes in the status information of the second storage unit.

可选地,所述第二进程更新所述第二存储单元的状态信息,包括:Optionally, the second process updates the status information of the second storage unit, including:

在所述第二数据写入第二存储单元后,满足如下至少一项的情况下所述第二进程更新所述第二存储单元的状态信息:After the second data is written into the second storage unit, the second process updates the status information of the second storage unit if at least one of the following conditions is met:

所述第二存储单元的数据长度大于或等于第二预设阈值;The data length of the second storage unit is greater than or equal to the second preset threshold;

第二定时器超时。The second timer times out.

可选地,处理器1000,还用于读取所述存储器1020中的计算机程序并执行以下操作:Optionally, the processor 1000 is also used to read the computer program in the memory 1020 and perform the following operations:

所述第一进程创建所述第一内存空间和所述第二内存空间;The first process creates the first memory space and the second memory space;

所述第一进程将所述第一内存空间和所述第二内存空间映射至所述第二进程,以使所述第一进程和所述第二进程共享所述第一内存空间和所述第二内存空间。The first process maps the first memory space and the second memory space to the second process, so that the first process and the second process share the first memory space and the second memory space. Second memory space.

本申请实施例提供的电子设备,可以执行上述图1所示的方法实施例,其实现原理和技术效果类似,本实施例此处不再赘述。The electronic device provided by the embodiment of the present application can execute the above-mentioned method embodiment shown in Figure 1. Its implementation principles and technical effects are similar and will not be described again in this embodiment.

本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述图1所述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Embodiments of the present application also provide a readable storage medium. Programs or instructions are stored on the readable storage medium. When the program or instructions are executed by a processor, each process of the method embodiment described in Figure 1 is implemented, and can To achieve the same technical effect, to avoid repetition, we will not repeat them here.

其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes computer readable storage media, such as computer read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.

本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述图1所述方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application further provides a chip. The chip includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the method described in Figure 1. Each process in the example can achieve the same technical effect. To avoid repetition, we will not repeat it here.

应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of this application may also be called system-on-chip, system-on-a-chip, system-on-a-chip or system-on-chip, etc.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, but may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions may be performed, for example, the methods described may be performed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present application can be embodied in the form of a computer software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM, disk , optical disk), including several instructions to cause a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of this application.

上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Inspired by this application, many forms can be made without departing from the purpose of this application and the scope protected by the claims, all of which fall within the protection of this application.

Claims (10)

1. A process communication method, comprising:
the method comprises the steps that a first process writes first data into a first memory space, and a second process reads the first data in the first memory space; and/or the number of the groups of groups,
the second process writes second data into a second memory space, and the first process reads the second data in the second memory space;
the first process is in a kernel mode, the second process is in a user mode, and the first memory space and the second memory space are memory spaces shared by the first process and the second process.
2. The method of claim 1, wherein the first memory space comprises M memory cells, M being a positive integer;
the first process writes first data into a first memory space, and the second process reads the first data in the first memory space, including:
the first process acquires the first data;
in the case that there is a free first storage unit in the M storage units, the first process writes the first data into the first storage unit;
the first process updates state information of the first storage unit;
The second process reads the first data in the first memory cell while monitoring a change in state information of the first memory cell.
3. The method of claim 2, wherein the first process updating the state information of the first memory cell comprises:
after the first data is written into the first storage unit, the first process updates the state information of the first storage unit if at least one of the following is satisfied:
the data length of the first storage unit is larger than or equal to a first preset threshold value;
the first timer times out.
4. The method of claim 1, wherein the first process writes first data to a first memory space, and wherein after the second process reads the first data in the first memory space, the method further comprises:
the second process updates state information of the first memory space and a first pointer, wherein the first pointer points to a first address, and the first address is a data address which is read by the second process in the first memory space;
and/or the number of the groups of groups,
the second process writes second data into a second memory space, and after the first process reads the second data in the second memory space, the method further comprises:
The first process updates the state information of the second memory space and a second pointer, wherein the second pointer points to a second address, and the second address is the data address which is read by the first process in the second memory space.
5. The method of claim 1, wherein the first memory space comprises N memory cells, N being a positive integer;
the second process writes second data into a second memory space, and the first process reads the second data in the second memory space, including:
the second process obtains the second data;
in the case that there is a free second storage unit in the N storage units, the second process writes the second data into the second storage unit;
the second process updates the state information of the second storage unit;
the first process reads the second data in the second storage unit while monitoring a change in state information of the second storage unit.
6. The method of claim 5, wherein the second process updating the state information of the second memory cell comprises:
after the second data is written into the second storage unit, the second process updates the state information of the second storage unit if at least one of the following is satisfied:
The data length of the second storage unit is larger than or equal to a second preset threshold value;
the second timer times out.
7. The method of any one of claims 1 to 6, wherein the method further comprises:
the first process creates the first memory space and the second memory space;
the first process maps the first memory space and the second memory space to the second process such that the first process and the second process share the first memory space and the second memory space.
8. A process communication apparatus, comprising:
the first communication module is used for writing first data into a first memory space by a first process and reading the first data in the first memory space by a second process; and/or the number of the groups of groups,
the second communication module is used for writing second data into a second memory space by a second process, and the first process reads the second data in the second memory space;
the first process is in a kernel mode, the second process is in a user mode, and the first memory space and the second memory space are memory spaces shared by the first process and the second process.
9. An electronic device, comprising: a transceiver, a memory, a processor, and a computer program stored on the memory and executable on the processor; it is characterized in that the method comprises the steps of,
the processor being configured to read a program in a memory to implement the steps in the method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that it stores thereon a program or instructions which, when executed by a processor, implement the steps of the process communication method according to any of claims 1 to 7.
CN202210625529.7A 2022-06-02 2022-06-02 Process communication method and device, electronic equipment and readable storage medium Active CN117215803B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210625529.7A CN117215803B (en) 2022-06-02 2022-06-02 Process communication method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210625529.7A CN117215803B (en) 2022-06-02 2022-06-02 Process communication method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN117215803A true CN117215803A (en) 2023-12-12
CN117215803B CN117215803B (en) 2025-05-16

Family

ID=89035786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210625529.7A Active CN117215803B (en) 2022-06-02 2022-06-02 Process communication method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117215803B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118152102A (en) * 2024-05-10 2024-06-07 浪潮云信息技术股份公司 A method and device for realizing rapid cleaning of abnormal processes in a trusted operating system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369241A (en) * 2007-09-21 2009-02-18 中国科学院计算技术研究所 A cluster fault-tolerant system, device and method
CN105677493A (en) * 2016-01-04 2016-06-15 汉柏科技有限公司 Communicating method and system between user mode and kernel
CN112035272A (en) * 2019-06-03 2020-12-04 华为技术有限公司 Method, apparatus and computer equipment for interprocess communication
CN112306702A (en) * 2019-07-26 2021-02-02 龙芯中科技术股份有限公司 Data sharing method and device, electronic equipment and storage medium
CN113495795A (en) * 2020-04-03 2021-10-12 华为技术有限公司 Inter-process communication method and related equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369241A (en) * 2007-09-21 2009-02-18 中国科学院计算技术研究所 A cluster fault-tolerant system, device and method
CN105677493A (en) * 2016-01-04 2016-06-15 汉柏科技有限公司 Communicating method and system between user mode and kernel
CN112035272A (en) * 2019-06-03 2020-12-04 华为技术有限公司 Method, apparatus and computer equipment for interprocess communication
CN112306702A (en) * 2019-07-26 2021-02-02 龙芯中科技术股份有限公司 Data sharing method and device, electronic equipment and storage medium
CN113495795A (en) * 2020-04-03 2021-10-12 华为技术有限公司 Inter-process communication method and related equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118152102A (en) * 2024-05-10 2024-06-07 浪潮云信息技术股份公司 A method and device for realizing rapid cleaning of abnormal processes in a trusted operating system

Also Published As

Publication number Publication date
CN117215803B (en) 2025-05-16

Similar Documents

Publication Publication Date Title
EP4052126B1 (en) Management of multiple physical function non-volatile memory devices
CN111274252A (en) Block chain data chaining method, device, storage medium and server
CN110119304B (en) Interrupt processing method, device and server
CN111865831B (en) Data processing method, network device, computing node and system
CN111666184B (en) Solid state drive SSD hard disk testing method and device and electronic equipment
US9910808B2 (en) Reflective memory bridge for external computing nodes
EP3814921A1 (en) Network packet templating for gpu-initiated communication
CN113971138A (en) Data access method and related equipment
CN114880253A (en) System and method for storage device resource management
WO2024041576A1 (en) Live migration method and system for virtual machine, and device and storage medium
CN114328453A (en) KV database data management method, device, computing device and storage medium
CN117591450A (en) A data processing system, method, equipment and medium
CN107453845B (en) Response confirmation method and device
CN117215803A (en) Process communication method and device, electronic equipment and readable storage medium
CN116204463A (en) Data processing method and system, electronic device, storage medium
CN113986833A (en) File merging method, system, computer system and storage medium
CN116601616A (en) A data processing device, method and related equipment
CN112860595B (en) PCI (peripheral component interconnect express) equipment or PCIE (peripheral component interconnect express) equipment, data access method and related assembly
CN115297169B (en) Data processing method, device, electronic equipment and medium
CN118535510B (en) Data transmission method, device, vehicle-mounted terminal and storage medium
US12093528B2 (en) System and method for managing data access in distributed systems
US10762011B2 (en) Reflective memory bridge for external computing nodes
US20240220294A1 (en) VM Migration Using Memory Pointers
WO2024000510A1 (en) Request processing method, apparatus and system
CN119621368A (en) Message transmission method, device, equipment and storage medium

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