WO2020151320A1 - 数据存储方法、装置、计算机设备及存储介质 - Google Patents

数据存储方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2020151320A1
WO2020151320A1 PCT/CN2019/117703 CN2019117703W WO2020151320A1 WO 2020151320 A1 WO2020151320 A1 WO 2020151320A1 CN 2019117703 W CN2019117703 W CN 2019117703W WO 2020151320 A1 WO2020151320 A1 WO 2020151320A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
date
archived
identification information
folder
Prior art date
Application number
PCT/CN2019/117703
Other languages
English (en)
French (fr)
Inventor
胡友兵
陈晓羽
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2020151320A1 publication Critical patent/WO2020151320A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/08Insurance

Definitions

  • This application relates to the field of big data technology, in particular to a data storage method, device, computer equipment and storage medium
  • the insurance business has a wide range of applications and the corresponding management system has a large amount of data.
  • the inventor realized that due to the huge amount of data to be archived regularly stored, the management system memory is too large, and the management system cannot automatically allocate the archived data. , Resulting in a decrease in the operating efficiency of the management system, reducing system performance, thereby affecting the work efficiency of operators.
  • the embodiments of the application provide a data storage method, device, computer equipment, and storage medium to solve the problem that when the amount of data in the insurance industry system is too large, the system cannot perform apportionment processing, resulting in system performance degradation, which affects the work efficiency of operators The problem.
  • a data storage method including:
  • Acquiring data to be archived to be archived where the data to be archived includes data capacity and date identification information;
  • the target storage capacity reaches a preset threshold
  • the data to be archived stored in the date folder is exported to a cloud database according to preset requirements, and the current storage capacity is updated.
  • a data storage device includes:
  • the matching module is configured to save the data to be archived in a date folder that matches the date identification information in a data storage library, wherein the data storage library includes the current storage capacity and date folder of the data storage library And the date identification information corresponding to the date folder;
  • An arithmetic module configured to perform a summation operation on the data capacity and the current storage capacity to obtain the target storage capacity of the data storage library
  • the export module is configured to export the to-be-archived data stored in the date folder to a cloud database according to preset requirements if the target storage capacity reaches a preset threshold, and update the current storage capacity.
  • a computer device including a memory, a processor, and computer readable instructions stored in the memory and capable of running on the processor, and the processor implements the above data storage method when the processor executes the computer readable instructions step.
  • a non-volatile computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the above data storage method are implemented .
  • FIG. 1 is a flowchart of a data storage method provided by an embodiment of the present application
  • step S1 is a flowchart of step S1 in the data storage method provided by the embodiment of the present application.
  • FIG. 3 is a flowchart of processing processed data whose data state is not preprocessed in the data storage method provided by an embodiment of the present application;
  • FIG. 5 is a flowchart of step S2 in the data storage method provided by an embodiment of the present application.
  • step S4 is a flowchart of step S4 in the data storage method provided by the embodiment of the present application.
  • FIG. 7 is a schematic diagram of a data storage device provided by an embodiment of the present application.
  • Fig. 8 is a basic structural block diagram of a computer device provided by an embodiment of the present application.
  • the data storage method provided in this application is applied to the server, and the server can be implemented by an independent server or a server cluster composed of multiple servers.
  • a data storage method is provided, including the following steps:
  • S1 Acquire data to be archived to be archived, where the data to be archived includes data capacity and date identification information.
  • the data to be archived is directly acquired.
  • the preset database to be archived refers to a database dedicated to storing data to be archived to be archived.
  • the data capacity is mainly used to reflect the size of the data, for example, the data capacity of data A is 10 megabytes.
  • S2 Save the data to be archived in a date folder matching the date identification information in the data storage library, where the data storage library includes the current storage capacity of the data storage library, the date folder, and the date identification information corresponding to the date folder.
  • the current storage capacity mainly refers to the amount of data stored in the data storage library when the data storage library is accessed. For example, if 100 megabytes of data is stored in the data storage library, the data is accessed The corresponding current storage capacity of the storage library is 100 megabytes.
  • the date identification information included in the data to be archived is used to match the date identification information corresponding to the date folder in the data storage library, when the date corresponding to the date folder in the data storage library is matched
  • the identification information is the same as the date identification information included in the data to be archived
  • the data to be archived is saved in the date folder corresponding to the date identification information.
  • the identification rules of the date identification information of the data to be archived are the same as the identification rules of the date identification information corresponding to the date folder in the data repository.
  • the identification rule of the date identification information of the data to be archived is year plus month
  • the identification rule of the date identification information corresponding to the date folder in the data storage library is also year plus month.
  • the target storage capacity of the data storage library is the space capacity of the entire data storage library after the data to be archived is added to the data storage library.
  • the target storage capacity of the data storage library is the data capacity of data A to be archived 10 megabytes plus the current storage capacity of the data storage library.
  • the storage capacity is 90 megabytes, that is, the target storage capacity is 100 megabytes.
  • the target storage capacity obtained in step S3 is compared with a preset threshold, and when the target storage capacity reaches the preset threshold, the data to be archived in the date folder is exported to the cloud database according to the preset requirements, and the target The storage capacity is subtracted from the data capacity of the exported data to be archived, and the corresponding difference is obtained after subtraction, and the current storage capacity is updated by using the difference.
  • the preset threshold may be 100, and its specific value range may also be set according to the actual needs of the user, which is not limited here.
  • the preset requirement can be the data to be archived in the date folder with the largest data capacity, or the data to be archived in the date folder with the data capacity reaching a specified value.
  • the target storage capacity is the same as the current storage capacity of the data repository.
  • a cloud database refers to a database that is optimized or deployed in a virtual computing environment, which can realize the advantages of paying on demand, expanding on demand, high availability, and storage integration.
  • the corresponding data capacities are 40 megabytes and 60 megabytes respectively.
  • the target storage capacity and current storage capacity of the data storage library are both 100 megabytes, and the preset threshold is 100.
  • the preset requirement is that the date folder A is exported first. Since the target storage capacity of 100 megabytes is the same as the preset threshold of 100, the date folder A is exported to the cloud database according to the preset requirements, and the target storage capacity of 100 megabytes is subtracted.
  • the difference obtained by the data capacity of 40 megabytes corresponding to date folder A is 60 megabytes, and the current storage capacity is updated using this difference, that is, the current storage capacity is updated from 100 megabytes to 60 megabytes.
  • the data to be archived is saved in the date folder of the data storage library matching its date identification information, and the data capacity of the data to be archived and the current storage capacity of the data storage library are determined.
  • the sum operation obtains the target storage capacity of the data storage library, and finally exports the target data to the cloud database when the target storage capacity reaches the preset threshold, and updates the current storage capacity, so as to realize the automatic allocation processing of the data to be archived and avoid
  • the system's data volume is overloaded, which further improves the system performance and the operating efficiency of users.
  • step S1 obtaining the data to be archived to be archived includes the following steps:
  • S10 Obtain processing data to be processed with a data state, and the data state includes a preprocessed state and an unpreprocessed state.
  • the to-be-processed processing data with data status is acquired from a preset processing database, where the preset processing database refers to a data state that is specifically used to store the processed data and the processed data.
  • the processed data to be processed mainly refers to the processed data that needs to be archived.
  • S11 Identify the data state. If the data state is the preprocessed state, the processed data corresponding to the preprocessed state is determined as the data to be archived.
  • the data status is identified according to the processed data with the data status acquired in step S10.
  • the data status is processed in the preprocessed status.
  • the data is determined to be archived.
  • Data B is determined as data to be archived.
  • the processed data whose data status is preprocessed is determined as the data to be archived, so that the data to be archived can be accurately extracted, avoiding subsequent processing of other data, and further improving subsequent processing The efficiency of archived data processing.
  • the data storage method further includes the following steps:
  • the data state is identified according to the processed data with the data state acquired in step S10, and when the data state of the processed data is identified as the unpreprocessed state, the data state is changed to the unpreprocessed state.
  • the processed data is determined as the data to be determined, and the data to be determined is sent to the target user for confirmation according to the preset notification method.
  • the preset notification method can be sent through a designated mailbox, and its specific notification method can be set according to actual application needs, and there is no restriction here.
  • S51 Obtain the data of the preprocessing state fed back by the target user, and determine the data of the preprocessing state as data to be archived.
  • the data in the preprocessing state sent by the target user is detected, the data in the preprocessing state is extracted, the data state of the data in the preprocessing state is marked as preprocessed, and the data in the preprocessing state is determined For data to be archived.
  • the data in the pre-processing state refers to the data after the target user processes the data to be determined.
  • the processed data whose data state is not preprocessed is determined as the data to be determined and sent to the target user, and finally the data of the preprocessed state fed back by the target user is obtained and preprocessed
  • the status data is determined as the data to be archived, so as to realize the further processing of the data that does not belong to the data to be archived, and obtain the processed data to be archived, to ensure that only the archived data is processed later, thereby improving the accuracy of subsequent processing of the archived data .
  • the date folder includes at least two target folders divided according to company identification information and company identification information corresponding to the target folder; the data to be archived includes company identification information.
  • the data storage method further includes the following steps:
  • S60 Extract company identification information of the data to be archived in the date folder.
  • the data to be archived includes company identification information.
  • the company identification information in the data to be archived is extracted.
  • S61 Save the data to be archived in the date folder in the same target folder as the company identification information.
  • the date folder includes at least two target folders divided according to company identification information and company identification information corresponding to the target folder.
  • step S60 to the company identification information of the data to be archived, according to the company identification information, a target folder that is the same as the company identification information is queried from the date folder, and the data to be archived is saved in the target folder.
  • the data to be archived is saved in the target folder that matches the company identification information, so as to realize the automatic classification processing of the data to be archived according to the company identification information and avoid manual intervention. Further improve the accuracy of the automatic allocation processing of the data to be archived.
  • step S2 saving the data to be archived in a date folder matching the date identification information in the data storage library includes the following steps:
  • the date identification information corresponding to the data to be archived and the date identification information corresponding to the date folder in the data storage library are extracted.
  • the date identification information corresponding to the data to be archived is respectively associated with the date identification information corresponding to each date folder in the data storage library. The information is matched, and the matched result is obtained.
  • the date identification information corresponding to the data C to be archived is 201811
  • the date folder C1 and the date folder C2 exist in the data storage database
  • the corresponding date identification information is 201810 and 201811, respectively, the date corresponding to the data C to be archived
  • the identification information 201811 is compared with the date identification information 201810 corresponding to the date folder C1 and the date identification information 201811 corresponding to the date folder C2 respectively.
  • the target folder is mainly used to store the data to be archived whose date identification information is the same as the date identification information corresponding to the target folder.
  • the matching rule of step S21 when the matching result is the date corresponding to the data to be archived
  • the folder corresponding to the date identification information is determined as the target date folder.
  • the corresponding date identification information is 2018 and 2017, respectively
  • the date identification information corresponding to the data D to be archived is 2018, because the date identification information 2018 and the date corresponding to the data D to be archived
  • the date folder D1 is determined as the target date folder.
  • step S21 when the matching result is that the date identification information corresponding to the data to be archived is not the same as the date identification information corresponding to the date folder, it means that there is no suitable storage for the data storage library.
  • a new initial folder is automatically generated in the data repository, and the date identification information corresponding to the initial folder is the same as the date identification information corresponding to the data to be archived, and the initial folder is determined Is the target date folder.
  • date folder E1 there is a date folder E1 in the data repository, and its corresponding date identification information is 201805, and there is data E to be archived, and its corresponding date identification information is 201810. Because the date identification information 201810 and date file corresponding to the data E to be archived If the date identification information 201805 corresponding to folder E1 is not the same, a new initial folder E2 is automatically generated in the data storage library, and its corresponding date identification information is 201810, and the initial folder E2 is determined as the target date folder. At the time, the date folder E1 and the target date folder E2 exist in the data store.
  • the date identification information of the data to be archived is matched with the date identification information of the date folder. If the matching is successful, the date folder that is successfully matched is determined as the target date folder, and if the matching fails, the date folder is re- Create an initial folder with the same date identification information as the date identification information of the data to be archived, and determine the initial folder as the target date folder, and finally save the data to be archived in the target date folder, so as to realize the data to be archived according to the date Automatic classification and processing of identification information avoids manual intervention and further improves the accuracy of automatic allocation processing for archived data.
  • step S4 that is, if the target storage capacity reaches a preset threshold, the data to be archived stored in the date folder is exported to the cloud database according to preset requirements, and the current Storage capacity includes the following steps:
  • the target storage capacity is obtained from the preset monitoring terminal at regular intervals, and the target storage capacity is compared with the preset threshold.
  • the target storage capacity is compared with the preset threshold, and when the target storage capacity reaches the preset threshold, the date folder with the largest storage capacity is selected from the date folders, and the date folder to be archived in the date folder is selected.
  • the data is used as the export data, and the export data is exported to the cloud database.
  • the preset monitoring terminal is mainly used to record the target storage capacity.
  • the target storage capacity is 100 megabytes
  • the preset threshold value is 100. Due to the target storage capacity and expected If the threshold is the same, it means that the target storage capacity reaches the preset threshold. If the date folder with the largest storage capacity is selected from the date folders W1 and W2, the date folder W2 will be selected, and the data to be archived in the date folder W2 will be selected As the export data, finally export the export data to the cloud database.
  • S42 Obtain the data capacity corresponding to the derived data as the target capacity, perform a difference calculation between the current storage capacity and the target capacity, and update the current storage capacity with the obtained difference.
  • the data capacity corresponding to the export data is obtained from the preset export table, and the data capacity is taken as the target capacity, and the current storage capacity is subtracted from the target capacity , Obtain the corresponding difference according to the subtraction result, and update the current storage capacity to the difference.
  • the preset export table refers to a data table specifically used to record the data capacity corresponding to the exported data.
  • the difference between the current storage capacity and the target capacity is a positive number.
  • the current storage capacity is 100 megabytes and the target capacity is 20 megabytes
  • the target storage capacity by comparing the target storage capacity with a preset threshold, when the target storage capacity reaches the preset threshold, the data to be archived in the date folder with the largest storage capacity is selected as the export data, and the export data is exported After reaching the cloud database, the current storage capacity is updated, so that when the storage capacity in the system reaches the preset threshold, the preset data can be automatically exported to the cloud database, which further reduces the system load and can be effective Improve the performance of the system.
  • the data storage method further includes the following steps:
  • step S40 the target storage capacity is compared with the preset threshold.
  • the date folder with the farthest date identification information is selected from the date folder, and the date folder in the date folder is selected.
  • the data to be archived is used as the export data, and the export data is exported to the cloud database.
  • the date folder Z1 and a date folder Z2 that contain data to be archived.
  • the corresponding date identification information is 2015 and 2018, respectively, the target storage capacity is 100 megabytes, and the preset threshold is 100. Because the target storage capacity is different from the preset If the threshold is the same, it means that the target storage capacity has reached the preset threshold. If the date folder with the farthest date identification information is selected from the date folders Z1 and Z2, the date folder Z1 will be selected and the files to be archived in the date folder Z1 The data is used as the export data, and finally the export data is exported to the cloud database.
  • the target storage capacity by comparing the target storage capacity with a preset threshold, when the target storage capacity reaches the preset threshold, the data to be archived in the date folder with the farthest date identification information is selected as the export data, and Export data to cloud database, so that when the storage capacity in the system reaches the preset threshold, it can automatically export the preset data to the cloud database, further reducing the system load, and effectively improving the performance of the system .
  • the target storage capacity is compared with a preset threshold according to step S40, and when the target storage capacity reaches the preset threshold, the date folder with the farthest date identification information and the largest storage capacity is selected from the date folders, Use the data to be archived in the date folder as the exported data, and export the exported data to the cloud database.
  • a data storage device is provided, and the data storage device corresponds to the data storage method in the above-mentioned embodiment one-to-one.
  • the data storage device includes an acquisition module 80, a matching module 81, an arithmetic module 82, and an export module 83.
  • the detailed description of each functional module is as follows:
  • the obtaining module 80 is used to obtain the data to be archived, where the data to be archived includes data capacity and date identification information;
  • the matching module 81 is used to save the data to be archived in the date folder that matches the date identification information in the data storage library, where the data storage library includes the current storage capacity of the data storage library, the date folder, and the date folder corresponding to the Date identification information;
  • the calculation module 82 is used to perform a summation calculation between the data capacity and the current storage capacity to obtain the target storage capacity of the data storage library;
  • the export module 83 is configured to export the data to be archived stored in the date folder to the cloud database according to the preset requirements if the target storage capacity reaches the preset threshold, and update the current storage capacity.
  • the obtaining module 80 includes:
  • the preliminary acquisition sub-module is used to acquire the processing data to be processed with the data status, the data status includes the preprocessed state and the unpreprocessed state;
  • the first determining sub-module is used to identify the data state, and if the data state is the preprocessed state, determine the processed data corresponding to the preprocessed state as the data to be archived.
  • the data storage device further includes:
  • the user confirmation module is used to determine the processed data corresponding to the unpreprocessed state as the data to be determined if the data status is the unpreprocessed state, and send the data to be determined to the target user for confirmation;
  • the second determining module is used to obtain the data of the preprocessing state fed back by the target user, and determine the data of the preprocessing state as the data to be archived.
  • the data storage device further includes:
  • the first extraction module is used to extract the company identification information of the data to be archived in the date folder;
  • the first saving module is used to save the data to be archived in the date folder to the same target folder as the company identification information.
  • the matching module 81 includes:
  • the second extraction sub-module is used to extract the date identification information corresponding to the data to be archived and the date identification information corresponding to the date folder included in the data storage library;
  • the information matching sub-module is used to match the date identification information corresponding to the data to be archived with the date identification information corresponding to each date folder to obtain a matching result;
  • the same information submodule is used to determine the date folder corresponding to the date identification information as the target date folder if the matching result is that the date identification information corresponding to the data to be archived is the same as the date identification information corresponding to the date folder;
  • the information different sub-module is used to generate the same initial date identification information corresponding to the data to be archived in the data storage database if the matching result is that the date identification information corresponding to the data to be archived is not the same as the date identification information corresponding to the date folder Folder, and determine the initial folder as the target date folder;
  • the second saving sub-module is used to save the data to be archived to the target date folder.
  • the export module 83 includes:
  • the comparison sub-module is used to compare the target storage capacity with a preset threshold
  • the first export submodule is used to select the data to be archived in the date folder with the largest storage capacity as the export data if the target storage capacity reaches the preset threshold, and export the exported data to the cloud database, where the date folder includes storage;
  • the update sub-module is used to obtain the data capacity corresponding to the exported data as the target capacity, perform the difference calculation between the current storage capacity and the target capacity, and update the current storage capacity with the obtained difference.
  • the data storage device further includes:
  • the first export sub-module is configured to, if the target storage capacity reaches the preset threshold, further select the data to be archived in the date folder with the farthest date identification information as the export data, and export the export data to the cloud database.
  • FIG. 8 is a block diagram of the basic structure of the computer device 90 in an embodiment of the application.
  • the computer device 90 includes a memory 91, a processor 92, and a network interface 93 that are communicatively connected to each other through a system bus. It should be pointed out that FIG. 8 only shows a computer device 90 with components 91-93, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculation and/or information processing in accordance with pre-set or stored instructions.
  • Its hardware includes, but is not limited to, a microprocessor, a dedicated Integrated Circuit (Application Specific Integrated Circuit, ASIC), Programmable Gate Array (Field-Programmable Gate Array, FPGA), Digital Processor (Digital Signal Processor, DSP), embedded equipment, etc.
  • ASIC Application Specific Integrated Circuit
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • DSP Digital Processor
  • the computer device may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the computer device can interact with the user through a keyboard, a mouse, a remote control, a touch panel, or a voice control device.
  • the memory 91 includes at least one type of readable storage medium.
  • the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static memory Random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc.
  • the memory 91 may be an internal storage unit of the computer device 90, such as a hard disk or memory of the computer device 90.
  • the memory 91 may also be an external storage device of the computer device 90, such as a plug-in hard disk equipped on the computer device 90, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
  • the memory 91 may also include both an internal storage unit of the computer device 90 and an external storage device thereof.
  • the memory 91 is generally used to store an operating system and various application software installed in the computer device 90, such as computer-readable instructions of the data storage method.
  • the memory 91 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 92 may be a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor, or other data processing chips.
  • the processor 92 is generally used to control the overall operation of the computer device 90.
  • the processor 92 is configured to run computer-readable instructions or process data stored in the memory 91, for example, computer-readable instructions for running the data storage method.
  • the network interface 93 may include a wireless network interface or a wired network interface, and the network interface 93 is generally used to establish a communication connection between the computer device 90 and other electronic devices.
  • This application also provides another implementation manner, that is, to provide a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores a data information entry process, and the data information entry
  • the process may be executed by at least one processor, so that the at least one processor executes the steps of any one of the foregoing data storage methods.
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a computer device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.
  • a computer device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种数据存储方法、装置、计算机设备及存储介质,涉及大数据技术领域,所述数据存储方法包括:获取待归档的待归档数据;将待归档数据保存到数据存储库中与日期标识信息匹配的日期文件夹;将数据容量和当前存储容量进行求和运算,得到数据存储库的目标存储容量;若目标存储容量达到预设阈值,则将日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新当前存储容量。实现对待归档数据的自动分摊处理,避免人工干预,进一步提高系统性能和操作用户的工作效率。

Description

数据存储方法、装置、计算机设备及存储介质
本申请以2019年1月25日提交的申请号为2019100723569,名称为“数据存储方法、装置、计算机设备及存储介质”的中国发明专利申请为基础,并要求其优先权。
技术领域
本申请涉及大数据技术领域,尤其涉及一种数据存储方法、装置、计算机设备及存储介质
背景技术
目前,保险业务应用范围广,对应的管理系统数据量大,发明人意识到,由于定期存入的待归档数据量庞大,导致管理系统内存占用过大,管理系统无法自动对待归档数据进行分摊处理,导致管理系统运行效率下降,降低系统性能,从而影响操作人员的工作效率。
发明内容
本申请实施例提供一种数据存储方法、装置、计算机设备及存储介质,以解决当保险业物系统数据量过大时,由于系统无法进行分摊处理,导致系统性能下降,从而影响操作人员工作效率的问题。
一种数据存储方法,包括:
获取待归档的待归档数据,其中,所述待归档数据包括数据容量和日期标识信息;
将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹,其中,所述数据存储库包括所述数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的所述日期标识信息;
将所述数据容量和所述当前存储容量进行求和运算,得到所述数据存储库的目标存储容量;
若所述目标存储容量达到预设阈值,则将所述日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新所述当前存储容量。
一种数据存储装置,包括:
获取模块,用于获取待归档的待归档数据,其中,所述待归档数据包括数据容量和日期标识信息;
匹配模块,用于将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹,其中,所述数据存储库包括所述数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的所述日期标识信息;
运算模块,用于将所述数据容量和所述当前存储容量进行求和运算,得到所述数据存储库的目标存储容量;
导出模块,用于若所述目标存储容量达到预设阈值,则将所述日期文件 夹中存储的待归档数据按照预设要求导出到云数据库中,并更新所述当前存储容量。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现上述数据存储方法的步骤。
一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现上述数据存储方法的步骤。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的数据存储方法的流程图;
图2是本申请实施例提供的数据存储方法中步骤S1的流程图;
图3是本申请实施例提供的数据存储方法中对数据状态为未预处理的处理数据进行处理的流程图;
图4是本申请实施例提供的数据存储方法中将待归档数据按照日期标识信息进行保存的流程图;
图5是本申请实施例提供的数据存储方法中步骤S2的流程图;
图6是本申请实施例提供的数据存储方法中步骤S4的流程图;
图7是本申请实施例提供的数据存储装置的示意图;
图8是本申请实施例提供的计算机设备的基本机构框图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的数据存储方法应用于服务端,服务端具体可以用独立的服务器或者多个服务器组成的服务器集群实现。在一实施例中,如图1所示,提供一种数据存储方法,包括如下步骤:
S1:获取待归档的待归档数据,其中,待归档数据包括数据容量和日期标识信息。
在本申请实施例中,通过对预设待归档数据库进行检测,当检测到预设待归档数据库中存在待归档数据时,则直接对待归档数据进行获取。
其中,预设待归档数据库是指专门用于存储待归档的待归档数据的数据库。
需要说明的是,数据容量主要是用于体现数据的大小,例如,数据A的数据容量为10兆。
S2:将待归档数据保存到数据存储库中与日期标识信息匹配的日期文件夹,其中,数据存储库包括数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的日期标识信息。
在本申请实施例中,当前存储容量主要是指在访问数据存储库时,数据存储库中存储的数据的数据量,例如,若数据存储库中存储了100兆的数据,则在访问该数据存储库时其对应的当前存储容量为100兆。根据步骤S1获取到的待归档数据,利用待归档数据中包括的日期标识信息,与数据存储库中日期文件夹对应的日期标识信息进行匹配,当匹配到数据存储库中日期文件夹对应的日期标识信息与待归档数据中包括的日期标识信息相同时,将待归档数据保存到该日期标识信息对应的日期文件夹中。
需要说明的是,待归档数据的日期标识信息的标识规则与数据存储库中的日期文件夹对应的日期标识信息的标识规则相同,例如,待归档数据的日期标识信息的标识规则为年份加月份,则数据存储库中的日期文件夹对应的日期标识信息的标识规则也为年份加月份。
S3:将数据容量和当前存储容量进行求和运算,得到数据存储库的目标存储容量。
在本申请实施例中,数据存储库的目标存储容量为待归档数据添加到数据存储库后整个数据存储库的空间容量。通过将待归档数据的数据容量与数据存储库的当前存储容量进行累加,根据累加结果得到对应的和值,该和值即为目标存储容量。
例如,若待归档数据A的数据容量为10兆,数据存储库的当前存储容量为90兆,则数据存储库的目标存储容量为待归档数据A的数据容量10兆加上数据存储库的当前存储容量90兆,即目标存储容量为100兆。
S4:若目标存储容量达到预设阈值,则将日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新当前存储容量。
具体地,将步骤S3得到的目标存储容量与预设阈值进行比较,当目标存储容量达到预设阈值时,根据预设要求将日期文件夹中的待归档数据导出到云数据库中,并通过目标存储容量减去导出的待归档数据的数据容量,相减后得到相应的差值,利用该差值对当前存储容量进行更新。
其中,预设阈值具体可以是100,其具体的取值范围也可以根据用户的实际需求进行设置,此处不做限制。
预设要求具体可以是数据容量最大的日期文件夹中的待归档数据,也可以是数据容量达到指定数值的日期文件夹中的待归档数据。
需要说明的是,当日期文件夹中存储的待归档数据未导出到云数据库中时,则目标存储容量与数据存储库的当前存储容量相同。
云数据库是指被优化或部署到一个虚拟计算环境中的数据库,可以实现按需付费、按需扩展、高可用性以及存储整合等优势。
例如,数据存储库中存在日期文件夹A和日期文件夹B,对应的数据容量分别为40兆和60兆,该数据存储库的目标存储容量和当前存储容量都为100兆,预设阈值为100,预设要求为日期文件夹A优先导出,由于目标存储容量100兆与预设阈值100相同,则根据预设要求将日期文件夹A导出到云数据库中,将目标存储容量100兆减去日期文件夹A对应的数据容量40兆得到的差值为60兆,并利用该差值对当前存储容量进行更新,即当前存储容量从100兆更新为60兆。
本实施例中,通过获取待归档数据,将待归档数据保存到与其日期标识信息相匹配的数据存储库的日期文件夹中,并对待归档数据的数据容量和数据存储库的当前存储容量进行求和运算得到数据存储库的目标存储容量,最后在目标存储容量达到预设阈值的情况下将目标数据导出到云数据库,并对当前存储容量进行更新,从而实现对待归档数据的自动分摊处理,避免系统在人工无法及时对待归档数据进行分摊处理的情况下导致系统的数据量超负荷,进一步提高系统性能和操作用户的工作效率。
在一实施例中,如图2所示,步骤S1中,即获取待归档的待归档数据包括如下步骤:
S10:获取带数据状态的待处理的处理数据,数据状态包括已预处理状态和未预处理状态。
具体地,从预设处理数据库中获取带数据状态的待处理的处理数据,其中,预设处理数据库是指专门用于存储处理数据和处理数据对应的数据状态。
需要说明的是,待处理的处理数据主要是指需要进行归档处理的处理数据。
S11:识别数据状态,若数据状态为已预处理状态,则将已预处理状态对应的处理数据确定为待归档数据。
具体地,根据步骤S10获取到的带数据状态的待处理的处理数据,对数据状态进行识别,当识别到处理数据的数据状态为已预处理时,则将数据状态为已预处理状态的处理数据确定为待归档数据。
例如,存在处理数据B,且该处理数据B的数据状态为已预处理,当对处理数据B的数据状态进行识别时,得到该处理数据B的数据状态为已预处理状态,则将该处理数据B确定为待归档数据。
本实施例中,通过识别处理数据的数据状态,将数据状态为已预处理状态的处理数据确定为待归档数据,从而能够准确提取待归档数据,避免后续对其他数据的处理,进一步提高后续对待归档数据进行处理的工作效率。
在一实施例中,如图3所示,步骤S10之后,该数据存储方法还包括如下步骤:
S50:若数据状态为未预处理状态,则将未预处理状态对应的处理数据确定为待确定数据,并将待确定数据发送给目标用户进行确认。
具体地,根据步骤S10获取到的带数据状态的待处理的处理数据,对数据状态进行识别,当识别到处理数据的数据状态为未预处理状态时,则将数据状态为未预处理状态的处理数据确定为待确定数据,并按照预设的通知方式,将待确定数据发送给目标用户进行确认。
其中,预设的通知方式可以是通过指定邮箱进行发送,其具体的通知方式可以根据实际应用的需要进行设置,此处不做限制。
S51:获取目标用户反馈的预处理状态的数据,并将预处理状态的数据确定为待归档数据。
具体地,当检测到目标用户发送的预处理状态的数据时,提取该预处理状态的数据,将该预处理状态的数据的数据状态标识为已预处理,并将该预处理状态的数据确定为待归档数据。其中,预处理状态的数据是指目标用户针对待确定数据进行处理后的数据。
本实施例中,通过识别处理数据的数据状态,将数据状态为未预处理状态的处理数据确定为待确定数据并发送给目标用户,最后获取目标用户反馈的预处理状态的数据并将预处理状态的数据确定为待归档数据,从而实现对不属于待归档数据的进一步处理,并获取处理后的待归档数据,保证后续只对待归档数据进行处理,从而提高后续对待归档数据进行处理的准确性。
在一实施例中,日期文件夹包括至少两个根据公司标识信息划分的目标文件夹及该目标文件夹对应的公司标识信息;待归档数据包括公司标识信息。
如图4所示,步骤S2之后,该数据存储方法还包括如下步骤:
S60:提取日期文件夹中的待归档数据的公司标识信息。
在本申请实施例中,待归档数据包括公司标识信息,当检测到日期文件夹中的待归档数据时,提取待归档数据中的公司标识信息。
S61:将日期文件夹中的待归档数据保存到与公司标识信息相同的目标文件夹中。
在本申请实施例中,日期文件夹包括至少两个根据公司标识信息划分的目标文件夹及该目标文件夹对应的公司标识信息。根据步骤S60到待归档数据的公司标识信息,根据该公司标识信息,从日期文件夹中查询与该公司标识信息相同的目标文件夹,并将待归档数据保存到该目标文件夹中。
本实施例中,通过根据待归档数据的公司标识信息,将待归档数据保存到与其公司标识信息相匹配的目标文件夹中,实现对待归档数据按照公司标识信息的自动分类处理,避免人工干预,进一步提高对待归档数据进行自动分摊处理的准确性。
在一实施例中,如图5所示,步骤S2中,即将待归档数据保存到数据存储库中与日期标识信息匹配的日期文件夹包括如下步骤:
S20:提取待归档数据对应的日期标识信息和数据存储库包括的日期文件夹对应的日期标识信息。
在本申请实施例中,当检测到待归档数据时,提取待归档数据对应的日期标识信息和数据存储库中日期文件夹对应的日期标识信息。
S21:将待归档数据对应的日期标识信息与每个日期文件夹对应的日期标识信息进行匹配,得到匹配结果。
具体地,根据步骤S20得到的待归档数据对应的日期标识信息和日期文件夹对应的日期标识信息,将待归档数据对应的日期标识信息分别与数据存储库中每个日期文件夹对应的日期标识信息进行匹配,得到匹配后的匹配结果。
例如,待归档数据C对应的日期标识信息为201811,数据存储库中存在日期文件夹C1和日期文件夹C2,且其对应的日期标识信息分别为201810和201811,将待归档数据C对应的日期标识信息201811分别与日期文件夹C1对应的日期标识信息201810、日期文件夹C2对应的日期标识信息201811进行对比。
S22:若匹配结果为待归档数据对应的日期标识信息与日期文件夹对应的日期标识信息相同,则将日期标识信息对应的日期文件夹确定为目标日期文件夹。
在本申请实施例中,目标文件夹主要用于存储日期标识信息与该目标文件夹对应的日期标识信息相同的待归档数据,根据步骤S21的匹配规则,当匹配结果为待归档数据对应的日期标识信息与日期文件夹对应的日期标识信息相同时,将该日期标识信息对应的文件夹确定为目标日期文件夹。
例如,存在日期文件夹D1和日期文件夹D2,其对应的日期标识信息分别为2018和2017,待归档数据D对应的日期标识信息为2018,由于待归档数据D对应的日期标识信息2018与日期文件夹D1对应的日期标识信息相同,则将日期文件夹D1确定为目标日期文件夹。
S23:若匹配结果为待归档数据对应的日期标识信息与日期文件夹对应的日期标识信息不相同,则在数据存储库中生成与待归档数据对应的日期标识信息相同的初始文件夹,并将初始文件夹确定为目标日期文件夹。
在本申请实施例中,根据步骤S21的匹配规则,当匹配结果为待归档数据对应的日期标识信息与日期文件夹对应的日期标识信息不相同时,表示数据存储库中未存在适合保存该待归档数据的文件夹,则在数据存储库中自动生成一个新的初始文件夹,且该初始文件夹对应的日期标识信息与该待归档数据对应的日期标识信息相同,并将该初始文件夹确定为目标日期文件夹。
例如,数据存储库中存在日期文件夹E1,其对应的日期标识信息为201805,存在待归档数据E,其对应的日期标识信息为201810,由于待归档数据E对应的日期标识信息201810与日期文件夹E1对应的日期标识信息201805不相同,则数据存储库中自动生成一个新的初始文件夹E2,且其对应的日期标识信息为201810,并将初始文件夹E2确定为目标日期文件夹,此时,数据存储库中存在日期文件夹E1和目标日期文件夹E2。
S24:将待归档数据保存到目标日期文件夹。
具体地,将待归档数据保存到目标日期文件夹。
本实施例中,通过将待归档数据的日期标识信息与日期文件夹的日期标 识信息进行匹配,若匹配成功,则将匹配成功的日期文件夹确定为目标日期文件夹,若匹配失败,则重新创建日期标识信息与待归档数据的日期标识信息相同的初始文件夹,并将该初始文件夹确定为目标日期文件夹,最后将待归档数据保存到目标日期文件夹,从而实现对待归档数据按照日期标识信息的自动分类处理,避免人工干预,进一步提高对待归档数据进行自动分摊处理的准确性。
在一实施例中,如图6所示,步骤S4中,即若目标存储容量达到预设阈值,则将日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新当前存储容量包括如下步骤:
S40:将目标存储容量与预设阈值进行比较。
在本申请实施例中,通过定时从预设监控端获取目标存储容量,将目标存储容量与预设阈值进行比较。
S41:若目标存储容量达到预设阈值,则选取存储容量最大的日期文件夹的待归档数据作为导出数据,并将导出数据导出到云数据库中,其中,日期文件夹包括存储容量。
具体地,根据步骤S40将目标存储容量与预设阈值进行比较,当目标存储容量达到预设阈值时,从日期文件夹中选取存储容量最大的日期文件夹,将该日期文件夹中的待归档数据作为导出数据,并将导出数据导出到云数据库中。其中,预设监控端主要用于记录目标存储容量。
例如,存在包含待归档数据的日期文件夹W1和日期文件夹W2,其对应的存储容量分别为50兆和100兆,目标存储容量为100兆,预设阈值为100,由于目标存储容量与预设阈值相同,表示目标存储容量达到预设阈值,若从日期文件夹W1和W2中选取存储容量最大的日期文件夹,则将选取日期文件夹W2,并将日期文件夹W2中的待归档数据作为导出数据,最后将导出数据导出到云数据库中。
S42:获取导出数据对应的数据容量作为目标容量,将当前存储容量与目标容量进行求差运算,得到的差值对当前存储容量进行更新。
具体地,当检测到导出数据从数据存储库中导出时,则从预设导出表中获取导出数据对应的数据容量,并将该数据容量作为目标容量,将当前存储容量与目标容量进行相减,根据相减结果得到对应差值,并将当前存储容量更新为该差值。其中,预设导出表是指专门用于记录导出数据对应的数据容量的数据表。
需要说明的是,当前存储容量与目标容量相减得到的差值为正数。
例如,存在当前存储容量为100兆,目标容量为20兆,将当前存储容量100兆与目标容量20兆相减,得到差值80兆,并将当前存储容量从100兆更新为80兆。
本实施例中,通过将目标存储容量与预设阈值进行比较,在目标存储容量达到预设阈值的情况下,选取存储容量最大的日期文件夹中的待归档数据作为导出数据,将导出数据导出到云数据库后并对当前存储容量进行更新, 从而实现系统中的存储容量在达到预设阈值的情况下,能够自动将预先设定好的数据导出到云数据库中,进一步减轻系统负荷,能够有效提高系统的工作性能。
在一实施例中,步骤S40之后,步骤S42之前,所述数据存储方法还包括如下步骤:
S7:若目标存储容量达到预设阈值,则进一步选取日期标识信息最远的日期文件夹的待归档数据作为导出数据,并将导出数据导出到云数据库中。
具体地,根据步骤S40将目标存储容量与预设阈值进行比较,当目标存储容量达到预设阈值时,从日期文件夹中选取日期标识信息最远的日期文件夹,将该日期文件夹中的待归档数据作为导出数据,并将导出数据导出到云数据库中。
例如,存在包含待归档数据的日期文件夹Z1和日期文件夹Z2,其对应的日期标识信息分别为2015和2018,目标存储容量为100兆,预设阈值为100,由于目标存储容量与预设阈值相同,表示目标存储容量达到预设阈值,若从日期文件夹Z1和Z2中选取日期标识信息最远的日期文件夹,则将选取日期文件夹Z1,并将日期文件夹Z1中的待归档数据作为导出数据,最后将导出数据导出到云数据库中。
本实施例中,通过将目标存储容量与预设阈值进行比较,在目标存储容量达到预设阈值的情况下,选取日期标识信息最远的日期文件夹中的待归档数据作为导出数据,并将导出数据导出到云数据库,从而实现系统中的存储容量在达到预设阈值的情况下,能够自动将预先设定好的数据导出到云数据库中,进一步减轻系统负荷,能够有效提高系统的工作性能。
在一实施例中,根据步骤S40将目标存储容量与预设阈值进行比较,当目标存储容量达到预设阈值时,从日期文件夹中选取日期标识信息最远并且存储容量最大的日期文件夹,将该日期文件夹中的待归档数据作为导出数据,并将导出数据导出到云数据库中。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种数据存储装置,该数据存储装置与上述实施例中数据存储方法一一对应。如图7所示,该数据存储装置包括获取模块80、匹配模块81、运算模块82和导出模块83。各功能模块详细说明如下:
获取模块80,用于获取待归档的待归档数据,其中,待归档数据包括数据容量和日期标识信息;
匹配模块81,用于将待归档数据保存到数据存储库中与日期标识信息匹配的日期文件夹,其中,数据存储库包括数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的日期标识信息;
运算模块82,用于将数据容量和当前存储容量进行求和运算,得到数据存储库的目标存储容量;
导出模块83,用于若目标存储容量达到预设阈值,则将日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新当前存储容量。
进一步地,获取模块80包括:
初步获取子模块,用于获取带数据状态的待处理的处理数据,数据状态包括已预处理状态和未预处理状态;
第一确定子模块,用于识别数据状态,若数据状态为已预处理状态,则将已预处理状态对应的处理数据确定为待归档数据。
进一步地,数据存储装置还包括:
用户确认模块,用于若数据状态为未预处理状态,则将未预处理状态对应的处理数据确定为待确定数据,并将待确定数据发送给目标用户进行确认;
第二确定模块,用于获取目标用户反馈的预处理状态的数据,并将预处理状态的数据确定为待归档数据。
进一步地,数据存储装置还包括:
第一提取模块,用于提取日期文件夹中的待归档数据的公司标识信息;
第一保存模块,用于将日期文件夹中的待归档数据保存到与公司标识信息相同的目标文件夹中。
进一步地,匹配模块81包括:
第二提取子模块,用于提取待归档数据对应的日期标识信息和数据存储库包括的日期文件夹对应的日期标识信息;
信息匹配子模块,用于将待归档数据对应的日期标识信息与每个日期文件夹对应的日期标识信息进行匹配,得到匹配结果;
信息相同子模块,用于若匹配结果为待归档数据对应的日期标识信息与日期文件夹对应的日期标识信息相同,则将日期标识信息对应的日期文件夹确定为目标日期文件夹;
信息不同子模块,用于若匹配结果为待归档数据对应的日期标识信息与日期文件夹对应的日期标识信息不相同,则在数据存储库中生成与待归档数据对应的日期标识信息相同的初始文件夹,并将初始文件夹确定为目标日期文件夹;
第二保存子模块,用于将待归档数据保存到目标日期文件夹。
进一步地,导出模块83包括:
比较子模块,用于将目标存储容量与预设阈值进行比较;
第一导出子模块,用于若目标存储容量达到预设阈值,则选取存储容量最大的日期文件夹的待归档数据作为导出数据,并将导出数据导出到云数据库中,其中,日期文件夹包括存储容量;
更新子模块,用于获取导出数据对应的数据容量作为目标容量,将当前存储容量与目标容量进行求差运算,得到的差值对当前存储容量进行更新。
进一步地,数据存储装置还包括:
第一导出子模块,用于若目标存储容量达到预设阈值,则进一步选取日期标识信息最远的日期文件夹的待归档数据作为导出数据,并将导出数据导 出到云数据库中。
本申请的一些实施例公开了计算机设备。具体请参阅图8,为本申请的一实施例中计算机设备90基本结构框图。
如图8中所示意的,所述计算机设备90包括通过系统总线相互通信连接存储器91、处理器92、网络接口93。需要指出的是,图8中仅示出了具有组件91-93的计算机设备90,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。其中,本技术领域技术人员可以理解,这里的计算机设备是一种能够按照事先设定或存储的指令,自动进行数值计算和/或信息处理的设备,其硬件包括但不限于微处理器、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程门阵列(Field-Programmable Gate Array,FPGA)、数字处理器(Digital Signal Processor,DSP)、嵌入式设备等。
所述计算机设备可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述计算机设备可以与用户通过键盘、鼠标、遥控器、触摸板或声控设备等方式进行人机交互。
所述存储器91至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等。在一些实施例中,所述存储器91可以是所述计算机设备90的内部存储单元,例如该计算机设备90的硬盘或内存。在另一些实施例中,所述存储器91也可以是所述计算机设备90的外部存储设备,例如该计算机设备90上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,所述存储器91还可以既包括所述计算机设备90的内部存储单元也包括其外部存储设备。本实施例中,所述存储器91通常用于存储安装于所述计算机设备90的操作系统和各类应用软件,例如所述数据存储方法的计算机可读指令等。此外,所述存储器91还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器92在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。该处理器92通常用于控制所述计算机设备90的总体操作。本实施例中,所述处理器92用于运行所述存储器91中存储的计算机可读指令或者处理数据,例如运行所述数据存储方法的计算机可读指令。
所述网络接口93可包括无线网络接口或有线网络接口,该网络接口93通常用于在所述计算机设备90与其他电子设备之间建立通信连接。
本申请还提供了另一种实施方式,即提供一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有数据信息录入流程,所述数据信息录入流程可被至少一个处理器执行,以使所述至少一个处理器执行上述任意一种数据存储方法的步骤。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台计算机设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
最后应说明的是,显然以上所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例,附图中给出了本申请的较佳实施例,但并不限制本申请的专利范围。本申请可以以许多不同的形式来实现,相反地,提供这些实施例的目的是使对本申请的公开内容的理解更加透彻全面。尽管参照前述实施例对本申请进行了详细的说明,对于本领域的技术人员来而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本申请说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本申请专利保护范围之内。

Claims (20)

  1. 一种数据存储方法,其特征在于,所述数据存储方法包括:
    获取待归档的待归档数据,其中,所述待归档数据包括数据容量和日期标识信息;
    将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹,其中,所述数据存储库包括所述数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的所述日期标识信息;
    将所述数据容量和所述当前存储容量进行求和运算,得到所述数据存储库的目标存储容量;
    若所述目标存储容量达到预设阈值,则将所述日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新所述当前存储容量。
  2. 如权利要求1所述的数据存储方法,其特征在于,所述获取待归档的待归档数据包括:
    获取带数据状态的待处理的处理数据,所述数据状态包括已预处理状态和未预处理状态;
    识别所述数据状态,若所述数据状态为所述已预处理状态,则将所述已预处理状态对应的所述处理数据确定为所述待归档数据。
  3. 如权利要求2所述的数据存储方法,其特征在于,所述获取带数据状态的待处理的处理数据之后,所述数据存储方法还包括:
    若所述数据状态为所述未预处理状态,则将所述未预处理状态对应的所述处理数据确定为待确定数据,并将所述待确定数据发送给目标用户进行确认;
    获取所述目标用户反馈的预处理状态的数据,并将所述预处理状态的数据确定为待归档数据。
  4. 如权利要求1所述的数据存储方法,其特征在于,所述日期文件夹包括至少两个根据公司标识信息划分的目标文件夹及该目标文件夹对应的公司标识信息;所述待归档数据包括公司标识信息;所述将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹之后,所述数据存储方法还包括:
    提取所述日期文件夹中的待归档数据的公司标识信息;
    将所述日期文件夹中的所述待归档数据保存到与所述公司标识信息相同的目标文件夹中。
  5. 如权利要求1所述的数据存储方法,其特征在于,所述将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹包括:
    提取所述待归档数据对应的所述日期标识信息和所述数据存储库包括的所述日期文件夹对应的所述日期标识信息;
    将所述待归档数据对应的所述日期标识信息与每个所述日期文件夹对应的所述日期标识信息进行匹配,得到匹配结果;
    若所述匹配结果为所述待归档数据对应的所述日期标识信息与所述日期文件夹对应的所述日期标识信息相同,则将所述日期标识信息对应的所述日期文件夹确定为目标日期文件夹;
    若所述匹配结果为所述待归档数据对应的所述日期标识信息与所述日期文件夹对应的所述日期标识信息不相同,则在所述数据存储库中生成与所述待归档数据对应的所述日期标识信息相同的初始文件夹,并将所述初始文件夹确定为所述目标日期文件夹;
    将所述待归档数据保存到所述目标日期文件夹。
  6. 如权利要求1所述的数据存储方法,其特征在于,所述若所述目标存储容量达到预设阈值,则将所述日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新所述当前存储容量包括:
    将所述目标存储容量与预设阈值进行比较;
    若所述目标存储容量达到预设阈值,则选取存储容量最大的日期文件夹的所述待归档数据作为导出数据,并将所述导出数据导出到云数据库中,其中,所述日期文件夹包括所述存储容量;
    获取所述导出数据对应的所述数据容量作为目标容量,将所述当前存储容量与所述目标容量进行求差运算,得到的差值对当前存储容量进行更新。
  7. 如权利要求6所述的数据存储方法,其特征在于,所述将所述目标存储容量与预设阈值进行比较之后,所述获取所述导出数据对应的所述数据容量作为目标容量,将所述当前存储容量与所述目标容量进行求差运算,得到的差值对当前存储容量进行更新之前,所述数据存储方法还包括:
    若所述目标存储容量达到预设阈值,则进一步选取所述日期标识信息最远的日期文件夹的所述待归档数据作为导出数据,并将所述导出数据导出到云数据库中。
  8. 一种数据存储装置,其特征在于,所述数据存储装置包括:
    获取模块,用于获取待归档的待归档数据,其中,所述待归档数据包括数据容量和日期标识信息;
    匹配模块,用于将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹,其中,所述数据存储库包括所述数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的所述日期标识信息;
    运算模块,用于将所述数据容量和所述当前存储容量进行求和运算,得到所述数据存储库的目标存储容量;
    导出模块,用于若所述目标存储容量达到预设阈值,则将所述日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新所述当前存储容量。
  9. 如权利要求8所述的数据存储装置,其特征在于,所述获取模块包括:
    初步获取子模块,用于获取带数据状态的待处理的处理数据,所述数据状态包括已预处理状态和未预处理状态;
    第一确定子模块,用于识别所述数据状态,若所述数据状态为所述已预 处理状态,则将所述已预处理状态对应的所述处理数据确定为所述待归档数据。
  10. 如权利要求8所述的数据存储装置,其特征在于,所述数据存储装置还包括:
    用户确认模块,用于若所述数据状态为所述未预处理状态,则将所述未预处理状态对应的所述处理数据确定为待确定数据,并将所述待确定数据发送给目标用户进行确认;
    第二确定模块,用于获取所述目标用户反馈的预处理状态的数据,并将所述预处理状态的数据确定为待归档数据。
  11. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取待归档的待归档数据,其中,所述待归档数据包括数据容量和日期标识信息;
    将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹,其中,所述数据存储库包括所述数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的所述日期标识信息;
    将所述数据容量和所述当前存储容量进行求和运算,得到所述数据存储库的目标存储容量;
    若所述目标存储容量达到预设阈值,则将所述日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新所述当前存储容量。
  12. 如权利要求11所述的计算机设备,其特征在于,所述获取待归档的待归档数据包括:
    获取带数据状态的待处理的处理数据,所述数据状态包括已预处理状态和未预处理状态;
    识别所述数据状态,若所述数据状态为所述已预处理状态,则将所述已预处理状态对应的所述处理数据确定为所述待归档数据。
  13. 如权利要求12所述的计算机设备,其特征在于,所述获取带数据状态的待处理的处理数据之后,所述处理器执行所述计算机可读指令时还包括实现如下步骤:
    若所述数据状态为所述未预处理状态,则将所述未预处理状态对应的所述处理数据确定为待确定数据,并将所述待确定数据发送给目标用户进行确认;
    获取所述目标用户反馈的预处理状态的数据,并将所述预处理状态的数据确定为待归档数据。
  14. 如权利要求11所述的计算机设备,其特征在于,所述日期文件夹包括至少两个根据公司标识信息划分的目标文件夹及该目标文件夹对应的公司标识信息;所述待归档数据包括公司标识信息;所述将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹之后,所述处理器执 行所述计算机可读指令时还包括实现如下步骤:
    提取所述日期文件夹中的待归档数据的公司标识信息;
    将所述日期文件夹中的所述待归档数据保存到与所述公司标识信息相同的目标文件夹中。
  15. 如权利要求11所述的计算机设备,其特征在于,所述将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹包括:
    提取所述待归档数据对应的所述日期标识信息和所述数据存储库包括的所述日期文件夹对应的所述日期标识信息;
    将所述待归档数据对应的所述日期标识信息与每个所述日期文件夹对应的所述日期标识信息进行匹配,得到匹配结果;
    若所述匹配结果为所述待归档数据对应的所述日期标识信息与所述日期文件夹对应的所述日期标识信息相同,则将所述日期标识信息对应的所述日期文件夹确定为目标日期文件夹;
    若所述匹配结果为所述待归档数据对应的所述日期标识信息与所述日期文件夹对应的所述日期标识信息不相同,则在所述数据存储库中生成与所述待归档数据对应的所述日期标识信息相同的初始文件夹,并将所述初始文件夹确定为所述目标日期文件夹;
    将所述待归档数据保存到所述目标日期文件夹。
  16. 一种非易失性的计算机可读存储介质,所述非易失性的计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被一种处理器执行时使得所述一种处理器执行如下步骤:
    获取待归档的待归档数据,其中,所述待归档数据包括数据容量和日期标识信息;
    将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹,其中,所述数据存储库包括所述数据存储库的当前存储容量、日期文件夹及该日期文件夹对应的所述日期标识信息;
    将所述数据容量和所述当前存储容量进行求和运算,得到所述数据存储库的目标存储容量;
    若所述目标存储容量达到预设阈值,则将所述日期文件夹中存储的待归档数据按照预设要求导出到云数据库中,并更新所述当前存储容量。
  17. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述获取待归档的待归档数据包括:
    获取带数据状态的待处理的处理数据,所述数据状态包括已预处理状态和未预处理状态;
    识别所述数据状态,若所述数据状态为所述已预处理状态,则将所述已预处理状态对应的所述处理数据确定为所述待归档数据。
  18. 如权利要求17所述的非易失性的计算机可读存储介质,其特征在于,所述获取带数据状态的待处理的处理数据之后,所述计算机可读指令被一种处理器执行时,使得所述一种处理器还执行如下步骤:
    若所述数据状态为所述未预处理状态,则将所述未预处理状态对应的所述处理数据确定为待确定数据,并将所述待确定数据发送给目标用户进行确认;
    获取所述目标用户反馈的预处理状态的数据,并将所述预处理状态的数据确定为待归档数据。
  19. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述日期文件夹包括至少两个根据公司标识信息划分的目标文件夹及该目标文件夹对应的公司标识信息;所述待归档数据包括公司标识信息;所述将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹之后,所述计算机可读指令被一种处理器执行时,使得所述一种处理器还执行如下步骤:
    提取所述日期文件夹中的待归档数据的公司标识信息;
    将所述日期文件夹中的所述待归档数据保存到与所述公司标识信息相同的目标文件夹中。
  20. 如权利要求16所述的非易失性的计算机可读存储介质,其特征在于,所述将所述待归档数据保存到数据存储库中与所述日期标识信息匹配的日期文件夹包括:
    提取所述待归档数据对应的所述日期标识信息和所述数据存储库包括的所述日期文件夹对应的所述日期标识信息;
    将所述待归档数据对应的所述日期标识信息与每个所述日期文件夹对应的所述日期标识信息进行匹配,得到匹配结果;
    若所述匹配结果为所述待归档数据对应的所述日期标识信息与所述日期文件夹对应的所述日期标识信息相同,则将所述日期标识信息对应的所述日期文件夹确定为目标日期文件夹;
    若所述匹配结果为所述待归档数据对应的所述日期标识信息与所述日期文件夹对应的所述日期标识信息不相同,则在所述数据存储库中生成与所述待归档数据对应的所述日期标识信息相同的初始文件夹,并将所述初始文件夹确定为所述目标日期文件夹;
    将所述待归档数据保存到所述目标日期文件夹。
PCT/CN2019/117703 2019-01-25 2019-11-12 数据存储方法、装置、计算机设备及存储介质 WO2020151320A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910072356.9A CN109918431A (zh) 2019-01-25 2019-01-25 数据存储方法、装置、计算机设备及存储介质
CN201910072356.9 2019-01-25

Publications (1)

Publication Number Publication Date
WO2020151320A1 true WO2020151320A1 (zh) 2020-07-30

Family

ID=66960795

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117703 WO2020151320A1 (zh) 2019-01-25 2019-11-12 数据存储方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN109918431A (zh)
WO (1) WO2020151320A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116628821A (zh) * 2023-06-28 2023-08-22 盛年科技有限公司 基于数据库的宽频隔振支座逆向设计方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109918431A (zh) * 2019-01-25 2019-06-21 平安科技(深圳)有限公司 数据存储方法、装置、计算机设备及存储介质
CN109859781B (zh) * 2019-02-25 2020-10-27 杨忠 一种兼具数据分析功能的大数据存储器
CN112100124A (zh) * 2020-09-17 2020-12-18 上海箱云物流科技有限公司 一种基于ocr识别的集装箱信息自动归档方法
CN114039741A (zh) * 2021-09-26 2022-02-11 深圳供电局有限公司 一种上网行为的嗅探方法、系统、装置及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794208A (zh) * 2004-12-21 2006-06-28 国际商业机器公司 大容量存储设备和用于动态管理大容量存储设备的方法
US8751445B2 (en) * 2009-04-28 2014-06-10 International Business Machines Corporation Method of synchronizing data between databases, and computer system and computer program for the same
CN106055655A (zh) * 2016-05-31 2016-10-26 广州艾媒数聚信息咨询股份有限公司 一种实时数据的存储方法及装置、访问方法及系统
CN109918431A (zh) * 2019-01-25 2019-06-21 平安科技(深圳)有限公司 数据存储方法、装置、计算机设备及存储介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120089579A1 (en) * 2010-10-08 2012-04-12 Sandeep Ranade Compression pipeline for storing data in a storage cloud
US20130282857A1 (en) * 2012-04-18 2013-10-24 Ronald Allen STAMPER Cloud Based Storage Synchronization Device
CN104052770A (zh) * 2013-03-13 2014-09-17 鸿富锦精密工业(深圳)有限公司 存储空间扩展系统及方法
CN106126526A (zh) * 2016-06-13 2016-11-16 浪潮电子信息产业股份有限公司 一种数据管理方法及装置
CN108268211B (zh) * 2017-01-03 2021-09-14 中国移动通信有限公司研究院 一种数据处理方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1794208A (zh) * 2004-12-21 2006-06-28 国际商业机器公司 大容量存储设备和用于动态管理大容量存储设备的方法
US8751445B2 (en) * 2009-04-28 2014-06-10 International Business Machines Corporation Method of synchronizing data between databases, and computer system and computer program for the same
CN106055655A (zh) * 2016-05-31 2016-10-26 广州艾媒数聚信息咨询股份有限公司 一种实时数据的存储方法及装置、访问方法及系统
CN109918431A (zh) * 2019-01-25 2019-06-21 平安科技(深圳)有限公司 数据存储方法、装置、计算机设备及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116628821A (zh) * 2023-06-28 2023-08-22 盛年科技有限公司 基于数据库的宽频隔振支座逆向设计方法
CN116628821B (zh) * 2023-06-28 2024-04-02 盛年科技有限公司 基于数据库的宽频隔振支座逆向设计方法

Also Published As

Publication number Publication date
CN109918431A (zh) 2019-06-21

Similar Documents

Publication Publication Date Title
WO2020151320A1 (zh) 数据存储方法、装置、计算机设备及存储介质
WO2017124713A1 (zh) 一种数据模型的确定方法及装置
WO2019140828A1 (zh) 电子装置、分布式系统日志查询方法及存储介质
CN108304554B (zh) 文件拆分方法、装置、计算机设备和存储介质
CN109240886B (zh) 异常处理方法、装置、计算机设备以及存储介质
WO2019161645A1 (zh) 基于Shell的数据表提取方法、终端、设备及存储介质
EP3794461B1 (en) Automatic database query load assessment and adaptive handling
CN110647318B (zh) 一种有状态应用的实例创建方法、装置、设备及介质
US11620065B2 (en) Variable length deduplication of stored data
EP3308295B1 (en) Data retention framework
CN108121774B (zh) 一种数据表备份方法及终端设备
CN110659259A (zh) 数据库迁移方法、服务器以及计算机存储介质
CN110457255B (zh) 数据归档的方法、服务器及计算机可读存储介质
CN107644041B (zh) 保单结算处理方法和装置
KR20220000880A (ko) 서버 초기화 정보의 중앙 집중화를 위한 시스템 및 방법
CN110442466B (zh) 防止请求重复访问方法、装置、计算机设备及存储介质
WO2018019310A1 (zh) 一种大数据系统中数据备份方法、恢复方法和装置和计算机存储介质
CN109271431B (zh) 数据抽取方法、装置、计算机设备及存储介质
CN110795308A (zh) 一种服务器检验方法、装置、设备及存储介质
CN111585897B (zh) 请求路由管理方法、系统、计算机系统及可读存储介质
CN111966286A (zh) 一种多数据池分级迁移的方法及系统
CN113434505B (zh) 交易信息属性检索方法、装置、计算机设备及存储介质
US20240104050A1 (en) Assessing the effectiveness of an archival job
US10101908B1 (en) Dynamic staging model
CN115037799A (zh) 限流方法、装置、设备及介质

Legal Events

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

Ref document number: 19911080

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19911080

Country of ref document: EP

Kind code of ref document: A1