CN111262920A - Data synchronization method, interactive electronic whiteboard and server - Google Patents

Data synchronization method, interactive electronic whiteboard and server Download PDF

Info

Publication number
CN111262920A
CN111262920A CN202010032288.6A CN202010032288A CN111262920A CN 111262920 A CN111262920 A CN 111262920A CN 202010032288 A CN202010032288 A CN 202010032288A CN 111262920 A CN111262920 A CN 111262920A
Authority
CN
China
Prior art keywords
nth
data
server
serial number
electronic whiteboard
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
CN202010032288.6A
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.)
Shenzhen Honghe Innovation Information Technology Co Ltd
Original Assignee
Shenzhen Honghe Innovation Information 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 Shenzhen Honghe Innovation Information Technology Co Ltd filed Critical Shenzhen Honghe Innovation Information Technology Co Ltd
Priority to CN202010032288.6A priority Critical patent/CN111262920A/en
Publication of CN111262920A publication Critical patent/CN111262920A/en
Pending legal-status Critical Current

Links

Images

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
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/401Support for services or applications wherein the services involve a main real-time session and one or more additional parallel real-time or time sensitive sessions, e.g. white board sharing or spawning of a subconference
    • H04L65/4015Support for services or applications wherein the services involve a main real-time session and one or more additional parallel real-time or time sensitive sessions, e.g. white board sharing or spawning of a subconference where at least one of the additional parallel sessions is real time or time sensitive, e.g. white board sharing, collaboration or spawning of a subconference

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Information Transfer Between Computers (AREA)
  • Drawing Aids And Blackboards (AREA)

Abstract

The invention discloses a data synchronization method, an interactive electronic whiteboard and a server, wherein the method is applied to a first electronic whiteboard and comprises the following steps: when a first user carries out an Nth handwriting operation on the first electronic whiteboard, obtaining Nth handwriting data corresponding to the Nth handwriting operation; generating an Nth local serial number corresponding to the Nth handwriting data; generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local serial number; and sending the Nth data packet to be synchronized to a server so that the server informs a second electronic whiteboard to acquire the Nth data packet to be synchronized and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer. The invention solves the technical problem of data disorder in the data synchronization process of the interactive electronic whiteboard caused by network and other reasons in the prior art.

Description

Data synchronization method, interactive electronic whiteboard and server
Technical Field
The application relates to the technical field of modern teaching, in particular to a data synchronization method, an interactive electronic whiteboard and a server.
Background
The interactive electronic whiteboard is an interactive office teaching all-in-one machine, has the functions of supporting multi-person on-screen writing, network whiteboard and multi-terminal remote interaction, is usually applied to interactive teaching scenes such as a classroom of two teachers, an interactive classroom and a special courseware and video conference software, and usually comprises basic units such as a handwriting screen, a microcontroller, a projector and a communication unit, and realizes data transmission through the communication unit and other remote interactive electronic whiteboards.
In the using process, the interactive electronic whiteboard and other electronic whiteboards are communicated: the interactive electronic whiteboard as the main speaking end uploads data, the server stores the data, and other interactive electronic whiteboards as the listening and speaking ends are informed to update the data, so that the function of data synchronization is achieved.
However, the existing data synchronization method for the interactive electronic whiteboard is only suitable for the situation that the interactive electronic whiteboard is few, and when the number of the main speaking end and the listening end is large, due to different network conditions of the ends, the output time sequence and the input time sequence of data are inconsistent and the problem of disorder occurs in the process of synchronizing the data of the main speaking end by the listening end.
Disclosure of Invention
The embodiment of the application provides a data synchronization method, an interactive electronic whiteboard, a server, a computer storage medium and an interactive office teaching system, and solves the technical problem of data disorder of the interactive electronic whiteboard in the data synchronization process caused by reasons such as network in the prior art.
In a first aspect, the present application provides the following technical solutions through an embodiment of the present application:
a data synchronization method is applied to a first electronic whiteboard, and comprises the following steps: when a first user carries out an Nth handwriting operation on the first electronic whiteboard, obtaining Nth handwriting data corresponding to the Nth handwriting operation; generating an Nth local serial number corresponding to the Nth handwriting data; generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local serial number; and sending the Nth data packet to be synchronized to a server so that the server informs a second electronic whiteboard to acquire the Nth data packet to be synchronized and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
In one embodiment, before the generating an nth to-be-synchronized data packet based on the nth handwriting data and the nth local sequence number, the method further includes: sending an Nth request to the server, wherein the Nth request is used for acquiring an Nth server serial number from the server; receiving the Nth server serial number sent by the server; generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local sequence number, wherein the generating of the Nth data packet to be synchronized comprises the following steps: and generating the Nth data packet to be synchronized based on the Nth server serial number, the Nth local serial number and the Nth handwriting data.
In one embodiment, after the sending the nth to-be-synchronized data packet to the server, the method further includes: and sending an N +1 th request to the server to enable the server to return an N +1 th server serial number, wherein the N +1 th server serial number is used for generating an N +1 th to-be-synchronized data packet with the N +1 th handwriting data after acquiring the N +1 th handwriting data corresponding to the N +1 th handwriting operation of the first user on the first electronic whiteboard.
In a second aspect, the present application provides the following technical solutions through an embodiment of the present application:
a data synchronization method is applied to a server, and the method comprises the following steps: receiving an Nth to-be-synchronized data packet sent by a first electronic whiteboard, wherein the Nth to-be-synchronized data packet comprises an Nth local serial number and Nth handwriting data, the Nth handwriting data is handwriting data for a first user to perform Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data generated after the first electronic whiteboard obtains the Nth handwriting data; generating Nth synchronization information based on the Nth data packet to be synchronized; and sending the Nth synchronization information to a second electronic whiteboard, so that the second electronic whiteboard downloads the Nth data packet to be synchronized from the server based on the Nth synchronization information, and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
In one embodiment, before the receiving the nth to-be-synchronized data packet sent by the first electronic whiteboard, the method further includes: receiving an Nth request sent by the first electronic whiteboard, wherein the Nth request is used for acquiring an Nth server serial number from the server; and sending the Nth server serial number to the first electronic whiteboard based on the Nth request, so that the first electronic whiteboard generates the Nth to-be-synchronized data packet based on the Nth server serial number, the Nth local serial number and the Nth handwriting data.
In one embodiment, the generating nth synchronization information based on the nth to-be-synchronized data packet includes: extracting the Nth server serial number from the Nth data packet to be synchronized; and generating the Nth synchronous information based on the Nth server serial number.
In one embodiment, after the sending the nth synchronization information to the second electronic whiteboard, the method further includes: sending the nth to-be-synchronized data packet and the mth to-be-synchronized data packet to the second electronic whiteboard based on data request information sent by the second electronic whiteboard, wherein the data request information is information generated by the second electronic whiteboard based on the nth synchronization information after receiving the nth synchronization information sent by the server; the Mth to-be-synchronized data packet is a to-be-synchronized data packet which is stored in the server but not received by the second electronic whiteboard, the Mth to-be-synchronized data packet comprises an Mth server serial number, an Mth local serial number and Mth handwriting data, the Mth handwriting data is handwriting data of a first user for performing Mth handwriting operation on the first electronic whiteboard, the Mth local serial number is a local serial number which is generated after the first electronic whiteboard acquires the Mth handwriting data and corresponds to the Mth handwriting data, the time for the first electronic whiteboard to acquire the Mth handwriting data is earlier than the time for acquiring the Nth handwriting data, the Mth server serial number is a server serial number which is returned by the server after the first electronic whiteboard transmits an N +1 th request to the server after acquiring the Mth handwriting data, m is a positive integer.
In a third aspect, the present application provides the following technical solutions through an embodiment of the present application:
a data synchronization method is applied to a second electronic whiteboard, and comprises the following steps: receiving Nth synchronous information sent by a server; downloading an Nth to-be-synchronized data packet from the server based on the Nth synchronization information, wherein the Nth to-be-synchronized data packet comprises Nth handwriting data and an Nth local serial number, the Nth handwriting data is handwriting data acquired by a first electronic whiteboard when a first user performs Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data and generated after the first electronic whiteboard acquires the Nth handwriting data; extracting the Nth handwriting data and the Nth local serial number from the Nth data packet to be synchronized; and displaying the Nth handwriting data based on the Nth local serial number, wherein N is a positive integer.
In one embodiment, the nth synchronization information includes an nth server serial number, where the nth server serial number is a server serial number returned by the server after the first electronic whiteboard sends an nth request to the server after acquiring the nth handwriting data; the downloading the nth to-be-synchronized data packet from the server based on the nth synchronization information includes: extracting the Nth server serial number from the Nth synchronization information; and downloading the Nth data packet to be synchronized from the server based on the Nth server serial number.
In one embodiment, the downloading the nth to-be-synchronized data packet from the server based on the nth server serial number includes: generating data request information based on the Nth server serial number and an existing server serial number stored in the second electronic whiteboard, wherein the data request information is used for downloading the Nth to-be-synchronized data packet and an Mth to-be-synchronized data packet from the server, the Mth to-be-synchronized data packet is a to-be-synchronized data packet which is stored in the server but not received by the second electronic whiteboard, the Mth to-be-synchronized data packet comprises an Mth server serial number, an Mth local serial number and Mth handwriting data, the Mth handwriting data is handwriting data of the first user for performing Mth handwriting operation on the first electronic whiteboard, the Mth local serial number is a local serial number which is generated after the first electronic whiteboard acquires the Mth handwriting data and corresponds to the Mth handwriting data, and the time for acquiring the Mth handwriting data by the first electronic whiteboard is earlier than the time for acquiring the Nth handwriting data, the Mth server serial number is a server serial number returned by the server after the first electronic whiteboard sends an (N + 1) th request to the server after acquiring the Mth handwriting data; sending the data request information to the server; and receiving the Nth data packet to be synchronized and the Mth data packet to be synchronized which are sent by the server, wherein M is a positive integer.
In one embodiment, the extracting the nth handwriting data and the nth local sequence number from the nth to-be-synchronized data packet includes: extracting the Nth handwriting data and the Nth local serial number from the Nth data packet to be synchronized, and extracting the Mth handwriting data and the Mth local serial number from the Mth data packet to be synchronized; the synchronous display of the nth handwriting data based on the nth local serial number comprises: and displaying the Nth handwriting data and the Mth handwriting data based on the Nth local serial number and the Mth local serial number.
In a fourth aspect, the present application provides the following technical solutions through an embodiment of the present application:
an interactive electronic whiteboard, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the program may perform the method steps as described in any of the embodiments of the first or third aspect.
In a fifth aspect, the present application provides the following technical solutions through an embodiment of the present application:
a server, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor when executing the program may perform the method steps as described in any of the embodiments of the second aspect.
In a sixth aspect, the present application provides the following technical solutions through an embodiment of the present application:
a computer storage medium having a computer program stored thereon, comprising: the program may, when executed by a processor, implement the method steps as described in any of the embodiments of the first, second or third aspect above.
In a seventh aspect, the present application provides the following technical solutions through an embodiment of the present application:
an interactive office teaching system comprising: an interactive electronic whiteboard as described in the fourth aspect above; the server according to the fifth aspect.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
the method comprises the steps that a first electronic whiteboard is used as a data uploading end, before the Nth handwriting data are uploaded, the Nth local serial number is added to the Nth handwriting data, and then an Nth to-be-synchronized data packet is generated and uploaded to a server; the server sends Nth synchronization information to the second electronic whiteboard after receiving the Nth to-be-synchronized data packet so as to inform the second electronic whiteboard to acquire the Nth to-be-synchronized data packet; and after receiving the Nth synchronizing information, the second electronic whiteboard downloads an Nth to-be-synchronized data packet from the server based on the Nth synchronizing information, and synchronously displays the Nth handwriting data based on the Nth local serial number in the Nth to-be-synchronized data packet. According to the method and the device, aiming at the problem of disorder of interactive whiteboard data caused by reasons such as network instability, the Nth handwriting data is synchronously displayed according to the Nth local serial number representing the input time sequence, and the consistency of the output time sequence and the input time sequence of the Nth handwriting data can be ensured, so that the technical problem of disorder of data of the interactive whiteboard in the data synchronization process caused by reasons such as network in the prior art is solved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a data synchronization method according to an embodiment of the present application;
fig. 2 is a flowchart of a data synchronization method according to a second embodiment of the present application;
fig. 3 is a flowchart of a data synchronization method according to a third embodiment of the present application;
fig. 4 is a structural diagram of an interactive electronic whiteboard according to a fourth embodiment of the present application;
fig. 5 is a structural diagram of a server according to a fifth embodiment of the present application;
fig. 6 is a structural diagram of an interactive electronic whiteboard according to a sixth embodiment of the present application;
fig. 7 is a block diagram of a computer storage medium according to a seventh embodiment of the present application;
fig. 8 is a block diagram of a computer storage medium according to an eighth embodiment of the present application;
fig. 9 is a block diagram of a computer storage medium according to a ninth embodiment of the present application;
fig. 10 is a structural diagram of an interactive office teaching system according to a tenth embodiment of the present application.
Detailed Description
The embodiment of the application provides a data synchronization method, an interactive electronic whiteboard, a server, a computer storage medium and an interactive office teaching system, and solves the technical problem of data disorder of the interactive electronic whiteboard in the data synchronization process caused by reasons such as network in the prior art.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
the first electronic whiteboard is used as a data uploading end, and before the Nth handwriting data is uploaded, the Nth to-be-synchronized data packet is generated and uploaded to the server after the Nth local serial number is added to the Nth handwriting data; the server sends Nth synchronization information to the second electronic whiteboard after receiving the Nth to-be-synchronized data packet so as to inform the second electronic whiteboard to acquire the Nth to-be-synchronized data packet; and after receiving the Nth synchronous information, the second electronic whiteboard downloads an Nth data packet to be synchronized from the server based on the Nth synchronous information, and displays the Nth handwriting data based on an Nth local serial number in the Nth data packet to be synchronized, wherein N is a positive integer. According to the method and the device, aiming at the problem of data disorder caused by reasons such as network instability, the Nth handwriting data is displayed according to the Nth local serial number representing the input time sequence, the output time sequence and the input time sequence of the Nth handwriting data can be ensured to be consistent, and therefore the problem of data disorder caused by reasons such as network instability is solved.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example one
As shown in fig. 1, the present embodiment provides a data synchronization method, which is applied to a first electronic whiteboard.
The first electronic whiteboard is an interactive office teaching all-in-one machine, has the functions of supporting multi-person on-screen writing, network whiteboard and multi-terminal remote interaction, is usually applied to interactive teaching scenes such as a teacher classroom, an interactive classroom and a special delivery classroom and video conferences, and usually comprises a handwriting screen, a microcontroller, a projector, a communication unit and other basic units, wherein the handwriting screen supports arbitrary writing and drawing thereon, the microcontroller collects the writing content of a user on the handwriting screen to acquire the input data of the user, and the projector projects the content of a PC terminal onto the handwriting screen; the first electronic whiteboard can also communicate with second electronic whiteboards in other offices, meeting rooms, classrooms and the like through a network, and the collected input data are transmitted to the second electronic whiteboards at a specific frequency. And for the second electronic whiteboard for receiving the data, outputting the input data according to the receiving sequence, and sequentially connecting the input data which are continuously written without pen lifting according to the receiving sequence, thereby acquiring the handwriting operation of the first user on the first electronic whiteboard.
For convenience of understanding, in this embodiment, the first electronic whiteboard is taken as an uploading end of data, and the second electronic whiteboard is taken as a receiving end of data for description, but in an actual application process, the second electronic whiteboard also has the same function as the first electronic whiteboard, and the first electronic whiteboard and the second electronic whiteboard may be both the uploading end of data and the receiving end of data.
The method comprises the following steps:
and S101, when a first user carries out the Nth handwriting operation on the first electronic whiteboard, obtaining Nth handwriting data corresponding to the Nth handwriting operation.
In practical application, when a first user writes on the first electronic whiteboard at will, the first electronic whiteboard acquires contact data corresponding to contacts touched by the first user, and packages the acquired contact data at a specific frequency, so that a plurality of handwriting data corresponding to writing are obtained. The touch point is a touch point of a first user when writing on the first electronic whiteboard, and the touch point data is description information such as coordinates corresponding to the touch point.
It should be noted that the specific frequency is inverse to the sampling period, for example: the specific frequency is 50 times/second, the sampling period is 20 milliseconds/time, and packing the acquired data at the specific frequency means that: and packing the contact data acquired in the acquisition period every other sampling period to generate handwriting data under handwriting operation corresponding to the sampling period, namely, one acquisition period corresponds to one handwriting operation, one handwriting operation corresponds to one handwriting data, and in one sampling period, a first user can perform touch operation on one or more than one contact, so that one handwriting data can contain the contact data corresponding to one or more than one contact.
For example: the first user intends to input a straight line on the first electronic whiteboard, the first electronic whiteboard collects contact data corresponding to each contact of the first user touch operation, and packs the collected contact data at a specific frequency of 50 times/second (every 20 milliseconds/time collection period), so that first handwriting data corresponding to the first handwriting operation is obtained in the first collection period according to the collection sequence; in a second acquisition period, obtaining second handwriting data corresponding to second handwriting operation; … …, respectively; acquiring Nth handwriting data corresponding to the Nth handwriting operation in an Nth acquisition period; … … and so on.
In this embodiment, the nth handwriting operation is a touch operation of the first user on multiple contacts of the first electronic whiteboard in the nth acquisition period, and the nth handwriting data is contact data corresponding to the multiple contacts corresponding to the nth handwriting operation, where when the first user writes on the first electronic whiteboard, a time point at which writing starts is taken as a starting point, an acquisition period is taken as a step length, and the nth acquisition period is an acquisition period corresponding to the nth step length.
And S102, generating an Nth local serial number corresponding to the Nth handwriting data.
In practical application, the generation rule of the local serial number is as follows: according to the sequence of obtaining handwriting data, generating a corresponding local serial number for the handwriting data every time one piece of handwriting data is obtained, sequentially increasing the local serial numbers by a set step length according to the generated sequence, setting the step length at intervals between two adjacent local serial numbers, and setting the set step length as required.
For example: when the Nth handwriting data is obtained, automatically generating an Nth local serial number num; when the (N + 1) th handwriting data is obtained, the (N + 1) th local serial number is generated to be num +1(1 is a set step length), and then num is larger than num +1 and represents that the (N) th handwriting data is input before the (N + 1) th handwriting data.
The local serial number corresponds to the handwriting data one to one, and is generated and increased in the order of obtaining the handwriting data, so that the local serial number can represent the input time sequence of the handwriting data.
And S103, generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local serial number.
During the long-term research, the applicant finds the following problems in the prior art:
when a first user continues handwriting operation on a first electronic whiteboard, due to the network, the problem of disorder of data packets exists in the uploading process, so that the disorder of the data packets received by a server is caused, the disorder of the data packets occurs when a second electronic whiteboard serving as a data receiving end displays the downloaded disorder data packets, and the problem of inconsistency of the output time sequence and the input time sequence of the uploading end occurs.
The following describes, by way of example, a problem that an output timing is inconsistent with an input timing at an upload terminal due to out-of-order data packets during the upload process, so as to understand the technical problem more thoroughly, specifically as follows:
when a first user continuously performs handwriting operation on a first electronic whiteboard, handwriting data A and handwriting data B are obtained in sequence. However, due to the network, the handwriting data A written first is transmitted to the server, and the handwriting data B written later is transmitted to the server, so that the problem of disorder of data input by the same user at the same end during uploading occurs; the server does not know whether the handwriting data A and the handwriting data B are out of order or not, the handwriting data A and the handwriting data B are stored according to the receiving sequence and are informed to be downloaded according to the uploading sequence, the handwriting data B is firstly downloaded to be displayed by the second electronic whiteboard, then the handwriting data A is downloaded to be displayed, and the handwriting data A is obviously inconsistent with the input sequence.
In order to solve the problem that the output time sequence and the input time sequence are inconsistent due to data disorder in the uploading process, in this embodiment, after a local serial number capable of representing the input time sequence of the handwriting data is added to the handwriting data to be uploaded, a data packet to be synchronized is generated to be uploaded, even if the disorder problem occurs in the uploading process, after the disorder data packet to be synchronized is downloaded from the server, the second electronic whiteboard can also judge whether the disorder exists in the data packet to be synchronized based on the local serial number in the data packet to be synchronized, and then adjust the display sequence of the disorder data packet to be synchronized, so that the effect of synchronizing the output time sequence and the input time sequence is achieved.
And S104, sending the Nth data packet to be synchronized to the server so that the server informs the second electronic whiteboard to acquire the Nth data packet to be synchronized, and displaying the Nth handwriting data according to the Nth local serial number.
In order to solve the problem of inconsistency between the output time sequence and the input time sequence caused by data disorder in the uploading process, the present application further provides an optional embodiment, which specifically includes:
before step S103, sending an nth request to the server, where the nth request is used to obtain an nth server serial number from the server; receiving an Nth server serial number sent by a server;
generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local sequence number, wherein the method comprises the following steps: and generating an Nth data packet to be synchronized based on the Nth server serial number, the Nth local serial number and the Nth handwriting data.
In practical application, after a server serial number capable of representing a handwriting data input time sequence is added to the handwriting data to be uploaded, a to-be-synchronized data packet is generated to be uploaded, and even if a disorder problem occurs in the uploading process, after the second electronic whiteboard downloads the disorder to-be-synchronized data packet from the server, whether the to-be-synchronized data packet has disorder can be judged based on the server serial number in the to-be-synchronized data packet, and then the display sequence of the disorder to-be-synchronized data packet is adjusted, so that the effect of synchronizing the output time sequence and the input time sequence is achieved.
It should be noted that the nth server serial number is assigned by the server based on the receiving timing sequence of the nth request, and represents the receiving timing sequence of the nth request, and on the premise that the nth request can represent the input timing sequence of the nth handwriting data, the nth server serial number represents the input timing sequence of the nth handwriting data.
In the server, the generation rule of the Nth server serial number is as follows: the first currently available sequence number that is ranked after the currently unavailable sequence number among the sequence numbers generated according to the specific order, for example: the sequence numbers are generated in an increasing order, wherein 1, 2, 3 and 4 are used and belong to currently unavailable sequence numbers, and the first currently available sequence number ranked after the currently unavailable sequence number is 5, and the 5 is sent to the first electronic whiteboard as the nth server sequence number.
The nth server serial number and the nth local serial number are not necessarily the same, on one hand, the distribution rule of the nth server serial number may be different, and on the other hand, the server serial number distributed by the server may be sent to other electronic whiteboards that request the server serial number in addition to the first electronic whiteboard.
As an alternative embodiment, after step S104, the method further includes:
and sending an N +1 th request to the server to enable the server to return an N +1 th server serial number, wherein the N +1 th server serial number is used for generating an N +1 th data packet to be synchronized after acquiring the N +1 th handwriting data corresponding to the N +1 th handwriting operation of the first user on the first electronic whiteboard.
During the long-term research, the applicant finds that the following problems exist in the prior art: the request for applying for the server serial number, as a form of data, also has a problem of disorder due to a problem of a network, and further causes that the applied server serial number cannot represent an input time sequence of handwriting data. The description follows with the above example: the request A of the handwriting data A written first is transmitted to the server due to the network, the request B of the handwriting data B written later is transmitted to the server, the server serial number allocated by the server based on the request B is obviously earlier than the server serial number allocated by the server based on the request A, and the server serial number cannot represent the input time sequence of the handwriting data A and the handwriting data B.
In order to solve the above-mentioned request for the server serial number, there is a problem of disorder due to the problem of the network, and the applied server serial number can not represent the input time sequence of the handwriting data, after the data packet to be synchronized corresponding to the previous handwriting data is sent, then, the server serial number of the next handwriting data is requested, the time sequence of the request, the server serial number and the handwriting data input by the first user is strictly ensured to be consistent, so that the server serial number can represent the input time sequence of the handwriting data, the subsequent second electronic whiteboard is ensured to download the disordered data packet to be synchronized from the server, it is also possible to determine whether the data packets to be synchronized are out of order based on the server sequence numbers in the data packets to be synchronized, and then the display sequence of the disordered data packets to be synchronized is adjusted so as to achieve the effect of synchronizing the output time sequence and the input time sequence.
Specifically, when a first user performs an nth handwriting operation and an N +1 th handwriting operation on a first electronic whiteboard, nth handwriting data and an nth local serial number corresponding to the nth handwriting operation, and N +1 th handwriting data and an N +1 th local serial number corresponding to the N +1 th handwriting operation are obtained; sending an Nth request to the server, wherein the Nth request is used for acquiring an Nth server serial number from the server; receiving an Nth server serial number sent by a server; generating an Nth data packet to be synchronized based on the Nth server serial number, the Nth local serial number and the Nth handwriting data; sending the Nth data packet to be synchronized to a server; after the Nth to-be-synchronized data packet is sent, an (N + 1) th request is sent to the server, and the (N + 1) th request is used for acquiring an (N + 1) th server serial number from the server; receiving an N +1 th server serial number sent by a server; generating an N +1 th data packet to be synchronized based on the N +1 th server serial number, the N +1 th local serial number and the N +1 th handwriting data; the (N + 1) th packet to be synchronized is sent to the server … ….
As an optional embodiment, after obtaining the nth handwriting data, the corresponding nth local serial number, and the nth server serial number, the first electronic whiteboard serving as the upload end updates the nth handwriting data, the corresponding nth local serial number, and the nth server serial number into an existing data table of the first electronic whiteboard.
During the long-term research, the applicant finds the following problems in the prior art: due to the network, the problem that the data packet to be synchronized is lost may occur in the uploading process of the uploading end, so that the server cannot receive the data packet to be synchronized, and further the second electronic whiteboard serving as the data receiving end cannot display the data shared by the first electronic whiteboard serving as the data uploading end.
In order to solve the problem that a data packet to be synchronized may be lost during the uploading process of the uploading end, the first electronic whiteboard updates the nth handwriting data and the corresponding nth local serial number and nth server serial number into an existing data number table so as to facilitate retransmission of the lost data packet to be synchronized, specifically, after receiving the data packet to be synchronized uploaded by the uploading end, the server compares the local serial number or the server serial number in the data packet to be synchronized with the existing local serial number or the server serial number in the database according to the local serial number or the server serial number in the data packet to be synchronized, and judges whether the lost data packet to be synchronized exists, if so, the server feeds back the lost data packet to be synchronized to the first electronic whiteboard, and after receiving the feedback, the first electronic whiteboard retransmits the lost data packet to be synchronized obtained from the existing data number table.
As an alternative embodiment, step S103 specifically includes: and generating an Nth data packet to be synchronized based on the Nth server serial number, the Nth local serial number, the Nth handwriting data and the first identifier of the first electronic whiteboard.
During the long-term research, the applicant finds the following problems in the prior art:
in an interactive teaching scene, one or more than one client side for uploading data can be provided, and the same client side can support the function of writing by multiple persons on the same screen. If the data of different clients and different users of the same client are not distinguished, when a second electronic whiteboard serving as a receiving end displays the data with different sources, a connection between two data with different sources may exist in the future, so that the data input by the client downloading the data is completely different from the data input by the client uploading the data when the client downloading the data displays the data, and the problem of disordered display occurs.
The above problem of display confusion is explained by way of example below to facilitate a more thorough understanding of the technical problem, as follows:
the electronic whiteboard A uploads handwriting data a and handwriting data b, and the handwriting data a and the handwriting data b are connected straight lines; the electronic whiteboard B uploads handwriting data c and handwriting data d, and the handwriting data c and the handwriting data d are connected straight lines; if the uploading end does not distinguish the sources of the handwriting data a, the handwriting data B, the handwriting data C and the handwriting data d, when the electronic whiteboard C displays the handwriting data a, the handwriting data B, the handwriting data C and the handwriting data d, the points corresponding to the handwriting data a, the handwriting data B, the handwriting data C and the handwriting data d are directly connected for displaying, and obviously, the data are completely different from the data uploaded by the electronic whiteboard A and the electronic whiteboard B.
In order to solve the problem of display confusion, in this embodiment, when the data packet to be synchronized is uploaded, the data of different clients and different users of the same client are carried with corresponding identifiers for distinguishing. For the case that there are multiple clients uploading data, the first identifier may be network port identifier, device number identifier, or other identifier information with unique identifier. For the case of multiple users of the same client, the first identifier for distinguishing different users may be: the identification information related to the continuous writing operation of the pen not mentioned, that is, regarding the continuous writing operation of each pen not mentioned as the operation of the same user, the first electronic whiteboard generates identification information uniquely corresponding to the first electronic whiteboard.
In this embodiment, the data of different clients and different users of the same client are distinguished through the first identifier, and the second electronic whiteboard serving as the receiving end displays and connects the distinguished data from the same source, so that the problem of disordered display is avoided.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the method comprises the steps that a first electronic whiteboard is used as a data uploading end, before the Nth handwriting data are uploaded, the Nth local serial number is added to the Nth handwriting data, and then an Nth to-be-synchronized data packet is generated and uploaded to a server; the server sends Nth synchronization information to the second electronic whiteboard after receiving the Nth to-be-synchronized data packet so as to inform the second electronic whiteboard to acquire the Nth to-be-synchronized data packet; and after receiving the Nth synchronizing information, the second electronic whiteboard downloads an Nth to-be-synchronized data packet from the server based on the Nth synchronizing information, and displays the Nth handwriting data based on the Nth local serial number in the Nth to-be-synchronized data packet. According to the method and the device, aiming at the problem of data disorder caused by reasons such as network instability, the Nth handwriting data is displayed according to the Nth local serial number representing the input time sequence, the output time sequence and the input time sequence of the Nth handwriting data can be ensured to be consistent, and therefore the problem of data disorder caused by reasons such as network instability is solved.
Example two
As shown in fig. 2, the present embodiment provides a data synchronization method, which is applied in a server, and the method includes:
step S201, receiving an Nth to-be-synchronized data packet sent by the first electronic whiteboard, wherein the Nth to-be-synchronized data packet comprises an Nth local serial number and Nth handwriting data, the Nth handwriting data is handwriting data of a first user for performing Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data generated after the first electronic whiteboard obtains the Nth handwriting data.
It should be noted that the nth handwriting operation, the nth handwriting data, and the nth local serial number are explained in the first embodiment, and are not described herein.
And S202, generating Nth synchronous information based on the Nth data packet to be synchronized.
Specifically, an nth local sequence number corresponding to the nth handwriting data is extracted from the nth data packet to be synchronized, and nth synchronization information is generated based on the nth local sequence number. The Nth local serial number is generated based on the Nth handwriting data and is in one-to-one correspondence with the Nth handwriting data, so that the second electronic whiteboard can successfully download the Nth to-be-synchronized data packet corresponding to the Nth local serial number from the server based on the Nth local serial number based on the correspondence.
And S203, sending the Nth synchronous information to the second electronic whiteboard so that the second electronic whiteboard downloads an Nth data packet to be synchronized from the server based on the Nth synchronous information, and displaying the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
As an alternative embodiment, before step S201, the method further includes:
receiving an Nth request sent by the first electronic whiteboard, wherein the Nth request is used for acquiring an Nth server serial number from a server;
and based on the Nth request, sending the Nth server serial number to the first electronic whiteboard so that the first electronic whiteboard generates an Nth to-be-synchronized data packet based on the Nth server serial number, the Nth local serial number and the Nth handwriting data. Correspondingly, the nth to-be-synchronized data packet received in step S201 further includes an nth server sequence number.
It should be noted that, after receiving the nth to-be-synchronized data packet containing the nth server serial number, the server stores the nth to-be-synchronized data packet in the Redis database in a key-value pair manner, where key is the nth server serial number and value is the nth handwriting data. The Redis database is used for storage, a cache queue of data can be maintained, the time sequence of the data is guaranteed, and the rapidity of subsequent data reading is facilitated.
As an alternative embodiment, step S202 includes:
extracting an Nth server serial number from the Nth data packet to be synchronized; generating Nth synchronization information based on the Nth server sequence number.
In practical application, the nth server serial number is obtained based on the nth request after the nth handwriting data is obtained, and is in one-to-one correspondence with the nth handwriting data, so that the nth to-be-synchronized data packet corresponding to the nth server serial number can be successfully downloaded from the server based on the nth server serial number based on the correspondence.
In this embodiment, compared with the local serial number, the nth synchronization information is generated based on the server serial number, which has the following advantages:
firstly, the server serial number is a serial number maintained by the server, may include a serial number applied by a first electronic whiteboard and serial numbers applied by other electronic whiteboards, and is a set of serial numbers uniformly distributed to multiple terminals, and the server serial numbers carried by data packets to be synchronized uploaded at the multiple terminals do not have the same condition. If the nth synchronization information is generated based on the local serial number, the nth synchronization information managed by the server may include the same local serial number due to the fact that the local serial numbers from different electronic whiteboards may be the same, at this time, in order to distinguish the nth synchronization information corresponding to different sources, identification is added for distinguishing, then the server manages a plurality of sets of nth synchronization information with different management sources, and the nth synchronization information becomes complicated.
And secondly, sequentially storing the data packets to be synchronized corresponding to the server serial numbers in a Redis database of the server according to a specific rule sequence when the server serial numbers are distributed. And generating Nth synchronous information based on the server serial number, and extracting the server serial number from the Nth synchronous information by a subsequent second electronic whiteboard so as to request to download a corresponding data packet to be synchronized from the server. The local serial number is a set of serial numbers managed by the first electronic whiteboard, when the data packets to be synchronized are uploaded to a database of the server for storage, the storage sequence cannot be guaranteed, and when the subsequent second electronic whiteboard requests to download the corresponding data packets to be synchronized based on the local serial number, the storage sequence of the data packets to be synchronized in the database cannot be guaranteed, so that the speed of the server for positioning the data packets to be synchronized based on the local serial number is greatly reduced. Meanwhile, local serial numbers carried by data packets to be synchronized from different electronic whiteboards may be the same, and at this time, the process of positioning data is as follows: firstly, the source of the data packet to be synchronized needs to be distinguished based on the identifier, and then the data packet to be synchronized corresponding to the local serial number under the identifier is located, and the process of distinguishing the identifier is added, so that the speed of locating the data packet to be synchronized is obviously reduced.
As an optional embodiment, the nth to-be-synchronized data packet further includes: a first identification of the first electronic whiteboard.
Specifically, for the case that there are multiple clients uploading data, the first identifier may be unique identifier information such as a network port identifier and an equipment number identifier. The first identifier for distinguishing different users may be: the identification information related to the continuous writing operation of the pen not mentioned, that is, regarding the continuous writing operation of each pen not mentioned as the operation of the same user, the first electronic whiteboard generates identification information uniquely corresponding to the first electronic whiteboard.
The nth data packet to be synchronized received in this embodiment includes a first identifier, where the first identifier distinguishes data packets to be synchronized uploaded by different clients and different users of the same client, so that the second electronic whiteboard serving as a receiving end downloads the data packet to be synchronized carrying the first identifier from the server, and distinguishes data sources through the first identifier, and displays and connects data of the same source, thereby avoiding displaying data of different sources on a connection, and avoiding a problem of confusion display.
As an alternative embodiment, after step S203, the method further includes:
receiving data request information sent by a second electronic whiteboard, wherein the data request information is information generated by the second electronic whiteboard based on Nth synchronous information after receiving the Nth synchronous information sent by a server;
sending the Nth data packet to be synchronized and the Mth data packet to be synchronized to the second electronic whiteboard based on the data request information sent by the second electronic whiteboard;
the M-th data packet to be synchronized is a data packet to be synchronized which is stored in the server but not received by the second electronic whiteboard, the M-th data packet to be synchronized comprises an M-th server serial number, an M-th local serial number and M-th handwriting data, the M-th handwriting data is handwriting data of a first user for performing M-th handwriting operation on the first electronic whiteboard, the M-th local serial number is a local serial number which is generated after the first electronic whiteboard acquires the M-th handwriting data and corresponds to the M-th handwriting data, the time for the first electronic whiteboard to acquire the M-th handwriting data is earlier than the time for acquiring the N-th handwriting data, the M-th server serial number is a server serial number which is returned by the server after the first electronic whiteboard acquires the M-th handwriting data and sends an M-th request to the server, and M is a positive integer.
Specifically, the data request information includes an mth server serial number and an nth server serial number, and/or an nth server serial number and an existing server serial number stored in the second electronic whiteboard, where the existing server serial number is a server serial number corresponding to a to-be-synchronized data packet downloaded from a server by the second electronic whiteboard, and the mth server serial number is a serial number between the nth server serial number and the existing server serial number stored in the second electronic whiteboard;
based on the data request information sent by the second electronic whiteboard, sending the nth to-be-synchronized data packet and the mth to-be-synchronized data packet to the second electronic whiteboard, specifically including: extracting an Mth server serial number and an Nth server serial number from the data request information, and/or extracting the Nth server serial number and an existing server serial number stored in the second electronic whiteboard; and reading an Nth to-be-synchronized data packet corresponding to the Nth server serial number and an Mth to-be-synchronized data packet corresponding to the Mth server serial number from a Redis database based on the extracted Mth server serial number and the Nth server serial number and/or the Nth server serial number and the existing server serial number stored in the second electronic whiteboard, and sending the Nth to-be-synchronized data packet and the Mth to-be-synchronized data packet to the second electronic whiteboard.
It should be noted that the mth data packet to be synchronized may include one or more data packets to be synchronized, the mth handwriting operation is a touch operation of the first user on the plurality of contacts of the first electronic whiteboard in the mth acquisition period, the mth handwriting data is contact data corresponding to the plurality of contacts corresponding to the mth handwriting operation, when the first user writes on the first electronic whiteboard, the time point at which writing starts is taken as a starting point, the acquisition period is taken as a step length, and the mth acquisition period is an acquisition period corresponding to the mth step length.
During the long-term research, the applicant finds the following problems in the prior art:
due to the unstable public network, the second electronic whiteboard may have a network break condition, or the second electronic whiteboard is in an offline state caused by other reasons, so that the second electronic whiteboard cannot be successfully notified of the data synchronization information, and the second electronic whiteboard cannot update the handwriting data in time, and a large number of missing data packets to be synchronized will exist.
In order to solve the problem that the second electronic whiteboard cannot be updated in time due to the fact that data synchronization information cannot be successfully notified to the second electronic whiteboard caused by the fact that the public network is unstable, a fault-tolerant mechanism is arranged to support reading of historical data. That is, as long as the second electronic whiteboard initiates data request information carrying the nth server serial number and the existing server serial number stored in the second electronic whiteboard, and/or the nth server serial number and the mth server serial number, the server can identify that the mth to-be-synchronized data packet belongs to the missing to-be-synchronized data packet of the second electronic whiteboard, and then send the nth to-be-synchronized data packet and the mth to-be-synchronized data packet to the second electronic whiteboard.
As an alternative embodiment, step S203 includes:
and sending the Nth synchronous information to a subscription server, and forwarding the Nth synchronous information to the second electronic whiteboard through the subscription server, wherein the subscription server interacts with the second electronic whiteboard through a Message queue Telemetry Transport protocol (MQTT) protocol. And the subscription server is adopted to forward the Nth synchronous information, so that the load of the server can be shared.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the method comprises the steps that a first electronic whiteboard serves as a data uploading end, before the Nth handwriting data are uploaded, an Nth server serial number representing the Nth handwriting data input time sequence is applied to a server, the Nth server serial number is added to the Nth handwriting data, and an Nth to-be-synchronized data packet is generated and uploaded to the server; the server sends Nth synchronization information to the second electronic whiteboard after receiving the Nth to-be-synchronized data packet so as to inform the second electronic whiteboard to acquire the Nth to-be-synchronized data packet; and after receiving the Nth synchronous information, the second electronic whiteboard downloads an Nth to-be-synchronized data packet from the server based on the Nth synchronous information, and synchronously displays the Nth handwriting data based on the Nth server serial number in the Nth to-be-synchronized data packet. According to the method and the device, aiming at the problem of data disorder caused by reasons such as network instability, the Nth handwriting data is synchronously displayed according to the Nth server serial number representing the input time sequence, the output time sequence and the input time sequence of the Nth handwriting data can be ensured to be consistent, and therefore the problem of data disorder caused by reasons such as network instability is solved.
EXAMPLE III
As shown in fig. 3, this embodiment provides a data synchronization method, which is applied to a second electronic whiteboard, where the second electronic whiteboard has the same function as the first electronic whiteboard, and for convenience of understanding, in this embodiment, the first electronic whiteboard is used as an upload end of data, the second electronic whiteboard is used as a receiving end of the data for description, and the second electronic whiteboard is used as a receiving end of the data, and outputs each input data according to a receiving sequence, and connects each input data of continuous writing without pen lifting in sequence according to the receiving sequence, so as to obtain a handwriting operation of a first user on the first electronic whiteboard. It should be noted that, in the practical application process, the first electronic whiteboard and the second electronic whiteboard may be both an uploading end and a receiving end of data, and are not limited.
The method comprises the following steps:
step S301: and receiving the Nth synchronization information sent by the server.
Step S302: and downloading an Nth data packet to be synchronized from the server based on the Nth synchronization information, wherein the Nth data packet to be synchronized comprises Nth handwriting data and an Nth local serial number, the Nth handwriting data is handwriting data acquired by the first electronic whiteboard when a first user performs Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data and generated after the first electronic whiteboard acquires the Nth handwriting data.
Specifically, an nth local sequence number is extracted from nth synchronization information, and an nth data packet to be synchronized is downloaded from the server based on the nth local sequence number. Because the Nth local serial number is generated based on the Nth handwriting data and forms a one-to-one corresponding relation with the Nth handwriting data, based on the corresponding relation, the second electronic whiteboard can successfully download the Nth to-be-synchronized data packet corresponding to the Nth local serial number from the server based on the Nth local serial number.
Step S303: and extracting the Nth handwriting data and the Nth local serial number from the Nth data packet to be synchronized.
It should be noted that, after the nth to-be-synchronized data packet is obtained by the second electronic whiteboard, the corresponding nth local serial number needs to be added to an existing local serial number table stored in the second electronic whiteboard, where the existing local serial number table stores an existing local serial number, and the existing local serial number is a local serial number corresponding to the to-be-synchronized data packet that has been downloaded from the server by the second electronic whiteboard, for the following reasons:
during the long-term research, the following problems are found in the prior art:
due to the unstable public network, the second electronic whiteboard may have a broken network, or the second electronic whiteboard is in an off-line state caused by other reasons, and the second electronic whiteboard cannot receive data synchronization information sent by the server, so that the second electronic whiteboard cannot update the handwriting data in time, and a large number of missing data packets to be synchronized will exist.
In order to determine whether a second electronic whiteboard has a large number of missing data packets to be synchronized, after the second electronic whiteboard of the application obtains nth handwriting data, the nth local serial number needs to be added to an existing local serial number table stored in the second electronic whiteboard, so that after a subsequent second electronic whiteboard obtains local serial numbers corresponding to other data packets to be synchronized, the local serial numbers are compared with existing local serial numbers stored in the existing local serial number table to determine whether the missing data packets to be synchronized exist, and if the missing data packets to be synchronized exist, the missing data packets to be synchronized need to be downloaded from a server.
Step S304: and displaying the Nth handwriting data based on the Nth local serial number, wherein N is a positive integer.
During the long-term research, the applicant finds that the following problems exist in the prior art:
when the data receiving end receives the data, the data receiving end receives and connects the data according to the receiving sequence, and if the second electronic whiteboard is out of sequence due to network reasons, the output time sequence of the handwriting data at the display end is inconsistent with the input time sequence of the writing end in the process of downloading the data.
The problem of data disorder in the process of downloading data is described below by way of example, so as to better understand the technical problem, which is specifically as follows:
the electronic whiteboard A sequentially collects handwriting data a, handwriting data B and handwriting data c and uploads the handwriting data a, the handwriting data B and the handwriting data c to the server, handwriting corresponding to the handwriting data a, the handwriting data B and the handwriting data c is a letter V (according to writing sequence, the handwriting data a corresponds to a point on the upper left, the handwriting data B corresponds to a turning point on the lower side, and the handwriting data c corresponds to a point on the upper right), the server sequentially sends a synchronous message 1 of the handwriting data a, a synchronous message 2 of the handwriting data B and a synchronous message 3 of the handwriting data c to the electronic whiteboard B, the electronic whiteboard B sequentially receives the synchronous message 1, the synchronous message 2 and the synchronous message 3, requests to download the handwriting data a and the data synchronous message 2 and the data synchronous message 3 sequentially through the data synchronous message 1, requests to download the handwriting data c and requests to download the handwriting data c due to network, the handwriting data B arrives at the electronic whiteboard B before the handwriting data a, and then the handwriting data B, the handwriting data a and the handwriting data c are represented on the electronic whiteboard B as follows: the turning point corresponding to the lower part of the handwriting data b is connected with the point corresponding to the upper left of the handwriting data a, and the point corresponding to the upper left of the handwriting data a is connected with the point corresponding to the upper right of the handwriting data c, so that the output time sequence and the input time sequence of the handwriting data are inconsistent. This is a problem of disorder in the short time period in which data is downloaded after data synchronization information is transmitted.
In order to solve the above problem, the protocol stipulates that the local serial number of the second electronic whiteboard and the first electronic whiteboard which communicate with each other have the same distribution rule, that is, the local serial number of the electronic whiteboard which communicates under the protocol is distributed based on the same distribution rule, and all the communicating parties obey the protocol. The method includes the steps that a local serial number is introduced, the first electronic whiteboard is added with an Nth local serial number representing the input time sequence of the Nth handwriting data when uploading data, the second electronic whiteboard is compared with the existing local serial number stored locally after receiving the Nth local serial number, and whether the local serial number corresponding to the disordered handwriting data exists in a short period or not can be clearly obtained according to the distribution rule of the local serial number specified by a protocol; if not, directly displaying the Nth handwriting data; and if so, waiting for receiving the disordered handwriting data, and after obtaining the disordered handwriting data, sequencing and displaying according to the sequence of the local serial number.
Because the distribution rule sequence of the local serial numbers is a set of serial numbers maintained locally by each electronic whiteboard, and the serial numbers are strictly increased or decreased according to the distribution rules and the sequence, if the distribution rules of the local serial numbers of the second electronic whiteboard and the first electronic whiteboard are consistent, whether the local serial numbers corresponding to the disordered handwriting data exist in a short term or not can be clearly known according to the received Nth local serial number and the locally stored existing local serial number.
For example: the distribution rule of the local serial number of the first electronic whiteboard is as follows: according to the sequence of obtaining handwriting data, generating a corresponding local serial number for the handwriting data every time when obtaining the handwriting data, wherein each local serial number is sequentially increased by a set step length according to the generated sequence, the step lengths are set at intervals between two adjacent local serial numbers, the set step length can be set as required, and the initial local serial number is 0. If the existing local serial number stored locally in the second electronic whiteboard is 3 and the Nth local serial number is 4, knowing the local serial number corresponding to the handwriting data without disorder according to the distribution rule of the local serial numbers, and directly displaying the Nth handwriting data; if the existing local serial number stored locally in the second electronic whiteboard is 2 and the nth local serial number is 4, the second electronic whiteboard can know that the mth handwriting data with the local serial number of 3 is not received, wait for receiving the mth handwriting data with the local serial number of 3, and display the nth handwriting data and the mth handwriting data in sequence after receiving the mth handwriting data.
It should be noted that, when there are multiple uploading terminals, the display of handwriting data is based on the local serial number instead of the server serial number, because, when there are multiple uploading terminals, because the server serial number is a set of serial numbers uniformly maintained by the server for more than one electronic whiteboard, for data uploaded by the same electronic whiteboard, the corresponding server serial number may be discontinuous. For example: aiming at handwriting data a (a local serial number is 1), handwriting data B (a local serial number is 2) and handwriting data c (a local serial number is 3) uploaded by an electronic whiteboard A, a server serial number corresponding to the handwriting data a is 1, a server serial number corresponding to the handwriting data B is 3, and a server serial number corresponding to the handwriting data c is 7, due to network reasons, the handwriting data c arrives at the electronic whiteboard B before the handwriting data B, the electronic whiteboard B receives the handwriting data a firstly, then the existing server serial number stored locally is 1, and then the handwriting data c is received, at this time, based on the server serial number 7 and the server serial number 1, and due to the irregularity of the server serial number, it is unclear which handwriting data corresponding to the server serial number are not downloaded.
As an optional embodiment, the nth synchronization information includes an nth server serial number, where the nth server serial number is a server serial number returned by the server after the first electronic whiteboard acquires the nth handwriting data and sends an nth request to the server, and step S302 includes:
extracting an Nth server serial number from the Nth synchronous information, wherein the Nth server serial number is a server serial number returned by the server after the Nth request is sent to the server after the Nth electronic whiteboard acquires the Nth handwriting data;
and downloading an Nth data packet to be synchronized from the server based on the Nth server serial number, wherein the Nth data packet to be synchronized also comprises the Nth server serial number.
In practical application, the nth server serial number is obtained based on the nth request after the nth handwriting data is obtained, and is in one-to-one correspondence with the nth handwriting data, so that the nth to-be-synchronized data packet corresponding to the nth server serial number can be successfully downloaded from the server based on the nth server serial number based on the correspondence.
In this embodiment, compared with a mode of downloading the nth to-be-synchronized data packet from the server based on the nth local serial number, the mode of extracting the nth server serial number from the nth synchronization information and downloading the nth to-be-synchronized data packet from the server based on the nth server serial number has the following advantages:
firstly, because the server serial number is the serial number maintained by the server, the serial number may include the serial number applied by the first electronic whiteboard and the serial numbers applied by other electronic whiteboards, and is a set of serial numbers uniformly distributed to multiple terminals, and the server serial numbers carried by the data packets to be synchronized uploaded by the multiple terminals cannot be the same, so that the second electronic whiteboard directly compares the server serial numbers with the existing server serial numbers in the existing server serial number table after acquiring the server serial numbers, and can quickly determine the data packets to be synchronized which need to be downloaded. If the local serial numbers from different electronic whiteboards are the same based on the local serial number, when the second electronic whiteboard determines which data packets to be synchronized need to be downloaded according to the local serial number after acquiring the local serial number, the source of the local serial number needs to be distinguished according to the identifier, and then the local serial number is compared with the existing local serial number in the existing local serial number table corresponding to the identifier to determine the data packets to be synchronized need to be downloaded under the identifier. This process requires the second electronic whiteboard to build a table of numbers for each identified local serial number, and the process of determining the data packets to be synchronized that need to be downloaded becomes more complicated.
Secondly, data packets to be synchronized corresponding to the server serial number are sequentially stored in a Redis database of the server according to a specific rule sequence when the server serial number is distributed, and when the data packets to be synchronized are downloaded from the server based on the server serial number, the server can quickly locate and acquire the data packets to be synchronized, so that the data downloading speed is higher. If the local sequence number is based on, the storage sequence of the data packets to be synchronized cannot be guaranteed because the local sequence number is not the sequence number maintained by the server, and the local sequence numbers from different electronic whiteboards may be the same, the downloading speed is greatly reduced when the data packets to be synchronized are downloaded from the server based on the local sequence number.
As an alternative embodiment, downloading the nth to-be-synchronized data packet from the server based on the nth server serial number includes:
generating data request information based on the Nth server serial number and the existing server serial number stored in the second electronic whiteboard, wherein the data request information is used for downloading the Nth data packet to be synchronized and the Mth data packet to be synchronized from the server;
wherein, the mth data packet to be synchronized is a data packet to be synchronized which has been stored by the server but has not been received by the second electronic whiteboard, the Mth data packet to be synchronized comprises an Mth server serial number, an Mth local serial number and Mth handwriting data, the Mth handwriting data is handwriting data of the first user for performing the Mth handwriting operation on the first electronic whiteboard, the Mth local serial number is a local serial number which is generated by the first electronic whiteboard after the Mth handwriting data is acquired and corresponds to the Mth handwriting data, the first electronic whiteboard acquires the Mth handwriting data earlier than the Nth handwriting data, the Mth server serial number is a server serial number returned by the server after the first electronic whiteboard sends an Mth request to the server after acquiring the Mth handwriting data; the Mth server serial number is a serial number between the Nth server serial number and an existing server serial number stored in the second electronic whiteboard;
sending the data request information to the server;
and receiving the Nth data packet to be synchronized and the Mth data packet to be synchronized which are sent by the server.
Specifically, the data request information includes an mth server serial number and an nth server serial number, and/or an nth server serial number and an existing server serial number stored in the second electronic whiteboard, wherein the existing server serial number is a server serial number corresponding to a to-be-synchronized data packet downloaded from the server by the second electronic whiteboard, the mth server serial number is a serial number located between the nth server serial number and the existing server serial number stored in the second electronic whiteboard,
and the existing server serial number is stored in an existing server serial number table of the second electronic whiteboard, and when the second electronic whiteboard receives the data packet to be synchronized, the corresponding server serial number needs to be added into the existing server serial number table updated by the second electronic whiteboard, so that the subsequent second electronic whiteboard compares the server serial number corresponding to other data packets to be synchronized with the existing server serial number stored in the existing server serial number table to determine whether the missing data packet to be synchronized exists, and if the missing data packet to be synchronized exists, the missing data packet to be synchronized needs to be downloaded from the server.
During the long-term research, the applicant finds the following problems in the prior art:
due to the unstable public network, the second electronic whiteboard may have a broken network, or the second electronic whiteboard is in an off-line state caused by other reasons, and the second electronic whiteboard cannot receive data synchronization information sent by the server, so that the second electronic whiteboard cannot update the handwriting data in time, and a large number of missing data packets to be synchronized will exist.
In order to solve the problem that the second electronic whiteboard has a large number of missing data packets to be synchronized due to instability of the public network, a fault tolerance mechanism is arranged in the method, and the method supports reading of historical data, namely, a data request message for downloading to-be-synchronized comprises not only an Nth server serial number carried by a currently received Nth synchronization message, but also an Mth server serial number and/or an existing server serial number stored in the second electronic whiteboard, and is used for downloading the Nth data packet to be synchronized and the Mth data packet to be synchronized except the Nth data packet to be synchronized. Even if the second electronic whiteboard is disconnected or off-line, when the network is recovered to be normal or on-line, as long as the latest Nth synchronization message is received, the second electronic whiteboard can determine that the Mth to-be-synchronized data packet belongs to the missing data packet to be synchronized according to the Nth server serial number carried by the Nth synchronization message and the existing server serial number stored in the second electronic whiteboard, and then download the Mth to-be-synchronized data packet except the Nth to-be-synchronized data packet from the server based on the data request information.
The present embodiment is described in detail below by way of examples, specifically as follows:
the electronic whiteboard A breaks the network after receiving a data packet to be synchronized with the server serial number 3, the server issues a synchronization message A (carrying the server serial number 4), a synchronization message B (carrying the server serial number 5) and a synchronization message C (carrying the server serial number 6) during the network breaking period, the electronic whiteboard A receives a synchronization message D (carrying the server serial number 7) issued by the server after the network is recovered, the electronic whiteboard A can determine the server serial numbers to be 4 and 5 only based on the server serial number 7 carried by the synchronization message D and the stored existing server serial number 3, 6, the data packets to be synchronized corresponding to the server serial numbers 4, 5, 6, and 7 are missed, and then the electronic whiteboard a downloads the data packets to be synchronized corresponding to the server serial numbers 4, 5, 6, and 7 from the server through the data request information (carrying the server serial numbers 4, 5, 6, and 7).
As an optional embodiment, the nth to-be-synchronized data packet further includes a first identifier of the first electronic whiteboard;
step S303, specifically including: extracting Nth handwriting data, Nth local sequence number and first identification from the Nth data packet to be synchronized;
step S304 specifically includes: and displaying the Nth handwriting data based on the Nth local serial number and the first identification.
During the long-term research, the applicant finds the following problems in the prior art:
in an interactive teaching scene, one or more than one client side for uploading data can be provided, and the same client side can support the function of writing by multiple persons on the same screen. If the data of different clients and different users of the same client are not distinguished, a connection between two data with different sources may exist in the future when the subsequent second electronic whiteboard displays the data with different sources, so that the data input by the client downloading the data is completely different from the data input by the client uploading the data when the client downloading the data displays the data, and the problem of disordered display occurs.
In order to solve the problem of display confusion, in this embodiment, for the second electronic whiteboard serving as the display end, especially when the second electronic whiteboard has a large number of missing data packets to be synchronized due to network disconnection and offline, when the second electronic whiteboard receives a plurality of data packets to be synchronized carrying identifiers and needs to display, the data packets to be synchronized from different sources are firstly distinguished based on the identifiers, and then the data packets to be synchronized having the same identifier are sorted and displayed based on the sequence of the local serial number, so as to avoid that the data packets from different sources are connected by the plurality of second electronic whiteboards, so that the client end downloading the data is completely different from the data input by the client end uploading the data when displaying the data, and the problem of display confusion occurs.
It should be noted that, in the case that there are multiple clients uploading data, the first identifier may be identification information with unique identification, such as a network port identifier, an equipment number identifier, and the like. For the case of multiple users of the same client, the first identifier for distinguishing different users may be: the identification information related to the continuous writing operation of the pen not mentioned, that is, regarding the continuous writing operation of each pen not mentioned as the operation of the same user, the first electronic whiteboard generates identification information uniquely corresponding to the first electronic whiteboard.
The present embodiment is described in detail below by way of examples, specifically as follows:
the electronic whiteboard C receives an nth data packet to be synchronized (local serial number 1, mark M, handwriting data a), an mth data packet to be synchronized (local serial number 3, mark N, handwriting data b), a third data packet to be synchronized (local serial number 2, mark M, handwriting data C), and a fourth data packet to be synchronized (local serial number 4, mark N, handwriting data d).
For the received data packets to be synchronized, the electronic whiteboard C firstly extracts identification, local serial numbers and handwriting data from each data packet to be synchronized;
then, based on the identifiers m and n, dividing the handwriting data a, b, c and d to be synchronously displayed into two groups, wherein one group is the handwriting data a and c from m, and the other group is the handwriting data b and d from n;
and sequencing and displaying each group of grouped handwriting data according to the local serial number. For the handwriting data a and c from m, the local serial number corresponding to the handwriting data a is 1, and the local serial number corresponding to the handwriting data c is 2, so that the display sequence of the handwriting data a and the handwriting data c should be the handwriting data a and the handwriting data c. For the handwriting data b and d from n, the local serial number corresponding to the handwriting data b is 3, and the local serial number corresponding to the handwriting data d is 4, so that the display sequence of the handwriting data b and the handwriting data d should be the handwriting data b and the handwriting data d. And for different groups of note data, the note data cannot be sorted, connected and displayed.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the method comprises the steps that a first electronic whiteboard serves as a data uploading end, before the Nth handwriting data are uploaded, an Nth server serial number representing the Nth handwriting data input time sequence is applied to a server, the Nth server serial number is added to the Nth handwriting data, and an Nth to-be-synchronized data packet is generated and uploaded to the server; the server sends Nth synchronization information to the second electronic whiteboard after receiving the Nth to-be-synchronized data packet so as to inform the second electronic whiteboard to acquire the Nth to-be-synchronized data packet; and after receiving the Nth synchronous information, the second electronic whiteboard downloads an Nth to-be-synchronized data packet from the server based on the Nth synchronous information, and synchronously displays the Nth handwriting data based on the Nth server serial number in the Nth to-be-synchronized data packet. According to the method and the device, aiming at the problem of data disorder caused by reasons such as unstable network and the like, the Nth handwriting data is synchronously displayed according to the Nth server serial number representing the input time sequence, so that the consistency of the output time sequence and the input time sequence of the Nth handwriting data can be ensured, and the problem of data disorder caused by reasons such as unstable network and the like is solved.
Example four
As shown in fig. 4, the present embodiment provides an interactive electronic whiteboard 100, including: touch display screen 110, communication device 120, memory 130, processor 140 and computer program 131 stored in memory 130 and executable on processor 140, wherein the following method steps can be implemented when processor 140 executes program 131:
when a first user carries out an Nth handwriting operation on the first electronic whiteboard, obtaining Nth handwriting data corresponding to the Nth handwriting operation; generating an Nth local serial number corresponding to the Nth handwriting data; generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local serial number; and sending the Nth data packet to be synchronized to a server so that the server informs a second electronic whiteboard to acquire the Nth data packet to be synchronized and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
In a specific implementation, when the processor 140 executes the program 131, any method steps in the first embodiment may also be implemented.
EXAMPLE five
As shown in fig. 5, the present embodiment provides a server 200 including: memory 210, communication device 220, processor 230 and computer program 211 stored on said memory 210 and operable on said processor 230, said processor 230 executing said program 211 to implement the following method steps:
receiving an Nth to-be-synchronized data packet sent by a first electronic whiteboard, wherein the Nth to-be-synchronized data packet comprises an Nth local serial number and Nth handwriting data, the Nth handwriting data is handwriting data for a first user to perform Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data generated after the first electronic whiteboard obtains the Nth handwriting data; generating Nth synchronization information based on the Nth data packet to be synchronized; and sending the Nth synchronization information to a second electronic whiteboard, so that the second electronic whiteboard downloads the Nth data packet to be synchronized from the server based on the Nth synchronization information, and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
In a specific implementation, when the processor 230 executes the program 211, any method step in the second embodiment may also be implemented.
EXAMPLE six
As shown in fig. 6, the present embodiment provides an interactive electronic whiteboard 300, including: touch display screen 310, communication device 320, memory 330, processor 340 and computer program 331 stored in memory 330 and executable on processor 340, wherein the following method steps can be implemented when processor 340 executes program 331:
receiving Nth synchronous information sent by a server; downloading the Nth to-be-synchronized data packet from the server based on the Nth synchronization information, wherein the Nth to-be-synchronized data packet comprises the Nth handwriting data and an Nth local serial number, the Nth handwriting data is handwriting data acquired by a first electronic whiteboard when a first user performs Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data and generated after the first electronic whiteboard acquires the Nth handwriting data; extracting the Nth handwriting data and the Nth local serial number from the Nth data packet to be synchronized; and displaying the Nth handwriting data based on the Nth local serial number, wherein N is a positive integer.
In a specific implementation process, when the processor 340 executes the program 331, any mode step in the third embodiment may also be implemented.
EXAMPLE seven
As shown in fig. 7, the present embodiment provides a computer-readable storage medium 400, on which a computer program 411 is stored, the computer program 411 realizing the following steps when executed by a processor:
when a first user carries out an Nth handwriting operation on the first electronic whiteboard, obtaining Nth handwriting data corresponding to the Nth handwriting operation; generating an Nth local serial number corresponding to the Nth handwriting data; generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local serial number; and sending the Nth data packet to be synchronized to a server so that the server informs a second electronic whiteboard to acquire the Nth data packet to be synchronized and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
In a specific implementation, the computer program 411 may implement any of the method steps of the first embodiment when executed by a processor.
Example eight
As shown in fig. 8, the present embodiment provides a computer-readable storage medium 500 having a computer program 511 stored thereon, the computer program 511 implementing the following steps when executed by a processor:
receiving an Nth to-be-synchronized data packet sent by a first electronic whiteboard, wherein the Nth to-be-synchronized data packet comprises an Nth local serial number and Nth handwriting data, the Nth handwriting data is handwriting data for a first user to perform Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data generated after the first electronic whiteboard obtains the Nth handwriting data; generating Nth synchronization information based on the Nth data packet to be synchronized; and sending the Nth synchronization information to a second electronic whiteboard, so that the second electronic whiteboard downloads the Nth data packet to be synchronized from the server based on the Nth synchronization information, and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
In a specific implementation, the computer program 511, when executed by a processor, may implement the method steps of the second embodiment.
Example nine
As shown in fig. 9, the present embodiment provides a computer-readable storage medium 600 having a computer program 611 stored thereon, the computer program 611 implementing the following steps when executed by a processor:
receiving Nth synchronous information sent by a server; downloading the Nth to-be-synchronized data packet from the server based on the Nth synchronization information, wherein the Nth to-be-synchronized data packet comprises the Nth handwriting data and an Nth local serial number, the Nth handwriting data is handwriting data acquired by a first electronic whiteboard when a first user performs Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data and generated after the first electronic whiteboard acquires the Nth handwriting data; extracting the Nth handwriting data and the Nth local serial number from the Nth data packet to be synchronized; and displaying the Nth handwriting data based on the Nth local serial number, wherein N is a positive integer.
In a specific implementation, when the computer program 611 is executed by a processor, any method step in the third embodiment may be implemented.
Example ten
As shown in fig. 10, the present embodiment provides an interactive office teaching system 700, including: the interactive electronic whiteboard 100 of embodiment four; the server 200 as described in embodiment five; an interactive electronic whiteboard 300 as described in the embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A data synchronization method is applied to a first electronic whiteboard, and comprises the following steps:
when a first user carries out an Nth handwriting operation on the first electronic whiteboard, obtaining Nth handwriting data corresponding to the Nth handwriting operation;
generating an Nth local serial number corresponding to the Nth handwriting data;
generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local serial number;
and sending the Nth data packet to be synchronized to a server so that the server informs a second electronic whiteboard to acquire the Nth data packet to be synchronized and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
2. The data synchronization method as claimed in claim 1, wherein before the generating an nth packet to be synchronized based on the nth handwriting data and the nth local sequence number, further comprising:
sending an Nth request to the server, wherein the Nth request is used for acquiring an Nth server serial number from the server;
receiving the Nth server serial number sent by the server;
generating an Nth data packet to be synchronized based on the Nth handwriting data and the Nth local sequence number, wherein the generating of the Nth data packet to be synchronized comprises the following steps:
and generating the Nth data packet to be synchronized based on the Nth server serial number, the Nth local serial number and the Nth handwriting data.
3. The data synchronization method according to claim 2, wherein after sending the nth data packet to be synchronized to the server, the method further comprises:
and sending an N +1 th request to the server to enable the server to return an N +1 th server serial number, wherein the N +1 th server serial number is used for generating an N +1 th to-be-synchronized data packet with the N +1 th handwriting data after acquiring the N +1 th handwriting data corresponding to the N +1 th handwriting operation of the first user on the first electronic whiteboard.
4. A data synchronization method is applied to a server, and the method comprises the following steps:
receiving an Nth to-be-synchronized data packet sent by a first electronic whiteboard, wherein the Nth to-be-synchronized data packet comprises an Nth local serial number and Nth handwriting data, the Nth handwriting data is handwriting data for a first user to perform Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number corresponding to the Nth handwriting data generated after the first electronic whiteboard obtains the Nth handwriting data;
generating Nth synchronization information based on the Nth data packet to be synchronized;
and sending the Nth synchronization information to a second electronic whiteboard, so that the second electronic whiteboard downloads the Nth data packet to be synchronized from the server based on the Nth synchronization information, and displays the Nth handwriting data according to the Nth local serial number, wherein N is a positive integer.
5. The data synchronization method according to claim 4, wherein before receiving the nth data packet to be synchronized sent by the first electronic whiteboard, the method further comprises:
receiving an Nth request sent by the first electronic whiteboard, wherein the Nth request is used for acquiring an Nth server serial number from the server;
and sending the Nth server serial number to the first electronic whiteboard based on the Nth request, so that the first electronic whiteboard generates the Nth to-be-synchronized data packet based on the Nth server serial number, the Nth local serial number and the Nth handwriting data.
6. The data synchronization method according to claim 5, wherein the generating the nth synchronization information based on the nth to-be-synchronized data packet comprises:
extracting the Nth server serial number from the Nth data packet to be synchronized;
and generating the Nth synchronous information based on the Nth server serial number.
7. The data synchronization method according to claim 6, wherein after said sending the nth synchronization information to the second electronic whiteboard, further comprising:
sending the nth to-be-synchronized data packet and the mth to-be-synchronized data packet to the second electronic whiteboard based on data request information sent by the second electronic whiteboard, wherein the data request information is information generated by the second electronic whiteboard based on the nth synchronization information after receiving the nth synchronization information sent by the server; the Mth to-be-synchronized data packet is a to-be-synchronized data packet which is stored in the server but not received by the second electronic whiteboard, the Mth to-be-synchronized data packet comprises an Mth server serial number, an Mth local serial number and Mth handwriting data, the Mth handwriting data is handwriting data of a first user for performing Mth handwriting operation on the first electronic whiteboard, the Mth local serial number is a local serial number which is generated after the first electronic whiteboard acquires the Mth handwriting data and corresponds to the Mth handwriting data, the time for the first electronic whiteboard to acquire the Mth handwriting data is earlier than the time for acquiring the Nth handwriting data, and the Mth server serial number is a server serial number which is returned by the server after the first electronic whiteboard acquires the Mth handwriting data and sends an Mth request to the server, m is a positive integer.
8. A data synchronization method is applied to a second electronic whiteboard, and comprises the following steps:
receiving Nth synchronous information sent by a server;
downloading an Nth to-be-synchronized data packet from the server based on the Nth synchronization information, wherein the Nth to-be-synchronized data packet comprises Nth handwriting data and an Nth local serial number, the Nth handwriting data is handwriting data acquired by a first electronic whiteboard when a first user performs Nth handwriting operation on the first electronic whiteboard, and the Nth local serial number is a local serial number which is generated by the first electronic whiteboard after acquiring the Nth handwriting data and corresponds to the Nth handwriting data;
extracting the Nth handwriting data and the Nth local serial number from the Nth data packet to be synchronized;
and displaying the Nth handwriting data based on the Nth local serial number, wherein N is a positive integer.
9. The data synchronization method according to claim 8, wherein the nth synchronization information includes an nth server serial number, and the nth server serial number is a server serial number returned by the server after the first electronic whiteboard sends an nth request to the server after acquiring the nth handwriting data; the downloading the nth to-be-synchronized data packet from the server based on the nth synchronization information includes:
extracting the Nth server serial number from the Nth synchronization information;
and downloading the Nth data packet to be synchronized from the server based on the Nth server serial number.
10. The data synchronization method of claim 9, wherein the downloading the nth data packet to be synchronized from the server based on the nth server sequence number comprises:
generating data request information based on the Nth server serial number and an existing server serial number stored in the second electronic whiteboard, wherein the data request information is used for downloading the Nth to-be-synchronized data packet and an Mth to-be-synchronized data packet from the server, the Mth to-be-synchronized data packet is a to-be-synchronized data packet which is stored in the server but not received by the second electronic whiteboard, the Mth to-be-synchronized data packet comprises an Mth server serial number, an Mth local serial number and Mth handwriting data, the Mth handwriting data is handwriting data of the first user for performing Mth handwriting operation on the first electronic whiteboard, the Mth local serial number is a local serial number which is generated after the first electronic whiteboard acquires the Mth handwriting data and corresponds to the Mth handwriting data, and the time for acquiring the Mth handwriting data by the first electronic whiteboard is earlier than the time for acquiring the Nth handwriting data, the Mth server serial number is a server serial number returned by the server after the first electronic whiteboard sends an Mth request to the server after acquiring the Mth handwriting data;
sending the data request information to the server;
and receiving the Nth data packet to be synchronized and the Mth data packet to be synchronized which are sent by the server, wherein M is a positive integer.
11. An interactive electronic whiteboard, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, may carry out the method steps according to any of claims 1-3 or the method steps according to any of claims 8-10.
12. A server, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, is adapted to carry out the method steps of any of claims 4 to 7.
13. A computer storage medium having a computer program stored thereon, the program being adapted to perform the method steps of any of claims 1 to 3, or the method steps of any of claims 4 to 7, or the method steps of any of claims 8 to 10 when executed by a processor.
14. An interactive office teaching system, comprising:
the interactive electronic whiteboard of claim 12;
the server of claim 13.
CN202010032288.6A 2020-01-13 2020-01-13 Data synchronization method, interactive electronic whiteboard and server Pending CN111262920A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010032288.6A CN111262920A (en) 2020-01-13 2020-01-13 Data synchronization method, interactive electronic whiteboard and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010032288.6A CN111262920A (en) 2020-01-13 2020-01-13 Data synchronization method, interactive electronic whiteboard and server

Publications (1)

Publication Number Publication Date
CN111262920A true CN111262920A (en) 2020-06-09

Family

ID=70955256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010032288.6A Pending CN111262920A (en) 2020-01-13 2020-01-13 Data synchronization method, interactive electronic whiteboard and server

Country Status (1)

Country Link
CN (1) CN111262920A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949187A (en) * 2020-08-03 2020-11-17 深圳创维数字技术有限公司 Electronic whiteboard content editing and sharing method, system, equipment and server
CN114035705A (en) * 2021-11-05 2022-02-11 北京云蝶智学科技有限公司 Smart screen data processing method based on Socket message
CN114629884A (en) * 2022-01-27 2022-06-14 通彩视听科技(上海)有限公司 Method for realizing remote multi-person handwriting writing, client and server
CN114863741A (en) * 2022-05-20 2022-08-05 安徽文香科技有限公司 Equipment communication method and system for on-line teaching

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413128A (en) * 2011-11-10 2012-04-11 青岛海信移动通信技术股份有限公司 Method for sharing electronic whiteboard and network conference system
US20150036928A1 (en) * 2013-08-02 2015-02-05 Cellco Partnership D/B/A Verizon Wireless Methods and systems for initiating actions across communication networks using hand-written commands
CN105978870A (en) * 2016-05-06 2016-09-28 北京大生在线科技有限公司 Handwriting real time sharing method and device in teaching system
WO2017084174A1 (en) * 2015-11-19 2017-05-26 深圳市鹰硕技术有限公司 Image synchronous display method and device
CN108132754A (en) * 2017-12-28 2018-06-08 广州视源电子科技股份有限公司 Person's handwriting playback display methods, device, mobile terminal and storage medium
CN109032390A (en) * 2018-08-01 2018-12-18 广州视源电子科技股份有限公司 Handwriting data caching method, device, equipment and storage medium
CN109194642A (en) * 2018-08-28 2019-01-11 深圳市创维群欣安防科技股份有限公司 Blank remote synchronization processing method, system and storage medium
CN109639564A (en) * 2018-12-12 2019-04-16 金瓜子科技发展(北京)有限公司 A kind of method, apparatus and computer readable storage medium obtaining offline message
CN109714352A (en) * 2018-12-29 2019-05-03 北京金山安全软件有限公司 Network data transmission method and device and electronic equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413128A (en) * 2011-11-10 2012-04-11 青岛海信移动通信技术股份有限公司 Method for sharing electronic whiteboard and network conference system
US20150036928A1 (en) * 2013-08-02 2015-02-05 Cellco Partnership D/B/A Verizon Wireless Methods and systems for initiating actions across communication networks using hand-written commands
WO2017084174A1 (en) * 2015-11-19 2017-05-26 深圳市鹰硕技术有限公司 Image synchronous display method and device
CN105978870A (en) * 2016-05-06 2016-09-28 北京大生在线科技有限公司 Handwriting real time sharing method and device in teaching system
CN108132754A (en) * 2017-12-28 2018-06-08 广州视源电子科技股份有限公司 Person's handwriting playback display methods, device, mobile terminal and storage medium
CN109032390A (en) * 2018-08-01 2018-12-18 广州视源电子科技股份有限公司 Handwriting data caching method, device, equipment and storage medium
CN109194642A (en) * 2018-08-28 2019-01-11 深圳市创维群欣安防科技股份有限公司 Blank remote synchronization processing method, system and storage medium
CN109639564A (en) * 2018-12-12 2019-04-16 金瓜子科技发展(北京)有限公司 A kind of method, apparatus and computer readable storage medium obtaining offline message
CN109714352A (en) * 2018-12-29 2019-05-03 北京金山安全软件有限公司 Network data transmission method and device and electronic equipment

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
J. HOWLETT等: "Application Bridging for Federated Access Beyond Web (ABFAB) Architecture", 《IETF RFC7831》 *
S. NANDAKUMAR等: "SDP for the WebRTC draft-ietf-rtcweb-sdp-01", 《IETF 》 *
沈剑: "消息"时序"与"一致性"为何这么难?", 《架构师之路》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111949187A (en) * 2020-08-03 2020-11-17 深圳创维数字技术有限公司 Electronic whiteboard content editing and sharing method, system, equipment and server
CN114035705A (en) * 2021-11-05 2022-02-11 北京云蝶智学科技有限公司 Smart screen data processing method based on Socket message
CN114035705B (en) * 2021-11-05 2024-02-13 北京碧云数创科技有限公司 Intelligent screen data processing method based on Socket message
CN114629884A (en) * 2022-01-27 2022-06-14 通彩视听科技(上海)有限公司 Method for realizing remote multi-person handwriting writing, client and server
CN114863741A (en) * 2022-05-20 2022-08-05 安徽文香科技有限公司 Equipment communication method and system for on-line teaching

Similar Documents

Publication Publication Date Title
CN111262920A (en) Data synchronization method, interactive electronic whiteboard and server
CA2548738C (en) Systems and methods for synchronizing data between communication devices in a networked environment
EP3447631B1 (en) Writing trajectory synchronization method and system for multiple clients
CN105281921B (en) Method and device for realizing multicast of virtual desktop
US10083281B2 (en) Terminal device and information processing system for implementing screen sharing process based on user role
US10509617B2 (en) Terminal device, program, method for sharing content and information processing system
CN103069755A (en) Instant messaging using multiple instances of a client
NO337341B1 (en) Procedure for displaying participant information in a video conferencing system
CN110072133B (en) On-screen display method and system
CN102035859A (en) Method, system and device for displaying upload progress
CN103763380B (en) A kind of method and system of synchronous demonstrating data
CN105553978A (en) Belt conveyor visualization auxiliary maintenance system and interaction process of streaming media
CN113055712A (en) Multi-screen splicing display method and system
CN112714186A (en) Distribution method of push streaming server, push method and device of media stream, storage medium and electronic equipment
CN111131757A (en) Video conference display method, device and storage medium
CN112769919B (en) Distribution method and device of push tasks, storage medium and electronic equipment
US8140618B2 (en) Methods and systems for bandwidth adaptive N-to-N communication in a distributed system
CN110609970A (en) User identity identification method and device, storage medium and electronic equipment
CN104753997B (en) A kind of method and system of multiple terminals real-time, interactive
CN107291409B (en) Online desktop sharing method and system
CN114025204B (en) Live video switching method, device, equipment and storage medium
CN115580599A (en) Information synchronization method, device and system in distributed remote classroom system
CN110033660B (en) Interactive teaching system
JP7173101B2 (en) TERMINAL DEVICE, PROGRAM, CONTENT SHARING METHOD AND INFORMATION PROCESSING SYSTEM
CN114090687A (en) Data synchronization method and device

Legal Events

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

Application publication date: 20200609

RJ01 Rejection of invention patent application after publication