CN104361128A - Data synchronization method of PC (Personnel Computer) end and mobile terminal based on hydraulic polling business - Google Patents

Data synchronization method of PC (Personnel Computer) end and mobile terminal based on hydraulic polling business Download PDF

Info

Publication number
CN104361128A
CN104361128A CN201410737631.1A CN201410737631A CN104361128A CN 104361128 A CN104361128 A CN 104361128A CN 201410737631 A CN201410737631 A CN 201410737631A CN 104361128 A CN104361128 A CN 104361128A
Authority
CN
China
Prior art keywords
data
file
patrol
mobile terminal
examine
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
CN201410737631.1A
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.)
Hohai University HHU
Huaneng Lancang River Hydropower Co Ltd
Original Assignee
Hohai University HHU
Huaneng Lancang River Hydropower 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 Hohai University HHU, Huaneng Lancang River Hydropower Co Ltd filed Critical Hohai University HHU
Priority to CN201410737631.1A priority Critical patent/CN104361128A/en
Publication of CN104361128A publication Critical patent/CN104361128A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/113Details of archiving
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files

Abstract

The invention discloses a data synchronization method of a PC (Personnel Computer) end and a mobile terminal based on hydraulic polling business. The data synchronization method mainly comprises two parts of uploading polling data at the mobile terminal and downloading the polling data at the PC end, wherein uploading the polling data at the mobile terminal comprises the following steps of importing polling attribute basic information and multimedia data information in mobile equipment into the PC end, converting the basic data information into data objects through sorting operation of the polling data, storing the data objects in a database and storing multimedia data in a multimedia database to effectively manage the polling data; downloading the polling data at the PC end comprises the following steps of downloading newest hydraulic polling data to the mobile terminal from the PC end to facilitate obtaining result information of last polling when a user carries out polling at each time, and comparing with the current polling site condition to judge the hydraulic safety situation. According to the data synchronization method, the polling data can be automatically, timely and accurately put in storage conveniently, the processing time for the polling data is reduced, and the working efficiency and the accuracy for polling personnel can be improved.

Description

A kind of PC end and mobile terminal method of data synchronization of patrolling and examining business based on water conservancy project
Technical field
The present invention relates to a kind of PC end and mobile terminal method of data synchronization of patrolling and examining business based on water conservancy project, patrol and examine the demand of business in conjunction with water conservancy project, the data of patrolling and examining the acquisition of rear mobile terminal for solving water conservancy project hold synchronous problem with PC.
Background technology
Patrolling and examining is the indispensable link of power station generating system by piloting water, can Timeliness coverage defect fix the defect, therefore patrols and examines and have extremely important status in the daily management of power station.At present, water conservancy project routine inspection mode mainly realizes by filling in papery form, comprises establishment patrol task, performs patrol task, submit patrol record to, and process is patrolled and examined problem and generated the flow processs such as analysis report.Existing water conservancy project is patrolled and examined the mode relying on patrol officer to fill in papery form and is operated, in the face of various patrols and examines position, each process of patrolling and examining all can produce a large amount of patrols and examines data, the data of papery form need patrol officer to return manual input database behind office ground, take time and effort, easily make mistakes, and cause the huge wasting of resources.On the other hand, patrol and examine the multi-medium data produced in process, the such as pictorial information such as dam defect, dangerous situation and video information, traditional approach is adopted not easily to manage concentratedly, and not easily the picture video of defect, dangerous situation and position of being in danger are carried out data correlation, increase the difficulty of dangerous situation treatment people process dangerous situation.Work efficiency is patrolled and examined in order to improve water conservancy project, serve power station daily management mission better, exploitation power station water conservancy project cruising inspection system, hydraulic safety is patrolled and examined Workflow messages in process, auxiliary patrol officer records on-the-spot water conservancy project defect information, work, defect elimination work unified management are patrolled and examined in realization, improve the work efficiency of staff.
Owing to being subject to the restriction of dam content radio communication conditions, existing water conservancy project cruising inspection system cannot realize collection and the monitoring intelligent of terminal data completely, also cannot require that the data of each on-the-spot mobile terminal and PC hold and keep synchronous in real time, therefore using PDA as the terminal data collection of water conservancy project cruising inspection system with arrange node, the water conservancy project cruising inspection system built based on the data monitoring of mobile terminal just arises.
Personal digital assistant PDA (Personal Digital Assistant), its advantage be light, small and exquisite, mobility is strong, do not lose the powerful of function again simultaneously, PDA can help the functions such as terminal user's data acquisition, process, display, transmission, management, range of application is very wide, is particularly suitable for patrolling and examining collection in worksite application in the water conservancy project that movability is stronger.Before work is patrolled and examined in each water conservancy project, user needs to download from the database of PC end and up-to-date patrols and examines data in PDA, and for user, this is patrolled and examined and to patrol and examine result with last time and can carry out scene and contrast.On the other hand, after each water conservancy project is patrolled and examined, in the database that the data upload that user needs this to patrol and examine collection is held to PC, patrol and examine issue track and hydraulic safety analysis report etc. for managing the information of patrolling and examining, processing.
Patrol and examine in front and back patrolling and examining data realization download and uploading demand to meet user, this locality that the present invention needs the water conservancy project solving PDA collection to patrol and examine data stores, and data are patrolled and examined in the water conservancy project keeping each PDA to gather and PC holds the synchronism of patrolling and examining data stored, realize each PDA mobile terminal and PC and hold and realize water conservancy project and patrol and examine the synchronous of data and share.
Summary of the invention
Goal of the invention: patrol and examine the present situation that business and PDA assist business of patrolling and examining for water conservancy project, the invention provides a kind of PC end and mobile terminal method of data synchronization of patrolling and examining business based on water conservancy project, after process of patrolling and examining adopts mobile terminal typing mode, solve the problem of PC end and mobile terminal data syn-chronization, conveniently patrol and examine data can automatically, in time, accurately put in storage, data processing time is patrolled and examined in saving, improves patrol officer's work efficiency and accuracy.
Technical scheme: a kind of PC end and mobile terminal method of data synchronization of patrolling and examining business based on water conservancy project, comprises and patrol and examine data uploading method and patrol and examine data download method.
(1) mobile terminal patrols and examines data uploading method, and its concrete steps are as follows:
Step 1: test mobile device whether with PC computing machine exact connect ion, if exact connect ion, then enter step 2; Otherwise, enter step 6;
Step 2: by adb order, All Files under assigned catalogue in mobile device storage card is all copied in the RoutingTmp file under the appointment drive (as D dish) of PC computing machine, copied content comprises patrols and examines attribute data file and multimedia file, copy function success then enters step 3, otherwise, enter step 6;
Step 3: start parsing and patrol and examine attribute data, first the All Files content of (as D:/RoutingTmp/RoutingResult) under specifying drive folder content is carried out searching loop reading, in these files, contain the attribute data produced in the process of patrolling and examining.Then, the database storage requirement of data is patrolled and examined according to water conservancy project, be json data by the content transformation read in above-mentioned each file, resolve these json data again, and changing into the json data of standard simultaneously, attribute data resolves warehouse-in the most at last, and attribute data is put in storage and successfully then entered step 4, otherwise, enter step 6;
Step 4: start definition multimedia data, drive (as D) will be specified: the All Files under/RoutingTmp/RoutingFiles folder content carries out searching loop parsing, and the file existed in the file after each parsing and multimedia database is carried out contrast verify, if there is not this file in multimedia database, then files passe warehouse-in, otherwise, skip this file and continue operation, till All Files operated, multi-medium data is put in storage and is successfully then entered step 5, otherwise, enter step 6;
Step 5: mobile device is to PC end data synchronous operation success, and provide information to user, flow process terminates;
Step 6: bomp information is also sent to user, process ends by misregistration daily record.
In step 1, adopt the method for functional test test mobile device whether to be connected correctly to PC, concrete grammar is as follows:
1. use adb order execution copy command, the test file be pre-existing in be copied in PC under specified path in mobile device;
2. whether there is the test file of new copy under inquiring about PC specified path, if exist, then illustrate that the connection of mobile device and PC is normal, otherwise, there is connectivity problem;
3., after aforesaid operations terminates, delete the test file under assigned catalogue in PC, prevent from having an impact to subsequent verification operations.
In step 2, the All Files under assigned catalogue in mobile device can copy by adb order.Wherein property file is kept in this file of RoutingResult, second-level directory is there is not in file, All Files is named with the form of " digital .json ", what wherein digitized representation file was preserved patrols and examines domain number, and each json file saves certain and patrols and examines all of position and patrol and examine attribute data information; Multimedia file is kept in this file of RoutingFiles, file next stage catalogue is named with YYYY-MM-DD, represent the date-time that multimedia file produces, under each date file folder, comprise two first class catalogues, be respectively image and video, wherein in image file, preserve in this date all pictorial informations produced, in video file, preserve in this date all video informations produced.
The parsing attribute data storage method of step 3 is specially:
1. the file path circulation of the All Files of (as D:/RoutingTmp/RoutingResult) under drive folder content will be specified to obtain, and leave in a List, and by this List called after List_fileName;
2. searching loop List_fileName, first reads the file content under each file path, then file content is converted into json form.According to patrolling and examining data loading requirement, construction data model, by the data of each file by standardized json format conversion in data model objects, and preserve into the List of a data model objects, called after List_dataModel;
Underlying table data in data model objects, after obtaining each data model objects, are resolved, stored in data of attribute information storehouse by 3. searching loop List_dataModel.
4. the result table data in data model objects are resolved, stored in data of attribute information storehouse, wherein all result table records all associate above-mentioned stored in underlying table record.Stored in process, generate a Map, its name is called Map_result, its key is the id numbering of result object in data model objects, and its value is corresponding result object id numbering in a database.
5. the picture table data in data model objects are resolved, stored in data of attribute information storehouse.Stored in process, generate a Map, its name is called Map_image, its key is the id numbering of object picture in data model objects, and its value is corresponding object picture id numbering in a database.
6. the videometer data in data model objects are resolved, stored in data of attribute information storehouse.Stored in process, generate a Map, its name is called Map_video, its key is the id numbering of object video in data model objects, and its value is corresponding object video id numbering in a database.
7. the data of patrolling and examining result-picture correspondence table in data model objects are resolved, in conjunction with Map_result and Map_image, by the corresponding relation that the data transformations of patrolling and examining in result-picture correspondence table is in actual database table, finally stored in data of attribute information storehouse.
8. the data of patrolling and examining result-video corresponding table in data model objects are resolved, in conjunction with Map_result and Map_video, by the corresponding relation that the data transformations of patrolling and examining in result-video corresponding table is in actual database table, finally stored in data of attribute information storehouse.
9., after said process all terminates, all of a position patrol and examine information completely warehouse-in, all data model objects of searching loop, after the information of patrolling and examining of all sites being put in storage, patrol and examine attribute data in-stockroom operation and terminate.
In step 4, definition multimedia data storage method is specially: definition multimedia data, drive (as D) will be specified: the All Files under/RoutingTmp/RoutingFiles folder content carries out searching loop parsing, and carry out contrast with the file that exists in multimedia database and verify, if there is not this file in multimedia database, then files passe warehouse-in; Otherwise, skip this file and continue operation, till All Files operated, wherein, adopt the mode of ftp files passe that multimedia file is uploaded to multimedia database.
(2) PC end patrols and examines data download method, and its concrete steps are as follows:
Step 1: test mobile device whether with PC computing machine exact connect ion, if exact connect ion, then enter step 2; Otherwise, enter step 6;
Step 2: by patrol and examine position table, table of altitudes, user message table, points for attention table information all take out, be placed in a json file, preserve into file under tempFile/data catalogue, file name is def.json, successful operation then enters step 3, otherwise, enter step 6;
Step 3: the record taking out all inspection item the last times from Patrol Inspection Database, if the project of patrolling and examining has 8, then generates corresponding 8 patrol record json files, and under being saved in tempFile/data catalogue, successful operation then enters step 4, otherwise, enter step 6;
Step 4: all monitoring times of patrolling and examining position parsing derivation, under the file under all corresponding time files is downloaded to tempFile/file catalogue from ftp server, successful operation then enters step 5, otherwise, enter step 6;
Step 5: all copy in the assigned catalogue in pad by all data in tempFile file, successful operation, flow process terminates, otherwise, enter step 6;
Step 6: bomp information is also sent to user, process ends by misregistration daily record.
In step 1, adopt the method for functional test test mobile device whether to be connected correctly to PC computing machine, concrete grammar is as follows:
1. use adb order execution copy command, the test file be pre-existing in be copied in PC computing machine under specified path in mobile device;
2. whether there is the test file of new copy under inquiring about PC computing machine specified path, if exist, then illustrate that the connection of mobile device and PC is normal, otherwise, there is connectivity problem;
3., after aforesaid operations terminates, delete the test file under assigned catalogue in PC, prevent from having an impact to subsequent verification operations.
In step 2, by patrol and examine position table, table of altitudes, user message table, points for attention table attribute information be packaged into a data model objects, after taking out corresponding data respectively from each table, insert in data model objects, after pending data model object correctly generates, data model objects is converted into json form, and saves as file.
In step 3, from database, take out the record of all inspection item the last times, generate corresponding patrol record json file of patrolling and examining position quantity.If have 8 to patrol and examine position, then the project of patrolling and examining has 8, generate corresponding 8 patrol record json files, wherein each patrol record all comprises underlying table information, result table information, picture table information, videometer information, result table information corresponding to picture and result and video corresponding table information.In each json file generated process, first the attribute information of each patrol record is packaged into a data model objects, after taking out corresponding data respectively from each table, insert in data model objects, after pending data model object correctly generates, data model objects is converted into json form, and saves as file.
In step 4, circulation obtains all monitoring times of patrolling and examining position of deriving, and be kept in a HashSet, because the element in HashSet is all mutual exclusion, therefore monitoring time does not exist the situation of repetition.The above-mentioned HashSet of searching loop, under file under all corresponding time files downloads to tempFile/file catalogue from ftp server, in the process downloaded, each file layout downloaded is as follows: file is named with YYYY-MM-DD, represent the date-time that multimedia file produces, under each date file folder, comprise two first class catalogues, be respectively image and video, wherein preserve in this date all pictorial informations produced in image file, in video file, preserve in this date all video informations produced.
In steps of 5, adopt the copy function of adb order execute file, concrete copied files is the All Files under tempFile/data catalogue and the All Files under tempFile/file catalogue.Wherein deposit definition list data and a corresponding up-to-date patrol record of patrolling and examining position under tempFile/data catalogue, under tempFile/file catalogue, deposit multi-medium data corresponding to above-mentioned patrol record.
Beneficial effect: PC end and mobile terminal method of data synchronization of patrolling and examining business based on water conservancy project provided by the invention, after efficiently solving the mode of patrolling and examining the typing of process employing mobile terminal, the problem of PC end and mobile terminal data syn-chronization, conveniently patrol and examine data can automatically, in time, accurately put in storage, data processing time is patrolled and examined in saving, improves patrol officer's work efficiency and accuracy.
Accompanying drawing explanation
Fig. 1 be based on water conservancy project patrol and examine business PC end with mobile terminal patrol and examine data of attribute information library structure figure;
Fig. 2 is that the mobile terminal of patrolling and examining business based on water conservancy project patrols and examines data uploading method process flow diagram;
Fig. 3 be based on water conservancy project patrol and examine business PC end patrol and examine data download method process flow diagram;
Fig. 4 is that the PC end of patrolling and examining business based on water conservancy project is patrolled and examined in data download method and patrolled and examined file structure figure.
Embodiment
Below in conjunction with specific embodiment, illustrate the present invention further, these embodiments should be understood only be not used in for illustration of the present invention and limit the scope of the invention, after having read the present invention, the amendment of those skilled in the art to the various equivalent form of value of the present invention has all fallen within the application's claims limited range.
Fig. 1 be the present embodiment patrol and examine data of attribute information library structure figure.The data of attribute information storehouse mentioned in the present embodiment comprises patrols and examines position and elevation, position table, makes an inspection tour result table, patrol record base table, result-picture contingency table, picture table, result-video contingency table, videometer and position table.Patrol and examine result to leave in tour result table, can see, patrol and examine result and be divided into patrol record base table (i.e. attribute data information) and multimedia data information (picture table and videometer).Patrol and examine position for different, establish and patrol and examine position and elevation, position table and position table.For data recording multimedia data information in attribute information and the corresponding relation of patrolling and examining result, set up and patrol and examine result-picture contingency table and patrol and examine result-video contingency table.
Mobile terminal is patrolled and examined data upload and can be completed and import in PC end by patrol and examine attribute essential information and the multimedia data information in mobile device, by to the classification process of patrolling and examining data, can be data object by master data convert information, stored in database, by multi-medium data stored in multimedia database, effectively can manage and patrol and examine data; PC end is patrolled and examined data and is downloaded, and can download up-to-date water conservancy project and patrol and examine data to mobile terminal, facilitate user to obtain the object information of patrolling and examining last time when patrolling and examining at every turn, and can compare with current field condition of patrolling and examining, pass judgment on hydraulic safety situation from PC end.
Fig. 2 is that the mobile terminal of patrolling and examining business based on water conservancy project patrols and examines data uploading method process flow diagram.Patrol and examine data uploading method below in conjunction with Fig. 2 to mobile terminal to be described in detail.
(S201) perform adb copy command, as adb pull data/databases/test.db c:/windows/db, the test file tset.db prestored is copied to specified path in PC end, as c:/windows/db in mobile terminal;
(S202) inquire about under PC holds c:/windows/db catalogue and whether there is test file tset.db, if exist, then illustrate that mobile terminal and PC hold and be connected normally, proceed to (S203); Otherwise illustrate that mobile terminal and PC hold to be connected and have problems, prompting user checks connection device or data connecting line, proceeds to (S217);
(S203) delete the tset.db file under PC end c:/windows/db catalogue, prevent from having an impact to subsequent verification operations.
(S204) adb copy command is performed, as adb pull data/databases D:/RoutingTmp, under the All Files of assigned catalogue data/databases/ in mobile terminal being copied to PC end appointment D:/RoutingTmp catalogue.In data/databases catalogue, all attribute data information of patrolling and examining is kept in D:/RoutingTmp/RoutingResult file, wherein All Files is all named with the form of " digital .json ", what wherein digitized representation file was preserved patrols and examines domain number, and each json file saves certain and patrols and examines all of position and patrol and examine attribute data information.
Illustrate for 1.json, 1.json file content is as follows.
{ " baseTable ": { " addition ": " ", " basergionId ": 1, " condition ": " without running ", " downLevel ": 996.12, " id ": 90, " rainfallCondition ": 0, " recorder ": admin ", " releaseCondition ": 0, " routingHead ": " admin ", " routingStaff ": " admin ", " routingTime ": " 2014-07-1808:00:00 ", " upLevel ": 1205.63}, " imageList ": [{ " id ": 62, " name ": " 20140718131438.jpg ", " path ": " 20140718/image/20140718131438.jpg ", " size ": null}], " imageResultMapList ": [{ " id ": 50, " resultId ": 842, " routingPhotoesId ": 62}], " resultList ": [{ " baseTableId ": 90, " describe ": " can not ", " id ": 842, " itemId ": 1, " result ": 11, " rgionId ": 1}], " videoList ": [], " videoResultMapList ": [] }
Can find out that json file contains image data information table imageTable in master data information table baseTable, file data information, image data information event memory List and shows imageResultMapList, master data information event memory List table ResultList, video data information table videoTable and video data information event memory List table videoResultMapList.
Multimedia messages comprises photo and video file, carry out classification according to the date of formation to store, multimedia file is kept in D:/RoutingTmp/RoutingFiles file, file next stage catalogue was named with the date, represent the date-time that multimedia file produces, under each date file folder, comprise two first class catalogues, be respectively image and video, wherein preserve in this date all pictorial informations produced in image file, in video file, preserve in this date all video informations produced.
(S205) copy function whether success is judged, successful then continue, proceed to (S206); Otherwise failure, proceeds to (S217) and reports an error.
(S206) attribute data warehouse-in is patrolled and examined in parsing.Patrol and examine attribute data to refer to and patrol and examine attribute data information.The circulation of the file path of the All Files of (as D:/RoutingTmp/RoutingResult) under folder content is obtained, and leave in a List, simultaneously, be List_fileName by this List file designation, its content is as follows: D:/RoutingTmp/RoutingResult/1.json, D:/RoutingTmp/RoutingResult/2.json ..., the routing information of all properties data message file can be inquired by this List file.
(S207) searching loop List_fileName file, by D:/RoutingTmp/RoutingResult/1.json, D:/RoutingTmp/RoutingFiles/2.json ... Deng file successively file reading content.
Illustrate for 1.json and patrol and examine attribute data warehouse-in process.
Contain in 1.json and patrol and examine attribute informations all in position 1, due to this json file may have that form is lack of standardization, the mobile device coded format that stores this file and PC hold the problems such as inconsistent, need to carry out this file standardization verification operation, 1.json file content is read, stored in the 1.json file completed after standardization verification, can complete file standardization operation, the 1.json after process is as follows.
(S208) by data transformations to data model objects, and preserve into the List of a data model objects.
Illustrate for the 1.json after normalizing operation.The patrol record base table of attribute information storage, picture table, result-picture contingency table, result table, videometer and result-video contingency table 6 object is there is in 1.json file, can these 6 objects be transformed in data model objects, and preserve into the List of a data model objects, called after List_dataModel.For 1.json file, the information stored in List_dataModel.list is as follows:
dataModel.baseTable.addition=0;
DataModel.baseTable.basergionId=1; (annotation: herein can find out, what dataModel.baseTable.basergionId was used for indicating this data model objects place patrols and examines position.)
(in baseTable, other attribute formats are as above, below suspension points implication with herein.)
dataModel.imageList.content01=null;
……
dataModel.imageResultMapList.id=50;
……
dataModel.resultList.baseTableId=90;
……
dataModel.videoList=0;
dataModel.videoResultMapList=0;
(S209) searching loop List_dataModel.list file, by the attribute data in file stored in data of attribute information storehouse.
(S210) the result table ResultList data in resolution data model object, stored in data of attribute information storehouse.
(S211) all records in result table ResultList all associate above-mentioned stored in data of attribute information storehouse record.Incidence relation is set up by the mode generating Map file.
Stored in process, generate a Map file, called after Map_result, its key are the id numbering of result object in data model objects, and its value is corresponding result object id numbering in a database.
Corresponding with picture for result in the data model objects data shown being resolved, in conjunction with Map_result and Map_image, is the corresponding relation in actual database table by data transformations, finally stored in data of attribute information storehouse.
The data of the result in data model objects and video corresponding table being resolved, in conjunction with Map_result and Map_video, is the corresponding relation in actual database table by data transformations, finally stored in data of attribute information storehouse.
After said process all terminates, all of a position patrol and examine information completely warehouse-in, all data model objects of searching loop, after the information of patrolling and examining of all sites being put in storage, patrol and examine attribute data in-stockroom operation and terminate.
(S212) definition multimedia data loading.Definition multimedia data, All Files under D:/RoutingTmp/RoutingFiles folder content is carried out searching loop parsing, multiple file is comprised under D:/RoutingTmp/RoutingFiles folder content, name with YYYY-MM-DD, represent the date-time that multimedia file produces, under each date file folder, comprise two catalogues, be respectively image and video.
(S213) in resolving, the multimedia data file under many media data file clip directories and the multimedia file in multimedia database.
(S214) judge whether there is this file in multimedia database, if exist, then proceed to (S214), otherwise, proceed to (S215).
(S215) judge whether to execute All Files, if the complete All Files of executed, then this module terminates; Otherwise, proceed to (S216).
(S216) file uploads warehouse-in by mobile terminal, adopts the mode of ftp files passe that multimedia file is uploaded to multimedia database.Such as, there is the picture of a called after 20140729172301.jpg in D:/RoutingTmp/RoutingFiles/20140729/image file, in D:/RoutingTmp/RoutingFiles/20140729/video file, there is the video of one section of called after 20140729172301.avi.Multimedia database preserves file according to this file directory, the method whether comparison document has existed is comparison document path, as whether there is the picture of a called after 20140729172301.jpg in/RoutingTmp/RoutingFiles/20140729/image file, if exist, illustrate in multimedia database to there is this file, do not need to upload, if do not exist, adopt the mode of ftp files passe that multimedia file is uploaded to multimedia database.
(S217) misregistration daily record error message is sent to user.
Fig. 3 be based on water conservancy project patrol and examine business PC end patrol and examine data download method process flow diagram.Patrol and examine data download module below in conjunction with Fig. 3 to PC end to be described in detail.
(S301) perform adb copy command, as adb pull data/databases/test.db c:/windows/db, the test file tset.db prestored is copied to specified path in PC end, as c:/windows/db in mobile terminal;
(S302) inquire about under PC holds c:/windows/db catalogue and whether there is test file tset.db, if exist, then illustrate that mobile terminal and PC hold and be connected normally, proceed to (S303); Otherwise illustrate that mobile terminal and PC hold to be connected and have problems, prompting user checks connection device or data connecting line, proceeds to (S309);
(S303) delete the tset.db file under PC end c:/windows/db catalogue, prevent from having an impact to subsequent verification operations.
(S304) information in PC client database table (patrolling and examining position table, table of altitudes, subscriber's meter, points for attention table) is all taken out, be stored in the json file of a called after def.json, and under this file is kept at tempFile/data catalogue.
Information as admin in subscriber's meter can be converted into:
(S305) from database, take out all records of patrolling and examining project the last time, each patrol record corresponding to project of patrolling and examining comprises underlying table information baseTable, result table information resultList, picture table information imageList, videometer information videoList, result table information imageResultMapList corresponding to picture and result and video corresponding table information videoResultMapList.Attribute information is packaged into data model objects, then is converted into json form.
As existed as properties in patrol record base table baseTable: points for attention addition, place coding basergionId, buildings ruuning situation condition, level of tail water downLevel, patrol record mark id, rain fall rainfallCondition, recorder recorder, flood discharge situation releaseCondition, patrol and examine in responsible official routingHead, patrol officer routingStaff, monitoring time routingTime, upper pond level upLevel, baseTable table and also have the value that each attribute is corresponding.
BaseTable table is converted into data object, and result is as follows:
BaseTable.addition=0; Points for attention attribute in // definition patrol record base table object, value is 0
BaseTable.basergionId=1; Position encoded attributes in // definition patrol record base table object, value is 1
(economizing the conversion results of other attributes in slightly baseTable table herein)
The data object generated based on baseTable table is converted into standard json statement below, result is as follows:
Same, result table information resultList, picture table information imageList, videometer information videoList, result table information imageResultMapList corresponding to picture and result and video corresponding table information videoResultMapList can be converted into standard json statement, according to the difference of patrolling and examining position, called after 1.json, 2.json can be saved as successively ..., json quantity of documents is consistent with patrolling and examining inspection item quantity.
(S306): circulation obtains each monitoring time of patrolling and examining position of deriving, be kept in a HashSet, if the value patrolling and examining routingTime in baseTable in position 1 is 2014-07-1808:00:00, because the file in multimedia database names with YYYY-MM-DD form, get 20140718 for patrolling and examining the monitoring time of the last time at position 1, this time is kept in newly-built HashSet.
(S307) after acquisition monitoring time terminates, the above-mentioned HashSet of searching loop, under file under all corresponding time files is downloaded to tempFile/file catalogue from ftp server, the file layout of each download is as follows: file is named with YYYY-MM-DD form, represent the date-time that multimedia file produces, under each date file folder, comprise two first class catalogues, be respectively image and video.Wherein preserve in this date all pictorial informations produced in image file, in video file, preserve in this date all video informations produced.
File path as downloaded is D:/tempFile/file/20140718/image/20140718181801.jpg, represents the picture file that this file is the called after 20140718181801.jpg that on July 18th, 2014 produces.
(S308) copy function of adb order execute file is adopted, by All Files (1.json, 2.json under tempFile/data catalogue ...) and tempFile/file catalogue under All Files (multimedia file) copy in mobile device.
Instruction is as follows: adb pull D:D:/tempFile/data data/tempFile/data; The file copied under respective file catalogue in mobile device can be checked, and use mobile device to operate on it management.
(S309) misregistration daily record error message is sent to user.
As shown in Figure 4, PC end is patrolled and examined in data download method and is patrolled and examined file structure figure example, comprise and patrol and examine file root directory 401 (in figure D:/RoutingTmp 401), attribute data file 402 (in figure RoutingResult402), attribute data json file 403 (1.json in figure, 2.json ...), multimedia data file folder 404 (in figure RoutingFiles 404), date sub-folder 405 (from date in figure, Close Date), picture sub-folder 406 (in figure Image 406) and video sub-folder 407 (in figure Video 407).
In S204, the content of file structure is herein described.From mobile terminal, will patrol and examine file copy by adb order patrols and examines in file root directory 401 to PC end, wherein attribute data is stored in attribute data file 402, be stored in patrol and examine in the json file of numerical designation corresponding to position, as 403 attribute data file 1.json according to patrolling and examining position again.Multi-medium data is first stored in multimedia data file folder 404, then according to date date created sub-folder 405, finally picture file and video file is stored in respectively in picture sub-folder 406 and video sub-folder 407 according to classification.

Claims (9)

1. based on water conservancy project patrol and examine business PC end with a mobile terminal method of data synchronization, it is characterized in that, comprise mobile terminal patrol and examine data uploading method and PC end patrol and examine data download method two parts:
(1) mobile terminal patrols and examines data uploading method:
(1) whether testing mobile terminal holds exact connect ion with PC;
(2) file under assigned catalogue in mobile terminal being copied to PC holds in specified folder;
(3) attribute data is patrolled and examined in parsing, will patrol and examine attribute data and be converted into json data, and be packaged into satisfactory new json data, then resolve warehouse-in;
(4) resolve and patrol and examine multi-medium data, by with patrol and examine the file existed in multimedia database and carry out contrast and verify, non-existent files passe is put in storage;
(2) PC end patrols and examines data download method:
(5) testing mobile terminal and PC hold whether exact connect ion;
(6) will the database table information of patrolling and examining derived be needed to put into json file;
(7) find out the last patrol record in database, generate patrol record json file;
(8) monitoring time is resolved, by the file download under corresponding time file to assigned catalogue;
(9) by adb order, the last time is patrolled and examined data copy in mobile terminal.
2. patrol and examine as claimed in claim 1 PC end and the mobile terminal method of data synchronization of business based on water conservancy project, it is characterized in that, whether described testing mobile terminal holds the concrete steps of exact connect ion to be with PC:
(1.1) adb order is used to perform copy command, under the test file prestored in mobile terminal being copied to PC end specified path;
(1.2) whether there is the test file of new copy under inquiring about PC end specified path, if exist, then illustrate that mobile terminal and PC hold and be connected normally, otherwise, illustrate to there is connectivity problem;
(1.3), after aforesaid operations terminates, the test file under assigned catalogue in PC end is deleted.
3. patrol and examine PC end and the mobile terminal method of data synchronization of business as claimed in claim 1 based on water conservancy project, it is characterized in that, the concrete steps of described step (2) are:
(2.1) perform adb order, the All Files under assigned catalogue in mobile terminal is carried out copy PC end to;
(2.2) for patrolling and examining property file, be saved in RoutingResult file, All Files is with the form of " digital .json " name, and what wherein digitized representation file was preserved patrols and examines domain number;
(2.3) for patrolling and examining multimedia file, be saved in this file of RoutingFiles, file next stage catalogue is named with YYYY-MM-DD form, the date-time that multimedia file produces is patrolled and examined in representative, under each time file, comprise two files, be respectively image and video, wherein preserve all of this time generation in image file and patrol and examine pictorial information, preserve produce in this time all in video file and patrol and examine video information.
4. patrol and examine PC end and the mobile terminal method of data synchronization of business as claimed in claim 1 based on water conservancy project, it is characterized in that, the concrete steps of described step (3) are:
(3.1) circulation of the file path of the All Files under specified file clip directory is obtained, and leave in List, meanwhile, called after List_fileName;
(3.2) searching loop List_fileName, for the first file reading content of the file under each file path, then is converted into json form by file content; According to patrolling and examining data loading requirement, construction data model, by the data of each file by standardized json format conversion in data model objects, and preserve in the List of a data model objects, meanwhile, called after List_dataModel;
(3.3) the underlying table data in data model objects, after obtaining each data model objects, are resolved, stored in data of attribute information storehouse by searching loop List_dataModel;
(3.4) the result table data in data model objects are resolved, stored in data of attribute information storehouse, wherein all result table records all associate above-mentioned stored in underlying table record; In data stored in process, generating a Map file, is the id numbering of result object in data model objects by its called after Map_result, its key, and its value is corresponding result object id numbering in a database;
(3.5) the picture table data of patrolling and examining in data model objects are resolved, stored in data of attribute information storehouse; Stored in process, generating a Map file, is the id numbering of object picture in data model objects by its called after Map_image, its key, and its value is corresponding object picture id numbering in a database;
(3.6) the videometer data of patrolling and examining in data model objects are resolved, stored in data of attribute information storehouse;
Stored in process, generating a Map file, is the id numbering of object video in data model objects by its called after Map_video, its key, and its value is corresponding object video id numbering in a database;
(3.7) data of patrolling and examining result-picture correspondence table in data model objects being resolved, in conjunction with Map_result and Map_image, is the corresponding relation in actual database table by data transformations, finally stored in data of attribute information storehouse;
(3.8) data of patrolling and examining result-video corresponding table in data model objects being resolved, in conjunction with Map_result and Map_video, is the corresponding relation in actual database table by data transformations, finally stored in data of attribute information storehouse.
5. patrol and examine PC end and the mobile terminal method of data synchronization of business as claimed in claim 1 based on water conservancy project, it is characterized in that, the concrete steps of described step (4) are:
(4.1) multi-medium data is patrolled and examined in parsing, and the All Files under assigned catalogue is carried out searching loop parsing;
(4.2) with patrol and examine the file existed in multimedia database and carry out contrast and verify, there is not this file if patrol and examine in multimedia database, then adopt ftp mode to upload and patrol and examine multimedia file to multimedia database, otherwise, skip the continuation of this file and operate.
6. patrol and examine PC end and the mobile terminal method of data synchronization of business as claimed in claim 1 based on water conservancy project, it is characterized in that, the concrete steps of described step (6) are:
(6.1) by patrol and examine position table, table of altitudes, user message table, points for attention table attribute information be packaged into a data model objects;
(6.2) after taking out corresponding data respectively from each table, insert in data model objects, after pending data model object correctly generates, data model objects is converted into json form, and saves as file.
7. patrol and examine PC end and the mobile terminal method of data synchronization of business as claimed in claim 1 based on water conservancy project, it is characterized in that, the concrete steps of described step (7) are:
(7.1) from database, take out the record of all inspection item the last times, according to the quantity of the project of patrolling and examining, generate the patrol record json file of corresponding quantity;
(7.2) for the json file that each patrol record is corresponding, the attribute information of each patrol record is packaged into a data model objects, after taking out corresponding data respectively from each table, insert in data model objects, after pending data model object correctly generates, data model objects is converted into json form, and saves as file.
8. patrol and examine PC end and the mobile terminal method of data synchronization of business as claimed in claim 1 based on water conservancy project, it is characterized in that, the concrete steps of described step (8) are:
(8.1) circulation obtains all monitoring times of patrolling and examining position of deriving, and is kept in a HashSet;
(8.2) searching loop HashSet, under the file under all corresponding time files downloads to tempFile/file catalogue from ftp server; The file layout of each download is as follows: file is named with YYYY-MM-DD, represent the date-time that multimedia file produces, under each date file folder, comprise two first class catalogues, be respectively image and video, wherein preserve in this date all pictorial informations produced in image file, in video file, preserve in this date all video informations produced.
9. patrol and examine PC end and the mobile terminal method of data synchronization of business as claimed in claim 1 based on water conservancy project, it is characterized in that, the concrete steps of described step (9) are:
(9.1) adopt the copy function of adb order execute file, concrete copied files is the All Files under tempFile/data catalogue and the All Files under tempFile/file catalogue;
(9.2) deposit definition list data and a corresponding up-to-date patrol record of patrolling and examining position under tempFile/data catalogue, under tempFile/file catalogue, deposit multi-medium data corresponding to above-mentioned patrol record.
CN201410737631.1A 2014-12-05 2014-12-05 Data synchronization method of PC (Personnel Computer) end and mobile terminal based on hydraulic polling business Pending CN104361128A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410737631.1A CN104361128A (en) 2014-12-05 2014-12-05 Data synchronization method of PC (Personnel Computer) end and mobile terminal based on hydraulic polling business

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410737631.1A CN104361128A (en) 2014-12-05 2014-12-05 Data synchronization method of PC (Personnel Computer) end and mobile terminal based on hydraulic polling business

Publications (1)

Publication Number Publication Date
CN104361128A true CN104361128A (en) 2015-02-18

Family

ID=52528388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410737631.1A Pending CN104361128A (en) 2014-12-05 2014-12-05 Data synchronization method of PC (Personnel Computer) end and mobile terminal based on hydraulic polling business

Country Status (1)

Country Link
CN (1) CN104361128A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426515A (en) * 2015-12-01 2016-03-23 小米科技有限责任公司 Video classification method and apparatus
CN108416061A (en) * 2018-03-26 2018-08-17 福州大学 The foundation of unmanned plane Image Database, classification and the search method of suitable power inspection
CN108761237A (en) * 2018-05-29 2018-11-06 福州大学 Unmanned plane electric inspection process image vital electrical component diagnoses automatically and labeling system
CN111159101A (en) * 2019-12-11 2020-05-15 中国电建集团华东勘测设计研究院有限公司 Electronic file full life cycle management method in hydraulic and hydroelectric engineering construction management
CN111935214A (en) * 2020-06-29 2020-11-13 中铁第一勘察设计院集团有限公司 Data transmission method based on field mobile equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050211777A1 (en) * 2003-07-29 2005-09-29 General Electric Company Method and apparatus for controlling site-specific operations
CN103578154A (en) * 2013-11-21 2014-02-12 国家电网公司 PDA-based realization method for intelligent patrol of electric equipment
CN103679349A (en) * 2013-11-28 2014-03-26 国家电网公司 Android based cellphone inspection terminal system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050211777A1 (en) * 2003-07-29 2005-09-29 General Electric Company Method and apparatus for controlling site-specific operations
CN103578154A (en) * 2013-11-21 2014-02-12 国家电网公司 PDA-based realization method for intelligent patrol of electric equipment
CN103679349A (en) * 2013-11-28 2014-03-26 国家电网公司 Android based cellphone inspection terminal system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105426515A (en) * 2015-12-01 2016-03-23 小米科技有限责任公司 Video classification method and apparatus
US10115019B2 (en) 2015-12-01 2018-10-30 Xiaomi Inc. Video categorization method and apparatus, and storage medium
CN105426515B (en) * 2015-12-01 2018-12-18 小米科技有限责任公司 video classifying method and device
CN108416061A (en) * 2018-03-26 2018-08-17 福州大学 The foundation of unmanned plane Image Database, classification and the search method of suitable power inspection
CN108761237A (en) * 2018-05-29 2018-11-06 福州大学 Unmanned plane electric inspection process image vital electrical component diagnoses automatically and labeling system
CN111159101A (en) * 2019-12-11 2020-05-15 中国电建集团华东勘测设计研究院有限公司 Electronic file full life cycle management method in hydraulic and hydroelectric engineering construction management
CN111935214A (en) * 2020-06-29 2020-11-13 中铁第一勘察设计院集团有限公司 Data transmission method based on field mobile equipment

Similar Documents

Publication Publication Date Title
CN104361128A (en) Data synchronization method of PC (Personnel Computer) end and mobile terminal based on hydraulic polling business
CN104317800A (en) Hybrid storage system and method for mass intelligent power utilization data
CN105989431A (en) Power transmission and transformation project construction field management system
CN109284273B (en) Massive small file query method and system adopting suffix array index
CN107315774B (en) Mobile internet-based marketing, distribution and dispatching integrated data general survey system and general survey method
CN111831856B (en) Metadata-based automatic holographic digital power grid data storage system and method
CN107798062A (en) A kind of transformer station's historical data unifies storage method and system
CN110288228A (en) A kind of land quality GEOCHEMICAL SURVEY acquisition system
CN111694554B (en) Visual subway construction quality tracing system and control method thereof
CN112860642A (en) Court trial data processing method, server and terminal
CN115080774A (en) Remote sensing image warehousing system and method based on available domain
CN114255010A (en) Electronic file archival management and knowledge service collaborative implementation method in electronic government platform
CN113721856A (en) Digital community management data storage system
CN111258884B (en) System for automatically generating interface accuracy verification script
CN115935042B (en) Mortgage asset intelligent duplicate checking method and system based on fusion model
CN104392506B (en) Data syn-chronization and data managing method are patrolled and examined in a kind of power station water conservancy project for supporting multiple terminals platform
CN112395292B (en) Data feature extraction and matching method and device
CN110727726B (en) Method and system for extracting data from document database to relational database
Shen et al. Publishing distributed files as Linked Data
CN109614692A (en) A kind of novel trivector acquisition and edit methods and device based on oblique model
Li et al. Research and practice on the whole process management and sharing technology system of multi-source heterogeneous spatio-temporal data
CN108075932B (en) Data monitoring method and device
CN110955832A (en) Information resource sharing exchange platform
CN114079668B (en) Information acquisition and arrangement method and system based on internet big data
Liu et al. Design and Implementation of Dynamic Update System for Geographical Names and Addresses

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

Application publication date: 20150218