CN105407146A - Data synchronization method from wristband to APP to server - Google Patents

Data synchronization method from wristband to APP to server Download PDF

Info

Publication number
CN105407146A
CN105407146A CN201510706077.5A CN201510706077A CN105407146A CN 105407146 A CN105407146 A CN 105407146A CN 201510706077 A CN201510706077 A CN 201510706077A CN 105407146 A CN105407146 A CN 105407146A
Authority
CN
China
Prior art keywords
data
app
server
bracelet
value
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.)
Granted
Application number
CN201510706077.5A
Other languages
Chinese (zh)
Other versions
CN105407146B (en
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.)
Chengdu Ai Keerte Medical Science And Technology Co Ltd
Original Assignee
Chengdu Ai Keerte Medical Science And 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 Chengdu Ai Keerte Medical Science And Technology Co Ltd filed Critical Chengdu Ai Keerte Medical Science And Technology Co Ltd
Priority to CN201510706077.5A priority Critical patent/CN105407146B/en
Publication of CN105407146A publication Critical patent/CN105407146A/en
Application granted granted Critical
Publication of CN105407146B publication Critical patent/CN105407146B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1671Details of the supervisory signal the supervisory signal being transmitted together with control information
    • H04L1/1678Details of the supervisory signal the supervisory signal being transmitted together with control information where the control information is for timing, e.g. time stamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps

Abstract

The invention discloses a data synchronization method from a wristband to an APP to a server. Packet data are assembled according to a packet format, and a notify event is triggered; the APP end receives and analyzes a packet header, a corresponding byte number is received according to the current packet content byte number length and is put in cache, overall verification and analysis are carried out, and the successfully-received content byte number is written back; the wristband end receives the back-written data, the back-written data are compared with a byte number of the last packet transmission content, and if the verification is passed, data in a memory are deleted, and next data synchronization is issued; according to an uploading time stamp and an uploading maximum ID value locally recorded by the APP, uploaded data are acquired, and uploading is executed; a server uploading interface is connected, the uploaded data content is analyzed, and a success identifier is returned after successful processing. Through adopting the data synchronization method, correctness and integrity of the data during the data synchronization method among the wristband, the APP and the server can be realized, and loss and incompleteness of data during the downloading process and the uploading process can be effectively solved.

Description

A kind of method of data synchronization again to server from bracelet to APP
Technical field
The present invention relates to a kind of bracelet be worn in user's wrist, be specifically related to the method for data synchronization of this bracelet and server, relate to a kind of method of data synchronization again to server from bracelet to APP more specifically, belong to wearable device technical field.
Background technology
App operates on the mobile devices such as IPhone or IPad, carry out being connected and communication with bracelet by Bluetoothlowenergy (BLE) agreement of bluetooth 4.0, the sign data that bracelet collects is synchronized to server in two steps, the sign initial data that first step bracelet collects uploads to APP by bluetooth BLE under message mechanism data integrity, and second step APP carries out data syn-chronization by network and server under timestamp and maximum ID value mechanism data integrity.
Android is to the support of BLE agreement, read at continuous big data quantity and have delayed response, data packetloss, data packet disorder phenomenon, current Apple bracelet is because to the support of ble agreement comparatively early, agreement support is more mature and stable, and other company's bracelets read at continuous big data quantity and have more obvious delayed response, data packetloss, data packet disorder phenomenon.
Therefore, be necessary to propose a kind of technical scheme, effectively can solve reading data delay and respond late, data packetloss, the problems such as data packet disorder phenomenon, are user-friendly to, become a kind of new technical need.
Summary of the invention
For prior art above shortcomings, the present invention proposes a kind of method of data synchronization again to server from bracelet to APP, the notify action listener of the built-in character pair item of APP also keeps data syn-chronization; Press message format assembling message data, and trigger notify event; APP termination is received and analytic message head Header, receives corresponding byte number, put into buffer memory by current message content word joint number length, and overall verification is resolved, and write-back receives successful content word joint number; Bracelet termination receives write-back and sends content word joint number with last message and compare, and verification is passed through, and deletes memory data, initiates data syn-chronization next time; According to uplink time stamp and the maximum ID value acquisition uploading data of APP local record, execution is uploaded; Connection server uploads interface, resolves uploading data content, processes and is successfully back into merit mark; By adopting this method of data synchronization, realizing the correct and integrality of data in the data synchronization process of bracelet, APP and server, effectively solving loss and the imperfection of data in download and upload procedure.
The present invention solves its technical problem, and the technical scheme adopted is: a kind of method of data synchronization again to server from bracelet to APP, said method comprising the steps of:
The notify action listener of the built-in character pair item of step 100:APP also keeps data syn-chronization, and the action listener cycle is that in APP connection, bracelet disconnects to bracelet;
Step 200: whether bracelet end consults memory exists data, if there are data, by message format assembling message data, and triggers notify event;
Step 300:APP termination is received and analytic message head Header, calculate current message content word joint number and spare word joint number and message content CRC16 value, corresponding byte number is received by current message content word joint number length, put into buffer memory, and overall byte CRC16 verification, if verification is passed through, write-back receives successful content word joint number;
Step 400: bracelet termination receives write-back byte number, and sent byte number last time and contrasts, if successfully delete memory corresponding data byte number, and concurrent data syn-chronization next time;
Step 500: stab according to the uplink time of APP local record and upload and record maximum ID value acquisition uploading data, specifically whether have renewal and maximum ID value identification data to upload an execution according to timestamp mark and upload; Connection server uploads interface, resolves uploading data content, in every bar data record, injects current millisecond value operateTime field and insertignoreinto tables of data, processes and is successfully back into merit mark; APP resolves interface success return data content, upgrades APP local data uplink time stamp and uploads and record maximum ID value;
Step 600: after Account Logon APP success, stab according to APP local record server download time and server downloading data maximum ID value application download, server obtains data-base recording according to timestamp and maximum ID value, process successfully, in return data and data maximum time stamp and data in maximum ID value; APP resolves interface success return data content, and the operateTime field injecting-1 is used for being distinguished as downloading data, and renewal APP home server download time stabs and the maximum ID value of downloading data.
Further, when described APP is connected in real time with bracelet, and APP has triggered bracelet data upload function, and the data that bracelet collects to be stored in memory and real-time by BLE agreement and APP synchrodata; If APP is not when connecting in real time, the data that bracelet collects can be stored in memory, in next APP connection status and triggering synchronous data flow time start synchrodata.
Further, described APP receives sign data, judge APP and server network interface whether unobstructed, if unobstructed, upload onto the server; If APP can not be connected to server in real time, perform and upload in network recovery situation, run the detection service of timing cycle when APP starts, temporally stamp and maximum ID value mechanism detect non-uploading data and upload.
Further, set up bracelet uploading message data transmission mechanism, contents of mechanism comprises: APP be connected with bracelet and triggering synchronous flow process time, data in hardware bracelet end consults memory, assembled by data message form, need in assembling process to ensure that each sign data unit is complete, with 20 bytes for data cell byte stream form, NOTIFY to APP holds, data heading Header is resolved, APP termination receives complete message data flow, if successfully resolved write-back successfully receives content word joint number, bracelet end can delete sign data in data message from memory; If also have data, then initiate the data message of a new data, circulate with this.
Further, described heading Header formal definition: current message data content length field is that 2 byte hexadecimals are expressed, within message data content-length remains on 256 bytes, remaining data total length field is that 4 byte hexadecimals are expressed, current message data content CRC16 value 2 byte hexadecimal is expressed, and described message data content does not comprise the length of header self; When abnormal to data heading Header process: APP end resolves failure or transmitting procedure is abnormal, APP end directly initiates synch command again, and abandons data, and bracelet does not do deletion action and to initiate a new data message mutual.
Further, expanding two bytes at heading Header is current all the elements byte crc16 check value, after a message finishes receiving, APP end is to all the elements byte verification crc16 value, app verifies crc16 value and guarantees data integrity, the successful reception content word joint number of APP write-back two word, bracelet end ensures to delete and sent content same word joint number with last time.
Further, set up APP and server data timestamp and maximum ID value and upload download synchronization mechanism, described contents of mechanism comprises: when APP needs to operate a large amount of local zone time continuous print off-line data, need guarantee complete consistent with server data, when there being new bracelet image data to produce, need timely upload server, ensure data consistent.
Further, described machine-processed appearance is abnormal: when when uploading, generation exceptional interface can not successfully return, APP holds opening timing periodic service, and startup uploading data is left over detection execution and uploaded; Upload interface and return link appearance extremely at interface, when APP successfully records uplink time stamp and maximum ID value, can again execution upload, service end can receive repeating data, re-uses INSERTIGNORE elimination of duplicate data.
Further, described mechanism improvement expansion: during APP logon server, it is same APP that server returns the APP whether logged in the last time, and time not identical, APP just performs down operation.
Further, described APP local record table and service end tables of data are provided with from increasing ID, APP end upload successfully return time, renewal uplink time stamp and local maximum data storehouse table record are from increasing unique ID value, to upload timestamp and the maximum ID value of uploading data table for filter condition, perform and upload next time, upload interface and return successfully, upgrade local uplink time stamp and upload and record maximum ID value; APP end is when downloading data, it is time point before month that initial default download time stabs parameter, maximum ID value is 0, download interface success return service end data table record is from increasing unique maximum ID value, APP end renewal local record download time stamp and maximum ID value, and when upper once downloading data, return this two parameters, service end interface filters with this Parameter Conditions.
Further, described Bluetooth chip adopts nRF51822 chip.
Further, BLEProfile configuration: character pair item possesses NOTIFY ability; BLE protocol capability: each data package size of NOTIFY communication is restricted to 20byte.
Further, character pair item enable switch configures: 0x01 is for starting, and 0x00 is for stopping.
Further, described APP represents that APP operates in the mobile bracelet hardware and software systems supporting BLE function.
Further, when bracelet set of time: APP is connected with bracelet at every turn, first write APP current time to bracelet.
Further, APP local storage function: APP supports sign data local structuring SQLITE database purchase.
Further, synchronization data types definition: the sign data that hardware bracelet collects.
Further, service end capacity scheme: from increasing ID value, sign data table int supports that temporally stamp and maximum ID value mechanism upload download interface, return current service end time interface.
Compared with prior art, the invention has the beneficial effects as follows:
1, pass through to adopt this method of data synchronization, realize the correct and integrality of data in the data synchronization process of bracelet, APP and server, effectively solve loss and the imperfection of data in download and upload procedure;
2, improve method of data synchronization, facilitate and upload or the convenience of downloading data and accuracy, saved time and resource, facilitated the use of client.
Accompanying drawing explanation
Below in conjunction with accompanying drawing, specific embodiment of the invention scheme is elaborated.
Fig. 1 be the preferred embodiment of the present invention a kind of from bracelet to APP again to the structural representation of the method for data synchronization of server.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with embodiment also with reference to accompanying drawing, the present invention is described in more detail.Should be appreciated that, these describe just exemplary, and do not really want to limit the scope of the invention.In addition, in the following description, the description to known features and technology is eliminated, to avoid unnecessarily obscuring concept of the present invention.
Fig. 1 be the preferred embodiment of the present invention a kind of from bracelet to APP again to the structural representation of the method for data synchronization of server;
As shown in Figure 1, said method comprising the steps of:
Step 100:APP opens the notify action listener of character pair item and enable data is synchronous, and the action listener cycle is that in APP connection, bracelet disconnects to bracelet.
Step 200: whether bracelet end consults memory exists data, if there are data, by message format assembling message data, and triggers notifyevent event.
Step 300:APP termination is received and analytic message head, calculate current message content word joint number, spare word joint number, corresponding byte number is received by current message content word joint number length, put into buffer memory, and overall verification is resolved, test condition comprises following two: a) by current message content word joint number, b) by concrete sign data Context resolution; If verification is passed through, write-back receives successful content word joint number.
Step 400: bracelet termination receives write-back and sends content byte with last message and compare, if verification is passed through, deletes memory data, initiates data syn-chronization next time.
Step 500: the uplink time according to APP local record obtains uploading data to stab, and execution is uploaded; Server uploads interface, resolves uploading data content, and injecting operateTime field is current millisecond value, replace tables of data, processes and is successfully back into merit mark; APP resolves interface success return data content, upgrades APP local data uplink time stamp.
Step 600: after Account login APP success, downloads according to the stamp application of APP local record server download time; Server obtains data-base recording according to APP uplink time stamp, processes successfully, and in return data and data, maximum time stabs; APP resolves interface success return data content, and injecting operateTime field is-1, and renewal APP home server download time stabs.
Data syn-chronization opportunity:
When APP is connected in real time with bracelet, and APP has triggered bracelet data upload function, and the data that bracelet collects to be stored in memory and real-time by BLE agreement and APP synchrodata; If APP is not when connecting in real time, the data that bracelet collects can be stored in memory, in next APP connection status and triggering synchronous data flow time start synchrodata.
Whether APP and server receive sign data, judge with server network interface unobstructed in time, if unobstructed, upload onto the server.If APP can not be connected to server in real time, perform and upload in network recovery situation, run the detection service of timing cycle when APP starts, mechanism of temporally stabbing detects non-uploading data and uploads.
Described sign data is the data value that bracelet transducer can gather, and has issued bracelet hardware version at present and can gather heart rate value bpm, blood oxygen levels % and wrist temperature value DEG C.
When user logs in APP, when needing to operate a large amount of sign data source continuously, temporally stab machine-processed downloading data when logging in.
Bracelet uploading message data transmission mechanism:
Requirement definition: bracelet image data is complete as one man uploads to APP.
Mechanism principle: APP be connected with bracelet and triggering synchronous flow process time, data in hardware bracelet end consults memory, assembled by { data message } form, need in assembling process to ensure that each sign data unit is complete, with 20 bytes for data cell byte stream form, NOTIFY to APP holds, by { data message head Header} resolves, APP termination receives complete message data flow, if successfully resolved write-back { successfully receives content word joint number }.Bracelet end can delete sign data in { data message } from memory, if also have data, then initiates { data message } of a new data, circulates with this;
Mechanism description: heading Header formal definition: (message data content-length controls within 256 bytes the current message data content length field of 2 byte hexadecimals expression; Do not comprise the length of header self)+4 byte hexadecimals express remaining data total length field (comprise current data packet, do not comprise the length of header self);
Mechanism abnormality processing and recovery capability: if data message head Header APP holds parsing failure or transmitting procedure extremely, APP holds not write-back message, and abandons data; Bracelet end at wait timeout or when having new data to produce, or when being triggered by APP, can initiate new once { data message } alternately.
Mechanism defect: when the failure of write-back link, APP end may receive repetition uploading data, needs to do repeating data process; When after abnormal generation, the resume speed of mechanism is relevant according to going wrong, if carried into execution a plan, relevant with frequency acquisition configuration; Disconnect if there is connection, relevant with reconnecting speed;
At APP end every bar data of the sign data parsed, bracelet generates data with { data acquisition time } and { type of sign data }, app checks local data repeatability before warehouse-in, with { data acquisition time } and { type of sign data } for condition filter repeats.
Mechanism improvement is expanded: expand two bytes current all the elements byte crc16 check value at heading Header, after a message finishes receiving, APP write-back two byte { successfully receives content word joint number }, and+two byte APP hold the crc16 value verifying out to all the elements byte, and the verification of bracelet end guarantees data integrity.
Calculate check value before being transmitted, APP end finishes receiving, the check value that write-back APP calculates, and whether bracelet end judges whether complete to transfer to APP according to write-back check value, repeat to send the last content sent.
APP and server data timestamp upload download synchronization mechanism:
Requirement definition: when APP needs to operate a large amount of local zone time continuous print off-line data, needs guarantee complete consistent with server data; When there being new bracelet image data to produce, needing timely upload server, ensureing data consistent.
Mechanism principle: each sign data record and login account are bound, and data record is stabbed if having time and time shaft positive direction is recorded as basis.APP and service end sign data table all need to add operateTime field, respectively the timestamp of record data APP end and service end operating data.When APP has resolved the sign data that bracelet uploads, parse each record and be stored into local SQLITE database, every bar record writes the millisecond value of the operating time of current APP to operateTime field, stores the sign data in a message and trigger in real time to upload interface; At APP local record { timestamp that last APP uploads onto the server }, filter operateTime field for condition with { timestamp that last APP uploads onto the server }, the local SQLITE database of inquiry APP, obtains non-uploading data.Perform by interface definition and upload.Return successfully at interface, upgrading local { timestamp that last APP uploads onto the server } is operateTime value maximum in uploading data.When APP needs downloading data to arrive local SQLITE database, in download interface, APP local record { timestamps of last APP download server data } is interface parameters, with { timestamps of last APP download server data } as interface parameters value filtering services end data.When download interface returns successfully, APP is revised as-1, stored in local SQLITE database the operateTime field in bar record every in return data; And { timestamps of last APP download server data } assignment is the maximum server-end time stamp of this downloading data.
Mechanism description: APP end needs to distinguish login { timestamp that last APP uploads onto the server } { timestamps of last APP download server data } two values to different pieces of information table difference, user, { timestamp that last APP uploads onto the server } initial value can assignment be 0L, { timestamps of last APP download server data } initial value is the time value that returns of server and to deducting based on one month section, deducts the time period to be determined by business demand.
Because APP supports multi-user login, and be all placed in same database table at each user data of APP end, each user data is distinguished with user name.Therefore during different user switching login, { different user: M} uploads download situation to need record.If different user just carries out synchronously { sign data table }.Then need record M*2*1 (app uploads this locality and service end download time stamp) individual record.In like manner have below same user different pieces of information table: N}, then need record M*2*N record.
Mechanism exception and recovery capability: if when when uploading, generation exceptional interface can not successfully return, APP holds opening timing periodic service, startup uploading data is left over detection execution and uploaded.
Startup uploading data is left over detection execution and is uploaded, and upload procedure supports the function of breakpoint transmission, and when namely data have not been uploaded, upload without the need to starting anew, the place do not completed from the last time continues to upload next time.
Mechanism defect: if APP system is many accounts many data syn-chronization streams, the timestamp of APP record can be multiplied; Return link appearance extremely when uploading interface at interface, when APP successfully records uplink time stamp, can again execution upload, service end can receive repeating data, and service end needs by replace mode process repeating data problem; Because database processing ability is comparatively strong, operateTime millisecond value likely can repeat.Cause execution to upload in download, lose the data that operateTime millisecond value repeats.
Mechanism improvement is expanded: if after APP uploading data completes, and performs when downloading next time, because { timestamps of last APP download server data } of this locality do not upgrade, can cause data segment repeated downloads problem, consumed flow.When Account login, APP unique identification such as deviceID etc. can be imported into.Whether this account of server record APP logs in same APP with the last time, and upload if coexist mutually { timestamps of last APP download server data } that return service device when successfully returning is up-to-date, APP also upgrades local record.
For APP and service end timestamp possibility replication problem, if APP and service end tables of data have from increasing ID when, APP end can when uploading interface and successfully returning, upgrade { uplink time stamp } for { local maximum data storehouse table record is from increasing unique ID value }, with data-base recording ID for filter condition, perform and upload next time, download interface successfully returns { service end data-base recording is from increasing unique ID value }, APP end upgrades local record { timestamps of last APP download server data }, and upper once carry data time, return this parameter, service end interface is with this condition filter.
After logining successfully, apply for a secondary data download interface, if service end does not have new data to produce, a downloading data sets of interfaces can be wasted and call, consumption of natural resource problem.All can to perform at the data download interface collection that APP is all and after successfully returning, APP is local downloads success flag to current down operation record one, relend service interface when helping login and return to synchronous bracelet login banner position, namely the last time complete download successfully and be same bracelet log in, then do not perform down operation, otherwise perform download interface.
Should be understood that, above-mentioned embodiment of the present invention only for exemplary illustration or explain principle of the present invention, and is not construed as limiting the invention.Therefore, any amendment made when without departing from the spirit and scope of the present invention, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (10)

1. the method for data synchronization again to server from bracelet to APP, is characterized in that, said method comprising the steps of:
The notify action listener of the built-in character pair item of step 100:APP also keeps data syn-chronization, and the action listener cycle is that in APP connection, bracelet disconnects to bracelet;
Step 200: whether bracelet end consults memory exists data, if there are data, by message format assembling message data, and triggers notify event;
Step 300:APP termination is received and analytic message head Header, calculate current message content word joint number and spare word joint number and message content CRC16 value, corresponding byte number is received by current message content word joint number length, put into buffer memory, and overall byte CRC16 verification, if verification is passed through, write-back receives successful content word joint number;
Step 400: bracelet termination receives write-back byte number, and sent byte number last time and contrasts, if successfully delete memory corresponding data byte number, and concurrent data syn-chronization next time;
Step 500: stab according to the uplink time of APP local record and upload and record maximum ID value acquisition uploading data, execution is uploaded; Connection server uploads interface, resolves uploading data content, in every bar data record, injects current millisecond value operateTime field and insertignoreinto tables of data, processes and is successfully back into merit mark; APP resolves interface success return data content, upgrades APP local data uplink time stamp and uploads and record maximum ID value;
Step 600: after Account Logon APP success, stab according to APP local record server download time and server downloading data maximum ID value application download, server obtains data-base recording according to timestamp and maximum ID value, process successfully, in return data and data maximum time stamp and data in maximum ID value; APP resolves interface success return data content, and the operateTime field injecting-1 is used for being distinguished as downloading data, and renewal APP home server download time stabs and the maximum ID value of downloading data.
2. a kind of method of data synchronization again to server from bracelet to APP according to claim 1, it is characterized in that, when described APP is connected in real time with bracelet, and APP has triggered bracelet data upload function, the data that bracelet collects to be stored in memory and real-time by BLE agreement and APP synchrodata; If APP is not when connecting in real time, the data that bracelet collects can be stored in memory, in next APP connection status and triggering synchronous data flow time start synchrodata.
3. a kind of method of data synchronization again to server from bracelet to APP according to claim 1, it is characterized in that, described APP receives sign data, judge APP and server network interface whether unobstructed, if unobstructed, upload onto the server; If APP can not be connected to server in real time, perform and upload in network recovery situation, run the detection service of timing cycle when APP starts, temporally stamp and maximum ID value mechanism detect non-uploading data and upload.
4. a kind of method of data synchronization again to server from bracelet to APP according to claim 1, it is characterized in that, set up bracelet uploading message data transmission mechanism, contents of mechanism comprises: APP be connected with bracelet and triggering synchronous flow process time, data in hardware bracelet end consults memory, assembled by data message form, need in assembling process to ensure that each sign data unit is complete, with 20 bytes for data cell byte stream form, NOTIFY to APP holds, data heading Header is resolved, APP termination receives complete message data flow, if successfully resolved write-back successfully receives content word joint number, bracelet end can delete sign data in data message from memory, if also have data, then initiate the data message of a new data, circulate with this.
5. a kind of method of data synchronization again to server from bracelet to APP according to claim 4, it is characterized in that, described heading Header formal definition: current message data content length field is that 2 byte hexadecimals are expressed, within message data content-length remains on 256 bytes, remaining data total length field is that 4 byte hexadecimals are expressed, current message data content CRC16 value 2 byte hexadecimal is expressed, and described message data content does not comprise the length of header self; When abnormal to data heading Header process: APP end resolves failure or transmitting procedure is abnormal, APP end directly initiates synch command again, and abandons data, and bracelet does not do deletion action and to initiate a new data message mutual.
6. a kind of method of data synchronization again to server from bracelet to APP according to claim 4 or 5, it is characterized in that, expanding two bytes at heading Header is current all the elements byte crc16 check value, after a message finishes receiving, APP end is to all the elements byte verification crc16 value, app verifies crc16 value and guarantees data integrity, the successful reception content word joint number of APP write-back two word, and bracelet end ensures to delete and sent content same word joint number with last time.
7. a kind of method of data synchronization again to server from bracelet to APP according to claim 1, it is characterized in that, set up APP and server data timestamp and maximum ID value and upload download synchronization mechanism, described contents of mechanism comprises: when APP needs to operate a large amount of local zone time continuous print off-line data, need guarantee complete consistent with server data, when there being new bracelet image data to produce, needing timely upload server, ensureing data consistent.
8. a kind of method of data synchronization again to server from bracelet to APP according to claim 7, it is characterized in that, described machine-processed appearance is abnormal: when when uploading, generation exceptional interface can not successfully return, APP holds opening timing periodic service, and startup uploading data is left over detection execution and uploaded; Upload interface and return link appearance extremely at interface, when APP successfully records uplink time stamp and maximum ID value, can again execution upload, service end can receive repeating data, re-uses INSERTIGNORE elimination of duplicate data.
9. a kind of method of data synchronization again to server from bracelet to APP according to claim 7 or 8, it is characterized in that, described mechanism improvement expansion: during APP logon server, it is same APP that server returns the APP whether logged in the last time, and time not identical, APP just performs down operation.
10. a kind of method of data synchronization again to server from bracelet to APP according to claim 1, it is characterized in that, described APP local record table and service end tables of data are provided with from increasing ID, APP end upload successfully return time, renewal uplink time stamp and local maximum data storehouse table record are from increasing unique ID value, to upload timestamp and the maximum ID value of uploading data table for filter condition, perform and upload next time, upload interface to return successfully, upgrade local uplink time stamp and upload and record maximum ID value; APP end is when downloading data, it is time point before month that initial default download time stabs parameter, maximum ID value is 0, download interface success return service end data table record is from increasing unique maximum ID value, APP end renewal local record download time stamp and maximum ID value, and when upper once downloading data, return this two parameters, service end interface filters with this Parameter Conditions.
CN201510706077.5A 2015-10-27 2015-10-27 It is a kind of from bracelet to APP again to the method for data synchronization of server Active CN105407146B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510706077.5A CN105407146B (en) 2015-10-27 2015-10-27 It is a kind of from bracelet to APP again to the method for data synchronization of server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510706077.5A CN105407146B (en) 2015-10-27 2015-10-27 It is a kind of from bracelet to APP again to the method for data synchronization of server

Publications (2)

Publication Number Publication Date
CN105407146A true CN105407146A (en) 2016-03-16
CN105407146B CN105407146B (en) 2018-07-20

Family

ID=55472392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510706077.5A Active CN105407146B (en) 2015-10-27 2015-10-27 It is a kind of from bracelet to APP again to the method for data synchronization of server

Country Status (1)

Country Link
CN (1) CN105407146B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106412059A (en) * 2016-09-28 2017-02-15 四川长虹电器股份有限公司 Method and system for performing reliable data transfer among servers incapable of performing directly communication
CN106850755A (en) * 2016-12-28 2017-06-13 北京元心科技有限公司 Patrol and examine data processing method and system
CN107819795A (en) * 2016-09-12 2018-03-20 北京金山云网络技术有限公司 A kind of major-minor server data synchronous method of DNS, apparatus and system
CN108073592A (en) * 2016-11-10 2018-05-25 惠州市康冠科技有限公司 Judge sequence number whether repeat method and television set sequence number wiring method
CN109933630A (en) * 2019-03-19 2019-06-25 武汉达梦数据库有限公司 Database data real-time synchronization method and equipment
CN110072278A (en) * 2019-04-30 2019-07-30 南京大学 A kind of wireless multinode physiological signal monitor system based on low-power consumption bluetooth
CN110418387A (en) * 2019-07-23 2019-11-05 广东乐之康医疗技术有限公司 A kind of wearable device data uploading method
CN110784860A (en) * 2019-11-06 2020-02-11 北航(四川)西部国际创新港科技有限公司 ADS-B data transmission method based on BLE
CN111988350A (en) * 2019-05-22 2020-11-24 广东思派康电子科技有限公司 Method for synchronously storing data acquired by heart rate earphone to cloud server
CN112219241A (en) * 2018-06-25 2021-01-12 心脏器械股份有限公司 Clinical device with data transmission
CN112311853A (en) * 2020-09-28 2021-02-02 北京沃东天骏信息技术有限公司 Data synchronization method, device, equipment and computer readable storage medium
CN112995264A (en) * 2019-12-18 2021-06-18 华为技术有限公司 Method, apparatus, storage medium, and program product for preventing data from being deleted by mistake

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325478A (en) * 2008-08-06 2008-12-17 北京北纬通信科技股份有限公司 Method and system for data synchronization
US20120246261A1 (en) * 2011-03-22 2012-09-27 Roh Yohan J Method and apparatus for managing sensor data and method and apparatus for analyzing sensor data
CN103701913A (en) * 2013-12-30 2014-04-02 优视科技有限公司 Data synchronization method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325478A (en) * 2008-08-06 2008-12-17 北京北纬通信科技股份有限公司 Method and system for data synchronization
US20120246261A1 (en) * 2011-03-22 2012-09-27 Roh Yohan J Method and apparatus for managing sensor data and method and apparatus for analyzing sensor data
CN103701913A (en) * 2013-12-30 2014-04-02 优视科技有限公司 Data synchronization method and device

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107819795A (en) * 2016-09-12 2018-03-20 北京金山云网络技术有限公司 A kind of major-minor server data synchronous method of DNS, apparatus and system
CN106412059A (en) * 2016-09-28 2017-02-15 四川长虹电器股份有限公司 Method and system for performing reliable data transfer among servers incapable of performing directly communication
CN108073592A (en) * 2016-11-10 2018-05-25 惠州市康冠科技有限公司 Judge sequence number whether repeat method and television set sequence number wiring method
CN106850755A (en) * 2016-12-28 2017-06-13 北京元心科技有限公司 Patrol and examine data processing method and system
CN112219241A (en) * 2018-06-25 2021-01-12 心脏器械股份有限公司 Clinical device with data transmission
CN109933630A (en) * 2019-03-19 2019-06-25 武汉达梦数据库有限公司 Database data real-time synchronization method and equipment
CN109933630B (en) * 2019-03-19 2021-11-23 武汉达梦数据库股份有限公司 Real-time database data synchronization method and device
CN110072278A (en) * 2019-04-30 2019-07-30 南京大学 A kind of wireless multinode physiological signal monitor system based on low-power consumption bluetooth
CN111988350A (en) * 2019-05-22 2020-11-24 广东思派康电子科技有限公司 Method for synchronously storing data acquired by heart rate earphone to cloud server
CN110418387A (en) * 2019-07-23 2019-11-05 广东乐之康医疗技术有限公司 A kind of wearable device data uploading method
CN110784860A (en) * 2019-11-06 2020-02-11 北航(四川)西部国际创新港科技有限公司 ADS-B data transmission method based on BLE
CN112995264A (en) * 2019-12-18 2021-06-18 华为技术有限公司 Method, apparatus, storage medium, and program product for preventing data from being deleted by mistake
CN112995264B (en) * 2019-12-18 2022-08-19 花瓣云科技有限公司 Method, device and storage medium for preventing data from being deleted by mistake
US11729266B2 (en) 2019-12-18 2023-08-15 Petal Cloud Technology Co., Ltd. Method and device for preventing data misdeletion, storage medium, and product
CN112311853A (en) * 2020-09-28 2021-02-02 北京沃东天骏信息技术有限公司 Data synchronization method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN105407146B (en) 2018-07-20

Similar Documents

Publication Publication Date Title
CN105407146A (en) Data synchronization method from wristband to APP to server
CN106302806B (en) A kind of method of data synchronization, system, synchronous obtaining method and relevant apparatus
CN109739708B (en) Method, device and system for testing pressure
CN111090699A (en) Service data synchronization method and device, storage medium and electronic device
CN103442024A (en) System and method for synchronizing smart mobile terminal and cloud virtual mobile terminal
CN102710665A (en) Mobile terminal, and data synchronization method of server and mobile terminal
CN108737549A (en) A kind of log analysis method and device of big data quantity
CN111241192A (en) Data synchronization method
CN109814902A (en) A kind of configuration file update method, device, electronic equipment and storage medium
CN102282787A (en) Method for synchronizing local clocks in a distributed computer network
CN114048217A (en) Incremental data synchronization method and device, electronic equipment and storage medium
CN1996374A (en) Method, device, and system for testing advanced apparatus
WO2013137982A4 (en) Method and apparatus for intelligent capture of document object model events
CN111368005A (en) Data processing method, device and equipment based on block chain and readable storage medium
CN103109497A (en) Dynamic configuration of interconnected devices for measuring performance characteristics in a network
CN103188211B (en) Based on the collocation method of satellite borne equipment communication protocol
CN114157613A (en) Data reporting method, gateway, server, electronic device and storage medium
CN111078463A (en) Data backup method, device and system
CN104618474B (en) Facility information store method and device
CN109150617A (en) A kind of method of self-organizing network route planning and dynamic optimization
CN109271454B (en) Data synchronization method and network equipment
JP2012133414A (en) Testing device, testing method and testing program
CN113050904A (en) Screen sharing method and device
CN112312537B (en) Clock synchronization method and device, storage medium and electronic device
CN101640588A (en) Method and system for synchronizing and processing data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 610041 Sichuan city of Chengdu province high tech Zone jiaozi Avenue E International Center, No. 333 in the sea 802-803

Applicant after: ICARETECH HEALTHCARE CO.,LTD.

Address before: 610041 Sichuan city of Chengdu province high tech Zone jiaozi Avenue E International Center, No. 333 in the sea 802-803

Applicant before: CHENGDU ICARETECH HEALTHCARE Co.,Ltd.

COR Change of bibliographic data
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A data synchronization method from bracelet to APP and then to server

Effective date of registration: 20230927

Granted publication date: 20180720

Pledgee: Chinese bank Limited by Share Ltd. Shuangliu Branch

Pledgor: ICARETECH HEALTHCARE CO.,LTD.

Registration number: Y2023980059041

PE01 Entry into force of the registration of the contract for pledge of patent right