Data access method and related equipment

By mapping physical addresses into virtual addresses in the Scale up domain, the problem of low data access efficiency is solved, and more efficient data transmission and access across processors is achieved, avoiding the risk of excessive data transmission load and accessing incorrect data.

CN120336245APending Publication Date: 2025-07-18HYGON INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510396861.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The data access efficiency of the Scale up domain is low, especially when data access is cross-processor, discrete allocation of physical addresses leads to a large data transmission load.

Method used

In the target processor, the physical address of the space to be accessed is mapped as a virtual address, and the discrete physical addresses are mapped to a continuous virtual address through the mapping relationship recorded in the page table, so as to enable access indicating the space to be accessed based on the virtual address.

Benefits of technology

Improve data access efficiency, avoid excessive data transmission load caused by discrete physical addresses, and prevent access to incorrect data or rewrite data that should not be rewritten through the page-absence mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336245A_ABST
    Figure CN120336245A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data access method and related equipment, in the data access method, an access request used for accessing a network address at least comprises target identification information of a target end processor and a target virtual address, corresponding to the target end processor, of a to-be-accessed space; the to-be-accessed space is a storage space configured to the target end processor; determining a physical address corresponding to the target virtual address based on the target virtual address in the network address; and based on the access request and the physical address, executing access to the to-be-accessed space. According to the data access method and the related equipment, the data access efficiency of the Scale up domain is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of computer technologies, and particularly to a data access method and related devices. Background Art

[0002] The Scale up strategy is a strategy for improving the overall performance of a computing system by increasing the performance of a single node in the computing system. This strategy mainly relies on adding hardware resources such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), memory, and hard disk to meet the growing data processing requirements. Among them, a computing device group formed based on the Scale up strategy can be called a Scale up domain in the interconnection network within the computing system.

[0003] However, the current data access efficiency of the Scale up domain needs to be improved. Summary of the Invention

[0004] In view of this, embodiments of the present application provide a data access method and related devices to improve the data access efficiency of the Scale up domain.

[0005] To achieve the above object, embodiments of the present application provide the following technical solutions.

[0006] In a first aspect, embodiments of the present application provide a data access method, the method including:

[0007] Obtaining an access request for accessing a network address; wherein, the network address at least includes target identification information of a target end processor and a target virtual address corresponding to the to-be-accessed space at the target end processor; the to-be-accessed space is a storage space configured to the target end processor;

[0008] Determining a physical address corresponding thereto based on the target virtual address in the network address;

[0009] Performing an access to the to-be-accessed space based on the access request and the physical address;

[0010] Feeding back an access result of the access request to a source end processor.

[0011] Optionally, before obtaining the access request for accessing the network address, the method further includes:

[0012] Allocating a target virtual address corresponding to the to-be-accessed space for the task process based on a space request of the task process;

[0013] Generate a network address corresponding to the target virtual address;

[0014] Send the network address to the source - end processor.

[0015] Optionally, the generating a network address corresponding to the target virtual address specifically includes: generating the network address based on the target virtual address, the target identification information corresponding to the target - end processor, and the process identification information corresponding to the target virtual address.

[0016] Optionally, the determining a physical address corresponding to the target virtual address in the network address includes:

[0017] Parse the access request to obtain the target virtual address in the network address;

[0018] Determine the physical address corresponding to the target virtual address based on the mapping relationship recorded in the page table.

[0019] Optionally, the network address further includes process identification information, and the process identification information is used to indicate the task process corresponding to the target virtual address;

[0020] After the step of parsing the access request to obtain the target virtual address in the network address, it further includes: parsing the network address to obtain the process identification information in the network address, and based on the process identification information, determining the page - table base address corresponding to the target virtual address in the target - end processor, and based on the page - table base address, determining the location of the page table.

[0021] Optionally, the determining a physical address corresponding to the target virtual address based on the mapping relationship recorded in the page table includes:

[0022] Based on the page - table base address, search for the page - table entry corresponding to the target virtual address in the page - table cache. If there is a page - table entry corresponding to the target virtual address, then based on the record in this page - table entry, determine the corresponding physical address;

[0023] If there is no page - table entry corresponding to the target virtual address, then based on the page - table base address, search for the page - table entry corresponding to the target virtual address in the page table in the memory, and determine the corresponding physical address.

[0024] In a second aspect, an embodiment of the present application provides a data access method, which is applied to a source - end processor and includes:

[0025] Obtain a network address for indicating the space to be accessed; wherein, the network address at least includes the target identification information of the target-end processor and the target virtual address corresponding to the space to be accessed in the target-end processor; the space to be accessed is a storage space configured to the target-end processor;

[0026] Send an access request for accessing the network address to the target-end processor, so that the target-end determines the corresponding physical address based on the target virtual address in the network address and executes the access to the space to be accessed based on the physical address;

[0027] Obtain the access result of the access request fed back by the target-end processor.

[0028] Optionally, before obtaining the network address for indicating the space to be accessed, it further includes:

[0029] Obtain the network address sent by the target-end processor;

[0030] Create a mapping relationship for the network address so that the network address is mapped to the source-end virtual address;

[0031] When the source-end processor accesses the space to be accessed, generate an access request for the space to be accessed based on the source-end virtual address.

[0032] Optionally, the network address further includes process identification information, and the process identification information is used to indicate the task process corresponding to the target virtual address.

[0033] In a third aspect, an embodiment of the present application provides a data access device configured in a target-end processor, including:

[0034] A target-end data receiving unit, configured to obtain an access request for accessing a network address; wherein, the network address at least includes the target identification information of the target-end processor and the target virtual address corresponding to the space to be accessed in the target-end processor; the space to be accessed is a storage space configured to the target-end processor;

[0035] An address translation unit, configured to determine the corresponding physical address based on the target virtual address in the network address;

[0036] An access unit, configured to execute the access to the space to be accessed based on the access request and the physical address;

[0037] A result feedback unit, configured to feedback the access result of the access request to the source-end processor.

[0038] In a fourth aspect, an embodiment of the present application provides a data access device configured in a source-end processor, including:

[0039] An address receiving unit, configured to obtain a network address for indicating a space to be accessed; wherein the network address includes at least target identification information of a target - end processor and a target virtual address corresponding to the space to be accessed in the target - end processor; the space to be accessed is a storage space configured for the target - end processor.

[0040] A source - end data sending unit, configured to send an access request for accessing the network address to the target - end processor, so that the target - end determines a corresponding physical address based on the target virtual address in the network address and performs an access to the space to be accessed based on the physical address.

[0041] A source - end data receiving unit, configured to obtain an access result of the access request fed back by the target - end processor.

[0042] In a fifth aspect, an embodiment of the present application provides an electronic device, including at least one memory and at least one processor. The memory stores one or more computer - executable instructions, and the processor invokes the one or more computer - executable instructions to execute the data access method as described in the first aspect above, or execute the data access method as described in the second aspect above.

[0043] In a sixth aspect, an embodiment of the present application provides a storage medium. The storage medium stores one or more computer - executable instructions, and when the one or more computer - executable instructions are executed, the data access method as described in the first aspect above is implemented, or the data access method as described in the second aspect above is implemented.

[0044] In a seventh aspect, an embodiment of the present application provides a computer program product, including one or more computer - executable instructions. When the one or more computer - executable instructions are executed, the data access method as described in the first aspect above is implemented, or the data access method as described in the second aspect above is implemented.

[0045] An embodiment of the present application provides a data access method and related devices. In the data access method, an access request for accessing a network address includes at least target identification information of a target - end processor and a target virtual address corresponding to the space to be accessed in the target - end processor; the space to be accessed is a storage space configured for the target - end processor; thus, a corresponding physical address can be determined based on the target virtual address in the network address; and then, an access to the space to be accessed is performed based on the access request and the physical address.

[0046] The embodiment of the present application provides a data access solution. In the target - end processor, the physical address of the space to be accessed is mapped to a virtual address, that is, the target virtual address. When the physical addresses corresponding to the space to be accessed are in a discrete state, the discrete physical addresses can also be mapped to continuous virtual addresses based on the corresponding mapping relationship. Furthermore, it is possible to indicate the space to be accessed by an access request based on a virtual address, avoiding the problem of a large data - transmission load caused by the fact that the space to be accessed by an access request may correspond to multiple discrete physical addresses, thereby improving the data - access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on the provided drawings.

[0048] Figure 1 It is a schematic diagram of an optional architecture of a computing system;

[0049] Figure 2 It is an optional example diagram of the data - transmission process within the Scale - up domain;

[0050] Figure 3 It is an optional example diagram of the data - transmission process within the Scale - up domain provided by the embodiment of the present application;

[0051] Figure 4 It is an optional flowchart of the data - access method provided by the embodiment of the present application;

[0052] Figure 5 It is an optional flowchart of step S120 in the embodiment of the present application;

[0053] Figure 6 It is another optional flowchart of the data - access method provided by the embodiment of the present application;

[0054] Figure 7 It is yet another optional flowchart of the data - access method provided by the embodiment of the present application;

[0055] Figure 8 It is an optional block diagram of a data - access device provided by the embodiment of the present application;

[0056] Figure 9 It is an optional block diagram of another data - access device provided by the embodiment of the present application;

[0057] Figure 10An optional block diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners

[0058] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with 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. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0059] In an optional example, referring to Figure 1 An optional architecture schematic diagram of a computing system shown. The computing system is a distributed system, including multiple nodes coupled based on the Scale out (horizontal expansion) strategy, and the nodes are coupled based on a Scale out Switch. Among them, the nodes in this architecture are Scale up domains. In the Scaleup domain, multiple processors may be included. The processor may be a CPU, a GPU, etc. Different processors are configured with corresponding memories to provide storage space for the processors, and the multiple processors are coupled based on a Scale up Switch.

[0060] Among them, in the Scale up domain, cross-processor data access is usually involved. For example, when using multiple processors to parallel process a computing task, a computing task can be decomposed into multiple subtasks, and the multiple subtasks are assigned to different processors, so as to realize multi-process parallel processing of the computing task. In this scenario, when a processor executes a subtask, it may be necessary to read the task data in the memory of other processors, or write the task data into the memory of other processors to provide a data basis for the subtasks executed by other processors. At this time, data access between processors needs to be realized.

[0061] In the data access process of the Scale up domain, it can be implemented based on the physical address of the space to be accessed at the accessed end. Specifically, referring to Figure 2An optional example diagram showing the data transfer process within the Scale up domain. Taking the source - side processor as the accessing party and the target - side processor as the accessed party as an example, the source - side processor can obtain the network address NA_D (shown as a dotted line in the figure). This network address can include the physical address PA_D of the storage space to be accessed in the target - side processor's memory (i.e., the storage space to be accessed configured in the target - side processor's memory), and the identification information of the target - side processor. In the source - side processor, the processor core (CORE) can perform corresponding processing based on the mapping of this network address NA_D to the source - side virtual address VA_NA_D in the source - side processor. When the processor core (CORE) of the source - side processor accesses the storage space to be accessed of the target - side processor, it can translate the source - side virtual address VA_NA_D into the network address NA_D based on the MMU (Memory Management Unit), and use the Scale - up switch to determine the physical address PA_D and identification information in the network address (where Link TX and Link RX in the figure are the data - sending unit and data - receiving unit in the source - side processor and the target - side processor respectively). Thus, it determines the target - side processor based on the identification information, sends the physical address PA_D to the target - side processor, and then performs the corresponding access based on this physical address PA_D.

[0062] However, the inventors believe that the data access efficiency of this process of directly accessing based on the physical address of the storage space to be accessed of the target - side processor is not high.

[0063] After analysis, the inventors believe that to ensure the utilization efficiency of memory, physical memory is usually allocated discretely, so that the corresponding physical addresses are usually also discrete. When the source - side processor accesses the storage space to be accessed for an access request, there are usually multiple physical addresses for the storage space to be accessed, and each physical address needs to be configured with the identification information of the corresponding target - side processor as the network address. Correspondingly, a large amount of data to be transmitted is presented by multiple network addresses during data transfer. Taking one network address as N bits and M network addresses to be transmitted as an example, the corresponding data to be transmitted is M * N bits. Considering the limited amount of data that can be transmitted at one time during data transfer (usually one network address is transmitted at a time), multiple data transfer processes need to be executed here to achieve the transmission of physical addresses, which in turn leads to a large data transfer load.

[0064] In view of this, embodiments of the present application provide a data access method and related devices. The data access method maps the physical address of the to-be-accessed space to a virtual address, that is, a target virtual address, in the target-end processor, so that when the physical address corresponding to the to-be-accessed space is in a discrete state, the discrete physical addresses can also be mapped to continuous virtual addresses based on the corresponding mapping relationship, and then a to-be-accessed space of an access request can be indicated based on a virtual address, avoiding the problem of large data transmission load caused by the to-be-accessed space of an access request possibly corresponding to multiple discrete physical addresses, thereby improving the data access efficiency.

[0065] It should be further noted that in the process of managing the storage space of the memory, the processor realizes the allocation and recycling of the storage space based on the mapping relationship between the virtual address and the physical address, that is, the allocation of the storage space corresponding to the physical address is realized by mapping the physical address to the virtual address, and the recycling of the storage space is realized by clearing the mapping relationship between the virtual address and the physical address (that is, the recycling of the physical address). Correspondingly, in the Scale up domain, there is a situation where the target-end processor recycles the physical address and does not notify the source end, and in the process of directly accessing based on the physical address of the to-be-accessed space of the target-end processor, this situation will cause the source end to access incorrect data or rewrite data that should not be rewritten.

[0066] In the embodiments of the present application, the source-end processor performs corresponding access based on the target virtual address corresponding to the to-be-accessed space in the network address at the target-end processor. In the access mechanism of the virtual address, even if the physical address corresponding to the target virtual address is recycled by the target-end processor, blank storage space can be allocated for the target virtual address based on the page fault mechanism, thereby avoiding the problem that the source-end processor accesses incorrect data or rewrites data that should not be rewritten.

[0067] Next, the technical solutions in the embodiments of the present application will be clearly and completely described 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.

[0068] Reference Figure 3 and Figure 4 , Figure 3 is an optional example diagram of the data transmission process within the Scale up domain provided by the embodiments of the present application, Figure 4 is an optional process schematic diagram of the data access method provided by the embodiments of the present application. As Figure 3 and Figure 4 shown, the data access method may include the following steps:

[0069] Step S100: The source-end processor obtains a network address NA_D for indicating the to-be-accessed space;

[0070] Among them, the network address NA_D at least includes the target identification information of the target end (i.e., the identification information DestinationID of the target end processor), and the target virtual address VA_D corresponding to the space to be accessed in the target end processor; the space to be accessed is the storage space configured to the target end processor.

[0071] The source end processor can be understood as the access party in the data access process of the Scale up domain, and is used to access the storage space based on the corresponding address information. It can be understood that the source end processor can be any processor in the Scale up domain. Among them, the access described in the embodiments of the present application can be the reading of data in the storage space or the writing of data to the storage space.

[0072] The space to be accessed is the storage space to be accessed, and this storage space can be the storage space configured by the processor, such as a memory, and this memory can be, for example, DDR (Double Data Rate Synchronous Dynamic Random Access Memory) or HBM (High Bandwidth Memory). It can be understood that there is a corresponding relationship between the storage space and the processor. In the embodiments of the present application, the storage space of the processor is used to indicate the storage space configured to this processor.

[0073] Among them, in the cross-processor access process based on the Scale up domain, the space to be accessed is the storage space of other processors that are not the source end processor, and the storage space of other processors that are not the source end processor is indicated based on the network address. Taking the target end processor as the accessed party in the data access process of the Scale up domain, the space to be accessed described in the embodiments of the present application is the storage space configured to the target end processor.

[0074] The network address is the address information generated by the target end processor for indicating the space to be accessed by the target end processor. In a specific implementation, the target identification information included in the network address is used to indicate the corresponding target end processor. It can be understood that in the Scale up domain, each processor can be configured with corresponding identification information, and using the target identification information as the identification information of the target end processor can reflect the pointing relationship to the target end processor.

[0075] In a further implementation, the network address further includes the target virtual address corresponding to the to-be-accessed space in the target-end processor, so that based on the mapping relationship of the target virtual address in the target-end processor, the corresponding physical address can be determined. It should be noted that the target virtual address is the virtual address in the target-end processor to distinguish it from the virtual addresses in other processors (such as the source-end processor). In an optional example, the number of bits of the target virtual address can be equal to the number of bits of the physical address, so as to minimize the impact on the original data access process.

[0076] It can be understood that based on the indication of the to-be-accessed space by the source-end processor using the target virtual address, when the physical address corresponding to the to-be-accessed space is in a discrete state, the discrete physical addresses can also be mapped to continuous virtual addresses based on the corresponding mapping relationship, and then the to-be-accessed space of an access request can be indicated based on a virtual address, avoiding the problem of large data transmission load caused by the to-be-accessed space of an access request possibly corresponding to multiple discrete physical addresses, thereby improving the data access efficiency.

[0077] At the same time, in the access mechanism of the virtual address, even if the physical address corresponding to the target virtual address is recycled by the target-end processor, blank storage space can be allocated for the target virtual address based on the page fault mechanism, so as to avoid the problem that the source-end processor accesses incorrect data or overwrites data that should not be overwritten.

[0078] The mapping relationship between the virtual address and the physical address can be created and stored by the target-end processor. In a specific implementation, the mapping relationship between the target virtual address and the physical address can be recorded and stored based on the page table in the target processor. Thus, when it is necessary to determine the physical address corresponding to the target virtual address, it can be searched based on the page table.

[0079] In a further optional example, the network address may further include process identification information such as ASID (Address Space Identifier), and the process identification information is used to indicate the task process corresponding to the target virtual address, so that the page table base address corresponding to the target virtual address in the target-end processor can be determined based on the process identification information.

[0080] Step S110: The source-end processor sends an access request for accessing the network address to the target-end processor;

[0081] After obtaining the network address of the to-be-accessed space, the access to the to-be-accessed space can be realized by sending an access request. In a specific implementation, the access request is sent to the target-end processor based on the vertical expansion switch in the Scale up domain.

[0082] Among them, the access request is a request sent by the source processor to access the to-be-accessed space. The access request may include the network address NA_D. In addition, the access request may further include attribute information, data information, etc. of the access. For example, the attribute information may be whether the specific operation of the access is reading or writing, the priority of the access. When the access is used to perform a write operation, the data information may be the corresponding data to be written, etc.

[0083] In a specific implementation, the vertical expansion switch in the Scale up domain can resolve the network address, determine the target identification information in the network address, and thus send the network address to the target processor based on the target identification information. Among them, in an example where the network address is sent to the target processor based on the access request, the vertical expansion switch in the Scale up domain can resolve the network address in the access request, thereby determining the target identification information in the network address, and sending the access request to the target processor corresponding to the target identification information.

[0084] Correspondingly, the target processor can obtain the access request.

[0085] In a specific example, the source processor can send the access request based on the data sending unit Link TX, and the target processor can receive the access request based on the data receiving unit Link RX.

[0086] Step S120: The target processor determines the corresponding physical address based on the target virtual address in the network address;

[0087] After obtaining the access request, the network address NA_D can be obtained, and then the addressing process of the physical address can be executed to determine the physical address PA_D corresponding to the target virtual address.

[0088] In a specific example, refer to Figure 5 , Figure 5 which is an optional process schematic diagram of step S120 of this embodiment of the present application. This step may include:

[0089] Step S121: Parse the access request to obtain the target virtual address in the network address;

[0090] It can be understood that the access request may include the network address, and the network address is address information generated by the target processor to indicate the to-be-accessed space of the target processor. Correspondingly, the target processor further parses the access request to obtain the target virtual address in the network address.

[0091] Wherein, when there is process identification information in the network address, this step may further parse the network address, obtain the process identification information in the network address, and further determine the page table base address corresponding to the target virtual address in the target end processor based on the process identification information, and then determine the position of the page table based on this page table base address to implement the query of the page table.

[0092] Step S122: Determine the physical address corresponding to the target virtual address based on the mapping relationship recorded in the page table;

[0093] Based on the mapping relationship between the target virtual address and the physical address created and stored by the target end processor, correspondingly, the target end processor can determine the physical address based on the page table used to record and store the mapping relationship between the target virtual address and the physical address.

[0094] It can be understood that when determining the page table base address of the target virtual address, the page table entry corresponding to the target virtual address can be first searched in the TLB (Translation Lookaside Buffer, also known as page table cache). If there is a page table entry corresponding to the target virtual address, the corresponding physical address is determined based on the record in this page table entry; if there is no page table entry corresponding to the target virtual address, the page table entry corresponding to the target virtual address is searched in the page table in the memory based on the page table base address to determine the corresponding physical address.

[0095] It can be understood that the page table cache is a cache used to accelerate the virtual address to physical address conversion process, which usually stores commonly used page table entries. Correspondingly, by first searching for the corresponding page table entry in the page table cache, it is expected to quickly determine the physical address corresponding to the target virtual address.

[0096] Step S130: The target end processor accesses the to-be-accessed space based on the physical address;

[0097] After determining the physical address PA_D, the access to the to-be-accessed space can be executed.

[0098] Wherein, in an alternative example, the access request may carry corresponding access information, such as access attribute information, data information, etc., so that the corresponding access can be executed based on the access information.

[0099] Step S140: The target end processor feeds back the access result of the access request to the source end processor;

[0100] After the corresponding access is completed, the target end processor can feed back the corresponding access result to the source end processor, so that the source end processor obtains the access result fed back by the target end processor.

[0101] In a specific example, in combination with Figure 3 as shown, the access result can be sent based on the data sending unit Link TX, and the source processor can receive the access result based on the data receiving unit Link RX.

[0102] In a further optional implementation, the embodiments of the present application further provide a creation process for network addresses. Specifically, referring to Figure 6 , Figure 6 which is another optional process schematic diagram of the data access method provided by the embodiments of the present application. Before executing step S100, it further includes:

[0103] Step S200: The target processor allocates a target virtual address corresponding to the to-be-accessed space for the task process based on the space request of the task process;

[0104] Among them, the task process can be understood as the process of the task executed by the target processor. When the task process has a storage space requirement, it can generate a space request to request the processor to allocate a corresponding storage space for it. Correspondingly, when the target processor receives the space request, it can allocate a storage space for the task process by allocating a target virtual address corresponding to the to-be-accessed space, so that the task process can use the corresponding storage space based on the target virtual address.

[0105] It should be noted that when the processor allocates a virtual address for a process, it does not need to allocate a physical address corresponding to the virtual address at the current moment. That is, it does not allocate a corresponding storage space for the process at the current moment. Instead, when the process accesses a certain virtual address, if the virtual address has not yet established a mapping relationship with the physical address (i.e., the storage space has not been allocated), the storage space is allocated for the virtual address in real time based on the page fault mechanism and the mapping relationship between the physical address of the storage space is established.

[0106] Step S210: The target processor generates a network address corresponding to the target virtual address;

[0107] It can be understood that in the case of cross-processor access, the source processor needs to perform corresponding access based on the network address of the to-be-accessed space to be accessed. Correspondingly, the target processor can generate a network address corresponding to the target virtual address.

[0108] In an alternative example, the network address may be generated based on the target virtual address and the target identification information corresponding to the target-end processor. In a further example, the process identification information corresponding to the target virtual address may also be reflected in the network address, so that the page table base address of the target virtual address can be indicated based on the process identification information. Correspondingly, the network address may be generated based on the target virtual address, the target identification information corresponding to the target-end processor, and the process identification information corresponding to the target virtual address.

[0109] Step S220: The target-end processor sends the network address to the source-end processor;

[0110] Combined with reference Figure 3 , after generating the network address NA_D, the target-end processor may send the network address NA_D to the source-end processor based on the process requirements.

[0111] In an alternative implementation, when multiple processors are processing a computing task in parallel, correspondingly, the configuration information of the task processes for executing subtasks may be interacted between the multiple processors. The configuration information may include, for example, the network address.

[0112] In a specific example, the target-end processor may send the network address to the source-end processor based on Ethernet or the communication buffer of the network.

[0113] In a further alternative implementation, the present application embodiment further provides a process for generating an access request of the source-end processor. Specifically, referring to Figure 7 , Figure 7 which is another alternative process schematic diagram of the data access method provided by the present application embodiment. After executing step S100 and before step S110, it further includes:

[0114] Step S300: The source-end processor creates a mapping relationship for the network address, so that the network address is mapped to the source-end virtual address;

[0115] After the source-end processor obtains the network address, it may allocate a source-end virtual address VA_NA_D for the network address and create a mapping relationship between the network address and the source-end virtual address, so that the source-end processor can point to the space to be accessed based on the source-end virtual address. Among them, the mapping relationship may be recorded as a page table entry in the page table of the source-end processor.

[0116] Among them, the source-end virtual address is the virtual address in the source-end processor to distinguish the virtual addresses in other processors (such as the source-end processor).

[0117] It can be understood that in a processor, the use and management of a storage space are usually implemented based on virtual addresses. Correspondingly, by mapping the network address to a source virtual address, the source processor can implement the use and management of the space to be accessed based on the source virtual address.

[0118] Among them, when accessing the space to be accessed, the source processor can execute step S310 to generate a corresponding access request based on the source virtual address. Specifically, step S310 is as follows:

[0119] Step S310: The source processor generates an access request corresponding to the space to be accessed based on the source virtual address;

[0120] In a specific implementation, with reference to Figure 3 , the source processor can determine the corresponding network address NA_D based on the source virtual address VA_NA_D, and then generate an access request corresponding to the network address, so as to execute the access to the space to be accessed based on the network address.

[0121] Specifically, the source processor can determine the corresponding physical address based on the page table. For example, when the source processor core needs to access the space to be accessed, it can use the MMU (Memory Management Unit) of the source processor to translate the source virtual address into a network address based on the page table, so as to determine the network address corresponding to the source virtual address. After determining the network address, an access request including the network address can be generated.

[0122] In an optional example, the access request may further include access attribute information, data information, etc. The attribute information may be, for example, whether the specific operation of the access is a read or a write, the priority of the access. When the access is used to perform a write operation, the data information may be, for example, the data corresponding to the write.

[0123] It can be understood that after generating the access request, the corresponding access process can be executed based on the access request.

[0124] The embodiment of the present application provides a data access scheme. The data access method maps the physical address of the space to be accessed to a virtual address, that is, a target virtual address, in the target processor, so that when the physical address corresponding to the space to be accessed is in a discrete state, the discrete physical addresses can also be mapped to continuous virtual addresses based on the corresponding mapping relationship, and then an access request can be used to indicate the space to be accessed based on a virtual address, avoiding the problem of large data transmission load caused by the space to be accessed corresponding to multiple discrete physical addresses for an access request, thereby improving the data access efficiency.

[0125] Moreover, in the embodiments of the present application, the source - side processor performs corresponding accesses at the target virtual address of the target - side processor corresponding to the to - be - accessed space in the network address. In the access mechanism of virtual addresses, even if the physical address corresponding to the target virtual address is reclaimed by the target - side processor, blank storage space can be allocated for the target virtual address based on the page - fault mechanism, thereby avoiding problems such as accessing incorrect data or overwriting data that should not be overwritten when the source - side processor directly accesses based on the physical address.

[0126] In a further example, the embodiments of the present application also provide a data access device. The data access device can be understood as a software module configured to execute the data access method on the target - side processor side in the embodiments of the present application, or can be understood as a hardware logic configured to execute the data access method in the embodiments of the present application. The data access loading is configured on the target - side processor to implement the corresponding data access process. In an optional example, referring to Figure 8 , Figure 8 is an optional block diagram of a data access device provided by the embodiments of the present application. The data access device may include:

[0127] A target - side data receiving unit 400, configured to obtain an access request for accessing a network address; wherein, the network address at least includes the target identification information of the target - side processor and the target virtual address corresponding to the to - be - accessed space in the target - side processor; the to - be - accessed space is the storage space configured for the target - side processor;

[0128] An address translation unit 410, configured to determine the physical address corresponding to the target virtual address based on the target virtual address in the network address;

[0129] An access unit 420, configured to perform an access to the to - be - accessed space based on the access request and the physical address;

[0130] A result feedback unit 430, configured to feedback the access result of the access request to the source - side processor.

[0131] In an optional example, the data access device further includes a network address generation module. The network address generation module is configured to: allocate a target virtual address corresponding to the to - be - accessed space for the task process based on the space request of the task process; generate a network address corresponding to the target virtual address; and send the network address to the source - side processor.

[0132] In an alternative example, the network address generation module is configured to generate a corresponding network address based on the target virtual address, specifically: generate the network address based on the target virtual address, the target identification information corresponding to the target end processor, and the process identification information corresponding to the target virtual address.

[0133] In an alternative example, the address translation unit 410 is configured to determine a corresponding physical address based on the target virtual address in the network address, including:

[0134] Parse the access request to obtain the target virtual address in the network address;

[0135] Determine the physical address corresponding to the target virtual address based on the mapping relationship recorded in the page table.

[0136] In an alternative example, the network address further includes process identification information, and the process identification information is used to indicate the task process corresponding to the target virtual address;

[0137] After the address translation unit 410 parses the access request to obtain the target virtual address in the network address, it further includes parsing the network address to obtain the process identification information in the network address, and determining the page table base address corresponding to the target virtual address in the target end processor based on the process identification information, and determining the location of the page table based on the page table base address.

[0138] In an alternative example, the address translation unit 410 is configured to determine a corresponding physical address based on the mapping relationship recorded in the page table, including:

[0139] Based on the page table base address, look up the page table entry corresponding to the target virtual address in the page table cache. If there is a page table entry corresponding to the target virtual address, determine the corresponding physical address based on the record in the page table entry;

[0140] If there is no page table entry corresponding to the target virtual address, look up the page table entry corresponding to the target virtual address in the page table in the memory based on the page table base address, and determine the corresponding physical address.

[0141] In a specific example, the target end data receiving unit can be understood as a data receiving unit located at the target end. In the address translation unit, physical address translation can be performed based on the page table entries stored in the page table cache or based on the page table entries stored in the memory. The result feedback unit can be a data sending unit located at the target end.

[0142] In a further example, an embodiment of the present application further provides a data access device, which can be understood as a software module configured to execute the data access method on the source - side processor side described in the embodiments of the present application, or can be understood as a hardware logic configured to execute the data access method described in the embodiments of the present application. The data access loading is configured on the source - side processor to implement the corresponding data access process. In an alternative example, referring to Figure 9 , Figure 9 is an alternative block diagram of another data access device provided by an embodiment of the present application. The data access device may include:

[0143] An address receiving unit 500, configured to obtain a network address for indicating a space to be accessed; wherein, the network address at least includes target identification information of a target - side processor and a target virtual address corresponding to the space to be accessed in the target - side processor; the space to be accessed is a storage space configured to the target - side processor;

[0144] A source - side data sending unit 510, configured to send an access request for accessing the network address to the target - side processor, so that the target - side determines a corresponding physical address based on the target virtual address in the network address and executes an access to the space to be accessed based on the physical address;

[0145] A source - side data receiving unit 520, configured to obtain an access result of the access request fed back by the target - side processor.

[0146] In an alternative example, the data access device further includes an access request generation module 530, configured to:

[0147] Obtain a network address sent by the target - side processor;

[0148] Create a mapping relationship for the network address, so that the network address is mapped to a source - side virtual address;

[0149] When the source - side processor accesses the space to be accessed, generate an access request for the space to be accessed based on the source - side virtual address.

[0150] In an alternative example, the network address further includes process identification information, and the process identification information is used to indicate a task process corresponding to the target virtual address.

[0151] In a specific example, the source - side data sending unit can be understood as a data sending unit located on the source - side, and the source - side data receiving unit can be understood as a data receiving unit located on the source - side.

[0152] An embodiment of the present application further provides an electronic device, which may include at least one memory and at least one processor. The memory stores one or more computer-executable instructions, and the processor invokes the one or more computer-executable instructions to execute the data access method as described above.

[0153] As an alternative implementation, referring to Figure 10 , Figure 10 is an optional block diagram of the electronic device provided by the embodiment of the present application. As shown in Figure 10 , the electronic device may include: at least one processor 10, at least one communication interface 20, at least one memory 30, and at least one communication bus 40.

[0154] In the embodiment of the present application, the number of the processor 10, the communication interface 20, the memory 30, and the communication bus 40 is at least one, and the processor 10, the communication interface 20, and the memory 30 complete communication with each other through the communication bus 40.

[0155] Optionally, the processor 10 may be a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), an NPU (Neural-network Processing Unit), an FPGA (Field Programmable Gate Array), a TPU (Tensor Processing Unit), an AI chip, a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiment of the present application, etc.

[0156] Optionally, the communication interface 20 may be an interface of a communication module for network communication.

[0157] The memory 30 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 30 stores one or more computer-executable instructions, and the processor 10 invokes the one or more computer-executable instructions to execute the data access method as described above.

[0158] An embodiment of the present application further provides a storage medium, which stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the data access method as described above is implemented.

[0159] The embodiment of the present application also provides a computer program product, which may include one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the data access method as described above is implemented.

[0160] Multiple embodiment solutions provided by the embodiments of the present application are described above. Each optional manner described in each embodiment solution can be combined and cross-referenced with each other without conflict, so as to extend a variety of possible embodiment solutions, all of which can be considered as the embodiment solutions disclosed and made public by the embodiments of the present application.

[0161] Although the embodiments of the present application are disclosed as above, the present application is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the protection scope of the present application should be subject to the scope defined by the claims.

Claims

1. A data access method, characterized in that, Applied to the target processor, including: Obtain an access request for accessing a network address; wherein, the network address at least includes the target identification information of the target processor, and the target virtual address corresponding to the space to be accessed in the target processor; the space to be accessed is the storage space configured for the target processor; Based on the target virtual address in the network address, determine the corresponding physical address; Based on the access request and the physical address, perform an access to the space to be accessed; Feed back the access result of the access request to the source processor.

2. The data access method according to claim 1, wherein Before obtaining the access request for accessing the network address, it further includes: Based on the space request of the task process, allocate a target virtual address corresponding to the space to be accessed for the task process; Based on the target virtual address, generate a corresponding network address; Send the network address to the source processor.

3. The data access method according to claim 2, wherein The generating the corresponding network address based on the target virtual address is specifically: generating the network address based on the target virtual address, the target identification information corresponding to the target processor, and the process identification information corresponding to the target virtual address.

4. The data access method according to claim 1, wherein The determining the corresponding physical address based on the target virtual address in the network address includes: Parse the access request to obtain the target virtual address in the network address; Based on the mapping relationship recorded in the page table, determine the physical address corresponding to the target virtual address.

5. The data access method according to claim 4, wherein The network address further includes process identification information, and the process identification information is used to indicate the task process corresponding to the target virtual address; After the step of parsing the access request to obtain the target virtual address in the network address, it further includes: parsing the network address to obtain the process identification information in the network address, and based on the process identification information, determine the page table base address corresponding to the target virtual address in the target processor, and based on the page table base address, determine the location of the page table.

6. The data access method according to claim 5, wherein The determining the physical address corresponding to the target virtual address based on the mapping relationship recorded in the page table includes: Based on the page table base address, look up the page table entry corresponding to the target virtual address in the page table cache. If there is a page table entry corresponding to the target virtual address, then based on the record in the page table entry, determine the corresponding physical address; If there is no page table entry corresponding to the target virtual address, then based on the page table base address, look up the page table entry corresponding to the target virtual address in the page table in the memory, and determine the corresponding physical address.

7. A data access method, characterized in that, Applied to the source processor, including: Obtain a network address for indicating the space to be accessed; wherein, the network address at least includes the target identification information of the target processor, and the target virtual address corresponding to the space to be accessed in the target processor; the space to be accessed is the storage space configured for the target processor; Send an access request for accessing the network address to the target processor, so that the target determines the corresponding physical address based on the target virtual address in the network address, and based on the physical address, perform an access to the space to be accessed; Obtain the access result of the access request fed back by the target-end processor.

8. The data access method according to claim 7, wherein Before obtaining the network address indicating the space to be accessed, it further includes: Obtain the network address sent by the target-end processor; Create a mapping relationship for the network address so that the network address is mapped to the source-end virtual address; When the source-end processor accesses the space to be accessed, generate an access request for the space to be accessed based on the source-end virtual address.

9. The data access method according to claim 7, wherein The network address further includes process identification information, and the process identification information is used to indicate the task process corresponding to the target virtual address.

10. A data access device, characterized in that, Configured in the target-end processor, it includes: Target-end data receiving unit, used to obtain an access request for accessing the network address; wherein, the network address at least includes the target identification information of the target-end processor and the target virtual address corresponding to the space to be accessed in the target-end processor; the space to be accessed is the storage space configured in the target-end processor; Address translation unit, used to determine the corresponding physical address based on the target virtual address in the network address; Access unit, used to perform the access to the space to be accessed based on the access request and the physical address; Result feedback unit, used to feedback the access result of the access request to the source-end processor.

11. A data access device, characterized in that, Configured in the source-end processor, it includes: Address receiving unit, used to obtain the network address indicating the space to be accessed; wherein, the network address at least includes the target identification information of the target-end processor and the target virtual address corresponding to the space to be accessed in the target-end processor; the space to be accessed is the storage space configured in the target-end processor; Source-end data sending unit, used to send an access request for accessing the network address to the target-end processor, so that the target-end determines the corresponding physical address based on the target virtual address in the network address and performs the access to the space to be accessed based on the physical address; Source-end data receiving unit, used to obtain the access result of the access request fed back by the target-end processor.

12. An electronic device, characterized in that, It includes at least one memory and at least one processor. The memory stores one or more computer-executable instructions, and the processor invokes the one or more computer-executable instructions to execute the data access method according to any one of claims 1 to 6, or execute the data access method according to any one of claims 7 to 9.

13. A storage medium, characterized in that, The storage medium stores one or more computer-executable instructions, and when the one or more computer-executable instructions are executed, it realizes the data access method according to any one of claims 1 to 6, or realizes the data access method according to any one of claims 7 to 9.

14. A computer program product, characterized in that, It includes one or more computer-executable instructions, and when the one or more computer-executable instructions are executed, it realizes the data access method according to any one of claims 1 to 6, or realizes the data access method according to any one of claims 7 to 9.