Flash proxy access method and system based on amp virtual ethernet

CN122601746APending Publication Date: 2026-08-18NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610946021.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0006]本发明的目的在于,提供一种基于AMP虚拟以太网的Flash代理访问方法及系统,该方法能够解决AMP架构下从处理器访问Flash存储设备时需要在从处理器侧重复实现Flash驱动、主从核直接访问易产生资源竞争,以及现有异构核间通信方案平台依赖强、移植复杂、资源利用率和扩展性不足的问题

Benefits of technology

本发明提供一种基于AMP虚拟以太网的Flash代理访问方法,首先在主处理器与从处理器之间建立AMP虚拟以太网通信链路,使从处理器能够基于网络报文形式向主处理器发起Flash访问请求;主处理器提供面向Flash存储设备的代理访问服务,并通过网络服务端点与Flash存储区域之间的访问映射关系确定目标Flash存储区域,再基于目标Flash存储区域的底层设备信息调用相适配的主处理器侧驱动接口执行Flash操作。由此,从处理器无需直接感知Flash存储设备的底层存储类型,也无需重复配置Flash驱动,即可通过统一的代理访问入口完成Flash访问,降低了从处理器侧的软件复杂度;同时,由主处理器统一执行Flash访问操作,避免主处理器和从处理器直接并发访问Flash控制器所导致的资源竞争和数据一致性风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601746A_ABST
    Figure CN122601746A_ABST
Patent Text Reader

Abstract

The application discloses a Flash proxy access method and system based on an AMP virtual Ethernet, and the method comprises the following steps: establishing an AMP virtual Ethernet communication link between a master processor and a slave processor; the master processor provides a proxy access service for a Flash storage device, configures a network service end point, and establishes an access mapping relationship between the network service end point and a Flash storage area; the slave processor sends a Flash access request to a corresponding network service end point through the AMP virtual Ethernet communication link; the master processor analyzes and validity checks the Flash access request, determines a target Flash storage area according to the network service end point and the access mapping relationship after the checking, calls a suitable master processor side driving interface to execute a Flash operation, and returns an execution result. The application can improve access consistency, reliability and cross-storage area adaptation capability in a multi-processor environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the cross-technical fields of embedded multi-core processors, asymmetric multiprocessing architectures, and Flash storage access control, and particularly relates to a Flash proxy access method and system based on AMP virtual Ethernet. Background Technology

[0002] In the field of embedded control, a single processor architecture struggles to simultaneously handle complex upper-layer business processing and low-level real-time control requirements. Therefore, asymmetric multiprocessing (AMP) architecture is increasingly being applied in scenarios such as industrial control, power supply protection, and vehicle control. In this architecture, the main processor typically runs a general-purpose operating system like Linux, handling non-real-time tasks such as network communication, file system management, and device driver management; while slave processors typically run bare-metal programs or real-time operating systems, handling tasks with high deterministic requirements, such as high-frequency sampling, real-time control, and signal processing.

[0003] However, in the AMP architecture, each processor operates in an independent environment, and the lack of a unified resource management mechanism between different systems makes collaborative access to shared peripherals difficult. This is especially true for Flash storage devices, whose read, write, and erase operations are typically time-consuming and involve mechanisms for address alignment, erase granularity, and exception recovery. If the master and slave processors access Flash storage devices concurrently, resource contention can easily occur, leading to data corruption or real-time task blocking. If a complete Flash driver is implemented independently on the slave processor side, the underlying Flash storage type and access rules need to be repeatedly adapted on the slave processor side, increasing software complexity and subsequent maintenance costs.

[0004] In the existing AMP architecture, the main methods for processors to access resources on the main processor side include OpenAMP communication, master-slave core partitioning, and shared memory. While OpenAMP enables data interaction between heterogeneous processors, it typically has a strong dependence on the underlying hardware platform, leading to complex portability and adaptation issues and high resource consumption. Master-slave core partitioning, although reducing access conflicts, requires statically allocating storage resources to different processors, which can easily result in storage resource fragmentation and reduced resource utilization. Shared memory typically requires designing proprietary communication protocols tailored to specific business needs; the protocol logic is strongly tied to the business scenario, lacking scalability and struggling to adapt to the unified access requirements of multiple slave processors and multiple Flash storage areas.

[0005] Therefore, how to provide a lightweight, reliable and scalable Flash access mechanism under the AMP architecture, enabling slave processors to access Flash storage devices without having to reimplement the underlying Flash driver, and reducing the risk of resource contention caused by direct access of Flash storage devices by master and slave processors, is an urgent technical problem to be solved. Summary of the Invention

[0006] The purpose of this invention is to provide a Flash proxy access method and system based on AMP virtual Ethernet. This method can solve the problems of repeated Flash driver implementation on the processor side when accessing Flash storage devices from the processor under the AMP architecture, resource contention caused by direct access between master and slave cores, strong platform dependence, complex porting, and insufficient resource utilization and scalability of existing heterogeneous core communication schemes.

[0007] To achieve the above objectives, the present invention employs the following technical solution: On one hand, the present invention provides a Flash proxy access method based on AMP virtual Ethernet, applied to a Flash proxy access system including a master processor and at least one slave processor, the method comprising: Establish an AMP virtual Ethernet communication link between the master processor and the slave processor; The main processor provides a proxy access service for Flash storage devices, configures a network service endpoint for the proxy access service, and establishes an access mapping relationship between the network service endpoint and the Flash storage area. The slave processor sends a Flash access request to the network service endpoint corresponding to the proxy access service provided by the master processor via the AMP virtual Ethernet communication link. The Flash access request includes a request identifier, operation type, target access address or target access offset, and access length. The main processor parses the Flash access request and performs a validity check on the Flash access request; If the Flash access request passes the validity check, the main processor determines the target Flash storage area based on the network service endpoint that received the Flash access request and the access mapping relationship, and calls the corresponding main processor-side driver interface based on the underlying device information of the target Flash storage area to execute the Flash operation corresponding to the Flash access request. The main processor returns the Flash operation result to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

[0008] Optionally, both the Flash access request and the Flash operation result are encapsulated into network packets and transmitted between the slave processor and the master processor via the AMP virtual Ethernet communication link; In the case where the operation type of the Flash access request is a write operation, the Flash access request also includes a data payload.

[0009] Optionally, when the Flash proxy access system includes multiple slave processors, the master processor is configured with multiple AMP virtual Ethernet interfaces, each AMP virtual Ethernet interface corresponding to the AMP virtual Ethernet communication link between the master processor and one slave processor. The main processor connects multiple AMP virtual Ethernet interfaces to the same internal network, enabling each slave processor to access the proxy access service via the corresponding AMP virtual Ethernet communication link.

[0010] Optionally, the main processor provides a proxy access service for the Flash storage device, configures a network service endpoint for the proxy access service, and establishes an access mapping relationship between the network service endpoint and the Flash storage area, including: The main processor configures different network service endpoints for different Flash storage areas; When the proxy access service is started, the main processor establishes an access mapping relationship between each network service endpoint and the corresponding Flash storage area according to the pre-configured binding relationship; The access mapping relationship includes at least one of the following: network service endpoint identifier, flash storage area identifier, storage area capacity, and access attribute.

[0011] Optionally, the main processor parses the Flash access request and performs a validity check on the Flash access request, including: The main processor parses the request identifier, operation type, target access address or target access offset, and access length in the Flash access request; The main processor authenticates the slave processor that sent the Flash access request based on the source information of the Flash access request; The main processor performs basic verification on the Flash access request. The basic verification includes at least one of the following: protocol identifier verification, request length verification, field integrity verification, operation type verification, and data payload length verification. If the slave processor fails authentication, or the Flash access request fails basic verification, the master processor generates a request exception response and returns it to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

[0012] Optionally, the main processor determines the target Flash storage area based on the network service endpoint that receives the Flash access request and the access mapping relationship, including: The main processor queries the access mapping relationship for the Flash storage area corresponding to the network service endpoint based on the network service endpoint that received the Flash access request. If a Flash storage region corresponding to the network service endpoint is found, the found Flash storage region is determined as the target Flash storage region; If no Flash storage region corresponding to the network service endpoint is found, the main processor generates a request exception response and returns it to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

[0013] Optionally, after determining the target Flash storage area and before invoking the main processor-side driver interface to perform Flash operations, the method further includes: The main processor determines the maximum transmission length based on the underlying device information of the target Flash storage area; When the access length corresponding to the Flash access request exceeds the maximum transmission length, the main processor divides the Flash access request into multiple fragmented access requests. The main processor executes multiple fragment access requests sequentially through the main processor-side driver interface, and generates the Flash operation result based on the execution result of each fragment access request.

[0014] Optionally, if the operation type of the Flash access request is a write operation or an erase operation, the request identifier in the Flash access request includes a unique request identifier; Before performing the Flash operation corresponding to the write or erase operation, the main processor queries whether there is a corresponding execution record based on the unique identifier of the request; If a corresponding execution record exists, and the Flash access request is consistent with the historical request content corresponding to the execution record, then the main processor will return the execution status or execution result in the execution record as the Flash operation result to the slave processor that sent the Flash access request, without repeating the corresponding Flash operation; If a corresponding execution record exists, but the Flash access request is inconsistent with the historical request content corresponding to the execution record, the main processor generates a request exception response and does not execute the corresponding Flash operation.

[0015] Optionally, the method further includes: The master processor binds the Flash access session to the AMP lifecycle state of the slave processor that sends the Flash access request. The Flash access session is used to identify the Flash access request initiated by the slave processor within a valid runtime cycle. After receiving the Flash access request, the main processor assigns the Flash access request to the Flash access session corresponding to the slave processor that sent the Flash access request. When the slave processor is detected to have stopped, restarted, or abnormally reset, the master processor will set the corresponding Flash access session to an invalid state. If the Flash access request is a write operation or an erase operation, and the Flash access request belongs to an invalid Flash access session, the main processor refuses to execute the corresponding Flash operation and returns a session invalidation result. After the slave processor re-establishes the AMP virtual Ethernet communication link, the master processor establishes a new Flash access session for the slave processor.

[0016] On the other hand, the present invention provides a Flash proxy access system based on AMP virtual Ethernet, including a main processor and at least one slave processor, wherein an AMP virtual Ethernet communication link is established between the main processor and the slave processor. The main processor is used to provide a proxy access service for Flash storage devices, configure a network service endpoint for the proxy access service, and establish an access mapping relationship between the network service endpoint and the Flash storage area. The slave processor is used to send a Flash access request to the network service endpoint corresponding to the proxy access service provided by the master processor via the AMP virtual Ethernet communication link. The Flash access request includes a request identifier, operation type, target access address or target access offset, and access length. The main processor is also used to parse the Flash access request and perform validity verification on the Flash access request; The main processor is also configured to, if the Flash access request passes the validity check, determine the target Flash storage area based on the network service endpoint that receives the Flash access request and the access mapping relationship, and call the appropriate main processor-side driver interface based on the underlying device information of the target Flash storage area to execute the Flash operation corresponding to the Flash access request; The main processor is also used to return the Flash operation result to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

[0017] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: This invention provides a Flash proxy access method based on AMP virtual Ethernet. First, an AMP virtual Ethernet communication link is established between the master processor and the slave processor, enabling the slave processor to initiate Flash access requests to the master processor based on network packets. The master processor provides a proxy access service for Flash storage devices and determines the target Flash storage area through the access mapping relationship between network service endpoints and Flash storage areas. Then, based on the underlying device information of the target Flash storage area, it calls the appropriate master processor-side driver interface to execute Flash operations. Thus, the slave processor does not need to directly perceive the underlying storage type of the Flash storage device, nor does it need to repeatedly configure the Flash driver; it can complete Flash access through a unified proxy access entry point, reducing the software complexity on the slave processor side. Simultaneously, the master processor uniformly executes Flash access operations, avoiding resource contention and data consistency risks caused by direct concurrent access to the Flash controller by the master and slave processors. Attached Figure Description

[0018] Figure 1 The diagram shown is a flowchart of a Flash proxy access method based on AMP virtual Ethernet in one embodiment of the present invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the following is combined with... Figure 1 Specific embodiments of the present invention will be described below. It should be understood that the following embodiments are for illustrative purposes only and do not constitute a limitation on the scope of protection of the present invention. Where there is no conflict, the technical features of the various embodiments of the present invention can be combined with each other.

[0020] Example 1

[0021] This invention describes a Flash proxy access method based on AMP virtual Ethernet, applied to a Flash proxy access system including a master processor and at least one slave processor. The master processor has direct drive access capability for the Flash storage device, while the slave processor does not directly drive the Flash storage device but performs Flash read, write, and erase operations through the proxy access capability provided by the master processor. The method includes steps S101 to S107, as follows: Figure 1 As shown; In this embodiment, step S101 establishes an AMP virtual Ethernet communication link between the master processor and the slave processor.

[0022] Specifically, the AMP virtual Ethernet communication link can be implemented based on one or more of shared memory, inter-core interrupts, and message notification mechanisms, enabling the master processor and slave processor to carry inter-core communication data in the form of network packets. Through this process, the slave processor can interact with the master processor via network access to exchange Flash access requests and Flash operation results without directly accessing the Flash controller on the master processor side.

[0023] Furthermore, in the case where the Flash proxy access system includes multiple slave processors, the master processor is configured with multiple AMP virtual Ethernet interfaces, each AMP virtual Ethernet interface corresponding to an AMP virtual Ethernet communication link between the master processor and a slave processor; the master processor connects multiple AMP virtual Ethernet interfaces to the same internal network, enabling each slave processor to access the proxy access service via the corresponding AMP virtual Ethernet communication link.

[0024] This embodiment encapsulates both Flash access requests and Flash operation results into network packets, which are then transmitted between the slave and master processors via the AMP virtual Ethernet communication link. This allows cross-processor Flash access to reuse the network packet transmission mechanism. For write operation requests, the Flash access request can also carry a data payload, enabling different operations such as read, write, and erase to be expressed through a unified packet structure, thereby improving the versatility and scalability of the proxy access protocol. When the Flash proxy access system includes multiple slave processors, the master processor is configured with multiple AMP virtual Ethernet interfaces, and these interfaces are connected to the same internal network. This allows each slave processor to access the same proxy access service via its corresponding AMP virtual Ethernet communication link. Therefore, without configuring a complete Flash access driver for each slave processor, the sharing of Flash proxy access capabilities on the master processor side by multiple slave processors can be achieved, improving the unified management capability of Flash storage resources in multi-core systems.

[0025] In this embodiment, step S102 involves the main processor providing a proxy access service for the Flash storage device, configuring a network service endpoint for the proxy access service, and establishing an access mapping relationship between the network service endpoint and the Flash storage area. Specifically, the main processor can configure different network service endpoints for different Flash storage areas. When the proxy access service starts, it establishes an access mapping relationship between each network service endpoint and the corresponding Flash storage area according to the pre-configured binding relationship. The access mapping relationship can include at least one of the following: network service endpoint identifier, Flash storage area identifier, storage area capacity, and access attributes. Through this mapping relationship, after receiving a Flash access request from the slave processor, the main processor can locate the corresponding Flash storage area based on the network service endpoint that received the request.

[0026] In one alternative implementation, different Flash storage regions can correspond to different types of underlying storage resources, such as raw Flash regions, logical block storage regions, or other Flash-based storage regions. The main processor manages these Flash storage regions uniformly through a proxy access service, so that the slave processors do not need to be aware of the differences in underlying device types and driver interfaces corresponding to different Flash storage regions.

[0027] In this embodiment, the main processor configures different network service endpoints for different Flash storage regions and establishes an access mapping relationship between the network service endpoints and Flash storage regions according to the pre-configured binding relationship when the proxy access service starts. Thus, the Flash storage region is abstracted as a service-oriented resource accessible through the network service endpoint. The slave processor only needs to send a Flash access request to the corresponding network service endpoint, and the main processor can locate the corresponding Flash storage region according to the mapping relationship, thereby improving the accuracy of Flash region access location and configuration flexibility.

[0028] In this embodiment, in step S103, the slave processor sends a Flash access request to the network service endpoint corresponding to the proxy access service provided by the master processor via the AMP virtual Ethernet communication link. This Flash access request can be encapsulated as a network packet and includes a request identifier, operation type, target access address or target access offset, and access length. The operation type can include at least one of read operation, write operation, erase operation, Flash parameter query, bad block query, and bad block marking. For a read operation, the request carries the target access address and read length; for a write operation, the request carries the target access address, write length, and data to be written; for an erase operation, the request carries the starting address of the area to be erased and the erase length; for a parameter query operation, the request carries the identifier of the target Flash storage area or the corresponding network service endpoint information. By encapsulating the Flash access request as a network packet, the slave processor does not need to be aware of the underlying Flash type, nor does it need to repeatedly implement the Flash driver, reducing the software complexity of the slave processor and avoiding resource contention caused by direct access of the master and slave cores to the Flash controller. When the operation type of the Flash access request is a write operation, the Flash access request can also include a data payload.

[0029] In this embodiment, in step S104, the main processor parses the Flash access request and performs a validity check on the Flash access request.

[0030] Specifically, the master processor can parse the request identifier, operation type, target access address or target access offset, and access length from the Flash access request, and authenticate the slave processor that sent the Flash access request based on the source information of the Flash access request. Simultaneously, the master processor can perform basic verification on the Flash access request, including at least one of the following: protocol identifier verification, request length verification, field integrity verification, operation type verification, and data payload length verification. If the slave processor fails authentication, or the Flash access request fails the basic verification, the master processor generates a request exception response and returns it to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link, without continuing to execute the Flash operation corresponding to the request.

[0031] Among them, the protocol identifier verification is used to identify request messages that conform to the Flash proxy access protocol, the operation type verification is used to determine whether the operation indicated by the request is a Flash operation supported by the proxy access service, and the data payload length verification is used to determine whether the data length declared in the request is consistent with the actual data length carried.

[0032] In this embodiment, the main processor parses the Flash access request before executing Flash operations and verifies the request source, protocol identifier, request length, field integrity, operation type, and data payload length. When the slave processor's identity fails verification or the Flash access request fails basic verification, the main processor generates a request exception response and returns it to the slave processor without executing the corresponding Flash operation. This prevents abnormal, illegal, or malformed requests from entering the underlying Flash driver execution phase, improving the security and controllability of cross-core Flash access.

[0033] In this embodiment, in step S105, if the Flash access request passes the validity check, the main processor determines the target Flash storage region based on the network service endpoint that received the Flash access request and the access mapping relationship. Specifically, the main processor queries the access mapping relationship for the Flash storage region corresponding to the network service endpoint that received the Flash access request; if a Flash storage region corresponding to the network service endpoint is found, the found Flash storage region is determined as the target Flash storage region; if no corresponding Flash storage region is found, the main processor generates a request exception response and returns it to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

[0034] Furthermore, after determining the target Flash storage area, and before calling the main processor-side driver interface to execute the Flash operation, the main processor can also determine whether the target access address or target access offset and access length in the Flash access request are within the valid range of the target Flash storage area. If the target access address or target access offset and access length are not within the valid range of the target Flash storage area, the main processor generates a request exception response and returns it to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link. Furthermore, when the Flash access request operation type is an erase operation, the main processor can also determine whether the target access address or target access offset and access length corresponding to the erase operation meet the erase granularity requirements of the target Flash storage area; if the erase granularity requirements are not met, the main processor generates a request exception response and does not call the main processor-side driver interface to execute the corresponding erase operation.

[0035] In this embodiment, the main processor queries the access mapping relationship for the corresponding Flash storage region based on the network service endpoint that receives the Flash access request, and determines the corresponding Flash storage region as the target Flash storage region when it is found. If the corresponding Flash storage region is not found, an exception response is returned. This avoids the processor request being incorrectly routed to an unbound or invalid Flash storage region, reducing the risk of data corruption caused by Flash access address mismatch.

[0036] In this embodiment, in step S106, the main processor calls the appropriate main processor-side driver interface based on the underlying device information of the target Flash storage area to execute the Flash operation corresponding to the Flash access request. Specifically, the main processor can convert the operation type, target access address or target access offset, access length, and data in the Flash access request into access parameters that the main processor-side driver interface can process, based on at least one of the device type, page size, erase block size, logical block size, and area capacity of the target Flash storage area. For read operations, the main processor calls the corresponding driver interface to read data from the target Flash storage area; for write operations, the main processor calls the corresponding driver interface to write the data payload to the target Flash storage area; for erase operations, the main processor calls the corresponding driver interface to perform erase processing on the corresponding range in the target Flash storage area. Thus, the slave processor can initiate access using a unified Flash access request format without needing to be aware of the underlying storage type of the target Flash storage area.

[0037] In this embodiment, in step S107, the main processor returns the Flash operation result to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link. Specifically, the Flash operation result can be encapsulated as a network message and includes at least one of the following: a request identifier corresponding to the Flash access request, an operation type, an operation status, and a response data length. For a read operation, the Flash operation result may also include data read from the target Flash storage area; for a write or erase operation, the Flash operation result may include the operation status or the length of data processed; for a parameter query operation, the Flash operation result may include Flash access parameters generated by the main processor.

[0038] Based on the completion of the Flash proxy access process described in steps S101 to S107, in order to improve the reliability of the Flash access process in the AMP scenario and reduce the impact of large data transmission, duplicate requests and abnormal processor reset on data consistency, this embodiment may also include the following:

[0039] In one optional implementation, after determining the target Flash storage region and before invoking the main processor-side driver interface to execute Flash operations, the main processor determines the maximum transmission length based on the underlying device information of the target Flash storage region. When the access length corresponding to a Flash access request exceeds the maximum transmission length, the main processor divides the Flash access request into multiple fragmented access requests and executes these fragmented access requests sequentially through the main processor-side driver interface. The Flash operation result is then generated based on the execution results of each fragmented access request. This fragmented access processing allows longer Flash access requests to be adapted to the single-processing capability of the underlying Flash device or driver interface, reducing the risk of execution failures caused by long message transmissions and large-scale read / write operations, and improving the stability of the long message Flash access process.

[0040] In one optional implementation, when the Flash access request is for a write or erase operation, the request identifier in the Flash access request includes a unique request identifier. Before executing the Flash operation corresponding to the write or erase operation, the main processor checks whether a corresponding execution record exists based on the unique request identifier. If a corresponding execution record exists, and the Flash access request matches the historical request content corresponding to the execution record, the main processor returns the execution status or result in the execution record as the Flash operation result to the slave processor that sent the Flash access request, without repeating the corresponding Flash operation. If a corresponding execution record exists, but the Flash access request does not match the historical request content corresponding to the execution record, the main processor generates a request exception response and does not execute the corresponding Flash operation. This duplicate request identification mechanism avoids the repeated execution of Flash write and erase operations due to request retransmission or communication anomalies, improving Flash data consistency.

[0041] In one optional implementation, the master processor binds a Flash access session to the AMP lifecycle state of the slave processor that sent the Flash access request. The Flash access session identifies a Flash access request initiated by the slave processor within a single valid runtime cycle. Upon receiving a Flash access request, the master processor assigns it to the Flash access session corresponding to the slave processor that sent the request. When the master processor detects that the slave processor has stopped, restarted, or undergone an abnormal reset, it sets the corresponding Flash access session to an invalid state. If the Flash access request's operation type is a write or erase operation, and the request belongs to an invalid Flash access session, the master processor refuses to execute the corresponding Flash operation and returns a session invalidation result. When the slave processor re-establishes the AMP virtual Ethernet communication link, the master processor establishes a new Flash access session for that slave processor. This session lifecycle binding mechanism prevents write or erase operations in the old session from continuing to be executed after an abnormal reset or restart of the slave processor.

[0042] Through the above implementation, this invention utilizes the AMP virtual Ethernet communication link to transmit Flash access requests initiated by the slave processor in the form of network packets to the network service endpoint corresponding to the proxy access service provided by the master processor. The master processor then completes the validity verification, target Flash storage area determination, underlying driver interface invocation, and Flash operation result return. Therefore, the slave processor does not need to directly configure the driver processing logic corresponding to the underlying Flash storage device; it can complete Flash storage area access through a unified proxy access method, reducing the software complexity on the slave processor side and the cross-processor adaptation cost. Simultaneously, by using fragmented access, duplicate request identification, and binding the Flash access session to the AMP lifecycle state, the reliability of the Flash read / write / erase process in the AMP scenario is improved.

[0043] Example 2

[0044] This invention provides a Flash proxy access system based on AMP virtual Ethernet, comprising a main processor and at least one slave processor, wherein an AMP virtual Ethernet communication link is established between the main processor and the slave processor. The main processor is used to provide proxy access services for Flash storage devices, configure network service endpoints for proxy access services, and establish access mapping relationships between network service endpoints and Flash storage areas. The processor sends a Flash access request to the network service endpoint corresponding to the proxy access service provided by the main processor via the AMP virtual Ethernet communication link. The Flash access request includes a request identifier, operation type, target access address or target access offset, and access length. The main processor is also used to parse Flash access requests and perform validity checks on them; The main processor is also used to determine the target Flash storage area based on the network service endpoint that received the Flash access request and the access mapping relationship when the Flash access request passes the validity check, and to call the corresponding main processor-side driver interface based on the underlying device information of the target Flash storage area to execute the Flash operation corresponding to the Flash access request. The main processor is also used to return the Flash operation results to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

[0045] In an optional implementation, the main processor and the slave processor are also used to perform the processing described in Embodiment 1 regarding network packet encapsulation, multi-slave processor access, network service endpoint mapping, authentication and basic verification, target Flash storage area query, fragmented access, duplicate request identification, and binding of Flash access sessions with AMP lifecycle states.

[0046] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A Flash proxy access method based on AMP virtual Ethernet, characterized in that, The method, applied to a Flash proxy access system including a master processor and at least one slave processor, comprises: Establish an AMP virtual Ethernet communication link between the master processor and the slave processor; The main processor provides a proxy access service for Flash storage devices, configures a network service endpoint for the proxy access service, and establishes an access mapping relationship between the network service endpoint and the Flash storage area. The slave processor sends a Flash access request to the network service endpoint corresponding to the proxy access service provided by the master processor via the AMP virtual Ethernet communication link. The Flash access request includes a request identifier, operation type, target access address or target access offset, and access length. The main processor parses the Flash access request and performs a validity check on the Flash access request; If the Flash access request passes the validity check, the main processor determines the target Flash storage area based on the network service endpoint that received the Flash access request and the access mapping relationship, and calls the corresponding main processor-side driver interface based on the underlying device information of the target Flash storage area to execute the Flash operation corresponding to the Flash access request. The main processor returns the Flash operation result to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

2. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, Both the Flash access request and the Flash operation result are encapsulated into network packets and transmitted between the slave processor and the master processor via the AMP virtual Ethernet communication link; In the case where the operation type of the Flash access request is a write operation, the Flash access request also includes a data payload.

3. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, In the case where the Flash proxy access system includes multiple slave processors, the master processor is configured with multiple AMP virtual Ethernet interfaces, and each AMP virtual Ethernet interface corresponds to the AMP virtual Ethernet communication link between the master processor and one slave processor. The main processor connects multiple AMP virtual Ethernet interfaces to the same internal network, enabling each slave processor to access the proxy access service via the corresponding AMP virtual Ethernet communication link.

4. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, The main processor provides a proxy access service for Flash storage devices, configures a network service endpoint for the proxy access service, and establishes an access mapping relationship between the network service endpoint and the Flash storage area, including: The main processor configures different network service endpoints for different Flash storage areas; When the proxy access service is started, the main processor establishes an access mapping relationship between each network service endpoint and the corresponding Flash storage area according to the pre-configured binding relationship; The access mapping relationship includes at least one of the following: network service endpoint identifier, flash storage area identifier, storage area capacity, and access attribute.

5. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, The main processor parses the Flash access request and performs a validity check on the Flash access request, including: The main processor parses the request identifier, operation type, target access address or target access offset, and access length in the Flash access request; The main processor authenticates the slave processor that sent the Flash access request based on the source information of the Flash access request; The main processor performs basic verification on the Flash access request. The basic verification includes at least one of the following: protocol identifier verification, request length verification, field integrity verification, operation type verification, and data payload length verification. If the slave processor fails authentication, or the Flash access request fails basic verification, the master processor generates a request exception response and returns it to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

6. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, The main processor determines the target Flash storage area based on the network server endpoint that receives the Flash access request and the access mapping relationship, including: The main processor queries the access mapping relationship for the Flash storage area corresponding to the network service endpoint based on the network service endpoint that received the Flash access request. If a Flash storage region corresponding to the network service endpoint is found, the found Flash storage region is determined as the target Flash storage region; If no Flash storage region corresponding to the network service endpoint is found, the main processor generates a request exception response and returns it to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.

7. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, After determining the target Flash storage region, and before invoking the main processor-side driver interface to perform Flash operations, the method further includes: The main processor determines the maximum transmission length based on the underlying device information of the target Flash storage area; When the access length corresponding to the Flash access request exceeds the maximum transmission length, the main processor divides the Flash access request into multiple fragmented access requests. The main processor executes multiple fragment access requests sequentially through the main processor-side driver interface, and generates the Flash operation result based on the execution result of each fragment access request.

8. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, When the operation type of the Flash access request is a write operation or an erase operation, the request identifier in the Flash access request includes a unique request identifier; Before performing the Flash operation corresponding to the write or erase operation, the main processor queries whether there is a corresponding execution record based on the unique identifier of the request; If a corresponding execution record exists, and the Flash access request is consistent with the historical request content corresponding to the execution record, then the main processor will return the execution status or execution result in the execution record as the Flash operation result to the slave processor that sent the Flash access request, without repeating the corresponding Flash operation; If a corresponding execution record exists, but the Flash access request is inconsistent with the historical request content corresponding to the execution record, the main processor generates a request exception response and does not execute the corresponding Flash operation.

9. The Flash proxy access method based on AMP virtual Ethernet according to claim 1, characterized in that, The method further includes: The master processor binds the Flash access session to the AMP lifecycle state of the slave processor that sends the Flash access request. The Flash access session is used to identify the Flash access request initiated by the slave processor within a valid runtime cycle. After receiving the Flash access request, the main processor assigns the Flash access request to the Flash access session corresponding to the slave processor that sent the Flash access request. When the slave processor is detected to have stopped, restarted, or abnormally reset, the master processor will set the corresponding Flash access session to an invalid state. If the Flash access request is a write operation or an erase operation, and the Flash access request belongs to an invalid Flash access session, the main processor refuses to execute the corresponding Flash operation and returns a session invalidation result. After the slave processor re-establishes the AMP virtual Ethernet communication link, the master processor establishes a new Flash access session for the slave processor.

10. A Flash proxy access system based on AMP virtual Ethernet, characterized in that, It includes a main processor and at least one slave processor, wherein an AMP virtual Ethernet communication link is established between the main processor and the slave processor; The main processor is used to provide a proxy access service for Flash storage devices, configure a network service endpoint for the proxy access service, and establish an access mapping relationship between the network service endpoint and the Flash storage area. The slave processor is used to send a Flash access request to the network service endpoint corresponding to the proxy access service provided by the master processor via the AMP virtual Ethernet communication link. The Flash access request includes a request identifier, operation type, target access address or target access offset, and access length. The main processor is also used to parse the Flash access request and perform validity verification on the Flash access request; The main processor is also configured to, if the Flash access request passes the validity check, determine the target Flash storage area based on the network service endpoint that receives the Flash access request and the access mapping relationship, and call the appropriate main processor-side driver interface based on the underlying device information of the target Flash storage area to execute the Flash operation corresponding to the Flash access request; The main processor is also used to return the Flash operation result to the slave processor that sent the Flash access request via the AMP virtual Ethernet communication link.