Nothing Special   »   [go: up one dir, main page]

CN109218418A - Method of data synchronization and device calculate equipment and storage medium - Google Patents

Method of data synchronization and device calculate equipment and storage medium Download PDF

Info

Publication number
CN109218418A
CN109218418A CN201811026428.8A CN201811026428A CN109218418A CN 109218418 A CN109218418 A CN 109218418A CN 201811026428 A CN201811026428 A CN 201811026428A CN 109218418 A CN109218418 A CN 109218418A
Authority
CN
China
Prior art keywords
data
versions
database
answer
client
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
CN201811026428.8A
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.)
Beijing Ape Force Education Technology Co ltd
Original Assignee
Beijing Chalk Future 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 Beijing Chalk Future Technology Co Ltd filed Critical Beijing Chalk Future Technology Co Ltd
Priority to CN201811026428.8A priority Critical patent/CN109218418A/en
Publication of CN109218418A publication Critical patent/CN109218418A/en
Pending legal-status Critical Current

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5683Storage of data provided by user terminals, i.e. reverse caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/541Client-server

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This specification provides a kind of method of data synchronization and device, calculates equipment and storage medium, wherein the method for data synchronization includes: the first data version number for sending data synchronization request to database, and receiving database transmission;When the versions of data No. the second and the first data version number that determine client are inconsistent, receive the data information updated in the database relative to the versions of data No. second and the database sends the third versions of data number updated after data information;Versions of data No. second of the client is updated to third versions of data number.

Description

Method of data synchronization and device calculate equipment and storage medium
Technical field
This specification is related to data synchronization technology field, in particular to a kind of method of data synchronization and device calculate equipment And storage medium.
Background technique
Can in life now, network be so flourishing, can be taken an examination by online testing software, and support big Data volume in data synchronization process, do not lose by data, and data are imperfect, is to measure an exam software weight synchronous to data Want index.In common exam software, it is that full dose data are synchronous that data, which synchronize, and when big data quantity transmits, data are being transmitted across Will appear partial loss in journey, data are imperfect, synchronize may cause the response time it is too long and occur time-out, so largely It is upper to influence data synchronous completion and rapidity, and then keep candidate's experience bad.
Summary of the invention
In view of this, this specification embodiment provides a kind of method of data synchronization and device, calculates equipment and storage is situated between Matter, to solve technological deficiency existing in the prior art.
According to this specification embodiment in a first aspect, a kind of method of data synchronization is provided, applied to client, packet It includes:
Exam software is logged in, sends data synchronization request to database, and receive the first versions of data of database transmission Number;
When the versions of data No. the second and the first data version number that determine client are inconsistent, the data are received The data information and the database updated in library relative to the versions of data No. second sends the updated after data information Versions of data No. three;
Versions of data No. second of the client is updated to third versions of data number.
Optionally, further includes:
The answer data for obtaining candidate send synchronization request to server-side, carry the answer in the synchronization request Data;
The synchronization request for carrying the answer data is sent to database by server-side, and receives the database hair The third versions of data number sent;
When the versions of data number for determining client is consistent with the third version number, the answer data are uploaded to institute Database is stated, and receives the versions of data No. the 4th that the database root is updated according to the answer data;
The versions of data number of the client is updated to versions of data No. the 4th.
Optionally, further includes:
When the versions of data number and the third versions of data number that determine client are inconsistent, receive in the database The data information and the database that versions of data number relative to the client updates send the updated after data information Versions of data No. five;
The versions of data number of the client is updated to versions of data No. the 5th;
The answer data are uploaded to the database, and receive what the database root was updated according to the answer data Versions of data No. 6th;
Versions of data No. 5th of the client is updated to versions of data No. the 6th.
Optionally, described to receive the data packets updated in the database relative to the versions of data No. second It includes:
Receive the structured data information of paper to be set the exam;
The first examination question data of paper are obtained according to the structured data information, cache the first examination question data and basis Preset exhibition strategy shows the first examination question data.
Optionally, the answer data are uploaded to the database includes:
The answer data of acquisition candidate and the answer progress msg, answer data are cached;
The second examination question data are requested to server according to the answer progress msg and structured data information, receives and caches The second examination question data;
The second examination question data are shown according to preset exhibition strategy, are received the answer data of candidate and are cached;
Server is uploaded in a manner of incremental transmission according to the answer data that preset upload strategy will be cached.
Optionally, the preset upload strategy includes:
The answer data for setting number road examination question are uploaded in batches or carry out answer data in batches according to setting byte number It uploads or uploads answer data in batches according to the examination question page number.
According to the second aspect of this specification embodiment, a kind of data synchronization unit is provided, is configured in client, is wrapped It includes:
Request module: being configured as logging in exam software, sends data synchronization request to database, and receives database hair The first data version number sent;
Determining module: it is configured as when the versions of data No. the second and the first data version number that determine client are different When cause, receives the data information updated in the database relative to the versions of data No. second and the database sends number It is believed that the third versions of data number updated after breath;
Update module: it is configured as versions of data No. the second of the client being updated to third versions of data number.
Optionally, further includes:
Request module is additionally configured to obtain the answer data of candidate, sends synchronization request, the synchronization to server-side The answer data are carried in request;
First receiving module: it is configured as asking by server-side to the synchronization that database transmission carries the answer data It asks, and receives the third versions of data number that the database is sent;
Determining module is additionally configured to when the versions of data number for determining the client is consistent with the third version number, The answer data are uploaded to the database, and receive the 4th data that the database root is updated according to the answer data Version number;
Update module is additionally configured to the versions of data number of the client being updated to versions of data No. the 4th.
Optionally, further includes:
Determining module is additionally configured to work as the versions of data number for determining the client and the third versions of data number not When consistent, the data information and the database updated in the database relative to the versions of data number of the client is received Send the versions of data No. the 5th updated after data information;
Update module is additionally configured to the versions of data number of the client being updated to versions of data No. the 5th;
Second receiving module: it is configured as the answer data being uploaded to the database, and receives the database The versions of data No. the 6th updated according to the answer data;
Update module is additionally configured to versions of data No. the 5th of the client being updated to versions of data No. the 6th.
Optionally, the determining module includes:
First receiving unit: it is configured as receiving the structured data information of paper to be set the exam;
Display unit: it is configured as obtaining the first examination question data of paper according to the structured data information, described in caching First examination question data simultaneously show the first examination question data according to preset exhibition strategy.
Optionally, the determining module includes:
Acquiring unit: be configured as obtain candidate answer data and the answer progress msg, by answer data into Row caching;
The acquiring unit is additionally configured to be requested according to the answer progress msg and structured data information to server Second examination question data receive and cache the second examination question data;
The display unit is additionally configured to show the second examination question data according to the preset exhibition strategy, receives The answer data of candidate simultaneously cache;
Uploading unit: it is configured as uploading the tactful answer data that will be cached in a manner of incremental transmission according to preset It is uploaded to server.
Optionally, the preset upload strategy includes:
The answer data for setting number road examination question are uploaded in batches or carry out answer data in batches according to setting byte number It uploads or uploads answer data in batches according to the examination question page number.
According to the third aspect of this specification embodiment, a kind of calculating equipment is provided, including memory, processor and deposit The computer instruction that can be run on a memory and on a processor is stored up, the processor realizes the number when executing described instruction The step of according to synchronous method.
According to the fourth aspect of this specification embodiment, a kind of computer readable storage medium is provided, is stored with meter The step of calculation machine instruction, which realizes the method for data synchronization when being executed by processor.
In this specification embodiment, by logging in exam software, data synchronization request is sent to database, and receive data The first data version number that library is sent, when the versions of data No. the second and the first data version number that determine client are inconsistent When, it receives the data information updated in the database relative to the versions of data No. second and the database sends data Versions of data No. second of the client is updated to third versions of data number by the third versions of data number updated after information, It is uploaded to server in a manner of incremental transmission according to the answer data that preset upload strategy will be cached, passes through this specification Method of data synchronization, can be to the data information in data synchronization process, kept in the data information and database of client Unanimously, when client submits answer data, database receives answer data, guarantees that answer data are not lost, determines answer data Integrality, largely shorten candidate and wait request time, while being carried out by incremental transmission data information mode Transmitting data information accelerates the corresponding of exam software.
Detailed description of the invention
Fig. 1 is the structure chart provided by the embodiments of the present application for calculating equipment;
Fig. 2 is the flow chart of method of data synchronization provided by the embodiments of the present application;
Fig. 3 is the flow chart of method of data synchronization provided by the embodiments of the present application;
Fig. 4 is the flow chart of method of data synchronization provided by the embodiments of the present application;
Fig. 5 is the module map of data synchronization unit provided by the embodiments of the present application.
Specific embodiment
Many details are explained in the following description in order to fully understand the application.But the application can be with Much it is different from other way described herein to implement, those skilled in the art can be without prejudice to the application intension the case where Under do similar popularization, therefore the application is not limited by following public specific implementation.
Fig. 1 is to show the structural block diagram of the calculating equipment 100 according to one embodiment of this specification.The calculating equipment 100 Component include but is not limited to memory 110 and processor 120.Processor 120 is connected with memory 110 by bus 130, Database 150 is for saving data.
Calculating equipment 100 further includes access device 140, access device 140 enable calculate equipment 100 via one or Multiple networks 160 communicate.The example of these networks includes public switched telephone network (PSTN), local area network (LAN), wide area network (WAN), the combination of the communication network of personal area network (PAN) or such as internet.Access device 140 may include wired or wireless One or more of any kind of network interface (for example, network interface card (NIC)), such as IEEE802.11 wireless local area Net (WLAN) wireless interface, worldwide interoperability for microwave accesses (Wi-MAX) interface, Ethernet interface, universal serial bus (USB) connect Mouth, cellular network interface, blue tooth interface, near-field communication (NFC) interface, etc..
In one embodiment of this specification, unshowned other component in above-mentioned and Fig. 1 of equipment 100 is calculated It can be connected to each other, such as pass through bus.It should be appreciated that calculating device structure block diagram shown in FIG. 1 is merely for the sake of example Purpose, rather than the limitation to this specification range.Those skilled in the art can according to need, and increase or replace other portions Part.
Calculating equipment 100 can be any kind of static or mobile computing device, including mobile computer or mobile meter Calculate equipment (for example, tablet computer, personal digital assistant, laptop computer, notebook computer, net book etc.), movement Phone (for example, smart phone), wearable calculating equipment (for example, smartwatch, intelligent glasses etc.) or other kinds of shifting Dynamic equipment, or the static calculating equipment of such as desktop computer or PC.Calculating equipment 100 can also be mobile or state type Server.
Wherein, processor 120 can execute the step in method of data synchronization shown in Fig. 2.Fig. 2 is shown according to this theory The flow chart of the method for data synchronization of bright one embodiment of book, including step 202 is to step 206.
Step 202: logging in exam software, send data synchronization request to database, and receive the first of database transmission Versions of data number.
Exam software is first logged by candidate, the data information in the non-sync database of client passes through client Synchronization request is sent to database, and obtains the first data version number of database, by sending synchronization request, determines client The data information needed.
Step 204: when the versions of data No. the second and the first data version number that determine client are inconsistent, receiving After the data information and database transmission data information that are updated in the database relative to the versions of data No. second The third versions of data number of update.
For example, candidate carries out maths exam by software, and candidate, which first enters, to be examined in one embodiment of this specification Software is tried, needs to obtain data information, first data version number is not in the versions of data No. the second and database of active client Unanimously, determining that data information does not synchronize, client receives the data information and the versions of data according to database update, Current data version number is updated.
Inconsistent by comparing the second versions of data and the first data version number of client, database is to client Data information is sent, database is simultaneously updated first data version number according to the data information of transmission, determines the third updated Versions of data number is simultaneously sent to client.
Step 206: versions of data No. the second of the client is updated to third versions of data number.
By the way that versions of data No. the second of client is updated to third versions of data number, the data letter in database is determined Breath is updated to client, and current client data information and date library data information is synchronous.
It is described to receive in the database relative to the versions of data No. second update in one embodiment of this specification Data information includes:
Receive the structured data information of paper to be set the exam;
The first examination question data of paper are obtained according to the structured data information, cache the first examination question data and basis Preset exhibition strategy shows the first examination question data.
In one embodiment of this specification, further includes:
The answer data for obtaining candidate send synchronization request to server-side, carry the answer in the synchronization request Data;
The synchronization request for carrying the answer data is sent to database by server-side, and receives the database hair The third versions of data number sent;
When the versions of data number for determining client is consistent with the third version number, the answer data are uploaded to institute Database is stated, and receives the versions of data No. the 4th that the database root is updated according to the answer data;
The versions of data number of the client is updated to versions of data No. the 4th.
In one embodiment of this specification, further includes:
When the versions of data number and the third versions of data number that determine the client are inconsistent, the data are received It is updated after the data information and database transmission data information that are updated in library relative to the versions of data number of the client Versions of data No. the 5th;
The versions of data number of the client is updated to versions of data No. the 5th;
The answer data are uploaded to the database, and receive what the database root was updated according to the answer data Versions of data No. 6th;
Versions of data No. 5th of the client is updated to versions of data No. the 6th.
For example, candidate takes an exam in one embodiment of this specification, carry out submitting answer data, by judging Whether the case where stating the versions of data number and the third versions of data of client, be determined current client data information For newest data information.
When the versions of data number of client and the third versions of data number are consistent, the data information of client is newest Data information, submit answer data, the answer data are received by database, are updated relative to the answer data Versions of data number, generate newest versions of data No. 5th and be simultaneously sent to client, and more by the versions of data number of client Newly it is versions of data No. the 5th, determines answer data to be committed to database, and client data information and database data are believed Breath synchronizes.
When the versions of data number of the client and the third versions of data number are inconsistent, the data of active client Information is not synchronized with database also, and database sends data information to client, and database is simultaneously believed according to the data of transmission Breath is updated versions of data number, determines the third versions of data number updated and is sent to client, determines active client number It is believed that breath is latest data information, then carries out submitting answer data, the answer data are received by database, are updated phase It for the versions of data number of the answer data, generates newest versions of data No. 6th and is simultaneously sent to client, and by client The versions of data number at end is updated to this number of sixth version, determines answer data to be committed to database, and client data information with Database data synchronizing information.
In one embodiment of this specification, the answer data, which are uploaded to the database, includes:
The answer data of acquisition candidate and the answer progress msg, answer data are cached;
The second examination question data are requested to server according to the answer progress msg and structured data information, receives and caches The second examination question data;
The second examination question data are shown according to preset exhibition strategy, are received the answer data of candidate and are cached;
Server is uploaded in a manner of incremental transmission according to the answer data that preset upload strategy will be cached.
In one embodiment of this specification, the structured data information includes:
According to the structured data information of topic serial number division or according to the structured data information of page number division or according to topic type The structured data information of division.
In one embodiment of this specification, the first examination question data include:
The whole examination questions or paper to be set the exam of a kind of topic type of one of examination question or paper to be set the exam of the paper to be set the exam One page examination question.
In one embodiment of this specification, the preset exhibition strategy includes:
From the examination question data cached extract setting number problem to candidate show or by paging show in a manner of to Candidate shows.
In one embodiment of this specification, the answer progress msg obtains in the following manner:
The answer progress msg is currently answered by the current answer position of acquisition the first examination question data according to described It inscribes ratio of the position in the first examination question data and obtains the answer progress msg.
In one embodiment of this specification, it is described by answer data carry out caching include:
Answer data are cached with the incidence relation of corresponding examination question topic according to answer data.
It is described to be requested according to the answer progress msg and structured data information to server in one embodiment of this specification Second examination question data include:
Judge whether the corresponding ratio of answer progress msg of the first examination question data reaches the threshold value of setting;
When judging result is the threshold value for reaching setting, the first examination question data described in the structured data information are obtained The information of next examination question data;
The second examination question data are requested to the server according to the information of next examination question data.
In one embodiment of this specification, further includes:
Click in the page page up or when lower one page button when receiving candidate, according to the answer data cached with it is right It answers the incidence relation of examination question to load and shows the examination question data and answer data of corresponding page.
In one embodiment of this specification, further includes:
When detecting that candidate re-enters the answer data of current page, according to the modification of current page or newly-increased Answer data and corresponding examination question serial number are updated the answer data cached.
In one embodiment of this specification, described when detecting that candidate re-enters the answer data of current page, The answer data cached are updated according to the modification of current page or newly-increased answer data and corresponding examination question serial number Later further include:
If caching answer data where the modification of current page or newly-increased answer data and corresponding examination question serial number it It is preceding to be uploaded to the server, then only the modification of current page or newly-increased answer data and corresponding examination question serial number are uploaded To the server.
In one embodiment of this specification, the preset upload strategy includes:
The answer data for setting number road examination question are uploaded in batches or carry out answer data in batches according to setting byte number It uploads or uploads answer data in batches according to the examination question page number.
In this specification embodiment, by logging in exam software, data synchronization request is sent to database, and receive data The first data version number that library is sent, when the versions of data No. the second and the first data version number that determine client are inconsistent When, it receives the data information updated in the database relative to the versions of data No. second and the database sends data Versions of data No. second of the client is updated to third versions of data number by the third versions of data number updated after information, Server is uploaded in a manner of incremental transmission according to the answer data that preset upload strategy will be cached.
It, can be to the data information in data synchronization process, keeping client by the method for data synchronization of this specification Consistent with the data information in database, when client submits answer data, database receives answer data, guarantees answer data It does not lose, determines the integrality of answer data, candidate waits largely to be shortened on request time, while passing through increasing Amount transmitting data information mode carries out transmitting data information, accelerates the corresponding of exam software, avoids synchronization a large number of users It submits paper to cause the excessively high situation of server load, improves the stability of online testing software on the whole.
Fig. 3 is to show the flow chart of the method for data synchronization according to one embodiment of this specification, the method for data synchronization It is described by taking maths exam as an example, which includes:
Step 302: obtaining the first data version number of database.
Exam software is first logged by candidate, the data information in the non-sync database of client passes through client Synchronization request is sent to database, and obtains the first data version number of database, by sending synchronization request, determines client The data information needed.
Step 304: judging whether first data version number is consistent with client data version number.
By the way that the first data version number is compared with client data version number, determine when number clients it is believed that It whether synchronous with the data information of database ceases.
Step 306: obtaining newest data information.
Inconsistent by comparing the first data version number and client data version number, database sends out data information It send to client, and by filtering out the already existing data information of client, improves the transmission rate of data information.
Step 308: update data of database version number.
For example, candidate carries out maths exam by software, and candidate, which first enters, to be examined in one embodiment of this specification Software is tried, needs to obtain data information, first data version number is not in the versions of data No. the second and database of active client Unanimously, determining that data information does not synchronize, client receives the data information and the versions of data according to database update, Current data version number is updated.
Inconsistent by comparing the second versions of data and the first data version number of client, database is to client Data information is sent, database is simultaneously updated first data version number according to the data information of transmission, determines the third updated Versions of data number is simultaneously sent to client.
Step 310: client receives the data information and updates versions of data number.
The method provided through this embodiment synchronizes database data information with client data information, reduces Database sends data information amount, improves the integrality of client synchronization data information, and keep client data information Timing synchronization is kept with database data information.
Fig. 4 is to show the flow chart of the method for data synchronization according to one embodiment of this specification, the method for data synchronization It is described by taking maths exam as an example, which includes:
Step 402: determining client data version number.
Step 404: judging whether versions of data number is consistent.
By judging whether client data version number is consistent with database data version number.
For example, candidate takes an exam in one embodiment of this specification, carry out submitting answer data, by judging The case where stating the versions of data number and the versions of data of the database of client, is determined current client data information It whether is newest data information.
When the versions of data number of the client is consistent with the versions of data number of the database, the data of client are believed Breath is newest data information, submits answer data.
Step 406: database updates versions of data number relative to the answer data.
For example, candidate takes an exam in one embodiment of this specification, carry out submitting answer data, by judging The case where stating the versions of data number and the versions of data of the database of client, is determined current client data information It whether is newest data information.
The answer data are received by database, are updated the versions of data number relative to the answer data, it is raw At newest versions of data number and it is sent to client, and the versions of data number of client is updated to newest versions of data Number, answer data are determined to be committed to database, and client data information and database data synchronizing information.
Step 408: when client data version number and the database data version number are inconsistent, updating client data Information.
When the versions of data number of the client and the third versions of data number are inconsistent, the data of active client Information is not synchronized with database also, and database sends data information to client, and database is simultaneously believed according to the data of transmission Breath is updated versions of data number, determines the versions of data number of the database updated and is sent to client, determines existing customer End data information is latest data information, then carries out submitting answer data, receives the answer data by database, carries out more Cenotype generates the versions of data number of newest database and is sent to client for the versions of data number of the answer data, And the versions of data number of client is updated to the versions of data number of database, determine answer data to be committed to database, and Client data information and database data synchronizing information.
Step 410: customer in response end.
Data information and answer data are synchronized by customer in response end.
The data information of client and database is synchronized, client is mentioned by the method provided through this embodiment The answer data of friendship are synchronized to database.
Method of data synchronization through this embodiment, can be to the data information in data synchronization process, keeping client Consistent with the data information in database, when client submits answer data, database receives answer data, guarantees answer data It does not lose, determines the integrality of answer data, candidate waits largely to be shortened on request time, while passing through increasing Amount transmitting data information mode carries out transmitting data information, accelerates the corresponding of exam software, avoids synchronization a large number of users It submits paper to cause the excessively high situation of server load, improves the stability of online testing software on the whole.
Corresponding with above method embodiment, this specification additionally provides data synchronization unit embodiment, and figure: 5 show This illustrates the module map of the data synchronization unit of an embodiment.As shown in figure 5, the device 500 includes:
Request module 502: being configured as logging in exam software, sends data synchronization request to database, and receive data The first data version number that library is sent;
Determining module 504: it is configured as when the versions of data No. the second and the first data version number for determining client When inconsistent, the data information updated in the database relative to the versions of data No. second and database hair are received Send the third versions of data number updated after data information;
Update module 506: it is configured as versions of data No. the second of the client being updated to third versions of data number.
In an optional embodiment, further includes:
Request module is additionally configured to obtain the answer data of candidate, sends synchronization request, the synchronization to server-side The answer data are carried in request;
First receiving module: it is configured as asking by server-side to the synchronization that database transmission carries the answer data It asks, and receives the third versions of data number that the database is sent;
Determining module is additionally configured to when the versions of data number for determining the client is consistent with the third version number, The answer data are uploaded to the database, and receive the 4th data that the database root is updated according to the answer data Version number;
Update module is additionally configured to the versions of data number of the client being updated to versions of data No. the 4th;
In an optional embodiment, which is characterized in that further include:
Determining module is additionally configured to work as the versions of data number for determining the client and the third versions of data number not When consistent, the data information and the database updated in the database relative to the versions of data number of the client is received Send the versions of data No. the 5th updated after data information;
Update module is additionally configured to the versions of data number of the client being updated to versions of data No. the 5th;
Second receiving module: it is configured as the answer data being uploaded to the database, and receives the database The versions of data No. the 6th updated according to the answer data;
Update module is additionally configured to versions of data No. the 5th of the client being updated to versions of data No. the 6th.
In an optional embodiment, the determining module includes:
First receiving unit: it is configured as receiving the structured data information of paper to be set the exam;
Display unit: it is configured as obtaining the first examination question data of paper according to the structured data information, described in caching First examination question data simultaneously show the first examination question data according to preset exhibition strategy.
In an optional embodiment, the determining module includes:
Acquiring unit: be configured as obtain candidate answer data and the answer progress msg, by answer data into Row caching;
The acquiring unit is additionally configured to be requested according to the answer progress msg and structured data information to server Second examination question data receive and cache the second examination question data;
The display unit is additionally configured to show the second examination question data according to the preset exhibition strategy, receives The answer data of candidate simultaneously cache;
Uploading unit: it is configured as uploading the tactful answer data that will be cached in a manner of incremental transmission according to preset It is uploaded to server.
In an optional embodiment, the preset upload strategy includes:
The answer data for setting number road examination question are uploaded in batches or carry out answer data in batches according to setting byte number It uploads or uploads answer data in batches according to the examination question page number.
A kind of calculating equipment is also provided in one embodiment of this specification, including memory, processor and is stored in memory Computer instruction that is upper and can running on a processor, the processor realize the data side of synchronization when executing described instruction The step of method.
One embodiment of this specification also provides a kind of computer readable storage medium, is stored with computer instruction, this refers to The step of method of data synchronization is realized when order is executed by processor.
A kind of exemplary scheme of above-mentioned computer readable storage medium for the present embodiment is it should be noted that the storage The technical solution of medium and the technical solution of above-mentioned method of data synchronization belong to same design, and the technical solution of storage medium is not The detail content of detailed description may refer to the description of the technical solution of above-mentioned method of data synchronization.
The computer instruction includes computer program code, the computer program code can for source code form, Object identification code form, executable file or certain intermediate forms etc..The computer-readable medium may include: that can carry institute State any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disk, CD, the computer storage of computer program code Device, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), Electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer-readable medium include it is interior Increase and decrease appropriate can be carried out according to the requirement made laws in jurisdiction with patent practice by holding, such as in certain jurisdictions of courts Area does not include electric carrier signal and telecommunication signal according to legislation and patent practice, computer-readable medium.
It should be noted that for the various method embodiments described above, describing for simplicity, therefore, it is stated as a series of Combination of actions, but those skilled in the art should understand that, this specification is not limited by the described action sequence, because For according to this specification, certain steps can use other sequences or carry out simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and related actions and modules might not all be this Necessary to specification.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment Point, it may refer to the associated description of other embodiments.
This specification preferred embodiment disclosed above is only intended to help to illustrate this specification.Alternative embodiment is not All details of detailed descriptionthe, do not limit the invention to the specific embodiments described.Obviously, according in this specification Hold, can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to preferably explain this theory The principle and practical application of bright book, so that skilled artisan be enable to better understand and utilize this specification.This Specification is limited only by the claims and their full scope and equivalents.

Claims (14)

1. a kind of method of data synchronization is applied to client, comprising:
Exam software is logged in, sends data synchronization request to database, and receive the first data version number of database transmission;
When the versions of data No. the second and the first data version number that determine client are inconsistent, receive in the database The data information and the database that update relative to the versions of data No. second send the third number updated after data information According to version number;
Versions of data No. second of the client is updated to third versions of data number.
2. the method according to claim 1, wherein further include:
The answer data for obtaining candidate send synchronization request to server-side, carry the answer data in the synchronization request;
The synchronization request for carrying the answer data is sent to database by server-side, and receives what the database was sent Third versions of data number;
When the versions of data number for determining client is consistent with the third version number, the answer data are uploaded to the number According to library, and receive the versions of data No. the 4th that the database root is updated according to the answer data;
The versions of data number of the client is updated to versions of data No. the 4th.
3. the method according to claim 1, wherein further include:
When the versions of data number and the third versions of data number that determine client are inconsistent, receive opposite in the database The 5th number updated after data information is sent in the data information and the database that the versions of data number of the client updates According to version number;
The versions of data number of the client is updated to versions of data No. the 5th;
The answer data are uploaded to the database, and receive the database root is updated according to the answer data the 6th Versions of data number;
Versions of data No. 5th of the client is updated to versions of data No. the 6th.
4. the method according to claim 1, wherein described receive in the database relative to second number Include according to the data information that version number updates:
Receive the structured data information of paper to be set the exam;
The first examination question data of paper are obtained according to the structured data information, cache the first examination question data and according to default Exhibition strategy show the first examination question data.
5. according to the method described in claim 2, it is characterized in that, the answer data be uploaded to the database including:
The answer data of acquisition candidate and the answer progress msg, answer data are cached;
The second examination question data are requested to server according to the answer progress msg and structured data information, receives and caches described Second examination question data;
The second examination question data are shown according to preset exhibition strategy, are received the answer data of candidate and are cached;
Server is uploaded in a manner of incremental transmission according to the answer data that preset upload strategy will be cached.
6. according to the method described in claim 5, it is characterized in that, the preset upload strategy includes:
The answer data for setting number road examination question are uploaded in batches or are uploaded answer data in batches according to setting byte number Or answer data are uploaded in batches according to the examination question page number.
7. a kind of data synchronization unit, is configured in client, comprising:
Request module: being configured as logging in exam software, sends data synchronization request to database, and receives database transmission First data version number;
Determining module: it is configured as when the versions of data No. the second and the first data version number that determine client are inconsistent When, it receives the data information updated in the database relative to the versions of data No. second and the database sends data The third versions of data number updated after information;
Update module: it is configured as versions of data No. the second of the client being updated to third versions of data number.
8. device according to claim 7, which is characterized in that further include:
Request module is additionally configured to obtain the answer data of candidate, sends synchronization request, the synchronization request to server-side It is middle to carry the answer data;
First receiving module: being configured as sending the synchronization request for carrying the answer data to database by server-side, And receive the third versions of data number that the database is sent;
Determining module is additionally configured to when the versions of data number for determining the client is consistent with the third version number, by institute It states answer data and is uploaded to the database, and receive the 4th versions of data that the database root is updated according to the answer data Number;
Update module is additionally configured to the versions of data number of the client being updated to versions of data No. the 4th.
9. device according to claim 7, which is characterized in that further include:
Determining module is additionally configured to when the versions of data number and the third versions of data number that determine the client are inconsistent When, it receives the data information updated in the database relative to the versions of data number of the client and the database is sent The versions of data No. the 5th updated after data information;
Update module is additionally configured to the versions of data number of the client being updated to versions of data No. the 5th;
Second receiving module: it is configured as the answer data being uploaded to the database, and receives the database root evidence The versions of data No. the 6th that the answer data update;
Update module is additionally configured to versions of data No. the 5th of the client being updated to versions of data No. the 6th.
10. device according to claim 7, which is characterized in that the determining module includes:
First receiving unit: it is configured as receiving the structured data information of paper to be set the exam;
Display unit: it is configured as obtaining the first examination question data of paper, caching described first according to the structured data information Examination question data simultaneously show the first examination question data according to preset exhibition strategy.
11. device according to claim 8, which is characterized in that the determining module includes:
Acquiring unit: it is configured as obtaining the answer data of candidate and the answer progress msg, answer data is delayed It deposits;
The acquiring unit is additionally configured to request second to server according to the answer progress msg and structured data information Examination question data receive and cache the second examination question data;
The display unit is additionally configured to show the second examination question data according to the preset exhibition strategy, receives examination The answer data of person simultaneously cache;
Uploading unit: it is configured as being uploaded in a manner of incremental transmission according to the answer data that preset upload strategy will be cached To server.
12. device according to claim 11, which is characterized in that the preset upload strategy includes:
The answer data for setting number road examination question are uploaded in batches or are uploaded answer data in batches according to setting byte number Or answer data are uploaded in batches according to the examination question page number.
13. a kind of calculating equipment including memory, processor and stores the calculating that can be run on a memory and on a processor Machine instruction, which is characterized in that the processor realizes the step of claim 1-6 any one the method when executing described instruction Suddenly.
14. a kind of computer readable storage medium, is stored with computer instruction, which is characterized in that the instruction is held by processor The step of claim 1-6 any one the method is realized when row.
CN201811026428.8A 2018-09-04 2018-09-04 Method of data synchronization and device calculate equipment and storage medium Pending CN109218418A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811026428.8A CN109218418A (en) 2018-09-04 2018-09-04 Method of data synchronization and device calculate equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811026428.8A CN109218418A (en) 2018-09-04 2018-09-04 Method of data synchronization and device calculate equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109218418A true CN109218418A (en) 2019-01-15

Family

ID=64986108

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811026428.8A Pending CN109218418A (en) 2018-09-04 2018-09-04 Method of data synchronization and device calculate equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109218418A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111124759A (en) * 2019-12-27 2020-05-08 浪潮通用软件有限公司 Method, equipment and medium for data synchronization under hybrid cloud architecture
CN111741038A (en) * 2019-03-25 2020-10-02 华为技术有限公司 Data transmission method and data transmission device
CN111901420A (en) * 2020-07-28 2020-11-06 深圳市康冠科技股份有限公司 Data synchronization method, device and system
CN113342785A (en) * 2021-07-06 2021-09-03 多点生活(成都)科技有限公司 Data processing method and device, server device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880246A (en) * 2012-09-21 2013-01-16 陈思宁 Mobile integrated test server
CN106780212A (en) * 2016-12-23 2017-05-31 上海云丞聚智能科技有限公司 Online testing method, device and examination system
CN106971357A (en) * 2017-03-21 2017-07-21 广州网才信息技术有限公司 A kind of On-line Examining system and its examination data processing method
CN107170315A (en) * 2017-06-05 2017-09-15 深圳市海云天科技股份有限公司 A kind of with no paper online testing method and system
CN107393364A (en) * 2017-09-05 2017-11-24 艾牛(北京)科技有限公司 A kind of the classroom method of examination and system
CN107819870A (en) * 2017-11-21 2018-03-20 广州视睿电子科技有限公司 Incremental data pulling method and device, storage medium, terminal equipment and server

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102880246A (en) * 2012-09-21 2013-01-16 陈思宁 Mobile integrated test server
CN106780212A (en) * 2016-12-23 2017-05-31 上海云丞聚智能科技有限公司 Online testing method, device and examination system
CN106971357A (en) * 2017-03-21 2017-07-21 广州网才信息技术有限公司 A kind of On-line Examining system and its examination data processing method
CN107170315A (en) * 2017-06-05 2017-09-15 深圳市海云天科技股份有限公司 A kind of with no paper online testing method and system
CN107393364A (en) * 2017-09-05 2017-11-24 艾牛(北京)科技有限公司 A kind of the classroom method of examination and system
CN107819870A (en) * 2017-11-21 2018-03-20 广州视睿电子科技有限公司 Incremental data pulling method and device, storage medium, terminal equipment and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王烨: ""在线考试系统的分析与设计"", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111741038A (en) * 2019-03-25 2020-10-02 华为技术有限公司 Data transmission method and data transmission device
CN111124759A (en) * 2019-12-27 2020-05-08 浪潮通用软件有限公司 Method, equipment and medium for data synchronization under hybrid cloud architecture
CN111901420A (en) * 2020-07-28 2020-11-06 深圳市康冠科技股份有限公司 Data synchronization method, device and system
CN113342785A (en) * 2021-07-06 2021-09-03 多点生活(成都)科技有限公司 Data processing method and device, server device and storage medium

Similar Documents

Publication Publication Date Title
CN109218418A (en) Method of data synchronization and device calculate equipment and storage medium
US10951500B2 (en) Method and apparatus for warning
CN113065843B (en) Model processing method and device, electronic equipment and storage medium
WO2016179958A1 (en) Method, device and system for performing grey-releasing on mobile application
CN107197036A (en) A kind of consistent processing method of information based on block chain and terminal
US10263858B2 (en) Environment simulator for user percentile
JP7483929B2 (en) Method and apparatus for evaluating jointly trained models - Patents.com
CN114945817A (en) Task processing method, device and equipment based on defect detection and storage medium
CN106611001A (en) Method, device and system for checking consistency of data in database tables in virtual machines
CN109254914A (en) Software development kit test method, system, computer installation and readable storage medium storing program for executing
CN109831518A (en) A kind of map datum method for down loading and device calculate equipment and storage medium
CN110222280A (en) Data processing method and device for sharing
CN106327251A (en) Model training system and model training method
CN106161623A (en) Caching server, renewal server and data-updating method
CN109064815B (en) Online examination method and device, computing device and storage medium
CN107003981A (en) It is synchronous with the equipment locally matched to obtain data from remote server using point to point link
JP7568377B2 (en) Method and device for evaluating terminal vibration in game scenes, electronic device, and computer program
CN115829055A (en) Federal learning model training method and device, computer equipment and storage medium
CN106372267A (en) Page loading method and page loading device based on browser
CN109254954A (en) Document handling method and device calculate equipment and storage medium
CN112241357B (en) Method, apparatus, device and computer readable medium for gray scale testing
CN111862081A (en) Image scoring method, and training method and device of score prediction network
CN109189147A (en) Method for synchronizing time and device calculate equipment and storage medium
CN115292166A (en) Multi-person collaborative test case management method, device, equipment and medium
CN109408716A (en) Method and apparatus for pushed information

Legal Events

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

Address after: Units F01-03 and 05-10 on the 6th floor of No.1 Building, No.8 Courtyard, Guangshun South Street, Chaoyang District, Beijing

Applicant after: Beijing Ape Power Future Technology Co.,Ltd.

Address before: Units F01-03 and 05-10 on the 6th floor of No.1 Building, No.8 Courtyard, Guangshun South Street, Chaoyang District, Beijing

Applicant before: BEIJING FENBI WEILAI TECHNOLOGY CO.,LTD.

CB02 Change of applicant information
TA01 Transfer of patent application right

Effective date of registration: 20200508

Address after: 100102 unit F01, 5th floor and unit 04, F01, 6th floor, building 1, yard 8, Guangshun South Street, Chaoyang District, Beijing

Applicant after: Beijing ape force Education Technology Co.,Ltd.

Address before: Units F01-03 and 05-10 on the 6th floor of No.1 Building, No.8 Courtyard, Guangshun South Street, Chaoyang District, Beijing

Applicant before: Beijing Ape Power Future Technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20190115

RJ01 Rejection of invention patent application after publication