CN110134670A - Date storage method, device, electronic equipment and computer readable storage medium - Google Patents

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

Info

Publication number
CN110134670A
CN110134670A CN201910407598.9A CN201910407598A CN110134670A CN 110134670 A CN110134670 A CN 110134670A CN 201910407598 A CN201910407598 A CN 201910407598A CN 110134670 A CN110134670 A CN 110134670A
Authority
CN
China
Prior art keywords
data
target object
version information
instruction
target
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
CN201910407598.9A
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.)
Rajax Network Technology Co Ltd
Lazhasi Network Technology Shanghai Co Ltd
Original Assignee
Lazhasi Network Technology Shanghai 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 Lazhasi Network Technology Shanghai Co Ltd filed Critical Lazhasi Network Technology Shanghai Co Ltd
Priority to CN201910407598.9A priority Critical patent/CN110134670A/en
Publication of CN110134670A publication Critical patent/CN110134670A/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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning

Landscapes

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

Abstract

The embodiment of the present disclosure discloses a kind of date storage method, device, electronic equipment and computer readable storage medium, which comprises obtains user operation instruction;In response to user operation instruction, processing target object version information corresponding with target object is updated;The data of the target object of storage after data processing and corresponding version information.The program can be by being arranged version information to target object, realize the storage and management to the data of target object, it avoids and needs to include the case where entire database of the target object is backed up after the target object carries out data processing, the invalid backup for reducing data-storage system improves the reliability and stability of data-storage system;Only need to obtain whole historical datas of target object in the historical data for needing to inquire target object according to the version information of all previous storage simultaneously, process is simple, and the used time is less, improves the operational efficiency of the data-storage system.

Description

Date storage method, device, electronic equipment and computer readable storage medium
Technical field
This disclosure relates to technical field of data processing, and in particular to a kind of date storage method, device, electronic equipment and meter Calculation machine readable storage medium storing program for executing.
Background technique
With the arriving of big data era, the data for needing to store are more and more, and data update also more and more frequently, because This data-storage system is also more and more important to the storage and management of data.
In the related technology, data-storage system can deposit data in such a way that multiple history lists+status table combines Storage and management.Status table can reflect the current data of multiple objects that database includes after last update;Each go through History table can reflect multiple objects that database includes after upper primary data update to the data before last update. However this method needs to back up entire database, i.e., to the object being updated when there is data update every time It data and the data for the object not being updated while being backed up, therefore increases many useless data backups, affected The reliability and stability of entire data-storage system;And it is needed to be traversed for when needing to inquire whole historical datas of single object All history lists, process is complex, and the used time is more, reduces the operational efficiency of data-storage system.
Summary of the invention
The embodiment of the present disclosure provides a kind of date storage method, device, electronic equipment and computer readable storage medium.
In a first aspect, providing a kind of date storage method in the embodiment of the present disclosure.
Specifically, the date storage method, comprising:
User operation instruction is obtained, the user operation instruction instruction carries out data processing to target object;
In response to the user operation instruction, target object version letter corresponding with the target object is updated is handled Breath;
The data of the target object of the storage after the data processing and corresponding version information.
With reference to first aspect, the disclosure is in the first implementation of first aspect, the acquisition user operation instruction Include:
Modification instruction is obtained, the current data of the target object is revised as target data by the modification instruction instruction;
It is described in response to the user operation instruction, handle target object version corresponding with the target object is updated This information includes:
Instructed in response to the modification, from least one data of the stored target object and it is described at least one The corresponding version information of current data of the target object is obtained in the corresponding version information of data, and is obtained to described current Data carry out the target data after the data processing;
According to target data pair described in the corresponding version information of the current data and preset edition upgrading Rule The version information answered;
The data of the target object of the storage after the data processing and corresponding version information include:
Store the target data and the corresponding version information of the target data.
With reference to first aspect with the first implementation of first aspect, the disclosure is in second of realization side of first aspect In formula, the target data pair according to the corresponding version information of the current data and preset edition upgrading Rule The version information answered includes:
Obtain the version number for including in the corresponding version information of the current data;
The version number is executed plus 1 operation obtains new version number;
The corresponding version information of the target data is obtained according to the new version number.
With reference to first aspect, second of implementation of the first implementation of first aspect and first aspect, this public affairs It is opened in the third implementation of first aspect, the method also includes:
It obtains first and shows instruction, described first shows that instruction instruction shows the current data of the target object;
Show instruction in response to described first, traverse the stored target object at least one data and it is described extremely Few corresponding version information of a data;
According to the preset edition upgrading rule show in the corresponding version information of at least one described data highest or The corresponding data of the newest version information of person.
With reference to first aspect, the first implementation of first aspect, first aspect second of implementation and first The third implementation of aspect, the disclosure in the 4th kind of implementation of first aspect, the method also includes:
It obtains second and shows instruction, described second shows that instruction instruction shows all historical datas of the target object;
Instruction is shown in response to described second, shows at least one data and the institute of the stored target object respectively State the corresponding version information of at least one data.
With reference to first aspect, the first implementation, second of implementation of first aspect, first party of first aspect The third implementation in face and the 4th kind of implementation of first aspect, five kind implementation of the disclosure in first aspect In, the acquisition user operation instruction includes:
Newly-built instruction is obtained, the newly-built instruction includes needing the primary data of the newly-built target object;
It is described in response to the user operation instruction, handle target object version corresponding with the target object is updated This information includes:
In response to the newly-built instruction, creates the target object and set the mesh for preset initial version information Mark the corresponding version information of primary data of object;
The data of the target object of the storage after the data processing and corresponding version information include:
Store the primary data and the corresponding version information of the primary data of the target object.
With reference to first aspect, the first implementation, second of implementation of first aspect, first party of first aspect The 5th kind of implementation of the third implementation in face, the 4th kind of implementation of first aspect and first aspect, the disclosure In the 6th kind of implementation of first aspect, the method also includes:
It obtains and deletes instruction, the target object is deleted in the deletion instruction instruction;
It is instructed in response to the deletion, deletes all data and all data pair of the stored target object The version information answered.
Second aspect provides a kind of data storage device in the embodiment of the present disclosure.
Specifically, the data storage device, comprising:
First obtains module, is configured as obtaining user operation instruction, the user operation instruction instruction is to target object Carry out data processing;
Processing module is configured to respond to the user operation instruction, in response to the user operation instruction, handles institute State target object version information corresponding with the target object is updated;
Memory module is configured as storing the data and corresponding version of the target object after the data processing This information.
In conjunction with second aspect, in the first implementation of second aspect, the first acquisition module includes: the disclosure
First acquisition submodule is configured as obtaining modification instruction, and the modification instruction is indicated the target object Current data is revised as target data;
The processing module includes:
Second acquisition submodule is configured to respond to modification instruction, from the stored target object to The current data that the target object is obtained in few data and the corresponding version information of at least one described data is corresponding Version information, and obtain and carry out the target data after the data processing to the current data;
Third acquisition submodule is configured as according to the corresponding version information of the current data and preset edition upgrading The corresponding version information of target data described in Rule;
The memory module includes:
First sub-module stored is configured as storing the target data and the corresponding version information of the target data.
In conjunction with the first of second aspect and second aspect implementation, the disclosure is in second of realization side of second aspect In formula, the third acquisition submodule includes:
4th acquisition submodule is configured as obtaining the version number for including in the corresponding version information of the current data;
5th acquisition submodule is configured as executing the version number plus 1 operation obtains new version number;
6th acquisition submodule is configured as obtaining the corresponding version letter of the target data according to the new version number Breath.
In conjunction with the first implementation of second aspect, second aspect and second of implementation of second aspect, this public affairs It is opened in the third implementation of second aspect, described device further include:
Second obtains module, is configured as obtaining the first displaying instruction, described first shows the instruction instruction displaying mesh Mark the current data of object;
Spider module is configured to respond to described first and shows instruction, traverses the stored target object extremely Few data and the corresponding version information of at least one described data;
First display module is configured as showing at least one described data pair according to the preset edition upgrading rule Highest or the corresponding data of newest version information in the version information answered.
In conjunction with the first implementation of second aspect, second aspect, second of implementation and second of second aspect The third implementation of aspect, the disclosure is in the 4th kind of implementation of second aspect, described device further include:
Third obtains module, is configured as obtaining the second displaying instruction, described second shows the instruction instruction displaying mesh Mark all historical datas of object;
Second display module is configured to respond to described second and shows instruction, shows the stored target respectively At least one data of object and the corresponding version information of at least one described data.
The first implementation, second of implementation of second aspect, second party in conjunction with second aspect, second aspect The third implementation in face and the 4th kind of implementation of second aspect, five kind implementation of the disclosure in second aspect In, the first acquisition module includes:
7th acquisition submodule is configured as obtaining newly-built instruction, and the newly-built instruction includes needing the newly-built mesh Mark the primary data of object;
The processing module includes:
8th acquisition submodule is configured to respond to the newly-built instruction, creates the target object and will be preset Initial version information is set as the corresponding version information of primary data of the target object;
The memory module includes:
Second sub-module stored is configured as storing the primary data of the target object and the primary data is corresponding Version information.
The first implementation, second of implementation of second aspect, second party in conjunction with second aspect, second aspect The 5th kind of implementation of the third implementation in face, the 4th kind of implementation of second aspect and second aspect, the disclosure In the 6th kind of implementation of second aspect, described device further include:
4th obtains module, is configured as obtaining and deletes instruction, the target object is deleted in the deletion instruction instruction;
Removing module is configured to respond to the deletion instruction, deletes all numbers of the stored target object According to version information corresponding with all data.
The third aspect, the embodiment of the present disclosure provide a kind of electronic equipment, including memory and processor, the memory The computer instruction of date storage method in above-mentioned first aspect is executed for storing one or more support data storage device, The processor is configured to for executing the computer instruction stored in the memory.The data storage device can be with Including communication interface, for data storage device and other equipment or communication.
Fourth aspect, the embodiment of the present disclosure provide a kind of computer readable storage medium, for storing data storage dress Computer instruction used is set, it includes be involved by data storage device for executing date storage method in above-mentioned first aspect And computer instruction.
The technical solution that the embodiment of the present disclosure provides can include the following benefits:
Above-mentioned technical proposal realizes the storage to the data of target object by the way that version information is arranged to target object And management, it avoids and needs to carry out comprising the entire database of the target object after the target object carries out data processing The case where backup, but only that storing each data processing of the target object according to the version information after each data processing Data later reduce the invalid backup of data-storage system, improve the reliability and stabilization of data-storage system Property;Simultaneously only need that target can be obtained according to the version information of all previous storage in the historical data for needing to inquire target object Whole historical datas of object, process is simple, and the used time is less, improves the operational efficiency of the data-storage system.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
In conjunction with attached drawing, by the detailed description of following non-limiting embodiment, the other feature of the disclosure, purpose and excellent Point will be apparent.In the accompanying drawings:
Fig. 1 a shows the flow chart of the date storage method according to one embodiment of the disclosure;
Fig. 1 b shows the flow chart of the date storage method according to one embodiment of the disclosure;
Fig. 1 c shows the flow chart of the date storage method according to one embodiment of the disclosure;
Fig. 1 d shows the flow chart of the date storage method according to one embodiment of the disclosure;
Fig. 2 a shows the structural block diagram of the data storage device according to one embodiment of the disclosure;
Fig. 2 b shows the structural block diagram of the data storage device according to one embodiment of the disclosure;
Fig. 2 c shows the structural block diagram of the data storage device according to one embodiment of the disclosure;
Fig. 2 d shows the structural block diagram of the data storage device according to one embodiment of the disclosure;
Fig. 3 shows the structural block diagram of the electronic equipment according to one embodiment of the disclosure;
Fig. 4 is adapted for the structure for realizing the computer system of the date storage method according to one embodiment of the disclosure Schematic diagram.
Specific embodiment
Hereinafter, the illustrative embodiments of the disclosure will be described in detail with reference to the attached drawings, so that those skilled in the art can Easily realize them.In addition, for the sake of clarity, the portion unrelated with description illustrative embodiments is omitted in the accompanying drawings Point.
In the disclosure, it should be appreciated that the term of " comprising " or " having " etc. is intended to refer to disclosed in this specification Feature, number, step, behavior, the presence of component, part or combinations thereof, and be not intended to exclude other one or more features, A possibility that number, step, behavior, component, part or combinations thereof exist or are added.
It also should be noted that in the absence of conflict, the feature in embodiment and embodiment in the disclosure It can be combined with each other.The disclosure is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
The technical solution that the embodiment of the present disclosure provides is realized by the way that version information is arranged to target object to target object Data storage and management, avoid that need after the target object carries out data processing will be whole comprising the target object The case where a database is backed up, but only that storing the target object according to the version information after each data processing Data after each data processing, reduce the invalid backup of data-storage system, improve data-storage system Reliability and stability;The version information according to all previous storage is only needed in the historical data for needing to inquire target object simultaneously Whole historical datas of target object can be obtained, process is simple, and the used time is less, improves the operation effect of the data-storage system Rate.
Fig. 1 a shows the flow chart of the date storage method according to one embodiment of the disclosure.As shown in Figure 1a, the number Include the following steps S101-S103 according to storage method:
In step s101, user operation instruction is obtained, user operation instruction instruction carries out at data target object Reason.
In step s 102, it in response to the user operation instruction, handles the target object and updates the target pair As corresponding version information.
In step s 103, the data of the target object of the storage after the data processing and corresponding version letter Breath.
Mentioned above, data-storage system needs to back up entire database, i.e., when there is data update every time It the data of data and the object not being updated to the object being updated while backing up, therefore increases many useless Data backup, affect the reliability and stability of entire data-storage system;Needing to inquire the complete of single object simultaneously All history lists are needed to be traversed for when portion's historical data, process is complex, and the used time is more, reduces the operation of data-storage system Efficiency.
In view of drawbacks described above, in this embodiment, a kind of date storage method is proposed, this method passes through to target pair As version information is arranged, the storage and management to the data of target object are realized, avoids and carries out data in the target object It needs to include the case where entire database of the target object is backed up after processing, but only that according to each data Version information after processing stores the data after each data processing of the target object, reduces data-storage system Invalid backup, improve the reliability and stability of data-storage system;Simultaneously in the history number for needing to inquire target object According to when only need to obtain whole historical datas of target object according to the version information of all previous storage, process is simple, the used time It is less, improve the operational efficiency of the data-storage system.
Wherein, the date storage method be applied to data-storage system, the data-storage system can be set server, In terminal or other equipment with data storage function, the embodiment of the present disclosure is not construed as limiting this.
Wherein, which is any one object in multiple objects that database includes, it is assumed that the database is The database of website service health status is reacted, then the target object can be quantity of smoldering.
It wherein, may include showing to the newly-built of the target object and to the target object to the data processing of the target object There is the update of data.
In an optional implementation of the present embodiment, data-storage system can distribute different for different objects Storage region, the storage region of each object can store the object and carry out the data after data processing every time and pass through every time Version information after data processing, i.e., the storage region of each object are stored with multiple historical datas of the object and multiple go through The corresponding version information of history data can get the different historical datas of the object according to different version informations.
By taking data-storage system setting on the server as an example, after getting user operation instruction, if the server The storage region of currently allocated target object, then can be from least one stored data of storage region of the target object The corresponding version information of current data of target object is obtained in version information corresponding at least one data, then basis The corresponding version information of the current data obtains this and carries out the version information after data processing, that is, it is corresponding to update the target object Version information, and according to the current data of the target object obtain this carry out data processing after data, i.e., to the target Object is handled, and then the data after this data processing and the version information after this data processing are stored in this In the storage region of target object and the corresponding relationship both established, convenient for version of the server after getting this data processing It, can be according to the version information after this data processing after the storage region gets this data processing after this information Data.
It can be first target object distribution storage if the storage region of the current unallocated target object of the server Then data after this data processing and the version information after this data processing are stored in the target object by region Storage region in and the corresponding relationship both established.
In an optional implementation of the present embodiment, the step S101, i.e., acquisition user operation instruction the step of, Including step S1011:
In step S1011, modification instruction is obtained, the current data of the target object is revised as by modification instruction instruction Target data.
The step S102 handles the target object and updates the target that is, in response to the user operation instruction The step of object corresponding version information, including step S1021 and step S1022:
It in step S1021, is instructed in response to the modification, from least one data of the stored target object and this The corresponding version information of current data of the target object is obtained in the corresponding version information of at least one data, and is obtained to this Current data carries out the target data after data processing.
It, should according to the corresponding version information of the current data and preset edition upgrading Rule in step S1022 The corresponding version information of target data.
The step S103, the i.e. data and corresponding version of the target object of the storage after the data processing The step of information, including step S1031:
In step S1031, target data version information corresponding with the target data is stored.
In the present embodiment, after the data of target object are modified, data-storage system can store modification The version information corresponding with the target data of target data afterwards avoids and occurs needing to wrap after modification in the target object The case where entire database containing the target object is backed up reduces the invalid backup of data-storage system, improves number According to the reliability and stability of storage system.
Wherein, which may include the modification to data or the displacement to data, which is revised as to target pair The current data of elephant is modified, for example, the ID (Identity, identity) of the target object is revised as A2 from A1, or The quantity of target object is revised as B2 from B1 by person, i.e. the most information of data is constant, only changes fraction information;The data Be replaced into the current data of target object replaced, for example, the ID of the target object is revised as B from A, or by mesh The quantity of mark object is revised as C from B, i.e. all information of data is replaced.
It is exemplary, after getting the modification for indicating for the current data of target object to be revised as target data instruction, Server can determine the storage region of the target object from allocated multiple storage regions, then obtain the target object Storage region at least one stored data version information corresponding at least one data, and according to this at least one Corresponding at least one data version information of a data obtains the corresponding version information of current data of target object, i.e., from Highest is obtained in the corresponding version information of at least one data, and perhaps then newest version information obtains the highest or most The corresponding data of new version information, the data are the current data of target object, the highest or newest version information The as corresponding version information of the current data.
It, can be to the mesh after the current data for getting target object version information corresponding with the current data It marks object and carries out data processing, i.e., the current data of the target object is revised as target data, and according to the current data pair The version information and the modified version information of preset edition upgrading Rule target object answered, i.e. target object are worked as Preceding data modification is the corresponding version information of the target data after target data.Exemplary, server is available, and this is current The version number for including in the corresponding version information of data, then executes the version number plus 1 operation obtains new version number, and root The corresponding version information of the target data is obtained according to the new version number, i.e., preset edition upgrading rule is every progress one at this time Version number after secondary data processing in version information adds 1, and server is in the current data for getting the target object and deserves After the corresponding version information of preceding data, the version number that the corresponding version information of the current data includes can be carried out plus 1 at Reason, gets the version information including new version number, which is the corresponding version information of the target data.
After getting the corresponding version information of target data, server can be stored in the storage region of the target object Target data version information corresponding with the target data and the corresponding relationship for establishing the two, i.e., it is corresponding according to the target data Version information store the target data, the number of targets is obtained according to the corresponding version information of the target data convenient for server According to.
In an optional implementation of the present embodiment, as shown in Figure 1 b, the method also includes step S104 to step Rapid S106:
It in step S104, obtains first and shows instruction, which shows the current of the target object Data.
In step s105, it is instructed in response to first displaying, traverses at least one number of the stored target object According to version information corresponding at least one data.
In step s 106, which is shown according to the preset edition upgrading rule Middle highest or the corresponding data of newest version information.
In the present embodiment, by highest in the corresponding version information of at least one stored data of inquiry or most The corresponding data of new version information can get the current data of the target object, avoid the need for inquiring and repeatedly back up The case where data of entire database can just get the current data of target object, process is simple, and the used time is less, improves this The operational efficiency of data-storage system.
Exemplary, server is stored with all history numbers of the target object in the storage region for target object distribution According to version information corresponding with each historical data.It shows and refers to the first of the current data for getting instruction displaying target object After order, server can determine the storage region of the target object first, then obtain all numbers of storage region storage The corresponding version information of each data accordingly and in all data, then according to preset edition upgrading Rule, this is all Highest or newest version information in the corresponding version information of data, such as the corresponding version letter of available all data Then the maximum version information of the version number for including in breath shows the highest or the corresponding data of newest version information, should Data are to carry out the data after data processing, the i.e. current data of the target object target object the last time.
In an optional implementation of the present embodiment, as illustrated in figure 1 c, this method further include:
In step s 107, it obtains second and shows instruction, which shows all of the target object Historical data.
In step S108, is instructed in response to second displaying, show at least the one of the stored target object respectively A data version information corresponding at least one data.
In the present embodiment, pass through at least one stored data version information corresponding at least one data The corresponding all historical datas of the target can be got, the data ability for inquiring the entire database repeatedly backed up is avoided the need for The case where all historical datas of target object can be got, so that the process of data query is simple, the used time is less, improves this The operational efficiency of data-storage system.
Exemplary, server is stored with all history numbers of the target object in the storage region for target object distribution According to version information corresponding with each historical data.In the second exhibition of all historical datas for getting instruction displaying target object After showing instruction, server can determine the storage region of the target object first, then obtain the institute of storage region storage There is the corresponding version information of each data in data and all data, it then will be in all data and all data The corresponding version information of each data is shown, such as can be in the display screen display connecting with the server all numbers The corresponding version information of each data accordingly and in all data, which is all history numbers of target object According to by consulting, each corresponding version information of data and the corresponding data of each version information can be true in all data Fixed variation of the target object in all previous data handling procedure.
In an optional implementation of the present embodiment, the step S101, i.e., acquisition user operation instruction the step of, Including step S1012:
In step S1012, newly-built instruction is obtained, which includes needing the initial number of the newly-built target object According to.
The step S102 handles the target object and updates the target object pair that is, in response to the user operation instruction The step of version information answered, including step S1023:
In step S1023, in response to the newly-built instruction, creates the target object and set preset initial version information It is set to the corresponding version information of primary data of the target object.
The step S103, the i.e. data of the target object of the storage after the data processing and corresponding version information The step of, including step S1032:
In step S1032, the primary data version information corresponding with the primary data of the target object is stored.
In the present embodiment, data-storage system can be the initial of the target object when creating the target object Initial version information is arranged in data, carries out when the target object carries out data processing to the data of the target object convenient for subsequent Record.
Exemplary, after the newly-built instruction for getting instruction new destination object, server can be the target first Object distributes storage region, that is, creates the target object, and version information, the version then is arranged for the primary data of the target object This information can be preset initial version information, such as the version number that the preset initial version information includes can be 0.
After determining the primary data and the corresponding initial version information of the primary data, server can be in the mesh The storage region of mark object stores the primary data and the initial version information, i.e., it is first to store this according to the initial version information Beginning data, and the corresponding relationship both established, convenient for server according to the initial version acquisition of information primary data.
In an optional implementation of the present embodiment, as shown in Figure 1 d, this method further include:
It in step S109, obtains and deletes instruction, the target object is deleted in deletion instruction instruction.
In step s 110, it is instructed in response to the deletion, deletes all data and the institute of the stored target object There is the corresponding version information of data.
In the present embodiment, corresponding with all data by deleting all data of the stored target object The target object complete deletion can be avoided the need for the data ability for traversing the entire database repeatedly backed up by version information The case where deleting the target object, process is simple, and the used time is less, improves the operational efficiency of data-storage system.
Exemplary, server is stored with all history numbers of the target object in the storage region for target object distribution According to version information corresponding with each historical data.After getting instruction and deleting the deletion instruction of the target object, service Device can determine the storage region of the target object first, then obtain all data of storage region storage and this is all The corresponding version information of each data in data, then by the corresponding version of data each in all data and all data This information is all deleted, and all historical datas of the target object can be so deleted.
Following is embodiment of the present disclosure, can be used for executing embodiments of the present disclosure.
Fig. 2 a shows the structural block diagram of the data storage device according to one embodiment of the disclosure, which can be by soft Part, hardware or both are implemented in combination with as some or all of of electronic equipment.As shown in Figure 2 a, the data storage dress It sets and includes:
First obtains module 201, is configured as obtaining user operation instruction, the user operation instruction instruction is to target pair As carrying out data processing.
Processing module 202 is configured to respond to the user operation instruction, handles the target object and updates the target pair As corresponding version information.
Memory module 203 is configured as storing the data of the target object after the data processing and corresponding version This information.
Mentioned above, data-storage system needs to back up entire database, i.e., when there is data update every time It the data of data and the object not being updated to the object being updated while backing up, therefore increases many useless Data backup, affect the reliability and stability of entire data-storage system;Needing to inquire the complete of single object simultaneously All history lists are needed to be traversed for when portion's historical data, process is complex, and the used time is more, reduces the operation of data-storage system Efficiency.
In view of drawbacks described above, in this embodiment, a kind of data storage device is proposed, which passes through to target pair As version information is arranged, the storage and management to the data of target object are realized, avoids and carries out data in the target object It needs to include the case where entire database of the target object is backed up after processing, but only that according to each data Version information after processing stores the data after each data processing of the target object, reduces data-storage system Invalid backup, improve the reliability and stability of data-storage system;Simultaneously in the history number for needing to inquire target object According to when only need to obtain whole historical datas of target object according to the version information of all previous storage, process is simple, the used time It is less, improve the operational efficiency of the data-storage system.
Wherein, which can be set in server, terminal or other setting with data storage function Standby upper, the embodiment of the present disclosure is not construed as limiting this.
Wherein, which is any one object in multiple objects that database includes, it is assumed that the database is The database of website service health status is reacted, then the target object can be quantity of smoldering.
It wherein, may include showing to the newly-built of the target object and to the target object to the data processing of the target object There is the update of data.
In an optional implementation of the present embodiment, which can distribute different memory blocks for different objects Domain, the storage region of each object can store the object and carry out the data after data processing every time and pass through at data every time Version information after reason, i.e., the storage region of each object are stored with the multiple historical datas and multiple historical data of the object Corresponding version information can get the different historical datas of the object according to different version informations.
After the first acquisition module 201 gets user operation instruction, if the currently allocated target object of the device Storage region, then processing module 202 can from least one stored data of storage region of the target object and this at least The corresponding version information of current data that target object is obtained in the corresponding version information of one data, then according to the current number This version information after carrying out data processing is obtained according to corresponding version information, that is, updates the corresponding version letter of the target object Breath, and this data after carrying out data processing is obtained according to the current data of the target object, i.e., the target object is carried out Processing, and then memory module 203 stores the data after this data processing and the version information after this data processing In the storage region of the target object and the corresponding relationship both established, convenient for the device after getting this data processing Version information after, this data processing can be got in the storage region according to the version information after this data processing Data afterwards.
If the storage region of the current unallocated target object of the device, memory block can be distributed for the target object first Domain, then processing module 202 obtains the version information after this data processing, such as available preset initial version letter Breath, then the data after this data processing and the version information after this data processing are stored in by memory module 203 In the storage region of the target object and the corresponding relationship both established.
In an optional implementation of the present embodiment, described first, which obtains module 201, includes the first acquisition submodule 2011, first acquisition submodule 2011 is configured as obtaining modification instruction, and the modification instruction is indicated the target pair The current data of elephant is revised as target data.
The processing module 202 includes the second acquisition submodule 2021 and third acquisition submodule 2022, and described second obtains Submodule 2021 is taken, modification instruction is configured to respond to, from least one data of the stored target object and this The corresponding version information of current data of the target object is obtained in the corresponding version information of at least one data, and is obtained to this Current data carries out the target data after data processing;The third acquisition submodule 2022, is configured as according to the current number According to corresponding version information and the corresponding version information of preset edition upgrading Rule target data;
The memory module 203 includes the first sub-module stored 2031, and first sub-module stored 2031 is configured as Store the target data and the corresponding version information of the target data.
In the present embodiment, after the data of target object are modified, which can store modified mesh Data version information corresponding with the target data is marked, avoids and occurs needing include the mesh after modification in the target object The case where entire database of mark object is backed up, reduces the invalid backup of data-storage system, improves data storage The reliability and stability of system.
Wherein, which may include the modification to data or the displacement to data, which is revised as to target pair The current data of elephant is modified, for example, the ID of the target object is revised as A2 from A1, or by the quantity of target object from B1 is revised as B2, i.e. the most information of data is constant, only changes fraction information;The data are replaced into target object Current data is replaced, for example, the ID of the target object is revised as B from A, or the quantity of target object is modified from B All information for C, i.e. data is replaced.
It is exemplary, instruction is got in the first acquisition submodule 2011, and the current data of target object is revised as number of targets According to modification instruction after, the second acquisition submodule 2021 can determine the target object from allocated multiple storage regions Storage region, then obtain at least one stored data and at least one data in the storage region of the target object Corresponding version information, and target object is obtained according at least one data version information corresponding at least one data The corresponding version information of current data, i.e., from the corresponding version information of at least one data obtain highest or newest Version information, then obtains the highest or the corresponding data of newest version information, which is the current of target object Data, the highest or newest version information are the corresponding version information of the current data.
In the current data version corresponding with the current data that the second acquisition submodule 2021 gets the target object After information, data processing can be carried out to the target object, i.e., the current data of the target object is revised as target data, Third acquisition submodule 2022 can be somebody's turn to do according to the corresponding version information of the current data and preset edition upgrading Rule The modified version information of target object, i.e. the target data is corresponding after the current data of target object is revised as target data Version information.
After getting the corresponding version information of target data, the first sub-module stored 2031 can be in the target object Storage region stores target data version information corresponding with the target data and establishes the corresponding relationship of the two, i.e., according to this The corresponding version information of target data stores the target data, is obtained convenient for the device according to the corresponding version information of the target data Take the target data.
In an optional implementation of the present embodiment, the third acquisition submodule 2022 includes the 4th acquisition submodule Block 2022a, the 5th acquisition submodule 2022b and the 6th acquisition submodule 2022c.
Wherein, the 4th acquisition submodule 2022a, is configured as obtaining in the corresponding version information of the current data and includes Version number.
5th acquisition submodule 2022b is configured as executing the version number plus 1 operation obtains new version number.
6th acquisition submodule 2022c is configured as corresponding according to new version number's acquisition target data Version information.
Exemplary, which can be the version in version information after data processing of every progress This number plus 1, the 4th acquisition submodule 2022a obtains the version that the corresponding version information of current data of the target object includes Number, the 5th acquisition submodule 2022b can be carried out to the version number that the corresponding version information of the current data includes plus 1 processing, The version information including new version number is got, this can be included the version of new version number by the 6th acquisition submodule 2022c This information is determined as the corresponding version information of the target data.
In an optional implementation of the present embodiment, as shown in Figure 2 b, described device further include:
Second obtains module 204, is configured as obtaining the first displaying instruction, described first shows described in instruction instruction displaying The current data of target object.
Spider module 205 is configured to respond to described first and shows instruction, traverses the stored target object At least one data and the corresponding version information of at least one described data.
First display module 206 is configured as showing at least one described number according to the preset edition upgrading rule According to highest in corresponding version information or the corresponding data of newest version information.
In the present embodiment, by highest in the corresponding version information of at least one stored data of inquiry or most The corresponding data of new version information can get the current data of the target object, avoid the need for inquiring and repeatedly back up The case where data of entire database can just get the current data of target object, process is simple, and the used time is less, improves this The operational efficiency of data-storage system.
Exemplary, which is stored with all history numbers of the target object in the storage region for target object distribution According to version information corresponding with each historical data.Instruction, which is got, in the second acquisition module 204 shows the current of target object After the first of data shows instruction, spider module 205 can determine the storage region of the target object first, and then obtaining should The corresponding version information of each data in all data and all data of storage region storage, then the first display module 206 according to preset edition upgrading Rule highest or newest version letter in the corresponding version information of all data The maximum version information of version number for including in breath, such as the corresponding version information of available all data, then shows The highest or the corresponding data of newest version information, the data are after target object the last time carrying out data processing Data, the i.e. current data of the target object.
In an optional implementation of the present embodiment, as shown in Figure 2 c, described device further include:
Third obtains module 207, is configured as obtaining the second displaying instruction, described second shows described in instruction instruction displaying All historical datas of target object.
Second display module 208 is configured to respond to described second and shows instruction, shows the stored mesh respectively Mark at least one data and the corresponding version information of at least one described data of object.
In the present embodiment, pass through at least one stored data version information corresponding at least one data The corresponding all historical datas of the target can be got, the data ability for inquiring the entire database repeatedly backed up is avoided the need for The case where all historical datas of target object can be got, so that the process of data query is simple, the used time is less, improves this The operational efficiency of data-storage system.
Exemplary, which is stored with all history numbers of the target object in the storage region for target object distribution According to version information corresponding with each historical data.Module 207, which is obtained, in third gets all of instruction displaying target object After the second of historical data shows instruction, the second display module 208 can determine the storage region of the target object first, so The corresponding version information of each data in all data and all data of storage region storage is obtained afterwards, then should The corresponding version information of each data is shown in all data and all data, such as can be connect with the device Display screen display all data and all data in the corresponding version information of each data, which is All historical datas of target object, by consulting each corresponding version information of data and each version in all data The corresponding data of information can determine variation of the target object in all previous data handling procedure.
In an optional implementation of the present embodiment, described first, which obtains module 201, includes the 7th acquisition submodule 2012, the 7th acquisition submodule 2012 is configured as obtaining newly-built instruction, and the newly-built instruction includes needing newly-built institute State the primary data of target object.
The processing module 202 includes the 8th acquisition submodule 2023, and the 8th acquisition submodule 2023 is configured as In response to the newly-built instruction, creates the target object and set preset initial version information to the initial number of the target object According to corresponding version information.
The memory module 203 includes the second sub-module stored 2032, and second sub-module stored 2032 is configured as Store the primary data version information corresponding with the primary data of the target object.
In the present embodiment, which can set when creating the target object for the primary data of the target object Initial version information is set, the data of the target object are recorded when the target object carries out data processing convenient for subsequent.
Exemplary, after the newly-built instruction that the 7th acquisition submodule 2012 gets instruction new destination object, this Eight acquisition submodules 2023 can distribute storage region first for the target object, that is, create the target object, be then the mesh Version information is arranged in the primary data for marking object, which can be preset initial version information, such as this is preset The version number that initial version information includes can be 0.
The 8th acquisition submodule 2023 determine the primary data and the corresponding initial version information of the primary data it Afterwards, the second sub-module stored 2032 can store the primary data and initial version letter in the storage region of the target object Breath, i.e., store the primary data according to the initial version information, and establishes the corresponding relationship of the two, first according to this convenient for the device Beginning version information obtains the primary data.
In an optional implementation of the present embodiment, as shown in Figure 2 d, described device further include:
4th obtains module 209, is configured as obtaining and deletes instruction, the target pair is deleted in the deletion instruction instruction As.
Removing module 210 is configured to respond to the deletion instruction, deletes all of the stored target object Data and the corresponding version information of all data.
In the present embodiment, corresponding with all data by deleting all data of the stored target object The target object complete deletion can be avoided the need for the data ability for traversing the entire database repeatedly backed up by version information The case where deleting the target object, process is simple, and the used time is less, improves the operational efficiency of data-storage system.
Exemplary, which is stored with all history numbers of the target object in the storage region for target object distribution According to version information corresponding with each historical data.Instruction, which is got, in the 4th acquisition module 209 deletes deleting for the target object After instruction, removing module 210 can determine the storage region of the target object first, then obtain storage region storage All data and all data in the corresponding version information of each data, then by all data and all numbers The corresponding version information of each data is all deleted in, can so delete all historical datas of the target object.
The disclosure also discloses a kind of electronic equipment, and Fig. 3 shows the knot of the electronic equipment according to one embodiment of the disclosure Structure block diagram, as shown in figure 3, the electronic equipment 1100 includes memory 1101 and processor 1102;Wherein,
The memory 1101 is for storing one or more computer instruction, wherein one or more computer Instruction is executed by the processor 1102 to realize any of the above-described method and step.
Fig. 4 is suitable for being used to realize the structural representation of the computer system of the date storage method according to disclosure embodiment Figure.
As shown in figure 4, computer system 1200 include central processing unit (CPU) 1201, can according to be stored in only It reads the program in memory (ROM) 1202 or is loaded into random access storage device (RAM) 1203 from storage section 1208 Program and execute the various processing in above embodiment.In RAM1203, be also stored with system 1200 operate it is required various Program and data.CPU1201, ROM1202 and RAM1203 are connected with each other by bus 1204.Input/output (I/O) interface 1205 are also connected to bus 1204.
I/O interface 1205 is connected to lower component: the importation 1206 including keyboard, mouse etc.;Including such as cathode The output par, c 1207 of ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section including hard disk etc. 1208;And the communications portion 1209 of the network interface card including LAN card, modem etc..Communications portion 1209 passes through Communication process is executed by the network of such as internet.Driver 1210 is also connected to I/O interface 1205 as needed.It is detachable to be situated between Matter 1211, such as disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 1210, so as to In being mounted into storage section 1208 as needed from the computer program read thereon.
Particularly, according to embodiment of the present disclosure, method as described above may be implemented as computer software programs. For example, embodiment of the present disclosure includes a kind of computer program product comprising be tangibly embodied in and its readable medium on Computer program, the computer program includes program code for executing the date storage method.In such reality It applies in mode, which can be downloaded and installed from network by communications portion 1209, and/or is situated between from detachable Matter 1211 is mounted.
Flow chart and block diagram in attached drawing illustrate system, method and computer according to the various embodiments of the disclosure The architecture, function and operation in the cards of program product.In this regard, each box in course diagram or block diagram can be with A part of a module, section or code is represented, a part of the module, section or code includes one or more Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yiyong The dedicated hardware based system of defined functions or operations is executed to realize, or can be referred to specialized hardware and computer The combination of order is realized.
Being described in unit or module involved in disclosure embodiment can be realized by way of software, can also It is realized in a manner of through hardware.Described unit or module also can be set in the processor, these units or module Title do not constitute the restriction to the unit or module itself under certain conditions.
As on the other hand, the disclosure additionally provides a kind of computer readable storage medium, the computer-readable storage medium Matter can be computer readable storage medium included in device described in above embodiment;It is also possible to individualism, Without the computer readable storage medium in supplying equipment.Computer-readable recording medium storage has one or more than one journey Sequence, described program is used to execute by one or more than one processor is described in disclosed method.
Above description is only the preferred embodiment of the disclosure and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the disclosure, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed in the disclosure Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (10)

1. a kind of date storage method characterized by comprising
User operation instruction is obtained, the user operation instruction instruction carries out data processing to target object;
In response to the user operation instruction, target object version information corresponding with the target object is updated is handled;
The data of the target object of the storage after the data processing and corresponding version information.
2. the method according to claim 1, wherein
The acquisition user operation instruction includes:
Modification instruction is obtained, the current data of the target object is revised as target data by the modification instruction instruction;
It is described in response to the user operation instruction, handle target object version letter corresponding with the target object is updated Breath includes:
It is instructed in response to the modification, from least one data and at least one described data of the stored target object The corresponding version information of current data of the target object is obtained in corresponding version information, and is obtained to the current data Target data after carrying out the data processing;
It is corresponding according to target data described in the corresponding version information of the current data and preset edition upgrading Rule Version information;
The data of the target object of the storage after the data processing and corresponding version information include:
Store the target data and the corresponding version information of the target data.
3. method according to claim 1 or 2, which is characterized in that
The acquisition user operation instruction includes:
Newly-built instruction is obtained, the newly-built instruction includes needing the primary data of the newly-built target object;
It is described in response to the user operation instruction, handle target object version letter corresponding with the target object is updated Breath includes:
In response to the newly-built instruction, creates the target object and set the target pair for preset initial version information The corresponding version information of the primary data of elephant;
The data of the target object of the storage after the data processing and corresponding version information include:
Store the primary data and the corresponding version information of the primary data of the target object.
4. method according to claim 1 or 2, which is characterized in that the method also includes:
It obtains and deletes instruction, the target object is deleted in the deletion instruction instruction;
It is instructed in response to the deletion, all data and all data for deleting the stored target object are corresponding Version information.
5. a kind of data storage device characterized by comprising
First obtains module, is configured as obtaining user operation instruction, the user operation instruction instruction carries out target object Data processing;
Processing module is configured to respond to the user operation instruction, handles the target object and updates the target pair As corresponding version information;
Memory module is configured as storing the data and corresponding version letter of the target object after the data processing Breath.
6. device according to claim 5, which is characterized in that
Described first, which obtains module, includes:
First acquisition submodule is configured as obtaining modification instruction, and the modification instruction is indicated the current of the target object Data modification is target data;
The processing module includes:
Second acquisition submodule is configured to respond to the modification instruction, from least the one of the stored target object The corresponding version of current data of the target object is obtained in a data and the corresponding version information of at least one described data Information, and obtain and carry out the target data after the data processing to the current data;
Third acquisition submodule is configured as according to the corresponding version information of the current data and preset edition upgrading rule Obtain the corresponding version information of the target data;
The memory module includes:
First sub-module stored is configured as storing the target data and the corresponding version information of the target data.
7. device according to claim 5 or 6, which is characterized in that
Described first, which obtains module, includes:
7th acquisition submodule is configured as obtaining newly-built instruction, and the newly-built instruction includes needing the newly-built target pair The primary data of elephant;
The processing module includes:
8th acquisition submodule is configured to respond to the newly-built instruction, creates the target object and will be preset initial Version information is set as the corresponding version information of primary data of the target object;
The memory module includes:
Second sub-module stored is configured as storing the primary data of the target object and the corresponding version of the primary data Information.
8. device according to claim 5 or 6, which is characterized in that described device further include:
4th obtains module, is configured as obtaining and deletes instruction, the target object is deleted in the deletion instruction instruction;
Removing module is configured to respond to deletion instruction, delete the stored target object all data and The corresponding version information of all data.
9. a kind of electronic equipment, which is characterized in that including memory and processor;Wherein,
The memory is for storing one or more computer instruction, wherein one or more computer instruction is by institute Processor is stated to execute to realize the described in any item method and steps of claim 1-4.
10. a kind of computer readable storage medium, is stored thereon with computer instruction, which is characterized in that the computer instruction quilt Claim 1-4 described in any item method and steps are realized when processor executes.
CN201910407598.9A 2019-05-16 2019-05-16 Date storage method, device, electronic equipment and computer readable storage medium Pending CN110134670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910407598.9A CN110134670A (en) 2019-05-16 2019-05-16 Date storage method, device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910407598.9A CN110134670A (en) 2019-05-16 2019-05-16 Date storage method, device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110134670A true CN110134670A (en) 2019-08-16

Family

ID=67574537

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910407598.9A Pending CN110134670A (en) 2019-05-16 2019-05-16 Date storage method, device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110134670A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309707A (en) * 2020-01-23 2020-06-19 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085603A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of data processing method and device
CN107832470A (en) * 2017-11-29 2018-03-23 郑州云海信息技术有限公司 A kind of object storage method and device based on storage system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107085603A (en) * 2017-03-31 2017-08-22 北京奇艺世纪科技有限公司 A kind of data processing method and device
CN107832470A (en) * 2017-11-29 2018-03-23 郑州云海信息技术有限公司 A kind of object storage method and device based on storage system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309707A (en) * 2020-01-23 2020-06-19 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111309707B (en) * 2020-01-23 2022-04-29 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
US7577661B2 (en) Extensible and automatically replicating server farm configuration management infrastructure
US20180157737A1 (en) Systems and methods for distributing indexer configurations
CN109933592A (en) Date storage method, data rewind method, equipment and storage medium
CN109413127A (en) A kind of method of data synchronization and device
CN109582329A (en) Data management and method for subscribing, device, system, electronic equipment and storage medium
CN109213604A (en) A kind of management method and device of data source
CN110287264A (en) Batch data update method, device and the system of distributed data base
CN106202438A (en) The method and system of storage associated data
CN109522332A (en) Customer profile data merging method, device, equipment and readable storage medium storing program for executing
CN109359139A (en) Method of data synchronization, system, electronic equipment and computer readable storage medium
CN108255989A (en) Picture storage method, device, terminal device and computer storage media
CN109271367A (en) Distributed file system multinode snapshot rollback method and system
US20120011172A1 (en) Information management apparatus and computer product
CN107844488A (en) Data query method and apparatus
CN113076186B (en) Task processing method, device, electronic equipment and storage medium
CN110134670A (en) Date storage method, device, electronic equipment and computer readable storage medium
CN110119386A (en) Data processing method, data processing equipment, medium and calculating equipment
CN104750869A (en) File management method and device
JP4772368B2 (en) Business process exception processing generation support apparatus and program
JP2022140752A (en) Management device, management method and program
JP5887236B2 (en) Business document processing apparatus, business document processing method, and business document processing program
US6625614B1 (en) Implementation for efficient access of extended attribute data
US20140067445A1 (en) Storage medium storing analysis program, analysis method and analysis apparatus
JP2001350660A (en) Program execution management device and computer- readable storage media with program recorded thereon
JP6193491B2 (en) Computer system

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190816