CN108733744A - Data storage, read method and device - Google Patents

Data storage, read method and device Download PDF

Info

Publication number
CN108733744A
CN108733744A CN201810281901.0A CN201810281901A CN108733744A CN 108733744 A CN108733744 A CN 108733744A CN 201810281901 A CN201810281901 A CN 201810281901A CN 108733744 A CN108733744 A CN 108733744A
Authority
CN
China
Prior art keywords
data
tables
version number
stored
storage
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
CN201810281901.0A
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.)
Orient Vision Technology (beijing) Co Ltd
Original Assignee
Orient Vision Technology (beijing) 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 Orient Vision Technology (beijing) Co Ltd filed Critical Orient Vision Technology (beijing) Co Ltd
Priority to CN201810281901.0A priority Critical patent/CN108733744A/en
Publication of CN108733744A publication Critical patent/CN108733744A/en
Pending legal-status Critical Current

Links

Abstract

This application discloses a kind of storage of data, read method and devices.Wherein, this method includes:The version number for obtaining stored data in tables of data establishes tables of data;By in tables of data data and version number carry out serializing processing, obtain target data;And target data is stored into tables of data.Present application addresses the higher technical problems of the maintenance cost of tables of data in the related technology.

Description

Data storage, read method and device
Technical field
This application involves field of data storage, in particular to a kind of storage of data, read method and device.
Background technology
As the development of Internet technology, the continuous renewal of hardware, social informatization deepen continuously, data have welcome quick-fried The growth of hairdo, the complexity of application require it is higher and higher, push data storage technology towards mass data, analysis data, The direction of intelligent data is developed, to provide efficient real-time technical support for data warehouse, on-line analysis.It is more popular at present Big data storage database has:Row storage and row storage.
Based on row memory technology and row memory technology, when storing database data, need to be arranged according to service logic different Field (row storage mode:Row, row storage mode:Row).When service logic changes, data in delta data library are needed The structure of table, for example increased, delete operation, change the data format of database, update the data content etc..Change once in a while then Ignore its cost, often change service logic, then database maintenance cost is high.
For above-mentioned problem, currently no effective solution has been proposed.
Invention content
The embodiment of the present application provides a kind of storage of data, read method and device, at least to solve to count in the related technology According to the higher technical problem of the maintenance cost of table.
According to the one side of the embodiment of the present application, a kind of date storage method is provided, including:Obtain institute in tables of data The version number of storage data establishes tables of data;;By in tables of data data and version number carry out serializing processing, obtain number of targets According to;And target data is stored and stores target data into tables of data.
Optionally, it obtains in tables of data before the version number of stored data, method further includes:Number in detection data table Whether change according to logical relation;When changing, triggering generates version number corresponding with the tables of data after variation.
Optionally, mathematical logic relationship includes:Incidence relation in tables of data between data.
Optionally, target data includes at least following field:Valid data in version number, tables of data.
Optionally, target data is stored, including:Obtain the data type of stored data in target data;It determines and counts According to the corresponding list item of type, which is the list item in tables of data;According to saving as each data type in being distributed for list item Data distribute storage resource;Target data is stored using the storage resource of distribution.
Optionally, target data is stored, including:Obtain the data type of stored data in target data;According to default The data to put in order indicated by storage data type.
According to the another aspect of the embodiment of the present application, a kind of date storage method is provided, including:Obtain data to be stored Version number;Data to be stored and version number are subjected to serializing processing, obtain target data;And by target data store to In tables of data.
According to the another aspect of the embodiment of the present application, a kind of method for reading data is provided, including:It reads in tables of data Partial data, wherein tables of data carries out the serialized data obtained after serializing processing for storing to data to be stored;From portion The version number of tables of data is extracted in divided data;Reading rule corresponding with version number is determined according to version number;It is regular according to reading Read the remaining data in tables of data, wherein the remaining data is the data in addition to partial data in tables of data.
Optionally, the partial data in tables of data is read, including:Read the specified data in serialized data, wherein should Specified data are the data of preceding n byte in serialized data, and n is the integer not less than 1.
According to the another aspect of the embodiment of the present application, a kind of storage medium is provided, storage medium includes the journey of storage Sequence, wherein equipment where controlling storage medium when program is run executes above-described method for reading data or data storage Method.
According to the another aspect of the embodiment of the present application, a kind of processor is provided, processor is used to run program, In, program executes above-described method for reading data or date storage method when running.
According to the another aspect of the embodiment of the present application, a kind of data storage device is provided, including:Acquisition module is used In the version number for obtaining stored data in tables of data;Processing module is obtained for data and version number to be carried out serializing processing To target data;And storage target data.
According to the another aspect of the embodiment of the present application, a kind of digital independent device is provided, including:First reads mould Block, for reading the partial data in tables of data, wherein after tables of data carries out serializing processing for storage to data to be stored Obtained serialized data;Extraction module, the version number for extracting tables of data from partial data;Determining module, with according to Version number determines reading rule corresponding with version number;Second read module, for being read in tables of data according to reading rule Remaining data, wherein the remaining data is the data in addition to partial data in tables of data.
When in the embodiment of the present application, using data are stored in tables of data, by the number of the version number of tables of data and storage According to storing the mode into tables of data after carrying out serializing processing, when the service logic in tables of data changes, it is not necessary to change The structure for becoming tables of data, to reduce the maintenance cost of tables of data, the data to realize tables of data store expansible The technique effect of property and flexibility, and then the higher technical problem of maintenance cost for solving tables of data in the related technology.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please do not constitute the improper restriction to the application for explaining the application.In the accompanying drawings:
Fig. 1 is the structural schematic diagram according to a kind of terminal of the embodiment of the present application;
Fig. 2 is the flow diagram according to a kind of date storage method of the embodiment of the present application;
Fig. 3 is the form schematic diagram according to a kind of optional target data of the embodiment of the present application;
Fig. 4 is the structure diagram according to a kind of data storage device of the embodiment of the present application;
Fig. 5 is the flow diagram according to another date storage method of the embodiment of the present application;
Fig. 6 is the flow diagram according to a kind of method for reading data of the embodiment of the present application;
Fig. 7 is the structure diagram according to a kind of digital independent device of the embodiment of the present application.
Specific implementation mode
In order to make those skilled in the art more fully understand application scheme, below in conjunction in the embodiment of the present application Attached drawing, technical solutions in the embodiments of the present application are clearly and completely described, it is clear that described embodiment is only The embodiment of the application part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people The every other embodiment that member is obtained without making creative work should all belong to the model of the application protection It encloses.
It should be noted that term " first " in the description and claims of this application and above-mentioned attached drawing, " Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.It should be appreciated that using in this way Data can be interchanged in the appropriate case, so as to embodiments herein described herein can in addition to illustrating herein or Sequence other than those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover It includes to be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment to cover non-exclusive Those of clearly list step or unit, but may include not listing clearly or for these processes, method, product Or the other steps or unit that equipment is intrinsic.
The embodiment of the present application for ease of understanding is as follows to explanation of technical terms involved in the embodiment of the present application below:
Row storage, data are stored according to behavior unit, and inquire data, the structure of data by index technology Property it is strong, it is convenient, small data quantity to the realization of the strong consistency of the changes of data operation (as deleted, modification, update), data to look into Advantage protrudes in terms of inquiry;
Row storage, data is stored according to unit is classified as, and pass through the relationship between the different train value of chained representation. Its technical characterstic is that complex data search efficiency is high, reading disk is few, and memory space is few, saves a large amount of broadbands I/O.
Tables of data:It is one of most important component part of database.Database is a frame, and tables of data is in essence Hold.As data include to surround 6 tables of data of specific subject in " Education Administration Information System ":" teacher " table, " course " table, " student " Table etc., but not limited to this.It can be made of three parts of record of field and table in table name, table.
It serializes (Serial izat ion):The status information of object is converted to can be in the form of storage or transmission Process.During serializing, its current state is written to interim or persistent storage area by object.After, it can be by from depositing The state of reading or unserializing object in storage area, re-creates the object.
Although in the related technology there are row memory technology and row memory technology, it is stored using both technologies When, when service logic changes, the structure needs of tables of data change in database, can increase maintenance cost.For The above problem, the embodiment of the present application provide corresponding solution, described further below.
It should be noted that a part of the tables of data as database in the embodiment of the present application, it can be according to data The difference in library stores different contents.Wherein, for above-mentioned database, tables of data therein can completely or partially use this Scheme in application embodiment stores data or reads data from database.
Embodiment 1
According to embodiments of the present invention, a kind of embodiment of the method for data storage is additionally provided, it should be noted that in attached drawing Flow the step of illustrating can be executed in the computer system of such as a group of computer-executable instructions, although also, Logical order is shown in flow charts, but in some cases, can with different from sequence herein execute it is shown or The step of description.
The embodiment of the method that the embodiment of the present application 1 is provided can be in mobile terminal, terminal or similar fortune It calculates and is executed in device.Fig. 1 shows a kind of hardware of the terminal (or mobile device) for realizing date storage method Structure diagram.As shown in Figure 1, terminal 10, which may include one or more, (uses 102a, 102b ... ..., 102n in figure To show) (processor 102 can include but is not limited to Micro-processor MCV or programmable logic device FPGA etc. to processor 102 Processing unit), memory 104 for storing data and the transmitting device 106 for communication function.In addition to this, may be used also To include:Display, input/output interface (I/O interfaces), the port universal serial bus (USB) (can be as I/O interfaces A port in port by including), network interface, power supply and/or camera.It will appreciated by the skilled person that Fig. 1 Shown in structure be only illustrate, the structure of above-mentioned electronic device is not caused to limit.For example, terminal 10 can also wrap Include than shown in Fig. 1 more either less components or with the configuration different from shown in Fig. 1.
It is to be noted that said one or multiple processors 102 and/or other data processing circuits lead to herein Can often it be referred to as " data processing circuit ".The data processing circuit all or part of can be presented as software, hardware, firmware Or any other combination.In addition, data processing circuit can be single independent processing module or all or part of be attached to meter In any one in other elements in calculation machine terminal 10 (or mobile device).As involved in the embodiment of the present application, The data processing circuit controls (such as the selection for the variable resistance end path being connect with interface) as a kind of processor.
Memory 104 can be used for storing the software program and module of application software, such as the data in the embodiment of the present invention Corresponding program instruction/the data storage device of storage method, processor 102 are stored in the software in memory 104 by operation Program and module realize the Hole Detection of above-mentioned application program to perform various functions application and data processing Method.Memory 104 may include high speed random access memory, may also include nonvolatile memory, such as one or more magnetism Storage device, flash memory or other non-volatile solid state memories.In some instances, memory 104 can further comprise phase For the remotely located memory of processor 102, these remote memories can pass through network connection to terminal 10.On The example for stating network includes but not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Transmitting device 106 is used to receive via a network or transmission data.Above-mentioned network specific example may include The wireless network that the communication providers of terminal 10 provide.In an example, transmitting device 106 includes that a network is suitable Orchestration (Network Interface Control ler, NIC), can be connected with other network equipments by base station so as to It is communicated with internet.In an example, transmitting device 106 can be radio frequency (Radio Frequency, RF) module, It is used to wirelessly be communicated with internet.
Display can such as touch-screen type liquid crystal display (LCD), which may make that user can be with The user interface of terminal 10 interacts.
Date storage method provided in this embodiment can be run in framework shown in Fig. 1.Fig. 2 is implemented according to the application The flow diagram of a kind of date storage method of example, as shown in Fig. 2, this method comprises the following steps:
Step S202, establishes tables of data;
Tables of data can store different contents according to practical application scene, for example, in the database of enterprise personnel department In (occurrences in human life database), following list item can include but is not limited to:Worker number, name, age, gender, wage etc..
It should be noted that step S202 is an optional step, i.e., it, can not when executing date storage method Tables of data must be re-established every time, can be pre-established tables of data, then be executed subsequent step.
Step S204 obtains the version number of the stored data of above-mentioned tables of data;
Wherein, it there are many realization methods of the acquisition process, such as the local of equipment can be generated where tables of data, It can be obtained from third party device, which can be network side equipment or have with the terminal for establishing database There is the equipment of correspondence, but not limited to this.Wherein, it for the latter, when being obtained by network side equipment, can show as: Network side equipment is that above-mentioned data distribute version number, and the version number of distribution is sent to terminal.
In one alternate embodiment, above-mentioned version number can show as following form, but not limited to this:Number or Character string.
Wherein, it for the acquisition process of above-mentioned version number, can also realize in the following ways:Such as it can be according to waiting depositing Enter the data in tables of data according to certain regular build version number, for example, can be according to the class for indicating data to be stored The mark of type generates;The MD5 values that the partial data or total data in tables of data can also be calculated, using the MD5 values as version Number;Can also be according to the correspondence of above-mentioned MD5 values and number, after determining MD5 values, it will be with MD5 values pair according to correspondence The number answered is as version number.
It should be noted that the step of step S204 and step S202, can be interchanged, you can first to determine version number, Tables of data is resettled, and establishes the mapping relations of version number and data.In addition, the step of step S202 is an optional step, When carrying out data storage, tables of data can be generated in advance, without establishing a data when carrying out data storage every time Table.
Step S206, by above-mentioned tables of data data and version number carry out serializing processing, obtain target data, and deposit Store up target data.
Optionally, the meaning of serializing processing can show as serializing data using a kind of serializing rule Processing;It can also show as that two or more serializing rules is used to carry out serializing processing to data simultaneously, such as:Using A kind of serializing is regular to serialize partial data, while being serialized to remaining data using the second serializing rule Processing, in another example:Public attribute and field are handled using XML serialization rule, it is right using Binary Serialization rule Remaining data carries out serializing processing.
In one alternate embodiment, above-mentioned target data can be stored into established tables of data, can also be deposited In other tables of data of Stored Value or database, flexibly determined with specific reference to actual conditions.
Before step S204, that is, before the version number for obtaining above-mentioned tables of data, following processing procedure can also be performed:Inspection Whether the mathematical logic relationship surveyed in above-mentioned tables of data changes;When changing, triggering generates and the data after variation The corresponding version number of table.From the process it can also be seen that when mathematical logic relationship changes, it may not be necessary to change data table Structure, and be only to carry out serializing processing according to version number and data, to obtain target data, and store target data i.e. It can.For example, when increasing or update the data in tables of data, determine that above-mentioned logical relation changes.
Optionally, above-mentioned mathematical logic relationship includes:Incidence relation in above-mentioned tables of data between data.For example, in number It is rear to need to store gender this list item again according to having included two class list item of name and age in table, and gender and name and year Age all has certain correspondence, which is above-mentioned incidence relation.
Optionally, as shown in figure 3, above-mentioned target data includes at least following field:In above-mentioned version number, above-mentioned tables of data Valid data.I.e. above-mentioned target data includes two category informations.Wherein, byte occupied by the version number in above-mentioned target data It can be the top n byte come in whole bytes shared by target data.In this way, being leaned on since the version number in target data is located at Therefore preceding position when being parsed to target data, can first obtain its version number, it is corresponding to be then based on version number Rule carries out unserializing processing to target data.
Wherein, above-mentioned valid data are the data for having actual content, it is understood that be stored to data by data Data (not including version number) before table, such as:The information such as the name, the age that are stored in tables of data belong to valid data, and Version number then belongs to non-effective data.
As the alternative embodiment of the application, above-mentioned target data can be stored in the following manner, but be not limited to This:Obtain the data type of stored data in above-mentioned target data;Determine list item corresponding with above-mentioned data type, the list item For the list item in above-mentioned tables of data;Storage is distributed according to the data for saving as each above-mentioned data type in being distributed for above-mentioned list item Resource;Above-mentioned target data is stored using the storage resource of distribution.It can be determined as the memory of its distribution according to data type Or the storage resources such as cache size.
In another optional embodiment of the application, above-mentioned data can also be stored in the following ways:In acquisition State the data type of stored data in target data;According to the default number to put in order indicated by the above-mentioned data type of storage According to.
Above-described embodiment and alternative embodiment for ease of understanding are described in detail below in conjunction with specific example:
Such as:
Step 1:Data structure table is established,
Step 2:According to the logical relation of storage data, the device (journey of implementation sequence and unserializing binary data Sequence logic).
Unserializing device is responsible for converting binary data to the data being appreciated that;Serializing device is responsible for manage Solution data are converted into binary data.
Step 3:Data are stored, versions of data number is formed
When storing data, initiating sequence makeup is set, and the version number of current data is generated according to device rule, will be in tables of data Data and its versions of data number be converted into binary data, and stored according to version number, data table data mode.
Step 4:Inquiry, extraction data.
When needing inquiry, extraction data, starts unserializing device first, convert binary data to and be appreciated that data Versions of data number is extracted, according to versions of data rule parsing, you can data in inquiry, extraction tables of data.
Step 5:Service logic changes:Increase or update the data, needs change sequence and unserializing device, Generate new versions of data number.
When tables of data increases or updates the data, step 4 extraction data are operated first, then increased, updated the data Secondly operation returns again to progress Step 2: three, four successively.
Using the above scheme, when service logic changes, data list structure does not change, only need to be according to the sequence of variation Row makeup is set, and new version number is generated.Only corresponding unserializing need to be selected when inquiry, extraction data according to new version number Device completes inquiry, extraction operation.
In another example:
Have a service logic, need store student's student number, name, according to mathematical logic relationship, implementation sequence and inverted sequence Row makeup is set:Assuming that device A is responsible for binary system switching to the data being appreciated that, referred to as unserializing device.Device B be responsible for by It is appreciated that data switch to binary system, then claims to serialize device.
Data are stored, are set first by initiating sequence makeup, according to the rule of serializing device, generate current data table Version number converts storage data and its version number to binary data, then finally according to version number's (4 byte), student number (4 Byte), name (10 byte) mode stores.Start context is 1 at this time.
Inquiry, extraction data, start designed unserializing device, extract first four byte first and obtain version number. It is the discovery that 1, then with No. 1 rule parsing.Then data will be parsed by unserializing device and is converted into intelligible data.
When service logic changes, and a gender is stored such as in tables of data more, changed according to new mathematical logic relationship New data edition upgrading is 2 according to the device of modification rule by unserializing device and serializing device.If unserializing It is 1 that device, which reads version, and explanation is the data of a upper version, then does not read gender, and set gender to empty or default value.
The said program provided through this embodiment, when the service logic in tables of data changes, it is not necessary to change number According to the structure of table, to reduce the maintenance cost of tables of data, to realize tables of data data storage scalability and The technique effect of flexibility, and then the higher technical problem of maintenance cost for solving tables of data in the related technology.
Embodiment 2
The present embodiment provides a kind of data storage device, which can be used to implement method described in embodiment 1.Fig. 4 It is the structure diagram according to a kind of data storage device of the embodiment of the present application.As shown in figure 4, the device includes:
Acquisition module 40, the version number for obtaining stored data in tables of data;
Processing module 42 is coupled to acquisition module 40, for data and version number to be carried out serializing processing, obtains target Data;And storage target data
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong Following manner is crossed to realize:Acquisition module 40 and processing module 42 are located in same processor;Alternatively, acquisition module 40 and processing Module 42 is located in first processor and second processor.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1, herein not It repeats again.
Embodiment 3
The present embodiment provides another date storage method, Fig. 5 is stored according to another data of the embodiment of the present application The flow diagram of method, as shown in figure 5, this method includes:
Step S502 obtains the version number of data to be stored;There are many realization methods of the acquisition process, such as can be from Third party device obtain, the third party device can be network side equipment or with establish database terminal have communicate The equipment of relationship, but not limited to this.Wherein, it for the latter, when being obtained by network side equipment, can show as:Network side Equipment is that above-mentioned data distribute version number, and the version number of distribution is sent to terminal.
In one alternate embodiment, above-mentioned version number can show as following form, but not limited to this:Number or Character string.
Data to be stored and version number are carried out serializing processing, obtain target data by step S504;
Step S506, target data is stored into tables of data.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1, herein not It repeats again.
Embodiment 4
The embodiment of the present application provides a kind of method for reading data, and Fig. 6 is to be read according to a kind of data of the embodiment of the present application Take the flow diagram of method.As shown in fig. 6, this method includes:
Step S602, read tables of data in partial data, wherein above-mentioned tables of data for store to data to be stored into The serialized data obtained after row serializing processing;
Wherein, the meaning of data to be stored includes but not limited to herein:Data are stored to the original number to before tables of data According to, or data are stored to the data existing for tables of data after tables of data.
Step S604, the from the section above version number of the above-mentioned tables of data of extracting data;
Step S606 determines reading rule corresponding with above-mentioned version number according to above-mentioned version number;
Step S608 reads the remaining data in above-mentioned tables of data according to above-mentioned reading rule, wherein the remaining data is Data in above-mentioned tables of data in addition to above-mentioned partial data.
It is alternatively possible to the partial data in tables of data is read in the following manner, but not limited to this:Read above-mentioned sequence Change the specified data in data, wherein the specified data are the data of preceding n byte in above-mentioned serialized data, n for not less than 1 integer.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1, herein not It repeats again.
Embodiment 5
The embodiment of the present application provides a kind of digital independent device, and Fig. 7 is to be read according to a kind of data of the embodiment of the present application Take the structure diagram of device.As shown in fig. 7, the device includes:
First read module 70, for reading the partial data in tables of data, wherein above-mentioned tables of data is treated for storing Storage data carry out the serialized data obtained after serializing processing;
Extraction module 72, the version number for the above-mentioned tables of data of extracting data from the section above;
Determining module 74 determines reading rule corresponding with above-mentioned version number with according to above-mentioned version number;
Second read module 76, for reading the remaining data in above-mentioned tables of data according to above-mentioned reading rule, wherein should Remaining data is the data in addition to above-mentioned partial data in above-mentioned tables of data.
It should be noted that above-mentioned modules can be realized by software or hardware, for the latter, Ke Yitong Following manner is crossed to realize:Above-mentioned modules are located in same processor;Alternatively, the side of above-mentioned modules in any combination Formula is located in different processors.
It should be noted that the preferred embodiment of the present embodiment may refer to the associated description in embodiment 1, herein not It repeats again.
Embodiment 6
The embodiment of the present application provides a kind of storage medium, and storage medium includes the program of storage, wherein is run in program When control storage medium where equipment execute embodiment 1,3,4 described in method for reading data or date storage method.
Embodiment 7
The embodiment of the present application provides a kind of processor, and processor is for running program, wherein program executes when running
Method for reading data or date storage method described in embodiment 1,3,4.
Above-mentioned the embodiment of the present application serial number is for illustration only, can not represent the quality of embodiment.
In above-described embodiment of the application, all emphasizes particularly on different fields to the description of each embodiment, do not have in some embodiment The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents can pass through others Mode is realized.Wherein, the apparatus embodiments described above are merely exemplary, for example, the unit division, Ke Yiwei A kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module It connects, can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple On unit.Some or all of unit therein can be selected according to the actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can be stored in a computer read/write memory medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or network equipment etc.) execute each embodiment the method for the application whole or Part steps.And storage medium above-mentioned includes:USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic disc or CD etc. are various can to store program code Medium.
The above is only the preferred embodiment of the application, it is noted that for the ordinary skill people of the art For member, under the premise of not departing from the application principle, several improvements and modifications can also be made, these improvements and modifications are also answered It is considered as the protection domain of the application.

Claims (11)

1. a kind of date storage method, which is characterized in that including:
Obtain the version number of stored data in tables of data;
By in the tables of data data and version number carry out serializing processing, obtain target data;And
Store the target data.
2. according to the method described in claim 1, it is characterized in that, obtain stored data in the tables of data version number it Before, the method further includes:
Whether the mathematical logic relationship detected in the tables of data changes;
When changing, triggering generates version number corresponding with the tables of data after variation.
3. according to the method described in claim 2, it is characterized in that, the mathematical logic relationship includes:
Incidence relation in the tables of data between data.
4. according to the method described in claim 1, it is characterized in that, the target data includes at least following field:
Valid data in the version number, the tables of data.
5. method as claimed in any of claims 1 to 4, which is characterized in that the target data is stored, including:
Obtain the data type of stored data in the target data;
Determine that list item corresponding with the data type, the list item are the list item in the tables of data;
Storage resource is distributed according to the data for saving as each data type in being distributed for the list item;
The target data is stored using the storage resource of distribution.
6. method as claimed in any of claims 1 to 4, which is characterized in that the target data is stored, including:
Obtain the data type of stored data in the target data;
According to the default data to put in order indicated by the storage data type.
7. a kind of date storage method, which is characterized in that including:
Obtain the version number of data to be stored;
The data to be stored and version number are subjected to serializing processing, obtain target data;And
The target data is stored into tables of data.
8. a kind of method for reading data, which is characterized in that including:
Read the partial data in tables of data, wherein the tables of data carries out serializing processing for storing to data to be stored The serialized data obtained afterwards;
The version number of the tables of data is extracted from the partial data;
Reading rule corresponding with the version number is determined according to the version number;
According to the remaining data read in the rule reading tables of data, wherein the remaining data is in the tables of data Data in addition to the partial data.
9. according to the method described in claim 8, it is characterized in that, read tables of data in partial data, including:
Read the specified data in the serialized data, wherein the specified data are preceding n byte in the serialized data Data, n is integer not less than 1.
10. a kind of data storage device, which is characterized in that including:
Acquisition module, the version number for obtaining stored data in tables of data;
Processing module obtains target data for the data and version number to be carried out serializing processing;And the storage mesh Mark data.
11. a kind of digital independent device, which is characterized in that including:
First read module, for reading the partial data in tables of data, wherein the tables of data is for storing to number to be stored According to the serialized data obtained after serializing processing;
Extraction module, the version number for extracting the tables of data from the partial data;
Determining module determines reading rule corresponding with the version number with according to the version number;
Second read module, for according to the remaining data read in the rule reading tables of data, wherein the remainder According to for the data in the tables of data in addition to the partial data.
CN201810281901.0A 2018-04-02 2018-04-02 Data storage, read method and device Pending CN108733744A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810281901.0A CN108733744A (en) 2018-04-02 2018-04-02 Data storage, read method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810281901.0A CN108733744A (en) 2018-04-02 2018-04-02 Data storage, read method and device

Publications (1)

Publication Number Publication Date
CN108733744A true CN108733744A (en) 2018-11-02

Family

ID=63941090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810281901.0A Pending CN108733744A (en) 2018-04-02 2018-04-02 Data storage, read method and device

Country Status (1)

Country Link
CN (1) CN108733744A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344585A (en) * 2022-08-03 2022-11-15 盐城金堤科技有限公司 Data version management method and device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477532A (en) * 2008-12-23 2009-07-08 北京畅游天下网络技术有限公司 Method, apparatus and system for implementing data storage and access
CN106372002A (en) * 2016-08-31 2017-02-01 成都科来软件有限公司 Data storage method and data reading and restoring method
WO2017059798A1 (en) * 2015-10-10 2017-04-13 阿里巴巴集团控股有限公司 Methods, apparatus, and system for serialization and deserialization, and electronic devices

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101477532A (en) * 2008-12-23 2009-07-08 北京畅游天下网络技术有限公司 Method, apparatus and system for implementing data storage and access
WO2017059798A1 (en) * 2015-10-10 2017-04-13 阿里巴巴集团控股有限公司 Methods, apparatus, and system for serialization and deserialization, and electronic devices
CN106372002A (en) * 2016-08-31 2017-02-01 成都科来软件有限公司 Data storage method and data reading and restoring method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115344585A (en) * 2022-08-03 2022-11-15 盐城金堤科技有限公司 Data version management method and device, storage medium and electronic equipment
CN115344585B (en) * 2022-08-03 2024-03-19 盐城天眼察微科技有限公司 Data version management method and device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN105940410B (en) For removing the cleaner of personal recognizable information
CN104966214A (en) Electronic ticket interaction method and device
CN105653425A (en) Complicated event processing engine based monitoring system
CN110110543A (en) Data processing method, device, server and storage medium
CN103246748B (en) Automatically manage the technology of filec descriptor
CN109344126B (en) Method and device for processing map, storage medium and electronic device
CN108520471A (en) It is overlapped community discovery method, device, equipment and storage medium
CN112114849B (en) Resource updating method and device
CN105847336A (en) Address book synchronization method and device
CN109376873A (en) O&M method, apparatus, electronic equipment and computer readable storage medium
CN111200517B (en) Service data early warning control method, device, equipment and storage medium
CN114218291A (en) Portrait generation method, apparatus, device and storage medium based on target object
CN108733744A (en) Data storage, read method and device
CN111753019A (en) Data partitioning method and device applied to data warehouse
CN112044061A (en) Game picture processing method and device, electronic equipment and storage medium
CN108038171A (en) Method for writing data, device and data server
CN107800816A (en) A kind of IP address database method for building up and terminal device
CN113971455A (en) Distributed model training method and device, storage medium and computer equipment
CN109213955B (en) Data processing method and related equipment
CN112860653A (en) Government affair information resource catalog management method and system
CN110532267A (en) Determination method, apparatus, storage medium and the electronic device of field
CN109522349A (en) Across categorical data calculating and sharing method, system, equipment
CN115718879A (en) Data governance method, device and storage medium
CN115168609A (en) Text matching method and device, computer equipment and storage medium
CN107609119A (en) Document handling method, mobile terminal and computer-readable recording 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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20181102