Data storage method and device

By determining the storage level and storing the business data according to the identification information, it solves the problems of low database access performance and high storage cost in the existing technology, realizes hierarchical storage of data, reduces costs and improves performance.

CN119336731APending Publication Date: 2025-01-21JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411433715.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, business data is collectively stored in a database, resulting in reduced database access performance and increased data storage costs.

Method used

By determining the identification information of business data, determine the storage level of business data based on this information, and store business data in the database according to the storage level. Optional land, update the storage level according to the frequency of access and important levels, and adjust the storage location of the data.

Benefits of technology

It realizes hierarchical storage of business data, reduces data storage costs and improves database access performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336731A_ABST
    Figure CN119336731A_ABST
Patent Text Reader

Abstract

The invention provides a data storage method and device.The method comprises the steps that identification information corresponding to service data to be stored is determined; determining a storage level of the business data based on the identification information; and storing the business data in a database according to the storage hierarchy. According to the embodiment, hierarchical storage of the data can be realized, the data storage cost is reduced, and the database access performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data storage method and device. Background Art

[0002] The existing technology usually stores all business data together in a database. However, as business data continues to accumulate, this storage method will reduce database access performance and increase data storage costs. Summary of the invention

[0003] In view of this, the embodiments of the present disclosure provide at least one data storage method, device, electronic device and storage medium, which can realize hierarchical storage of business data in a database, reduce data storage costs and improve database access performance.

[0004] In a first aspect, an embodiment of the present disclosure provides a data storage method, including:

[0005] Determining identification information corresponding to the business data to be stored;

[0006] Based on the identification information, determine the storage level of the business data;

[0007] Store business data in the database according to the storage hierarchy.

[0008] Optionally, after storing the business data in the database according to the storage level, the method further includes:

[0009] Determine the access frequency and importance level of each business data in the database;

[0010] Update the storage level corresponding to each business data in the database according to the access frequency and importance level;

[0011] Adjust the storage location of the business data in the database according to the updated storage level corresponding to each business data.

[0012] Optionally, determine the access frequency and importance level of each business data in the database, including:

[0013] Determine the access frequency of each business data in the database based on at least one of the query information for each business data in the database and the operation record for each business data;

[0014] According to the predetermined level information of each business field, the importance level of the business data corresponding to each business field is determined; the level information of each business field is determined based on the business application scenario of the database.

[0015] Optionally, before storing the business data in the database according to the storage level, the method further includes:

[0016] Based on the storage level of the business data, verification information is generated, the storage level is verified according to the verification information, and it is determined whether the verification has passed.

[0017] Optionally, after storing the business data in the database according to the storage level, the method further includes:

[0018] Create a migration task, split the migration task into multiple subtasks according to the preset splitting dimensions, and determine the migration conditions for each subtask;

[0019] Adjust the storage location of business data that meets the migration conditions in the database.

[0020] Optionally, the method further comprises:

[0021] Adjust the storage space size corresponding to each storage level according to the amount of business data corresponding to each storage level.

[0022] In a second aspect, an embodiment of the present disclosure provides a data storage device, including:

[0023] An identification determination module, used to determine identification information corresponding to the business data to be stored;

[0024] A level determination module, used to determine the storage level of business data based on identification information;

[0025] The storage module is used to store business data in the database according to the storage level.

[0026] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the above-mentioned first aspect, or the steps in any optional implementation of the first aspect are performed.

[0027] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any optional implementation of the first aspect are executed.

[0028] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor.

[0029] In any one of the above aspects or any implementation of any one of the aspects, identification information corresponding to the business data to be stored is determined; based on the identification information, the storage level of the business data is determined; and the business data is stored in the database according to the storage level. In this way, different storage levels of different business data can be determined according to the identification information of the business data, thereby realizing hierarchical storage of data, reducing data storage costs and improving database access performance.

[0030] In a further embodiment of the present disclosure, the access frequency and importance level of the business data in the database are determined; based on the access frequency and importance level, the storage level corresponding to the business data in the database is updated; and according to the storage level corresponding to the updated business data, the storage location of the business data in the database is adjusted. As a result, after storing the business data according to the storage levels corresponding to different data, the storage level corresponding to the business data can be updated and the storage location of the business data can be adjusted according to the importance level of the business data and the access frequency within a certain period, thereby further realizing hierarchical storage of data, reducing data storage costs and improving database access performance. In addition, when updating the level of business data, in addition to considering the access frequency of the business data, the importance level of the business data is also considered, thereby improving the accuracy and objectivity of the updated storage level of the business data.

[0031] In a further embodiment of the present disclosure, the importance level of the business data corresponding to the business field can be determined based on the level information of the business field. The level information of the business field is determined based on the business application scenario, thereby enabling flexible changes in the importance level of business data in different business application scenarios, further improving the accuracy and objectivity of the storage level of the updated business data.

[0032] The effects of the above-mentioned data storage device, electronic device and storage medium refer to the description of the above-mentioned data storage method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.

[0034] Figure 1 A flow chart of a data storage method provided by an embodiment of the present disclosure is shown;

[0035] Figure 2 A schematic diagram of a process of migrating business data in a database in a data storage method provided by an embodiment of the present disclosure is shown;

[0036] Figure 3 A schematic diagram of a data storage device provided by an embodiment of the present disclosure is shown;

[0037] Figure 4 An exemplary system architecture is shown in which embodiments of the present disclosure may be applied;

[0038] Figure 5 A schematic diagram of the structure of a computer system of a terminal device or a server used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0040] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.

[0041] The raising of the above problems and the solutions are the results obtained by the inventor after practice and careful research. The discovery process of the above problems and the solutions proposed for the above problems should be the contributions made by the inventor to the present disclosure during the disclosure process.

[0042] The technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.

[0043] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0044] To facilitate understanding of the present embodiment, a data storage method disclosed in the present embodiment is first described in detail. The execution subject of the data storage method provided in the present embodiment is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the data storage method may be implemented by a processor calling a computer-readable instruction stored in a memory.

[0045] See also Figure 1 As shown, it is a flow chart of a data storage method provided by an embodiment of the present disclosure, and the method includes S101 to S103, wherein:

[0046] S101: Determine identification information corresponding to the business data to be stored.

[0047] In this step, when the business data to be stored is received, the identification information corresponding to the business data can be determined immediately; or the received business data can be first stored in a message queue, and then the identification information corresponding to the business data can be determined by consuming the message queue.

[0048] In the embodiments of the present disclosure, the identification information may indicate the access requirements, importance level, security requirements, etc. of the business data to be stored. It should be noted that the above-mentioned indicators of business data are only used as an example of a possible implementation of the embodiments of the present disclosure, and do not constitute an improper limitation of the present invention. In practical applications, the identification information may be used to indicate other indicators of business data, such as privacy level, etc. In addition, the identification information may indicate one or more of the various business indicators. When defining the identification information based on multiple indicators, a weighting method may be used to comprehensively consider multiple indicators.

[0049] For example, taking the identification information representing the two indicators of access requirements and security level of the business data to be stored as an example, three different situations can be defined in the identification information, indicating "high access requirements and high security requirements", "low access requirements but with security requirements", and "extremely low access requirements and no security requirements".

[0050] In a possible implementation manner, the identification information corresponding to the business data to be stored may be determined according to a business field corresponding to the current business application scenario.

[0051] In a specific implementation, identification information can be added to the business fields of the current database architecture before the business goes online, and then the identification information of the business data can be determined based on the identification information of the corresponding business fields. The identification information of the business fields can be determined based on different business scenarios and in combination with the various indicators reflected in the historical storage records, and then the identification information of the business data to be stored can be determined.

[0052] In another possible implementation, the identification information corresponding to the business data to be stored may also be obtained based on the analysis of the business data. In a specific implementation, the business data may be analyzed based on the specific content and business rules of the business data to determine the identification information corresponding to the business data.

[0053] It should be noted that the above method for determining the identification data corresponding to the business data to be stored is only illustrated as a possible implementation method of the embodiment of the present disclosure, and does not constitute an improper limitation of the present invention. In practical applications, other methods can also be used to determine the identification data, so as to achieve its function.

[0054] S102: Determine the storage level of the business data based on the identification information.

[0055] In this step, after the identification information corresponding to the business data to be stored is determined, the storage level of the business data can be determined.

[0056] In the embodiments of the present disclosure, different situations in the identification information may correspond to different storage tiers. Exemplarily, assuming that the identification information represents the access requirements of business data, the storage tier for business data with high access requirements may be a high-performance storage tier, and the storage tier for business data with low access requirements may be a low-cost storage tier. Alternatively, assuming that the identification information represents two indicators, namely, the access requirements and the security level of the business data to be stored, the storage tier for business data with identification information of "high access requirements and high security requirements" may be a high-performance storage tier, the storage tier for business data with identification information of "low access requirements but with security requirements" may be a low-cost storage tier, and the storage tier for business data with identification information of "extremely low access requirements and no security requirements" may be an archive storage tier.

[0057] It should be noted that the above storage levels are only used as an example of a possible implementation of the embodiment of the present disclosure. The present invention does not specifically limit the division and number of storage levels. In practical applications, it shall be based on the ability to achieve its functions.

[0058] S103: Storing the business data in a database according to the storage level.

[0059] In this step, after the storage level of the business data is determined, the business data can be stored in a storage location corresponding to the storage level in the database.

[0060] In the embodiment of the present disclosure, before storing the business data in the database according to the storage level, it also includes: generating verification information based on the storage level of the business data, verifying the storage level according to the verification information, and determining whether the verification is successful.

[0061] In a specific implementation, after determining the storage level of the business data, corresponding verification information can be generated, and the verification information may include information such as business fields, business data, and the determined storage level. The generated verification information can then be pushed to relevant personnel or the module or unit responsible for verification in the system. When the relevant personnel or the module or unit responsible for verification in the system determines that the correspondence between the business data and the storage level is accurate, it can be considered that the verification has passed. After the verification passes, the business data can be stored in the database according to the storage level.

[0062] In the embodiment of the present disclosure, the method further includes: adjusting the size of the storage space corresponding to each storage level according to the amount of business data corresponding to each storage level.

[0063] In a specific implementation, in addition to pre-allocating the storage space size of the storage locations corresponding to each storage level in the database, the storage space size of the storage locations corresponding to each storage level can also be dynamically adjusted according to the amount of business data corresponding to each storage level.

[0064] In the disclosed embodiments, the high-performance storage layer may correspond to storage locations such as a solid-state drive (SSD) and a persistent memory (PMEM). Among them, SSD can provide extremely high read and write speeds and low latency, and can be used for data with high throughput and fast response time; PMEM combines the advantages of memory and storage, can provide ultra-low latency and high throughput, and is suitable for data that requires high performance. The low-cost storage layer may correspond to storage locations such as a mechanical hard disk (HDD). The performance of HDD is lower than that of SSD, but the cost is also relatively low. Data that does not require frequent access but is still relatively important, such as user documents, images, etc., can be stored in it, thereby reducing the cost of data storage while ensuring data security. The archival storage layer may correspond to storage locations such as a tape library and cloud storage.

[0065] It should be noted that the above-mentioned storage locations corresponding to each storage level are only illustrated as a possible implementation method of the embodiment of the present disclosure and do not constitute an improper limitation on the present invention. In practical applications, they can be based on actual needs and be able to achieve their functions.

[0066] In an embodiment of the present disclosure, after storing the business data in a database according to the storage level, it also includes: determining the access frequency and importance level of each business data in the database; updating the storage level corresponding to each business data in the database according to the access frequency and the importance level; and adjusting the storage position of the business data in the database according to the updated storage level corresponding to each business data.

[0067] In specific implementation, after storing business data in the database according to the storage level, the access requirements, importance level and other indicators of the business data within a certain period may be inconsistent with the current storage level. At this time, the access frequency of the business data within a certain period can be determined, and the current importance level of the business data can be determined in combination with the current business process. Then, the storage level of the business data can be reconfirmed based on the determined access frequency and importance level, and the storage location of the business data can be adjusted according to the updated business level. In this way, the business data storage level can be adjusted in a timely manner, further improving storage performance and reducing storage costs.

[0068] For example, take the order data of an e-commerce platform as an example. When the order data is first generated, this data needs to be frequently queried, called, and updated. At this stage, the storage level of the order data can be a high-performance storage layer, which is stored in an SSD. As time goes by, after the order is completed and the return period has expired, the access frequency of the order data gradually decreases, and this data no longer requires frequent read and write operations, but is more often used as historical records for archiving. At this stage, the order data can be transferred from the storage location SSD corresponding to the high-performance storage layer to the storage location HDD in the database corresponding to the low-cost storage layer. As time goes on, the order data can be transferred to the storage location corresponding to the archive storage layer.

[0069] It should be noted that the above example is only a possible implementation of the embodiment of the present disclosure and does not constitute an improper limitation on the present invention. The present invention does not specifically limit the criteria and timing for adjusting the storage level and storage location of business data.

[0070] In an embodiment of the present disclosure, the access frequency and importance level of each business data in the database are determined, including: determining the access frequency of each business data in the database based on query information for each business data in the database and at least one of the operation records for each business data; determining the importance level of the business data corresponding to each business field according to pre-determined level information of each business field; the level information of each business field is determined based on the business application scenario of the database.

[0071] In one possible implementation, the access records and last access times of each data table in the database can be checked regularly, and then business data that has not been used for a long time can be marked as data with low access demand according to a preset strategy; the preset strategy here can be set according to actual needs, for example, it can be stipulated that when the distance between the last access time and the current time is a certain distance, the corresponding business data will be marked as data with low access demand; it can also be stipulated that when the number of accesses within a certain period is less than a certain number, it will be marked as data with low access demand, etc. The embodiments of the present disclosure do not make specific limitations on this.

[0072] In another possible implementation, the access frequency of business data can also be determined by regularly monitoring performance indicators such as the QPS (Queries Per Second) information and TPS (Transactions Per Second) information of the database instance. Among them, QPS information refers to the number of query requests that the database system can process per second, and TPS information is an indicator used in database management to measure the number of transactions that the system can execute per second. By setting a threshold, when the QPS information and TPS information are lower than the threshold or a specific type of query has not been executed for a period of time, the corresponding business data can be identified as data with low access demand.

[0073] In another possible implementation, the access frequency of business data can be determined by analyzing the types of SQL operations executed in the database, such as adding, deleting, modifying, and querying business data. By analyzing the execution frequency and pattern of these operations, data with low access demand can also be marked.

[0074] It should be noted that the above method of determining the access frequency of business data and then marking the data with low access demand is only a few feasible implementation methods in the embodiments of the present disclosure, and does not constitute an improper limitation on the present invention. In practical applications, the above methods can be used alone or in combination, and methods other than the above methods can also be used to determine the access frequency of business data, and the embodiments of the present disclosure do not specifically limit this.

[0075] In a possible implementation, when determining the importance level of business data, it can be determined based on the level information of the business field corresponding to the business data; it can also be determined based on the analysis of the business data itself, and the embodiments of the present disclosure do not specifically limit this. It should be noted that when determining the importance level of business data based on the level information of the business field, the level information of the business field may be related to the application scenario of the current database. Since the importance level of the same field in different application scenarios may be different, therefore, determining the level information of the business field based on the business application scenario and then determining the importance level of the business data can make the determined importance level of the business data more accurate and objective, and thus can also improve data storage performance and reduce data storage costs.

[0076] In the disclosed embodiment, after storing the business data in the database according to the storage level, in addition to timely adjusting the storage location of the business data according to the access frequency and importance level of the business data, a migration task can also be created. When there is business data in the database that meets the migration conditions, it can be automatically migrated to the updated storage location. Specifically, after storing the business data in the database according to the storage level, it also includes: creating a migration task, splitting the migration task into multiple subtasks according to the preset splitting dimension, and determining the migration conditions of each subtask; adjusting the storage location of the business data that meets the migration conditions in the database.

[0077] Figure 2 A schematic diagram of a process for migrating business data in a database in a data storage method provided in an embodiment of the present disclosure. Figure 2 As shown, when creating a migration task, the user can check the execution time range of the migration task, whether there is an index on the column, the migration type and other aspects of the task information. Among them, the execution time range of the migration task refers to the time range within which the data is migrated, and the migration type can describe whether the data is deleted directly or transferred to existence before deletion; in the embodiment of the present disclosure, a data ID (Identifier) ​​can be assigned to each data when storing business data. The data ID can be an increasing digital serial number. By setting the ID column as an index field, when performing a migration operation, it is usually necessary to select the data set to be migrated according to certain conditions. The index can help quickly filter out the data that meets the conditions and reduce the time cost of data scanning and processing.

[0078] After checking the task information, the migration task can be split according to dimensions such as data ID interval and date to obtain multiple subtasks. Subtasks can be executed in parallel, thereby improving the efficiency of data migration. After obtaining multiple subtasks, you can search the database for business data that meets the corresponding migration conditions based on the migration conditions corresponding to each subtask. If there is business data that meets the migration conditions, you can determine the migration targets of these business data, and determine the frequency and batch of data migration based on the performance of the database and the receiving capacity of the migration target. In the specific implementation, before executing the data migration, you can also check the task information again to ensure the rationality and accuracy of the data migration.

[0079] After calculating the frequency and batches of data migration, data that meets the migration conditions can be migrated according to the migration type. For data whose migration type is direct deletion, it can be deleted from the current storage location without adjusting the storage location; for data whose migration type is transfer first and then delete, it can be first transferred to the storage location corresponding to the migration target, and then deleted from the original storage location. It should be noted that the migration target here can be specified by the user, or it can be calculated by the system based on attributes in multiple dimensions such as the access frequency, importance level, and security level of the business data.

[0080] When executing data migration tasks, you can implement it based on migration SQL statements. The SQL statements here can be generated based on the migration conditions set by the user. For example, "select * from c where id <=595589795" means to select all data with ID less than or equal to 595589795 from data table c for migration. Here, "ID less than or equal to 595589795" is the migration condition.

[0081] According to a second aspect of the embodiment of the present disclosure, Figure 3 As shown, a data storage device 300 is provided, comprising:

[0082] An identification determination module 301, used to determine identification information corresponding to the business data to be stored;

[0083] A level determination module 302, used to determine the storage level of the business data based on the identification information;

[0084] The storage module 303 is used to store the business data in the database according to the storage level.

[0085] Optionally, the storage module 303 is further used for:

[0086] Determine the access frequency and importance level of each business data in the database;

[0087] Update the storage level corresponding to each business data in the database according to the access frequency and importance level;

[0088] Adjust the storage location of the business data in the database according to the updated storage level corresponding to each business data.

[0089] Optionally, the storage module 303 is further used for:

[0090] Determine the access frequency of each business data in the database based on at least one of the query information for each business data in the database and the operation record for each business data;

[0091] According to the predetermined level information of each business field, the importance level of the business data corresponding to each business field is determined; the level information of each business field is determined based on the business application scenario of the database.

[0092] Optionally, the level determination module 302 is further configured to:

[0093] Based on the storage level of the business data, verification information is generated, the storage level is verified according to the verification information, and it is determined whether the verification has passed.

[0094] Optionally, the storage module 303 is further used for:

[0095] Create a migration task, split the migration task into multiple subtasks according to the preset splitting dimensions, and determine the migration conditions for each subtask;

[0096] Adjust the storage location of business data that meets the migration conditions in the database.

[0097] Optionally, the storage module 303 is further used for:

[0098] Adjust the storage space size corresponding to each storage level according to the amount of business data corresponding to each storage level.

[0099] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device for data storage, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present disclosure.

[0100] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present disclosure is implemented.

[0101] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and the computer program implements the method of any of the above embodiments when executed by a processor.

[0102] Figure 4 An exemplary system architecture 400 to which the data storage method or data storage device implemented by the present disclosure can be applied is shown.

[0103] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0104] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0105] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0106] The server 405 may be a server that provides various services, such as a backend management server (only an example) that supports shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may process the received data storage request and feed back the processing result (only an example) to the terminal device.

[0107] It should be noted that the data storage method provided in the embodiment of the present invention is generally performed by the server 405, and accordingly, the data storage device is generally set in the server 405. The data storage method provided in the embodiment of the present invention can also be performed by the terminal devices 401, 402, 403, and accordingly, the data storage device can be set in the terminal devices 401, 402, 403.

[0108] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0109] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0110] like Figure 5As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0111] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0112] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0113] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0115] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, a processor includes an identification determination module, a level determination module, and a storage module, wherein the names of these modules do not constitute a limitation on the modules themselves in some cases. For example, the identification determination module may also be described as a "module for determining identification information corresponding to the business data to be stored".

[0116] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method: determining identification information corresponding to the business data to be stored; determining the storage level of the business data based on the identification information; and storing the business data in a database according to the storage level.

[0117] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A data storage method, characterized in that: include: Determining identification information corresponding to the business data to be stored; Based on the identification information, determining a storage level of the business data; The business data is stored in a database according to the storage level.

2. The method according to claim 1, characterized in that After storing the business data in a database according to the storage level, the method further includes: Determine the access frequency and importance level of business data in the database; According to the access frequency and importance level, update the storage level corresponding to the business data in the database; According to the updated storage level corresponding to each piece of business data, the storage location of the business data in the database is adjusted.

3. The method according to claim 2, characterized in that Determine the access frequency and importance level of each business data in the database, including: Determine the access frequency of the business data in the database based on at least one of query information for the business data in the database and operation records for each business data; According to the predetermined level information of the business field, the importance level of the business data corresponding to the business field is determined; the level information of the business field is determined based on the business application scenario of the database.

4. The method according to claim 1, characterized in that: Before storing the business data in a database according to the storage level, the method further includes: Based on the storage level of the business data, verification information is generated, the storage level is verified according to the verification information, and it is determined whether the verification is passed.

5. The method according to claim 1, characterized in that After storing the business data in a database according to the storage level, the method further includes: Creating a migration task, splitting the migration task into multiple subtasks according to a preset splitting dimension, and determining a migration condition for each subtask; The storage location of the business data that meets the migration condition in the database is adjusted.

6. The method according to claim 1, characterized in that The method further comprises: According to the amount of business data corresponding to each storage level, the size of the storage space corresponding to each storage level is adjusted.

7. A data storage device, characterized in that: include: An identification determination module, used to determine identification information corresponding to the business data to be stored; A level determination module, used to determine the storage level of the business data based on the identification information; The storage module is used to store the business data in a database according to the storage level.

8. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Intelligent management system and method for bank data warehouse

    CN119646080A

  • A bank data warehouse intelligent management system and method

    CN119646080B

  • Data article storage method, system and device, medium and product

    CN120561354A

  • Storage resource configuration method and device and vector database accelerator card

    CN121560219A