CN109189785A - Date storage method, device, computer equipment and storage medium - Google Patents

Date storage method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN109189785A
CN109189785A CN201810905702.2A CN201810905702A CN109189785A CN 109189785 A CN109189785 A CN 109189785A CN 201810905702 A CN201810905702 A CN 201810905702A CN 109189785 A CN109189785 A CN 109189785A
Authority
CN
China
Prior art keywords
data
database
corresponding relationship
tables
type
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN201810905702.2A
Other languages
Chinese (zh)
Inventor
王建华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201810905702.2A priority Critical patent/CN109189785A/en
Priority to PCT/CN2018/105418 priority patent/WO2020029368A1/en
Publication of CN109189785A publication Critical patent/CN109189785A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/22Indexing; Data structures therefor; Storage structures
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a kind of date storage methods, for solving the problems, such as that available data library inquiry data efficiency is low.The method include that obtaining the data type and data mode of data to be stored;A database corresponding with the data type is chosen from each database according to preset typelib corresponding relationship as target database, the typelib corresponding relationship has recorded the corresponding relationship of data type and database;A tables of data corresponding with the data mode is chosen from each tables of data in the target database according to preset state table corresponding relationship as target matrix, the state table corresponding relationship has recorded the corresponding relationship of data mode and tables of data;The writing speed of the target matrix is determined according to preset speed limit rule;The data to be stored is stored in the target matrix to the target database with said write speed.The present invention also provides data storage device, computer equipment and storage mediums.

Description

Date storage method, device, computer equipment and storage medium
Technical field
The present invention relates to database access field of storage more particularly to a kind of date storage method, device, computer to set Standby and storage medium.
Background technique
Into after big data era, the data volume that enterprise needs to store record is increased sharply, and is easy to cause in a database and is deposited Storage, accumulation have the data information of flood tide.When needing to inquire some data, generally require to traverse the data ability in the database Query result is obtained, this is not only high to the performance requirement of database, but also makes the inefficiency for inquiring data.
Therefore, find it is a kind of be conducive to improve database access performance date storage method become those skilled in the art The problem of urgent need to resolve.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of data that database access performance can be improved and deposit Method for storing, device, computer equipment and storage medium.
A kind of date storage method, comprising:
Obtain the data type and data mode of data to be stored;
A number corresponding with the data type is chosen from each database according to preset typelib corresponding relationship According to library as target database, the typelib corresponding relationship has recorded the corresponding relationship of data type and database;
One and institute are chosen from each tables of data in the target database according to preset state table corresponding relationship The corresponding tables of data of data mode is stated as target matrix, the preset state table corresponding relationship have recorded data mode with The corresponding relationship of tables of data;
The writing speed of the target matrix is determined according to preset speed limit rule;
The data to be stored is stored to the target matrix to the target database with said write speed In.
A kind of data storage device, comprising:
Data acquisition module, for obtaining the data type and data mode of data to be stored;
Database respective modules, for choosing one and institute from each database according to preset typelib corresponding relationship The corresponding database of data type is stated as target database, the typelib corresponding relationship has recorded data type and database Corresponding relationship;
Tables of data respective modules, for according to preset state table corresponding relationship from each number in the target database According to a tables of data corresponding with the data mode is chosen in table as target matrix, the preset state table is corresponding to be closed System has recorded the corresponding relationship of data mode and tables of data;
Determining module, for determining the writing speed of the target matrix according to preset speed limit rule;
Memory module, for the data to be stored to be stored to the institute to the target database with said write speed It states in target matrix.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing The computer program run on device, the processor realize the step of above-mentioned date storage method when executing the computer program Suddenly.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter The step of calculation machine program realizes above-mentioned date storage method when being executed by processor.
Above provide a kind of date storage method, device, computer equipment and storage mediums, firstly, obtaining wait store The data type and data mode of data;Then, one is chosen from each database according to preset typelib corresponding relationship Database corresponding with the data type has recorded data type and number as target database, the typelib corresponding relationship According to the corresponding relationship in library;Then, according to preset state table corresponding relationship from each tables of data in the target database A tables of data corresponding with the data mode is chosen as target matrix, the preset state table corresponding relationship record The corresponding relationship of data mode and tables of data;Later, the write-in of the target matrix is determined according to preset speed limit rule Speed;Finally, the data to be stored to be stored to the target data to the target database with said write speed In table.In this way, passing through foundation data type and data mode for database and difference different in data division to be stored Tables of data in, may be implemented data separation storage, avoid mass data and be deposited in same database or same data The problem for causing efficiency data query low in table is conducive to improve database access performance.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings Obtain other attached drawings.
Fig. 1 is an application environment schematic diagram of date storage method in one embodiment of the invention;
Fig. 2 is a flow chart of date storage method in one embodiment of the invention;
Fig. 3 is that date storage method is previously obtained the corresponding pass of typelib under an application scenarios in one embodiment of the invention The flow diagram of system;
Fig. 4 is process signal of the date storage method step S206 under an application scenarios in one embodiment of the invention Figure;
Fig. 5 is process signal of the date storage method step S103 under an application environment in one embodiment of the invention Figure;
Fig. 6 is that date storage method process of data access process under an application environment is shown in one embodiment of the invention It is intended to;
Fig. 7 is the structural schematic diagram of data storage device in one embodiment of the invention;
Fig. 8 is a schematic diagram of computer equipment in one embodiment of the invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
A kind of date storage method provided by the present application, can be applicable in the application environment such as Fig. 1, wherein client is logical Network is crossed to be communicated with server.Wherein, client can be, but not limited to various personal computers, laptop, intelligence Mobile phone, tablet computer and portable wearable device.Server can be formed with the either multiple servers of independent server Server cluster realize.
In one embodiment, as shown in Fig. 2, providing a kind of date storage method, the service in Fig. 1 is applied in this way It is illustrated, includes the following steps: for device
S101, the data type and data mode for obtaining data to be stored;
In the present embodiment, these data to be stored all have the attribute of data type, data mode, specifically can be in life The attribute just assigned when at data.Wherein, data type can include but is not limited to examination & approval class, meeting class, official document class, supervisor Class, etc..Data mode can include but is not limited to have been filed on, handle in, finished, filed, etc..Particularly, must If data mode can also record the generation time of data, time of filing, finish the information such as time.
In some application scenarios, user end to server is requested certain data filing, after server receives the request, It is available to the data to be filed, i.e., above-mentioned data to be stored.Then, server can be from the data to be stored directly Its data type and data mode are got, may also require that the client provides the data type and data of the data to be stored State.
S102, chosen from each database according to preset typelib corresponding relationship one it is corresponding with the data type Database as target database, the typelib corresponding relationship has recorded the corresponding relationship of data type and database;
In the present embodiment, server can be previously provided with typelib corresponding relationship, and the type library corresponding relationship has recorded The corresponding relationship of data type and database.3 data types are shared for example, setting, respectively examination & approval class, meeting class, official document class; 3 databases, respectively database A, database B and database C are shared, the type library corresponding relationship has recorded examination & approval class and number According to library A is corresponding, meeting class is corresponding with database B, official document class and database C are corresponding.To which server is getting number to be stored According to data type after, corresponding database can be determined according to the type library corresponding relationship, as target data Library.
Further, as shown in figure 3, the typelib corresponding relationship can be previously obtained by following steps:
S201, historical data under each data type is collected respectively;
S202, each data type, the data volume of the historical data under the data type that statistical collection is arrived are directed to;
S203, each data type is ranked up according to the data volume sequence from big to small of historical data, obtains One sequence;
S204, the free memory for obtaining each database respectively;
S205, each database is ranked up according to the sequence of free memory from big to small, obtains the second sequence;
S206, each data type of the First ray and each database of second sequence are matched, Obtain the typelib corresponding relationship.
For step S201, it is to be understood that server can be collected first every before establishing typelib corresponding relationship The historical data of kind of data type, these historical datas refer to belong to some data type, once stored into database Data.
For step S202, since the data volume of the historical data under different types of data is not identical, some data types Historical data it is more, the historical data of some data types is then less, it is believed that the data class more for historical data Type, the data that store the type into database in the future also can be more, conversely, for historical data less data class Type, the data that store the type into database in the future are also corresponding less.Therefore, by counting under each data type Historical data data volume, it is subsequent that these data types and database can be matched using data volume as standard is considered.
For step S203, obtained under each data type after the data volume of historical data in statistics, it can be according to history The sequence of the data volume of data from big to small is ranked up each data type, obtains First ray.It is found that in First ray In more forward data type, the data volume of historical data is bigger;Conversely, the data type in First ray more rearward, The data volume of its historical data is smaller.
For step S204, before establishing typelib corresponding relationship, server can learn which database is can To be used for storing data, the free memory of these databases is then obtained respectively.Free memory said herein Refer to that the residue of database can store the space of data.For example some database total inventory is 1000T, has used 100T, then The free memory of the database is 900T.
It, can be according to available storage after the free memory for obtaining each database respectively for step S205 The sequence of space from big to small is ranked up each database, obtains the second sequence.It is found that more forward in the second sequence Database, free memory are bigger;Conversely, the database in the second sequence more rearward, free memory are smaller.
For step S206, it is to be understood that when establishing typelib corresponding relationship, it is contemplated that database is in the future May both data volume and the free memory of storage whether match.In general, the bigger database of free memory The bigger data type of the data volume that may need to store in the future should be distributed to.It therefore, specifically can be by the present embodiment Each database in each data type and the second sequence in one sequence, which corresponds, to be matched, and the two corresponding relationship is established, Obtain the type library corresponding relationship.For example, the data type for successively including in First ray has: Class1, type 2, type 3, Type 4;The database for successively including in second sequence has: database A, database B, database C, database D, then after matching, Corresponding relationship record in the type library has: Class1 is corresponding with database A, type 2 and database B is corresponding, type 3 and C pairs of database Answer, type 4 it is corresponding with database D.
Further, it is contemplated that in some cases, the quantity of database may be less than the quantity of data type, than If the available database of enterprise is 5, but it is divided into 6 data types and comes out, needs when establishing typelib corresponding relationship at this time The quantitative difference of the two is distinguished, as shown in figure 4, the step S206 can specifically include:
S301, judge whether the quantity of each database is greater than or equal to the quantity of each data type, if It is to then follow the steps S302, if it is not, thening follow the steps S303;
S302, each database that forefront will be located in each data type of the First ray and second sequence It matches one by one, obtains the typelib corresponding relationship;
S303, each database of each data type with second sequence that forefront will be located in the First ray It matches one by one, then will arrange a last database in unpaired data type and second sequence and match, Obtain the typelib corresponding relationship.
For step S301-S303, it is to be understood that when the quantity of each database is each more than or equal to described When the quantity of a data type, each data type is can to distribute to different databases one by one, therefore can select The database in the second sequence positioned at forefront is taken to be matched one by one.For example, the data type for successively including in First ray has: Class1, type 2, type 3, type 4;The database for successively including in second sequence has: database A, database B, database C, Database D, database E then match clock synchronization, by Class1, type 2, type 3, type 4 and the data for being located at forefront in the second sequence Library A, database B, database C, database D are matched one by one, so that corresponding relationship record in the type library has: class after pairing Type 1 is corresponding with database A, type 2 and database B is corresponding, type 3 and database C is corresponding, type 4 and database D are corresponding.
When the quantity of each database is less than the quantity of each data type, it is known that, each data Type is can not to distribute to different databases one by one, must share the same database there are two above data type. Therefore, first each database for being located at each data type and second sequence in forefront in First ray can be matched one by one It is right, then a last database will be arranged in unpaired data type and second sequence again match.For example, If the data type for successively including in First ray has: Class1, type 2, type 3, type 4, type 5;In second sequence successively Including database have: database A, database B, database C, database D, then match clock synchronization, first by Class1, type 2, type 3, type 4 and database A, database B, database C, database D are matched one by one, then, will also unpaired type 5 with The database D pairing last positioned at the second sequence, so that corresponding relationship record in the type library has: Class1 and database after pairing A is corresponding, type 2 is corresponding with database B, type 3 and database C is corresponding, type 4 and type 5 and database D are corresponding.
S103, one is chosen from each tables of data in the target database according to preset state table corresponding relationship Tables of data corresponding with the data mode has recorded data mode and number as target matrix, the state table corresponding relationship According to the corresponding relationship of table;
In the present embodiment, server can be previously provided with state table corresponding relationship, which has recorded The corresponding relationship of data mode and tables of data.3 data modes are shared for example, setting, respectively in processing, finished, filed; 3 tables of data, respectively table 1, table 2 and table 3 are shared in the target database, then the state table corresponding relationship can recorde " place In reason " data of state store to the data of table 1, " having finished " state store to the data of table 2, " filing " state store to Table 3.To which, server is after getting the data mode of data to be stored, can be determined according to the state table corresponding relationship with Corresponding tables of data, as target matrix.
Further, the data mode includes the storage time of the data to be stored.In the present embodiment, by data When storing to database, different data can be divided to different data according to filling time (i.e. the time of storing data) In table, in order to which data can be retrieved from time dimension when subsequent query, access data.Therefore, the state table is corresponding closes The one-to-one relationship of be physical record each time interval and each tables of data, as shown in figure 5, the step S103 is specific May include:
S401, the object time section that the storage time of the data to be stored is fallen into is determined;
S402, determined according to the state table corresponding relationship it is corresponding with the object time section in each tables of data Tables of data as target matrix.
For step S401, after getting the storage time of the data to be stored, the storage can be directly determined out The object time section that time falls into.3 time intervals, the respectively beginning of the month are had recorded in the state table corresponding relationship for example, setting (No. 1 to No. 10), the middle of the month (No. 11 to No. 20) and the end of the month (No. 21 to No. 31) can be true if the storage time is August 3rd The fixed data to be stored falls into " beginning of the month " this time interval, i.e. object time section is the beginning of the month.
For step S402, after determining object time section, according to state table corresponding relationship can determine with The corresponding tables of data in object time section, using the tables of data determined as the target matrix.
As shown in the above, S401 and S402 through the above steps, can make data store the number into database After table, it is stored according to the difference of storage time in different tables of data, it, can be fast from time dimension when inquiring data The corresponding tables of data of fast locating query saves the performance of database to improve the efficiency of inquiry data.
S104, the writing speed that the target matrix is determined according to preset speed limit rule;
In the present embodiment, server can be previously provided with speed limit rule, which defines each tables of data Reading speed and writing speed.Here, due to only needing storing data, which is determined according to the speed limit rule Writing speed.
S105, the data to be stored is stored with said write speed by the number of targets to the target database According in table.
After determining said write speed, the data to be stored can be stored to described with said write speed In the target matrix in target database.It is understood that can be protected well due to the presence of speed limit rule The performance of target database, when running multiple write-in tasks simultaneously, due to having provided the writing speed of each tables of data, i.e., Just multiple tasks are written in multithreading, are also not easy the case where loss of data or write error occur, improve the steady of data storage Qualitative, reliability promotes the data throughput of database but also database can run multiple read-write tasks simultaneously when in use Efficiency.
Further, as shown in fig. 6, the data to be stored to be stored to the target to the target database It can also include data access process corresponding with data storage after in tables of data.Specifically, the process of data access can be with Include:
S501, the current data type and current data state for obtaining data to be read;
S502, determined from each database according to the typelib corresponding relationship it is corresponding with the current data type Database as access database;
S503, it is determined and institute from each tables of data in the access database according to the state table corresponding relationship The corresponding tables of data of current data state is stated as access tables of data;
S504, the reading speed that the access tables of data is determined according to the speed limit rule;
S505, described continue is read out from the access tables of data in the access database with the reading speed Access evidence.
For step S501, it is to be understood that during data access, obtain the current number of the data to be read According to type and current data state, similarly with above-mentioned steps S101, details are not described herein again.
For step S502, before reading data, need first to determine which database is the data to be read be located in, because This, server can inquire the type library corresponding relationship, determine from each database corresponding with the current data type Database as access database.It is understood that the type library corresponding relationship of server inquiry can be stored in clothes It is engaged on device, can also be stored in the routing between server and database, this present embodiment is not especially limited.
For step S503, determining that the data to be read after which database (i.e. the access database), also need Determine the data to be read specifically access database in which tables of data in, in this regard, server can be according to the shape State table corresponding relationship determines number corresponding with the current data state from each tables of data in the access database According to table as access tables of data.It is understood that the state table corresponding relationship of server inquiry can be stored in server On, it can also be stored in the routing between server and database, this present embodiment is not especially limited.
For step S504, similarly with above-mentioned steps S104, server can be previously provided with speed limit rule, speed limit rule Then define the reading speed and writing speed of each tables of data.Here, it due to only needing to read data, is advised according to the speed limit Then determine the reading speed of the access tables of data.
It, can be with the reading speed after the reading speed for determining access tables of data requirement for step S505 It spends and reads out the data to be read from the access tables of data in the access database.Similarly, due to speed limit rule Presence, the performance of target database can be protected well, it is each due to having provided when running multiple reading tasks simultaneously The reading speed of a tables of data is also not easy the feelings for loss of data or read error occur even if multithreading reads multiple tasks Condition improves stability, the reliability of data access, appoints but also database can run multiple read-writes simultaneously when in use Business, promotes the data throughput efficiency of database.
It is above-mentioned to improve a kind of date storage method shown in sum up, firstly, obtaining the data type sum number of data to be stored According to state;Then, chosen from each database according to preset typelib corresponding relationship one it is corresponding with the data type Database as target database, the typelib corresponding relationship has recorded the corresponding relationship of data type and database;It connects , one and the data are chosen from each tables of data in the target database according to preset state table corresponding relationship For the corresponding tables of data of state as target matrix, it is corresponding with tables of data that the state table corresponding relationship has recorded data mode Relationship;Later, the writing speed of the target matrix is determined according to preset speed limit rule;Finally, with said write speed The data to be stored is stored in the target matrix to the target database.In this way, by according to data class Data may be implemented by different database in data division to be stored and different tables of data in type and data mode Separation storage, avoiding mass data and being deposited in same database or same tables of data causes efficiency data query low Problem is conducive to improve database access performance.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
In one embodiment, a kind of device of data storage improving database access performance, the raising database are provided The method of the data storage of database access performance is improved in the device and above-described embodiment of the data storage of access performance one by one It is corresponding.As shown in fig. 7, the device that the data of the raising database access performance store includes data acquisition module 601, database Respective modules 602, tables of data respective modules 603, determining module 604 and memory module 605.Each functional module is described in detail such as Under:
Data acquisition module 601, for obtaining the data type and data mode of data to be stored;
Database respective modules 602, for choosing one from each database according to preset typelib corresponding relationship Database corresponding with the data type has recorded data type and number as target database, the typelib corresponding relationship According to the corresponding relationship in library;
Tables of data respective modules 603, for according to preset state table corresponding relationship from each in the target database A tables of data corresponding with the data mode is chosen in a tables of data as target matrix, the state table corresponding relationship Have recorded the corresponding relationship of data mode and tables of data;
Determining module 604, for determining the writing speed of the target matrix according to preset speed limit rule;
Memory module 605, for being stored the data to be stored to the target database with said write speed The target matrix in.
Further, the typelib corresponding relationship can be by being previously obtained with lower module:
Collection module, for collecting the historical data under each data type respectively;
Statistical module is used to be directed to each data type, the historical data under the data type that statistical collection is arrived Data volume;
Data volume sorting module, for the sequence of the data volume according to historical data from big to small to each data type into Row sequence, obtains First ray;
Module is obtained, for obtaining the free memory of each database respectively;
Memory space sorting module, for arranging according to the sequence of free memory from big to small each database Sequence obtains the second sequence;
Respective modules are matched, for by each data of each data type of the First ray and second sequence Library is matched, and the typelib corresponding relationship is obtained.
Further, the pairing respective modules may include:
Judging unit, for judging whether the quantity of each database is greater than or equal to each data type Quantity;
Corresponding unit, if for the judging result for judging unit be it is yes, by each data of the First ray Type is matched one by one with each database for being located at forefront in second sequence, obtains the typelib corresponding relationship;
Pairing unit, if for the judging result for judging unit be it is no, forefront will be located in the First ray Each database of each data type and second sequence match one by one, then by unpaired data type with it is described A last database is arranged in second sequence to be matched, and the typelib corresponding relationship is obtained.
Further, the tables of data respective modules may include:
Time interval determining module, the object time section fallen into for determining the storage time of the data to be stored;
Target matrix respective modules, for according to the state table corresponding relationship determine in each tables of data with institute The corresponding tables of data in object time section is stated as target matrix.
Further, the data storage device can also include:
Data type block of state is obtained, for obtaining the current data type and current data state of data to be read;
Database determining module is accessed, for determining from each database according to the typelib corresponding relationship and institute The corresponding database of the current data type stated is as access database;
Specific about data storage device limits the restriction that may refer to above for date storage method, herein not It repeats again.Modules in the data storage device of above-mentioned raising database access performance can fully or partially through software, Hardware and combinations thereof is realized.Above-mentioned each module can be embedded in the form of hardware or independently of the processor in computer equipment In, it can also be stored in a software form in the memory in computer equipment, in order to which processor calls execution above each The corresponding operation of module.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction Composition can be as shown in Figure 8.The computer equipment include by system bus connect processor, memory, network interface and Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating The data that the database of machine equipment is related in storage method for storing data.The network interface of the computer equipment be used for External terminal passes through network connection communication.To realize a kind of date storage method when the computer program is executed by processor.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory And the computer program that can be run on a processor, processor realize that data store in above-described embodiment when executing computer program The step of method, such as step S101 shown in Fig. 2 to step S105.Alternatively, processor is realized when executing computer program State the function of each module/unit of device in embodiment, such as module 601 shown in Fig. 7 is to the function of module 605.To avoid weight Multiple, which is not described herein again.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated The step of machine program realizes date storage method in above-described embodiment when being executed by processor, such as step S101 shown in Fig. 2 To step S105.Database access performance is improved in above-described embodiment alternatively, realizing when computer program is executed by processor The function of each module/unit of data storage device, such as module 601 shown in Fig. 7 is to the function of module 605.To avoid repeating, Which is not described herein again.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein, To any reference of memory, storage, database or other media used in each embodiment provided herein, Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms, Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of date storage method characterized by comprising
Obtain the data type and data mode of data to be stored;
A database corresponding with the data type is chosen from each database according to preset typelib corresponding relationship As target database, the typelib corresponding relationship has recorded the corresponding relationship of data type and database;
One and the number are chosen from each tables of data in the target database according to preset state table corresponding relationship According to the corresponding tables of data of state as target matrix, the preset state table corresponding relationship has recorded data mode and data The corresponding relationship of table;
The writing speed of the target matrix is determined according to preset speed limit rule;
The data to be stored is stored in the target matrix to the target database with said write speed.
2. date storage method according to claim 1, which is characterized in that the typelib corresponding relationship passes through following step Suddenly it is previously obtained:
The historical data under each data type is collected respectively;
For each data type, the data volume of the historical data under the data type that statistical collection is arrived;
Each data type is ranked up according to the data volume sequence from big to small of historical data, obtains First ray;
The free memory of each database is obtained respectively;
Each database is ranked up according to the sequence of free memory from big to small, obtains the second sequence;
Each data type of the First ray and each database of second sequence are matched, the class is obtained Type library corresponding relationship.
3. date storage method according to claim 2, which is characterized in that each data by the First ray Each database of type and second sequence is matched, and is obtained the typelib corresponding relationship and is specifically included:
Judge whether the quantity of each database is greater than or equal to the quantity of each data type;
If the quantity of each database is greater than or equal to the quantity of each data type, by the First ray Each data type is matched one by one with each database for being located at forefront in second sequence, obtains the corresponding pass of the typelib System;
If the quantity of each database is less than the quantity of each data type, before being located in the First ray Each database of each data type and second sequence of column matches one by one, then by unpaired data type and institute It states and arranges a last database in the second sequence and matched, obtain the typelib corresponding relationship.
4. date storage method according to claim 1, which is characterized in that the data mode includes the number to be stored According to storage time, the preset state table corresponding relationship has recorded the one-to-one correspondence of each time interval Yu each tables of data Relationship;It is described to choose one and institute from each tables of data in the target database according to preset state table corresponding relationship The corresponding tables of data of data mode is stated to specifically include as target matrix:
Determine the object time section that the storage time of the data to be stored is fallen into;
It is determined according to the preset state table corresponding relationship corresponding with the object time section in each tables of data Tables of data is as target matrix.
5. date storage method according to any one of claim 1 to 4, which is characterized in that by the number to be stored After in the target matrix stored to the target database, further includes:
Obtain the current data type and current data state of data to be read;
Database corresponding with the current data type is determined from each database according to the typelib corresponding relationship As access database;
According to the preset state table corresponding relationship from it is described access database in each tables of data in determine with it is described The corresponding tables of data of current data state is as access tables of data;
The reading speed of the access tables of data is determined according to the preset speed limit rule;
The data to be read are read out from the access tables of data in the access database with the reading speed.
6. a kind of data storage device characterized by comprising
Data acquisition module, for obtaining the data type and data mode of data to be stored;
Database respective modules, for choosing one and the number from each database according to preset typelib corresponding relationship According to the corresponding database of type as target database, the typelib corresponding relationship has recorded pair of data type and database It should be related to;
Tables of data respective modules, for according to preset state table corresponding relationship from each tables of data in the target database One tables of data corresponding with the data mode of middle selection is as target matrix, the preset state table corresponding relationship note The corresponding relationship of data mode and tables of data is recorded;
Determining module, for determining the writing speed of the target matrix according to preset speed limit rule;
Memory module, for the data to be stored to be stored to the mesh to the target database with said write speed It marks in tables of data.
7. data storage device according to claim 6, which is characterized in that the typelib corresponding relationship passes through with lower die Block is previously obtained:
Collection module, for collecting the historical data under each data type respectively;
Statistical module, for being directed to each data type, the data of the historical data under the data type that statistical collection is arrived Amount;
Data volume sorting module arranges each data type for the sequence of the data volume according to historical data from big to small Sequence obtains First ray;
Module is obtained, for obtaining the free memory of each database respectively;
Memory space sorting module, for being ranked up according to the sequence of free memory from big to small to each database, Obtain the second sequence;
Match respective modules, for by each database of each data type of the First ray and second sequence into Row pairing, obtains the typelib corresponding relationship.
8. data storage device according to claim 7, which is characterized in that the pairing respective modules include:
Judging unit, for judging whether the quantity of each database is greater than or equal to the number of each data type Amount;
Corresponding unit, if for the judging result for judging unit be it is yes, by each data type of the First ray It is matched one by one with each database for being located at forefront in second sequence, obtains the typelib corresponding relationship;
Pairing unit, if for the judging result for judging unit be it is no, will be in the First ray positioned at each of forefront Each database of a data type and second sequence matches one by one, then by unpaired data type and described second A last database is arranged in sequence to be matched, and the typelib corresponding relationship is obtained.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to Described in any one of 5 the step of date storage method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists In the step of realization date storage method as described in any one of claims 1 to 5 when the computer program is executed by processor Suddenly.
CN201810905702.2A 2018-08-10 2018-08-10 Date storage method, device, computer equipment and storage medium Pending CN109189785A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201810905702.2A CN109189785A (en) 2018-08-10 2018-08-10 Date storage method, device, computer equipment and storage medium
PCT/CN2018/105418 WO2020029368A1 (en) 2018-08-10 2018-09-13 Data storage method and apparatus, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810905702.2A CN109189785A (en) 2018-08-10 2018-08-10 Date storage method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109189785A true CN109189785A (en) 2019-01-11

Family

ID=64921404

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810905702.2A Pending CN109189785A (en) 2018-08-10 2018-08-10 Date storage method, device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN109189785A (en)
WO (1) WO2020029368A1 (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871416A (en) * 2019-02-28 2019-06-11 上海汽车集团股份有限公司 Data storage method, device and computer storage medium
CN110502540A (en) * 2019-07-23 2019-11-26 招联消费金融有限公司 Data processing method, device, computer equipment and storage medium
CN110955704A (en) * 2019-12-03 2020-04-03 北京锐安科技有限公司 Data management method, device, equipment and storage medium
CN110968647A (en) * 2019-12-23 2020-04-07 广东电力交易中心有限责任公司 Data storage method and device, computer equipment and storage medium
CN111221824A (en) * 2020-01-02 2020-06-02 广州虎牙科技有限公司 Storage optimization method, device, equipment and medium of storage space
CN111291119A (en) * 2020-01-21 2020-06-16 郑州阿帕斯数云信息科技有限公司 Data synchronization method and device
CN111475517A (en) * 2020-03-06 2020-07-31 平安科技(深圳)有限公司 Data updating method and device, computer equipment and storage medium
CN111831232A (en) * 2020-07-22 2020-10-27 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic device
CN112001160A (en) * 2020-08-27 2020-11-27 中国平安财产保险股份有限公司 Data processing method, device, equipment and storage medium
CN112328688A (en) * 2020-11-09 2021-02-05 广州虎牙科技有限公司 Data storage method and device, computer equipment and storage medium
CN112364007A (en) * 2020-11-18 2021-02-12 中国平安人寿保险股份有限公司 Mass data exchange method, device, equipment and storage medium based on database
CN112434189A (en) * 2020-12-02 2021-03-02 新华三大数据技术有限公司 Data query method, device and equipment
CN112632080A (en) * 2020-12-29 2021-04-09 杭州趣链科技有限公司 Data storage method, device and equipment based on block chain
CN112835967A (en) * 2019-11-25 2021-05-25 浙江宇视科技有限公司 Data processing method, device, equipment and medium based on distributed storage system
CN113392159A (en) * 2021-06-18 2021-09-14 湖南快乐阳光互动娱乐传媒有限公司 Data sharing method and device
CN113721518A (en) * 2021-08-31 2021-11-30 中冶华天南京工程技术有限公司 Data acquisition and storage method for steel production
CN113760889A (en) * 2020-11-09 2021-12-07 北京沃东天骏信息技术有限公司 Data processing method, device, computer system and computer readable storage medium
WO2022048356A1 (en) * 2020-09-04 2022-03-10 苏州浪潮智能科技有限公司 Data processing method and system for cloud platform, and electronic device and storage medium
CN114822804A (en) * 2022-06-30 2022-07-29 深圳核心医疗科技有限公司 Data storage method and device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100094838A1 (en) * 2008-10-10 2010-04-15 Ants Software Inc. Compatibility Server for Database Rehosting
US20160125021A1 (en) * 2014-10-31 2016-05-05 Microsoft Corporation Efficient updates in non-clustered column stores
CN107967284A (en) * 2016-10-20 2018-04-27 北京京东尚科信息技术有限公司 Method and apparatus for storing, inquiring about sequence information
CN108052281A (en) * 2017-11-30 2018-05-18 平安科技(深圳)有限公司 Business Information storage method, application server and computer storage media
CN108108384A (en) * 2016-11-25 2018-06-01 中国移动通信有限公司研究院 A kind of date storage method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102779186B (en) * 2012-06-29 2014-12-24 浙江大学 Whole process modeling method of unstructured data management
CN104516894B (en) * 2013-09-27 2018-08-17 国际商业机器公司 Method and apparatus for managing time series databases
US9703787B2 (en) * 2014-03-25 2017-07-11 Yokogawa Electric Corporation Data storage management apparatus and data storage management method
CN108023957A (en) * 2017-12-07 2018-05-11 温州中壹技术服务有限公司 A kind of collaborative computer network management system for the processing of information Quick Acquisition

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100094838A1 (en) * 2008-10-10 2010-04-15 Ants Software Inc. Compatibility Server for Database Rehosting
US20160125021A1 (en) * 2014-10-31 2016-05-05 Microsoft Corporation Efficient updates in non-clustered column stores
CN107967284A (en) * 2016-10-20 2018-04-27 北京京东尚科信息技术有限公司 Method and apparatus for storing, inquiring about sequence information
CN108108384A (en) * 2016-11-25 2018-06-01 中国移动通信有限公司研究院 A kind of date storage method and device
CN108052281A (en) * 2017-11-30 2018-05-18 平安科技(深圳)有限公司 Business Information storage method, application server and computer storage media

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109871416A (en) * 2019-02-28 2019-06-11 上海汽车集团股份有限公司 Data storage method, device and computer storage medium
CN110502540A (en) * 2019-07-23 2019-11-26 招联消费金融有限公司 Data processing method, device, computer equipment and storage medium
CN112835967A (en) * 2019-11-25 2021-05-25 浙江宇视科技有限公司 Data processing method, device, equipment and medium based on distributed storage system
CN110955704A (en) * 2019-12-03 2020-04-03 北京锐安科技有限公司 Data management method, device, equipment and storage medium
CN110968647A (en) * 2019-12-23 2020-04-07 广东电力交易中心有限责任公司 Data storage method and device, computer equipment and storage medium
CN111221824A (en) * 2020-01-02 2020-06-02 广州虎牙科技有限公司 Storage optimization method, device, equipment and medium of storage space
CN111291119A (en) * 2020-01-21 2020-06-16 郑州阿帕斯数云信息科技有限公司 Data synchronization method and device
CN111291119B (en) * 2020-01-21 2023-04-25 郑州阿帕斯数云信息科技有限公司 Data synchronization method and device
CN111475517A (en) * 2020-03-06 2020-07-31 平安科技(深圳)有限公司 Data updating method and device, computer equipment and storage medium
CN111475517B (en) * 2020-03-06 2024-02-20 平安科技(深圳)有限公司 Data updating method, device, computer equipment and storage medium
CN111831232A (en) * 2020-07-22 2020-10-27 浙江大华技术股份有限公司 Data storage method and device, storage medium and electronic device
CN112001160B (en) * 2020-08-27 2023-07-28 中国平安财产保险股份有限公司 Data processing method, device, equipment and storage medium
CN112001160A (en) * 2020-08-27 2020-11-27 中国平安财产保险股份有限公司 Data processing method, device, equipment and storage medium
WO2022048356A1 (en) * 2020-09-04 2022-03-10 苏州浪潮智能科技有限公司 Data processing method and system for cloud platform, and electronic device and storage medium
US11960506B2 (en) 2020-09-04 2024-04-16 Inspur Suzhou Intelligent Technology Co., Ltd Data processing method and system for cloud platform, and electronic apparatus and storage medium
CN112328688B (en) * 2020-11-09 2023-10-13 广州虎牙科技有限公司 Data storage method, device, computer equipment and storage medium
CN113760889A (en) * 2020-11-09 2021-12-07 北京沃东天骏信息技术有限公司 Data processing method, device, computer system and computer readable storage medium
CN113760889B (en) * 2020-11-09 2024-05-17 北京沃东天骏信息技术有限公司 Data processing method, device, computer system and computer readable storage medium
CN112328688A (en) * 2020-11-09 2021-02-05 广州虎牙科技有限公司 Data storage method and device, computer equipment and storage medium
CN112364007A (en) * 2020-11-18 2021-02-12 中国平安人寿保险股份有限公司 Mass data exchange method, device, equipment and storage medium based on database
CN112364007B (en) * 2020-11-18 2023-08-22 中国平安人寿保险股份有限公司 Mass data exchange method, device, equipment and storage medium based on database
CN112434189A (en) * 2020-12-02 2021-03-02 新华三大数据技术有限公司 Data query method, device and equipment
CN112632080B (en) * 2020-12-29 2023-01-13 杭州趣链科技有限公司 Data storage method, device and equipment based on block chain
CN112632080A (en) * 2020-12-29 2021-04-09 杭州趣链科技有限公司 Data storage method, device and equipment based on block chain
CN113392159A (en) * 2021-06-18 2021-09-14 湖南快乐阳光互动娱乐传媒有限公司 Data sharing method and device
CN113721518A (en) * 2021-08-31 2021-11-30 中冶华天南京工程技术有限公司 Data acquisition and storage method for steel production
CN114822804B (en) * 2022-06-30 2022-09-20 深圳核心医疗科技有限公司 Data storage method and device, computer equipment and storage medium
CN114822804A (en) * 2022-06-30 2022-07-29 深圳核心医疗科技有限公司 Data storage method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
WO2020029368A1 (en) 2020-02-13

Similar Documents

Publication Publication Date Title
CN109189785A (en) Date storage method, device, computer equipment and storage medium
CN109471796A (en) Interface test method, device, computer equipment and storage medium
CN108804548B (en) Test data query method, device, computer equipment and storage medium
CN110377667A (en) It is associated with map methods of exhibiting, device, computer equipment and storage medium
CN109769040A (en) Content delivery network service switching method, device, equipment and storage medium
CN110363645A (en) Asset data processing method, device, computer equipment and storage medium
CN110347545A (en) A kind of test method and device of business platform cache policy
CN111209090B (en) Method and assembly for creating virtual machine in cloud platform and server
CN107992492A (en) A kind of storage method of data block, read method, its device and block chain
CN109923514A (en) Storage operation to data
CN104919433A (en) Page allocation for flash memories
CN107402950A (en) Divide the document handling method and device of table based on point storehouse
CN108182633A (en) Loan data processing method, device, computer equipment and storage medium
CN113946552A (en) Data processing method and electronic device
CN109325026A (en) Data processing method, device, equipment and medium based on big data platform
CN109542339B (en) Data layered access method and device, multilayer storage equipment and storage medium
CN107948229A (en) The method, apparatus and system of distributed storage
CN109542800A (en) Method, solid state hard disk and the storage device of garbage disposal based on flash memory
CN110084476A (en) Case method of adjustment, device, computer equipment and storage medium
CN109271364A (en) Storage method and device
CN106547472A (en) Storage array management method and device
CN105426125B (en) A kind of date storage method and device
CN106202374A (en) A kind of data processing method and device
CN115237351B (en) NAND block dynamic remapping and read-write command processing method and storage device
CN103235745B (en) A kind of address conflict detecting method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination