Distributed storage system server, distributed storage system, data storage and data access method and system
The server of the distributed storage system uses metadatabase and instruction set to identify storage modes, and uniformly manages multiple storage modes, solving the problem of increasing development costs when storing and accessing multiple data modes in the existing technology, and achieving efficient data storage and access operations.
Patent Information
- Application Number
- CN202010813105.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-13
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2040-08-13
AI Technical Summary
The prior art lacks a method of uniformly managing multiple data storage modes, resulting in the need to sense the storage mode in advance and use different computer languages when storing or accessing data in multiple storage modes, increasing development costs.
Provide a server of a distributed storage system that identifies the storage mode of the target data through metadata and instruction sets, performs data operations in a matching manner, manages multiple storage modes in a unified manner, and processes data storage and access requests using a unified computer language. .
Reduce application development costs, avoid using different computer languages for different storage modes, and realize unified management and operation of multiple storage modes.
Smart Images

Figure CN114079659B_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of Internet technology, and in particular to a server of a distributed storage system, a distributed storage system, and a method and system for data storage and data access. Background Art
[0002] In a distributed application scenario, multiple data are usually stored in multiple storage devices, and multiple storage devices may have two or more types of storage modes, such as a database (DB)-based storage mode, a GIT warehouse-based storage mode, or a local file storage mode. Different storage modes require the use of different computer languages to perform operations such as data storage and data access. The prior art lacks a unified management method that uses a unified computer language to store or access data stored in multiple storage modes. As a result, when the application platform stores or accesses data stored in multiple storage modes, it needs to perceive the storage mode corresponding to the underlying data in advance, and use different computer languages and programs for different storage modes, thereby doing a lot of extra work.
[0003] Therefore, there is a need for a server of a distributed storage system, a distributed storage system, a method and a system for data storage and data access that can uniformly manage multiple data storage modes, thereby reducing costs. Summary of the invention
[0004] The present specification provides a server of a distributed storage system capable of uniformly managing multiple data storage modes, a distributed storage system, a method and a system for data storage and data access, thereby reducing costs.
[0005] In a first aspect, the present specification provides a server of a distributed storage system, wherein the server is communicatively connected to a plurality of storage devices of the distributed storage system when the server is running, and the plurality of storage devices store a plurality of content data in at least two storage modes, and the server comprises at least one storage medium and at least one processor, the at least one storage medium comprising at least one instruction set for performing data operations on the plurality of content data, and the at least one storage medium stores a storage mode corresponding to each of the plurality of content data; the at least one processor is communicatively connected to the at least one storage medium and the plurality of storage devices of the distributed storage system, and reads the at least one instruction set when the server is running and executes: receiving a data operation request for target data, the plurality of content data including the target data; determining a target storage mode corresponding to the target data, the at least two storage modes including the target storage mode; and performing the data operation on the target data on the plurality of storage devices in a manner matching the target storage mode.
[0006] In some embodiments, the at least one storage medium further includes a metadata database storing metadata of each of the plurality of content data, wherein the metadata includes a storage mode corresponding to the current content data.
[0007] In some embodiments, determining the target storage mode corresponding to the target data includes: matching the target data with metadata in the metadata database to determine the metadata of the target data; and determining the target storage mode corresponding to the target data based on the metadata of the target data.
[0008] In some embodiments, the at least two storage modes are incompatible with each other.
[0009] In some embodiments, the at least two storage modes include: a database-based storage mode and a GIT repository-based storage mode.
[0010] In some embodiments, the at least one instruction set includes at least two data processing instructions and a calling instruction, the at least two data processing instructions correspond to the at least two storage modes, and are configured to instruct the at least one processor to perform the data operation in a manner matching the corresponding storage mode; and a calling instruction, based on the storage mode corresponding to each content data among the multiple content data, drives the data processing instruction corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions.
[0011] In some embodiments, performing the data operation on the target data in a manner matching the target storage mode includes: according to the target storage mode, driving the data processing instruction corresponding to the target storage mode through the call instruction to perform the data operation.
[0012] In some embodiments, the at least one storage medium further includes a data subscription relationship library storing association relationships between the plurality of content data and applications.
[0013] In some embodiments, the data operation request includes at least one of a data storage request and a data access request, and the data operation includes at least one of data storage and data access.
[0014] In a second aspect, the present specification provides a distributed storage system, comprising a plurality of storage devices storing a plurality of content data in at least two storage modes, and the server described in the first aspect of the present specification.
[0015] In a third aspect, the present specification provides a method for data storage, which is applied to a server of the distributed storage system described in the first aspect of the present specification, the method comprising, through the at least one processor: receiving a data storage request for target data, the data storage request comprising a request to write content to the target data, the multiple content data including the target data; determining a target storage mode corresponding to the target data, the at least two storage modes including the target storage mode; and writing the content to the target data in a manner matching the target storage mode.
[0016] In some embodiments, determining the target storage mode corresponding to the target data includes: matching the target data with metadata in the metadata database to determine the metadata of the target data; and determining the target storage mode corresponding to the target data based on the metadata of the target data.
[0017] In some embodiments, the at least one instruction set includes at least two data processing instructions and a calling instruction, the at least two data processing instructions correspond to the at least two storage modes, and are configured to instruct the at least one processor to perform the data storage in a manner matching the corresponding storage mode; and a calling instruction, based on the storage mode corresponding to each content data among the multiple content data, drives the data processing instruction corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions.
[0018] In some embodiments, writing the content into the target data in a manner that matches the target storage mode includes: according to the target storage mode, driving the data processing instructions corresponding to the target storage mode through the calling instruction, and writing the content into the target data in the target storage mode.
[0019] In some embodiments, the at least one storage medium further includes a data subscription relationship library storing association relationships between the plurality of content data and applications.
[0020] In a fourth aspect, the present specification provides a method for data access, which is applied to a server of the distributed storage system described in the first aspect of the present specification, the method comprising: receiving, through the at least one processor: a data access request sent by a target application, the data access request comprising a request for data access to content of target data, the multiple content data including the target data; determining a target storage mode corresponding to the target data, the at least two storage modes including the target storage mode; performing the data access on the content of the target data in a manner matching the target storage mode to obtain the content of the target data; and sending the content of the target data to the target application.
[0021] In some embodiments, determining the target storage mode corresponding to the target data includes: matching the target data with metadata in the metadata database to determine the metadata of the target data; and determining the target storage mode corresponding to the target data based on the metadata of the target data.
[0022] In some embodiments, the at least one storage medium further includes a data subscription relationship library storing association relationships between the plurality of content data and applications, wherein the applications include the target application.
[0023] In some embodiments, receiving a data access request sent by a target application includes: receiving a data subscription relationship query request sent by the target application; matching the target application with data in the data subscription relationship library to determine the target data that has an associated relationship with the target application; sending the target data to the target application; and receiving the data access request sent by the target application.
[0024] In some embodiments, receiving the data access request sent by the target application includes: receiving the data access request sent by the target application; matching the target application with the data in the data subscription relationship library to determine the target data that is associated with the target application.
[0025] In some embodiments, the at least one instruction set includes at least two data processing instructions and a calling instruction, the at least two data processing instructions correspond to the at least two storage modes, and are configured to instruct the at least one processor to perform the data access in a manner matching the corresponding storage mode; and the calling instruction drives the data processing instruction corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions based on the storage mode corresponding to each content data among the multiple content data.
[0026] In some embodiments, obtaining the content of the target data includes: according to the target storage mode, driving the data processing instructions corresponding to the target storage mode through the calling instruction, and obtaining the content of the target data in a manner matching the target storage mode.
[0027] In a fifth aspect, the present specification provides a method for data access, which is applied to a target application, and the target application is installed on a client. The method includes: sending a data access request to a server, and the data access request includes a request by the target application to access the content of target data, wherein the server stores a target storage mode corresponding to the target data, and when the server runs, based on the target storage mode, the server performs the data access in a manner matching the target storage mode to obtain the content of the target data; and obtains the content of the target data sent by the server.
[0028] In some embodiments, sending a data access request to a server includes: sending a data subscription relationship query request to the server, the data subscription relationship query request including a request to query the target data associated with the target application; receiving a query result sent by the server, the query result including the target data that has an association relationship with the target application; and sending the data access request for the target data to the server.
[0029] In some embodiments, the acquiring the content of the target data sent by the server includes: storing the content of the target data in the client in a database-based storage mode; and acquiring the content of the target data.
[0030] In some embodiments, obtaining the content of the target data includes at least one of the following situations: obtaining the content of the target data based on the data access layer of the target application; and obtaining the content of the target data based on the application programming interface (API) of the target application.
[0031] In a sixth aspect, the present specification provides a data access system, comprising at least one storage medium and at least one processor, the at least one storage medium comprising at least one instruction set for data access; and the at least one processor is communicatively connected to the at least one storage medium, wherein when the system is running, the at least one processor reads the at least one instruction set and executes the data access method described in the fifth aspect of this specification according to the instructions of the at least one instruction set.
[0032] It can be seen from the above technical solutions that the server of the distributed storage system, the distributed storage system, the method and system for data storage and data access provided in this specification record the storage mode corresponding to each data in the server of the distributed storage system. When the application platform performs data storage or data access on the distributed storage system, the server queries the storage mode corresponding to the data, thereby calling the program or instruction matching the storage mode corresponding to the data to perform storage or access operations on the data. Therefore, the application platform does not need to perceive the storage mode corresponding to the data, and does not need to use different computer languages for different storage modes. It only needs to send a request for data storage or data access to the server through a unified computer language, and the server can call the corresponding computer language according to the storage mode corresponding to the data to perform data storage or access operations, thereby saving the development cost of the application.
[0033] Other functions of the server of the distributed storage system, the distributed storage system, the method and system of data storage and data access provided in this specification will be partially listed in the following description. Based on the description, the contents introduced by the following figures and examples will be obvious to those of ordinary skill in the art. The creative aspects of the server of the distributed storage system, the distributed storage system, the method and system of data storage and data access provided in this specification can be fully explained by practicing or using the methods, devices and combinations described in the following detailed examples. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] In order to more clearly illustrate the technical solutions in the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0035] Figure 1 A schematic diagram of an application scenario of a distributed storage system provided according to an embodiment of this specification is shown;
[0036] Figure 2 A schematic diagram of a server device provided according to an embodiment of this specification is shown;
[0037] Figure 3 A flow chart of a data storage method provided according to an embodiment of this specification is shown;
[0038] Figure 4 A flow chart of a method for data access provided according to an embodiment of this specification is shown;
[0039] Figure 5A flow chart of a method for receiving a data access request sent by a target application according to an embodiment of this specification is shown;
[0040] Figure 6 A flow chart of a method for data access provided according to an embodiment of this specification is shown. DETAILED DESCRIPTION
[0041] The following description provides specific application scenarios and requirements of this specification, with the purpose of enabling those skilled in the art to make and use the contents of this specification. Various local modifications to the disclosed embodiments will be apparent to those skilled in the art, and the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of this specification. Therefore, this specification is not limited to the embodiments shown, but to the widest scope consistent with the claims.
[0042] The terms used herein are only used for the purpose of describing specific example embodiments and are not restrictive. For example, unless the context clearly indicates otherwise, as used herein, the singular forms "a", "an" and "the" may also include plural forms. When used in this specification, the terms "include", "comprise" and / or "contain" mean that the associated integers, steps, operations, elements and / or components exist, but do not exclude the existence of one or more other features, integers, steps, operations, elements, components and / or groups or that other features, integers, steps, operations, elements, components and / or groups may be added in the system / method.
[0043] In view of the following description, these and other features of the present specification, as well as the operation and function of the related elements of the structure, and the economy of the combination and manufacture of the parts can be significantly improved. Reference is made to the accompanying drawings, all of which form a part of this specification. However, it should be clearly understood that the drawings are for illustration and description purposes only and are not intended to limit the scope of this specification. It should also be understood that the drawings are not drawn to scale.
[0044] The flowcharts used in this specification illustrate the operations implemented by the system according to some embodiments in this specification. It should be clearly understood that the operations of the flowcharts may not be implemented in sequence. On the contrary, the operations may be implemented in reverse order or simultaneously. In addition, one or more other operations may be added to the flowchart. One or more operations may be removed from the flowchart.
[0045] In order to facilitate the description of the server of the distributed storage system, the distributed storage system, the data storage and data access method and system provided in this specification, first, the terms involved in the description are explained as follows:
[0046] Database: It can be regarded as an electronic file cabinet, a place to store electronic files in a certain way. Users can add, intercept, update, delete and other operations on the data in the database. The database can include relational databases, time series databases, key-value databases, document databases, etc. For example, MySQL, MariaDB, PostgreSQL, Oracle database, etc.
[0047] GIT repository: GIT is an open source distributed version control system that can effectively and quickly handle version management of projects from very small to very large.
[0048] Data name: In the GIT repository, the data name is the warehouse name of the GIT repository; in the database, the data name is the table name of the data table.
[0049] Data primary key: unique identifier of data. In the GIT repository, the data primary key is the prefix of the file name; in the database, the data primary key is the row record primary key of the data table, and its value can uniquely identify each row.
[0050] Figure 1 A schematic diagram of an application scenario of a distributed storage system 001 is shown.
[0051] like Figure 1 As shown, user 110 may be a user of client 300. Client 300 may be a terminal device carrying at least one application (APP). The application may establish a communication connection with the server corresponding to the application through client 300. Client 300 may be in communication connection with system 001. In some embodiments, client 300 may be installed with one or more applications. The applications include, but are not limited to: chat applications, shopping applications, video applications, financial management applications, and the like. The target application may be an application corresponding to distributed storage system 001 in client 300, and the target application may establish a communication connection with distributed storage system 001, and may perform data operations such as data storage and / or data access on distributed storage system 001. Configuration parameters associated with the target application may be stored in distributed storage system 001. When the target application is started, the configuration parameters may be obtained from distributed storage system 001 through the communication connection between the target application and distributed storage system 001.
[0052] In some embodiments, the client 300 may include a mobile device 300-1, a tablet computer 300-2, a laptop computer 300-3, a built-in device of a motor vehicle 300-4, or the like, or any combination thereof. In some embodiments, the mobile device 300-1 may include a smart home device, a smart mobile device, or the like, or any combination thereof. In some embodiments, the smart home device may include a smart TV, a desktop computer, or the like, or any combination thereof. In some embodiments, the smart mobile device may include a smart phone, a personal digital assistant, or the like, or any combination thereof. In some embodiments, the client 300 may be a device with positioning technology for locating the position of the client 300.
[0053] Network 120 may facilitate the exchange of information and / or data. Figure 1 As shown, the client 300 and the distributed storage system 001 can be connected to the network 120, and information and / or data can be transmitted to each other through the network 120. For example, the distributed storage system 001 can obtain a service request from the client 300 through the network 120. The client 300 can obtain configuration parameters from the distributed storage system 001 through the network 120. In some embodiments, the network 120 can be any type of wired or wireless network, or a combination thereof. For example, the network 120 can include a cable network, a wired network, an optical fiber network, a telecommunications network, an intranet, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a wide area network (WAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, a near field communication (NFC) network or a similar network. In some embodiments, the network 120 may include one or more network access points. For example, the network 120 may include a wired or wireless network access point, such as a base station and / or an Internet exchange point, through which the client 300 and one or more components of the distributed storage system 001 can connect to the network 120 to exchange data and / or information.
[0054] like Figure 1 As shown, the distributed storage system 001 may include a server 200 and a plurality of storage devices 100 connected in a distributed manner.
[0055] The storage device 100 may store data and / or instructions. In some embodiments, the storage device 100 may store configuration parameters of the target application. In some embodiments, the storage device 100 may store data obtained by the server 200 from the client 300. The server 200 may have access to the storage device 100, and the server 200 may access the data or instructions stored in the storage device 100 through the network 120. In some embodiments, the storage device 100 may be directly connected to the server 200. In some embodiments, the storage device 100 may be part of the server 200. In some embodiments, the storage device 100 may include mass storage, removable storage, volatile read-write memory, read-only memory (ROM) or the like, or any combination thereof. Mass storage may include non-transitory storage mediums such as disks, optical disks, and solid-state drives. Removable storage may include flash drives, floppy disks, optical disks, memory cards, zip disks, tapes, and the like. Typical volatile read-write memory may include random access memory (RAM). RAM may include dynamic RAM (DRAM), double date rate synchronous dynamic RAM (DDR SDRAM), static RAM (SRAM), thyristor RAM (T-RAM) and zero capacitance RAM (Z-RAM), etc. ROM may include mask ROM (MROM), programmable ROM (PROM), virtually programmable ROM (PEROM), electronically programmable ROM (EEPROM), compact disk (CD-ROM) and digital versatile disk ROM, etc.
[0056] Multiple storage devices 100 can store multiple content data. The content data can be the configuration parameters of the application, or the written data from the application, etc. Each content data can include the data name, data primary key, data content (i.e., data value), etc. of the content data. The multiple content data are stored in at least two storage modes in multiple storage devices 100. The at least two storage modes are incompatible with each other, that is, the at least two storage modes use different computer languages for storage and access operations. For example, the at least two storage modes can include a storage mode based on a database (DB), or a storage mode based on a GIT warehouse. In some embodiments, the at least two storage modes can also include a storage mode based on a folder (file), etc. Some of the multiple content data can be stored in the storage device 100 based on a storage mode based on a database (DB), and some can be stored in the storage device 100 based on a storage mode based on a GIT warehouse, and some can be stored in the storage device 100 based on a storage mode based on a folder (file), etc. In some embodiments, multiple storage devices 100 can also communicate with each other to exchange data and information. One content data may be stored in one storage device 100 or in multiple storage devices 100 at the same time.
[0057] The server 200 can be connected to multiple storage devices during operation. The communication connection refers to any form of connection that can directly or indirectly receive information. For example, the server 200 can be connected to multiple storage devices 100 through the network 120. The server 200 can be a proxy server for multiple storage devices 100. The server 200 can receive a request for data operation on the content data and is responsible for performing the data operation on the content data. The data operation request can be at least one of a data storage request and a data access request. The data storage request includes a request to write data content (i.e., data value) to the content data. The data access request includes a request to access the data content (i.e., data value) corresponding to the content data. The data operation request can also be data deletion and data update, etc. The data operation can be an operation performed in response to the data operation request. For example, the data operation can be at least one of data storage and data access. The data storage can include writing data content (i.e., data value) to the content data. The data access can be accessing the data content (i.e., data value) corresponding to the content data. The data operation can also be data deletion and data update, etc. These requests or changes may come from the client 300 or from the application development end. The server 200 may store data or instructions for executing the data storage and data access methods described in this specification, and may execute or be used to execute the data and / or instructions. The server 200 may interact with each storage device 100 in a plurality of storage devices 100, that is, the server 200 may store or write content data in a plurality of storage devices 100, or may read content data from a plurality of storage devices 100. For example, the target application on the client 300 requests data access to a certain content data on the storage device 100, the client 300 sends the data access request to the server 200, the server 200 executes the data access request, reads the content data from the storage device 100 according to the data access request, and returns the result to the target application of the client 300.
[0058] like Figure 1As shown, the user 110 operates the target application on the client 300, and the target application sends a data operation request for the content data to the server 200, and the server 200 can perform a data operation in response to the data operation request. For example, the target application sends a data storage request for the content data to the server 200, and the server 200 can execute the data storage method provided in this specification to write the content into the content data. For another example, the target application sends a data access request for the content data to the server 200, and the server 200 can execute the data access method provided in this specification to obtain the content of the content data and send the content to the target application.
[0059] Figure 2 The schematic diagram of a server 200 is shown. The server 200 can execute the data operation method described in this specification, which includes a data storage method and a data access method. The data storage method and the data access method are introduced in other parts of this specification. For example, Figure 3 The data storage method P200 is introduced in the description. Figures 4 to 5 The data access method P300 is introduced in the description.
[0060] like Figure 2 As shown, the server 200 includes at least one storage medium 230 and at least one processor 220. In some embodiments, the server 200 may further include a communication port 250 and an internal communication bus 210. Meanwhile, the server 200 may further include an I / O component 260.
[0061] The internal communication bus 210 may connect various system components, including the storage device 230 and the processor 220 .
[0062] The I / O component 260 supports input / output between the server 200 and other components.
[0063] The communication port 250 is used for data communication between the server 200 and the outside world. For example, the server 200 can perform data transmission with the target application of the client 300 and / or multiple storage devices 100 through the network 120 via the communication port 250.
[0064] At least one storage medium 230 may include a data storage device. The data storage device may be a non-temporary storage medium or a temporary storage medium. For example, the data storage device may include one or more of a disk, a read-only storage medium (ROM), or a random access storage medium (RAM).
[0065] The storage mode corresponding to each of the plurality of content data may be stored in at least one storage medium 230. The server 200 may call an instruction matching the storage mode to perform the data operation on the content data according to the storage mode corresponding to the content data. Specifically, at least one storage medium 230 may include at least one instruction set 232 stored in the data storage device. In some embodiments, at least one storage medium 230 may also include a metadata library 234. In some embodiments, at least one storage medium 230 may also include a data subscription relationship library 236.
[0066] The instructions are computer program codes, and the computer program codes may include programs, routines, objects, components, data structures, processes, modules, etc. for executing the methods of data storage and data access provided in this specification. At least one instruction set 232 may be used to perform the data operations on the multiple content data in multiple storage devices 100. As mentioned above, if the storage modes of the content data are different, the corresponding computer languages for executing the data operations are different, that is, the instructions corresponding to the data operations are different. Therefore, for different storage modes, the server 200 needs to call different instructions to perform the data operations. As mentioned above, the multiple storage devices 100 include storing the multiple content data in at least two storage modes. Therefore, at least one instruction set 232 may include at least two data processing instructions 232-2. At least one instruction set 232 may also include a call instruction 232-4.
[0067] At least two data processing instructions 232-2 correspond to the at least two storage modes, and instruct the at least one processor 220 to perform the data operation in a manner that matches the corresponding storage mode. That is, when the storage mode of the content data is a database-based storage mode, the server 200 drives the at least one processor 220 to perform the data operation on the content data with a data processing instruction that matches the database-based storage mode; when the storage mode of the content data is a GIT warehouse-based storage mode, the server 200 drives the at least one processor 220 to perform the data operation on the content data with a data processing instruction that matches the GIT warehouse-based storage mode; when the storage mode of the content data is a folder-based storage mode, the server 200 drives the at least one processor 220 to perform the data operation on the content data with a data processing instruction that matches the folder-based storage mode.
[0068] The at least one instruction set 232 may further include a calling instruction 232-4. The calling instruction 232-4 may drive a data processing instruction in the at least two data processing instructions 232-2 that matches the storage mode corresponding to the current content data according to the storage mode corresponding to each content data in the plurality of content data.
[0069] The metadatabase 234 may be a storage directory for the multiple content data. The metadata of each content data in the multiple content data is recorded in the metadatabase 234. The metadata of each content data may include the data name, data content type, parameters, and storage address of each content data. As mentioned above, the storage mode corresponding to each content data in the multiple content data is stored in at least one storage medium 230. Specifically, the storage mode corresponding to each content data in the multiple content data may be stored in the metadata of each content data. Of course, the storage mode corresponding to each content data in the multiple content data may also be independent of the metadatabase 234 and stored separately in other locations of at least one storage medium 230. For example, the storage mode corresponding to each content data in the multiple content data may form a storage mode library separately.
[0070] The data subscription relationship library 236 may store the association relationship between the multiple content data and the application, that is, the data name of the content data associated with each application. The application may be an application platform installed on the client 300. The server 200 may query the target data associated with the target application by querying the data subscription relationship library 236, and further query the metadata library 234 to obtain the target storage mode corresponding to the target data, the multiple content data include the target data, and the at least two storage modes include the target storage mode. The data subscription relationship library 236 is set in the server 200, and the application of the client 300 can easily obtain the data subscription relationship from the server 200, so as to evaluate the impact of the change of the content data on the application.
[0071] At least one processor 220 is in communication connection with at least one storage medium 230 and multiple storage devices 100 of the distributed storage system 001. At least one processor 220 reads the at least one instruction set 232 and executes the at least one instruction set 232 when running. When the system 001 is running, at least one processor 220 reads the at least one instruction set 232 and executes the data operation method provided in this specification, that is, the data storage method P200 and the data access method P300 according to the instructions of the at least one instruction set 232. The processor 220 can execute all the steps included in the data storage method P200 and the data access method P300. The processor 220 may be in the form of one or more processors. In some embodiments, the processor 220 may include one or more hardware processors, such as a microcontroller, a microprocessor, a reduced instruction set computer (RISC), an application-specific integrated circuit (ASIC), an application-specific instruction set processor (ASIP), a central processing unit (CPU), a graphics processing unit (GPU), a physical processing unit (PPU), a microcontroller unit, a digital signal processor (DSP), a field programmable gate array (FPGA), an advanced RISC machine (ARM), a programmable logic device (PLD), any circuit or processor capable of performing one or more functions, etc., or any combination thereof. For the sake of illustration only, only one processor 220 is described in the server 200 in this specification. However, it should be noted that the server 200 in this specification may also include multiple processors, and therefore, the operations and / or method steps disclosed in this specification may be performed by one processor as described in this specification, or may be performed jointly by multiple processors. For example, if in this specification the processor 220 of the server 200 executes step A and step B, it should be understood that step A and step B may also be executed jointly or separately by two different processors 220 (for example, the first processor executes step A, the second processor executes step B, or the first and second processors execute steps A and B together).
[0072] When the at least one processor 220 is running, it reads the at least one instruction set 232 and executes the at least one instruction set 232, thereby executing the data operation method. The data operation method includes executing, by the at least one processor 220:
[0073] Receiving a data operation request for target data, wherein the target data may be data requested for operation in the data operation request, the plurality of content data includes the target data, and the data operation request may come from the target application of the client 300 or from an application development end;
[0074] Determine a target storage mode corresponding to the target data, wherein the at least two storage modes include the target storage mode. Specifically, at least one processor 220 may match the target data with metadata in the metadata database to determine the metadata of the target data, specifically, by matching the data name of the target data with the data name in the metadata database 234 to obtain the metadata of the target data; determine the target storage mode corresponding to the target data based on the metadata of the target data;
[0075] The data operation on the target data is performed on the multiple storage devices 100 in a manner matching the target storage mode. Specifically, at least one processor 220 can drive the data processing instruction 232-2 corresponding to the target storage mode to perform the data operation through the calling instruction 232-4 according to the target storage mode.
[0076] In summary, the server 200 of the distributed storage system 001 can uniformly manage multiple storage modes in multiple storage devices 100. A unified management component is pre-stored in the server 200, which is responsible for managing the storage modes corresponding to the multiple content data. The server 200 can determine the target storage mode corresponding to the target data requested for operation in the data operation request according to the storage modes corresponding to the multiple content data, thereby calling the data processing instruction matching the target storage mode to perform the data operation. The server 200 can receive a unified data operation request and use different data processing instructions to perform the data operation according to different storage modes. The target application or application development end does not need to perceive the storage mode corresponding to the target data in advance, nor does it need to select different computer languages to send the data operation request according to the storage mode corresponding to the target data, which greatly reduces the cost of application development. The distributed storage system 001 can achieve unified management of content data in multiple different storage modes through the server 200.
[0077] The server 200 of the distributed storage system 001 can be applied not only in ordinary distributed storage scenarios, but also in distributed storage scenarios of parameter configuration centers. In the distributed storage scenario of the parameter configuration center, the multiple content data are configuration parameters of multiple applications, and the configuration parameters of the multiple applications can be stored in multiple storage devices 100 in a distributed storage manner, and the configuration parameters of the multiple applications are uniformly managed by the server 200. For the convenience of presentation, the following description will take the distributed storage scenario of the distributed storage system 001 as the parameter configuration center as an example.
[0078] Figure 3A flowchart of a method P200 for data storage is shown. As mentioned above, the server 200 can execute the method P200 for data storage provided in this specification. Specifically, the processor 220 in the server 200 can read at least one instruction set 232 stored in at least one storage medium 230, and then execute the method P200 for data storage provided in this specification according to the provisions of the at least one instruction set 232. The method P200 can include executing the following steps by at least one processor 220:
[0079] S220: Receive a data storage request for target data.
[0080] In the distributed storage scenario of the parameter configuration center, the data storage request may come from the application development end 500. The target data may be the content data on which the application development end 500 is to perform data storage operations. The multiple content data include the target data. The data storage request may include a request to write content to the target data. The data storage request may include the data name of the target data, the data primary key of the target data (i.e., the unique data identifier of the target data for which content writing is required) and the content required to be written. For example, in the Alipay application, the data name of the target data may be the balance of Yu'ebao, the credit limit of Huabei, the bill for July, etc.; the data primary key of the target data may be the account and password of Alipay, which may be used as a unique data identifier to distinguish different users. The content may be the data value corresponding to the data primary key in the content data corresponding to the data name. For example, the content may be the balance value of Yu'ebao for a user with an account number of A and a password of B, or the credit limit value of Huabei for a user with an account number of A and a password of B, etc.
[0081] S240: Determine a target storage mode corresponding to the target data.
[0082] As mentioned above, the metadata of all content data may be stored in the metadata repository 234. The metadata may store the data name of the current content data and the corresponding storage mode. Specifically, the server 200 may match the data name of the target data in the data storage request with the data name of the metadata in the metadata repository 234 to determine the metadata of the target data; and based on the metadata of the target data, determine the target storage mode corresponding to the target data. The target storage mode corresponding to the target data is one of the at least two storage modes.
[0083] S260: Writing the content into the target data in a manner matching the target storage mode.
[0084] When writing the content into the target data, it is necessary to write the content into the target data in the target storage mode according to the target storage mode corresponding to the target data. For example, when the target storage mode is a database-based storage mode, the server 200 needs to write the content into the target data in the database-based storage mode, that is, the server 200 needs to execute instructions that match the database-based storage mode to write the content into the target data. When the target storage mode is a GIT warehouse-based storage mode, the server 200 needs to write the content into the target data in the GIT warehouse-based storage mode, that is, the server 200 needs to execute instructions that match the GIT warehouse-based storage mode to write the content into the target data.
[0085] As mentioned above, at least one instruction set 232 of the server 200 includes at least two data processing instructions 232-2, corresponding to the at least two storage modes, and used to instruct the at least one processor 220 to perform the data storage, that is, the content writing, in a manner matching the corresponding storage mode. At least one instruction set 232 also includes a call instruction 232-4. The call instruction 232-4 is used to drive the data processing instruction 232-2 corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions 232-2 according to the storage mode corresponding to each content data among the multiple content data.
[0086] Specifically, step S260 may be implemented by at least one processor 220, according to the target storage mode, driving the data processing instruction 232-2 corresponding to the target storage mode through the calling instruction 232-4, and writing the content into the target data in the target storage mode.
[0087] In summary, when the application development end performs the data storage of the target data, it does not need to perceive the target storage mode corresponding to the target data in advance, and only needs to send the data name of the target data to the server 200. The server 200 can automatically match and determine the target storage mode corresponding to the target data, and based on the target storage mode, call the data processing instruction corresponding to the target storage mode to perform the data storage in a manner matching the target storage mode. The server 200 can achieve unified management of multiple incompatible storage modes.
[0088] Figure 4A flow chart of a method P300 for data access is shown. As mentioned above, the server 200 can execute the method P300 for data access provided in this specification. Specifically, the processor 220 in the server 200 can read at least one instruction set 232 stored in at least one storage medium 230, and then execute the method P300 for data access provided in this specification according to the provisions of the at least one instruction set 232. The method P300 can include executing the following steps by at least one processor 220:
[0089] S320: Receive a data access request sent by a target application.
[0090] In the distributed access scenario of the parameter configuration center, the data access request may come from the target application of the client 300. The data access request may include a request for data access to the content of the target data, that is, a request for access to the content corresponding to the target data. The target data may be content data associated with the target application, that is, the configuration parameters of the target application. The multiple content data include the target data. The data access request may include the data name of the target data, the data primary key of the target data (that is, the unique data identifier of the target data to which content writing is required). For example, in the Alipay application, the data name of the target data may be the balance of Yu'ebao, the credit limit of Huabei, the bill for July, etc.; the data primary key of the target data may be the account number and password of Alipay, and the account number and password of Alipay may be used as a unique data identifier to distinguish different users. For example, the data access request may be a request to access the balance value of Yu'ebao of a user with an account number of A and a password of B, or a request to access the credit limit value of Huabei of a user with an account number of A and a password of B, and so on.
[0091] Step S320 can be implemented in different ways. Figure 5 FIG. 1 shows a flow chart of a method for receiving a data access request sent by a target application according to an embodiment of the present specification. Figure 5 As shown, step S320 may include:
[0092] S322: receiving a data subscription relationship query request sent by the target application, wherein the data subscription relationship query request may include a unique identifier of the target application;
[0093] S324: Match the target application with the data in the data subscription relationship library to determine the target data associated with the target application. The target application can be associated with multiple target data at the same time.
[0094] S326: Send the target data to the target application, wherein the target data includes a data name of the target data;
[0095] S328: Receive the data access request sent by the target application.
[0096] Step S320 can also be implemented in other ways, for example, the server 200 receives the data access request sent by the target application, and the data access request includes the unique identifier of the target application; the server 200 matches the target application with the data in the data subscription relationship library to determine the target data that has an associated relationship with the target application.
[0097] After receiving the data access request, the server 200 executes, through at least one processor 220:
[0098] S340: Determine a target storage mode corresponding to the target data.
[0099] As mentioned above, the metadata of all content data may be stored in the metadata repository 234. The metadata may store the data name of the current content data and the corresponding storage mode. Specifically, the server 200 may match the data name of the target data in the data access request with the data name of the metadata in the metadata repository 234 to determine the metadata of the target data; and based on the metadata of the target data, determine the target storage mode corresponding to the target data. The target storage mode corresponding to the target data is one of the at least two storage modes.
[0100] S360: Perform the data access on the content of the target data in a manner matching the target storage mode to obtain the content of the target data.
[0101] When accessing the content of the target data, it is necessary to read the content of the target data from the storage device where the target data is located in a manner that matches the target storage mode according to the target storage mode corresponding to the target data. For example, when the target storage mode is a database-based storage mode, the server 200 needs to read the content of the target data in the database-based storage mode, that is, the server 200 needs to execute instructions that match the database-based storage mode to read the content of the target data. When the target storage mode is a GIT warehouse-based storage mode, the server 200 needs to read the content of the target data in the GIT warehouse-based storage mode, that is, the server 200 needs to execute instructions that match the GIT warehouse-based storage mode to read the content of the target data.
[0102] As mentioned above, at least one instruction set 232 of the server 200 includes at least two data processing instructions 232-2, corresponding to the at least two storage modes, and used to instruct the at least one processor 220 to perform the data access in a manner matching the corresponding storage mode. At least one instruction set 232 also includes a call instruction 232-4. The call instruction 232-4 is used to drive the data processing instruction 232-2 corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions 232-2 according to the storage mode corresponding to each content data among the multiple content data.
[0103] Specifically, step S360 may be implemented by at least one processor 220, according to the target storage mode, driving the data processing instruction 232-2 corresponding to the target storage mode through the calling instruction 232-4 to obtain the content of the target data.
[0104] S380: Send the content of the target data to the target application.
[0105] In summary, when the target application of the client 300 performs the data access to the content of the target data, it does not need to perceive the target storage mode corresponding to the target data in advance, and only needs to send the data name of the target data to the server 200. The server 200 can automatically match and determine the target storage mode corresponding to the target data, and based on the target storage mode, call the data processing instruction corresponding to the target storage mode to perform the data access in a manner matching the target storage mode. The server 200 can achieve unified management of multiple incompatible storage modes.
[0106] This specification also provides a method P400 for data access, which is applied to the target application, and the target application is mounted on the client 300. The client 300 may include at least one storage medium and at least one processor. The at least one storage medium includes at least one instruction set for data access. The at least one processor is in communication connection with the at least one storage medium. When the client 300 is running, the at least one processor reads the at least one instruction set and executes the method P400 for data access according to the instructions of the at least one instruction set. Figure 6 A flow chart of a method P400 for data access is shown. The method P400 for data access may include executing, by the at least one processor of the client 300:
[0107] S420: Send a data access request to the server 200.
[0108] The data access request includes a request by the target application to access the target data, wherein the server 200 stores a target storage mode corresponding to the target data, and when the server 200 is running, based on the target storage mode, performs the data access in a manner matching the target storage mode to obtain the content of the target data. Step S420 may include:
[0109] S422: Send a data subscription relationship query request to the server 200. The data subscription relationship query request may include a request to query the target data associated with the target application. The data subscription relationship query request may include a unique identifier of the target application. The server 200 matches the unique identifier of the target application with the data in the data subscription relationship library 236, determines the target data associated with the target application, and sends the target data to the target application.
[0110] S424: Receive the query result sent by the server 200. The query result includes the data name of the target data associated with the target application.
[0111] S426: Send the data access request for the target data to the server 200.
[0112] S440: Acquire the content of the target data sent by the server 200.
[0113] Specifically, step S440 may include:
[0114] S442: Store the content of the target data in the at least one storage medium of the client 300 in a database-based storage mode. Before the configuration parameters of the application are transferred to the distributed storage system 001 for storage, there may be some application configuration parameters in the multiple applications of the client 300 that are stored in the at least one storage medium of the client 300 in a database-based storage mode, and the some applications are only equipped with a data access layer based on the database storage mode for accessing the data in the local database (the at least one storage medium of the client 300). When the configuration parameters of all applications are migrated to the distributed storage system 001 for unified storage and management, it is necessary to upgrade and transform the applications that are not equipped with APIs so that they are equipped with APIs to obtain the content of the target data. The workload of upgrading and transforming the applications that are not equipped with APIs is huge, and it takes a lot of time and manpower costs. Therefore, after receiving the content of the target data sent by the server 200, the target application stores the content of the target data in the at least one storage medium of the client 300 in a storage mode based on a database. The target application does not need to be upgraded or modified, and can use the original data access layer to access the content of the target data stored in the at least one storage medium of the client 300 in a storage mode based on a database. For applications equipped with an API interface, the data access layer can be called through the API interface to access the content of the target data stored in the at least one storage medium of the client 300 in a storage mode based on a database. Therefore, all applications can achieve data access without modifying the code, and only need to switch the data source.
[0115] S444: Acquire the content of the target data. The target application may acquire the content of the target data from the at least one storage medium of the client 300 in a variety of ways. Specifically, step S444 includes at least one of the following situations:
[0116] S444-2: Acquire the content of the target data based on the data access layer of the target application.
[0117] S444-4: Acquire the content of the target data based on the application programming interface (API) of the target application.
[0118] When the target application is not equipped with an API interface, the content of the target data can be obtained from the at least one storage medium of the client 300 based on the data access layer of the target application; when the target application is equipped with an API interface, the target application can call the data access layer of the target application through the API interface to access the content of the target data stored in a database-based storage mode in the at least one storage medium of the client 300.
[0119] In summary, the data access method P400 can be applied to various types of applications, so that the content data in different storage modes in the distributed storage system 001 can be accessed without modifying the code.
[0120] In summary, the server 200 of the distributed storage system 001 provided in this specification, the distributed storage system 001, the data storage method P200, the data access method P300 and the data access method P400 have a storage mode corresponding to each content data recorded in the server 200. When the target application performs data storage or data access on the target data, the server 200 queries the storage mode corresponding to the target data, thereby calling the program or instruction matching the storage mode corresponding to the target data, and performs data storage or data access operations on the target data. Therefore, the target application does not need to perceive the storage mode corresponding to the target data, and does not need to use different computer languages for different storage modes. It only needs to send a data storage or data access request to the server 200 through a unified computer language, and the server 200 can call the corresponding computer language according to the storage mode corresponding to the data to perform data storage or access operations, thereby saving the development cost of the application.
[0121] On the other hand, the present specification provides a non-transitory storage medium, storing at least one set of executable instructions for data storage and data access, when the executable instructions are executed by the processor, the executable instructions guide the processor to implement the steps of the data storage method P200 and the data access method P300 described in the present specification. In some possible implementations, various aspects of the present specification can also be implemented in the form of a program product, which includes a program code. When the program product is run on the server 200, the program code is used to enable the server 200 to perform the steps of data storage and data access described in the present specification. The program product for implementing the above method can use a portable compact disk read-only memory (CD-ROM) and include a program code, and can be run on the server 200. However, the program product of the present specification is not limited to this. In the present specification, a readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system (such as a processor 220) or used in combination with it. The program product can use any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media include: an electrical connection with one or more conductors, a portable disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. The computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof. Program code for performing the operations of the present specification may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the server 200, partially on the server 200, as a stand-alone software package, partially on the server 200 and partially on a remote computing device, or entirely on a remote computing device.In situations involving a remote computing device, the remote computing device may be connected to server 200 via network 120, or may be connected to an external computing device.
[0122] The above is a description of a specific embodiment of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require a specific order or a continuous order to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0123] In summary, after reading this detailed disclosure, those skilled in the art will appreciate that the foregoing detailed disclosure may be presented only by way of example and may not be limiting. Although not explicitly stated herein, those skilled in the art will appreciate that this specification requires various reasonable changes, improvements and modifications to the embodiments. These changes, improvements and modifications are intended to be proposed by this specification and are within the spirit and scope of the exemplary embodiments of this specification.
[0124] In addition, certain terms in this specification have been used to describe embodiments of this specification. For example, "one embodiment", "an embodiment" and / or "some embodiments" mean that a particular feature, structure or characteristic described in conjunction with the embodiment may be included in at least one embodiment of this specification. Therefore, it can be emphasized and should be understood that two or more references to "an embodiment" or "one embodiment" or "an alternative embodiment" in various parts of this specification do not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics may be appropriately combined in one or more embodiments of this specification.
[0125] It should be understood that in the foregoing description of the embodiments of this specification, in order to help understand a feature and for the purpose of simplifying this specification, this specification combines various features in a single embodiment, figure or its description. However, this does not mean that the combination of these features is necessary. When reading this specification, it is entirely possible for a person skilled in the art to extract some of the features and understand them as separate embodiments. In other words, the embodiments in this specification can also be understood as the integration of multiple secondary embodiments. This is also true when the content of each secondary embodiment is less than all the features of a single aforementioned disclosed embodiment.
[0126] Each patent, patent application, patent application publication, and other materials, such as articles, books, specifications, publications, documents, articles, etc., cited herein may be incorporated herein by reference in its entirety for all purposes, except for any prosecution document history related thereto, any equivalent that may be inconsistent or conflicting with this document, or any equivalent prosecution document history that may have a limiting effect on the broadest scope of the claims now or later associated with this document. For example, if there is any inconsistency or conflict between the description, definition, and / or use of a term associated with any of the incorporated materials and the term, description, definition, and / or use associated with this document, the term in this document shall control.
[0127] Finally, it should be understood that the embodiments of the application disclosed herein are explanations of the principles of the embodiments of this specification. Other modified embodiments are also within the scope of this specification. Therefore, the embodiments disclosed in this specification are only used as examples and not as limitations. Those skilled in the art can adopt alternative configurations according to the embodiments in this specification to implement the applications in this specification. Therefore, the embodiments of this specification are not limited to the embodiments accurately described in the application.
Claims
1. A server of a distributed storage system, wherein the server is in communication connection with a plurality of storage devices of the distributed storage system when in operation, the plurality of storage devices storing a plurality of content data, the server comprising: at least one storage medium, comprising at least one instruction set, for performing data operations on the plurality of content data, wherein the at least one storage medium stores a storage mode corresponding to each content data of the plurality of content data; as well as At least one processor is communicatively connected to the at least one storage medium and the plurality of storage devices of the distributed storage system, and reads the at least one instruction set and executes when running: receiving a data operation request for target data of a target application, wherein the plurality of content data includes the target data, the content data of the target application is stored in at least two storage modes in the plurality of storage devices, and the data operation request includes at least a data name of the target data; Based on the data name, determining the target data and a corresponding target storage mode, the at least two storage modes including the target storage mode; as well as The data operation on the target data is performed on the plurality of storage devices in a manner matching the target storage mode.
2. The server according to claim 1, wherein: The at least one storage medium further comprises: The metadata database stores metadata of each content data among the plurality of content data, wherein the metadata includes a storage mode corresponding to the current content data.
3. The server according to claim 2, wherein: The determining a target storage mode corresponding to the target data includes: Matching the target data with the metadata in the metadata database to determine the metadata of the target data; and Based on the metadata of the target data, the target storage mode corresponding to the target data is determined.
4. The server according to claim 1, wherein: The at least two storage modes are incompatible with each other.
5. The server according to claim 1, wherein: The at least two storage modes include at least two of the following storage modes: Folder storage mode; Database-based storage mode; Storage mode based on GIT repository.
6. The server according to claim 1, wherein: The at least one instruction set comprises: at least two data processing instructions, corresponding to the at least two storage modes, configured to instruct the at least one processor to perform the data operation in a manner matching the corresponding storage mode; and The calling instruction drives the data processing instruction corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions based on the storage mode corresponding to each content data among the multiple content data.
7. The server according to claim 6, wherein: The performing the data operation on the target data in a manner matching the target storage mode includes: According to the target storage mode, the calling instruction drives the data processing instruction corresponding to the target storage mode to perform the data operation.
8. The server according to claim 1, wherein: The at least one storage medium further comprises: The data subscription relationship library stores the association relationship between the plurality of content data and the application.
9. The server according to claim 1, wherein: The data operation request includes at least one of a data storage request and a data access request, and the data operation includes at least one of data storage and data access.
10. A distributed storage system, comprising: A plurality of storage devices storing a plurality of content data in at least two storage modes; as well as The server according to any one of claims 1 to 9.
11. A data storage method, applied to a server of a distributed storage system, wherein the server is in communication connection with a plurality of storage devices of the distributed storage system when in operation, and the plurality of storage devices store a plurality of content data, and the server comprises: At least one storage medium, comprising at least one instruction set, for storing the plurality of content data, wherein the at least one storage medium stores a storage mode corresponding to each content data of the plurality of content data; as well as at least one processor, communicatively connected to the at least one storage medium and the plurality of storage devices of the distributed storage system; The method comprises, by the at least one processor: receiving a data storage request for target data in a target application, wherein the content data of the target application is stored in at least two storage modes in the plurality of storage devices, the data storage request at least including a data name of the target data and a request for writing content to the target data, the plurality of content data including the target data; Based on the data name, determining a target storage mode corresponding to the target data, the at least two storage modes including the target storage mode; as well as The content is written into the target data in a manner matching the target storage mode.
12. The method of claim 11, wherein: The at least two storage modes are incompatible with each other.
13. The method of claim 11, wherein: The at least two storage modes include at least two of the following storage modes: Folder storage mode; Database-based storage model; and Storage mode based on GIT repository.
14. The method of claim 11, wherein: The at least one storage medium further comprises a metadata database storing metadata of each content data of the plurality of content data, wherein the metadata comprises a storage mode corresponding to the current content data; The determining a target storage mode corresponding to the target data includes: Matching the target data with metadata in the metadata database to determine the metadata of the target data; as well as Based on the metadata of the target data, the target storage mode corresponding to the target data is determined.
15. The method of claim 11, wherein: The at least one instruction set comprises: at least two data processing instructions, corresponding to the at least two storage modes, configured to instruct the at least one processor to perform the content writing in a manner matching the corresponding storage mode; and The calling instruction drives the data processing instruction corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions based on the storage mode corresponding to each content data among the multiple content data.
16. The method of claim 15, wherein: Writing the content into the target data in a manner matching the target storage mode includes: According to the target storage mode, the data processing instruction corresponding to the target storage mode is driven by the calling instruction to write the content into the target data in the target storage mode.
17. The method of claim 11, wherein: The at least one storage medium further includes: a data subscription relationship library storing association relationships between the plurality of content data and applications.
18. A data access method, applied to a server of a distributed storage system, wherein the server is in communication connection with a plurality of storage devices of the distributed storage system when in operation, the plurality of storage devices storing a plurality of content data, the server comprising: At least one storage medium, comprising at least one instruction set, for storing the plurality of content data, wherein the at least one storage medium stores a storage mode corresponding to each content data of the plurality of content data; as well as at least one processor, communicatively connected to the at least one storage medium and the plurality of storage devices of the distributed storage system; The method comprises, by the at least one processor: Receiving a data access request sent by a target application from a client, the client having multiple applications installed thereon, content data of the target application being stored in the multiple storage devices in at least two storage modes, the data access request at least including a data name of the target data and a request for data access to content of the target data, the multiple content data including the target data; Based on the data name, determining a target storage mode corresponding to the target data, the at least two storage modes including the target storage mode; Performing the data access on the content of the target data in a manner matching the target storage mode to obtain the content of the target data; as well as The content of the target data is sent to the target application.
19. The method of claim 18, wherein: The at least two storage modes are incompatible with each other.
20. The method of claim 18, wherein: The at least two storage modes include at least two of the following storage modes: Folder storage mode; Database-based storage model; and Storage mode based on GIT repository.
21. The method of claim 18, wherein: The at least one storage medium further comprises a metadata database storing metadata of each content data of the plurality of content data, wherein the metadata comprises a storage mode corresponding to the current content data; The determining a target storage mode corresponding to the target data includes: Matching the target data with metadata in the metadata database to determine the metadata of the target data; as well as Based on the metadata of the target data, the target storage mode corresponding to the target data is determined.
22. The method of claim 21, wherein: The at least one storage medium further includes a data subscription relationship library storing association relationships between the plurality of content data and applications, wherein the applications include the target application.
23. The method of claim 22, wherein: The receiving a data access request sent by a target application includes: Receiving a data subscription relationship query request sent by the target application; Matching the target application with the data in the data subscription relationship library to determine the target data associated with the target application; sending the target data to the target application; and The data access request sent by the target application is received.
24. The method of claim 22, wherein: The receiving a data access request sent by a target application includes: receiving the data access request sent by the target application; The target application is matched with the data in the data subscription relationship library to determine the target data associated with the target application.
25. The method of claim 18, wherein: The at least one instruction set comprises: at least two data processing instructions, corresponding to the at least two storage modes, configured to instruct the at least one processor to perform the data access in a manner matching the corresponding storage mode; and The calling instruction drives the data processing instruction corresponding to the storage mode corresponding to the current content data among the at least two data processing instructions based on the storage mode corresponding to each content data among the multiple content data.
26. The method of claim 25, wherein: The acquiring of the target data includes: According to the target storage mode, the data processing instruction corresponding to the target storage mode is driven by the calling instruction to obtain the content of the target data in a manner matching the target storage mode.
27. A data access method, applied to a target application, the target application is mounted on a client, the client has multiple applications installed, and content data of the target application is stored in at least two storage modes in a distributed storage system, the method comprising: Sending a data access request to a server of the distributed storage system, the data access request including a request by the target application to perform data access to the content of the target data, wherein the data access request includes at least a data name of the target data, and the at least two storage modes include a target storage mode corresponding to the target data, and when the server responds to the data access request, performs the data access in a manner matching the target storage mode to obtain the content of the target data; and The content of the target data sent by the server is obtained.
28. The method of claim 27, wherein: Send a data access request to the server, including: Sending a data subscription relationship query request to the server, wherein the data subscription relationship query request includes a request for querying the target data associated with the target application; receiving a query result sent by the server, wherein the query result includes the target data associated with the target application; and The data access request for the target data is sent to the server.
29. The method of claim 27, wherein: The acquiring the content of the target data sent by the server comprises: storing the target data in the client in a database-based storage mode; and The content of the target data is obtained.
30. The method of claim 29, wherein: The acquiring of the target data content includes at least one of the following situations: Acquire the content of the target data based on the data access layer of the target application; as well as The content of the target data is acquired based on an application programming interface (API) of the target application.
31. A data access system, comprising: at least one storage medium including at least one instruction set for data access; as well as at least one processor, in communication with the at least one storage medium, Wherein, when the system is running, the at least one processor reads the at least one instruction set and executes the data access method described in any one of claims 27-30 according to the instructions of the at least one instruction set.
Citation Information
Patent Citations
A method and a device for realizing data storage
CN109408467A
Cluster file system, data processing method, computer equipment and storage medium
CN111522514A