Deployment method, data access method and board for data access module
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]有鉴于此,本申请实施例提供了一种数据访问模块的部署方法、数据访问方法及板卡,可以解决数据库一体机的数据读取速度受限的问题
[0031]本申请实施例的第六方面提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面中任一项所述数据访问模块的部署方法、所述数据访问方法。
Smart Images

Figure CN116048658B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to the deployment method of data access module, data access method and board. Background Technology
[0002] In existing integrated database computer servers, the computer server mostly accesses stored data in the storage server via Ethernet. Specifically, the computing server sends commands to the storage server via Ethernet, and the storage server responds to the commands; and the storage server retrieves data from a specified address and sends the data back to the computing server. Therefore, the data access speed is limited by Ethernet. Summary of the Invention
[0003] In view of this, embodiments of this application provide a deployment method, a data access method, and a board for a data access module, which can solve the problem of limited data reading speed of database all-in-one machines.
[0004] The first aspect of this application provides a method for deploying a data access module, including:
[0005] Configure the number of virtual modules using the configuration instructions of the first driver;
[0006] The configuration instructions of the first driver are invoked to configure the namespace of the specified virtual module, which is used to map the storage space of the external device.
[0007] In one possible implementation of the first aspect, after invoking the configuration instructions of the first driver to configure the namespace of the specified virtual module, the namespace being used to map the storage space of an external device, the method includes:
[0008] The virtual module is started by invoking the startup command of the second driver.
[0009] In one possible implementation of the first aspect, the virtual module includes at least two virtual modules; after starting the virtual module, the method includes:
[0010] The at least two virtual modules are started to communicate with each other via the startup command of the third driver.
[0011] A second aspect of this application provides a data access method, including:
[0012] Obtain the first data request instruction sent by the first terminal;
[0013] Based on the first data request instruction, a second data request instruction is sent from the first virtual module to the second virtual module;
[0014] Based on the second data request instruction, the stored data of the second terminal is obtained through the second virtual module.
[0015] In one possible implementation of the first aspect, sending a second data request instruction to a second virtual module via a first virtual module based on the first data request instruction includes:
[0016] Based on the first data request instruction, a third data request instruction is sent to the first virtual module through the switching chip;
[0017] Based on the third data request instruction, the second data request instruction is initiated from the first virtual module to the second virtual module.
[0018] In one possible implementation of the first aspect, obtaining the stored data of the second terminal through the second virtual module based on the second data request instruction includes:
[0019] Based on the second data request instruction, a fourth data request instruction is sent to the switching chip through the second virtual module;
[0020] Based on the fourth data request instruction, a fifth data request instruction is initiated to the corresponding second terminal according to the namespace of the second virtual module to obtain the stored data of the second terminal.
[0021] A third aspect of this application provides a circuit board, including:
[0022] A storage unit is used to establish at least two virtual modules, wherein the at least two virtual modules are capable of data interaction;
[0023] The switching unit is used to enable data interaction between the at least two virtual modules and at least two external devices.
[0024] In one possible implementation of the first aspect,
[0025] The storage unit includes at least one solid-state drive;
[0026] The solid-state drive is used to establish the at least two virtual modules;
[0027] The switching unit includes at least one switching chip;
[0028] The switching chip is used to connect the storage unit and the at least two external devices.
[0029] A fourth aspect of this application provides a terminal device, the terminal device including a memory and a processor, the memory storing a computer program executable on the processor, and the processor executing the computer program to implement the deployment method of the data access module as described in any of the first aspects above, and the steps of the data access method.
[0030] A fifth aspect of this application provides a computer-readable storage medium, comprising: storing a computer program, wherein when executed by a processor, the computer program implements a deployment method for a data access module as described in any of the first aspects above, and the steps of the data access method.
[0031] A sixth aspect of this application provides a computer program product that, when run on a terminal device, causes the terminal device to execute the deployment method of the data access module and the data access method described in any of the first aspects above.
[0032] The beneficial effects of this application embodiment compared with the prior art are as follows: The number of virtual modules is configured through the configuration instructions of the first driver; the configuration instructions of the first driver are invoked to configure the namespace of the specified virtual module, and the namespace is used to map the storage space of the external device; this method maps the storage space of the external device to the namespace of the virtual module, facilitating fast access to data stored in the external device. Furthermore, this data access method improves the data transmission rate between two terminal devices by enabling data interaction between two virtual modules; it has strong practicality and ease of use. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic diagram illustrating the implementation flow of the deployment method for the data access module provided in this application embodiment;
[0035] Figure 2 This is a schematic diagram illustrating the implementation flow of the data access method provided in the embodiments of this application;
[0036] Figure 3 This is a schematic diagram of the structure of the board provided in the embodiment of this application;
[0037] Figure 4 This is a schematic diagram of the structure of the board provided in the embodiment of this application;
[0038] Figure 5 This is a schematic diagram of the deployment device for the data access module provided in the embodiments of this application;
[0039] Figure 6 This is a schematic diagram of the structure of the data access device provided in the embodiments of this application;
[0040] Figure 7 This is a schematic diagram of the terminal device provided in the embodiments of this application. Detailed Implementation
[0041] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0042] The following is an explanation of the terms involved:
[0043] 1. Physical Function (PF): A key concept in SR-IOV, a PF is a physical function in PCIe. Each PF can be discovered and managed by the physical host. Furthermore, with the help of the PF driver on the physical host, all resources of the PF can be directly accessed, and all Virtual Functions (VFs) can be configured, such as setting the number of VFs and globally starting or stopping them.
[0044] 2. Virtual Function (VF): A function virtualized by a PF. One or more VFs share a PF, and its driver is installed on the virtual machine. Once a VF is assigned to a virtual machine, the virtual machine can initialize and configure the VF just like using a regular PCIe device. If the PF represents a physical network card, then the VF is a virtual network card that the virtual machine can see and use.
[0045] To illustrate the technical solution described in this application, specific embodiments are provided below.
[0046] Figure 1 A flowchart illustrating the deployment method of the data access module provided in this application embodiment is shown, and is described in detail below. The deployment method of the data access module may include:
[0047] Step S101: Configure the number of virtual modules using the configuration instructions of the first driver.
[0048] In one embodiment, prior to step S101, the virtual module is created on a register using a physical module. Exemplarily, the physical module supports Single Root I / O Virtualization (SR-IOV) network port functionality; the physical module manages and controls external devices. Exemplarily, the register can be located on a solid-state drive (SSD), and the physical module can be a hardware module on the SSD. Exemplarily, the physical module invokes a creation instruction from the physical module driver to create a virtual module in the memory space corresponding to the register. Specifically, the creation instruction from the physical module driver determines a first specified address; based on the first specified address, the virtual module is created in the memory space of the register. Further, the creation instruction from the physical module driver can determine a preset number of virtual modules; based on the first specified address and the preset number of virtual modules, the virtual module is created in the memory space of the register, and a second specified address is determined. Wherein, the first specified address is the starting storage address, and the second specified address is the ending storage address.
[0049] In one embodiment, prior to step S101, the virtual module is created on the flash memory using a physical module. The flash memory is mounted on a solid-state drive. The physical module invokes a creation instruction from its driver to create a virtual module in the memory space corresponding to the flash memory. Specifically, the creation instruction from the physical module driver determines a first specified address; based on this first specified address, the virtual module is created in the memory space of the flash memory.
[0050] In one embodiment, the first driver is a physical module driver, and more specifically, the physical module driver is a physical module driver program. The number of virtual modules is configured by the upper-layer application calling the configuration instructions of the first driver. Specifically, the upper-layer application calls the physical driver; the physical driver's configuration instructions configure the interface of the physical module, wherein the interface can be a single input / output virtualized network port. Further, the configuration parameters of the interface can be configured through the physical driver's configuration instructions. Specifically, the interface configuration parameters include the number of virtual modules, interface status information, and interface control information. Through the above steps, the number of virtual modules can be configured, facilitating subsequent access and processing of the virtual modules.
[0051] Step S102: Invoke the configuration instructions of the first driver to configure the namespace of the specified virtual module. The namespace is used to map the storage space of the external device.
[0052] In one embodiment, the first driver is a physical module driver, which invokes configuration instructions to configure the namespace of a specified virtual module. For example, the physical module is a hardware module on a solid-state drive.
[0053] For example, configuration instructions from the physical module driver are invoked to access the namespace of a specified virtual module based on specified information stored in the physical module; input / output guest fields are stored within the namespace, such that the storage space of the external device corresponding to the input / output guest field is mapped to the namespace. The specified information includes one or more of bus information, device information, function number, and routing identifier.
[0054] In the above steps, the namespace of the virtual module is configured and mapped to the storage space of the external device. This allows the virtual module to directly perform input and output, realize data sharing with the external device, and reduce transmission latency overhead.
[0055] In one embodiment, after invoking the configuration instructions of the first driver to configure the namespace of the specified virtual module, the namespace being used to map external devices, the method includes:
[0056] The virtual module is started by invoking the startup command of the second driver.
[0057] For example, the second driver is a virtual module driver, which can be a virtual module driver program. The physical module can be a hardware module on a solid-state drive (SSD), and the SSD also has a virtual module configuration block. The virtual module configuration block is used for channel communication between the physical module and the virtual module. An independent hardware vendor (IHV) can set one or more virtual module configuration blocks for the SSD. Each virtual module configuration block includes a defined format, length, and block identifier. Each virtual module configuration block has a unique block identifier so that the second driver can configure and access the virtual module configuration block at a specified address.
[0058] In one embodiment, before invoking the startup instruction of the second driver to start the virtual module, the method includes: invoking the access instruction of the second driver to access a virtual module configuration block at a specified address. The specified address may be a control (MAC) address. The specified virtual module is configured by accessing the virtual module configuration block at the specified address. A virtual port (VPort) is also configured by accessing the virtual module configuration block at the specified address.
[0059] In one embodiment, the virtual module includes at least two virtual modules; after starting the virtual module, the method includes:
[0060] The at least two virtual modules are started to communicate with each other via the startup command of the third driver.
[0061] For example, the third driver can be a control driver in a solid-state drive, and the control driver is a control driver program. In the upper-layer application, by calling the startup command of the third driver, the at least two virtual modules are controlled to perform data communication. Specifically, by calling the startup command of the third driver, a data communication channel is established between the at least two virtual modules; the storage space of the corresponding external device is obtained according to the namespace of one of the virtual modules; based on the storage space of the corresponding external device, data at a specified target address is obtained; and according to the data communication channel, the data at the specified target address is sent to another specified virtual module. This enables data communication between at least two virtual modules, facilitating data access operations.
[0062] For example, in the upper-layer application, the at least two virtual modules are controlled to communicate via data communication by invoking the startup command of the third driver. A first namespace is established between the at least two virtual modules. This first namespace is a shared namespace, meaning all virtual modules have permission to control and access the first namespace. For example, the first namespace can be stored in the flash memory of a solid-state drive. In the at least two virtual modules, the storage space of the external device mapped to the namespace of a specified virtual module, and the associated relationship corresponding to that storage space, are mapped to the first namespace. The associated relationship includes the storage space of the external device mapped to the namespace of the specified virtual module and the physical interface corresponding to that virtual module. Therefore, when one of the virtual modules performs data communication, it can directly access the first namespace; based on the associated relationship, it can obtain data from the storage space of the corresponding external device, thereby realizing data communication between the at least two virtual modules.
[0063] In steps S101 and S102 above, the method maps the storage space of the external device to the namespace of the virtual module, which facilitates fast access to the data stored in the external device. All data is transmitted locally without the need for data compression and decompression, which ensures data security and improves data transmission rate.
[0064] Figure 2 A flowchart illustrating the implementation of the data access method provided in this application is shown below, and is described in detail below:
[0065] A data access method, comprising:
[0066] Step S201: Obtain the first data request instruction sent by the first terminal.
[0067] In one embodiment, the first terminal is a computing server, wherein the computing server integrates a database. Exemplarily, a first data request instruction sent by the first terminal is obtained via a high-speed serial computer expansion bus. Specifically, the computer server sends the first data request instruction to the board; the board obtains the first data request instruction via the high-speed serial computer expansion bus. In the above steps, receiving the first data request instruction sent by the external first terminal facilitates subsequent processing after receiving the first data request instruction.
[0068] Step S202: Based on the first data request instruction, send a second data request instruction to the second virtual module through the first virtual module.
[0069] In one embodiment, the first virtual module is built on the solid-state drive (SSD) of the board. Exemplarily, the SSD is a non-volatile memory host controller interface solid-state drive (NVMe SSD). Specifically, after the board receives a first data request instruction, the first virtual module sends a second data request instruction to the second virtual module. The sending of the second data request instruction from the first virtual module to the second virtual module can be controlled by a control driver on the SSD.
[0070] In one embodiment, prior to step S202, the method includes: invoking the configuration instructions of the first driver to configure the namespace of the first virtual module, wherein the namespace is used to map the storage space of the first terminal. The storage space of the first terminal stores stored data. The step of configuring the namespace of the first virtual module is described in step S102 of the aforementioned deployment method for the data access module, and will not be repeated here.
[0071] Step S203: Based on the second data request instruction, obtain the stored data of the second terminal through the second virtual module.
[0072] In one embodiment, the second virtual module is built on the solid-state drive (SSD) of the board. Exemplarily, the SSD is a non-volatile memory host controller interface solid-state drive (NVMe SSD). Furthermore, both the first virtual module and the second virtual module are built on the same SSD of the same board.
[0073] In one embodiment, prior to step S203, the method includes: invoking the configuration instructions of the first driver to configure the namespace of the second virtual module, wherein the namespace is used to map the storage space of the second terminal. The storage space of the second terminal stores stored data. The step of configuring the namespace of the second virtual module is described in step S102 of the aforementioned deployment method for the data access module, and will not be repeated here.
[0074] In one embodiment, after step S203, the method further includes: feeding back the stored data of the second terminal to the first virtual module via the second virtual module; and the first virtual module returning the stored data of the second terminal to the first terminal. Specifically, the steps of the aforementioned data access module deployment method, specifically the embodiment of "starting the at least two virtual modules for data communication via the startup instruction of the third driver," can be referred to.
[0075] Specifically, the first namespace in the flash memory can be used to map the storage space of the first terminal (which maps the namespace of the first virtual module) and the associated relationships corresponding to the storage space of the first terminal to the first namespace; and the second namespace (which maps the namespace of the second virtual module) to the storage space of the second terminal and the associated relationships corresponding to the storage space of the second terminal to the first namespace. The associated relationships corresponding to the storage space of the first terminal include the storage space of the first terminal and the first physical interface corresponding to the first virtual module; the associated relationships corresponding to the storage space of the second terminal include the storage space of the second terminal and the second physical interface corresponding to the second virtual module. This allows for data exchange between the stored data in the storage space of the second terminal and the stored data in the storage space of the first terminal, thereby enabling data communication between the corresponding external devices (the first terminal and the second terminal).
[0076] In one embodiment, sending a third data request instruction to a second virtual module through a first virtual module based on the first data request instruction includes:
[0077] Based on the first data request instruction, a third data request instruction is sent to the first virtual module through the switching chip.
[0078] For example, a first data request instruction sent by a first terminal is obtained through a high-speed serial computer expansion bus; after receiving the first data request instruction sent by the first terminal, a third data request instruction is sent to the first virtual module through a switching chip. Specifically, the first data request instruction sent by the first terminal is received through the first interface of the switching chip; the third data request instruction is sent to the first virtual module through the switching chip. Through the above steps, the address conversion of the PCI address domain corresponding to the interface is realized through the switching chip, which facilitates data communication between different PCI domains and realizes data access interaction.
[0079] Based on the third data request instruction, the second data request instruction is initiated from the first virtual module to the second virtual module.
[0080] For example, prior to the above steps, the method includes: invoking the configuration instructions of the first driver to configure the namespace of the first virtual module, wherein the namespace is used to map the storage space of the first terminal. The storage space of the first terminal stores stored data. The step of configuring the namespace of the first virtual module is described in step S102 of the aforementioned deployment method for the data access module, and will not be repeated here.
[0081] In one embodiment, the first virtual module is built on the solid-state drive (SSD) of the board. Exemplarily, the SSD is a non-volatile memory host controller interface solid-state drive (NVMe SSD). Specifically, after the switching chip receives a third data request instruction, the first virtual module sends a second data request instruction to the second virtual module. This sending of the second data request instruction from the first virtual module to the second virtual module can be controlled by a control driver on the SSD.
[0082] In one embodiment, obtaining the stored data of the second terminal through the second virtual module based on the second data request instruction includes:
[0083] Based on the second data request instruction, a fourth data request instruction is sent to the switching chip through the second virtual module.
[0084] For example, after the second virtual module receives the second data request instruction, it sends a fourth data request instruction to the switching chip through the second virtual module.
[0085] In one embodiment, prior to the above steps, the method further includes: establishing data communication between the first virtual module and the second virtual module. Specifically, the steps of the aforementioned data access module deployment method, specifically "starting the at least two virtual modules for data communication via a startup instruction from a third driver," can be referred to.
[0086] Specifically, the first namespace in the flash memory can be used to map the storage space of the first terminal, which maps the namespace of the first virtual module to, and the associated relationships corresponding to the storage space of the first terminal, to the first namespace; and the storage space of the second terminal, which maps the namespace of the second virtual module to, and the associated relationships corresponding to the storage space of the second terminal, can be mapped to the first namespace. The associated relationships corresponding to the storage space of the first terminal include the storage space of the first terminal and the first switching chip interface corresponding to the first virtual module; the associated relationships corresponding to the storage space of the second terminal include the storage space of the second terminal and the second switching chip interface corresponding to the second virtual module.
[0087] Furthermore, in the above steps, a fourth data request command can be initiated to the second switching chip interface of the switching chip through the second virtual module. This facilitates data addressing through the second switching interface of the switching chip, enabling subsequent data access to the second terminal. Additionally, the switching chip enables address translation between the PCI address domains corresponding to the two switching chip interfaces, facilitating data communication between different PCI domains and enabling data access and interaction.
[0088] Based on the fourth data request instruction, a fifth data request instruction is initiated to the corresponding second terminal according to the namespace of the second virtual module to obtain the stored data of the second terminal.
[0089] For example, after receiving the fourth data request instruction, the second virtual module initiates a fifth data request instruction to the corresponding second terminal through the high-speed serial computer expansion bus according to the namespace of the second virtual module, and obtains the stored data of the second terminal.
[0090] In the above steps, through steps S201 to S203, the data access method uses two virtual modules to interact with each other, thereby improving the data transmission rate between the two terminal devices. During the data transmission process, all data is transmitted locally, ensuring data security. It has strong practicality and ease of use.
[0091] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0092] Figure 3 A schematic diagram of the board structure provided in an embodiment of this application is shown, and details are as follows:
[0093] A circuit board, comprising:
[0094] A storage unit is used to establish at least two virtual modules, wherein the at least two virtual modules are capable of data interaction;
[0095] The switching unit is used to enable the storage unit to interact with at least two external devices.
[0096] By setting up a storage unit and a switching unit on the board, the storage unit enables data interaction between virtual modules (i.e., the aforementioned data communication), and the switching unit enables data interaction between the storage unit and external devices. It can directly utilize the virtual modules of the storage unit to enable data interaction between external devices, featuring high bandwidth, low latency, and low power consumption, thereby improving the data transmission rate between external devices. With a simple structural configuration of the storage unit and switching unit, data transmission and interaction between external devices can be achieved, reducing production complexity and costs.
[0097] In one embodiment, the switching unit includes at least one switching chip. Exemplarily, the switching chip is a high-speed serial computer expansion bus (PCIe, PCI Express, Peripheral Component Interconnect Express) switching chip. The switching chip is connected to at least two external devices via the high-speed serial computer expansion bus. Exemplarily, the at least two external devices can be the aforementioned first terminal and second terminal; specifically, among the at least two external devices, at least one external device is a computing server, and at least one external device is a storage server. The storage server may be equipped with a non-volatile memory host controller interface (NVMe) hard drive.
[0098] Reference Figure 4As shown, exemplarily, the switching unit may include a switching chip, which is a PCIe switching chip. The switching chip provides at least two interfaces, which are respectively connected to a computer server and a storage server via a non-transparent bridging (NTB) and a high-speed serial computer expansion bus (PCIe, PCI Express). Therefore, the two interfaces of the switching chip are sequentially connected to the non-transparent bridging and the high-speed serial computer expansion bus. The switching chip and the non-transparent bridging enable address translation between the different PCI address domains of the two interfaces, thereby enabling data communication between two external devices belonging to different PCI domains and facilitating data access and interaction.
[0099] In one embodiment, the storage unit includes at least one solid-state drive (SSD). Exemplarily, the storage unit includes an SSD, wherein the SSD is used to establish a first virtual module and a second virtual module, and the first virtual module and the second virtual module are capable of data interaction. Exemplarily, the first virtual module may be VF0, and the second virtual module may be VF1.
[0100] For example, the solid-state drive is a non-volatile memory host controller interface solid-state drive (NVMe SSD), which can reduce data transmission latency, increase transmission bandwidth, reduce power consumption, and improve the efficiency of parallel data transmission.
[0101] Corresponding to the method in the above embodiments, Figure 6 A structural block diagram of a deployment apparatus for a data access module provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown. Figure 6 The deployment device for the data access module in the example can be the execution entity of the deployment method for the data access module provided in the foregoing embodiments.
[0102] Reference Figure 5 The deployment device 50 for the data access module includes:
[0103] Create module 51 to configure the number of virtual modules using the configuration instructions of the first driver;
[0104] Configuration module 52 is used to call the configuration instructions of the first driver to configure the namespace of the specified virtual module, wherein the namespace is used to map the storage space of the external device.
[0105] The process by which each module in the deployment device for the data access module provided in this application implements its respective function can be specifically referred to the foregoing. Figure 1 The description of the illustrated embodiment will not be repeated here.
[0106] Corresponding to the method in the above embodiments, Figure 6 A structural block diagram of a data access device provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown. Figure 7 The example data access device may be the execution subject of the data access method provided in the foregoing embodiments.
[0107] Reference Figure 6 The data access device 60 includes:
[0108] The first acquisition module 61 is used to acquire the first data request instruction sent by the first terminal;
[0109] Initiation module 62 is used to send a second data request instruction to the second virtual module through the first virtual module based on the first data request instruction;
[0110] The second acquisition module 63 is used to acquire the stored data of the second terminal through the second virtual module based on the second data request instruction.
[0111] The process by which each module in the data access device provided in this application implements its respective function can be specifically referred to the foregoing. Figure 2 The description of the illustrated embodiment will not be repeated here.
[0112] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0113] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0114] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0115] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. It should also be understood that although the terms "first," "second," etc., are used in the text to describe various elements in some embodiments of this application, these elements should not be limited by these terms. These terms are merely used to distinguish one element from another. For example, a first table may be named a second table, and similarly, a second table may be named a first table, without departing from the scope of the various described embodiments. Both the first table and the second table are tables, but they are not the same table.
[0116] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0117] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. For example... Figure 7 As shown, the terminal device 7 of this embodiment includes: at least one processor 70 ( Figure 7 Only one is shown in the image), memory 71, which stores a computer program 72 that can run on the processor 70. When the processor 70 executes the computer program 72, it implements the steps in the deployment method embodiments of the various data access modules described above, for example... Figure 1 The steps S101 to S102 shown are as follows: Figure 2 The steps S201 to S203 are shown. Alternatively, when the processor 70 executes the computer program 72, it implements the functions of each module / unit in the above-described device embodiments.
[0118] The terminal device 7 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will understand that... Figure 7This is merely an example of terminal device 7 and does not constitute a limitation on terminal device 7. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may also include input transmitting devices, network access devices, buses, etc.
[0119] The processor 70 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0120] In some embodiments, the memory 71 may be an internal storage unit of the terminal device 7, such as a hard disk or memory of the terminal device 7. The memory 71 may also be an external storage device of the terminal device 7, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device 7. Furthermore, the memory 71 may include both internal and external storage units of the terminal device 7. The memory 71 is used to store the operating system, applications, boot loader, data, and other programs, such as the program code of the computer program. The memory 71 can also be used to temporarily store data that has been sent or will be sent.
[0121] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0122] This application also provides a terminal device, which includes at least one memory, at least one processor, and a computer program stored in the at least one memory and executable on the at least one processor. When the processor executes the computer program, it causes the terminal device to implement the steps in any of the above method embodiments.
[0123] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0124] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0125] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0126] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0127] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0128] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0129] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for deploying a data access module and a method for accessing data, characterized in that, The application is to a board, the board comprising: a storage unit for establishing at least two virtual modules, and a switching unit for enabling data interaction between the at least two virtual modules and at least two external devices; the storage unit includes at least one solid-state drive (SSD); the SSD is used to establish the at least two virtual modules; the switching unit includes at least one switching chip, the switching chip being used to connect the storage unit and the at least two external devices; the deployment method and the data access method include: The number of virtual modules is configured by calling the configuration instructions of the first driver through the upper-layer application; the first driver is a physical module driver; the physical module is a hardware module on the solid-state drive. Configuring the namespace of the specified virtual module by invoking the configuration instructions of the first driver includes: invoking the configuration instructions of the physical module driver, accessing the namespace of the specified virtual module based on specified information stored in the physical module; storing input / output guest fields in the namespace, such that the storage space of the external device corresponding to the input / output guest field is mapped to the namespace, so as to directly execute input / output through the virtual module and realize data sharing of the external device; the external device includes a first terminal and a second terminal, the first terminal being a computing server and the second terminal being a storage server; The step of performing input / output through a virtual module to achieve data sharing with external devices includes: obtaining a first data request instruction sent by a first terminal; based on the first data request instruction, sending a second data request instruction to a second virtual module through the first virtual module; based on the second data request instruction, obtaining stored data of a second terminal through the second virtual module; feeding back the stored data of the second terminal to the first virtual module through the second virtual module; and the first virtual module returning the stored data of the second terminal to the first terminal.
2. The deployment method and data access method of the data access module as described in claim 1, characterized in that, After invoking the configuration instructions of the first driver to configure the namespace of the specified virtual module, wherein the namespace is used to map the storage space of the external device, the method includes: The virtual module is started by invoking the startup command of the second driver.
3. The deployment method and data access method of the data access module as described in claim 2, characterized in that, The virtual module includes at least two virtual modules; After the virtual module is started, the method includes: The at least two virtual modules are started to communicate with each other via the startup command of the third driver.
4. The deployment method and data access method of the data access module as described in claim 1, characterized in that, The step of sending a second data request instruction to a second virtual module through a first virtual module based on the first data request instruction includes: Based on the first data request instruction, a third data request instruction is sent to the first virtual module through the switching chip; Based on the third data request instruction, the second data request instruction is initiated from the first virtual module to the second virtual module.
5. The deployment method and data access method of the data access module as described in claim 1 or 4, characterized in that, The step of obtaining the stored data of the second terminal through the second virtual module based on the second data request instruction includes: Based on the second data request instruction, a fourth data request instruction is sent to the switching chip through the second virtual module; Based on the fourth data request instruction, a fifth data request instruction is initiated to the corresponding second terminal according to the namespace of the second virtual module to obtain the stored data of the second terminal.
6. A circuit board, characterized in that, The board is used to execute the deployment method and data access method of the data access module as described in any one of claims 1-5.
7. A terminal device, characterized in that, The terminal device includes the board as described in claim 6.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Data processing method, industrial control system, electronic equipment and storage medium
CN115174274A