[go: up one dir, main page]

WO2023179509A1 - Data access apparatus and method, and readable medium and electronic device - Google Patents

Data access apparatus and method, and readable medium and electronic device Download PDF

Info

Publication number
WO2023179509A1
WO2023179509A1 PCT/CN2023/082366 CN2023082366W WO2023179509A1 WO 2023179509 A1 WO2023179509 A1 WO 2023179509A1 CN 2023082366 W CN2023082366 W CN 2023082366W WO 2023179509 A1 WO2023179509 A1 WO 2023179509A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
data access
socket interface
memory
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/082366
Other languages
French (fr)
Chinese (zh)
Inventor
谢永吉
张佳辰
柴稳
张宇
王剑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Youzhuju Network Technology Co Ltd
Original Assignee
Beijing Youzhuju Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Youzhuju Network Technology Co Ltd filed Critical Beijing Youzhuju Network Technology Co Ltd
Publication of WO2023179509A1 publication Critical patent/WO2023179509A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/545Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the field of computer technology, and specifically, to a data access device, a method, a readable medium, an electronic device, a computer program and a computer program product.
  • a computing node Under the architecture of computing and storage separation, when a computing node needs to access the services provided by distributed file storage, it usually needs to mount a Fuse (English: Filesystem in Userspace, Chinese: User Space File System) module to achieve access. Access requests to this distributed file storage will be intercepted by the kernel's Fuse module and forwarded to the user-mode Daemon (Chinese: process). Then, the user-mode Daemon sends the access request to the backend of the distributed file storage through the network to complete the data access. However, using this method, the file access request needs to be transferred from the user-space Daemon and then sent through the network. This process will involve multiple copies, system calls, context switches and other operations, which will affect the access to the data. Access performance.
  • Fuse English: Filesystem in Userspace, Chinese: User Space File System
  • the present disclosure provides a data access device.
  • the data access device includes a user space file system Fuse module, a plurality of first socket interfaces, and a memory.
  • the Fuse module passes a plurality of the first sockets.
  • the word interface communicates with the memory, and the Fuse module and the first socket interface are located in the kernel space;
  • the Fuse module is configured to receive a data access request for target data from a target application, and determine a target socket interface corresponding to the data access request from a plurality of the first socket interfaces;
  • the Fuse module is also used to obtain the target data from the memory using the target socket interface, and send the target data to the target application program to complete data access.
  • the present disclosure provides a data access method, applied to the device described in the first aspect, the method includes:
  • the Fuse module utilizes the target socket interface to obtain the target data from the memory, and sends the target data to the target application program to complete data access.
  • the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processing device, the steps of the method described in the second aspect of the present disclosure are implemented.
  • an electronic device including:
  • a storage device having at least one computer program stored thereon;
  • At least one processing device configured to execute the at least one computer program in the storage device to implement the steps of the method described in the second aspect of the present disclosure.
  • the present disclosure provides a computer program, the computer program comprising a program code executable by a processing device, and when the processing device executes the computer program, the steps of the method of the second aspect are implemented.
  • the present disclosure provides a computer program product.
  • the computer program product includes a computer program carried on a non-transitory computer-readable medium.
  • the computer program includes program code executable by a processing device. When the processing device executes The computer program implements the steps of the method of the second aspect.
  • Figure 1 is a block diagram of a data access device according to an exemplary embodiment
  • Figure 2 is a block diagram of another data access device according to an exemplary embodiment
  • Figure 3 is a flow chart of a data access method according to an exemplary embodiment
  • Figure 4 is a flow chart of step 201 according to the embodiment shown in Figure 3;
  • Figure 5 is a flow chart of yet another step 201 according to the embodiment shown in Figure 3;
  • FIG. 6 is a block diagram of an electronic device according to an exemplary embodiment.
  • the term “include” and its variations are open-ended, ie, “including but not limited to.”
  • the term “based on” means “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; and the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • FIG. 1 is a block diagram of a data access device according to an exemplary embodiment.
  • the data access device 100 includes a Fuse module 101, a plurality of first socket interfaces 102, and a memory 103.
  • the Fuse module 101 communicates with the memory 103 through a plurality of first socket interfaces 102.
  • the Fuse module 101 and the first socket interface 102 are located in kernel space.
  • the Fuse module 101 is configured to receive a data access request for target data from a target application program, and determine the target socket interface corresponding to the data access request from a plurality of first socket interfaces 102 .
  • a file presented on a computing node is usually in the form of shards, so that different file segments are stored on different storage backend nodes.
  • reading and writing a certain file segment can actually be sent and received through a specific Socket (Chinese: socket) interface. Therefore, you can use Fuse
  • the module senses the mapping relationship between file sections and Sockets, thereby bypassing the user-mode Daemon and directly sending file read and write requests to the storage back-end node through the Socket interface in the kernel to improve data access performance.
  • data is stored in the remote memory 103.
  • the target application needs to access the target data in the target file locally, it can first access the target data through the mount point of the target application (English). :Mount Point), the data access request for the target data is sent to the VFS (English: Virtual File System, Chinese: Virtual File System) in the kernel, and the VFS sends the data access request to the Fuse module 101.
  • the Fuse module 101 can determine the target socket interface from the plurality of first socket interfaces 102 in the kernel according to the data access request. For example, when the data access request is the file section where the target data is located in the target file, the corresponding relationship between the file section and the first socket interface 102 can be established in advance. After receiving the data access request, The Fuse module 101 can use the corresponding relationship to determine the target socket interface from the plurality of first socket interfaces 102 according to the location of the target data in the target file.
  • the Fuse module 101 is also used to obtain target data from the memory 103 using the target socket interface, and send the target data to the target application program to complete data access.
  • the Fuse module 101 can directly send the data access request to the remote storage 103 through the network using the target socket interface.
  • the memory 103 may be a remote memory (English: Remote Storage). After receiving the data access request, the memory 103 can obtain the stored target data according to the data access request, and return the target data to the Fuse module 101 through the target socket interface. Afterwards, the Fuse module 101 can send the received target data to the VFS, and the VFS returns the target data to the target application to complete the data access.
  • the Fuse module 101 directly sends the data access request to the memory 103 through the target socket interface.
  • a fast link consisting of the VFS, the Fuse module 101, the first socket interface 102 and the memory 103 is established. Path, this fast path does not need to be transferred by the user-mode Daemon, and can avoid multiple copies, system calls, context switches and other operations involved in the user-mode Daemon transfer process, thereby improving the access performance of data.
  • the data access device in the present disclosure includes a Fuse module, a plurality of first socket interfaces and a memory.
  • the Fuse module communicates with the memory through a plurality of first socket interfaces.
  • the Fuse module and the first socket The word interface is located in the kernel space.
  • the Fuse module is used to first receive the data access request for the target data from the target application, and then determine the target socket interface corresponding to the data access request from multiple first socket interfaces, and then use
  • the target socket interface obtains the target data from the memory and sends the target data to the target application to complete the data access.
  • This disclosure can use the Fuse module to obtain the target from the memory according to the data access request using the target socket interface.
  • the data does not need to be transferred in user space, and the data access request can be sent directly to the memory in the kernel space, which improves the access performance of the target data.
  • the data access request may include the file section where the target data is located in the target file to which the target application program wants to perform data access.
  • the Fuse module 101 is used to determine whether there is a target socket interface corresponding to the file section from a plurality of first socket interfaces 102 by using a preset correspondence relationship according to the file section, and determine whether the target socket interface exists.
  • the data access request is sent to the memory 103 using the target socket interface.
  • the default correspondence relationship is the correspondence relationship between the file section and the first socket interface.
  • the data access request is actually used to tell the memory 103 the location of the target data to be obtained by the target application program in the target file.
  • multiple fast paths can be established in the kernel in advance, and these established fast paths can be recorded by building preset correspondences.
  • the preset corresponding relationship may be a mapping table.
  • the mapping table may include a corresponding relationship between the file section and the first socket interface.
  • the Fuse module 101 can use the preset correspondence relationship to extract data from multiple files based on the file section.
  • a first socket interface 102 it is determined whether there is a target socket interface corresponding to the file section. If there is a target socket interface, the Fuse module 101 can use the target socket interface to send the data access request to the memory 103 according to the communication protocol corresponding to the target socket interface.
  • the communication protocol may be TCP/IP (English: Transmission Control Protocol/Internet Protocol, Chinese: Transmission Control Protocol/Internet Protocol) protocol.
  • the process by which the Fuse module 101 determines whether a target socket interface exists is actually the process by which the Fuse module 101 determines whether a fast path exists by querying a preset correspondence (such as a mapping table). If a target socket exists word interface, it means that there is a fast path, then the data access request for the file section capable of executing the fast path can be sent to the memory 103 through the target socket interface alone. That is to say, this disclosure actually generates a fast path for data access by the Fuse module 101 by establishing a preset correspondence in the kernel, and directly sends the data access request for the target file to the memory 103 through the socket interface in the kernel. , instead of forwarding it to the user-mode Daemon, which improves the access performance to the target data.
  • a preset correspondence such as a mapping table
  • FIG. 2 is a block diagram of another data access device according to an exemplary embodiment.
  • the data access device 100 also includes a Fuse Daemon module 104 and a second socket interface 105.
  • the Fuse Daemon module 104 communicates with the memory 103 through the second socket interface 105.
  • the Fuse Daemon module 104 and the second socket interface 105 communicate with each other.
  • Socket interface 105 resides in user space.
  • the Fuse module 101 is also used to send the data access request to the Fuse Daemon module 104 when it is determined that the target socket interface does not exist.
  • the Fuse Daemon module 104 is used to obtain target data from the memory 103 using the second socket interface 105 and send the target data to the target application.
  • the target socket interface if the target socket interface does not exist, it means that the file section included in the data access request is a file section that cannot execute the fast path. Then the data access request can be forwarded to the user mode according to the original processing method. Daemon for processing. That is to say, the Fuse module 101 can send the data access request to the Fuse Daemon module 104 for transfer when it is determined that the target socket interface does not exist. The Fuse Daemon module 104 can then use the second socket interface 105 corresponding to the data access request to send the data access request to the memory 103 through the TCP/IP protocol corresponding to the second socket interface 105.
  • the memory 103 can obtain the stored target data according to the data access request, and return the target data to the target through the second socket interface 105, the Fuse Daemon module 104, the Fuse module 101 and the VFS. application to complete data access.
  • the Fuse module 101 also needs to forward the data access request of the file section that can execute the fast path. Go to Fuse Daemon module 104 for processing.
  • the transfer of data access requests through the Fuse Daemon module 104 actually establishes a slow path composed of VFS, Fuse module 101, Fuse Daemon module 104, second socket interface 105 and memory 103 .
  • the present disclosure distinguishes between the socket interface of the fast path and the socket interface of the slow path, which facilitates compatibility with the original communication method and does not require changing the data format sent and received by the slow path to the Fuse request format.
  • the Fuse Daemon module 104 is also used to obtain the communication information corresponding to the data access request from the memory 103 after sending the target data to the target application, and construct a new first socket interface 102 based on the communication information, And register the new first socket interface 102 into the kernel space.
  • the communication information includes communication address and communication port.
  • establishing a corresponding relationship in the kernel is the core of completing data access, that is, a new first socket interface 102 needs to be established in the kernel.
  • the communication information corresponding to the data access request can be obtained from the memory 103, and then a new first socket interface 102 can be established in the kernel based on the communication information. That is, a new Socket connection is established.
  • the Fuse Daemon module 104 can then notify the memory 103 that these new connections are for the fast path. After the memory 103 agrees on the new connection for the fast path, the Fuse Daemon module 104 can register the new first socket interface 102 into kernel space.
  • the communication information may include a communication address and a communication port.
  • the communication address may be an IP address, for example, and the communication port may be a TCP port, for example.
  • multiple types of user-mode interfaces for establishing fast paths can be set in the Fuse module 101.
  • four user-mode interfaces can be provided in the Fuse module 101 to establish or adjust the fast path.
  • the following four user-mode interfaces can be included:
  • FUSE_ADD_FAST_PATH used to register a new fast path with the kernel.
  • the input is: the file handle (Chinese: file handle) corresponding to the opened target file, the starting position of the target file that needs to be mapped, the file length of the mapped target file, the Socket fd (English: file descriptor) array that needs to be mapped, and The array length of the Socket fd that needs to be mapped.
  • the output is: if successful, an id is returned to identify the fast path, and if it fails, an error code is returned. It should be noted that the fast path is established based on the file handle of the target file as the object, rather than the inode of the target file.
  • the kernel needs to send the file request to all corresponding Sockets.
  • FUSE_REMOVE_FAST_PATH used to delete the fast path registered by the kernel.
  • the input is: the id corresponding to the fast path.
  • the output is: 0 is returned if successful, and an error code is returned if failed. It should be noted that after the corresponding target file is closed, the corresponding fast path will be automatically deleted by the kernel.
  • FUSE_UPDATE_FAST_PATH is used to update the default correspondence established by the kernel. Its input is: the id corresponding to the fast path, the Socket fd array that needs to be mapped, and the array length of the Socket fd that needs to be mapped. The output is: 0 is returned if successful, and an error code is returned if failed.
  • FUSE_QUERY_FAST_PATH used to query the fast path registered by the kernel.
  • the input is: the file handle corresponding to the target file, the starting position of the target file that needs to be mapped, and the file length of the mapped target file.
  • the output is: if the corresponding fast path exists, the id corresponding to the fast path, the starting position of the actual mapped target file, the length of the actual mapped target file, and the Socket fd list are returned. If it does not exist, -1 is returned.
  • the data access device in the present disclosure includes a Fuse module, a plurality of first socket interfaces and a memory.
  • the Fuse module communicates with the memory through a plurality of first socket interfaces.
  • the Fuse module and the first socket The word interface is located in the kernel space.
  • the Fuse module is used to first receive the data access request for the target data from the target application, and then determine the target socket interface corresponding to the data access request from multiple first socket interfaces, and then use
  • the target socket interface obtains the target data from the memory and sends the target data to the target application to complete the data access.
  • This disclosure can use the Fuse module to obtain target data from the memory according to the data access request, and does not need to be transferred in the user space. It can directly send the data access request to the memory in the kernel space, improving the accuracy of the target. Data access performance.
  • Figure 3 is a flow chart of a data access method according to an exemplary embodiment. As shown in Figure 3, applied to any of the above data access devices, the method may include the following steps:
  • Step 201 Receive a data access request for target data from the target application program through the Fuse module, and determine the target socket interface corresponding to the data access request from a plurality of first socket interfaces.
  • Step 202 Use the Fuse module to obtain the target data from the memory using the target socket interface, and send the target data to the target application to complete the data access.
  • the data access request includes the file section where the target data is located in the target file to be accessed by the target application.
  • Step 201 can be implemented in the following manner:
  • the Fuse module uses the preset correspondence relationship according to the file section to determine whether there is a target socket interface corresponding to the file section from multiple first socket interfaces, and determines whether the target socket interface exists In this case, the target socket interface is used to send the data access request to the memory.
  • the default correspondence relationship is the correspondence relationship between the file section and the first socket interface.
  • the step "when it is determined that the target socket interface exists, send the data access request to the memory using the target socket interface” can be implemented in the following manner:
  • the data access request is sent to the memory using the target socket interface according to the communication protocol corresponding to the target socket interface.
  • FIG. 4 is a flow chart of another step 201 according to the embodiment shown in FIG. 3 .
  • step 201 may include the following steps:
  • Step 2011 When it is determined that the target socket interface does not exist through the Fuse module, the data access request is sent to the Fuse Daemon module.
  • Step 2012 use the second socket interface to obtain the target data from the memory through the Fuse Daemon module, and send the target data to the target application.
  • FIG. 5 is a flow chart of yet another step 201 according to the embodiment shown in FIG. 3 . As shown in Figure 5, step 201 may also include the following steps:
  • Step 2013 After sending the target data to the target application through the Fuse Daemon module, obtain the communication information corresponding to the data access request from the memory, build a new first socket interface based on the communication information, and add the new first socket interface to the target application.
  • the socket interface is registered in kernel space.
  • the communication information includes communication address and communication port.
  • the data access device in the present disclosure includes a Fuse module, a plurality of first socket interfaces and a memory.
  • the Fuse module communicates with the memory through a plurality of first socket interfaces.
  • the Fuse module and the first socket The word interface is located in the kernel space.
  • the Fuse module is used to first receive data access requests for target data from the target application, and then from multiple In the first socket interface, determine the target socket interface corresponding to the data access request, then use the target socket interface to obtain the target data from the memory, and send the target data to the target application to complete the data processing. access.
  • This disclosure can use the Fuse module to obtain target data from the memory according to the data access request, and does not need to be transferred in the user space. It can directly send the data access request to the memory in the kernel space, improving the accuracy of the target. Data access performance.
  • Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA, Personal Digital Assistant), tablet computers (PAD, tablet computers), portable multimedia players ( Mobile terminals such as PMP (Portable Multimedia Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital televisions (TV, television), desktop computers, etc.
  • PDA personal digital assistants
  • PAD tablet computers
  • PMP Portable Multimedia Player
  • vehicle-mounted terminals such as vehicle-mounted navigation terminals
  • fixed terminals such as digital televisions (TV, television), desktop computers, etc.
  • the electronic device shown in FIG. 6 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which may process data according to a program stored in a read-only memory (ROM, Read Only Memory) 602 or from a storage device 608
  • ROM read-only memory
  • RAM Random Access Memory
  • the processing device 601, ROM 602 and RAM 603 are connected to each other via a bus 604.
  • An input/output (I/O, Input/Output) interface 605 is also connected to bus 604.
  • input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) , an output device 607 such as a speaker, a vibrator, etc.; a storage device 608 including a magnetic tape, a hard disk, etc.; and a communication device 609.
  • Communication device 609 may allow electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data.
  • FIG. 6 illustrates electronic device 600 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via communication device 609, or from storage device 608, or from ROM 602.
  • the processing device 601 When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are performed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof.
  • Computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmable read-only memory (EPROM (Erasable Programmable Read-only Memory) or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM, Compact Disc Read-only Memory), optical storage device, magnetic storage device, or the above Any suitable combination.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wire, optical cable, radio frequency (RF, Radio Frequency), etc., or any suitable combination of the above.
  • the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communications e.g., communications network
  • Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any current network for knowledge or future research and development.
  • LANs local area networks
  • WANs wide area networks
  • the Internet e.g., the Internet
  • end-to-end networks e.g., ad hoc end-to-end networks
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.
  • the computer-readable medium carries one or more programs.
  • the electronic device When the one or more programs are executed by the electronic device, the electronic device: receives a data access request for target data from the target application program through the Fuse module, and Determine a target socket interface corresponding to the data access request from a plurality of first socket interfaces; use the target socket interface to obtain the target from the memory through the Fuse module data, and sends the target data to the target application to complete the data access.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++ also includes conventional procedural programming languages - such as "C" or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider). connected via the Internet).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as an Internet service provider
  • each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved.
  • each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.
  • the modules involved in the embodiments of the present disclosure can be implemented in software or hardware. Among them, the name of the module does not constitute a limitation on the module itself under certain circumstances.
  • the Fuse module can also be described as "a module that receives data access requests for target data.”
  • exemplary types of hardware logic components include: Field Programmable Gate Array (FPGA, Field Programmable Gate Array), Application Specific Integrated Circuit (ASIC, Application Specific Integrated Circuit), Application Specific Standard Product (ASSP, Application Specific Standard Product), System on Chip (SOC, System on Chop), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), etc.
  • FPGA Field Programmable Gate Array
  • ASIC Application Specific Integrated Circuit
  • ASSP Application Specific Standard Product
  • SOC System on Chip
  • CPLD Complex Programmable Logic Device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable Read memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable Read memory
  • CD-ROM portable compact disk read-only memory
  • magnetic storage device or any suitable combination of the above.
  • Example 1 provides a data access device.
  • the data access device includes a user space file system Fuse module, a plurality of first socket interfaces, and a memory.
  • the Fuse module passes A plurality of first socket interfaces communicate with the memory, and the Fuse module and the first socket interface are located in the kernel space; the Fuse module is used to receive data access to target data from a target application. request, and determine the target socket interface corresponding to the data access request from a plurality of the first socket interfaces; the Fuse module is also used to use the target socket interface to obtain the data from the memory Obtain the target data and send the target data to the target application to complete the data access.
  • Example 2 provides the apparatus of Example 1, the data access request includes a file section where the target data is located in a target file to be accessed by the target application. ;
  • the Fuse module is used to determine whether there is a target socket interface corresponding to the file section from a plurality of the first socket interfaces by using a preset correspondence relationship according to the file section, And when it is determined that the target socket interface exists, use the target socket interface to send the data access request to the memory; the preset corresponding relationship is the file section and the Correspondence between first socket interfaces.
  • Example 3 provides the device of Example 2.
  • the Fuse module is configured to use the target socket interface to fuse the target socket interface according to the communication protocol corresponding to the target socket interface.
  • the data access request is sent to the memory.
  • Example 4 provides the device of Example 2.
  • the data access device further includes a Fuse Daemon module and a second socket interface.
  • the Fuse Daemon module passes through the second socket.
  • the word interface communicates with the memory, and the Fuse Daemon module and the second socket interface are located in user space; the Fuse module is also used to, when it is determined that the target socket interface does not exist,
  • the data access request is sent to the Fuse Daemon module; the Fuse Daemon module is used to obtain the target data from the memory using the second socket interface, and send the target data to the target application.
  • Example 5 provides the apparatus described in Example 4, and the Fuse Daemon module is further configured to retrieve data from the memory after sending the target data to the target application. Obtain the communication information corresponding to the data access request, construct a new first socket interface based on the communication information, and register the new first socket interface in the kernel space; the communication The information includes communication addresses and communication ports.
  • Example 6 provides a data access method, applied to the device described in any one of Examples 1 to 5, the method includes: receiving a target application through the Fuse module program target a data access request for target data, and determine a target socket interface corresponding to the data access request from a plurality of first socket interfaces; and utilize the target socket interface through the Fuse module Obtain the target data from the memory and send the target data to the target application program to complete the data access.
  • Example 7 provides the method of Example 6, the data access request includes the file section where the target data is located in the target file to be accessed by the target application.
  • Determining the target socket interface corresponding to the data access request from the plurality of first socket interfaces includes: using the Fuse module according to the file section, using a preset corresponding relationship , from a plurality of the first socket interfaces, determine whether there is a target socket interface corresponding to the file section, and if it is determined that the target socket interface exists, use the target socket interface
  • the socket interface sends the data access request to the memory; the preset correspondence is the correspondence between the file section and the first socket interface.
  • Example 8 provides the method of Example 7, wherein when it is determined that the target socket interface exists, the data access request is processed using the target socket interface.
  • Sending to the memory includes: sending the data access request to the memory by using the target socket interface according to the communication protocol corresponding to the target socket interface through the Fuse module.
  • Example 9 provides the method of Example 7, the data access device further includes a Fuse Daemon module and a second socket interface, and the method further includes: using the Fuse module to When it is determined that the target socket interface does not exist, the data access request is sent to the Fuse Daemon module; the Fuse Daemon module uses the second socket interface to obtain the data from the memory. Describe the target data and send the target data to the target application.
  • Example 10 provides the method of Example 9, further comprising: using the Fuse Daemon module to obtain the target data from the memory after sending the target data to the target application.
  • the communication information corresponding to the data access request constructing a new first socket interface based on the communication information, and registering the new first socket interface into the kernel space; the communication information Including communication address and communication port.
  • Example 11 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the methods described in Examples 6 to 10 when executed by a processing device.
  • Example 12 provides an electronic device, including: a storage device having at least one computer program stored thereon; and at least one processing device configured to execute the program in the storage device.
  • a computer program to implement the steps of the methods described in Examples 6 to 10.
  • Example 13 provides a computer program.
  • the computer program includes program code executable by a processing device.
  • Examples 6 to 10 are implemented. The steps of the method.
  • Example 14 provides a computer program product, the computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program comprising a program executable by a processing device Code that implements the steps of the methods described in Examples 6 to 10 when the processing device executes the computer program.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure relates to a data access apparatus and method, and a readable medium and an electronic device. The data access apparatus comprises a Fuse module, a plurality of first socket interfaces and a memory. The Fuse module communicates with the memory by means of the plurality of first socket interfaces. The Fuse module and the first socket interfaces are located in a kernel space. The Fuse module is used for receiving a data access request, and determining, from among the plurality of first socket interfaces, a target socket interface corresponding to the data access request. The Fuse module is further used for acquiring target data from the memory using the target socket interface and sending the target data to a target application program. In the present disclosure, target data can be acquired from a memory by means of a Fuse module according to a data access request and by using a target socket interface, there is no need to perform transfer in a user space, and the data access request can be directly sent in a kernel space to the memory, thereby improving the access performance for the target data.

Description

数据访问装置、方法、可读介质和电子设备Data access apparatus, method, readable medium and electronic device

本公开要求于2022年3月25日提交中国专利局、申请号为202210307683.X、申请名称为“数据访问装置、方法、可读介质和电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure claims priority to the Chinese patent application filed with the China Patent Office on March 25, 2022, with application number 202210307683. incorporated by reference into this disclosure.

技术领域Technical field

本公开涉及计算机技术领域,具体地,涉及一种数据访问装置、方法、可读介质、电子设备、计算机程序以及计算机程序产品。The present disclosure relates to the field of computer technology, and specifically, to a data access device, a method, a readable medium, an electronic device, a computer program and a computer program product.

背景技术Background technique

在计算存储分离这种架构下,当计算节点需要访问分布式文件存储提供的服务时,通常需要挂载一个Fuse(英文:Filesystem in Userspace,中文:用户空间文件系统)模块来实现接入。对这个分布式文件存储的访问请求,会被内核的Fuse模块截获并转发给用户态的Daemon(中文:进程)。然后,用户态的Daemon通过网络将访问请求发送到分布式文件存储的后端,以完成数据的访问。然而,采用这样的方式,文件的访问请求需要从用户态Daemon进行一次中转再通过网络发送出去,在此过程中会涉及到多次拷贝、系统调用和上下文切换等操作,这会影响对数据的访问性能。Under the architecture of computing and storage separation, when a computing node needs to access the services provided by distributed file storage, it usually needs to mount a Fuse (English: Filesystem in Userspace, Chinese: User Space File System) module to achieve access. Access requests to this distributed file storage will be intercepted by the kernel's Fuse module and forwarded to the user-mode Daemon (Chinese: process). Then, the user-mode Daemon sends the access request to the backend of the distributed file storage through the network to complete the data access. However, using this method, the file access request needs to be transferred from the user-space Daemon and then sent through the network. This process will involve multiple copies, system calls, context switches and other operations, which will affect the access to the data. Access performance.

发明内容Contents of the invention

提供该部分内容以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该部分内容并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。This section is provided to introduce in simplified form concepts that are further described in the Detailed Description. This section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.

第一方面,本公开提供一种数据访问装置,所述数据访问装置包括用户空间文件系统Fuse模块、多个第一套接字接口以及存储器,所述Fuse模块通过多个所述第一套接字接口与所述存储器进行通信,所述Fuse模块和所述第一套接字接口位于内核空间;In a first aspect, the present disclosure provides a data access device. The data access device includes a user space file system Fuse module, a plurality of first socket interfaces, and a memory. The Fuse module passes a plurality of the first sockets. The word interface communicates with the memory, and the Fuse module and the first socket interface are located in the kernel space;

所述Fuse模块用于接收目标应用程序对目标数据的数据访问请求,并从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口;The Fuse module is configured to receive a data access request for target data from a target application, and determine a target socket interface corresponding to the data access request from a plurality of the first socket interfaces;

所述Fuse模块还用于利用所述目标套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序,以完成数据的访问。 The Fuse module is also used to obtain the target data from the memory using the target socket interface, and send the target data to the target application program to complete data access.

第二方面,本公开提供一种数据访问方法,应用于第一方面所述的装置,所述方法包括:In a second aspect, the present disclosure provides a data access method, applied to the device described in the first aspect, the method includes:

通过所述Fuse模块接收目标应用程序对目标数据的数据访问请求,并从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口;Receive a data access request for target data from a target application program through the Fuse module, and determine the target socket interface corresponding to the data access request from a plurality of the first socket interfaces;

通过所述Fuse模块利用所述目标套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序,以完成数据的访问。The Fuse module utilizes the target socket interface to obtain the target data from the memory, and sends the target data to the target application program to complete data access.

第三方面,本公开提供一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现本公开第二方面所述方法的步骤。In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processing device, the steps of the method described in the second aspect of the present disclosure are implemented.

第四方面,本公开提供一种电子设备,包括:In a fourth aspect, the present disclosure provides an electronic device, including:

存储装置,其上存储有至少一个计算机程序;a storage device having at least one computer program stored thereon;

至少一个处理装置,用于执行所述存储装置中的所述至少一个计算机程序,以实现本公开第二方面所述方法的步骤。At least one processing device, configured to execute the at least one computer program in the storage device to implement the steps of the method described in the second aspect of the present disclosure.

第五方面,本公开提供一种计算机程序,该计算机程序包含处理装置可执行的程序代码,当所述处理装置执行所述计算机程序时实现第二方面所述方法的步骤。In a fifth aspect, the present disclosure provides a computer program, the computer program comprising a program code executable by a processing device, and when the processing device executes the computer program, the steps of the method of the second aspect are implemented.

第六方面,本公开提供一种计算机程序产品,该计算机程序产品包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含处理装置可执行的程序代码,当所述处理装置执行所述计算机程序时实现第二方面所述方法的步骤。In a sixth aspect, the present disclosure provides a computer program product. The computer program product includes a computer program carried on a non-transitory computer-readable medium. The computer program includes program code executable by a processing device. When the processing device executes The computer program implements the steps of the method of the second aspect.

本公开的其他特征和优点将在随后的具体实施方式部分予以详细说明。Other features and advantages of the present disclosure will be described in detail in the detailed description that follows.

附图说明Description of the drawings

结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。在附图中:The above and other features, advantages, and aspects of various embodiments of the present disclosure will become more apparent with reference to the following detailed description taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale. In the attached picture:

图1是根据一示例性实施例示出的一种数据访问装置的框图;Figure 1 is a block diagram of a data access device according to an exemplary embodiment;

图2是根据一示例性实施例示出的另一种数据访问装置的框图;Figure 2 is a block diagram of another data access device according to an exemplary embodiment;

图3是根据一示例性实施例示出的一种数据访问方法的流程图;Figure 3 is a flow chart of a data access method according to an exemplary embodiment;

图4是根据图3所示实施例示出的一种步骤201的流程图;Figure 4 is a flow chart of step 201 according to the embodiment shown in Figure 3;

图5是根据图3所示实施例示出的又一种步骤201的流程图;Figure 5 is a flow chart of yet another step 201 according to the embodiment shown in Figure 3;

图6是根据一示例性实施例示出的一种电子设备的框图。FIG. 6 is a block diagram of an electronic device according to an exemplary embodiment.

具体实施方式 Detailed ways

下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the disclosure are shown in the drawings, it should be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, which rather are provided for A more thorough and complete understanding of this disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of the present disclosure.

应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。It should be understood that various steps described in the method implementations of the present disclosure may be executed in different orders and/or in parallel. Furthermore, method embodiments may include additional steps and/or omit performance of illustrated steps. The scope of the present disclosure is not limited in this regard.

本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。As used herein, the term "include" and its variations are open-ended, ie, "including but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; and the term "some embodiments" means "at least some embodiments". Relevant definitions of other terms will be given in the description below.

需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。It should be noted that concepts such as “first” and “second” mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units. Or interdependence.

需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。It should be noted that the modifications of "one" and "plurality" mentioned in this disclosure are illustrative and not restrictive. Those skilled in the art will understand that unless the context clearly indicates otherwise, it should be understood as "one or Multiple”.

本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。The names of messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not used to limit the scope of these messages or information.

本公开中所有获取信号、信息或数据的动作都是在遵照所在地国家相应的数据保护法规政策的前提下,并获得由相应装置所有者给予授权的情况下进行的。All actions to obtain signals, information or data in this disclosure are carried out in compliance with the corresponding data protection regulations and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.

图1是根据一示例性实施例示出的一种数据访问装置的框图。如图1所示,该数据访问装置100包括Fuse模块101、多个第一套接字接口102以及存储器103,Fuse模块101通过多个第一套接字接口102与存储器103进行通信,Fuse模块101和第一套接字接口102位于内核空间。FIG. 1 is a block diagram of a data access device according to an exemplary embodiment. As shown in Figure 1, the data access device 100 includes a Fuse module 101, a plurality of first socket interfaces 102, and a memory 103. The Fuse module 101 communicates with the memory 103 through a plurality of first socket interfaces 102. The Fuse module 101 and the first socket interface 102 are located in kernel space.

Fuse模块101,用于接收目标应用程序对目标数据的数据访问请求,并从多个第一套接字接口102中,确定与数据访问请求对应的目标套接字接口。The Fuse module 101 is configured to receive a data access request for target data from a target application program, and determine the target socket interface corresponding to the data access request from a plurality of first socket interfaces 102 .

示例地,对于分布式文件存储来说,计算节点上呈现的一个文件通常会以分片的形式,以将不同文件区段存储在不同的存储后端节点上。也就是说,对某个文件区段的读写实际上可以通过某个特定的Socket(中文:套接字)接口来进行收发。因此,可以通过使Fuse 模块感知文件区段与Socket之间的映射关系,从而绕过用户态Daemon,直接在内核中将文件的读写请求通过Socket接口发送到存储后端节点上,以改善对数据的访问性能。For example, for distributed file storage, a file presented on a computing node is usually in the form of shards, so that different file segments are stored on different storage backend nodes. In other words, reading and writing a certain file segment can actually be sent and received through a specific Socket (Chinese: socket) interface. Therefore, you can use Fuse The module senses the mapping relationship between file sections and Sockets, thereby bypassing the user-mode Daemon and directly sending file read and write requests to the storage back-end node through the Socket interface in the kernel to improve data access performance.

具体地,在计算存储分离架构下,数据存储在远端的存储器103,当目标应用程序需要在本地对目标文件中的目标数据进行数据访问时,首先可以通过目标应用程序的挂载点(英文:Mount Point),将对目标数据的数据访问请求发送给内核中的VFS(英文:Virtual File System,中文:虚拟文件系统),并由VFS将该数据访问请求发送给Fuse模块101。然后,Fuse模块101可以根据该数据访问请求,从内核中的多个第一套接字接口102中,确定目标套接字接口。例如,在数据访问请求为目标数据在目标文件中所处的文件区段时,可以预先建立该文件区段与第一套接字接口102之间的对应关系,在接收到数据访问请求后,Fuse模块101可以根据目标数据在目标文件中的位置,利用该对应关系从多个第一套接字接口102中,确定目标套接字接口。Specifically, under the computing and storage separation architecture, data is stored in the remote memory 103. When the target application needs to access the target data in the target file locally, it can first access the target data through the mount point of the target application (English). :Mount Point), the data access request for the target data is sent to the VFS (English: Virtual File System, Chinese: Virtual File System) in the kernel, and the VFS sends the data access request to the Fuse module 101. Then, the Fuse module 101 can determine the target socket interface from the plurality of first socket interfaces 102 in the kernel according to the data access request. For example, when the data access request is the file section where the target data is located in the target file, the corresponding relationship between the file section and the first socket interface 102 can be established in advance. After receiving the data access request, The Fuse module 101 can use the corresponding relationship to determine the target socket interface from the plurality of first socket interfaces 102 according to the location of the target data in the target file.

Fuse模块101还用于利用目标套接字接口从存储器103中获取目标数据,并将目标数据发送至目标应用程序,以完成数据的访问。The Fuse module 101 is also used to obtain target data from the memory 103 using the target socket interface, and send the target data to the target application program to complete data access.

举例来说,Fuse模块101可以将数据访问请求,利用目标套接字接口通过网络直接发送至远端的存储器103。其中,存储器103可以是远程存储器(英文:Remote Storage)。存储器103在接收到数据访问请求之后,可以根据数据访问请求获取存储的目标数据,并将目标数据通过目标套接字接口返回给Fuse模块101。之后Fuse模块101可以将接收到的目标数据发送给VFS,并由VFS将目标数据返回给目标应用程序,以完成数据的访问。For example, the Fuse module 101 can directly send the data access request to the remote storage 103 through the network using the target socket interface. Among them, the memory 103 may be a remote memory (English: Remote Storage). After receiving the data access request, the memory 103 can obtain the stored target data according to the data access request, and return the target data to the Fuse module 101 through the target socket interface. Afterwards, the Fuse module 101 can send the received target data to the VFS, and the VFS returns the target data to the target application to complete the data access.

需要说明的是,Fuse模块101通过目标套接字接口直接将数据访问请求发送至存储器103,实际上是建立了一条由VFS、Fuse模块101、第一套接字接口102以及存储器103组成的快速路径,该快速路径不需要再由用户态Daemon进行中转,能够避免在用户态Daemon中转的过程中涉及到的多次拷贝、系统调用和上下文切换等操作,从而提升对数据的访问性能。It should be noted that the Fuse module 101 directly sends the data access request to the memory 103 through the target socket interface. In fact, a fast link consisting of the VFS, the Fuse module 101, the first socket interface 102 and the memory 103 is established. Path, this fast path does not need to be transferred by the user-mode Daemon, and can avoid multiple copies, system calls, context switches and other operations involved in the user-mode Daemon transfer process, thereby improving the access performance of data.

综上所述,本公开中的数据访问装置包括Fuse模块、多个第一套接字接口以及存储器,Fuse模块通过多个第一套接字接口与存储器进行通信,Fuse模块和第一套接字接口位于内核空间,Fuse模块用于先接收目标应用程序对目标数据的数据访问请求,之后从多个第一套接字接口中,确定与数据访问请求对应的目标套接字接口,再利用目标套接字接口从存储器中获取目标数据,并将目标数据发送至目标应用程序,以完成数据的访问。本公开可以通过Fuse模块,根据数据访问请求,利用目标套接字接口从存储器中获取目标 数据,不需要在用户空间进行中转,能够直接在内核空间将数据访问请求发送到存储器,提高了对目标数据的访问性能。To sum up, the data access device in the present disclosure includes a Fuse module, a plurality of first socket interfaces and a memory. The Fuse module communicates with the memory through a plurality of first socket interfaces. The Fuse module and the first socket The word interface is located in the kernel space. The Fuse module is used to first receive the data access request for the target data from the target application, and then determine the target socket interface corresponding to the data access request from multiple first socket interfaces, and then use The target socket interface obtains the target data from the memory and sends the target data to the target application to complete the data access. This disclosure can use the Fuse module to obtain the target from the memory according to the data access request using the target socket interface. The data does not need to be transferred in user space, and the data access request can be sent directly to the memory in the kernel space, which improves the access performance of the target data.

可选地,数据访问请求可以包括目标数据在目标应用程序所要进行数据访问的目标文件中所处的文件区段。其中,Fuse模块101用于根据文件区段,利用预设对应关系,从多个第一套接字接口102中,确定是否存在与文件区段对应的目标套接字接口,并在确定存在目标套接字接口的情况下,利用目标套接字接口将数据访问请求发送至存储器103。其中,预设对应关系为文件区段与第一套接字接口之间的对应关系。Optionally, the data access request may include the file section where the target data is located in the target file to which the target application program wants to perform data access. Among them, the Fuse module 101 is used to determine whether there is a target socket interface corresponding to the file section from a plurality of first socket interfaces 102 by using a preset correspondence relationship according to the file section, and determine whether the target socket interface exists. In the case of a socket interface, the data access request is sent to the memory 103 using the target socket interface. The default correspondence relationship is the correspondence relationship between the file section and the first socket interface.

举例来说,数据访问请求实际上是用于告诉存储器103目标应用程序所要获取的目标数据在目标文件中的位置。为了提高对数据的访问性能,可以预先在内核建立多条快速路径,并通过构建预设对应关系的方式去记录这些建立好的快速路径。其中,该预设对应关系可以是映射表,例如该映射表可以包括文件区段与第一套接字接口之间的对应关系。在数据访问请求包括目标数据在目标文件中所处的文件区段的情况下,当数据访问请求经过内核的Fuse模块101时,Fuse模块101可以根据文件区段,利用预设对应关系,从多个第一套接字接口102中,确定是否存在与文件区段对应的目标套接字接口。如果存在目标套接字接口,Fuse模块101可以根据目标套接字接口对应的通信协议,利用目标套接字接口,将数据访问请求发送至存储器103。其中,通信协议可以是TCP/IP(英文:Transmission Control Protocol/Internet Protocol,中文:传输控制协议/网际协议)协议。For example, the data access request is actually used to tell the memory 103 the location of the target data to be obtained by the target application program in the target file. In order to improve the performance of data access, multiple fast paths can be established in the kernel in advance, and these established fast paths can be recorded by building preset correspondences. The preset corresponding relationship may be a mapping table. For example, the mapping table may include a corresponding relationship between the file section and the first socket interface. In the case where the data access request includes the file section where the target data is located in the target file, when the data access request passes through the Fuse module 101 of the kernel, the Fuse module 101 can use the preset correspondence relationship to extract data from multiple files based on the file section. In a first socket interface 102, it is determined whether there is a target socket interface corresponding to the file section. If there is a target socket interface, the Fuse module 101 can use the target socket interface to send the data access request to the memory 103 according to the communication protocol corresponding to the target socket interface. Among them, the communication protocol may be TCP/IP (English: Transmission Control Protocol/Internet Protocol, Chinese: Transmission Control Protocol/Internet Protocol) protocol.

需要说明的是,Fuse模块101确定是否存在目标套接字接口的过程,实际上是Fuse模块101通过查询预设对应关系(例如映射表)来确定是否存在快速路径的过程,如果存在目标套接字接口,则说明存在快速路径,那么可以将能够执行快速路径的文件区段的数据访问请求单独通过目标套接字接口发送到存储器103。也就是说,本公开实际上是通过在内核建立预设对应关系,生成Fuse模块101进行数据访问的快速路径,并将对目标文件的数据访问请求直接在内核通过套接字接口发送到存储器103,而不再转发到用户态的Daemon,提高了对目标数据的访问性能。It should be noted that the process by which the Fuse module 101 determines whether a target socket interface exists is actually the process by which the Fuse module 101 determines whether a fast path exists by querying a preset correspondence (such as a mapping table). If a target socket exists word interface, it means that there is a fast path, then the data access request for the file section capable of executing the fast path can be sent to the memory 103 through the target socket interface alone. That is to say, this disclosure actually generates a fast path for data access by the Fuse module 101 by establishing a preset correspondence in the kernel, and directly sends the data access request for the target file to the memory 103 through the socket interface in the kernel. , instead of forwarding it to the user-mode Daemon, which improves the access performance to the target data.

图2是根据一示例性实施例示出的另一种数据访问装置的框图。如图2所示,数据访问装置100还包括Fuse Daemon模块104和第二套接字接口105,Fuse Daemon模块104通过第二套接字接口105与存储器103进行通信,Fuse Daemon模块104和第二套接字接口105位于用户空间。Figure 2 is a block diagram of another data access device according to an exemplary embodiment. As shown in Figure 2, the data access device 100 also includes a Fuse Daemon module 104 and a second socket interface 105. The Fuse Daemon module 104 communicates with the memory 103 through the second socket interface 105. The Fuse Daemon module 104 and the second socket interface 105 communicate with each other. Socket interface 105 resides in user space.

Fuse模块101,还用于在确定不存在目标套接字接口的情况下,将数据访问请求发送至Fuse Daemon模块104。 The Fuse module 101 is also used to send the data access request to the Fuse Daemon module 104 when it is determined that the target socket interface does not exist.

Fuse Daemon模块104,用于利用第二套接字接口105从存储器103中获取目标数据,并将目标数据发送至目标应用程序。The Fuse Daemon module 104 is used to obtain target data from the memory 103 using the second socket interface 105 and send the target data to the target application.

在一种场景中,如果不存在目标套接字接口,说明数据访问请求所包括的文件区段为不能执行快速路径的文件区段,那么可以按照原本的处理方式将数据访问请求转发到用户态的Daemon进行处理。也就是说,Fuse模块101可以在确定不存在目标套接字接口时,将数据访问请求发送至Fuse Daemon模块104进行中转。之后可以由Fuse Daemon模块104利用与数据访问请求对应的第二套接字接口105,通过该第二套接字接口105对应的TCP/IP协议将数据访问请求发送至存储器103。存储器103在接收到数据访问请求之后,可以根据数据访问请求获取存储的目标数据,并将目标数据通过该第二套接字接口105、Fuse Daemon模块104、Fuse模块101以及VFS原路返回给目标应用程序,以完成数据的访问。另外,如果内核的多个第一套接字接口102的通信流程出现异常(例如,连接被关闭或者请求超时),Fuse模块101也需要将能够执行快速路径的文件区段的数据访问请求,转发到Fuse Daemon模块104进行处理。In one scenario, if the target socket interface does not exist, it means that the file section included in the data access request is a file section that cannot execute the fast path. Then the data access request can be forwarded to the user mode according to the original processing method. Daemon for processing. That is to say, the Fuse module 101 can send the data access request to the Fuse Daemon module 104 for transfer when it is determined that the target socket interface does not exist. The Fuse Daemon module 104 can then use the second socket interface 105 corresponding to the data access request to send the data access request to the memory 103 through the TCP/IP protocol corresponding to the second socket interface 105. After receiving the data access request, the memory 103 can obtain the stored target data according to the data access request, and return the target data to the target through the second socket interface 105, the Fuse Daemon module 104, the Fuse module 101 and the VFS. application to complete data access. In addition, if the communication process of the multiple first socket interfaces 102 of the kernel is abnormal (for example, the connection is closed or the request times out), the Fuse module 101 also needs to forward the data access request of the file section that can execute the fast path. Go to Fuse Daemon module 104 for processing.

需要说明的是,通过Fuse Daemon模块104对数据访问请求进行中转,实际上是建立了一条由VFS、Fuse模块101、Fuse Daemon模块104、第二套接字接口105以及存储器103组成的慢速路径。并且,本公开区分了快速路径的套接字接口和慢速路径的套接字接口,这样便于兼容原有的通信方式,不需要将慢速路径收发的数据格式改成Fuse的请求格式。It should be noted that the transfer of data access requests through the Fuse Daemon module 104 actually establishes a slow path composed of VFS, Fuse module 101, Fuse Daemon module 104, second socket interface 105 and memory 103 . Moreover, the present disclosure distinguishes between the socket interface of the fast path and the socket interface of the slow path, which facilitates compatibility with the original communication method and does not require changing the data format sent and received by the slow path to the Fuse request format.

可选地,Fuse Daemon模块104还用于在将目标数据发送至目标应用程序后,从存储器103中获取数据访问请求对应的通信信息,并根据通信信息构建新的第一套接字接口102,并将新的第一套接字接口102注册到内核空间中。其中,通信信息包括通信地址和通信端口。Optionally, the Fuse Daemon module 104 is also used to obtain the communication information corresponding to the data access request from the memory 103 after sending the target data to the target application, and construct a new first socket interface 102 based on the communication information, And register the new first socket interface 102 into the kernel space. Among them, the communication information includes communication address and communication port.

示例地,在内核中建立对应关系是完成数据访问的核心,也就是说,需要在内核中建立新的第一套接字接口102。具体地,可以在Fuse Daemon模块104执行完一次数据访问后,从存储器103中获取此次数据访问请求对应的通信信息,再根据通信信息,在内核中建立新的第一套接字接口102,即建立新的Socket连接。For example, establishing a corresponding relationship in the kernel is the core of completing data access, that is, a new first socket interface 102 needs to be established in the kernel. Specifically, after the Fuse Daemon module 104 completes a data access, the communication information corresponding to the data access request can be obtained from the memory 103, and then a new first socket interface 102 can be established in the kernel based on the communication information. That is, a new Socket connection is established.

然后Fuse Daemon模块104可以通知存储器103,这些新连接用于快速路径。在存储器103同意新连接用于快速路径后,Fuse Daemon模块104可以将新的第一套接字接口102注册到内核空间中。其中,通信信息可以包括通信地址和通信端口,通信地址例如可以是IP地址,通信端口例如可以是TCP端口。 The Fuse Daemon module 104 can then notify the memory 103 that these new connections are for the fast path. After the memory 103 agrees on the new connection for the fast path, the Fuse Daemon module 104 can register the new first socket interface 102 into kernel space. The communication information may include a communication address and a communication port. The communication address may be an IP address, for example, and the communication port may be a TCP port, for example.

进一步地,可以在Fuse模块101中设置多种类型的用于建立快速路径的用户态接口。例如,可以在Fuse模块101中提供了四个用户态接口来建立或调整快速路径,具体可以包括以下4个用户态接口:Further, multiple types of user-mode interfaces for establishing fast paths can be set in the Fuse module 101. For example, four user-mode interfaces can be provided in the Fuse module 101 to establish or adjust the fast path. Specifically, the following four user-mode interfaces can be included:

1)FUSE_ADD_FAST_PATH,用于向内核注册新的快速路径。其输入为:打开的目标文件对应的file handle(中文:文件句柄),需要映射的目标文件的起始位置,映射的目标文件的文件长度,需要映射的Socket fd(英文:file descriptor)数组以及需要映射的Socket fd的数组长度。其输出为:如果成功的话,返回一个id标识该快速路径,失败则返回错误码。需要说明的是,这里是以目标文件的file handle为对象建立快速路径,而不是以目标文件的inode,这样主要便于进行进程级别的控制(如:只允许某些用户进程能够使用快速路径)。同时,还允许为同一文件区段,注册多个Socket fd,这种情况,内核需要将文件请求往所有对应的Socket上发送。1) FUSE_ADD_FAST_PATH, used to register a new fast path with the kernel. The input is: the file handle (Chinese: file handle) corresponding to the opened target file, the starting position of the target file that needs to be mapped, the file length of the mapped target file, the Socket fd (English: file descriptor) array that needs to be mapped, and The array length of the Socket fd that needs to be mapped. The output is: if successful, an id is returned to identify the fast path, and if it fails, an error code is returned. It should be noted that the fast path is established based on the file handle of the target file as the object, rather than the inode of the target file. This mainly facilitates process-level control (for example: only allowing certain user processes to use the fast path). At the same time, it is also allowed to register multiple Socket fds for the same file section. In this case, the kernel needs to send the file request to all corresponding Sockets.

2)FUSE_REMOVE_FAST_PATH,用于删掉内核注册的快速路径。其输入为:快速路径对应的id。其输出为:如果成功的话,返回0,失败则返回错误码。需要说明的是,对应目标文件被close之后,相应的快速路径会被内核自动删除。2) FUSE_REMOVE_FAST_PATH, used to delete the fast path registered by the kernel. The input is: the id corresponding to the fast path. The output is: 0 is returned if successful, and an error code is returned if failed. It should be noted that after the corresponding target file is closed, the corresponding fast path will be automatically deleted by the kernel.

3)FUSE_UPDATE_FAST_PATH,用于更新内核建立的预设对应关系,其输入为:快速路径对应的id,需要映射的Socket fd数组,需要映射的Socket fd的数组长度。其输出为:如果成功的话,返回0,失败则返回错误码。3) FUSE_UPDATE_FAST_PATH is used to update the default correspondence established by the kernel. Its input is: the id corresponding to the fast path, the Socket fd array that needs to be mapped, and the array length of the Socket fd that needs to be mapped. The output is: 0 is returned if successful, and an error code is returned if failed.

4)FUSE_QUERY_FAST_PATH,用于查询内核注册的快速路径。其输入为:目标文件对应的file handle,需要映射的目标文件的起始位置,映射的目标文件的文件长度。其输出为:如果存在相应快速路径,则返回快速路径对应的id、实际映射的目标文件的起始位置、实际映射的目标文件的长度以及Socket fd列表,不存在则返回-1。4) FUSE_QUERY_FAST_PATH, used to query the fast path registered by the kernel. The input is: the file handle corresponding to the target file, the starting position of the target file that needs to be mapped, and the file length of the mapped target file. The output is: if the corresponding fast path exists, the id corresponding to the fast path, the starting position of the actual mapped target file, the length of the actual mapped target file, and the Socket fd list are returned. If it does not exist, -1 is returned.

综上所述,本公开中的数据访问装置包括Fuse模块、多个第一套接字接口以及存储器,Fuse模块通过多个第一套接字接口与存储器进行通信,Fuse模块和第一套接字接口位于内核空间,Fuse模块用于先接收目标应用程序对目标数据的数据访问请求,之后从多个第一套接字接口中,确定与数据访问请求对应的目标套接字接口,再利用目标套接字接口从存储器中获取目标数据,并将目标数据发送至目标应用程序,以完成数据的访问。本公开可以通过Fuse模块,根据数据访问请求,利用目标套接字接口从存储器中获取目标数据,不需要在用户空间进行中转,能够直接在内核空间将数据访问请求发送到存储器,提高了对目标数据的访问性能。 To sum up, the data access device in the present disclosure includes a Fuse module, a plurality of first socket interfaces and a memory. The Fuse module communicates with the memory through a plurality of first socket interfaces. The Fuse module and the first socket The word interface is located in the kernel space. The Fuse module is used to first receive the data access request for the target data from the target application, and then determine the target socket interface corresponding to the data access request from multiple first socket interfaces, and then use The target socket interface obtains the target data from the memory and sends the target data to the target application to complete the data access. This disclosure can use the Fuse module to obtain target data from the memory according to the data access request, and does not need to be transferred in the user space. It can directly send the data access request to the memory in the kernel space, improving the accuracy of the target. Data access performance.

图3是根据一示例性实施例示出的一种数据访问方法的流程图。如图3所示,应用于上述任一的数据访问装置,该方法可以包括以下步骤:Figure 3 is a flow chart of a data access method according to an exemplary embodiment. As shown in Figure 3, applied to any of the above data access devices, the method may include the following steps:

步骤201,通过Fuse模块接收目标应用程序对目标数据的数据访问请求,并从多个第一套接字接口中,确定与数据访问请求对应的目标套接字接口。Step 201: Receive a data access request for target data from the target application program through the Fuse module, and determine the target socket interface corresponding to the data access request from a plurality of first socket interfaces.

步骤202,通过Fuse模块利用目标套接字接口从存储器中获取目标数据,并将目标数据发送至目标应用程序,以完成数据的访问。Step 202: Use the Fuse module to obtain the target data from the memory using the target socket interface, and send the target data to the target application to complete the data access.

可选地,所述数据访问请求包括所述目标数据在所述目标应用程序所要进行数据访问的目标文件中所处的文件区段,步骤201可以通过以下方式实现:Optionally, the data access request includes the file section where the target data is located in the target file to be accessed by the target application. Step 201 can be implemented in the following manner:

通过Fuse模块根据文件区段,利用预设对应关系,从多个第一套接字接口中,确定是否存在与文件区段对应的目标套接字接口,并在确定存在目标套接字接口的情况下,利用目标套接字接口将数据访问请求发送至存储器。其中,预设对应关系为文件区段与第一套接字接口之间的对应关系。The Fuse module uses the preset correspondence relationship according to the file section to determine whether there is a target socket interface corresponding to the file section from multiple first socket interfaces, and determines whether the target socket interface exists In this case, the target socket interface is used to send the data access request to the memory. The default correspondence relationship is the correspondence relationship between the file section and the first socket interface.

可选地,步骤“在确定存在目标套接字接口的情况下,利用目标套接字接口将数据访问请求发送至存储器”可以通过以下方式实现:Optionally, the step "when it is determined that the target socket interface exists, send the data access request to the memory using the target socket interface" can be implemented in the following manner:

通过Fuse模块根据目标套接字接口对应的通信协议,利用目标套接字接口,将数据访问请求发送至存储器。Through the Fuse module, the data access request is sent to the memory using the target socket interface according to the communication protocol corresponding to the target socket interface.

图4是根据图3所示实施例示出的另一种步骤201的流程图。如图4所示,步骤201可以包括以下步骤:FIG. 4 is a flow chart of another step 201 according to the embodiment shown in FIG. 3 . As shown in Figure 4, step 201 may include the following steps:

步骤2011,通过Fuse模块在确定不存在目标套接字接口的情况下,将数据访问请求发送至Fuse Daemon模块。Step 2011: When it is determined that the target socket interface does not exist through the Fuse module, the data access request is sent to the Fuse Daemon module.

步骤2012,通过Fuse Daemon模块利用第二套接字接口从存储器中获取目标数据,并将目标数据发送至目标应用程序。Step 2012, use the second socket interface to obtain the target data from the memory through the Fuse Daemon module, and send the target data to the target application.

图5是根据图3所示实施例示出的又一种步骤201的流程图。如图5所示,步骤201还可以包括以下步骤:FIG. 5 is a flow chart of yet another step 201 according to the embodiment shown in FIG. 3 . As shown in Figure 5, step 201 may also include the following steps:

步骤2013,通过Fuse Daemon模块在将目标数据发送至目标应用程序后,从存储器中获取数据访问请求对应的通信信息,并根据通信信息构建新的第一套接字接口,并将新的第一套接字接口注册到内核空间中。其中,通信信息包括通信地址和通信端口。Step 2013: After sending the target data to the target application through the Fuse Daemon module, obtain the communication information corresponding to the data access request from the memory, build a new first socket interface based on the communication information, and add the new first socket interface to the target application. The socket interface is registered in kernel space. Among them, the communication information includes communication address and communication port.

综上所述,本公开中的数据访问装置包括Fuse模块、多个第一套接字接口以及存储器,Fuse模块通过多个第一套接字接口与存储器进行通信,Fuse模块和第一套接字接口位于内核空间,Fuse模块用于先接收目标应用程序对目标数据的数据访问请求,之后从多 个第一套接字接口中,确定与数据访问请求对应的目标套接字接口,再利用目标套接字接口从存储器中获取目标数据,并将目标数据发送至目标应用程序,以完成数据的访问。本公开可以通过Fuse模块,根据数据访问请求,利用目标套接字接口从存储器中获取目标数据,不需要在用户空间进行中转,能够直接在内核空间将数据访问请求发送到存储器,提高了对目标数据的访问性能。To sum up, the data access device in the present disclosure includes a Fuse module, a plurality of first socket interfaces and a memory. The Fuse module communicates with the memory through a plurality of first socket interfaces. The Fuse module and the first socket The word interface is located in the kernel space. The Fuse module is used to first receive data access requests for target data from the target application, and then from multiple In the first socket interface, determine the target socket interface corresponding to the data access request, then use the target socket interface to obtain the target data from the memory, and send the target data to the target application to complete the data processing. access. This disclosure can use the Fuse module to obtain target data from the memory according to the data access request, and does not need to be transferred in the user space. It can directly send the data access request to the memory in the kernel space, improving the accuracy of the target. Data access performance.

下面参考图6,其示出了适于用来实现本公开实施例的电子设备(例如图1中的终端设备或服务器)600的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、个人数字助理(PDA,Personal Digital Assistant)、平板电脑(PAD,tablet computer)、便携式多媒体播放器(PMP,Portable Multimedia Player)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字电视机(TV,television)、台式计算机等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 6 , a schematic structural diagram of an electronic device (such as the terminal device or server in FIG. 1 ) 600 suitable for implementing embodiments of the present disclosure is shown. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA, Personal Digital Assistant), tablet computers (PAD, tablet computers), portable multimedia players ( Mobile terminals such as PMP (Portable Multimedia Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and fixed terminals such as digital televisions (TV, television), desktop computers, etc. The electronic device shown in FIG. 6 is only an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM,Read Only Memory)602中的程序或者从存储装置608加载到随机访问存储器(RAM,Random Access Memory)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O,Input/Output)接口605也连接至总线604。As shown in Figure 6, the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which may process data according to a program stored in a read-only memory (ROM, Read Only Memory) 602 or from a storage device 608 The program loaded into the random access memory (RAM, Random Access Memory) 603 performs various appropriate actions and processes. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, ROM 602 and RAM 603 are connected to each other via a bus 604. An input/output (I/O, Input/Output) interface 605 is also connected to bus 604.

通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD,Liquid Crystal Display)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices can be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a Liquid Crystal Display (LCD) , an output device 607 such as a speaker, a vibrator, etc.; a storage device 608 including a magnetic tape, a hard disk, etc.; and a communication device 609. Communication device 609 may allow electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although FIG. 6 illustrates electronic device 600 with various means, it should be understood that implementation or availability of all illustrated means is not required. More or fewer means may alternatively be implemented or provided.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。 In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product including a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such embodiments, the computer program may be downloaded and installed from the network via communication device 609, or from storage device 608, or from ROM 602. When the computer program is executed by the processing device 601, the above functions defined in the method of the embodiment of the present disclosure are performed.

需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM(Erasable Programmable Read-only Memory)或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM,Compact Disc Read-only Memory)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、射频(RF,Radio Frequency)等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium may be, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination thereof. More specific examples of computer readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard drive, random access memory (RAM), read only memory (ROM), removable Programmable read-only memory (EPROM (Erasable Programmable Read-only Memory) or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM, Compact Disc Read-only Memory), optical storage device, magnetic storage device, or the above Any suitable combination. In this disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device . Program code embodied on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wire, optical cable, radio frequency (RF, Radio Frequency), etc., or any suitable combination of the above.

在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(LAN,Local Area Network),广域网(WAN,Wide Area Network),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。In some embodiments, the client and server can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium. Communications (e.g., communications network) interconnections. Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any current network for knowledge or future research and development.

上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; it may also exist independently without being assembled into the electronic device.

上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:通过所述Fuse模块接收目标应用程序对目标数据的数据访问请求,并从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口;通过所述Fuse模块利用所述目标套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序,以完成数据的访问。The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: receives a data access request for target data from the target application program through the Fuse module, and Determine a target socket interface corresponding to the data access request from a plurality of first socket interfaces; use the target socket interface to obtain the target from the memory through the Fuse module data, and sends the target data to the target application to complete the data access.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、 C++,还包括常规的过程式程序设计语言——诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)——连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++ also includes conventional procedural programming languages - such as "C" or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In situations involving remote computers, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as an Internet service provider). connected via the Internet).

附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, segment, or portion of code that contains one or more logic functions that implement the specified executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown one after another may actually execute substantially in parallel, or they may sometimes execute in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagram and/or flowchart illustration, and combinations of blocks in the block diagram and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or operations. , or can be implemented using a combination of specialized hardware and computer instructions.

本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该模块本身的限定,例如,Fuse模块还可以被描述为“接收对目标数据的数据访问请求的模块”。The modules involved in the embodiments of the present disclosure can be implemented in software or hardware. Among them, the name of the module does not constitute a limitation on the module itself under certain circumstances. For example, the Fuse module can also be described as "a module that receives data access requests for target data."

本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA,Field Programmable Gate Array)、专用集成电路(ASIC,Application Specific Integrated Circuit)、专用标准产品(ASSP,Application Specific Standard Product)、片上系统(SOC,System on Chop)、复杂可编程逻辑设备(CPLD,Complex Programmable Logic Device)等等。The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Array (FPGA, Field Programmable Gate Array), Application Specific Integrated Circuit (ASIC, Application Specific Integrated Circuit), Application Specific Standard Product (ASSP, Application Specific Standard Product), System on Chip (SOC, System on Chop), Complex Programmable Logic Device (CPLD, Complex Programmable Logic Device), etc.

在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读存储介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只 读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。In the context of this disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media would include electrical connections based on one or more wires, portable computer disks, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable Read memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.

根据本公开的一个或多个实施例,示例1提供了一种数据访问装置,所述数据访问装置包括用户空间文件系统Fuse模块、多个第一套接字接口以及存储器,所述Fuse模块通过多个所述第一套接字接口与所述存储器进行通信,所述Fuse模块和所述第一套接字接口位于内核空间;所述Fuse模块用于接收目标应用程序对目标数据的数据访问请求,并从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口;所述Fuse模块还用于利用所述目标套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序,以完成数据的访问。According to one or more embodiments of the present disclosure, Example 1 provides a data access device. The data access device includes a user space file system Fuse module, a plurality of first socket interfaces, and a memory. The Fuse module passes A plurality of first socket interfaces communicate with the memory, and the Fuse module and the first socket interface are located in the kernel space; the Fuse module is used to receive data access to target data from a target application. request, and determine the target socket interface corresponding to the data access request from a plurality of the first socket interfaces; the Fuse module is also used to use the target socket interface to obtain the data from the memory Obtain the target data and send the target data to the target application to complete the data access.

根据本公开的一个或多个实施例,示例2提供了示例1的装置,所述数据访问请求包括所述目标数据在所述目标应用程序所要进行数据访问的目标文件中所处的文件区段;所述Fuse模块用于根据所述文件区段,利用预设对应关系,从多个所述第一套接字接口中,确定是否存在与所述文件区段对应的目标套接字接口,并在确定存在所述目标套接字接口的情况下,利用所述目标套接字接口将所述数据访问请求发送至所述存储器;所述预设对应关系为所述文件区段与所述第一套接字接口之间的对应关系。According to one or more embodiments of the present disclosure, Example 2 provides the apparatus of Example 1, the data access request includes a file section where the target data is located in a target file to be accessed by the target application. ; The Fuse module is used to determine whether there is a target socket interface corresponding to the file section from a plurality of the first socket interfaces by using a preset correspondence relationship according to the file section, And when it is determined that the target socket interface exists, use the target socket interface to send the data access request to the memory; the preset corresponding relationship is the file section and the Correspondence between first socket interfaces.

根据本公开的一个或多个实施例,示例3提供了示例2的装置,所述Fuse模块用于根据所述目标套接字接口对应的通信协议,利用所述目标套接字接口,将所述数据访问请求发送至所述存储器。According to one or more embodiments of the present disclosure, Example 3 provides the device of Example 2. The Fuse module is configured to use the target socket interface to fuse the target socket interface according to the communication protocol corresponding to the target socket interface. The data access request is sent to the memory.

根据本公开的一个或多个实施例,示例4提供了示例2的装置,所述数据访问装置还包括Fuse Daemon模块和第二套接字接口,所述Fuse Daemon模块通过所述第二套接字接口与所述存储器进行通信,所述Fuse Daemon模块和所述第二套接字接口位于用户空间;所述Fuse模块还用于在确定不存在所述目标套接字接口的情况下,将所述数据访问请求发送至所述Fuse Daemon模块;所述Fuse Daemon模块用于利用所述第二套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序。According to one or more embodiments of the present disclosure, Example 4 provides the device of Example 2. The data access device further includes a Fuse Daemon module and a second socket interface. The Fuse Daemon module passes through the second socket. The word interface communicates with the memory, and the Fuse Daemon module and the second socket interface are located in user space; the Fuse module is also used to, when it is determined that the target socket interface does not exist, The data access request is sent to the Fuse Daemon module; the Fuse Daemon module is used to obtain the target data from the memory using the second socket interface, and send the target data to the target application.

根据本公开的一个或多个实施例,示例5提供了示例4所述的装置,所述Fuse Daemon模块还用于在将所述目标数据发送至所述目标应用程序后,从所述存储器中获取所述数据访问请求对应的通信信息,并根据所述通信信息构建新的第一套接字接口,并将所述新的第一套接字接口注册到所述内核空间中;所述通信信息包括通信地址和通信端口。According to one or more embodiments of the present disclosure, Example 5 provides the apparatus described in Example 4, and the Fuse Daemon module is further configured to retrieve data from the memory after sending the target data to the target application. Obtain the communication information corresponding to the data access request, construct a new first socket interface based on the communication information, and register the new first socket interface in the kernel space; the communication The information includes communication addresses and communication ports.

根据本公开的一个或多个实施例,示例6提供了一种数据访问方法,应用于示例1至示例5中任一项所述的装置,所述方法包括:通过所述Fuse模块接收目标应用程序对目 标数据的数据访问请求,并从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口;以及通过所述Fuse模块利用所述目标套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序,以完成数据的访问。According to one or more embodiments of the present disclosure, Example 6 provides a data access method, applied to the device described in any one of Examples 1 to 5, the method includes: receiving a target application through the Fuse module program target a data access request for target data, and determine a target socket interface corresponding to the data access request from a plurality of first socket interfaces; and utilize the target socket interface through the Fuse module Obtain the target data from the memory and send the target data to the target application program to complete the data access.

根据本公开的一个或多个实施例,示例7提供了示例6的方法,所述数据访问请求包括所述目标数据在所述目标应用程序所要进行数据访问的目标文件中所处的文件区段,所述从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口,包括:通过所述Fuse模块根据所述文件区段,利用预设对应关系,从多个所述第一套接字接口中,确定是否存在与所述文件区段对应的目标套接字接口,并在确定存在所述目标套接字接口的情况下,利用所述目标套接字接口将所述数据访问请求发送至所述存储器;所述预设对应关系为所述文件区段与所述第一套接字接口之间的对应关系。According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 6, the data access request includes the file section where the target data is located in the target file to be accessed by the target application. Determining the target socket interface corresponding to the data access request from the plurality of first socket interfaces includes: using the Fuse module according to the file section, using a preset corresponding relationship , from a plurality of the first socket interfaces, determine whether there is a target socket interface corresponding to the file section, and if it is determined that the target socket interface exists, use the target socket interface The socket interface sends the data access request to the memory; the preset correspondence is the correspondence between the file section and the first socket interface.

根据本公开的一个或多个实施例,示例8提供了示例7的方法,所述在确定存在所述目标套接字接口的情况下,利用所述目标套接字接口将所述数据访问请求发送至所述存储器,包括:通过所述Fuse模块根据所述目标套接字接口对应的通信协议,利用所述目标套接字接口,将所述数据访问请求发送至所述存储器。According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 7, wherein when it is determined that the target socket interface exists, the data access request is processed using the target socket interface. Sending to the memory includes: sending the data access request to the memory by using the target socket interface according to the communication protocol corresponding to the target socket interface through the Fuse module.

根据本公开的一个或多个实施例,示例9提供了示例7的方法,所述数据访问装置还包括Fuse Daemon模块和第二套接字接口,所述方法还包括:通过所述Fuse模块在确定不存在所述目标套接字接口的情况下,将所述数据访问请求发送至所述Fuse Daemon模块;通过所述Fuse Daemon模块利用所述第二套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序。According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 7, the data access device further includes a Fuse Daemon module and a second socket interface, and the method further includes: using the Fuse module to When it is determined that the target socket interface does not exist, the data access request is sent to the Fuse Daemon module; the Fuse Daemon module uses the second socket interface to obtain the data from the memory. Describe the target data and send the target data to the target application.

根据本公开的一个或多个实施例,示例10提供了示例9的方法,还包括:通过所述Fuse Daemon模块在将所述目标数据发送至所述目标应用程序后,从所述存储器中获取所述数据访问请求对应的通信信息,并根据所述通信信息构建新的第一套接字接口,并将所述新的第一套接字接口注册到所述内核空间中;所述通信信息包括通信地址和通信端口。According to one or more embodiments of the present disclosure, Example 10 provides the method of Example 9, further comprising: using the Fuse Daemon module to obtain the target data from the memory after sending the target data to the target application. The communication information corresponding to the data access request, constructing a new first socket interface based on the communication information, and registering the new first socket interface into the kernel space; the communication information Including communication address and communication port.

根据本公开的一个或多个实施例,示例11提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理装置执行时实现示例6至示例10中所述方法的步骤。According to one or more embodiments of the present disclosure, Example 11 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the methods described in Examples 6 to 10 when executed by a processing device.

根据本公开的一个或多个实施例,示例12提供了一种电子设备,包括:存储装置,其上存储有至少一个计算机程序;至少一个处理装置,用于执行所述存储装置中的所述计算机程序,以实现示例6至示例10中所述方法的步骤。 According to one or more embodiments of the present disclosure, Example 12 provides an electronic device, including: a storage device having at least one computer program stored thereon; and at least one processing device configured to execute the program in the storage device. A computer program to implement the steps of the methods described in Examples 6 to 10.

根据本公开的一个或多个实施例,示例13提供了一种计算机程序,该计算机程序包含处理装置可执行的程序代码,当所述处理装置执行所述计算机程序时实现示例6至示例10中所述方法的步骤。According to one or more embodiments of the present disclosure, Example 13 provides a computer program. The computer program includes program code executable by a processing device. When the processing device executes the computer program, Examples 6 to 10 are implemented. The steps of the method.

根据本公开的一个或多个实施例,示例14提供了一种计算机程序产品,该计算机程序产品包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含处理装置可执行的程序代码,当所述处理装置执行所述计算机程序时实现示例6至示例10中所述方法的步骤。According to one or more embodiments of the present disclosure, Example 14 provides a computer program product, the computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program comprising a program executable by a processing device Code that implements the steps of the methods described in Examples 6 to 10 when the processing device executes the computer program.

以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a description of the preferred embodiments of the present disclosure and the technical principles applied. Those skilled in the art should understand that the disclosure scope involved in the present disclosure is not limited to technical solutions composed of specific combinations of the above technical features, but should also cover solutions composed of the above technical features or without departing from the above disclosed concept. Other technical solutions formed by any combination of equivalent features. For example, a technical solution is formed by replacing the above features with technical features with similar functions disclosed in this disclosure (but not limited to).

此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。Furthermore, although operations are depicted in a specific order, this should not be understood as requiring that these operations be performed in the specific order shown or performed in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.

尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。 Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims. Regarding the devices in the above embodiments, the specific manner in which each module performs operations has been described in detail in the embodiments related to the method, and will not be described in detail here.

Claims (12)

一种数据访问装置,包括:用户空间文件系统Fuse模块、多个第一套接字接口以及存储器;其中,所述Fuse模块通过多个所述第一套接字接口与所述存储器进行通信,所述Fuse模块和所述第一套接字接口位于内核空间;A data access device, including: a user space file system Fuse module, a plurality of first socket interfaces, and a memory; wherein the Fuse module communicates with the memory through a plurality of the first socket interfaces, The Fuse module and the first socket interface are located in the kernel space; 所述Fuse模块用于接收目标应用程序对目标数据的数据访问请求,并从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口;The Fuse module is configured to receive a data access request for target data from a target application, and determine a target socket interface corresponding to the data access request from a plurality of the first socket interfaces; 所述Fuse模块还用于利用所述目标套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序,以完成数据的访问。The Fuse module is also used to obtain the target data from the memory using the target socket interface, and send the target data to the target application program to complete data access. 根据权利要求1所述的装置,其中,所述数据访问请求包括所述目标数据在所述目标应用程序所要进行数据访问的目标文件中所处的文件区段;The apparatus according to claim 1, wherein the data access request includes a file section where the target data is located in a target file to which the target application program wants to perform data access; 所述Fuse模块用于根据所述文件区段,利用预设对应关系,从多个所述第一套接字接口中,确定是否存在与所述文件区段对应的所述目标套接字接口,并在确定存在所述目标套接字接口的情况下,利用所述目标套接字接口将所述数据访问请求发送至所述存储器;所述预设对应关系为所述文件区段与所述第一套接字接口之间的对应关系。The Fuse module is configured to determine whether there is the target socket interface corresponding to the file section from a plurality of the first socket interfaces by using a preset correspondence relationship according to the file section. , and when it is determined that the target socket interface exists, use the target socket interface to send the data access request to the memory; the preset corresponding relationship is between the file section and the The corresponding relationship between the first socket interfaces is described. 根据权利要求2所述的装置,其中,所述Fuse模块用于根据所述目标套接字接口对应的通信协议,利用所述目标套接字接口,将所述数据访问请求发送至所述存储器。The device according to claim 2, wherein the Fuse module is configured to use the target socket interface to send the data access request to the memory according to the communication protocol corresponding to the target socket interface. . 根据权利要求2所述的装置,其中,所述数据访问装置还包括Fuse Daemon模块和第二套接字接口,所述Fuse Daemon模块通过所述第二套接字接口与所述存储器进行通信,所述Fuse Daemon模块和所述第二套接字接口位于用户空间;The device according to claim 2, wherein the data access device further includes a Fuse Daemon module and a second socket interface, the Fuse Daemon module communicates with the memory through the second socket interface, The Fuse Daemon module and the second socket interface are located in user space; 所述Fuse模块还用于在确定不存在所述目标套接字接口的情况下,将所述数据访问请求发送至所述Fuse Daemon模块;The Fuse module is also configured to send the data access request to the Fuse Daemon module when it is determined that the target socket interface does not exist; 所述Fuse Daemon模块用于利用所述第二套接字接口从所述存储器中获取所述目标数据,并将所述目标数据发送至所述目标应用程序。The Fuse Daemon module is used to obtain the target data from the memory using the second socket interface, and send the target data to the target application. 根据权利要求4所述的装置,其中,所述Fuse Daemon模块还用于在将所述目标数据发送至所述目标应用程序后,从所述存储器中获取所述数据访问请求对应的通信信息,并根据所述通信信息构建新的第一套接字接口,并将所述新的第一套接字接口注册到所述内核空间中;所述通信信息包括通信地址和通信端口。The device according to claim 4, wherein the Fuse Daemon module is further configured to obtain the communication information corresponding to the data access request from the memory after sending the target data to the target application, And construct a new first socket interface according to the communication information, and register the new first socket interface in the kernel space; the communication information includes a communication address and a communication port. 一种数据访问方法,应用于权利要求1-5中任一项所述的装置,所述方法包括:A data access method, applied to the device according to any one of claims 1-5, the method comprising: 通过所述Fuse模块接收目标应用程序对目标数据的数据访问请求,并从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口;以及Receive a data access request for target data from a target application program through the Fuse module, and determine the target socket interface corresponding to the data access request from a plurality of the first socket interfaces; and 通过所述Fuse模块利用所述目标套接字接口从所述存储器中获取所述目标数据, 并将所述目标数据发送至所述目标应用程序,以完成数据的访问。The target data is obtained from the memory by using the target socket interface through the Fuse module, And send the target data to the target application to complete the data access. 根据权利要求6所述的方法,其中,所述数据访问请求包括所述目标数据在所述目标应用程序所要进行数据访问的目标文件中所处的文件区段,所述从多个所述第一套接字接口中,确定与所述数据访问请求对应的目标套接字接口,包括:The method of claim 6, wherein the data access request includes a file section in which the target data is located in a target file to be accessed by the target application, and the plurality of first Among the socket interfaces, determine the target socket interface corresponding to the data access request, including: 通过所述Fuse模块根据所述文件区段,利用预设对应关系,从多个所述第一套接字接口中,确定是否存在与所述文件区段对应的所述目标套接字接口,并在确定存在所述目标套接字接口的情况下,利用所述目标套接字接口将所述数据访问请求发送至所述存储器;所述预设对应关系为所述文件区段与所述第一套接字接口之间的对应关系。The Fuse module uses the preset correspondence relationship according to the file section to determine whether there is the target socket interface corresponding to the file section from a plurality of the first socket interfaces, And when it is determined that the target socket interface exists, use the target socket interface to send the data access request to the memory; the preset corresponding relationship is the file section and the Correspondence between first socket interfaces. 根据权利要求7所述的方法,其中,所述在确定存在所述目标套接字接口的情况下,利用所述目标套接字接口将所述数据访问请求发送至所述存储器,包括:The method according to claim 7, wherein, when it is determined that the target socket interface exists, sending the data access request to the memory using the target socket interface includes: 通过所述Fuse模块根据所述目标套接字接口对应的通信协议,利用所述目标套接字接口,将所述数据访问请求发送至所述存储器。The Fuse module uses the target socket interface to send the data access request to the memory according to the communication protocol corresponding to the target socket interface. 一种计算机可读介质,所述计算机可读介质上存储有计算机程序,其中,所述计算机程序被处理装置执行时实现权利要求6-8中任一项所述方法的步骤。A computer-readable medium having a computer program stored on the computer-readable medium, wherein the steps of the method of any one of claims 6-8 are implemented when the computer program is executed by a processing device. 一种电子设备,包括:An electronic device including: 存储装置,其上存储有至少一个计算机程序;a storage device having at least one computer program stored thereon; 至少一个处理装置,用于执行所述存储装置中的所述至少一个计算机程序,以实现权利要求6-8中任一项所述方法的步骤。At least one processing device, configured to execute the at least one computer program in the storage device to implement the steps of the method according to any one of claims 6-8. 一种计算机程序,所述计算机程序包含处理装置可执行的程序代码,当所述处理装置执行所述计算机程序时实现权利要求6-8中任一项所述方法的步骤。A computer program, the computer program comprising a program code executable by a processing device, when the processing device executes the computer program, the steps of the method of any one of claims 6-8 are implemented. 一种计算机程序产品,所述计算机程序产品包括承载在非暂态计算机可读介质上的计算机程序,所述计算机程序包含处理装置可执行的程序代码,当所述处理装置执行所述计算机程序时实现权利要求6-8中任一项所述方法的步骤。 A computer program product, the computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program comprising program code executable by a processing device, when the processing device executes the computer program Implement the steps of the method according to any one of claims 6-8.
PCT/CN2023/082366 2022-03-25 2023-03-18 Data access apparatus and method, and readable medium and electronic device Ceased WO2023179509A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210307683.XA CN114637703B (en) 2022-03-25 2022-03-25 Data access device, method, readable medium and electronic equipment
CN202210307683.X 2022-03-25

Publications (1)

Publication Number Publication Date
WO2023179509A1 true WO2023179509A1 (en) 2023-09-28

Family

ID=81949214

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/082366 Ceased WO2023179509A1 (en) 2022-03-25 2023-03-18 Data access apparatus and method, and readable medium and electronic device

Country Status (2)

Country Link
CN (1) CN114637703B (en)
WO (1) WO2023179509A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637703B (en) * 2022-03-25 2023-09-01 北京有竹居网络技术有限公司 Data access device, method, readable medium and electronic equipment
CN114979305B (en) * 2022-06-30 2024-03-22 京东方科技集团股份有限公司 Communication method, device, equipment, storage medium and program product
CN119544824A (en) * 2023-08-31 2025-02-28 华为云计算技术有限公司 A method and corresponding device for network connection hot migration
CN119179430A (en) * 2023-11-27 2024-12-24 北京小米移动软件有限公司 Data reading and writing method and device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963905B1 (en) * 1997-09-29 2005-11-08 Emc Corporation System and method including a communication interface for transferring information between at least two processes
US20170123971A1 (en) * 2015-11-04 2017-05-04 Sandisk Technologies Inc. User Space Data Storage Management
CN108268609A (en) * 2017-12-29 2018-07-10 新浪网技术(中国)有限公司 A kind of foundation of file path, access method and device
CN113591139A (en) * 2021-10-08 2021-11-02 北京海誉动想科技股份有限公司 File access control method and device
CN114089920A (en) * 2021-11-25 2022-02-25 北京字节跳动网络技术有限公司 Data storage method, device, readable medium and electronic device
CN114637703A (en) * 2022-03-25 2022-06-17 北京有竹居网络技术有限公司 Data access apparatus, method, readable medium and electronic device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301442A (en) * 2014-11-17 2015-01-21 浪潮电子信息产业股份有限公司 A method for implementing a fuse-based client accessing an object storage cluster
CN107329838A (en) * 2017-05-23 2017-11-07 努比亚技术有限公司 A kind of service interaction method, terminal and computer-readable recording medium
CN107479991A (en) * 2017-08-25 2017-12-15 郑州云海信息技术有限公司 Object methods of storage operating, apparatus and system based on kernel file system
CN109857545B (en) * 2018-12-29 2021-09-14 华为技术有限公司 Data transmission method and device
CN112653740A (en) * 2020-12-11 2021-04-13 北京金山云网络技术有限公司 Load balancing method and device supporting QUIC connection migration and computer product

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6963905B1 (en) * 1997-09-29 2005-11-08 Emc Corporation System and method including a communication interface for transferring information between at least two processes
US20170123971A1 (en) * 2015-11-04 2017-05-04 Sandisk Technologies Inc. User Space Data Storage Management
CN108268609A (en) * 2017-12-29 2018-07-10 新浪网技术(中国)有限公司 A kind of foundation of file path, access method and device
CN113591139A (en) * 2021-10-08 2021-11-02 北京海誉动想科技股份有限公司 File access control method and device
CN114089920A (en) * 2021-11-25 2022-02-25 北京字节跳动网络技术有限公司 Data storage method, device, readable medium and electronic device
CN114637703A (en) * 2022-03-25 2022-06-17 北京有竹居网络技术有限公司 Data access apparatus, method, readable medium and electronic device

Also Published As

Publication number Publication date
CN114637703A (en) 2022-06-17
CN114637703B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN114637703B (en) Data access device, method, readable medium and electronic equipment
US12346269B2 (en) Computing storage separation system and data access method therefor, medium, and electronic device
CN114201317B (en) Data transmission method and device, storage medium and electronic equipment
WO2023279891A1 (en) Screen mirroring device discovery method and apparatus, electronic device, and storage medium
CN114089920B (en) Data storage method and device, readable medium and electronic equipment
CN112262556B (en) Model file management method and terminal equipment
WO2021190129A1 (en) Method and device for page processing, electronic device, and computer-readable storage medium
WO2023202276A1 (en) Domain name resolution request processing method and apparatus, and device, medium and program product
CN113765867B (en) Data transmission method, device, equipment and storage medium
CN110795446A (en) List updating method and device, readable medium and electronic equipment
WO2023179508A1 (en) Data processing method and apparatus, readable medium and electronic device
WO2023174013A1 (en) Video memory allocation method and apparatus, and medium and electronic device
CN113918659A (en) Data manipulation method, device, storage medium and electronic device
CN118250252A (en) Domain name resolution method, system, device, medium and server
WO2024188248A1 (en) Media file generation method and apparatus, electronic device, and storage medium
CN116743785A (en) Cloud network data storage method, device, equipment and medium based on fog calculation
CN111262907A (en) Service instance access method, apparatus and electronic device
CN112995005B (en) Virtual network data exchange method and device
WO2025044758A1 (en) Information processing method and apparatus, and electronic device and storage medium
WO2025031255A1 (en) Data acquisition method and device, and storage medium
CN114995692A (en) Document relationship query method, device, electronic device and storage medium
CN118612272A (en) Vehicle-mounted image transmission method, device, electronic device and storage medium
CN117729136A (en) Log request processing methods, devices, equipment and storage media
CN118626008A (en) Metadata management method, device, electronic device and readable storage medium
CN110096543A (en) Data operation method, device, server and medium of application program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23773757

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23773757

Country of ref document: EP

Kind code of ref document: A1