Data processing method, electronic equipment, program product and storage medium

Through the high-speed interconnection protocol, the processor and network card devices can directly access network card memory, solving the problem of frequent memory data transfer between processors and network card devices and improving work efficiency.

CN120216208AActive Publication Date: 2025-06-27INSPUR (BEIJING) ELECTRONICS INFORMATION IND CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510688566.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2025-06-27
Estimated Expiration
2045-05-27

AI Technical Summary

Technical Problem

The memory data transfer needs to be frequently carried between the processor and the network card device, which reduces the working efficiency of the processor and the network card.

Method used

Through the high-speed interconnection protocol, both the processor and the network card device can directly access the network card memory. The processor sets network service data and programs in the network card memory and performs business processing in the network card memory. The network card device can also directly access and process this data.

Benefits of technology

This avoids frequent memory data transfer between processors and network card devices, and significantly improves the working efficiency between processors and network card devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216208A_ABST
    Figure CN120216208A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, electronic equipment, a program product and a storage medium, relates to the technical field of networks, and is applied to the electronic equipment, the electronic equipment comprises a processor and network card equipment, the network card equipment is provided with a network card memory, and the processor and the network card equipment access the network card memory based on a high-speed interconnection protocol. The method comprises the following steps: a processor sets network service data and a network service program in a network card memory; the processor accesses the network service data and the network service program in the network card memory, and performs service processing on the network service data based on the network service program; and the network card equipment accesses the network service data in the network card memory, and carries out network card service processing and network transmission processing on the network service data. The processor and the network card equipment can process the same batch of network service data in the network card memory, so that frequent memory data carrying between the processor and the network card equipment can be avoided, and the working efficiency between the processor and the network card equipment can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of network technologies, and in particular, to a data processing method, an electronic device, a program product, and a storage medium. Background Art

[0002] To meet the requirements of high-speed computing and high-speed transmission, intelligent network card devices have emerged. They can offload some functions of network computing from the processor to the network card to reduce the processor load. However, the processor and the intelligent network card device cannot access each other's memory, which leads to frequent memory data transfer between the processor and the intelligent network card device, reducing the working efficiency of the processor and the intelligent network card. Summary of the Invention

[0003] This application provides a data processing method, an electronic device, a program product, and a storage medium to solve the problem of frequent memory data transfer between the processor and the network card device in the related art.

[0004] This application provides a data processing method applied to an electronic device. The electronic device includes a processor and a network card device, and the network card device has a network card memory. Both the processor and the network card device access the network card memory based on a high-speed interconnect protocol. The method includes: The processor sets both network service data and network service programs in the network card memory; The processor accesses the network service data and network service programs in the network card memory, and performs service processing on the network service data based on the network service programs; The network card device accesses the network service data in the network card memory, and performs network card service processing and network transmission processing on the network service data.

[0005] This application also provides an electronic device, including a processor and a network card device. The network card device has a network card memory, and both the processor and the network card device access the network card memory based on a high-speed interconnect protocol; The processor and the network card device are configured to execute the above data processing method.

[0006] This application also provides a computer program product, including a computer program or instruction. When the computer program or instruction is executed by a processor, the above data processing method is implemented.

[0007] This application also provides a non-volatile computer-readable storage medium. Computer-executable instructions are stored in the computer-readable storage medium. When the computer-executable instructions are loaded and executed by a processor, the above data processing method is implemented.

[0008] In this application, an electronic device may include a processor and a network card device. The network card device has network card memory, and both the processor and the network card device access the network card memory based on a high-speed interconnection protocol, that is, the processor can directly access the network card memory of the network card device. Subsequently, the processor can set both network service data and network service programs in the network card memory, and can access the network service data and network service programs in the network card memory, and perform service processing on the network service data based on the network service program. The network card device accesses the same batch of network service data in the network card memory, and performs network card service processing and network transmission processing on the network service data. It can be seen that since both the processor and the network card device can process the same batch of network service data in the network card memory, it is possible to avoid frequent memory data transfer between the processor and the network card device, thereby effectively improving the working efficiency between the processor and the network card device.

[0009] This application also provides an electronic device, a computer program product, and a non-volatile computer-readable storage medium, which have the above beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0011] Figure 1 It is a block diagram of an electronic device provided by an embodiment of this application; Figure 2 It is a flowchart of a data processing method provided by an embodiment of this application; Figure 3 It is a schematic diagram of the operating system memory space division provided by an embodiment of this application; Figure 4 It is a schematic diagram of a memory interaction method provided by an embodiment of this application; Figure 5 It is a schematic diagram of a software and hardware architecture provided by an embodiment of this application; Figure 6 It is a schematic diagram of a memory distribution provided by an embodiment of this application; Figure 7 It is a schematic diagram of a downlink transmission process provided by an embodiment of this application; Figure 8 It is a schematic diagram of an uplink transmission process provided by an embodiment of this application; Figure 9 It is a schematic diagram of an operating system initialization process provided by an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0012] 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 only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0013] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variation thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0014] In the related art, in order to meet the requirements of high-speed computing and high-speed transmission, intelligent network card devices have emerged. They can offload some functions of network computing from the processor to the network card to reduce the processor load. However, the processor and the intelligent network card device cannot access each other's memory, which leads to frequent memory data transfer between the processor and the intelligent network card device, reducing the working efficiency of the processor and the intelligent network card.

[0015] In view of this, aiming at the technical problem of how to solve the frequent memory data transfer between the processor and the network card device, the present application can provide a data processing method, which can ensure that both the processor and the network card device can process the same batch of network service data in the network card memory, so as to avoid frequent memory data transfer between the processor and the network card device, thereby effectively improving the working efficiency between the processor and the network card device.

[0016] In order to enable those skilled in the art of this technology to better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0017] First, the structure of the electronic device applicable to the present application will be introduced. Please refer to Figure 1 , Figure 1The block diagram of an electronic device provided by an embodiment of the present application. In this embodiment, the electronic device may include a processor and a network card device, and the network card device includes network card memory. The processor is connected to the network card device, for example, it can be connected through a bus (such as a PCIe bus, Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard). Different from the related art, in this embodiment, both the processor and the network card device can access the network card memory through a high-speed interconnect protocol, where the high-speed interconnect protocol is a protocol that supports memory sharing, cache coherence processing, and can improve communication between the processor and accelerators and memory expansion devices. For example, it can be a CXL protocol (Compute Express Link), a CCIX protocol (Cache Coherent Interconnect for Accelerators), a UCIe protocol (Universal Chiplet Interconnect Express), etc. Under this protocol, the processor can access the network card memory in the same way as accessing the host memory without moving the memory data in the host memory to the network card memory. At this time, as long as the processor sets the running data in the network card memory through the high-speed interconnect protocol and processes the running data in the network card memory, it can effectively avoid the memory data transfer between the processor and the network card device, thereby improving the working efficiency between the processor and the network card device.

[0018] Further, the network card processor ( Figure 1 not drawn in the figure) in the processor and the network card device can both have corresponding caches ( Figure 1(not shown), that is, the processor has a processor cache, and the network card processor has a network card processor cache. In the related art, in addition to the fact that the processor cannot directly access the network card memory of the network card device and the network card device cannot directly access the host memory of the processor, the reason why the processor and the network card device need to frequently transfer memory data is also that it is impossible to ensure the cache consistency between the processor and the network card device, that is, it is impossible to ensure that the same data maintains the same value in the processor cache and the network card processor cache. After introducing the high-speed interconnect protocol in this application, it is possible to ensure the cache consistency between the processor and the network card device based on the high-speed interconnect protocol. For example, after the processor loads the data in the network card memory into the processor cache and processes it, it can update the same data in the network card processor cache based on the high-speed interconnect protocol (such as value update, status update, etc.). Similarly, after the network card processor loads the data in the network card memory into the network card processor cache and processes it, it can update the same data in the processor cache based on the high-speed interconnect protocol. In this way, it is possible to keep the data in the processor cache consistent with the data in the network card processor cache, thereby ensuring the reliability of data processing. In addition, since the processor and the network card processor can directly hit the correct running data from the cache, the read and write performance of the processor and the network card processor can also be effectively guaranteed.

[0019] It should be noted that the number of processors in this application is not limited, and it can be one or multiple, which can be set according to actual application requirements. In addition, the other structures in the electronic device in this application are not limited. For example, the electronic device can also have structures such as a memory, a host memory, and a bus.

[0020] Based on the above description of the electronic device structure, the data processing method provided by this application will be introduced in detail below. For easy understanding, please refer to Figure 2 , Figure 2 which is a flowchart of a data processing method provided by an embodiment of this application. The method may include: S101. The processor sets both the network service data and the network service program in the network card memory.

[0021] In this step, the operation data set by the processor in the network card memory includes network service data and network service programs. Among them, the network service data is the data to be processed for network services, which can be characters, images, videos, audios, network data packets, etc. As the network service processing progresses, the form of the network service data can also change, such as converting from characters, images, videos, audios, etc. to network data packets, or from network data packets to characters, images, videos, audios, etc. The network service program is a program for executing network service processing, which can include, for example, application programs, network protocol stacks, and network card driver programs. Among them, the application program is a computer program started by the user and can interact with the user. The network protocol stack is a computer program for network encapsulation / decapsulation of network service data based on network protocols. The network card driver program is a driver program for controlling the operation of the network card device. It can be seen that since the application program, network protocol stack, and network card driver program are all set in the network card memory, the processor can directly run the application program, network protocol stack, and network card driver program based on the network card memory, and can directly process network service data based on the network card memory. At this time, the host memory in the host side does not need to be responsible for storing network service data and network service programs. The host side can only retain the computing function of the processor.

[0022] It should be noted that different network service programs can be set in the network card memory at different running stages of the electronic device. For example, the network protocol stack and network card driver program can be set in the network card memory during the operating system initialization stage; the application program can be set in the network card memory after the operating system is started.

[0023] Furthermore, to achieve memory isolation of the application program from the network protocol stack and network card driver program in the network card memory, thus ensuring the normal operation of the operating system, this embodiment can also partition and plan the network card memory. Specifically, the network card memory can be divided by the operating system into a user-mode memory area and a kernel-mode memory area. The application program is set in the user-mode memory area, and the network protocol stack and network card driver program are set in the kernel-mode memory area. The user-mode memory area is isolated from the kernel-mode memory area. To facilitate understanding of the change in the memory space partitioning situation by the operating system when the processor can directly access the network card memory, please refer to Figure 3 , Figure 3 which is a schematic diagram of the memory space partitioning of an operating system provided by an embodiment of this application. Among them, Figure 3 the left side shows the memory space partitioning situation in the related art by the operating system, where the host memory and the network card memory are two independent and isolated memory areas. In the related art, the processor can only access the host memory, so only the user-mode memory space and the kernel-mode memory space can be set in the host memory. The network card memory can only be accessed by the network card processor and cannot be accessed by the processor. Furthermore, no user-mode memory space or kernel-mode memory space can be set in the network card memory, and it is completely a network card memory space.Figure 3 The right side shows the division of the memory space by the operating system in this application. Since the processor in this embodiment can directly access the network card memory based on the high-speed interconnect protocol, a user-mode memory space and a kernel-mode memory space can be set in the network card memory. At this time, the network card memory is shared by the processor and the network card device, and the operating system can manage the network card memory space in a conventional manner.

[0024] Furthermore, since the memory access method of the processor and the operating system memory space have both changed, the interaction method between the application programs in the user-mode memory space and the network protocol stack in the kernel-mode memory space has also changed. For ease of understanding the specific changes, please refer to Figure 4 , Figure 4 which is a schematic diagram of a memory interaction method provided by an embodiment of this application. Figure 4 The left side shows the interaction method between the application program and the network card memory in the related art, that is, the application software accesses the operating system protocol stack software (such as the network protocol stack) in the kernel state of the host memory through a system call, and the operating system protocol stack software realizes the interaction between the kernel-state host memory and the network card memory through DMA / MMIO (Direct Memory Access, Memory-Mapped I / O). Figure 4 The right side shows the interaction method between the network card memory and the user in this application. The application software can directly interact with the operating system protocol stack software (such as the network protocol stack) in the network card memory through a system call based on the high-speed interconnect protocol.

[0025] Based on this, this method may further include: Step 11: When the processor runs the application program, it calls the network protocol stack in the kernel-mode memory area through the operating system interface based on the high-speed interconnect protocol.

[0026] Step 12: When the processor runs the network protocol stack, it responds to the application program in the user-mode memory area through the operating system interface based on the high-speed interconnect protocol.

[0027] S102: The processor accesses the network service data and network service program in the network card memory, and performs service processing on the network service data based on the network service program.

[0028] In this step, after the processor sets the network service data and network service program in the network card memory, it can access the network card memory and perform service processing on the network service data based on the network service program.

[0029] It should be noted that this embodiment does not limit the specific service processing, and relevant technologies of the application program, network protocol stack, and network card driver can be referred to.

[0030] Further, the processor can set a processor cache, and the network card processor can set a network card processor cache. Furthermore, cache coherence processing can be performed on the processor cache and the network card processor cache based on a high-speed interconnect protocol. Specifically, the processor loads network service data and network service programs from the network card memory into the processor cache based on the high-speed interconnect protocol and performs service processing in the processor cache. Subsequently, after the network service data is updated, the processor can update the network card processor cache of the network card device based on the high-speed interconnect protocol.

[0031] Based on this, the processor accesses network service data and network service programs in the network card memory based on the high-speed interconnect protocol and performs service processing on the network service data based on the network service program, which can include: Step 21: The processor loads network service data and network service programs from the network card memory into the processor cache based on the high-speed interconnect protocol.

[0032] Step 22: The processor performs service processing on the network service data in the processor cache based on the network service program in the processor cache, and updates the network card processor cache of the network card device based on the high-speed interconnect protocol after the network service data is updated.

[0033] It should be noted that this embodiment does not limit how to update the network card processor cache. For example, when the cached data has a data status, the network service data in the network card processor cache can be marked as expired so that the network card processor extracts it again from the network card memory the next time it processes the network service data. Of course, the value of the network service data in the network card processor cache can also be directly updated according to the value in the processor cache, which can be set according to actual application requirements.

[0034] S103. The network card device accesses network service data in the network card memory and performs network card service processing and network transmission processing on the network service data.

[0035] In this step, the network card device can also directly access the same batch of network service data in the network card memory, and perform network card service processing and network transmission processing on the network service data. Among them, the network card service processing refers to the processing operations unloaded to the network card device, which can include application processing and communication computing processing. The application processing is the processing operation related to the application program. For example, it can be the storage protocol processing in the field of distributed storage, the collective communication processing in the field of machine learning, the video encoding and decoding processing in the field of video, etc. The communication computing is the processing operation related to network communication. For example, the TCP jumbo frame function, the IP / UDP checksum calculation, etc. Since the processor and the network card device share the network card memory, and the data related to the network service is stored in the network card memory, the network card device can directly obtain the network service data already processed by the processor from the network card memory and can directly perform processing, or the network card device can directly transfer the network service data already processed by itself to the processor without the need for memory data transfer between the host memory and the network card memory.

[0036] Furthermore, cache coherence processing can be performed on the network card processor cache and the processor cache based on the high-speed interconnect protocol. Specifically, the network card processor loads the network service data and the network service program from the network card memory to the network card processor cache based on the high-speed interconnect protocol, and performs network card service processing in the network card processor cache. Subsequently, after the network service data is updated, the network card processor can update the processor cache based on the high-speed interconnect protocol.

[0037] Based on this, the network card device accesses the network service data in the network card memory based on the high-speed interconnect protocol and performs network card service processing on the network service data, which can include: Step 31: The network card device loads the network service data from the network card memory to the network card processor cache based on the high-speed interconnect protocol.

[0038] Step 32: The processor performs network card service processing on the network service data in the network card processor cache, and updates the processor cache of the processor based on the high-speed interconnect protocol after the network service data is updated.

[0039] It should be noted that this embodiment does not limit how to update the processor cache. For example, when the cached data has a data status, the network service data in the processor cache can be marked as expired so that the processor can extract it again from the network card memory when processing the network service data next time. Of course, it is also possible to directly update the value of the network service data in the processor cache according to its value in the network card processor cache, which can be set according to actual application requirements.

[0040] It should also be noted that although steps S102 and S103 are introduced in sequence in this application, this does not mean that these two steps need to be executed in sequence. It is possible to execute S102 first and then S103, or execute S103 first and then S102, or execute S102 and S103 in parallel.

[0041] Furthermore, for ease of understanding, please refer to Figure 5 and Figure 6 , Figure 5 which is a schematic diagram of a software and hardware architecture provided by an embodiment of this application, Figure 6 and Figure 5 which is a schematic diagram of memory distribution provided by an embodiment of this application. This application can reconstruct the existing network computing acceleration system based on high-speed interconnection technology. In

[0042] In Figure 6 the host memory becomes a virtual box, that is, data such as application software, network protocol stack, and network card driver no longer exist in the host memory, but are moved to the network card memory through the high-speed interconnection protocol. However, these computing parts on the host side are still completed by the processor, but only do not exist in the host memory. The computing function on the right side of the host dotted line has not changed, but only the computing function is retained. The application software storage, protocol stack storage, and network card driver storage functions are added on the right side of the network card dotted line. The corresponding network computing offloading function will also be directly performed on the network card memory, which speeds up the coordination efficiency of the processor and the network card computing. This can reduce the copy between the host memory and the network card memory because all data exists in the network card memory. At the same time, by introducing the high-speed interconnection protocol, the cache coherence function can be realized, and for commonly used hot data, the performance will be greatly improved. When most accesses hit the cache, whether the cache is the host memory or the network card memory, the performance of reading the cache is the same, that is, the performance of the processor accessing the network card memory is approximately equal to accessing the host memory.

[0043] Based on the above embodiments, in the present application, an electronic device may include a processor and a network card device. The network card device has network card memory, and both the processor and the network card device access the network card memory based on a high-speed interconnection protocol, that is, the processor can directly access the network card memory of the network card device. Subsequently, the processor can set both network service data and network service programs in the network card memory, and can access the network service data and network service programs in the network card memory, and perform service processing on the network service data based on the network service program. The network card device accesses the same batch of network service data in the network card memory, and performs network card service processing and network transmission processing on the network service data. It can be seen that since both the processor and the network card device can process the same batch of network service data in the network card memory, frequent memory data transfer between the processor and the network card device can be avoided, thereby effectively improving the working efficiency between the processor and the network card device.

[0044] Based on the above embodiments, the following introduces a case where functions such as application software and application software uninstallation, operating system protocol stack and protocol stack uninstallation are combined. In one embodiment, performing service processing on network service data based on a network service program may include: S201. The processor obtains first application program data from the network card memory, and processes the first application program based on the application program to obtain second application program data.

[0045] S202. The processor obtains first data to be transmitted from the network card memory, and processes the first data to be transmitted based on the network protocol stack to obtain second data to be transmitted.

[0046] Performing network card service processing and network transmission processing on network service data may include: S301. The network card device obtains second application program data from the network card memory, and performs application processing on the second application program data to obtain first data to be transmitted.

[0047] S302. The network card device obtains second data to be transmitted from the network card memory, and performs communication calculation processing on the second data to be transmitted to obtain network data packets.

[0048] S303. The network card device performs network transmission processing on the network data packets.

[0049] It should be noted that the first application program data needs to be processed by the application program of the processor, the second application program data needs to be processed by the application of the network card device, and the second application program data is the intermediate processing result of the first application program data. The first data to be transmitted needs to be processed by the network protocol stack of the processor, the second data to be transmitted needs to be processed by the communication calculation of the network card device, and the second data to be transmitted is the intermediate processing result of the first data to be transmitted.

[0050] In this embodiment, since both the processor and the network card device can process data in the network card memory, the efficiency of data exchange between the two can be significantly improved. For example, when the processor processes the first application program data to obtain the second application program data, the network card device can directly obtain the second application program data and continue with the application processing, without the need for memory data migration during this period. Similarly, after the network card device processes and obtains the first data to be transmitted, the processor can directly obtain the first data to be transmitted from the network card memory and process the first data to be transmitted based on the network protocol stack to obtain the second data to be transmitted. The network card device can directly obtain the second data to be transmitted from the network card memory, perform communication calculation processing on the second data to be transmitted to obtain network data packets, and then perform network transmission processing on the network data packets. It can be seen that the processor and the network card device can perform efficient data processing in a relay form, thereby effectively improving the working efficiency between the processor and the network card device.

[0051] Based on the above embodiment, the following introduces the downlink process of sending a data packet from the processor through the network card device to an external device. Based on this, the method may further include: S401. The processor accesses the original service data and network service program in the network card memory based on the high-speed interconnect protocol, and performs service processing on the original service data based on the network service program to obtain the data to be sent.

[0052] In this embodiment, the process in which the processor accesses the network service data and network service program in the network card memory and performs service processing on the network service data based on the network service program may include step S401.

[0053] In addition, the original service data needs to go through application program processing and network protocol stack processing in sequence before the data to be sent can be obtained.

[0054] It should be noted that the original service data may be stored in the network card memory or migrated from the host memory to the network card memory. Considering that some application programs in the host side may be set in the host memory, and thus the original service data generated by these application programs may be stored in the host memory. Therefore, for the convenience of network service processing, the processor may migrate it from the host memory to the network card memory.

[0055] Based on this, before the processor accesses the original service data and network service program in the network card memory based on the high-speed interconnect protocol and performs service processing on the original service data based on the network service program to obtain the data to be sent, it further includes: Step 41: The processor migrates the original service data in the host memory to the network card memory based on the high-speed interconnect protocol.

[0056] Of course, the processor can also migrate the original service data in the host memory to the network card memory based on the memory direct access protocol.

[0057] S402. The network card device accesses the data to be sent in the network card memory based on the high-speed interconnection protocol, and performs network card service processing on the data to be sent to obtain the first data packet.

[0058] S403. The network card device sends the first data packet to an external device through the network.

[0059] In this embodiment, the process in which the network card device accesses the network service data in the network card memory and performs network card service processing and network transmission processing on the network service data may include steps S402 and S403. It can be seen that since both the processor and the network card device can directly access the network card memory, the processor and the network card device can perform efficient data processing in a relay form, thereby effectively improving the efficiency of downlink transmission.

[0060] Further, for ease of understanding the downlink transmission process, please refer to Figure 7 , Figure 7 , which is a schematic diagram of a downlink transmission process provided by an embodiment of the present application.

[0061] Based on the above embodiment, the uplink process of sending data from an external device to the processor through the network card device is introduced below. Based on this, the method may further include: S501. The network card device receives a second data packet sent by an external device.

[0062] S502. The network card device performs network card service processing on the second data packet to obtain the data to be received, and writes the data to be received into the network card memory based on the high-speed interconnection protocol.

[0063] In this embodiment, the steps in which the network card device accesses the network service data in the network card memory and performs network card service processing and network transmission processing on the network service data may include steps S501 and S502.

[0064] S503. The processor accesses the data to be received and the network service program in the network card memory based on the high-speed interconnection protocol, and performs service processing on the data to be received based on the network service program.

[0065] In this embodiment, the process in which the processor accesses the network service data and the network service program in the network card memory and performs service processing on the network service data based on the network service program may include S503. It can be seen that since both the processor and the network card device can directly access the network card memory, the processor and the network card device can perform efficient data processing in a relay form, thereby effectively improving the efficiency of uplink transmission.

[0066] Further, considering that some application programs in the host side may be set in the host memory, and these application programs need to further process the service processing results of the data to be received, the processor can migrate them from the network card memory to the host memory.

[0067] Based on this, after the processor accesses the data to be received and the network service program in the network card memory based on the high-speed interconnect protocol, and processes the data to be received based on the network service program, it may further include: Step 51: The processor migrates the service processing result corresponding to the data to be received in the network card memory to the host memory based on the high-speed interconnect protocol, so that the application program in the host memory can process the service processing result.

[0068] Further, for the convenience of understanding the downlink transmission process, please refer to Figure 8 , Figure 8 which is a schematic diagram of an uplink transmission process provided by an embodiment of the present application.

[0069] Based on the above embodiments, the method of setting the network service program in the network card memory will be introduced below. The processor sets both the network service data and the network service program in the network card memory, which may include: S601. When the processor executes the operating system initialization, it performs physical address registration on the host memory, and at the same time performs device scanning to initialize the network card device and performs physical address registration on the network card memory, so as to incorporate both the host memory and the network card memory into the operating system memory.

[0070] S602. The processor loads the network card driver program into the network card memory and initializes the network protocol stack in the network card memory.

[0071] In this embodiment, in order to implement setting the network protocol stack and the network card driver in the network card memory, the present application particularly adjusts the initialization process of the operating system. Please refer to Figure 9 , Figure 9 which is a schematic diagram of an operating system initialization process provided by an embodiment of the present application. Figure 9 The left side is the operating system startup process in the related art. First, the physical address of the host memory is registered, and the operating system manages the host memory. Then, two processes are parallel, initializing the network protocol stack and scanning the network card device and managing the network card. The operating system in the related art does not manage the network card memory, so the network protocol stack is initialized on the host memory. And Figure 9On the right side is the operating system startup process of this application. First, the operating system manages the host / network card memory, and the physical address registration of the host / network card memory is carried out in parallel. The network card memory space is also within the management scope of the operating system, and the network card device itself can directly access it. The operating system directly accesses the network card memory space through a high-speed interconnection protocol. The network protocol stack is initialized on the network card memory, that is, the network protocol stack directly runs on the network card memory, accelerating the performance of the network card in operating network data.

[0072] Furthermore, after the operating system startup is completed, when the processor starts an application, it can set the relevant data of the application in the network card memory. However, considering that the network card memory resources are limited, if all applications are set in the network card memory, it is easy to affect the operation of the network card. Therefore, this application can also set applications in the network card memory as needed according to the requirements of the applications. Specifically, the application can call the interface based on the high-speed interconnection protocol as needed to load the application and application data into the network card memory.

[0073] Based on this, the processor setting both network service data and network service programs in the network card memory can include: S603. When the processor executes the application initialization, it calls the interface based on the high-speed interconnection protocol to load the application and application data into the network card memory.

[0074] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method.

[0075] The embodiments of this application also provide a non-volatile computer-readable storage medium. A computer program is stored in the non-volatile computer-readable storage medium. Among them, the computer program is set to execute the steps in any one of the above data processing method embodiments when running.

[0076] In an exemplary embodiment, the above non-volatile computer-readable storage medium may include but is not limited to: USB flash drives, read-only memory (abbreviated as ROM), random access memory (abbreviated as RAM), mobile hard disks, magnetic disks, or optical discs and other various media that can store computer programs.

[0077] The embodiments of this application also provide a computer program product. The above computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps in any one of the above data processing method embodiments.

[0078] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium storing a computer program, where the computer program, when executed by a processor, implements the steps in any of the above data processing method embodiments.

[0079] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0080] The above has introduced in detail a data processing method, an electronic device, a program product, and a storage medium provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art in the technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.

Claims

1. A data processing method, characterized in that, Applied to an electronic device, the electronic device includes a processor and a network card device, the network card device has a network card memory, and both the processor and the network card device access the network card memory based on a high-speed interconnection protocol. The method includes: The processor sets both network service data and network service programs in the network card memory; The processor accesses the network service data and network service programs in the network card memory, and performs service processing on the network service data based on the network service programs; The network card device accesses the network service data in the network card memory, and performs network card service processing and network transmission processing on the network service data.

2. The data processing method according to claim 1, wherein The network service programs include application programs, network protocol stacks, and network card drivers.

3. The data processing method according to claim 2, characterized in that The processor sets both network service data and network service programs in the network card memory, including: When the processor executes the operating system initialization, it performs physical address registration on the host memory, simultaneously executes device scanning to initialize the network card device, and performs physical address registration on the network card memory to incorporate both the host memory and the network card memory into the operating system memory; The processor loads the network card driver into the network card memory and initializes the network protocol stack in the network card memory.

4. The data processing method according to claim 3, wherein The processor sets both network service data and network service programs in the network card memory, including: When the processor executes the application program initialization, it calls an interface based on the high-speed interconnection protocol to load the application program and application program data into the network card memory.

5. The data processing method according to claim 2, wherein The network card memory is divided into a user-mode memory area and a kernel-mode memory area. The application program is set in the user-mode memory area, and the network protocol stack and the network card driver are set in the kernel-mode memory area.

6. The data processing method according to claim 5, wherein It further includes: When the processor runs the application program, it calls the network protocol stack in the kernel-mode memory area through an operating system interface based on the high-speed interconnection protocol; When the processor runs the network protocol stack, it responds to the application program in the user-mode memory area through an operating system interface based on the high-speed interconnection protocol.

7. The data processing method according to claim 2, characterized in that, The network card service processing includes application processing and communication computing processing.

8. The data processing method according to claim 1, characterized in that, The processor accesses the network service data and network service programs in the network card memory, and performs service processing on the network service data based on the network service programs, including: The processor loads the network service data and the network service programs from the network card memory into the processor cache based on the high-speed interconnection protocol; The processor performs service processing on the network service data in the processor cache based on the network service program in the processor cache, and updates the network card processor cache of the network card device based on the high-speed interconnection protocol after the network service data is updated; The network card device accesses the network service data in the network card memory, and performs network card service processing and network transmission processing on the network service data, including: The network card device loads the network service data from the network card memory into the network card processor cache based on the high-speed interconnection protocol; The processor performs network card service processing on the network service data in the network card processor cache, and updates the processor cache of the processor based on the high-speed interconnect protocol after the network service data is updated.

9. The data processing method according to any one of claims 1 to 8, characterized in that, The processor accesses the network service data and network service program in the network card memory, and performs service processing on the network service data based on the network service program, including: The processor accesses the original service data and the network service program in the network card memory based on the high-speed interconnect protocol, and performs service processing on the original service data based on the network service program to obtain data to be sent; The network card device accesses the network service data in the network card memory, and performs network card service processing and network transmission processing on the network service data, including: The network card device accesses the data to be sent in the network card memory based on the high-speed interconnect protocol, and performs network card service processing on the data to be sent to obtain a first data packet; The network card device sends the first data packet to an external device through the network.

10. The data processing method according to claim 9, characterized in that Before the processor accesses the original service data and the network service program in the network card memory based on the high-speed interconnect protocol, and performs service processing on the original service data based on the network service program to obtain data to be sent, it further includes: The processor migrates the original service data in the host memory to the network card memory based on the high-speed interconnect protocol.

11. The data processing method according to claim 9, characterized in that, The network card device accesses the network service data in the network card memory, and performs network card service processing and network transmission processing on the network service data, including: The network card device receives a second data packet sent by an external device; The network card device performs network card service processing on the second data packet to obtain data to be received, and writes the data to be received into the network card memory based on the high-speed interconnect protocol; The processor accesses the network service data and network service program in the network card memory, and performs service processing on the network service data based on the network service program, including: The processor accesses the data to be received and the network service program in the network card memory based on the high-speed interconnect protocol, and performs service processing on the data to be received based on the network service program.

12. The data processing method according to claim 11, characterized in that After the processor accesses the data to be received and the network service program in the network card memory based on the high-speed interconnect protocol, and performs service processing on the data to be received based on the network service program, it further includes: The processor migrates the service processing result corresponding to the data to be received in the network card memory to the host memory based on the high-speed interconnect protocol, so that the application program in the host memory processes the service processing result.

13. An electronic device, characterized in that, It includes a processor and a network card device, the network card device has a network card memory, and both the processor and the network card device access the network card memory based on the high-speed interconnect protocol; The processor and the network card device are used to execute the data processing method according to any one of claims 1 to 12.

14. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instruction is executed by the processor, it implements the data processing method according to any one of claims 1 to 12.

15. A non-volatile computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the data processing method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Method and device for controlling shared memory

    CN102651690A

  • Data processing method, device and system and network card

    CN111614683A

  • Data processing method and device

    CN113296718A

  • Memory pool management method and device of network card equipment

    CN115756864A

  • Distributed storage system, data processing method, equipment and medium

    CN118484136A