Data storage method and device, storage medium and computer program product
By selecting a matching database based on user data retrieval requests, and splitting and storing the data of the public transportation system by time and type, the problem of low query efficiency caused by huge data in the database is solved, and data retrieval efficiency is improved.
Patent Information
- Application Number
- CN202410706274.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2025-04-04
AI Technical Summary
The huge data in the database of the public transportation system leads to a reduced efficiency of data query. The existing technology is solved through data compression and archiving, but it affects the efficiency of data retrieval.
By determining the time and type of data being retrieved based on the user's data retrieval request, selecting a matching database from the set database, and sending the corresponding data to the user, realizing the time and type of data being split and stored.
When a user issues a data call request, the matching database can be quickly selected, the data retrieval efficiency can be improved, and the storage space of each database is reasonably utilized.
Smart Images

Figure CN119760011A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the technical field of data processing, and more specifically, to a data storage method, device, storage medium, and computer program product. Background Art
[0002] With the rapid development of public transportation, public transportation has become one of the important means of transportation. At present, due to the increase in the operating hours of the public transportation system, the data in the database of the system is relatively large. Therefore, in order to store the data more completely, the data in the database can be compressed and archived, which requires decompression when querying the data in the database, affecting the data retrieval efficiency. Summary of the invention
[0003] One purpose of the embodiments of the present disclosure is to provide a new technical solution for data storage.
[0004] According to a first aspect of the present disclosure, a data storage method is provided, the method comprising:
[0005] In response to a user's data retrieval request, determining a data retrieval time and a data retrieval type;
[0006] According to the retrieved data time and the retrieved data type, a matching database is selected from a set database; wherein the database includes the matching database, and the first data stored in the matching database conforms to the retrieved data time and the retrieved data type;
[0007] The first data is sent to the user.
[0008] Optionally, different databases correspond to different database types; the data stored in the first database of the first database type is within a first set time period, and the data stored in the second database of the second data type is within a second set time period; wherein the databases include the first database and the second database, the database types include the first database type and the second database type, and the first set time period is the first part of the second set time period.
[0009] Optionally, the first partial time period is after the second partial time period; wherein the second partial time period is the remaining time period in the second set time period except the first set time period.
[0010] Optionally, the data stored in the first database respectively correspond to the first data type or the second data type, and the data stored in the second database all correspond to the first data type.
[0011] Optionally, the data stored in the first database corresponds to different change conditions, a first part of the data in the first database corresponds to a first change condition, a second part of the data in the first database corresponds to a second change condition, the first part of the data and the second part of the data correspond to the second data type, the first change condition is that the first device periodically sends report data, and the second change condition is that after the second device receives a data modification instruction, the second device sends modification data; wherein the change conditions include the first change condition and the second change condition;
[0012] The method further comprises:
[0013] When the first change event is triggered, updating the first part of data in the first database according to the reported data sent by the first device;
[0014] When the second change event is triggered, the second part of data in the second database is updated according to the modification data sent by the second device.
[0015] Optionally, the method further comprises:
[0016] When the set first update condition is triggered, the second database is updated according to the data stored in the first database;
[0017] When the update of the second database is completed, the data stored in the first database is deleted.
[0018] Optionally, updating the second database according to the data stored in the first database includes:
[0019] Generate data to be stored according to the third part of data stored in the first database;
[0020] The fourth part of data and the data to be stored stored in the first database are updated into the second database.
[0021] Optionally, the method further comprises:
[0022] When the set second update condition is triggered, the set tape library is updated according to the data stored in the second database;
[0023] When the tape library update is completed, the data stored in the second database is deleted.
[0024] According to a second aspect of the present disclosure, a data storage device is also provided, including a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to the first aspect of the present disclosure.
[0025] According to a third aspect of the present disclosure, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0026] According to a fourth aspect of the present disclosure, a computer program product is further provided. When the computer program product is executed by a processor, the method according to the first aspect of the present disclosure is implemented.
[0027] One beneficial effect of the disclosed embodiment is that public transportation data can be split and stored in different databases according to time and type. This allows for the selection of a matching database based on the time of the retrieved data and the type of retrieved data when a user issues a data retrieval request, and the corresponding first data can be sent to the user, thereby improving data retrieval efficiency while rationally utilizing the storage space of each database.
[0028] Other features and advantages of the embodiments of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the embodiments of the present disclosure.
[0030] Figure 1 is a schematic diagram of the composition structure of a data storage system to which a data storage method according to an embodiment can be applied;
[0031] Figure 2 is a flow chart of a data storage method according to an embodiment;
[0032] Figure 3 is a block schematic diagram of a data storage device according to an embodiment;
[0033] Figure 4 is a schematic diagram of the hardware structure of a data storage device according to an embodiment. DETAILED DESCRIPTION
[0034] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0035] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0036] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0037] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0038] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0039] <System Embodiment>
[0040] Figure 1 FIG. 1 is a schematic diagram of the composition structure of a data storage system to which a data storage method according to an embodiment can be applied. Figure 1 As shown, the system may include a data storage device, a first device and a second device. The system may be applied to public transportation scenarios, such as trains, subways or passenger buses, etc., which are not limited here. The system is specifically, for example, an automatic fare collection (AFC) system.
[0041] The first device is, for example, a computer or a server, etc., which is not limited here. The first device can be used to obtain operation information of one station or multiple stations, which is not limited here.
[0042] The second device is, for example, a computer, a mobile phone, or a tablet, and can receive a data modification instruction, which can be sent to the second device after a human confirms that the station operation situation has changed, or can be sent to the second device after other devices detect that the station operation situation has changed, which is not limited here. The second device can generate and send corresponding modification data according to the received data modification instruction.
[0043] The data storage device is, for example, a computer or a server, etc., which is not limited here. The data storage device can be connected to the first device and the second device for communication, and the data storage device can receive the operation information sent by the first device, and can also receive the modification data output by the second device.
[0044] As used in the embodiments of the present disclosure, the memory of the data storage device 100 is used to store a computer program, and the computer program is used to control the processor of the data storage device 100 to operate according to the data storage method of any embodiment. A technician can design a computer program according to the scheme of the embodiments of the present disclosure. How the computer program controls the processor to operate is well known in the art, so it will not be described in detail here.
[0045] <Method Example>
[0046] Figure 2 is a flow chart of a data storage method according to an embodiment. Figure 1 The data storage device 100 is shown in FIG.
[0047] like Figure 2 As shown, the material strip unloading control method of this embodiment may include the following steps S210 to S230:
[0048] Step S210, in response to the user's data retrieval request, determining the data retrieval time and the data type to be retrieved.
[0049] In this embodiment, the user can send a data retrieval request to the data storage device through his terminal device.
[0050] In this embodiment, the data retrieval request may be to retrieve data of a specified period of time, to retrieve data of a specified data type, or to retrieve data of a specified period of time and a specified data type, which is not limited here.
[0051] In some examples, the retrieved data type may be one or more specified data types, such as transaction data, business data, log data, ticket checking data, status data, parameter data, and report data.
[0052] The above transaction data can be generated by the terminal device according to the requirements of the clearing center system, and records the transaction results of the user's terminal device paying for the ticket. The transaction data includes, for example, one-card transaction data, one-ticket transaction data, internal transaction data, etc., which are not limited here.
[0053] The above business data may be generated when a user or a terminal device of a station completes a specific business, and the business data may record the process and results of the business execution. For example, the business data may include feedback from a terminal device of station R1 that a train of train A01 has completed its departure in a certain time period.
[0054] The above log data may be generated when a user's terminal device or a station device completes a specific task, and the log data may record the device that performs the task and each time node of the task. For example, the log data may include feedback from the terminal device of station R2 that the train of A03 arrives at the station at 10 o'clock.
[0055] The above-mentioned ticket checking data may be generated when the user's terminal device or the station's equipment obtains the user's completion of the ticket checking action. For example, the ticket checking data may include feedback from the terminal device of station R3 that 200 people entered the station between 10 and 11 o'clock.
[0056] The above status data may be generated when the status of the user's terminal device or the station's equipment changes. For example, the status data may include the feedback from the terminal device of station R4 that the ticket gate at station R4 is in the damaged state T1 at 14:00.
[0057] The above parameter data may be prefabricated data for controlling the implementation of a specified business to meet operational needs and business change requirements. For example, the parameter data may include ensuring that the driving voltage for opening and closing the map entry and exit gate of station R5 is within a normal range.
[0058] The above-mentioned report data may be the statistical result of transaction data within a certain time period. For example, the report data may include that the total revenue of station R6 from 2023 to 2024 is four hundred thousand.
[0059] In some examples, the retrieved data type may be one or more of the above data types, which are not limited here.
[0060] Step S220, selecting a matching database from a set database according to the data retrieval time and the data retrieval type; wherein the database includes a matching database, and the first data stored in the matching database conforms to the data retrieval time and the data retrieval type.
[0061] In some examples, the database may be pre-set to be multiple, for example, the database may include a real-time database and a historical database, the real-time database may store the data of the day, and the data type of the data of the day may include transaction data, business data, log data, ticket checking data, status data, parameter data, and report data. The historical database may store the data before the day, and the data type of the data before the day may include transaction data, business data, ticket checking data, status data, and report data. When the data retrieval time is the day and the retrieval data type is transaction data, the matching database is the real-time database, and the first data corresponds to the transaction data in the real-time database.
[0062] For another example, a database may include a real-time database and a historical database. The real-time database may store data for the current day, and the data types of the data for the current day may include transaction data, business data, log data, ticket checking data, status data, and parameter data. The historical database may store data for the current day whose data type is report data, and store data before the current day, and the data types of the data before the current day may include transaction data, business data, ticket checking data, status data, and report data. When the data retrieval time is yesterday and the retrieval data type is transaction data, the matching database is the historical database, and the first data corresponds to the transaction data in the historical database.
[0063] In some embodiments, different databases correspond to different database types; data stored in a first database of a first database type is within a first set time period, and data stored in a second database of a second data type is within a second set time period; wherein the database includes a first database and a second database, the database types include a first database type and a second database type, and the first set time period is the first part of the second set time period.
[0064] In some examples, the first set time period can be the current day, and the second set time period can be the current day and the six months before the current day, or the current day and the year before the current day, etc., without limitation here. For example, the data stored in the real-time database is the data of the current day and the data types are transaction data, business data, log data, ticket checking data, status data and parameter data, and the data stored in the historical database includes the data of the current day and the data type is report data, as well as the data within the year before the current day and the data type is transaction data, business data, ticket checking data, status data and report data. In other words, splitting the database into the first database and the second database according to time can enable the real-time database to retain the data of the current day, so that the real-time database can be in the optimal state.
[0065] In some embodiments, the first partial time period is after the second partial time period; wherein the second partial time period is the remaining time period of the second set time period except the first set time period.
[0066] In some examples, the first set time period can be the current day, and the second set time period can be the six months before the current day, or the year before the current day, etc., which are not limited here. For example, the data stored in the real-time database is for the current day and the data types are transaction data, business data, log data, ticket checking data, status data, parameter data, and report data, and the data stored in the historical database is for the year before the current day and the data types are transaction data, business data, ticket checking data, status data, and report data. In other words, if the user frequently retrieves the report data for the current day, the report data for the current day can be stored in the real-time database to improve the data retrieval efficiency.
[0067] In some embodiments, the data stored in the first database corresponds to the first data type or the second data type respectively, and the data stored in the second database corresponds to the first data type.
[0068] In some examples, the first data type may be one or more of transaction data, business data, ticket checking data, status data, parameter data, and report data, and the second data type may be one or two of log data and parameter data. In other words, since parameter data and log data only reflect the operation of terminal devices of users or stations, etc., only storing parameter data and log data in the real-time library can effectively improve the utilization efficiency of the storage space of the historical library.
[0069] Step S230: sending first data to the user.
[0070] In other words, public transportation data can be split and stored in different databases according to time and type. This allows the user to select a matching database based on the retrieval time and retrieval data type when the user issues a data retrieval request, and send the corresponding first data to the user. This improves data retrieval efficiency while making reasonable use of the storage space of each database.
[0071] In some embodiments, the data stored in the first database corresponds to different change conditions, the first part of the data in the first database corresponds to the first change condition, the second part of the data in the first database corresponds to the second change condition, the first part of the data and the second part of the data correspond to the second data type, the first change condition is that the first device sends the reported data regularly, and the second change condition is that after the second device receives the data modification instruction, the second device sends the modified data; wherein the change condition includes the first change condition and the second change condition;
[0072] The method further includes the following steps S310 and S320:
[0073] Step S310: When a first change event is triggered, a first portion of data in a first database is updated according to reported data sent by a first device.
[0074] In some examples, the data type of the first part of data may be log data or status data, and the period may be one hour, half a day, or one day, etc., which are not limited here. For example, the reported data is that the ticket gate of station R6 is damaged, and [R6, T0] in the first part of data in the second database is updated to [R6, T1].
[0075] Step S320: When a second change event is triggered, the second part of data in the second database is updated according to the modification data sent by the second device.
[0076] In some examples, the second data type also includes configuration data and user information data. The data type of the second part of the data is configuration data. The second part of the data may include line information of public transportation, such as station information, the address of the terminal device at the station, or the coordinates of the station, etc., which are not limited here. The data type of the second part of the data is user information data. The second part of the data may include user registration information and user payment information, etc., which are not limited here. For example, the modified data is that the coordinates of station R6 are changed from AD01 to AD03, and [R6, AD01] in the second part of the data in the second database is updated to [R6, AD03].
[0077] In other words, by setting different change events, the data in the first database is updated, thereby effectively improving the accuracy of the data in the first database.
[0078] In some embodiments, the method further includes the following steps S410 and S420:
[0079] Step S410: When the set first update condition is triggered, the second database is updated according to the data stored in the first database.
[0080] In some examples, the first update condition is, for example, that data of a certain data type in the first database exceeds the corresponding storage period. The storage periods of data of different data types in the first database are specifically as shown in Table 1 below:
[0081] Table 1:
[0082]
[0083] In Table 1, the storage period of transaction data, business data, status data and parameter data is 365 days, the storage period of ticket checking data is 7 days, and the storage period of report data is 365×3 days. In addition, transaction data, business data, ticket checking data, status data and report data will be stored in the history library after the corresponding storage period ends. The storage period of transaction data, business data, ticket checking data, status data and report data in the history library is 365×3 days.
[0084] Step S420: when the update of the second database is completed, the data stored in the first database is deleted.
[0085] In some examples, the transaction data of the first year stored in the first database may be stored in the second database after the end of the first year, and if the storage in the second database is successful, the transaction data of the first year may be deleted from the first database.
[0086] In other words, by first updating the data stored in the first database to the second database and then deleting the data stored in the first database, the occurrence of deviations in the data stored in the first database during transmission can be effectively reduced, thereby improving the accuracy of the data stored in the second database.
[0087] In some embodiments, step S410 may include the following steps S4101 and S4102:
[0088] Step S4101: Generate data to be stored according to the third part of data stored in the first database.
[0089] In some examples, the data type corresponding to the third part of data may be transaction data or ticket checking data, and the data storage device may generate data to be stored whose data type is report data based on the transaction data or ticket checking data.
[0090] Step S4102: Update the fourth part of data and the data to be stored stored in the first database into the second database.
[0091] In some examples, the data to be stored whose data type is report data and the fourth part of data whose data types are transaction data, business data, ticket checking data and status data are updated in the second database.
[0092] In other words, the third part of data is generated as band storage data to be stored in the second database to adapt to different public transportation systems.
[0093] In some embodiments, the method further includes the following steps S510 and S520:
[0094] Step S510: When the set second update condition is triggered, the set tape library is updated according to the data stored in the second database.
[0095] In some examples, as shown in Table 1, data of the data types transaction data, status data, and report data can be stored in a tape library after the historical library data retention period ends.
[0096] Step S520: when the tape library update is completed, the data stored in the second database is deleted.
[0097] In some examples, the transaction data of the third year stored in the second database may be stored in a tape library after the third year reaches three years, and if the storage in the tape library is successful, the transaction data of the third year is deleted from the second database.
[0098] In other words, by storing data whose data types are transaction data, status data or report data in a tape library, the security of the data in the data storage device can be improved.
[0099] <Equipment Example 1>
[0100] Figure 3 FIG. 1 is a block diagram of a data storage method according to an embodiment. Figure 3 As shown, the data storage device 300 may include.
[0101] The data storage device 300 also includes a trigger module, which is used to update the first part of the data in the first database according to the reported data sent by the first device when a first change event is triggered; and to update the second part of the data in the second database according to the modified data sent by the second device when a second change event is triggered.
[0102] Optionally, the data storage device 300 further includes a deletion module, which is used to update the second database according to the data stored in the first database when the set first update condition is triggered; and delete the data stored in the first database when the update of the second database is completed.
[0103] Optionally, the data storage device 300 further includes an update module, which is used to generate data to be stored based on the third part of data stored in the first database; and update the fourth part of data stored in the first database and the data to be stored into the second database.
[0104] Optionally, the data storage device 300 further includes a storage module, which is used to update the set tape library according to the data stored in the second database when the set second update condition is triggered; and delete the data stored in the second database when the tape library update is completed.
[0105] The data storage device 300 may be Figure 1 The data storage device 100 in FIG.
[0106] <Equipment Example 2>
[0107] Figure 4 is a schematic diagram of the hardware structure of a data storage device according to another embodiment.
[0108] like Figure 4 As shown, the data storage device 400 includes a processor 410 and a memory 420, wherein the memory 420 is used to store an executable computer program, and the processor 410 is used to execute a method as any of the above method embodiments under the control of the computer program.
[0109] The data storage device 400 may be the data storage device 100 .
[0110] Each module of the above data storage device 300 can be implemented by the processor 410 in this embodiment executing a computer program stored in the memory 420, or can be implemented by other structures, which is not limited here.
[0111] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0112] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0113] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0114] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0115] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0116] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0117] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0118] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. 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 consecutive boxes 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 and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0119] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A data storage method, characterized in that: The method comprises: In response to a user's data retrieval request, determining a data retrieval time and a data retrieval type; According to the retrieved data time and the retrieved data type, a matching database is selected from a set database; wherein the database includes the matching database, and the first data stored in the matching database conforms to the retrieved data time and the retrieved data type; The first data is sent to the user.
2. The method according to claim 1, characterized in that Different databases correspond to different database types; the data stored in the first database of the first database type is within a first set time period, and the data stored in the second database of the second data type is within a second set time period; wherein the databases include the first database and the second database, the database types include the first database type and the second database type, and the first set time period is the first part of the second set time period.
3. The method according to claim 2, characterized in that The first partial time period is after the second partial time period; wherein the second partial time period is the remaining time period of the second set time period except the first set time period.
4. The method according to claim 2, characterized in that: The data stored in the first database respectively corresponds to the first data type or the second data type, and the data stored in the second database all corresponds to the first data type.
5. The method according to any one of claims 2 to 4, characterized in that: The data stored in the first database corresponds to different change conditions, the first part of the data in the first database corresponds to the first change condition, the second part of the data in the first database corresponds to the second change condition, the first part of the data and the second part of the data correspond to the second data type, the first change condition is that the first device sends the report data regularly, and the second change condition is that after the second device receives the data modification instruction, the second device sends the modification data; wherein the change conditions include the first change condition and the second change condition; The method further comprises: When the first change event is triggered, updating the first part of data in the first database according to the reported data sent by the first device; When the second change event is triggered, the second part of data in the second database is updated according to the modification data sent by the second device.
6. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: When the set first update condition is triggered, the second database is updated according to the data stored in the first database; When the update of the second database is completed, the data stored in the first database is deleted.
7. The method according to claim 6, characterized in that The updating of the second database according to the data stored in the first database includes: Generate data to be stored according to the third part of data stored in the first database; The fourth part of data and the data to be stored stored in the first database are updated into the second database.
8. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: When the set second update condition is triggered, the set tape library is updated according to the data stored in the second database; When the tape library update is completed, the data stored in the second database is deleted.
9. A data storage device, characterized in that: The invention comprises a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program, which implements the method according to any one of claims 1 to 8 when executed by a processor.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.