CN112527802A - Soft link method and device based on key value database - Google Patents

Soft link method and device based on key value database Download PDF

Info

Publication number
CN112527802A
CN112527802A CN202011533262.6A CN202011533262A CN112527802A CN 112527802 A CN112527802 A CN 112527802A CN 202011533262 A CN202011533262 A CN 202011533262A CN 112527802 A CN112527802 A CN 112527802A
Authority
CN
China
Prior art keywords
file
soft link
request
user
soft
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.)
Granted
Application number
CN202011533262.6A
Other languages
Chinese (zh)
Other versions
CN112527802B (en
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011533262.6A priority Critical patent/CN112527802B/en
Publication of CN112527802A publication Critical patent/CN112527802A/en
Application granted granted Critical
Publication of CN112527802B publication Critical patent/CN112527802B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses

Abstract

The application discloses a soft link method and device based on a key value database, and relates to the technical field of cloud storage. The specific implementation scheme is as follows: acquiring and analyzing request information of a user, and determining a request file indicated by the request information; searching metadata of a request file from a key value database, wherein keys of key value pairs in the key value database correspond to file names, and the values correspond to the metadata of the file; and responding to the fact that the soft link identification exists in the metadata of the request file, determining that the request file is the soft link file, and accessing a target file pointed by the soft link file. According to the scheme, the soft link method based on the key value database is provided through storing the soft link file information through the key value pairs in the key value database, and quick access to the target file is achieved.

Description

Soft link method and device based on key value database
Technical Field
The disclosure relates to the technical field of computers, in particular to a cloud storage technology, and discloses a soft link method and device based on a key value database.
Background
The object storage system provides stable, safe, efficient and highly extensible storage services. The object storage system can be deployed in a plurality of regions, is convenient for providing multi-region services for users to access nearby, and is suitable for various scenes such as data distribution, data backup, big data analysis, audio and video file processing and the like. When a user changes or the function of the object storage system is improved due to self business requirements and only one version of a similar file or the same file needs to be stored, normal access can be provided for different requests through soft links.
Disclosure of Invention
The present disclosure provides a soft link method, apparatus, device, storage medium and computer program product based on a key-value database.
According to a first aspect, the present disclosure provides a soft link method based on a key-value database, including: acquiring and analyzing request information of a user, and determining a request file indicated by the request information; searching metadata of a request file from a key value database, wherein keys of key value pairs in the key value database correspond to file names, and the values correspond to the metadata of the file; and responding to the fact that the soft link identification exists in the metadata of the request file, determining that the request file is the soft link file, and accessing a target file pointed by the soft link file.
According to a second aspect, the present disclosure provides a key-value store-based soft-linking apparatus, comprising: the determining unit is configured to acquire and analyze request information of a user, and determine a request file indicated by the request information; a lookup unit configured to lookup metadata of a request file from a key-value database, wherein a key of a key-value pair in the key-value database corresponds to a file name and a value corresponds to metadata of the file; and the access unit is configured to respond to the fact that the soft link identification exists in the metadata of the request file, determine that the request file is the soft link file, and access the target file pointed by the soft link file.
According to a third aspect, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the first aspect.
According to a fourth aspect, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any of the first aspects above.
According to a fifth aspect, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method of any of the first aspects described above.
According to the technology disclosed by the invention, the soft link method based on the key value database is provided by storing the soft link file information through the key value pairs in the key value database, so that the target file can be quickly accessed.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a key-value store based soft-link method according to the present disclosure;
FIG. 3 is a schematic diagram of one application scenario of a key-value store based soft-link approach in accordance with the present disclosure;
FIG. 4 is a flow diagram of yet another embodiment of a key-value store based soft-linking method according to the present disclosure;
FIG. 5 is a flow diagram of one embodiment of key-value store based soft-link device coordination, according to the present disclosure;
fig. 6 is a schematic structural diagram of a computer system of an electronic device/terminal device or server suitable for implementing embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 illustrates an exemplary architecture 100 to which the key-value store based soft-link method and apparatus of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The terminal devices 101, 102, 103 may be hardware devices or software that support network connections for data interaction and data processing. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices supporting network connection, information acquisition, interaction, display, processing, and the like, including but not limited to smart phones, tablet computers, car computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background processing server that receives and parses request information of the terminal devices 101, 102, and 103, determines a request file indicated by the request information, and determines and accesses a target file pointed to by a soft link file when the request file is the soft link file. The background processing server searches the metadata of the request file from the key value database, responds to the fact that the soft link identification exists in the metadata of the request file, determines that the request file is the soft link file, and accesses a target file pointed by the soft link file. As an example, the server 105 may be a cloud server.
The server may be hardware or software. When the server is hardware, it may be implemented as a distributed server cluster formed by multiple servers, or may be implemented as a single server. When the server is software, it may be implemented as multiple pieces of software or software modules (e.g., software or software modules used to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be further noted that the soft link method based on the key-value database provided by the embodiment of the present disclosure may be executed by a server, or may be executed by a terminal device, or may be executed by the server and the terminal device in cooperation with each other. Accordingly, each part (for example, each unit and each module) included in the soft link device based on the key value database may be entirely disposed in the server, may be entirely disposed in the terminal device, and may be disposed in the server and the terminal device, respectively.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. When the electronic device on which the soft-link method based on the key-value database operates does not need to perform data transmission with other electronic devices, the system architecture may include only the electronic device (e.g., a server or a terminal device) on which the soft-link method based on the key-value database operates.
With continued reference to FIG. 2, a flow 200 of one embodiment of a key-value store based soft-link method is shown, comprising the steps of:
step 201, obtaining and analyzing the request information of the user, and determining the request file indicated by the request information.
In this embodiment, an executing body (e.g., the server in fig. 1) of the soft link method based on the key-value store may obtain and parse the request information of the user, so as to determine the request file indicated by the request information.
The request information may be any type of request for requesting a file, including but not limited to a read request, a write request, and a delete request. The request information carries the file information of the requested file. For example, the file information is a file name. After acquiring the request information of the user, the execution main body may parse the request information, and determine the request file indicated by the request information according to a parsing result.
It should be noted that the request file may be a normal file used for representing information such as audio and video, text, and the like, or may be a soft link file. The soft link file comprises the path name of the pointed target file and is connected with the target file in a soft link mode, so that a user can realize a request for the target file corresponding to the soft link file based on the request for the soft link file.
Step 202, the metadata of the requested file is looked up from the key-value store.
In this embodiment, the execution subject may search the metadata of the request file from the key value database.
The key value database comprises a plurality of key value pairs, and each key value pair corresponds to one request file. In particular, the key of a key-value pair corresponds to a file name and the value corresponds to metadata of the file. Metadata, also called intermediate data and relay data, is data describing the requested file, mainly describing the attribute of the requested file, and is used to support functions such as indicating storage location, history data, resource search, file record, and the like.
The execution main body may compare the file name of the request file with file names corresponding to the key value pairs in the key value database, and determine metadata in the key value pair corresponding to the file name consistent with the file name of the request file as metadata of the request file.
It should be noted that, when the request file is a soft link file, the metadata of the request file includes a soft link identifier and a file name of a target file pointed by the request file. The soft link identifier is used for representing that the file corresponding to the metadata is a soft link file. Wherein, the soft link identification can be any identification with identification. As an example, the soft link identification may be a preset character.
Step 203, in response to determining that the metadata of the request file contains the soft link identifier, determining that the request file is a soft link file, and accessing a target file pointed by the soft link file.
In this embodiment, the execution main body determines that the request file is a soft link file in response to determining that the metadata of the request file includes the soft link identifier, and accesses a target file pointed by the soft link file.
As an example, the execution body may determine a path name of a target file pointed to by the soft link file and determine a file name of the target file according to metadata of the soft link file, thereby accessing the target file pointed to by the soft link file.
With continued reference to fig. 3, fig. 3 is a schematic diagram of an application scenario of the soft link method based on the key-value store database according to the present embodiment. In the application scenario shown in fig. 3, a user 301 sends a read request to a server 303 via a terminal device 302. The server 303 acquires and parses the read request of the user 301, determines the request file 304 indicated by the request information, and the file name of the request file 304 is "file 3". The server 303 then compares the file name "file 3" of the request file 304 with the file name corresponding to each key-value pair in the key-value database 305 from the key-value database 305, and determines the value of the key-value pair representing "file 3" in the key of each key-value pair as the metadata 3041 of the request file 304. Where the key of a key-value pair in the key-value database 305 corresponds to a file name and the value corresponds to metadata of the file. Finally, the server 303 determines that the requested file is a soft-link file and accesses the target file 306 pointed to by the soft-link file in response to determining that the soft-link identifier exists in the metadata of the requested file 304.
In this embodiment, according to the technology disclosed in the present disclosure, a soft link method based on a key value database is provided by storing soft link file information by key value pairs in the key value database, so as to achieve quick access to a target file.
In some optional implementations of this embodiment, the executing main body may execute the step 201 as follows:
first, the request information is analyzed, and a first authentication is performed on the user.
Wherein, the first authentication is used for verifying whether the user has the authority of requesting the request file. After the execution main body analyzes the request information, the request file indicated by the request information can be determined, so that the authority of the user for requesting the request file is authenticated. As an example, when the request information is a read request, the execution main body may determine whether the user has a read right of the requested file.
Second, in response to determining that the user authentication is successful, a request file is obtained.
By the implementation mode, the execution main body authenticates the request information of the user before acquiring the request file, and the safety of the information request is improved.
In some optional implementations of the embodiment, the execution subject may access the target file pointed to by the soft link file by:
first, according to the file name of the target file represented by the soft link identifier, metadata of the target file is searched from a key value database. In this implementation, the file information of the target file pointed to by the soft link file is also stored by the key value database.
Second, the target file is accessed based on the metadata of the target file.
As an example, the metadata is information indicating a storage location of the target file, and the execution main body accesses the target file according to the information indicating the storage location of the target file. In this implementation, the file information of the target file is also stored based on the key-value database. The execution main body can access the target file based on the meta information of the target file in the key value database, and the access efficiency of the target file is improved.
When it is determined that the soft link identifier does not exist in the metadata of the request file, the request file is determined to be a common file similar to the target file, the execution main body can search the metadata of the common file represented by the request file from the key value database, and access the common file according to the metadata of the common file.
In some optional implementations of this embodiment, the executing body may execute the first step by:
first, a second authentication is performed for the user. Wherein the second authentication is used to verify whether the user has the right to request the target file. Then, in response to determining that the user authentication is successful, metadata of the target file is looked up from a key-value database according to the file name of the target file characterized by the soft-link identifier.
In the implementation mode, before the target file is acquired, the execution main body authenticates the request information of the user, and the safety of the information request is improved.
It is understood that the executing entity may perform a first authentication for the request information of the soft link file by the user, perform a second authentication for the request information of the target file by the user after the first authentication is successful, and enable the user to request the target file after the second authentication is successful. The security of the information request can be further improved by the double authentication of the user.
In some optional implementations of this embodiment, a process of establishing a soft link is further included. The execution subject may establish the soft link between the soft link file and the target file by:
firstly, a soft link establishing request carrying a file name of a target file is received, and a soft link file is generated. Secondly, adding a key value pair corresponding to the soft link file in the key value database, and establishing a soft link of the soft link file aiming at the target file. The metadata of the soft link file comprises the file name of the target file. Specifically, the execution body may set a file name of the target file as a soft link identifier of the soft link file. In the implementation mode, a mode for realizing soft link based on the key value database is provided.
In some optional implementations of this embodiment, the executing body may execute the first step by:
firstly, a soft link establishment request carrying the file name of a target file is received, and third authentication is carried out on a user sending the soft link establishment request. Wherein the third authenticated user verifies whether the user making the soft link establishment request has the right to establish the soft link of the target file. A soft link file is then generated in response to determining that the user issuing the soft link establishment request is successfully authenticated. In the implementation mode, the third authentication is carried out on the user sending the soft link establishment request before the soft link file is generated, so that the safety of the soft link establishment process is improved.
In some optional implementations of this embodiment, the soft link establishment request includes file processing mode information of the same name. The homonym file processing mode information is used for representing a processing mode when homonym files of the soft link files exist in the key value database. As an example, the homonym file processing mode information is used to characterize that, when a homonym file of the soft-link file exists in the key value database, the generated metadata of the soft-link file is overwritten on the metadata of the key value pair corresponding to the homonym file in the key value database.
And the execution main body responds to the fact that the same-name file of the soft link file exists in the key value database, adds the key value pair corresponding to the soft link file in the key value database according to the indication of the processing mode information of the same-name file, and establishes the soft link of the soft link file aiming at the target file. The realization mode establishes the soft link of the soft link file aiming at the target file based on the indication of the homonymous file processing mode information, thereby improving the flexibility in the soft link establishing process.
With continuing reference to FIG. 4, a schematic flow chart 400 illustrating another embodiment of a key-value store based soft-link method in accordance with the present application is shown and includes the steps of:
step 401, receiving a soft link establishment request carrying a file name of a target file and information of a same-name file processing mode, and performing third authentication on a user sending the soft link establishment request.
Wherein the third authenticated user verifies whether the user making the soft link establishment request has the right to establish the soft link of the target file.
Step 402, in response to determining that the user sending the soft link establishment request is successfully authenticated and determining that the same-name file as the soft link file exists in the key value database, adding a key value pair corresponding to the soft link file in the key value database according to the indication of the processing mode information of the same-name file, and establishing a soft link of the soft link file for the target file.
Step 403, obtaining and analyzing the request information of the user, and performing a first authentication on the user.
Wherein, the first authentication is used for verifying whether the user has the authority of requesting the request file.
In response to determining that the user authentication is successful, a request file is obtained, STEP 404.
Step 405, the metadata of the requested file is looked up from the key-value database.
Wherein the key of the key-value pair in the key-value database corresponds to the file name and the value corresponds to the metadata of the file.
Step 406, in response to determining that the soft link identifier exists in the metadata of the requested file, determining that the requested file is a soft link file.
Step 407, perform a second authentication on the user.
Wherein the second authentication is used to verify whether the user has the right to request the target file.
Step 408, in response to determining that the user authentication is successful, searching metadata of the target file from the key-value database according to the file name of the target file represented by the soft link identifier.
Step 409, accessing the target file according to the metadata of the target file.
In this embodiment, as can be seen from fig. 4, compared with the embodiment corresponding to fig. 2, the process 400 of the soft link method based on the key value database in this embodiment highlights the dual authentication in the soft link establishment and access process based on the key value database, and improves the security and access efficiency of the soft link.
With further reference to fig. 5, as an implementation of the method shown in fig. 2 described above, the present disclosure provides an embodiment of a soft-linking apparatus based on a key-value database, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the embodiment of the apparatus may include the same or corresponding features as the embodiment of the method shown in fig. 2, in addition to the features described below, and produce the same or corresponding effects as the embodiment of the method shown in fig. 2. The device can be applied to various electronic equipment.
As shown in fig. 5, the soft link device based on the key-value database of the present embodiment includes: a determining unit 501 configured to acquire and parse request information of a user, and determine a request file indicated by the request information; a lookup unit 502 configured to lookup metadata of a request file from a key-value database, wherein a key of a key-value pair in the key-value database corresponds to a file name and a value corresponds to metadata of the file; the accessing unit 503 is configured to, in response to determining that the soft link identifier exists in the metadata of the request file, determine that the request file is a soft link file, and access a target file pointed to by the soft link file.
In some optional implementations of this embodiment, the determining unit 501 is further configured to: analyzing the request information, and performing first authentication on the user, wherein the first authentication is used for verifying whether the user has the authority of requesting the file; and responding to the confirmation that the user authentication is successful, and acquiring the request file.
In some optional implementations of this embodiment, the soft link identifier represents a file name of a target file pointed to by the soft link file; an access unit 503, further configured to: searching metadata of the target file from a key value database according to the file name of the target file represented by the soft link identifier; and accessing the target file according to the metadata of the target file.
In some optional implementations of this embodiment, the accessing unit 503 is further configured to: performing second authentication on the user, wherein the second authentication is used for verifying whether the user has the authority of requesting the target file; and in response to determining that the user authentication is successful, searching the metadata of the target file from the key value database according to the file name of the target file represented by the soft link identifier.
In some optional implementations of this embodiment, the apparatus further includes: a generating unit (not shown in the figure) configured to receive a soft link establishment request carrying a file name of a target file, and generate a soft link file; and an establishing unit (not shown in the figure) configured to add a key value pair corresponding to the soft link file in the key value database, and establish a soft link of the soft link file with respect to the target file, wherein the metadata of the soft link file includes a file name of the target file.
In some optional implementations of this embodiment, the generating unit (not shown in the figure) is further configured to: receiving a soft link establishment request carrying a file name of a target file, and performing third authentication on a user sending the soft link establishment request, wherein the third authentication user verifies whether the user sending the soft link establishment request has the authority of establishing the soft link of the target file; in response to determining that the user issuing the soft link establishment request is successfully authenticated, a soft link file is generated.
In some optional implementation manners of this embodiment, the soft link establishment request includes information on processing manners of the file with the same name, where the information on processing manners of the file with the same name is used to represent a processing manner when the file with the same name as the soft link file exists in the key value database; a setup unit (not shown in the figure) further configured to: and in response to the fact that the same-name file of the soft link file exists in the key value database, adding a key value pair corresponding to the soft link file in the key value database according to the indication of the processing mode information of the same-name file, and establishing a soft link of the soft link file aiming at the target file.
In this embodiment, a soft link method based on a key value database is provided by storing soft link file information by key value pairs in the key value database, so as to realize quick access to a target file.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 601 performs the various methods and processes described above, such as a key-value store-based soft-link method. For example, in some embodiments, the soft-link method based on key-value store may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the key-value store-based soft-linking method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the key-value store-based soft-link method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can 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. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A soft link method based on a key-value database comprises the following steps:
acquiring and analyzing request information of a user, and determining a request file indicated by the request information;
searching metadata of the request file from a key value database, wherein keys of key value pairs in the key value database correspond to file names, and the values correspond to the metadata of the file;
and responding to the fact that the soft link identification exists in the metadata of the request file, determining that the request file is a soft link file, and accessing a target file pointed by the soft link file.
2. The method of claim 1, wherein the parsing the request information of the user and determining the request file indicated by the request information comprises:
analyzing the request information, and performing a first authentication on the user, wherein the first authentication is used for verifying whether the user has the authority of requesting the request file;
and responding to the confirmation that the user authentication is successful, and acquiring the request file.
3. The method of claim 1, wherein the soft link identification characterizes a file name of a target file pointed to by the soft link file;
the accessing the target file pointed by the soft link file comprises the following steps:
searching metadata of the target file from the key value database according to the file name of the target file represented by the soft link identifier;
and accessing the target file according to the metadata of the target file.
4. The method of claim 3, wherein the looking up metadata for the target file from the key-value store according to the file name of the target file characterized by the soft link identification comprises:
performing a second authentication on the user, wherein the second authentication is used for verifying whether the user has the authority of requesting the target file;
and in response to determining that the user authentication is successful, searching the metadata of the target file from the key value database according to the file name of the target file represented by the soft link identifier.
5. The method of claim 1, wherein before the obtaining and parsing the request information of the user and determining the request file indicated by the request information, further comprising:
receiving a soft link establishment request carrying the file name of the target file, and generating the soft link file;
and adding a key value pair corresponding to the soft link file in the key value database, and establishing a soft link of the soft link file aiming at the target file, wherein the metadata of the soft link file comprises the file name of the target file.
6. The method of claim 5, wherein the receiving a soft link setup request carrying a file name of the target file and generating the soft link file comprises:
receiving a soft link establishment request carrying the file name of the target file, and performing third authentication on the user sending the soft link establishment request, wherein the third authentication user verifies whether the user sending the soft link establishment request has the authority of establishing the soft link of the target file;
and generating the soft link file in response to determining that the user who sent the soft link establishment request successfully authenticates.
7. The method according to claim 5, wherein the soft link establishment request includes homonym file processing mode information, wherein the homonym file processing mode information is used for representing a processing mode when a homonym file with the soft link file exists in the key-value database;
adding a key value pair corresponding to the soft link file in the key value database, and establishing a soft link of the soft link file aiming at the target file, wherein the soft link comprises the following steps:
and in response to determining that the same-name file as the soft link file exists in the key value database, adding a key value pair corresponding to the soft link file in the key value database according to the indication of the processing mode information of the same-name file, and establishing a soft link of the soft link file for the target file.
8. A key-value store based soft-linking apparatus, comprising:
the determining unit is configured to acquire and analyze request information of a user, and determine a request file indicated by the request information;
a lookup unit configured to lookup metadata of the requested file from a key-value database, wherein a key of a key-value pair in the key-value database corresponds to a file name and a value corresponds to metadata of a file;
and the access unit is configured to respond to the fact that the soft link identification exists in the metadata of the request file, determine that the request file is a soft link file, and access a target file pointed by the soft link file.
9. The apparatus of claim 8, wherein the determining unit is further configured to:
analyzing the request information, and performing a first authentication on the user, wherein the first authentication is used for verifying whether the user has the authority of requesting the request file; and responding to the confirmation that the user authentication is successful, and acquiring the request file.
10. The apparatus of claim 8, wherein the soft link identification characterizes a file name of a target file pointed to by the soft link file;
the access unit, further configured to:
searching metadata of the target file from the key value database according to the file name of the target file represented by the soft link identifier; and accessing the target file according to the metadata of the target file.
11. The apparatus of claim 10, wherein the access unit is further configured to:
performing a second authentication on the user, wherein the second authentication is used for verifying whether the user has the authority of requesting the target file; and in response to determining that the user authentication is successful, searching the metadata of the target file from the key value database according to the file name of the target file represented by the soft link identifier.
12. The apparatus of claim 8, further comprising:
a generating unit configured to receive a soft link establishment request carrying a file name of the target file, and generate the soft link file;
the establishing unit is configured to add a key value pair corresponding to the soft link file in the key value database, and establish a soft link of the soft link file for the target file, wherein metadata of the soft link file comprises a file name of the target file.
13. The apparatus of claim 12, wherein the generating unit is further configured to:
receiving a soft link establishment request carrying the file name of the target file, and performing third authentication on the user sending the soft link establishment request, wherein the third authentication user verifies whether the user sending the soft link establishment request has the authority of establishing the soft link of the target file; and generating the soft link file in response to determining that the user who sent the soft link establishment request successfully authenticates.
14. The apparatus according to claim 12, wherein the soft link establishment request includes information on how to process files with the same name, wherein the information on how to process files with the same name is used to characterize how to process files with the same name as the soft link files in the key-value database;
the establishing unit is further configured to:
and in response to determining that the same-name file as the soft link file exists in the key value database, adding a key value pair corresponding to the soft link file in the key value database according to the indication of the processing mode information of the same-name file, and establishing a soft link of the soft link file for the target file.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN202011533262.6A 2020-12-22 2020-12-22 Soft link method and device based on key value database Active CN112527802B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011533262.6A CN112527802B (en) 2020-12-22 2020-12-22 Soft link method and device based on key value database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011533262.6A CN112527802B (en) 2020-12-22 2020-12-22 Soft link method and device based on key value database

Publications (2)

Publication Number Publication Date
CN112527802A true CN112527802A (en) 2021-03-19
CN112527802B CN112527802B (en) 2023-11-10

Family

ID=74975839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011533262.6A Active CN112527802B (en) 2020-12-22 2020-12-22 Soft link method and device based on key value database

Country Status (1)

Country Link
CN (1) CN112527802B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110161344A1 (en) * 2009-12-30 2011-06-30 International Business Machines Corporation Enhancing soft file system links
US20120110018A1 (en) * 2010-11-02 2012-05-03 International Business Machines Corporation Identifying symbolic links
CN106095341A (en) * 2016-06-14 2016-11-09 乐视控股(北京)有限公司 Method for managing object and Object Management System
CN110019010A (en) * 2017-11-14 2019-07-16 阿里巴巴集团控股有限公司 Processing method, device, equipment and machine readable media
CN110688430A (en) * 2019-08-22 2020-01-14 阿里巴巴集团控股有限公司 Method and device for obtaining data bypass and electronic equipment
CN111831208A (en) * 2019-04-16 2020-10-27 中移(苏州)软件技术有限公司 Information processing method and device, terminal equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110161344A1 (en) * 2009-12-30 2011-06-30 International Business Machines Corporation Enhancing soft file system links
US20120110018A1 (en) * 2010-11-02 2012-05-03 International Business Machines Corporation Identifying symbolic links
CN106095341A (en) * 2016-06-14 2016-11-09 乐视控股(北京)有限公司 Method for managing object and Object Management System
CN110019010A (en) * 2017-11-14 2019-07-16 阿里巴巴集团控股有限公司 Processing method, device, equipment and machine readable media
CN111831208A (en) * 2019-04-16 2020-10-27 中移(苏州)软件技术有限公司 Information processing method and device, terminal equipment and storage medium
CN110688430A (en) * 2019-08-22 2020-01-14 阿里巴巴集团控股有限公司 Method and device for obtaining data bypass and electronic equipment

Also Published As

Publication number Publication date
CN112527802B (en) 2023-11-10

Similar Documents

Publication Publication Date Title
US11368447B2 (en) Oauth2 SAML token service
CN110019263B (en) Information storage method and device
CN113761565B (en) Data desensitization method and device
CN108959294B (en) Method and device for accessing search engine
US20220414095A1 (en) Method of processing event data, electronic device, and medium
CN113946816A (en) Cloud service-based authentication method and device, electronic equipment and storage medium
CN112052152A (en) Simulation test method and device
CN113722007B (en) Configuration method, device and system of VPN branch equipment
CN112527802B (en) Soft link method and device based on key value database
CN114218586B (en) Business data intelligent management method and device, electronic equipment and storage medium
CN107203714B (en) Configuration method and device of data verification file
CN113824675B (en) Method and device for managing login state
CN114091909A (en) Collaborative development method, system, device and electronic equipment
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium
CN112214500A (en) Data comparison method and device, electronic equipment and storage medium
CN113590447B (en) Buried point processing method and device
CN117131071B (en) Data processing method, device, electronic equipment and computer readable medium
CN116301869B (en) Front-end page configuration management and control system, method, equipment and medium
CN110262756B (en) Method and device for caching data
CN113626409B (en) Test data processing method, device, equipment and storage medium
CN112965747B (en) Method, apparatus, device and computer readable medium for mining code loopholes
CN109446183B (en) Global anti-duplication method and device
CN116932558A (en) Form data processing method and device
CN108536362B (en) Method and device for identifying operation and server
CN115658609A (en) File viewing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant