CN107590220A - Storage file generation method - Google Patents

Storage file generation method Download PDF

Info

Publication number
CN107590220A
CN107590220A CN201710784001.3A CN201710784001A CN107590220A CN 107590220 A CN107590220 A CN 107590220A CN 201710784001 A CN201710784001 A CN 201710784001A CN 107590220 A CN107590220 A CN 107590220A
Authority
CN
China
Prior art keywords
data
storage file
time
stored
dynamic data
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
CN201710784001.3A
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.)
Jiangxi Borui Tongyun Technology Co Ltd
Original Assignee
Jiangxi Borui Tongyun 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 Jiangxi Borui Tongyun Technology Co Ltd filed Critical Jiangxi Borui Tongyun Technology Co Ltd
Priority to CN201710784001.3A priority Critical patent/CN107590220A/en
Publication of CN107590220A publication Critical patent/CN107590220A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present embodiments relate to a kind of storage file generation method, including;Receive data to be stored;Treat data storage to be classified, so as to obtain device data and dynamic data;Device data is received into type, mobile phone version, operator, geographical position, IMEI number, Mac addresses, resolution ratio, SIM card number and time zone according to network and carries out data filling, so as to generate device package;Dynamic data is subjected to data filling according to action source category, data time and data extended field, so as to generate dynamic data packet;Utilize device package and dynamic data packet generation storage file;According to the filename of file designation rule generation storage file;Storage file is stored in database according to filename.Storage file generation method provided in an embodiment of the present invention is capable of the data source of dynamically compatible different-format, and the data are named by certain naming rule, and the reading response process of data is accelerated in the segmentation storage for having also combined multifile.

Description

Storage file generation method
Technical field
The present invention relates to communication technical field, more particularly to a kind of storage file generation method.
Background technology
With the improvement of living standards, people increasingly pay close attention to own health status.Because communication equipment can be carry-on Carry, can be given the dynamic moving data storage of user, the report result of periodic statistical analysis and summary generation by electronic equipment People refer to well.The packet of analysis contains a large amount of different life event data, it is therefore desirable to which design is different-format Data unified standard storage.
The content of the invention
It is an object of the invention to provide it is a kind of can be by the data Uniform Name of different-format, will be substantial amounts of so as to reach The purpose of life event data standard storage.
To achieve the above object, the invention provides a kind of storage file generation method, methods described to include;
Receive data to be stored;
The data to be stored are classified, so as to obtain device data and dynamic data;
The device data is received into type, mobile phone version, operator, geographical position, IMEI number, Mac according to network Location, resolution ratio, SIM card number and time zone carry out data filling, so as to generate device package;
The dynamic data is subjected to data filling according to action source category, data time and data extended field, from And generate dynamic data packet;
Utilize the device package and dynamic data packet generation storage file;
The filename of the storage file is generated according to file designation rule;
The storage file is stored in database according to the filename.
Further, the storage file is stored in database according to the filename is specially:
The storage file timing is stored in database according to the filename.
Further, the storage file timing is stored in database according to the filename is specially:
Setting time threshold value;
Storage file is stored in database with the first storage file name;
After the time threshold is reached, storage file is stored in database with the second storage file name.
Further, the file designation rule is:
Filename is sequentially generated according to ID, year, month, day and time.
Further, the action source category of the dynamic data includes:Sack time number, motion meter step time time Number, reference content reading time number and reservation video are listened and see time number.
Further, methods described also includes:
The sack time number, motion meter step time number, reference content reading time number and reservation video are listened See that time number carries out the coded treatment of Digital ID.
Further, methods described also includes:
The second time threshold is preset, when the action source category of the dynamic data is the sack time number When, corresponding Data expansion field definition is the event occurred in second time threshold;
The 3rd time threshold is preset, when the action source category of the dynamic data is the motion meter step time time During number, corresponding Data expansion field definition accounts for the ratio of the 3rd time threshold for the time of generation motion event;
When the action source category of the dynamic data is the reference content reading time number, to the content of consulting Carry out parsing and obtain the sub- content of consulting, corresponding Data expansion field definition accounts for the reference content for the sub- content of consulting Ratio;
When the action source category of the dynamic data is listened for the reservation video sees time number, to the video of viewing Classified and obtain corresponding sub-video information, corresponding Data expansion field definition is the class of the sub-video information The ratio of type distribution.
Storage file generation method provided in an embodiment of the present invention is carried out by treating storage information according to certain classification Classification, while be named according to certain naming rule, to reach the purpose for storing storage file specification.
Brief description of the drawings
Fig. 1 is the flow chart of storage file generation method provided in an embodiment of the present invention.
Embodiment
Below by drawings and examples, technical scheme is described in further detail.
Storage file generation method provided in an embodiment of the present invention is filled by the way that data to be stored classification is carried out into data To packet, and then packet is generated into storage file and is named according to certain naming rule, will stored so as to reach The purpose of filespec storage.
Fig. 1 is the flow chart of storage file generation method provided in an embodiment of the present invention, as illustrated, methods described bag Include;
S101:Receive data to be stored;
Server receives the data to be stored sent from each terminal, and the data to be stored include daily life event Data, a big feature of this kind of data is exactly that data are heterogeneous.For example the word of mobile phone terminal browses data, mobile phone terminal operand Communication data according to, chat software etc..
S102:The data to be stored are classified, so as to obtain device data and dynamic data.
After server receives above-mentioned data to be stored, it is carried out at classification according to device data and dynamic data Reason.Obtained result of classifying is fixed definitions information and dynamic definition information respectively.
S103:By the device data according to network receive type, mobile phone version, operator, geographical position, IMEI number, Mac addresses, resolution ratio, SIM card number and time zone carry out data filling, so as to generate device package.
The device data obtained to step 102 classification further carries out data filling, and the content of filling receives class for network Type, mobile phone version, operator, geographical position, IMEI number, Mac addresses, resolution ratio, SIM card number and time zone, acquisition are completely set Standby data.The meaning of this step is, the data that device data includes are arranged and filled respectively according to above-mentioned classification Enter in corresponding Data Position, so as to form complete orderly device package.
S104:The dynamic data is carried out into data according to action source category, data time and data extended field to fill out Fill, so as to generate dynamic data packet.
Further carry out data filling to the obtained dynamic data of step 102 classification, the content action source category of filling, Data time and data extended field, obtain complete dynamic data.The meaning of this step is, dynamic data is included Data are arranged and are packed into corresponding Data Position according to above-mentioned classification respectively, so as to form complete orderly dynamic number According to bag.
Further, the action source category of the dynamic data includes:Sack time number, motion meter step time time Number, reference content reading time number and reservation video are listened and see time number.
Specifically, the action source category of above-mentioned dynamic data have it is a variety of, include sack time number, motion meter step Time number, reference content reading time number and reservation video are listened and see time number etc., and are not limited to above-mentioned species. Illustrated using sack time number, what its data included have sack time, sleep number and sleep depth, and related Quarter-bell situation etc., these data can be stored in database according to certain classification.
Further, methods described also includes:
Encoded using action source category of the Digital ID to the dynamic data.
Specifically, in order to save the internal memory of database, the action source category to above-mentioned dynamic data is using Arabic Data are identified and encoded, for example sleep encodes using 1, and motion encodes using 2, and reading encodes etc. using 3. And the sack time point among data of sleeping encodes using 11, sleep duration encoded using 12, sleep number using 13 come Coding etc., by that analogy.When server needs to extract the data in database, as long as being looked into according to coding Look for and extract, for example extract 12008 data, and the implication of the data is a length of during sleep 8 hours of user, then takes Business device extracts 12008 this data and is just defaulted as having extracted user's a length of 8 hours this data during sleep.When extracting 31075 data.And it is page 75 that the implication of the data, which is the number of pages that user reads, if also having mark for example after the data, 31075-11-86, then the implication of the data is that the number of pages that user reads is page 75, and number of pages is from page 11 to page 86.
Further, the content of the Data expansion field is relative with the content of the action source category of the dynamic data Should.
Specifically, the content of Data expansion field is corresponding with the particular content of dynamic data, i.e., it is dynamic with dynamic data It is corresponding to make the content of source category, for detailed, extended field is secondary corresponding to sack time number, motion meter step time Number, reference content reading time number and reservation video are listened and see time number etc., and are not limited to above-mentioned action source category. For example, when the action source category of the dynamic data is the sack time number, corresponding Data expansion field is sleep_ext;When the action source category of the dynamic data walks time number for the motion meter, corresponding data expand Exhibition field is step_ext;When the action source category of the dynamic data is the reference content reading time number, institute Corresponding Data expansion field is read_ext;When the action source category of the dynamic data is listened for the reservation video to be seen Between number when, corresponding Data expansion field is watch_ext.
For in detail, the second time threshold is preset, when the action source category of the dynamic data is slept to be described When feeling time number, corresponding Data expansion field definition is the event occurred in second time threshold.For example, second Time threshold is set to 2 hours, then the Data expansion field record is in 2 hours that it's time to go to bed event occurs front and rear, is sent out Raw event, such as, event of drinking water, wash one's face and rinse one's mouth, read a book or chat etc..
Terminal presets the 3rd time threshold, such as 12 hours, when the action source category of the dynamic data is institute When stating motion meter step time number, when corresponding Data expansion field definition accounts for the described 3rd for the time of motion event occurs Between threshold value ratio, that is, calculate the accounting of the run duration in 12 hours, such as in 12 hours, have transported within 30 minutes Dynamic event, then the Data expansion field is 4.17%.
When the action source category of the dynamic data is the reference content reading time number, to the content of consulting Carry out parsing and obtain the sub- content of consulting, corresponding Data expansion field definition accounts for the reference content for the sub- content of consulting Ratio.For example, when user has read 30 minutes to novel, historical document are read 2 hours, 2 have been read to Chinese language prose Hour, news is read 30 minutes, then corresponding Data expansion field is that novel reading accounts for 10%, when historical document are read Between account for 40%, Chinese language prose reading time accounts for 40%, and news is read and accounts for 10%.
When the action source category of the dynamic data is listened for the reservation video sees time number, to the video of viewing Classified and obtain corresponding sub-video information, corresponding Data expansion field definition is the class of the sub-video information The ratio of type distribution.For example, when user watch film 2 it is small when, viewing news 1 hour, viewing variety show 2 hours, then pair The Data expansion field answered is:Viewing movie time accounts for 40%, and viewing news accounts for 20%, and the time for watching variety show accounts for 40%.
S105:Utilize the device package and dynamic data packet generation storage file.
After above-mentioned steps 103 and 104 get device package and dynamic data packet, by device package and dynamic data Encapsulation generates storage file, and necessary data packet head and bag tail is carried out during encapsulation.
S106:The filename of the storage file is generated according to file designation rule.
After generating storage file in step 105, the storage file can be named with certain naming rule.Should Naming rule is to be named according to ID, year, month, day and time, such as the moon -1998-11-24-21 filename meaning It is the moon that taste, which ID, 21 points of November 24 day in 1998.
Naming rule can not also be carried out by above-mentioned order, can be transformed to others sequentially, such as year, month, day, Time and ID.
S107:The storage file is stored in database according to the filename.
After completing name to file in step 106, it is stored in database according to the name of file.Due to data Big and real-time update is measured, therefore timing carries out the processing of above-mentioned each step to the new data received, and then according to gained Filename is stored in database.
The problem of being stored for storage file timing, for specific, can preset time threshold, when reaching this Between threshold value when, server is just handled the new data received.For the storage file before a time threshold, with first Storage file name is stored in database, and is then stored in for the storage file after the time threshold with the second storage file name In database.
Storage file generation method provided in an embodiment of the present invention is capable of the data source of dynamically compatible different-format, and The data are named by certain naming rule, the reading response of data is accelerated in the segmentation storage for having also combined multifile Process.
Professional should further appreciate that, each example described with reference to the embodiments described herein Unit and algorithm steps, it can be realized with electronic hardware, computer software or the combination of the two, it is hard in order to clearly demonstrate The interchangeability of part and software, the composition and step of each example are generally described according to function in the above description. These functions are performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme. Professional and technical personnel can realize described function using distinct methods to each specific application, but this realization It is it is not considered that beyond the scope of this invention.
The method that is described with reference to the embodiments described herein can use hardware, computing device the step of algorithm Software module, or the two combination are implemented.Software module can be placed in random access memory (RAM), internal memory, read-only storage (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field In any other form of storage medium well known to interior.
Above-described embodiment, the purpose of the present invention, technical scheme and beneficial effect are carried out further Describe in detail, should be understood that the embodiment that the foregoing is only the present invention, be not intended to limit the present invention Protection domain, within the spirit and principles of the invention, any modification, equivalent substitution and improvements done etc., all should include Within protection scope of the present invention.

Claims (7)

1. a kind of storage file generation method, it is characterised in that methods described includes;
Receive data to be stored;
The data to be stored are classified, so as to obtain device data and dynamic data;
By the device data according to network receive type, mobile phone version, operator, geographical position, IMEI number, Mac addresses, point Resolution, SIM card number and time zone carry out data filling, so as to generate device package;
The dynamic data is subjected to data filling according to action source category, data time and data extended field, so as to raw Into dynamic data packet;
Utilize the device package and dynamic data packet generation storage file;
The filename of the storage file is generated according to file designation rule;
The storage file is stored in database according to the filename.
2. according to the method for claim 1, it is characterised in that the storage file is stored in data according to the filename It is specially in storehouse:
The storage file timing is stored in database according to the filename.
3. according to the method for claim 2, it is characterised in that the storage file timing is stored according to the filename It is specially in database:
Set very first time threshold value;
Storage file is stored in database with the first storage file name;
After the very first time threshold value is reached, storage file is stored in database with the second storage file name.
4. according to the method for claim 1, it is characterised in that the file designation rule is:
Filename is sequentially generated according to ID, year, month, day and time.
5. according to the method for claim 1, it is characterised in that the action source category of the dynamic data includes:Sleep Time number, motion meter step time number, reference content reading time number and reservation video are listened and see time number.
6. according to the method for claim 5, it is characterised in that methods described also includes:
The sack time number, motion meter step time number, reference content reading time number and reservation video are listened when seeing Between number carry out Digital ID coded treatment.
7. according to the method for claim 5, it is characterised in that methods described also includes:
The second time threshold is preset, when the action source category of the dynamic data is the sack time number, institute Corresponding Data expansion field definition is the event occurred in second time threshold;
The 3rd time threshold is preset, when the action source category of the dynamic data is the motion meter step time number When, corresponding Data expansion field definition accounts for the ratio of the 3rd time threshold for the time of generation motion event;
When the action source category of the dynamic data is the reference content reading time number, the content of consulting is carried out Parsing, which obtains, seeks advice from sub- content, and corresponding Data expansion field definition accounts for the ratio of the reference content for the sub- content of consulting Example;
When the action source category of the dynamic data is listened for the reservation video sees time number, the video of viewing is carried out Classify and obtain corresponding sub-video information, corresponding Data expansion field definition divides for the type of the sub-video information The ratio of cloth.
CN201710784001.3A 2017-08-31 2017-08-31 Storage file generation method Pending CN107590220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710784001.3A CN107590220A (en) 2017-08-31 2017-08-31 Storage file generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710784001.3A CN107590220A (en) 2017-08-31 2017-08-31 Storage file generation method

Publications (1)

Publication Number Publication Date
CN107590220A true CN107590220A (en) 2018-01-16

Family

ID=61051694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710784001.3A Pending CN107590220A (en) 2017-08-31 2017-08-31 Storage file generation method

Country Status (1)

Country Link
CN (1) CN107590220A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177025A (en) * 2021-03-25 2021-07-27 北京城建智控科技有限公司 Data operation method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060230054A1 (en) * 2005-03-29 2006-10-12 Jon Moog On-line organization of data sets
CN102419775A (en) * 2011-12-22 2012-04-18 厦门雅迅网络股份有限公司 Method for storing and retrieving massive small files
CN104181875A (en) * 2014-07-09 2014-12-03 浙江大学城市学院 Excise and fitness system based on mode of Internet of Things
CN106156480A (en) * 2015-07-01 2016-11-23 安徽华米信息科技有限公司 A kind of data statistical approach and device
CN106897198A (en) * 2016-06-17 2017-06-27 阿里巴巴集团控股有限公司 A kind of processing method and processing device of daily record data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060230054A1 (en) * 2005-03-29 2006-10-12 Jon Moog On-line organization of data sets
CN102419775A (en) * 2011-12-22 2012-04-18 厦门雅迅网络股份有限公司 Method for storing and retrieving massive small files
CN104181875A (en) * 2014-07-09 2014-12-03 浙江大学城市学院 Excise and fitness system based on mode of Internet of Things
CN106156480A (en) * 2015-07-01 2016-11-23 安徽华米信息科技有限公司 A kind of data statistical approach and device
CN106897198A (en) * 2016-06-17 2017-06-27 阿里巴巴集团控股有限公司 A kind of processing method and processing device of daily record data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113177025A (en) * 2021-03-25 2021-07-27 北京城建智控科技有限公司 Data operation method and system

Similar Documents

Publication Publication Date Title
CN107592346A (en) User classification method based on user behavior analysis
CN107613363A (en) A kind of system and method based on internet to hotel television advertisement
CN102546668A (en) Method, device and system for counting unique visitors
CN104516892A (en) Distribution method, system and terminal of user generated content associated with rich media information
CN104602105B (en) The player method and user equipment of video file
CN101626551A (en) System and method for popularizing advertisements based on mobile Internet
CN104284238A (en) Video playing method and device based on two-dimensional code
CN106503110A (en) Health and fitness information method for pushing
CN106792069A (en) Method for broadcasting multimedia file and device
CN106933887A (en) A kind of data visualization method and device
CN107590220A (en) Storage file generation method
CN106302814A (en) Healthy message sink exhibiting method
CN102693237B (en) Webpage content adaptation and encapsulation system and method
CN106874293A (en) A kind of data processing method and device
CN106959858B (en) Information processing method and device
CN106911937A (en) The collocation method and system of a kind of live middle present banner background colour
CN107332661A (en) The method of data encryption
CN105282626A (en) Video sharing application-based video file processing method and device
CN106201461A (en) Generation method, system and the background server at a kind of interface
CN104077323A (en) Method and device for converting web page content to multimedia messages
CN106027303B (en) A kind of reference characteristic-acquisition method and its equipment
CN107786661A (en) Information synchronization method
US20180232287A1 (en) Information processing apparatus and information processing method
Haghpanahan et al. The impact of TV mass media campaigns on calls to a National Quitline and the use of prescribed nicotine replacement therapy: a structural vector autoregression analysis
CN110225383A (en) The loading method of pushed information in Interactive Internet TV

Legal Events

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

Application publication date: 20180116

RJ01 Rejection of invention patent application after publication