CN107958041A - Date storage method, device, server and readable storage medium storing program for executing - Google Patents

Date storage method, device, server and readable storage medium storing program for executing Download PDF

Info

Publication number
CN107958041A
CN107958041A CN201711181853.XA CN201711181853A CN107958041A CN 107958041 A CN107958041 A CN 107958041A CN 201711181853 A CN201711181853 A CN 201711181853A CN 107958041 A CN107958041 A CN 107958041A
Authority
CN
China
Prior art keywords
data
database table
pressure
server
data inputting
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.)
Granted
Application number
CN201711181853.XA
Other languages
Chinese (zh)
Other versions
CN107958041B (en
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.)
Hangzhou Electronic Soul Network Technology Co Ltd
Original Assignee
Hangzhou Electronic Soul Network Technology 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 Hangzhou Electronic Soul Network Technology Co Ltd filed Critical Hangzhou Electronic Soul Network Technology Co Ltd
Priority to CN201711181853.XA priority Critical patent/CN107958041B/en
Publication of CN107958041A publication Critical patent/CN107958041A/en
Application granted granted Critical
Publication of CN107958041B publication Critical patent/CN107958041B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24552Database cache management
    • 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

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)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present invention provides a kind of date storage method, device, server and readable storage medium storing program for executing, the described method includes:The data inputting pressure of current database table in server is detected, and judges whether data inputting pressure meets that database table creates condition according to testing result;If meeting, database table creates condition, is corresponded to according to default new table construction strategy and is created that new database table, and carries out table hand-off process to current database table and new database table;The performance of table handoff process is detected according to prefixed time interval, if testing result is does not complete, the data of new typing are cached, and when testing result is to have completed, will be stored in the database table after the data inputting of caching to corresponding switch.The method storage flexibility is high, and storage efficiency is high, can effectively reduce influence of the data storage procedure to other function services of server, improve the stability of server.

Description

Date storage method, device, server and readable storage medium storing program for executing
Technical field
The present invention relates to technical field of data storage, in particular to a kind of date storage method, device, server And readable storage medium storing program for executing.
Background technology
Existing server is generally using dividing table point storehouse technology to carry out distributed storage to substantial amounts of data, to reduce service The data storage burden of device, improves efficiency data query.But study and find through inventor, if server is into business on line During when carrying out point table handling, it is necessary to server stops business on the line, then perform and divide table handling, and dividing table handling After re-start the storage of the business new data again so that cause server data store flexibility it is low, data storage It is inefficient, influence the implementation of other function services of server.
The content of the invention
In order to overcome above-mentioned deficiency of the prior art, it is an object of the invention to provide a kind of date storage method, dress Put, server and readable storage medium storing program for executing, the date storage method data storage flexibility is high, and data storage efficiency is high, can Influence of the data storage procedure to other function services of server is effectively reduced, improves the stability of server.
For date storage method, preferred embodiments of the present invention provide a kind of date storage method, and the method should For server, the server includes being used for the database table for storing data, the described method includes:
The data inputting pressure of current database table in server is detected, and the number is judged according to testing result Whether meet that database table creates condition according to typing pressure, wherein the data inputting pressure is the current database table typing The data volume of storage and the ratio between total amount of data can be stored;
If meeting, the database table creates condition, is corresponded to according to default new table construction strategy and is created that new database Table, and table hand-off process is carried out to current database table and the new database table;
The performance of table handoff process is detected according to prefixed time interval, if testing result is unfinished When, the data of new typing are cached, and when testing result is to have completed, after the data inputting of caching to corresponding switch Database table in stored.
In preferred embodiments of the present invention, above-mentioned database table, which creates condition, to be included presetting new table construction strategy with described Corresponding preset pressure threshold value, the data inputting pressure to current database table in server are detected, and according to inspection Survey result and judge whether the data inputting pressure meets that the step of database table creates condition includes:
The data volume stored to current database table in the server is detected, and according to the data volume detected and The total amount of data that stores of the current database table obtains corresponding data inputting pressure;
By obtained data inputting pressure compared with the preset pressure threshold value, and according to judging comparative result Whether data inputting pressure meets that database creates condition.
It is above-mentioned to carry out obtained data inputting pressure and the preset pressure threshold value in preferred embodiments of the present invention Compare, and judge whether the data inputting pressure meets that the step of database creates condition includes according to comparative result:
If the data inputting pressure is greater than or equal to the preset pressure threshold value, the data of current database table are judged Typing pressure meets that the database creates condition;
If the data inputting pressure is less than the preset pressure threshold value, the data inputting pressure of current database table is judged Power is unsatisfactory for the database and creates condition.
In preferred embodiments of the present invention, the above-mentioned data inputting pressure to current database table in server is examined Survey, and before judging whether the data inputting pressure meets the step of database table creates condition according to testing result, it is described Method further includes:
Create condition to presetting new table construction strategy and database table and configure.
For data storage device, preferred embodiments of the present invention provide a kind of data storage device, and described device should For server, the server includes being used for the database table for storing data, and described device includes:
Pressure detecting module, for being detected to the data inputting pressure of current database table in server, and according to Testing result judges whether the data inputting pressure meets that database table creates condition, wherein the data inputting pressure is institute State the data volume of current database table typing storage and the ratio between total amount of data can be stored;
New table creation module, if for meeting that the database table creates condition, corresponds to according to default new table construction strategy It is created that new database table, and table hand-off process is carried out to current database table and the new database table;
Data memory module, for being detected according to prefixed time interval to the performance of table handoff process, If testing result is does not complete, the data of new typing are cached, and when testing result is to have completed, by the number of caching Stored in the database table corresponded to according to being entered into after switching.
In preferred embodiments of the present invention, above-mentioned database table, which creates condition, to be included presetting new table construction strategy with described Corresponding preset pressure threshold value, the pressure detecting module include:
Pressure acquisition submodule, the data volume for being stored to current database table in the server are detected, and Corresponding data inputting pressure is obtained according to the total amount of data that stores of the data volume and the current database table that detect;
Multilevel iudge submodule, for the data inputting pressure that will obtain compared with the preset pressure threshold value, and Judge whether the data inputting pressure meets that database creates condition according to comparative result.
In preferred embodiments of the present invention, above-mentioned multilevel iudge submodule by obtained data inputting pressure with it is described pre- If pressure threshold is compared, and judges whether the data inputting pressure meets that database creates condition according to comparative result Mode includes:
If the data inputting pressure is greater than or equal to the preset pressure threshold value, the data of current database table are judged Typing pressure meets that the database creates condition;
If the data inputting pressure is less than the preset pressure threshold value, the data inputting pressure of current database table is judged Power is unsatisfactory for the database and creates condition.
In preferred embodiments of the present invention, above device further includes:
Configuration module, for creating condition to presetting new table construction strategy and database table and configuring.
For server, preferred embodiments of the present invention provide a kind of server, and the server includes:
Storage medium;
Processor;And
Data storage device, described device is stored in the storage medium and the software including being performed by the processor Function module, the server storage are useful for the database table of storage data, and described device includes:
Pressure detecting module, for being detected to the data inputting pressure of current database table in server, and according to Testing result judges whether the data inputting pressure meets that database table creates condition;
New table creation module, if for meeting that the database table creates condition, corresponds to according to default new table construction strategy It is created that new database table, and table hand-off process is carried out to current database table and the new database table;
Data memory module, for being detected according to prefixed time interval to the performance of table handoff process, If testing result is does not complete, the data of new typing are cached, and when testing result is to have completed, by the number of caching Stored in the database table corresponded to according to being entered into after switching.
For readable storage medium storing program for executing, preferred embodiments of the present invention provide a kind of readable storage medium storing program for executing, described readable to deposit Storage media is stored with computer program, and server performs the computer program controls the readable storage medium storing program for executing when running where Above-mentioned date storage method.
In terms of existing technologies, preferred embodiments of the present invention provide date storage method, device, server and Readable storage medium storing program for executing has the advantages that:The date storage method data storage flexibility is high, and data storage efficiency is high, Influence of the data storage procedure to other function services of server can be effectively reduced, improves the stability of server.The side Method judges whether the data inputting pressure is full by being detected to the data inputting pressure of current database table in server Sufficient database table creates condition, and when meeting that the database table creates condition, wound is corresponded to according to default new table construction strategy New database table is built out, table hand-off process correspondingly is carried out to current database table and the new database table;The side Method is detected the performance of table handoff process according to prefixed time interval in table handoff process, if detection When as a result not complete, the data of new typing are cached, and when testing result is to have completed, by the data inputting of caching Stored in database table after to corresponding switch, the server is not had to when data are carried out with point table storage operation Other currently performed function services of the server are interrupted, so as to effectively reduce data storage procedure to other functions of server The influence of business, improves the stability of server.
To enable the above objects, features and advantages of the present invention to become apparent, present pre-ferred embodiments cited below particularly, And attached drawing appended by coordinating, it is described in detail below.
Brief description of the drawings
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, therefore be not construed as pair The restriction of the claims in the present invention protection domain, for those of ordinary skill in the art, what is do not made the creative labor Under the premise of, other relevant attached drawings can also be obtained according to these attached drawings.
Fig. 1 is the block diagram for the server that preferred embodiments of the present invention provide.
Fig. 2 is a kind of flow diagram for the date storage method that preferred embodiments of the present invention provide.
Fig. 3 is the flow diagram for the sub-step that the step S310 shown in Fig. 2 includes.
Fig. 4 is another flow diagram for the date storage method that preferred embodiments of the present invention provide.
Fig. 5 is a kind of block diagram of the data storage device shown in Fig. 1 that preferred embodiments of the present invention provide.
Fig. 6 is the block diagram of the pressure detecting module shown in Fig. 5.
Fig. 7 is another square frame signal of the data storage device shown in Fig. 1 that preferred embodiments of the present invention provide Figure.
Icon:100- servers;110- buses;120- processors;130- storage mediums;140- bus interface;150- nets Network adapter;160- user interfaces;200- data storage devices;210- pressure detecting modules;The new table creation modules of 220-;230- Data memory module;211- pressure acquisition submodules;212- multilevel iudge submodules;240- configuration modules.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, instead of all the embodiments.The present invention implementation being usually described and illustrated herein in the accompanying drawings The component of example can be arranged and designed with a variety of configurations.
Therefore, below the detailed description of the embodiment of the present invention to providing in the accompanying drawings be not intended to limit it is claimed The scope of the present invention, but be merely representative of the present invention selected embodiment.Based on the embodiments of the present invention, this area is common Technical staff's all other embodiments obtained without creative efforts, belong to the model that the present invention protects Enclose.
It should be noted that:Similar label and letter represents similar terms in following attached drawing, therefore, once a certain Xiang Yi It is defined, then it further need not be defined and explained in subsequent attached drawing in a attached drawing.
Below in conjunction with the accompanying drawings, elaborate to some embodiments of the present invention.In the case where there is no conflict, it is following Feature in embodiment and embodiment can be mutually combined.
Fig. 1 is refer to, is the block diagram for the server 100 that preferred embodiments of the present invention provide.Of the invention real Apply in example, the server 100 can be communicated to connect by network and other electronic equipments, to carry out data friendship by the network Mutually, received data and are correspondingly docked and carry out the high and efficient data storage of flexibility.Wherein, the server 100 should Offer processing, data bank, the service point of communications service are provided.For example, the server 100 can refer to correlation Communication and the single concurrent physical processor of data storage and document library facility, or it can refer to networking or the processor gathered, phase The aggregate of network and storing unit is closed, and software and one or more document library systems and support server 100 are carried The application software of the service of confession is operated.Server 100 can be widely different in configuration or performance, but server 100 One or more central processing unit and storage unit can generally be included.Server 100 can also include one or more big Type storage area equipment, one or more power supplys, one or more wired or wireless network components, one or more input/output Component or one or more operating systems, such as, Windows Server, Mac OS X, Unix, Linux, FreeBSD.
In the present embodiment, the server 100 can make general bus architecture to realize by bus 110. According to the concrete application of server 100 and overall design constraints condition, it is total that the bus 110 can include any number of interconnection Line and bridge joint.The bus 110 is electrically connected to various together, these circuits include processor 120,130 and of storage medium Bus interface 140.Alternatively, server 100 can be connected the grade of network adapter 150 via bus 110 using bus interface 140 Connect.Network adapter 150 can be used for the signal processing function for realizing physical layer in radio-based electronic devices, and is realized and penetrated by antenna Frequency signal sends and receives.User interface 160 can connect outer access device, such as:Keyboard, display, mouse or behaviour Vertical pole etc..Bus 110 can also connect various other circuits, such as timing source, ancillary equipment, voltage regulator or power management Circuit etc., these circuits are known in the art, therefore are no longer described in detail.
It can replace, server 100 may also be configured to generic processing system, such as be commonly referred to as chip, the general procedure System includes:The one or more microprocessors of processing function are provided, and at least one of outer of storage medium 130 is provided Portion's memory, it is all these all to be linked together by external bus architecture and other support circuits.
Interchangeable, server 100 can be realized using following:With processor 120, bus interface 140, Yong Hujie The ASIC (application-specific integrated circuit) of mouth 160;And at least a portion of the storage medium 130 in one single chip is integrated in, alternatively, Server 100 can be realized using following:One or more FPGA (field programmable gate array), PLD (programmable logic devices Part), controller, state machine, gate logic, discrete hardware components, any other suitable circuit or to be able to carry out the present invention logical Any combination of the circuit of the described various functions of a piece.
Wherein, processor 120 is responsible for bus 110 and general processing and (including performs and be stored on storage medium 130 Software).Processor 120 can be realized using one or more general processors and/or application specific processor.Processor 120 Example includes microprocessor, microcontroller, dsp processor and the other circuits for being able to carry out software.Should be by software broadly It is construed to represent instruction, data or its any combination, regardless of whether being called it as software, firmware, middleware, microcode, hard Part description language or other.
Storage medium 130 is illustrated as separating with processor 120 in Fig. 1, however, those skilled in the art be easy to it is bright In vain, storage medium 130 or its arbitrary portion can be located at outside the server 100.For example, storage medium 130 can wrap Include transmission line, the carrier waveform modulated with data, and/or the computer product separated with radio node, these media To be accessed by processor 120 by bus interface 140.Alternatively, storage medium 130 or its arbitrary portion are desirably integrated into In processor 120, for example, it may be cache and/or general register.
In the present embodiment, data storage device 200, the data storage can be stored with the storage medium 130 Device 200 can be used for ensuring the server 100 when data are carried out with the storage operation of point table, without interrupting the server 100 other currently performed function services, so that influence of the data storage procedure to 100 other business of server is effectively reduced, Improve the stability of the server 100.Wherein, the data storage device 200 can be performed by the processor 120.
Fig. 2 is refer to, is a kind of flow diagram for the date storage method that preferred embodiments of the present invention provide.At this In inventive embodiments, the date storage method is applied to the server 100, in the storage medium 130 of the server 100 It is stored with the database table for storing data.The idiographic flow to the date storage method shown in Fig. 2 and step carry out below Elaborate.
In embodiments of the present invention, the date storage method comprises the following steps:
Step S310, is detected the data inputting pressure of current database table in server 100, and is tied according to detection Fruit judges whether the data inputting pressure meets that database table creates condition.
In the present embodiment, the data inputting pressure is the data volume of current database table typing storage with that can deposit The ratio between total amount of data is stored up, the data inputting pressure can characterize the data of current database table in the current situation and deposit Energy storage power, the database table create condition and are used to judge whether current database table can continue to storage data.The service Device 100 is judged whether by obtaining the data inputting pressure condition of currently used database table according to the information got Need to create new database table.
Alternatively, Fig. 3 is refer to, is the flow diagram for the sub-step that the step S310 shown in Fig. 2 includes.In this reality Apply in example, the step S310 can include sub-step S311 and sub-step S312, the sub-step S311 and sub-step S312 It is as follows:
Sub-step S311, the data volume stored to current database table in the server 100 are detected, and according to inspection The data volume and the total amount of data that stores of the current database table measured obtains corresponding data inputting pressure.
In the present embodiment, the database table, which creates condition, includes preset pressure corresponding with presetting new table construction strategy Threshold value, the server 100 when current database table meets that the database table creates condition, corresponding will create with it is described pre- If the newly corresponding new database table of table construction strategy.Alternatively, the server 100 is in the number stored to current database table It is detected according to amount, after obtaining the corresponding data volume for having stored data, by the data volume and the current database table Total amount of data can be stored and carry out ratio computing, and corresponded to obtained numerical value as the current database table in the current situation Data inputting pressure.
Sub-step S312, by obtained data inputting pressure compared with the preset pressure threshold value, and according to comparing Whether data inputting pressure described in result judgement meets that database creates condition.
In the present embodiment, the server 100 carries out obtained data inputting pressure and the preset pressure threshold value Compare, and judge whether the data inputting pressure meets the step of database creates condition according to comparative result, including:
If the data inputting pressure is greater than or equal to the preset pressure threshold value, the data of current database table are judged Typing pressure meets that the database creates condition;
If the data inputting pressure is less than the preset pressure threshold value, the data inputting pressure of current database table is judged Power is unsatisfactory for the database and creates condition.
Step S320, if meeting, the database table creates condition, is corresponded to and is created that newly according to default new table construction strategy Database table, and table hand-off process is carried out to current database table and the new database table.
In the present embodiment, the server 100 is unsatisfactory for described in the data inputting pressure for judging current database table When database creates condition, the data write-in storage of new typing still will be arrived the current database table by the server 100 In, and correspondingly judge whether the current database table after the typing data meets that the database creates condition.
In the present embodiment, the server 100 meets the number in the data inputting pressure for judging current database table When creating condition according to storehouse, corresponding default new table construction strategy will be searched from the storage medium 130, and according to described default New table construction strategy creates new database table, and then the current database table is switched over the new database table Processing, to be stored by the new database table to the data of new typing.
Step S330, is detected the performance of table handoff process according to prefixed time interval, if detection knot When fruit is does not complete, the data of new typing are cached, and when testing result is to have completed, the data inputting of caching is arrived Stored in database table after corresponding switching.
In the present embodiment, the server 100 is to the new database table and current database table progress During table hand-off process, the performance of table handoff process will be detected according to prefixed time interval, its Described in prefixed time interval can be 0.5ms or 1ms, the concrete numerical value of the prefixed time interval can be according to need Ask and configured.
In the present embodiment, the server 100 will pass through institute when detecting that the table handoff process does not complete Storage medium 130 is stated to cache the data of new typing, and it is complete for the table handoff process in subsequent detection result Cheng Shi, will be stored in the database table after the data inputting of caching to corresponding switch, and the data of follow-up new typing are by institute State server 100 and correspond to storage into the database table after switching, stored with completing corresponding data.
Fig. 4 is refer to, is another flow diagram for the date storage method that preferred embodiments of the present invention provide. In the embodiment of the present invention, before the step S310, the date storage method can also include:
Step S309, creates condition and configures to presetting new table construction strategy and database table.
In the present embodiment, the preset data storage preset new table construction strategy can be including correspondence database table Amount, preset data storage location, default creation time etc., the default new table construction strategy and the database create condition can Configured by producers, designer or the user of service of the server 100 according to actual needs.
Fig. 5 is refer to, is one kind of the data storage device 200 shown in Fig. 1 of preferred embodiments of the present invention offer Block diagram.In embodiments of the present invention, the data storage device 200 can include pressure detecting module 210, new table is created Model block 220 and data memory module 230.
The pressure detecting module 210, for being examined to the data inputting pressure of current database table in server 100 Survey, and judge whether the data inputting pressure meets that database table creates condition according to testing result.
In the present embodiment, the pressure detecting module 210 can perform the step S310 shown in Fig. 2, specifically hold Row process can refer to above to the detailed description of step S310.
Alternatively, Fig. 6 is refer to, is the block diagram of the pressure detecting module 210 shown in Fig. 5.In the present embodiment In, the database table, which creates condition, includes preset pressure threshold value corresponding with presetting new table construction strategy, the pressure detecting Module 210 can include pressure acquisition submodule 211 and multilevel iudge submodule 212.
The pressure acquisition submodule 211, in the server 100 current database table store data volume into Row detection, and corresponding data record is obtained according to the total amount of data that stores of the data volume and the current database table detected Enter pressure.
In the present embodiment, the pressure acquisition submodule 211 can perform the sub-step S311 shown in Fig. 3, specifically Implementation procedure can refer to the detailed description of above sub-paragraphs S311.
The multilevel iudge submodule 212, data inputting pressure and the preset pressure threshold value for that will obtain carry out Compare, and judge whether the data inputting pressure meets that database creates condition according to comparative result.
In the present embodiment, the multilevel iudge submodule 212 can perform the sub-step S312 shown in Fig. 3, specifically Implementation procedure can refer to the detailed description of above sub-paragraphs S312.
The new table creation module 220, if for meeting that the database table creates condition, plan is created according to default new table It is slightly corresponding to be created that new database table, and table hand-off process is carried out to current database table and the new database table.
In the present embodiment, the new table creation module 220 can perform the sub-step S320 shown in Fig. 2, specifically Implementation procedure can refer to the detailed description of above sub-paragraphs S320.
The data memory module 230, for according to prefixed time interval to the performance of table handoff process into Row detection, if testing result is does not complete, caches the data of new typing, and when testing result is to have completed, will Stored in database table after the data inputting of caching to corresponding switch.
In the present embodiment, the data memory module 230 can perform the sub-step S330 shown in Fig. 2, specifically Implementation procedure can refer to the detailed description of above sub-paragraphs S330.
Refer to Fig. 7, be preferred embodiments of the present invention provide Fig. 1 shown in data storage device 200 it is another Kind block diagram.In embodiments of the present invention, the data storage device 200 can also include configuration module 240.
The configuration module 240, for creating condition to presetting new table construction strategy and database table and configuring.
In the present embodiment, the configuration module 240 can perform the sub-step S309 shown in Fig. 4, specific to perform Process can refer to the detailed description of above sub-paragraphs S309.
In embodiments of the present invention, preferred embodiments of the present invention also provide a kind of readable storage medium storing program for executing, described readable to deposit Storage media is stored with computer program, and the computer program controls server 100 where the readable storage medium storing program for executing when running Perform above-mentioned date storage method.Wherein, the readable storage medium storing program for executing can be that electronic equipment (such as computer) can be deposited The data storage such as any usable medium taken or the server integrated comprising one or more usable mediums, data center is set It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead Body medium (such as solid state hard disc Solid State Disk (SSD)) etc..
In conclusion the date storage method, device, server and the readable storage that are provided in preferred embodiments of the present invention In medium, the date storage method data storage flexibility is high, and data storage efficiency is high, can effectively reduce data and store Influence of the journey to other function services of server, improves the stability of server.The method passes through to current number in server It is detected according to the data inputting pressure of storehouse table, judges whether the data inputting pressure meets that database table creates condition, and When meeting that the database table creates condition, corresponded to according to default new table construction strategy and be created that new database table, accordingly Ground carries out table hand-off process to current database table and the new database table;The method is pressed in table handoff process The performance of table handoff process is detected according to prefixed time interval, if testing result is does not complete, to new record The data entered are cached, and when testing result is to have completed, by the database after the data inputting of caching to corresponding switch Stored in table, the server is currently held when data are carried out with the storage operation of point table without interrupting the server Other capable function services, so as to effectively reduce influence of the data storage procedure to other function services of server, improve service The stability of device.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the invention, for the skill of this area For art personnel, the invention may be variously modified and varied.Within the spirit and principles of the invention, that is made any repaiies Change, equivalent substitution, improvement etc., should all be included in the protection scope of the present invention.

Claims (10)

1. a kind of date storage method, it is characterised in that applied to server, the server includes being used for the number for storing data According to storehouse table, the described method includes:
The data inputting pressure of current database table in server is detected, and judges that the data are recorded according to testing result Enter whether pressure meets that database table creates condition, wherein the data inputting pressure stores for the current database table typing Data volume and the ratio between total amount of data can be stored;
If meeting, the database table creates condition, is corresponded to according to default new table construction strategy and is created that new database table, and Table hand-off process is carried out to current database table and the new database table;
The performance of table handoff process is detected according to prefixed time interval, if testing result is does not complete, The data of new typing are cached, and when testing result is to have completed, after the data inputting of caching to corresponding switch Stored in database table.
2. according to the method described in claim 1, it is characterized in that, the database table creates condition including being preset newly with described The corresponding preset pressure threshold value of table construction strategy, the data inputting pressure to current database table in server are examined Survey, and judge whether the data inputting pressure meets that the step of database table creates condition includes according to testing result:
The data volume stored to current database table in the server is detected, and according to the data volume that detects and described The total amount of data that stores of current database table obtains corresponding data inputting pressure;
By obtained data inputting pressure compared with the preset pressure threshold value, and the data are judged according to comparative result Whether typing pressure meets that database creates condition.
It is 3. according to the method described in claim 2, it is characterized in that, described by obtained data inputting pressure and the default pressure Force threshold is compared, and judges whether the data inputting pressure meets the step of database creates condition according to comparative result Including:
If the data inputting pressure is greater than or equal to the preset pressure threshold value, the data inputting of current database table is judged Pressure meets that the database creates condition;
If the data inputting pressure is less than the preset pressure threshold value, the data inputting pressure of current database table is judged not Meet that the database creates condition.
4. the according to the method described in claim 1, it is characterized in that, data inputting to current database table in server Pressure is detected, and judges whether the data inputting pressure meets the step of database table creates condition according to testing result Before, the method further includes:
Create condition to presetting new table construction strategy and database table and configure.
5. a kind of data storage device, it is characterised in that applied to server, the server includes being used for the number for storing data According to storehouse table, described device includes:
Pressure detecting module, for being detected to the data inputting pressure of current database table in server, and according to detection As a result judge whether the data inputting pressure meets that database table creates condition, wherein the data inputting pressure is worked as to be described The data volume and the ratio between total amount of data can be stored that preceding database table typing stores;
New table creation module, if for meeting that the database table creates condition, corresponds to according to default new table construction strategy and creates Go out new database table, and table hand-off process is carried out to current database table and the new database table;
Data memory module, for being detected according to prefixed time interval to the performance of table handoff process, if inspection When surveying result not complete, the data of new typing are cached, and when testing result is to have completed, the data of caching are recorded Enter into the database table after corresponding switch and stored.
6. device according to claim 5, it is characterised in that the database table, which creates condition, to be included presetting newly with described The corresponding preset pressure threshold value of table construction strategy, the pressure detecting module include:
Pressure acquisition submodule, the data volume for being stored to current database table in the server are detected, and according to The data volume and the total amount of data that stores of the current database table detected obtains corresponding data inputting pressure;
Multilevel iudge submodule, for the data inputting pressure that will obtain compared with the preset pressure threshold value, and according to Comparative result judges whether the data inputting pressure meets that database creates condition.
7. device according to claim 6, it is characterised in that the data inputting pressure that the multilevel iudge submodule will obtain Power judges whether the data inputting pressure meets database compared with the preset pressure threshold value, and according to comparative result The mode of newly-built condition includes:
If the data inputting pressure is greater than or equal to the preset pressure threshold value, the data inputting of current database table is judged Pressure meets that the database creates condition;
If the data inputting pressure is less than the preset pressure threshold value, the data inputting pressure of current database table is judged not Meet that the database creates condition.
8. device according to claim 5, it is characterised in that described device further includes:
Configuration module, for creating condition to presetting new table construction strategy and database table and configuring.
9. a kind of server, it is characterised in that the server includes:
Storage medium;
Processor;And
Data storage device, described device is stored in the storage medium and the software function including being performed by the processor Module, the server storage are useful for the database table of storage data, and described device includes:
Pressure detecting module, for being detected to the data inputting pressure of current database table in server, and according to detection As a result judge whether the data inputting pressure meets that database table creates condition;
New table creation module, if for meeting that the database table creates condition, corresponds to according to default new table construction strategy and creates Go out new database table, and table hand-off process is carried out to current database table and the new database table;
Data memory module, for being detected according to prefixed time interval to the performance of table handoff process, if inspection When surveying result not complete, the data of new typing are cached, and when testing result is to have completed, the data of caching are recorded Enter into the database table after corresponding switch and stored.
10. a kind of readable storage medium storing program for executing, it is characterised in that the readable storage medium storing program for executing is stored with computer program, the calculating Server perform claim machine program controls the readable storage medium storing program for executing when running where requires the data described in any one in 1-4 Storage method.
CN201711181853.XA 2017-11-23 2017-11-23 Data storage method, device, server and readable storage medium Active CN107958041B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711181853.XA CN107958041B (en) 2017-11-23 2017-11-23 Data storage method, device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711181853.XA CN107958041B (en) 2017-11-23 2017-11-23 Data storage method, device, server and readable storage medium

Publications (2)

Publication Number Publication Date
CN107958041A true CN107958041A (en) 2018-04-24
CN107958041B CN107958041B (en) 2020-07-31

Family

ID=61961718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711181853.XA Active CN107958041B (en) 2017-11-23 2017-11-23 Data storage method, device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN107958041B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095393A (en) * 2015-06-30 2015-11-25 努比亚技术有限公司 Method and device for data storage
US20160328691A1 (en) * 2010-07-12 2016-11-10 International Business Machines Corporation Advanced function usage-based billing
CN106202524A (en) * 2016-07-22 2016-12-07 努比亚技术有限公司 Data base and point meter apparatus and method
CN107229674A (en) * 2017-04-26 2017-10-03 努比亚技术有限公司 A kind of data migration device, server and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160328691A1 (en) * 2010-07-12 2016-11-10 International Business Machines Corporation Advanced function usage-based billing
CN105095393A (en) * 2015-06-30 2015-11-25 努比亚技术有限公司 Method and device for data storage
CN106202524A (en) * 2016-07-22 2016-12-07 努比亚技术有限公司 Data base and point meter apparatus and method
CN107229674A (en) * 2017-04-26 2017-10-03 努比亚技术有限公司 A kind of data migration device, server and method

Also Published As

Publication number Publication date
CN107958041B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN107741937A (en) A kind of data query method and device
CN107239479A (en) A kind of method and device of data storage and inquiry based on block chain
US20120089384A1 (en) Historic storage of dual layer power grid connectivity model
CN105431819A (en) Method and apparatus for asynchronous processor removal of meta-stability
US20130086434A1 (en) Configuration fault localization in shared resource environments
CN107256707A (en) A kind of audio recognition method, system and terminal device
CN107025225A (en) A kind of parallel execution method and apparatus of terminal database
CN111625383B (en) Process exception event processing method and device, electronic equipment and storage medium
CN105630683A (en) Cloud testing architecture
CN110808872A (en) Method and device for realizing flow experiment and electronic equipment
CN107977254A (en) The response method and computer-readable recording medium asked in cloud data system
CN107689628A (en) A kind of power network loop detecting method
CN108934013A (en) A kind of radio network functions virtual method and device
CN114595124B (en) Time sequence abnormity detection model evaluation method, related device and storage medium
CN108304455A (en) A kind of method, apparatus and equipment of processing business request
CN107277896A (en) Wifi hotspot management method, device and terminal device
CN109144715A (en) A kind of method, server and the equipment of resource optimization and update
CN108319504A (en) EMS memory occupation optimization method, device and readable storage medium storing program for executing
CN104407808B (en) The method and apparatus for writing data
CN107958041A (en) Date storage method, device, server and readable storage medium storing program for executing
CN115484187B (en) Method, equipment and storage medium for testing container network interface in container environment
CN106156050A (en) A kind of data processing method and device
CN107562520A (en) The method and apparatus of the internal memory of dilatation virtual machine
CN109147075A (en) Student attendance method and device
US20240104058A1 (en) File connection method and apparatus, terminal device, and storage medium

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
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20180424

Assignee: Hangzhou spoon Network Technology Co., Ltd

Assignor: Hangzhou dianhun Network Technology Co., Ltd

Contract record no.: X2021330000727

Denomination of invention: Data storage method, device, server and readable storage medium

Granted publication date: 20200731

License type: Common License

Record date: 20211109

EE01 Entry into force of recordation of patent licensing contract