CN105404472A - Method and apparatus for compressing storage space of log time data - Google Patents

Method and apparatus for compressing storage space of log time data Download PDF

Info

Publication number
CN105404472A
CN105404472A CN201510819201.9A CN201510819201A CN105404472A CN 105404472 A CN105404472 A CN 105404472A CN 201510819201 A CN201510819201 A CN 201510819201A CN 105404472 A CN105404472 A CN 105404472A
Authority
CN
China
Prior art keywords
data
storage space
binary
annual
length
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
CN201510819201.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.)
TVMining Beijing Media Technology Co Ltd
Original Assignee
TVMining Beijing Media Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TVMining Beijing Media Technology Co Ltd filed Critical TVMining Beijing Media Technology Co Ltd
Priority to CN201510819201.9A priority Critical patent/CN105404472A/en
Publication of CN105404472A publication Critical patent/CN105404472A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0608Saving storage space on storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0661Format or protocol conversion arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention discloses a method and an apparatus for compressing a storage space of log time data. The method for compressing the storage space of the log time data comprises: acquiring the log time data; reading the log time data in a preset manner to respectively obtain any one piece or a plurality of pieces of year data, month data, day data, hour data, minute data and second data in the log time data; respectively processing the year data, the month data, the day data, the hour data, the minute data and the second data in the log time data in a binary system manner; and storing the log time data processed in the binary system manner by using a storage space with a preset length. According to the method and the apparatus for compressing the storage space of the log time data, the storage space which needs to be occupied for storing the log time data can be saved.

Description

A kind of method and device compressing the storage space of logging time data
Technical field
The present invention relates to field of data storage, particularly a kind of method and device compressing the storage space of logging time data.
Background technology
Along with widely using of network application and computing machine, the field that electronic diary uses and frequency are also improving constantly.Use electronic diary just will inevitably produce logging time data, for the storage of the logging time data of magnanimity, use character string mode in the past to store or use traditional numerical approach to store, the logging time data of magnanimity can occupy huge storage space, therefore need a kind of less method of storage space that takies to carry out storing daily record time data.
Summary of the invention
The invention provides a kind of method and the device that compress the storage space of logging time data, in order to compress logging time data, to reach the object of saving storage space.
According to the first aspect of the embodiment of the present invention, a kind of method compressing the storage space of logging time data is provided, comprises:
Obtain logging time data;
Read logging time data in the mode preset, obtain respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons;
Process in a binary fashion respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds certificate;
The storage space of preset length is used to store the logging time data processed in a binary fashion.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: use storage format of the present invention to carry out storing daily record time data, process logging time data in a binary fashion, re-use default storage mode to store, the storage space taken needed for storing daily record time data can be saved.
In one embodiment, when the form of the logging time data got is the data of character string type, the data of character string type are converted to the data of value type;
When the form of the logging time data got is the data of value type, with the year, month, day preset, hour, minute and second arrangement mode, read respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: overcome the defect that string characters is not easy to carry out calculating, also solve different year, month, day, hour, minute and second record custom problem.
In one embodiment, judge respectively the annual data of logging time data, the moon data, day data, hour data, minute data and number of seconds according to whether AFR control;
When there is AFR control, replace AFR control by null value.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: adopt the present embodiment can process the incomplete situation of logging time data.
In one embodiment, calculate the year difference data of annual data and initial annual data, initial annual data is the annual data of generation first logging time data;
Determine that the binary data of annual data is the binary data of year difference data.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: employing the present embodiment can save the storage space to annual data greatly.
In one embodiment, length is used to be that first storage space of six is to store the binary data of number of seconds certificate, length is used to be that second storage space of six is to store the binary data of minute data, length is used to be that the 3rd storage space of five is to store the binary data of hour data, use length to be the binary data that the 4th storage space of five carrys out data storage time, use length to be that the 5th storage space of four is to store the binary data of month data;
Obtain the length of the binary data of annual data;
The length storing the 6th storage space of the binary data of annual data is identical with the length of the binary data of annual data;
Calculate the length sum of the first storage space, the second storage space, the 3rd storage space, the 4th storage space, the 5th storage space and the 6th storage space, length sum is preset length;
In the storage space of preset length little-endian put in order for the binary data of the binary data of number of seconds certificate, minute data, hour data binary data, day data binary data, the moon data binary data and the binary data of annual data.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: with preset put in order storing daily record time data and preset position long come storing daily record time data, storing daily record time data can be carried out with less storage space.
According to the second aspect of the embodiment of the present invention, a kind of device compressing the storage space of logging time data is provided, comprises:
Acquisition module, for obtaining logging time data;
Read module, for reading logging time data in the mode preset, obtain respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons;
Processing module, for process in a binary fashion respectively annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds certificate;
Memory module, for using the storage space of preset length to store the logging time data processed in a binary fashion.
In one embodiment, described read module, comprising:
The data of character string type, for when the form of the logging time data got is the data of character string type, are converted to the data of value type by transform subblock;
Reading submodule, for when the form of the logging time data got is the data of value type, with the year, month, day preset, hour, minute and second arrangement mode, read respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons.
In one embodiment, described reading submodule, also for judge respectively logging time data annual data, the moon data, day data, hour data, minute data and number of seconds according to whether AFR control;
When there is AFR control, replace AFR control by null value.
In one embodiment, described processing module, comprising:
First calculating sub module, for calculating the year difference data of annual data and initial annual data, initial annual data is the annual data of generation first logging time data;
Determine submodule, for determining that the binary data of annual data is the binary data of year difference data.
In one embodiment, described memory module, comprising:
Position eldest son's module, be that first storage space of six is to store the binary data of number of seconds certificate for using length, length is used to be that second storage space of six is to store the binary data of minute data, length is used to be that the 3rd storage space of five is to store the binary data of hour data, use length to be the binary data that the 4th storage space of five carrys out data storage time, use length to be that the 5th storage space of four is to store the binary data of month data;
Obtain submodule, for obtaining the length of the binary data of annual data;
Sub module stored, the length for the 6th storage space storing the binary data of annual data is identical with the length of the binary data of annual data;
Second calculating sub module, for calculating the length sum of the first storage space, the second storage space, the 3rd storage space, the 4th storage space, the 5th storage space and the 6th storage space, length sum is preset length;
Arrangement submodule, for little-endian in the storage space of preset length put in order for the binary data of the binary data of number of seconds certificate, minute data, hour data binary data, day data binary data, the moon data binary data and the binary data of annual data.
Other features and advantages of the present invention will be set forth in the following description, and, partly become apparent from instructions, or understand by implementing the present invention.Object of the present invention and other advantages realize by structure specifically noted in write instructions, claims and accompanying drawing and obtain.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
Accompanying drawing explanation
Accompanying drawing is used to provide a further understanding of the present invention, and forms a part for instructions, together with embodiments of the present invention for explaining the present invention, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 is a kind of process flow diagram compressing the method for the storage space of logging time data shown in the present invention one exemplary embodiment;
Fig. 2 is a kind of process flow diagram compressing the step S12 of the method for the storage space of logging time data shown in the present invention one exemplary embodiment;
Fig. 3 is a kind of process flow diagram compressing the step S22 of the method for the storage space of logging time data shown in the present invention one exemplary embodiment;
Fig. 4 is that a kind of shown in the present invention one exemplary embodiment compresses the process flow diagram processing annual data in the step S13 of the method for the storage space of logging time data;
Fig. 5 is a kind of process flow diagram compressing the step S14 of the method for the storage space of logging time data shown in the present invention one exemplary embodiment;
Fig. 6 is a kind of block diagram compressing the device of the storage space of logging time data shown in the present invention one exemplary embodiment;
Fig. 7 is a kind of block diagram compressing the read module 62 of the device of the storage space of logging time data shown in the present invention one exemplary embodiment;
Fig. 8 is a kind of block diagram compressing the processing module 63 of the device of the storage space of logging time data shown in the present invention one exemplary embodiment;
Fig. 9 is a kind of block diagram compressing the memory module 64 of the device of the storage space of logging time data shown in the present invention one exemplary embodiment.
Figure 10 is a kind of schematic diagram compressing the storage space figure place of logging time data shown in the present invention one exemplary embodiment.
Embodiment
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described, should be appreciated that preferred embodiment described herein is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Fig. 1 is a kind of method flow diagram compressing the storage space of logging time data according to an exemplary embodiment, and as shown in Figure 1, the method for the storage space of these compression logging time data, comprises the following steps S11-S14:
In step s 11, logging time data are obtained;
In step s 12, read logging time data in the mode preset, obtain respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons;
In step s 13, process in a binary fashion respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds certificate;
In step S14, the storage space of preset length is used to store the logging time data processed in a binary fashion.
In one embodiment, under many circumstances, need to record some electronic diary documents, electronic diary document can when generation, the deadline of automatic generation electronic diary document, the above-mentioned deadline comprise year, month, day, hour, minute and second any one or many persons of concrete data.
Logging time data normally by annual data, the moon data, day data, hour data, minute data and number of seconds according to what form, the concrete numerical value of these data is all generally record in metric mode.Above-mentioned concrete numerical value is converted to corresponding binary numerical value.If annual data, the moon data, day data, hour data, minute data and number of seconds certificate concrete numerical value with other system mode records such as sexadecimal, scale-of-eight, also above-mentioned concrete numerical value can be converted to corresponding binary numerical value.The annual data that above-mentioned conversion is generated, the moon data, day data, hour data, minute data and number of seconds certificate binary numerical value use continuous print storage space to store, the figure place of this storage space is default figure place.
The time data compression method of this programme is not limited to the time data generating daily record, also can be the time data of amendment daily record, or the time data of leaving a message to daily record or commenting on.Further, the time data compression method of this programme is not limited to logging time data, also can process other time data.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: use storage format of the present invention to carry out storing daily record time data, first process logging time data in a binary fashion, re-use default storage mode to store, the storage space taken needed for storing daily record time data can be saved.
In one embodiment, as shown in Figure 2, step S12 comprises the steps S21-S22:
In the step s 21, when the form of the logging time data got is the data of character string type, the data of character string type are converted to the data of value type;
In step S22, when the form of the logging time data got is the data of value type, with the year, month, day preset, hour, minute and second arrangement mode, read respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons.
In one embodiment, traditional log time data mode is divided into value type and character string type.If the int type taking up room less in use value type, need the space of 4 bytes, i.e. the space of 32; If represent the double type that scope is larger in use value type, need the space of 8 bytes, i.e. the space of 64.If use character string type, need the space of 4 bytes, i.e. the space of 32.
When the form of the logging time data got is character string type, the data of this character string type are converted to the data of value type, to carry out binary process.
For year, month, day, hour, minute and second arrangement mode, different arrangement customs is had in different countries or area, identify in advance in the present embodiment year, month, day, hour, minute and second corresponding to data, then according to sequencing be year, month, day, hour, minute and second carrying out read.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: overcome the defect that string characters is not easy to carry out calculating, also solve different year, month, day, hour, minute and second record custom problem.
In one embodiment, as shown in Figure 3, step S22 comprises the steps S31-S32:
In step S31, judge respectively the annual data of logging time data, the moon data, day data, hour data, minute data and number of seconds according to whether AFR control;
In step s 32, when there is AFR control, replace AFR control by null value.
In one embodiment, annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds be according in the record of reality, might not all record, or because special reason causes a part of data in time data not record or record rear deleted.In these cases, by annual data, the moon data, day data, hour data, minute data and number of seconds according in the part that lacks, fill by null value.It should be noted that, in the present embodiment for the moon data, day data, hour data, use 12,31,24,60 and 60 that the mxm. of minute data and number of seconds certificate is corresponding represent.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: adopt the present embodiment can process the incomplete situation of logging time data.
In one embodiment, as shown in Figure 4, process annual data in step S13 and comprise the steps S41-S42:
In step S41, calculate the year difference data of annual data and initial annual data, initial annual data is the annual data of generation first logging time data;
In step S42, determine that the binary data of annual data is the binary data of year difference data.
In one embodiment, annual data is special data in logging time data, and the logging time data except annual data all have limit value and lower numerical limit.When the numeric ratio of annual data itself is larger, in logging time data, annual data inherently can occupy larger storage space, when the time interval of recording is shorter, uses larger storage space to store annual data and very will waste storage space.
In the present embodiment, the annual data of first logging time data that record produces, and the annual data recording generation first logging time data is initial annual data, annual data in logging time data and initial annual data is done difference operation, a year difference data can be obtained.Using the binary data of the binary data of this year difference data as annual data in these logging time data.
Such as, in 3141592653 years Christian eras in future, if directly by annual data conversion binary data, need to use longer binary data to store this numerical value future.Suppose that the annual data of first logging time data that this daily record produces is 3141592654 years Christian eras, so calculating the difference of the initial annual data 3141592654 of annual data 3141592653 and these logging time data in these logging time data, can this difference be 1.With the binary data of this year difference data 1 as the binary data of annual data in these logging time data, then greatly can save the storage space of annual data.Nor the reading of impact to these logging time data, in the process read, first the binary data of annual data is converted into decimal data, then this decimal data is added that the initial annual data of these logging time data can obtain the annual data of these logging time data.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: employing the present embodiment can save the storage space to annual data greatly.
In one embodiment, as shown in Figure 5, step S14 comprises the steps S51-S55:
In step s 51, length is used to be that first storage space of six is to store the binary data of number of seconds certificate, length is used to be that second storage space of six is to store the binary data of minute data, length is used to be that the 3rd storage space of five is to store the binary data of hour data, use length to be the binary data that the 4th storage space of five carrys out data storage time, use length to be that the 5th storage space of four is to store the binary data of month data;
In step S52, obtain the length of the binary data of annual data;
In step S53, the length storing the 6th storage space of the binary data of annual data is identical with the length of the binary data of annual data;
In step S54, calculate the length sum of the first storage space, the second storage space, the 3rd storage space, the 4th storage space, the 5th storage space and the 6th storage space, length sum is preset length;
In step S55, in the storage space of preset length little-endian put in order for the binary data of the binary data of number of seconds certificate, minute data, hour data binary data, day data binary data, the moon data binary data and the binary data of annual data.
In one embodiment, store according to the first storage space that use length is six for number of seconds, meeting number of seconds according to the upper limit is the demand of 60, can not only meet the memory requirement of number of seconds certificate but also not waste unnecessary storage space.
The second storage space being six for minute data use length stores, and meets the demand that the minute data upper limit is 60, can not only meet the memory requirement of minute data but also not waste unnecessary storage space.
The 3rd storage space being five for hour data use length stores, and meets the demand that the hour data upper limit is 24, can not only meet the memory requirement of hour data but also not waste unnecessary storage space.
Use length to be that the 4th storage space of five stores for day data, meeting the day data upper limit is the demand of 31, can not only meet the memory requirement of day data but also not waste unnecessary storage space.
The 5th storage space being four for moon data use length stores, and meeting the moon data upper limit is the demand of 12, can not only meet the memory requirement of moon data but also not waste unnecessary storage space.
The length of storage space is used to be figure place according to annual data binary data and fixed for annual data, first the figure place of annual data binary data is judged, then use length be the 6th storage space of the figure place of this annual data binary data to store annual data, can not only meet the memory requirement of annual data but also not waste unnecessary storage space.
Calculate the length sum of the first storage space, the second storage space, the 3rd storage space, the 4th storage space, the 5th storage space and the 6th storage space, this length sum is preset length.The occurrence of preset length is the number of bits sum of 26 and annual data.
Use the storage space of preset length to carry out storing daily record time data, in the storage space of this preset length little-endian put in order for the binary data of the binary data of number of seconds certificate, minute data, hour data binary data, day data binary data, the moon data binary data, annual data binary data.
The technical scheme that embodiments of the invention provide can comprise following beneficial effect: with preset put in order storing daily record time data and preset position long come storing daily record time data, the object that the less storage space of use carrys out storing daily record time data can be reached.
In one embodiment, Fig. 6 is a kind of device block diagram compressing the storage space of logging time data according to an exemplary embodiment.As Fig. 6 shows, this device comprises acquisition module 61, read module 62, processing module 63 and memory module 64.
This acquisition module 61, for obtaining logging time data;
This read module 62, for the information of storage file, the information of file is distributed at least one server, and each server has at least one submeter;
This processing module 63, for reading logging time data in the mode preset, obtain respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons;
This memory module 64, for using the storage space of preset length to store the logging time data processed in a binary fashion.
As shown in Figure 7, this read module 62 comprises transform subblock 71 and reading submodule 72.
The data of character string type, for when the form of the logging time data got is the data of character string type, are converted to the data of value type by this transform subblock 71;
This transform subblock 71, also for judge respectively logging time data annual data, the moon data, day data, hour data, minute data and number of seconds according to whether AFR control;
When there is AFR control, replace AFR control by null value.
This reading submodule 72, for when the form of the logging time data got is the data of value type, with the year, month, day preset, hour, minute and second arrangement mode, read respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons.
As shown in Figure 8, this processing module 63 comprises turn the first calculating sub module 81 and determines submodule 82.
This first calculating sub module 81, for calculating the year difference data of annual data and initial annual data, initial annual data is the annual data of generation first logging time data;
This determines submodule 82, for determining that the binary data of annual data is the binary data of year difference data.
As shown in Figure 9, this memory module 64 comprises transposition eldest son module 91, acquisition submodule 92, sub module stored 93, second calculating sub module 94 and arrangement submodule 95.
This eldest son's module 91, be that first storage space of six is to store the binary data of number of seconds certificate for using length, length is used to be that second storage space of six is to store the binary data of minute data, length is used to be that the 3rd storage space of five is to store the binary data of hour data, use length to be the binary data that the 4th storage space of five carrys out data storage time, use length to be that the 5th storage space of four is to store the binary data of month data;
This acquisition submodule 92, for obtaining the length of the binary data of annual data;
This sub module stored 93, the length for the 6th storage space storing the binary data of annual data is identical with the length of the binary data of annual data;
This second calculating sub module 94, for calculating the length sum of the first storage space, the second storage space, the 3rd storage space, the 4th storage space, the 5th storage space and the 6th storage space, length sum is preset length;
This arrangement submodule 95, for little-endian in the storage space of preset length put in order for the binary data of the binary data of number of seconds certificate, minute data, hour data binary data, day data binary data, the moon data binary data and the binary data of annual data.
As shown in Figure 10, compress a schematic diagram for the storage space figure place of logging time data, in this storage space from low level to a high position successively order deposit the binary data of the number of seconds certificate of logging time data, the binary data of minute data, hour data binary data, day data binary data, the moon data binary data and the binary data of annual data.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory and optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (10)

1. for compressing a method for the storage space of logging time data, it is characterized in that, comprising:
Obtain logging time data;
Read logging time data in the mode preset, obtain respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons;
Process in a binary fashion respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds certificate;
The storage space of preset length is used to store the logging time data processed in a binary fashion.
2. method as claimed in claim 1, is characterized in that, reads logging time data in the mode preset, obtain respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons, comprising:
When the form of the logging time data got is the data of character string type, the data of character string type are converted to the data of value type;
When the form of the logging time data got is the data of value type, with the year, month, day preset, hour, minute and second arrangement mode, read respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons.
3. method as claimed in claim 2, is characterized in that, when the form of the logging time data got is the data of value type, comprising:
Judge respectively the annual data of logging time data, the moon data, day data, hour data, minute data and number of seconds according to whether AFR control;
When there is AFR control, replace AFR control by null value.
4. method as claimed in claim 2, is characterized in that, process annual data in a binary fashion, comprising:
Calculate the year difference data of annual data and initial annual data, initial annual data is the annual data of generation first logging time data;
Determine that the binary data of annual data is the binary data of year difference data.
5. method as claimed in claim 4, is characterized in that, uses the storage space of preset length to store the logging time data processed in a binary fashion, comprising:
Length is used to be that first storage space of six is to store the binary data of number of seconds certificate, length is used to be that second storage space of six is to store the binary data of minute data, length is used to be that the 3rd storage space of five is to store the binary data of hour data, use length to be the binary data that the 4th storage space of five carrys out data storage time, use length to be that the 5th storage space of four is to store the binary data of month data;
Obtain the length of the binary data of annual data;
The length storing the 6th storage space of the binary data of annual data is identical with the length of the binary data of annual data;
Calculate the length sum of the first storage space, the second storage space, the 3rd storage space, the 4th storage space, the 5th storage space and the 6th storage space, length sum is preset length;
In the storage space of preset length little-endian put in order for the binary data of the binary data of number of seconds certificate, minute data, hour data binary data, day data binary data, the moon data binary data and the binary data of annual data.
6. compress a device for the storage space of logging time data, it is characterized in that, comprising:
Acquisition module, for obtaining logging time data;
Read module, for reading logging time data in the mode preset, obtain respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons;
Processing module, for process in a binary fashion respectively annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds certificate;
Memory module, for using the storage space of preset length to store the logging time data processed in a binary fashion.
7. device according to claim 6, is characterized in that, described read module, comprising:
The data of character string type, for when the form of the logging time data got is the data of character string type, are converted to the data of value type by transform subblock;
Reading submodule, for when the form of the logging time data got is the data of value type, with the year, month, day preset, hour, minute and second arrangement mode, read respectively the annual data in logging time data, the moon data, day data, hour data, minute data and number of seconds according in any one or many persons.
8. device according to claim 7, is characterized in that, described reading submodule,
Also for judge respectively logging time data annual data, the moon data, day data, hour data, minute data and number of seconds according to whether AFR control;
When there is AFR control, replace AFR control by null value.
9. device according to claim 6, is characterized in that, described processing module, comprising:
First calculating sub module, for calculating the year difference data of annual data and initial annual data, initial annual data is the annual data of generation first logging time data;
Determine submodule, for determining that the binary data of annual data is the binary data of year difference data.
10. device according to claim 6, is characterized in that, described memory module, comprising:
Position eldest son's module, be that first storage space of six is to store the binary data of number of seconds certificate for using length, length is used to be that second storage space of six is to store the binary data of minute data, length is used to be that the 3rd storage space of five is to store the binary data of hour data, use length to be the binary data that the 4th storage space of five carrys out data storage time, use length to be that the 5th storage space of four is to store the binary data of month data;
Obtain submodule, for obtaining the length of the binary data of annual data;
Sub module stored, the length for the 6th storage space storing the binary data of annual data is identical with the length of the binary data of annual data;
Second calculating sub module, for calculating the length sum of the first storage space, the second storage space, the 3rd storage space, the 4th storage space, the 5th storage space and the 6th storage space, length sum is preset length;
Arrangement submodule, for little-endian in the storage space of preset length put in order for the binary data of the binary data of number of seconds certificate, minute data, hour data binary data, day data binary data, the moon data binary data and the binary data of annual data.
CN201510819201.9A 2015-11-23 2015-11-23 Method and apparatus for compressing storage space of log time data Pending CN105404472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510819201.9A CN105404472A (en) 2015-11-23 2015-11-23 Method and apparatus for compressing storage space of log time data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510819201.9A CN105404472A (en) 2015-11-23 2015-11-23 Method and apparatus for compressing storage space of log time data

Publications (1)

Publication Number Publication Date
CN105404472A true CN105404472A (en) 2016-03-16

Family

ID=55469980

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510819201.9A Pending CN105404472A (en) 2015-11-23 2015-11-23 Method and apparatus for compressing storage space of log time data

Country Status (1)

Country Link
CN (1) CN105404472A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126486A (en) * 2016-06-30 2016-11-16 童晓冲 Temporal information coded method, encoded radio search method, coding/decoding method and device
CN106294700A (en) * 2016-08-08 2017-01-04 无锡天脉聚源传媒科技有限公司 The storage of a kind of daily record and read method and device
CN106354617A (en) * 2016-08-29 2017-01-25 广州华多网络科技有限公司 Program compression log file output method and device
CN106708440A (en) * 2016-12-26 2017-05-24 深圳市科陆电子科技股份有限公司 Electric energy meter and data storage method for load curve of electric energy meter
CN107911254A (en) * 2017-12-26 2018-04-13 中国移动通信集团江苏有限公司 Log transmission method, apparatus, computing device and storage medium
CN109639284A (en) * 2018-11-30 2019-04-16 宁波三星智能电气有限公司 A kind of the time data compression method and its decompressing method of intelligent electric meter
CN109937413A (en) * 2016-07-20 2019-06-25 深圳市东信时代信息技术有限公司 The processing method and system of magnanimity crowd characteristic data

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4316276A (en) * 1974-08-15 1982-02-16 Bulova Watch Company, Inc. Key-operated solid-state timepieces
CN1932812A (en) * 2005-09-16 2007-03-21 腾讯科技(深圳)有限公司 Method and apparatus for holding journal
CN101315543A (en) * 2008-06-28 2008-12-03 黄更 Network digital alarm clock, long-range control method and signal synchronous transmission method
CN103399945A (en) * 2013-08-15 2013-11-20 成都博云科技有限公司 Data structure based on cloud computing database system
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs
US20150103633A1 (en) * 2013-10-14 2015-04-16 Nike, Inc. Adaptive timing congfiguration for athletic devices
CN105068790A (en) * 2015-07-13 2015-11-18 广东安居宝智能控制系统有限公司 Arbitrary time data recording method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4316276A (en) * 1974-08-15 1982-02-16 Bulova Watch Company, Inc. Key-operated solid-state timepieces
CN1932812A (en) * 2005-09-16 2007-03-21 腾讯科技(深圳)有限公司 Method and apparatus for holding journal
CN101315543A (en) * 2008-06-28 2008-12-03 黄更 Network digital alarm clock, long-range control method and signal synchronous transmission method
CN103399945A (en) * 2013-08-15 2013-11-20 成都博云科技有限公司 Data structure based on cloud computing database system
US20150103633A1 (en) * 2013-10-14 2015-04-16 Nike, Inc. Adaptive timing congfiguration for athletic devices
CN103944973A (en) * 2014-04-02 2014-07-23 北京中交兴路车联网科技有限公司 Method and device for collecting logs
CN105068790A (en) * 2015-07-13 2015-11-18 广东安居宝智能控制系统有限公司 Arbitrary time data recording method and system

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126486A (en) * 2016-06-30 2016-11-16 童晓冲 Temporal information coded method, encoded radio search method, coding/decoding method and device
WO2018000709A1 (en) * 2016-06-30 2018-01-04 童晓冲 Time information coding method, coding value retrieval method, and decoding method and device
CN106126486B (en) * 2016-06-30 2019-03-08 童晓冲 Temporal information coding method, encoded radio search method, coding/decoding method and device
US11544443B2 (en) 2016-06-30 2023-01-03 Xiaochong TONG Time information coding method, coded value searching method, decoding method and device
CN109937413A (en) * 2016-07-20 2019-06-25 深圳市东信时代信息技术有限公司 The processing method and system of magnanimity crowd characteristic data
CN106294700A (en) * 2016-08-08 2017-01-04 无锡天脉聚源传媒科技有限公司 The storage of a kind of daily record and read method and device
CN106354617A (en) * 2016-08-29 2017-01-25 广州华多网络科技有限公司 Program compression log file output method and device
CN106354617B (en) * 2016-08-29 2019-04-12 广州华多网络科技有限公司 Program compaction journal file output method and device
CN106708440A (en) * 2016-12-26 2017-05-24 深圳市科陆电子科技股份有限公司 Electric energy meter and data storage method for load curve of electric energy meter
CN107911254A (en) * 2017-12-26 2018-04-13 中国移动通信集团江苏有限公司 Log transmission method, apparatus, computing device and storage medium
CN107911254B (en) * 2017-12-26 2021-09-28 中国移动通信集团江苏有限公司 Log transmission method and device, computing equipment and storage medium
CN109639284A (en) * 2018-11-30 2019-04-16 宁波三星智能电气有限公司 A kind of the time data compression method and its decompressing method of intelligent electric meter

Similar Documents

Publication Publication Date Title
CN105404472A (en) Method and apparatus for compressing storage space of log time data
CN102687404B (en) Data value occurrence information for data compression
CN102129425A (en) Method and device for accessing large-object set table in data warehouse
CN108363684A (en) List creation method, device and server
CN106557307B (en) Service data processing method and system
CN103559184A (en) Form page display method and device
CN105446572A (en) Text-editing method and device used for screen display device
CN115601514A (en) Automatic association mapping method for digital twin data
CN105354236A (en) Reconciliation information generation method and system
CN104424010A (en) Method and system for detecting and repairing text document messy codes
CN109376148B (en) Data processing method and device for slow change dimension table and electronic equipment
CN110188160B (en) Data storage method and data reading method
CN111611230A (en) Method and device for establishing main data system, computer equipment and storage medium
CN111488117B (en) Method, electronic device, and computer-readable medium for managing metadata
CN116204509A (en) Data access script generation method and device, electronic equipment and storage medium
CN106909570B (en) Data conversion method and device
CN112051987B (en) Service data processing method, device and equipment, program generating method and device
CN110990640B (en) Data determination method, device, equipment and computer readable storage medium
CN112685456A (en) User access data processing method and device and computer system
CN112487773A (en) Report generation method, device, equipment and storage medium
CN108415814B (en) Method for automatically recording field change, application server and computer readable storage medium
CN117215455B (en) Report calculation formula generation method and device, computer equipment and storage medium
CN111401005A (en) Text conversion method and device and readable storage medium
CN115168112B (en) Method, device, equipment and medium for restoring section data under dynamic section change
CN117371703A (en) Funds planning method, funds planning device, electronic equipment and readable medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160316

RJ01 Rejection of invention patent application after publication