A data storage method, device, equipment, storage medium and program product

By storing data in an object storage system and storing data identifiers and metadata as key-value pairs in a database, the shortcomings of file storage and object storage in terms of cost and performance are solved, achieving low-cost, high-performance data management that is suitable for both intranet and public network environments.

CN122240608APending Publication Date: 2026-06-19BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
Filing Date
2024-12-18
Publication Date
2026-06-19

Smart Images

  • Figure CN122240608A_ABST
    Figure CN122240608A_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of data management technology, and in particular to a data storage method, apparatus, device, storage medium, and program product. The method includes: acquiring data to be stored, a first data identifier of the data to be stored, and metadata of the data to be stored; storing the data to be stored in an object storage system to obtain a first object identifier corresponding to the data to be stored; and storing the first data identifier, metadata, and first object identifier in a database, using the first data identifier as the key and the metadata and first object identifier as the value. By combining object storage and a database, the data storage method provided by this solution not only has the advantages of low service cost, large capacity, easy expansion, and wide applicability, but also has high read and write performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data management technology, and in particular to a data storage method, apparatus, device, storage medium, and program product. Background Technology

[0002] File storage and object storage are two common data storage methods. File storage is used in intranet environments and features high read and write performance, but its service price is relatively high. Object storage is used in both intranet and public network environments; although its service price is low, it suffers from lower data read and write performance.

[0003] A storage method that offers low service costs, high read / write performance, and wide applicability has become an urgent problem to be solved. Summary of the Invention

[0004] To address the aforementioned technical problems, this disclosure provides a data storage method, apparatus, device, storage medium, and program product.

[0005] In a first aspect, the present invention provides a data storage method, which is applied to a data management system, the data management system including a database and an object storage system, comprising:

[0006] Obtain the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored; store the data to be stored in the object storage system to obtain the first object identifier corresponding to the data to be stored; store the first data identifier, the metadata, and the first object identifier in the database, using the first data identifier as the key and the metadata and the first object identifier as the value.

[0007] In some optional implementations, the metadata includes the data capacity of the data to be stored, storing the data to be stored in an object storage system, and obtaining a first object identifier corresponding to the data to be stored, including:

[0008] The data capacity is compared with a preset capacity threshold. When the data capacity is greater than or equal to the preset capacity threshold, the data to be stored is divided into at least two sub-data using the preset capacity threshold as the dividing unit. The at least two sub-data are stored as independent objects in the object storage system in parallel to obtain a second object identifier corresponding to each of the at least two sub-data.

[0009] Using the first data identifier as the key and the metadata and the first object identifier as the values, the first data identifier, metadata, and the first object identifier are stored in the database, including:

[0010] Using the first data identifier as the key and the metadata and second object identifier as the value, store the first data identifier, metadata and second object identifier in the database.

[0011] In some alternative implementations, the method further includes:

[0012] When a data query instruction is received, the second data identifier of the data to be queried is obtained from the data query instruction; it is determined whether the data corresponding to the second data identifier exists in the cache space; if it does not exist, the object identifier corresponding to the second data identifier is searched in the database using the second data identifier as an index. The object identifier is either the first object identifier or the second object identifier; based on the object identifier, the data to be queried is searched in the object storage system, and the data to be queried is returned to the interactive interface.

[0013] In some alternative implementations, after retrieving the data to be queried from the object storage system based on the object identifier, the method further includes:

[0014] Store the second data identifier and the data to be queried in the cache space.

[0015] In some alternative implementations, the method further includes:

[0016] If it exists, the data corresponding to the second data identifier will be returned to the interactive interface as the data to be queried.

[0017] In some alternative implementations, the method further includes:

[0018] When a data update instruction is received, the third data identifier and target data of the data to be updated are obtained from the data update instruction; the data to be updated is located according to the third data identifier, and the data to be updated, the metadata of the data to be updated, and the object identifier corresponding to the data to be updated are loaded into the cache space; the data to be updated in the cache space is updated to the target data, the update information is updated in the metadata of the data to be updated, and the target data is uploaded to the object storage system according to the object identifier.

[0019] In a second aspect, the present invention provides a data storage device, comprising:

[0020] The first acquisition module is used to acquire the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored; the first storage module is used to store the data to be stored in the object storage system and obtain the first object identifier corresponding to the data to be stored; the second storage module is used to store the first data identifier, the metadata, and the first object identifier in the database, using the first data identifier as the key and the metadata and the first object identifier as the value.

[0021] Thirdly, the present invention provides a computer device, comprising:

[0022] The memory and the processor are interconnected and communicate with each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the data storage method of the first aspect of the invention and any embodiment thereof.

[0023] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions, which are used to cause a computer to execute the data storage method of the first aspect of the invention and any embodiment thereof.

[0024] Fifthly, the present invention provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, it implements the data storage method of the first aspect of the invention and any embodiment thereof.

[0025] The technical solution provided in this disclosure has the following advantages compared with the prior art:

[0026] The data storage method provided in this embodiment, after obtaining the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored, stores the data to be stored in an object storage system to obtain the first object identifier corresponding to the data to be stored; using the first data identifier as the key and the metadata and the first object identifier as the value, the first data identifier, the metadata, and the first object identifier are stored in a database. The method provided in this embodiment utilizes the advantages of low cost and scalability of object storage by storing the data to be stored in an object storage system; and utilizes the high performance of the database by storing the first data identifier, the metadata, and the first object identifier as key-value pairs. By combining object storage and database, the data storage method provided in this solution not only has the advantages of low service cost, large capacity, easy expansion, and wide applicability, but also has high read and write performance. Attached Figure Description

[0027] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0028] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Figure 1 A flowchart illustrating the data storage method provided in an embodiment of the present invention;

[0030] Figure 2A flowchart illustrating another data storage method provided in an embodiment of the present invention;

[0031] Figure 3 A schematic diagram of the data query process provided in an embodiment of the present invention;

[0032] Figure 4 A schematic diagram of the data update process provided in an embodiment of the present invention;

[0033] Figure 5 A structural connection diagram of the data storage device provided in an embodiment of the present invention;

[0034] Figure 6 This is a structural connection diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0035] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0036] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0037] Numerous specific details are set forth in the following description to provide a thorough understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without inventive effort are within the scope of protection of this invention.

[0038] In the shared storage field, there are two main storage methods: file storage and object storage. File storage is used in intranet environments, featuring high read / write performance and low latency, but its service price is relatively high. Furthermore, file storage can only be accessed within the same Region within the intranet; cross-network access requires a high-speed dedicated line (a Region is a logical or physical boundary set by a cloud service provider to manage and optimize its cloud resources and services). Object storage is used in both intranet and public network environments. Although its service price is lower, object storage cannot be mounted as a local disk for computing resources like file storage, and its single-file, single-stream read / write performance is only 20-40 MB / s, with poor performance for large files.

[0039] Therefore, this embodiment provides a data storage method that utilizes the low cost and scalability of object storage by storing the data to be stored in an object storage system; it also utilizes the high performance of databases by storing the first data identifier, metadata, and first object identifier as key-value pairs; and by combining object storage and databases, the data storage method provided by this solution not only has the advantages of low service cost, large capacity, easy expansion, and wide applicability, but also has high read and write performance.

[0040] According to an embodiment of the present invention, a data storage method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0041] This embodiment provides a data storage method applied to a data management system. The data management system includes a database and an object storage system. The database can be a key-value pair database and can be deployed on a server, virtual machine, or other computer device. Figure 1 This is a flowchart of a data storage method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0042] S101, obtain the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored.

[0043] The first data identifier refers to information that uniquely identifies the data to be stored, such as the data name and data number. Metadata describes the attributes of the data to be stored, and includes at least data type, data size, format, timestamp, and permissions. Data size refers to the amount of space occupied by the data. It should also be noted that the data to be stored can be documents, images, videos, etc.

[0044] Specifically, upon receiving a data storage instruction, the instruction is parsed to extract the data to be stored and its data identifier (i.e., the first data identifier). Simultaneously, metadata for the data to be stored is generated based on the parsed instruction. Thus, the data to be stored, the first data identifier, and the metadata can be obtained.

[0045] S102, store the data to be stored in the object storage system to obtain the first object identifier corresponding to the data to be stored.

[0046] The first object identifier refers to the identifier of the data to be stored in the object storage system. The first object identifier can be the object ID of the data to be stored in the object storage system, or it can be the storage address of the data to be stored in the object storage system.

[0047] Specifically, the data to be stored is stored as an independent data object in the object storage system, and the identification information of the data to be stored in the object storage system, namely the first object identifier, is obtained. This embodiment directly writes the data to be stored into the object storage system, which improves the efficiency of writing data.

[0048] S103, using the first data identifier as the key and the metadata and the first object identifier as the values, store the first data identifier, metadata and the first object identifier in the database.

[0049] Specifically, using the first data identifier as the key and the metadata and the first object identifier as the value, the first data identifier, metadata, and first object identifier are stored as a key-value pair in a key-value (KV) database. This embodiment stores the first data identifier, metadata, and first object identifier as a key-value pair in the KV database, making it easier to retrieve the object identifier corresponding to the data to be accessed from the key-value pair after receiving a user's access request, thereby quickly completing the access. Access requests include at least query requests and update requests.

[0050] The data storage method provided in this embodiment, after obtaining the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored, stores the data to be stored in an object storage system to obtain the first object identifier corresponding to the data to be stored; using the first data identifier as the key and the metadata and the first object identifier as the value, the first data identifier, the metadata, and the first object identifier are stored in a database. The method provided in this embodiment utilizes the advantages of low cost and scalability of object storage by storing the data to be stored in an object storage system; and utilizes the high performance of the database by storing the first data identifier, the metadata, and the first object identifier as key-value pairs. By combining object storage and database, the data storage method provided in this solution not only has the advantages of low service cost, large capacity, easy expansion, and wide applicability, but also has high read and write performance.

[0051] Since the size of the data to be stored affects the data writing speed, some alternative embodiments provide an alternative data storage method in which the storage process of the data to be stored is optimized. The data storage method provided in this embodiment is as follows: Figure 2 As shown, it includes the following steps:

[0052] S201: Obtain the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored. For details, please refer to the description corresponding to S101; it will not be repeated here.

[0053] S202, compare the data capacity with the preset capacity threshold. When the data capacity is greater than or equal to the preset capacity threshold, divide the data to be stored into at least two sub-data using the preset capacity threshold as the dividing unit.

[0054] Specifically, the data capacity of the data to be stored is obtained from the metadata and compared with a preset capacity threshold. When the data capacity of the data to be stored is greater than or equal to the preset capacity threshold, it indicates that the data capacity is large. In this case, the data to be stored is divided into at least two sub-data units, using the preset capacity threshold as the dividing unit. The preset capacity threshold is determined by the read / write speed of the object storage. For example, if the read / write speed is 4MB / s, then the preset capacity threshold is 4MB.

[0055] For example, if the data to be stored has a capacity of 19M and the preset capacity threshold is 4M, then the data to be stored needs to be divided into 5 sub-data, with the sizes of the sub-data being 4M, 4M, 4M, 4M, and 3M respectively.

[0056] It should be noted that when the data capacity to be stored is less than the preset capacity threshold, the data storage operation is completed according to steps S102-S103.

[0057] S203, at least two sub-data are stored in the object storage system as independent objects in parallel to obtain a second object identifier corresponding to each of the at least two sub-data.

[0058] Specifically, following the object storage method, each sub-data after partitioning is treated as an independent object and stored in parallel in the object storage system. After the storage operation is completed, the object identifier (i.e., the second object identifier) ​​corresponding to each sub-data is obtained. It can be understood that when the data capacity to be stored is greater than or equal to a preset capacity threshold, one piece of data to be stored will correspond to at least two second object identifiers. For example, according to the processing in S102, if the data to be stored is divided into 5 sub-data, then after completing the storage operation of the 5 sub-data, 5 second object identifiers will be obtained.

[0059] S204, using the first data identifier as the key and the metadata and second object identifier as the value, store the first data identifier, metadata and second object identifier in the database.

[0060] Specifically, the first data identifier is used as the key, and the metadata and all second object identifiers are used as values. The first data identifier, metadata and second object identifiers are stored as key-value pairs in the database so that the second object identifier can be retrieved from the database based on the data query request, thus completing the data read operation.

[0061] This embodiment improves data storage efficiency, i.e., write performance, by dividing a large amount of data to be stored and storing the divided sub-data in parallel.

[0062] This embodiment provides a data storage method, which adds features such as Figure 3 The data query process shown includes the following steps:

[0063] S301, when a data query instruction is received, the second data identifier of the data to be queried is obtained from the data query instruction.

[0064] Specifically, when a data query instruction is received, the data query instruction is parsed, and the data identifier (i.e., the second data identifier) ​​of the data to be queried is obtained from the parsing result.

[0065] S302, determine whether the data corresponding to the second data identifier exists in the cache space.

[0066] Specifically, after obtaining the second data identifier of the data to be queried, it is first determined whether the data corresponding to the second data identifier (i.e. the data to be queried) exists in the client cache space.

[0067] In one optional implementation, if it exists, the data corresponding to the second data identifier is fed back to the interactive interface as the data to be queried.

[0068] For example, if the data corresponding to the second data identifier exists in the client's cache space, then the data corresponding to the second data identifier is fed back to the user's interactive interface as the data to be queried, thus completing the data query operation. This embodiment directly feeds back the data corresponding to the second data identifier in the cache space to the interactive interface, which not only saves resources but also improves the data query efficiency, i.e., the performance of reading data.

[0069] S303 If it does not exist, then use the second data identifier as an index to search for the object identifier corresponding to the second data identifier in the database.

[0070] The object identifier is either the first object identifier or the second object identifier.

[0071] Specifically, if the data corresponding to the second data identifier does not exist in the client cache space, the second data identifier is used as an index to search for the object identifier corresponding to the value when the key is the second data identifier (i.e., the object identifier corresponding to the second data identifier) ​​from several key-value pairs stored in the database. It should be noted that the object identifier corresponding to the value found here can be one or more. When only one object identifier exists for the value, it indicates that the data size of the data to be queried is less than a preset capacity threshold, and the data to be queried is stored as an independent object. When multiple object identifiers exist for the value, it indicates that the data size of the data to be queried is greater than or equal to the preset capacity threshold, and the data to be queried is divided and stored as multiple objects separately.

[0072] S304: Based on the object identifier, retrieve the data to be queried from the object storage system and return the data to the interactive interface.

[0073] Specifically, when only one object identifier (i.e., the first object identifier) ​​exists, the system directly uses the first object identifier as an index to retrieve the corresponding data from the object storage system and presents the retrieved data as the query data to the user interface. When multiple object identifiers (i.e., the second object identifiers) exist, the system needs to use each second object identifier as an index to retrieve the corresponding data from the object storage system, merge the retrieved data to obtain the query data, and present the query data to the user interface. It should be noted that the merging order can be determined based on the object identifier. For example, when the object identifier is an object ID, the retrieved data can be merged in ascending order of object ID. In practical applications, other methods can also be used to determine the merging order; no specific limitation is placed on the data merging method here.

[0074] In an alternative implementation, after S304, the second data identifier and the data to be queried are stored in the cache space.

[0075] For example, after the data to be queried is fed back to the interactive interface, the data to be queried and the corresponding data identifier (i.e., the second data identifier) ​​can be stored in the client's cache space so that when the user queries the data again, the number of accesses to the database and object storage system can be reduced, thereby improving the data query efficiency.

[0076] This embodiment provides a data storage method, which adds features such as Figure 4 The data modification process shown includes the following steps:

[0077] S401, when a data update instruction is received, the third data identifier and target data of the data to be updated are obtained from the data update instruction.

[0078] Among them, data update instructions refer to instructions issued by users to update data. Data update instructions include data modification instructions and data deletion instructions.

[0079] Specifically, when a data update instruction is received, it is parsed, and the data identifier (i.e., the third data identifier) ​​of the data to be updated and the updated target data are obtained from the parsing result. When the data update instruction is a data modification instruction, the target data is the modified data; when the data update instruction is a data deletion instruction, the target data is empty.

[0080] S402, locate the data to be updated based on the third data identifier, and load the data to be updated, the metadata of the data to be updated, and the object identifier corresponding to the data to be updated into the cache space.

[0081] Specifically, based on the third data identifier of the data to be updated, and following steps S301-S304, the metadata of the data to be updated and the object identifier corresponding to the data to be updated are retrieved from the database, and the data to be updated is retrieved from the object storage system. The metadata of the data to be updated, the object identifier corresponding to the data to be updated, and the data to be updated are then loaded into the client's cache space.

[0082] S403 updates the data to be updated in the cache space to the target data, updates the update information to the metadata of the data to be updated, and uploads the target data to the object storage system according to the object identifier.

[0083] The update information includes details related to the update operation, such as the update time and the object being updated.

[0084] Specifically, first, the data to be updated in the cache space is updated to the target data; second, the information corresponding to the update operation (i.e., the update information) is updated to the cache metadata; third, the storage space of the data to be updated is found according to the object identifier, and the data to be updated in the storage space is updated to the target data; finally, according to the third data identifier, the updated metadata and the object identifier corresponding to the target data are updated to the database, completing the upload of the target data.

[0085] In this embodiment, the object identifier may or may not change, depending on the size of the target data. For example, if the data to be updated corresponds to one object identifier, but the target data is large, then after finding the storage space for the data to be updated in the object storage system based on its object identifier, updating the target data to the object storage system will inevitably occupy space other than the storage space corresponding to the object identifier. Therefore, after completing the update operation on the data to be updated (i.e., storing the target data in the object storage system), it is also necessary to obtain the object identifier corresponding to the target data and update all its corresponding object identifiers along with the updated metadata to the database.

[0086] The data storage method provided in this embodiment overcomes the defect that object storage itself does not support modification, adds a data update method, and improves the efficiency of data management.

[0087] This embodiment also provides a data storage device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0088] This embodiment provides a data storage device, such as... Figure 5 As shown, it includes:

[0089] The first acquisition module 501 is used to acquire the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored.

[0090] The first storage module 502 is used to store the data to be stored in the object storage system and obtain the first object identifier corresponding to the data to be stored.

[0091] The second storage module 503 is used to store the first data identifier, metadata, and first object identifier in a database, using the first data identifier as the key and the metadata and first object identifier as the values.

[0092] In some alternative implementations, the first storage module 502 includes:

[0093] The comparison submodule is used to compare the data capacity of the metadata, including the data to be stored, with a preset capacity threshold. When the data capacity is greater than or equal to the preset capacity threshold, the data to be stored is divided into at least two sub-data using the preset capacity threshold as the dividing unit.

[0094] The first storage submodule is used to store at least two sub-data as independent objects in the object storage system in parallel, and to obtain a second object identifier corresponding to each of the at least two sub-data.

[0095] The second storage module 503 includes:

[0096] The second storage submodule is used to store the first data identifier, metadata, and second object identifier in the database, using the first data identifier as the key and the metadata and second object identifier as the value.

[0097] In some alternative embodiments, the apparatus further includes:

[0098] The second acquisition module is used to obtain the second data identifier of the data to be queried from the data query instruction when a data query instruction is received; the judgment module is used to determine whether the data corresponding to the second data identifier exists in the cache space; the first query module is used to search for the object identifier corresponding to the second data identifier in the database, using the second data identifier as an index, if the data does not exist, and the object identifier is either the first object identifier or the second object identifier; the first feedback module is used to search for the data to be queried in the object storage system according to the object identifier and to feed back the data to be queried to the interactive interface.

[0099] In some alternative embodiments, the apparatus further includes:

[0100] The second query module is used to retrieve the data to be queried from the object storage system based on the object identifier, and then store the second data identifier and the data to be queried in the cache space.

[0101] In some alternative embodiments, the apparatus further includes:

[0102] The second feedback module is used to, if it exists, feed back the data corresponding to the second data identifier as the data to be queried to the interactive interface.

[0103] In some alternative embodiments, the apparatus further includes:

[0104] The third acquisition module is used to obtain the third data identifier and target data of the data to be updated from the data update instruction when a data update instruction is received; the third query module is used to find the data to be updated according to the third data identifier, and load the data to be updated, the metadata of the data to be updated, and the object identifier corresponding to the data to be updated into the cache space; the update module is used to update the data to be updated in the cache space to the target data, update the update information into the metadata of the data to be updated, and upload the target data to the object storage system according to the object identifier.

[0105] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0106] In this embodiment, the data storage device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0107] This invention also provides a computer device having the above-described features. Figure 5 The data storage device shown.

[0108] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As shown, the computer device includes one or more processors 601, memory 602, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 6 Take the 601 processor as an example.

[0109] Processor 601 may be a central processing unit, a network processor, or a combination thereof. Processor 601 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.

[0110] The memory 602 stores instructions executable by at least one processor 601 to cause at least one processor 601 to perform the method shown in the above embodiments.

[0111] Memory 602 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, memory 602 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 602 may optionally include memory remotely located relative to processor 601, and this remote memory may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0112] Memory 602 may include volatile memory, such as random access memory; memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; memory 602 may also include combinations of the above types of memory.

[0113] The computer device also includes a communication interface 603 for communicating with other devices or communication networks.

[0114] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0115] In addition to the computer devices and computer-readable storage media described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps of the sound source localization method provided in any embodiment of this application.

[0116] Computer program products can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this application. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0117] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data storage method, characterized in that, The method is applied to a data management system, which includes a database and an object storage system, and the method includes: Obtain the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored; The data to be stored is stored in the object storage system to obtain the first object identifier corresponding to the data to be stored; Using the first data identifier as the key and the metadata and the first object identifier as the values, the first data identifier, the metadata, and the first object identifier are stored in the database.

2. The method according to claim 1, characterized in that, The metadata includes the data capacity of the data to be stored, and the step of storing the data to be stored in the object storage system to obtain the first object identifier corresponding to the data to be stored includes: The data capacity is compared with a preset capacity threshold. When the data capacity is greater than or equal to the preset capacity threshold, the data to be stored is divided into at least two sub-data units, using the preset capacity threshold as the dividing unit. The at least two sub-data are treated as independent objects and stored in the object storage system in parallel to obtain a second object identifier corresponding to each of the at least two sub-data. The step of storing the first data identifier, the metadata, and the first object identifier in the database, using the first data identifier as the key and the metadata and the first object identifier as the values, includes: Using the first data identifier as the key and the metadata and the second object identifier as the values, the first data identifier, the metadata, and the second object identifier are stored in the database.

3. The method according to claim 1, characterized in that, The method further includes: When a data query instruction is received, the second data identifier of the data to be queried is obtained from the data query instruction; Determine whether the data corresponding to the second data identifier exists in the cache space; If it does not exist, the second data identifier is used as an index to search for the object identifier corresponding to the second data identifier in the database. The object identifier is either the first object identifier or the second object identifier. Based on the object identifier, the data to be queried is retrieved from the object storage system, and the data to be queried is returned to the interactive interface.

4. The method according to claim 3, characterized in that, After retrieving the data to be queried from the object storage system based on the object identifier, the method further includes: The second data identifier and the data to be queried are stored in the cache space.

5. The method according to claim 3 or 4, characterized in that, The method further includes: If it exists, the data corresponding to the second data identifier will be fed back to the interactive interface as the data to be queried.

6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When a data update instruction is received, the third data identifier and target data of the data to be updated are obtained from the data update instruction; The data to be updated is located according to the third data identifier, and the data to be updated, the metadata of the data to be updated, and the object identifier corresponding to the data to be updated are loaded into the cache space; The data to be updated in the cache space is updated to the target data, the update information is updated in the metadata of the data to be updated, and the target data is uploaded to the object storage system according to the object identifier.

7. A data storage device, characterized in that, include: The first acquisition module is used to acquire the data to be stored, the first data identifier of the data to be stored, and the metadata of the data to be stored. The first storage module is used to store the data to be stored in an object storage system to obtain a first object identifier corresponding to the data to be stored. The second storage module is used to store the first data identifier, the metadata, and the first object identifier in a database, using the first data identifier as the key and the metadata and the first object identifier as the values.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the data storage method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the data storage method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the data storage method according to any one of claims 1 to 6.