CN110855626B - Electronic whiteboard packet loss processing method, system, medium and electronic equipment - Google Patents

Electronic whiteboard packet loss processing method, system, medium and electronic equipment Download PDF

Info

Publication number
CN110855626B
CN110855626B CN201910993311.5A CN201910993311A CN110855626B CN 110855626 B CN110855626 B CN 110855626B CN 201910993311 A CN201910993311 A CN 201910993311A CN 110855626 B CN110855626 B CN 110855626B
Authority
CN
China
Prior art keywords
data packet
packet
data
missing
locally
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.)
Active
Application number
CN201910993311.5A
Other languages
Chinese (zh)
Other versions
CN110855626A (en
Inventor
王红生
杨磊
张雪峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201910993311.5A priority Critical patent/CN110855626B/en
Publication of CN110855626A publication Critical patent/CN110855626A/en
Application granted granted Critical
Publication of CN110855626B publication Critical patent/CN110855626B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/131Protocols for games, networked simulations or virtual reality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1454Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay
    • G06F3/1462Digital output to display device ; Cooperation and interconnection of the display device with other functional units involving copying of the display data of a local workstation or window to a remote workstation or window so that an actual copy of the data is displayed simultaneously on two or more displays, e.g. teledisplay with means for detecting differences between the image stored in the host and the images displayed on the remote displays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • General Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Electrically Operated Instructional Devices (AREA)

Abstract

The invention provides a state machine-based electronic whiteboard packet loss processing method, system, medium and electronic equipment. The method comprises the following steps: receiving a data packet sent by the server in real time, and locally recording data packet information, wherein the data packet information comprises whiteboard drawing data and the data packet ID, and the data packet ID is generated according to a monotone increasing sequence; comparing all the data packet IDs recorded locally with heartbeat packets sent by the server side, and judging whether the data packets are missing or not, wherein the heartbeat packets carry the current maximum data packet IDs; and if the data packet is missing locally, triggering packet loss processing logic. The method can reduce the cost of data transmission and further reduce the complexity of whiteboard data missing judgment.

Description

Electronic whiteboard packet loss processing method, system, medium and electronic equipment
Technical Field
The invention relates to the technical field of electronic whiteboards, in particular to a method, a system, a medium and electronic equipment for processing packet loss of an electronic whiteboard based on a state machine.
Background
With the development of science and technology, electronic whiteboards are increasingly widely applied to various fields, such as remote teaching, remote meetings and the like. In recent years, online education is a very explosive industry at present, a whiteboard is a very important information synchronization tool, the whiteboard is a common tool for repeated erasing and writing, the whiteboard is divided into a teacher end and a student end, a teacher end specially developed is used for operating to draw the whiteboard, and the student end can restore the track of the whiteboard very immediately.
However, in the process of writing on a teacher's board, no effective solution has been proposed so far for the problem that the student end suddenly has a network anomaly or that it is difficult for the student to quickly restore the whiteboard data of the student end to be consistent with the current whiteboard data of the teacher end when the student enters the classroom in the middle of class.
Therefore, in the long-term research and development, the inventor has conducted a great deal of research on recovery of whiteboard data at a student end, and proposes a method for processing packet loss of an electronic whiteboard based on a state machine, so as to solve one of the above technical problems.
Disclosure of Invention
The present invention is directed to a method, a system, a medium, and an electronic device for processing packet loss of an electronic whiteboard based on a state machine, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific implementation manner of the present invention, in a first aspect, the present invention provides a method for processing packet loss of an electronic whiteboard based on a state machine, including: receiving a data packet sent by the server in real time, and locally recording data packet information, wherein the data packet information comprises whiteboard drawing data and the data packet ID, and the data packet ID is generated according to a monotone increasing sequence; comparing all the data packet IDs recorded locally with heartbeat packets sent by the server side, and judging whether the data packets are missing or not, wherein the heartbeat packets carry the current maximum data packet IDs; and if the data packet is missing locally, triggering packet loss processing logic.
According to a second aspect of the present invention, there is provided a state machine-based electronic whiteboard packet loss processing system, including: the receiving module is used for receiving a data packet sent by the server in real time and locally recording the data packet information, wherein the data packet information comprises whiteboard drawing data and the data packet ID, and the data packet ID is generated according to a monotone increasing sequence; the judging module is used for comparing all the data packet IDs recorded locally with heartbeat packets sent by the server side and judging whether the data packets are missing or not, wherein the heartbeat packets carry the current maximum data packet ID; and the processing module is used for triggering packet loss processing logic if the data packet is locally missing.
According to a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the program, when executed by a processor, implements the method for processing packet loss of an electronic whiteboard based on a state machine as described in any one of the above.
According to a fourth aspect of the present invention, there is provided an electronic apparatus including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the method for processing packet loss in an electronic whiteboard based on a state machine as described in any one of the above.
Compared with the prior art, the scheme of the embodiment of the invention utilizes the state machine to synchronize the whiteboard information of the teacher end at the student end, and the state machine only needs to carry the maximum data packet ID of the current whiteboard; after receiving the state machine information, the student end only needs to compare all the data packet IDs recorded locally with the current maximum data packet ID information to judge whether data packet loss exists or not and which data packets are lost, so that the complexity of judging the whiteboard data loss can be reduced; all current data of the whiteboard do not need to be transmitted, so that the cost of data transmission can be further reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a flowchart of a method for processing packet loss of an electronic whiteboard based on a state machine according to an embodiment of the present invention;
FIG. 2 is a flow diagram illustrating a method for triggering a padding logic when the number of locally missing packets is less than a threshold, according to an embodiment of the invention;
FIG. 3 is a flow diagram illustrating a method of triggering whiteboard logic when the number of locally missing packets is greater than the threshold, in accordance with an embodiment of the present invention;
fig. 4 is a schematic structural diagram illustrating a state machine-based electronic whiteboard packet loss processing system according to an embodiment of the present invention;
fig. 5 shows a schematic diagram of an electronic device connection structure according to an embodiment of the invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present invention, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and similarly the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in the article or device in which the element is included.
Alternative embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example 1
The embodiment provides a method for processing packet loss of an electronic whiteboard based on a state machine, which is applied to a terminal device, where the terminal device may be: a PC (Personal Computer), a smart phone, a tablet Computer, or the like, and the specific type of the terminal device is not specifically limited in this embodiment. Further, the method may be applied to online education-like clients, such as 51 talk. Specifically, as shown in fig. 1, the method is applied to a client, and comprises the following steps:
s11, receiving a data packet sent by the server in real time, and locally recording the data packet information, wherein the data packet information comprises whiteboard drawing data and the data packet ID, and the data packet ID is generated according to a monotone increasing sequence;
the client comprises a teacher end and a student end, the teacher end can directly communicate with the server end through an Http request after logging in, and the student end establishes a long connection with the server end to communicate after logging in, so that synchronous display of whiteboard data is realized. In the specific implementation process, after a teacher logs in a teacher end, the teacher selects a classroom and starts an electronic whiteboard, and a visual operation interface appears, wherein the interface comprises an electronic whiteboard area, an operability toolbar and other areas. The teacher end can draw in the electronic whiteboard region through the terminal equipment, such as illustration and equation writing.
In the process of drawing the whiteboard by the teacher, the teacher continuously collects whiteboard drawing data of the teacher, packages the whiteboard drawing data into a data packet in real time, and uniquely identifies the data packet, namely generates a data packet ID. Here, sequence identification is performed for each packet based on the packet generation time sequence and a monotonically increasing sequence. Wherein the monotonically increasing sequence is that each object in the sequence is greater than or equal to the previous object; if each object is strictly larger than the previous object, the sequence is strictly (monotonically) increasing, for example, the ID of the first generated packet is 1, the ID of the second generated packet is 2, the ID of the third generated packet is 3, and so on, which are strictly increasing in sequence. Preferably, the packet ID is strictly monotonically increasing starting from 1.
After a data packet is generated, a teacher side uploads the data packet to a server side, and the server side records the maximum data packet ID of the current electronic whiteboard every time the server side receives one data packet. It can be understood that, each time the server receives a packet, the server updates the recorded maximum packet ID to the current latest packet ID. For example, if the received packet ID of the server is 4 and the maximum packet ID recorded by the server is 3, the packet ID recorded by the server is updated to the value of 4.
The maximum packet ID is the ID of the currently newly generated packet, and since the packet IDs are serialized from the minimum value according to a monotonically increasing sequence, the currently newly generated packet ID is always the largest as compared to the previously generated packet IDs. Of course, the packet ID is not limited to be monotonically increased from the value 1, and may be arbitrarily defined according to actual needs.
The method comprises the steps that a student end needs to acquire white board data in real time and synchronizes with a teacher end, so that the server end directly sends the white board drawing data to the student end after receiving the white board drawing data of the teacher end; each packet ID is also pushed to the student side. The student end can record locally every time the student end receives a data packet, so that the follow-up packet loss judgment is facilitated; and meanwhile, the whiteboard drawing data in the data packet is called out for drawing, so that the student end can synchronously master the blackboard writing by the teacher.
S12, comparing all the data packet IDs recorded locally with heartbeat packets sent by the server side, and judging whether the data packets are missing or not, wherein the heartbeat packets carry the current maximum data packet ID;
in a specific implementation process, the server side can actively send a heartbeat packet to the student side every other fixed time so as to tell the student side that the electronic whiteboard is in the current state at the teacher side. Wherein, the fixed time is defined according to actual needs, and is not specifically limited herein. And when the student end receives a heartbeat packet, the heartbeat packet is compared with the data packet recorded locally to judge whether the data packet is missing or not.
Specifically, the comparing all the data packet IDs recorded locally with the heartbeat packet sent by the server to determine whether a data packet is missing includes:
sequencing each data packet ID of the local record; and finding the missing data packet ID in the numerical range from the first data packet ID to the current maximum data packet ID.
Wherein the first packet ID refers to an initial ID value when monotonically increasing. For example, the monotonic increase starts from 1, if the packet IDs 2, 4, and 5 are recorded locally, and the current maximum packet ID recorded by the server is 7, then it can be determined that three pieces of packet information with IDs 1, 3, and 6 are lost locally within the range of 1 to 7.
The method comprises the steps that the principle of a state machine is utilized, the current latest whiteboard state (data packet ID representation) of a teacher end is synchronized to each student end through a heartbeat packet, and the student end judges whether whiteboard data loss occurs locally or no current whiteboard data exists locally by comparing the whiteboard state in the state machine with a locally stored whiteboard.
And S13, if the data packet is missing locally, triggering packet loss processing logic.
As an optional embodiment, the triggering packet loss processing logic if a data packet is locally missing includes:
if the number of the locally missing data packets is less than a threshold value, triggering a packet supplementing logic; alternatively, the first and second electrodes may be,
and if the number of the locally missing data packets is larger than the threshold value, triggering a white filling board logic. Wherein the threshold is artificially defined according to actual requirements. It is understood that, in this step, it is mainly determined whether to perform padding (pulling partial whiteboard data) or padding (pulling all data of the current whiteboard) according to the amount of missing whiteboard data determined in step S12.
In a specific implementation process, referring to fig. 2, if the number of the locally missing data packets is smaller than a threshold, the triggering packet-complementing logic includes:
s131, sending a packet supplementing request to the server, wherein the packet supplementing request carries a data packet ID array of a missing data packet; wherein, the package supplementing request is an Http request.
S132, receiving the missing data packet information returned by the server and locally recording the missing data packet information; specifically, the student end records the data packet information returned by the packet supplementing at the local so as to judge the packet loss next time.
And S133, calling whiteboard drawing data in the data packet information, and drawing on the electronic whiteboard.
As another alternative, referring to fig. 3, if the number of locally missing packets is greater than the threshold, the trigger padding board logic includes:
s134, sending a white board supplementing request to the server, wherein the white board supplementing request carries the current electronic whiteboard ID; and the whiteboard supplementing request is an Http request. Specifically, each time the teacher end switches the electronic whiteboard, the teacher end automatically identifies each electronic whiteboard, that is, generates an electronic whiteboard ID. That is, each electronic whiteboard will have a unique corresponding ID.
And S135, receiving all current data packet information of the electronic whiteboard returned by the server and locally recording the current data packet information. Specifically, the server finds the specified whiteboard data according to the electronic whiteboard ID, acquires all data packet information under the electronic whiteboard, and sends the data packet information to the student side.
And S136, calling whiteboard drawing data in all the data packet information and drawing on the electronic whiteboard. In this step, the student end redraws all drawing data of the electronic whiteboard ID.
Finally, the electronic whiteboard packet loss processing method based on the state machine provided by the embodiment of the invention utilizes the state machine mode to synchronize the whiteboard state of the teacher end at the student end, and the state machine only needs to carry the maximum data packet ID of the current whiteboard; after receiving the state machine information, the student end only needs to compare all the data packet IDs recorded locally with the current maximum data packet ID information to judge whether data packet loss exists or not and which data packets are lost, so that the complexity of judging the whiteboard data loss can be reduced; all current data of the whiteboard do not need to be transmitted, so that the cost of data transmission can be further reduced.
Example 2
Referring to fig. 4, an embodiment of the present invention provides a system 400 for processing packet loss of an electronic whiteboard based on a state machine, where the system 400 may be applied to a terminal device, where the terminal device may be: a PC (Personal Computer), a smart phone, a tablet Computer, or the like, and the specific type of the terminal device is not specifically limited in this embodiment. Further, the method may be applied to online education-like clients, such as 51 talk. Specifically, the system 400 includes: a receiving module 410, a determining module 420 and a processing module 430.
The receiving module 410 is configured to receive a data packet sent by the server in real time, and locally record the data packet information, where the data packet information includes whiteboard drawing data and the data packet ID, and the data packet ID is generated according to a monotonically increasing sequence;
the client side comprises a teacher side and a student side, the teacher can directly communicate with the server side through an Http request after logging in the teacher side, and the student can establish a long connection with the server side to communicate after logging in the student side, so that synchronous display of whiteboard data is achieved. In the specific implementation process, after a teacher logs in a teacher end, the teacher selects a classroom and starts an electronic whiteboard, and a visual operation interface appears, wherein the interface comprises an electronic whiteboard area, an operability toolbar and other areas. The teacher end can draw in the electronic whiteboard region through the terminal equipment, such as illustration and equation writing.
In the process of drawing the whiteboard by the teacher, the teacher continuously collects whiteboard drawing data of the teacher, packages the whiteboard drawing data into a data packet in real time, and uniquely identifies the data packet, namely generates a data packet ID. Here, the teacher end performs sequence identification on each data packet according to the data packet generation time sequence and the monotonically increasing sequence. Wherein the monotonically increasing sequence is that each object in the sequence is greater than or equal to the previous object; if each object is strictly larger than the previous object, the sequence is strictly (monotonically) increasing, for example, the ID of the first generated packet is 1, the ID of the second generated packet is 2, the ID of the third generated packet is 3, and so on, which are strictly increasing in sequence. Preferably, the packet ID is strictly monotonically increasing starting from 1.
And after the data packet is generated, the teacher side uploads the data packet to the server side. And the server records the maximum data packet ID of the current electronic whiteboard when receiving one data packet. It can be understood that, each time the server receives a packet, the server updates the recorded maximum packet ID to the current latest packet ID. For example, if the received packet ID of the server is 4 and the maximum packet ID recorded by the server is 3, the packet ID recorded by the server is updated to the value of 4.
The maximum packet ID is the ID of the currently newly generated packet, and since the packet IDs are serialized from the minimum value according to a monotonically increasing sequence, the currently newly generated packet ID is always the largest as compared to the previously generated packet IDs. Of course, the packet ID is not limited to be monotonically increased from the value 1, and may be arbitrarily defined according to actual needs.
The method comprises the steps that a student end needs to acquire white board data in real time and synchronizes with a teacher end, so that the server end directly sends the white board drawing data to the student end after receiving the white board drawing data of the teacher end; each packet ID is also sent to the student. The receiving module 410 locally records each data packet received, so as to facilitate subsequent packet loss judgment; and meanwhile, the whiteboard drawing data in the data packet is called out for drawing, so that the student end can synchronously master the blackboard writing by the teacher.
The determining module 420 is configured to compare all the locally recorded IDs of the data packets with a heartbeat packet sent by the server, and determine whether a data packet is missing, where the heartbeat packet carries a current maximum data packet ID;
in a specific implementation process, the server side can actively send a heartbeat packet to the student side at regular intervals so as to inform the student side of the current electronic whiteboard state. Wherein, the fixed time is defined according to actual needs, and is not specifically limited herein. When the student receives a heartbeat packet, the judging module 420 compares the heartbeat packet with a locally recorded data packet to judge whether the data packet is missing.
Specifically, the determining module 420 is configured to:
sequencing each data packet ID of the local record; and finding the missing data packet ID in the numerical range from the first data packet ID to the current maximum data packet ID.
Wherein the first packet ID refers to an initial ID value when monotonically increasing. For example, if the monotonic increment is from 1, the local recorded packet IDs are 2, 4, and 5, and the server recorded the current maximum packet ID is 7, the determining module 420 may determine that three packet information with IDs 1, 3, and 6 are lost locally within a range from 1 to 7.
The judging module 420 synchronizes the current latest whiteboard state (data packet ID representation) of the teacher end to each student end through the heartbeat packet by using the principle of the state machine, and the student end judges whether the whiteboard data is lost locally or no current whiteboard data exists by comparing the whiteboard state in the state machine with locally stored whiteboard data.
The processing module 430 is configured to trigger a packet loss processing logic if a data packet is locally missing.
As an optional embodiment, the processing module 430 is specifically configured to:
if the number of the locally missing data packets is less than a threshold value, triggering a packet supplementing logic; or if the number of the locally missing data packets is larger than the threshold value, triggering the white filling board logic.
Wherein the threshold is artificially defined according to actual requirements. It can be understood that the processing module 430 mainly determines to perform padding, that is, to pull part of the whiteboard data, according to the amount of the missing whiteboard data determined by the determining module 420; or the whiteboard is compensated, namely all data of the current whiteboard are pulled.
In a specific implementation process, the processing module 430 is specifically configured to:
sending a packet supplementing request to the server, wherein the packet supplementing request carries a data packet ID array of a missing data packet; receiving the missing data packet information returned by the server and locally recording the missing data packet information; and calling whiteboard drawing data in the data packet information, and drawing on the electronic whiteboard. Wherein, the package supplementing request is an Http request. And the student end records the data packet information returned by the packet supplementing at the local so as to judge the packet loss at the next time.
As another optional embodiment, the processing module 430 is specifically configured to:
sending a white board supplementing request to the server, wherein the white board supplementing request carries the current electronic whiteboard ID; receiving all current data packet information of the electronic whiteboard returned by the server and locally recording the current data packet information; and calling whiteboard drawing data in all the data packet information and drawing on the electronic whiteboard.
And the whiteboard supplementing request is an Http request. Specifically, each time the electronic whiteboard is switched, the teacher end automatically identifies each electronic whiteboard, that is, generates an electronic whiteboard ID. That is, each electronic whiteboard will have a unique corresponding ID. Specifically, the server finds the specified whiteboard data according to the electronic whiteboard ID, acquires all data packet information under the electronic whiteboard, and sends the data packet information to the student side. The processing module 430 redraws all data included in the electronic whiteboard ID.
Finally, the state machine-based electronic whiteboard packet loss processing system 400 provided by the embodiment of the present invention synchronizes the whiteboard state of the teacher side at the student side by using the state machine mode, and the state machine only needs to carry the maximum data packet ID of the current whiteboard; after receiving the state machine information, the student end only needs to compare all the data packet IDs recorded locally with the current maximum data packet ID information to judge whether data packet loss exists or not and which data packets are lost, so that the complexity of judging the whiteboard data loss can be reduced; all current data of the whiteboard do not need to be transmitted, so that the cost of data transmission can be further reduced.
Example 3
The embodiment of the present disclosure provides a non-volatile computer storage medium, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions may execute the method for processing packet loss of an electronic whiteboard based on a state machine in any method embodiment.
Example 4
The embodiment provides an electronic device, which is used for a state machine-based electronic whiteboard packet loss processing method, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the one processor to cause the at least one processor to:
receiving a data packet sent by a server in real time, and locally recording data packet information, wherein the data packet information comprises whiteboard drawing data and a data packet ID, and the data packet ID is generated according to a monotone increasing sequence;
comparing all the data packet IDs recorded locally with heartbeat packets sent by the server side, and judging whether the data packets are missing or not, wherein the heartbeat packets carry the current maximum data packet IDs;
and if the data packet is missing locally, triggering packet loss processing logic.
Example 5
Referring now to FIG. 5, shown is a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage devices 508 including, for example, magnetic tape, hard disk, etc.; and a communication device 509. The communication means 509 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 501.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.

Claims (10)

1. A method for processing packet loss of an electronic whiteboard based on a state machine is characterized by comprising the following steps:
receiving a data packet sent by a server in real time, and locally recording data packet information, wherein the data packet information comprises whiteboard drawing data and a data packet ID, and the data packet ID is generated according to a monotone increasing sequence;
comparing all the data packet IDs recorded locally with heartbeat packets sent by the server side, and judging whether the data packets are missing or not, wherein the heartbeat packets carry the current maximum data packet IDs; the server side receives a data packet every time and records the maximum data packet ID of the current electronic whiteboard;
and if the data packet is missing locally, triggering packet loss processing logic.
2. The method according to claim 1, wherein the comparing all the locally recorded packet IDs with the heartbeat packet sent by the server to determine whether a packet is missing comprises:
sequencing each data packet ID of the local record;
and finding the missing data packet ID in the numerical range from the first data packet ID to the current maximum data packet ID.
3. The method of claim 1, wherein if the data packet is locally missing, triggering a packet loss processing logic comprises:
and if the number of the locally missing data packets is less than a threshold value, triggering a packet supplementing logic.
4. The method of claim 3, wherein if the number of locally missing packets is less than a threshold, triggering padding logic, comprises:
if the number of the local missing data packets is smaller than a threshold value, sending a packet supplementing request to the server, wherein the packet supplementing request carries a data packet ID array of the missing data packets;
receiving the missing data packet information returned by the server and locally recording the missing data packet information;
and calling whiteboard drawing data in the data packet information, and drawing on the electronic whiteboard.
5. The method of claim 3, further comprising:
and if the number of the locally missing data packets is larger than the threshold value, triggering a white filling board logic.
6. The method of claim 5, wherein if the number of locally missing packets is greater than the threshold, triggering a padding board logic, comprises:
if the number of the local missing data packets is larger than the threshold value, sending a white board supplementing request to the server side, wherein the white board supplementing request carries the current electronic whiteboard ID;
receiving all current data packet information of the electronic whiteboard returned by the server and locally recording the current data packet information;
and calling whiteboard drawing data in all the data packet information and drawing on the electronic whiteboard.
7. An electronic whiteboard packet loss processing system based on a state machine is characterized by comprising:
the receiving module is used for receiving a data packet sent by a server in real time and locally recording the data packet information, wherein the data packet information comprises whiteboard drawing data and the data packet ID, and the data packet ID is generated according to a monotone increasing sequence;
the judging module is used for comparing all the data packet IDs recorded locally with heartbeat packets sent by the server side and judging whether the data packets are missing or not, wherein the heartbeat packets carry the current maximum data packet ID; the server side receives a data packet every time and records the maximum data packet ID of the current electronic whiteboard;
and the processing module is used for triggering packet loss processing logic if the data packet is locally missing.
8. The system of claim 7, wherein the processing module is configured to:
if the number of the locally missing data packets is less than a threshold value, triggering a packet supplementing logic; or the like, or, alternatively,
and if the number of the locally missing data packets is larger than the threshold value, triggering a white filling board logic.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 6.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 6.
CN201910993311.5A 2019-10-18 2019-10-18 Electronic whiteboard packet loss processing method, system, medium and electronic equipment Active CN110855626B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910993311.5A CN110855626B (en) 2019-10-18 2019-10-18 Electronic whiteboard packet loss processing method, system, medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910993311.5A CN110855626B (en) 2019-10-18 2019-10-18 Electronic whiteboard packet loss processing method, system, medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN110855626A CN110855626A (en) 2020-02-28
CN110855626B true CN110855626B (en) 2022-03-11

Family

ID=69596848

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910993311.5A Active CN110855626B (en) 2019-10-18 2019-10-18 Electronic whiteboard packet loss processing method, system, medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110855626B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422238B (en) * 2020-11-15 2022-08-05 珠海一微半导体股份有限公司 Method for improving safety of parallel sending data and heterogeneous system
CN112422242B (en) * 2020-11-15 2022-03-04 珠海一微半导体股份有限公司 Method for improving security of transmitted data and heterogeneous system
CN114393995B (en) * 2022-02-24 2023-11-14 中国第一汽车股份有限公司 Motor controller, fault processing method thereof and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398728A (en) * 2008-07-21 2009-04-01 贾颖 Electronic white board system and method based on host process
KR20100111844A (en) * 2009-04-08 2010-10-18 삼성전자주식회사 Apparatus and method for providing white board service in mobile communication system
JP2016177612A (en) * 2015-03-20 2016-10-06 株式会社リコー Information processing system, display position determination method, terminal device, information processing device and program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546081B (en) * 2010-12-21 2015-09-16 中兴通讯股份有限公司 Method for detecting packet loss, system and media client
CN104468061B (en) * 2014-11-25 2019-08-20 厦门雅迅网络股份有限公司 A kind of method and system of real-time reliable data transmission under low-speed network environment
CN105405325B (en) * 2015-12-22 2017-04-26 深圳市鹰硕技术有限公司 Network teaching method and system
US10015103B2 (en) * 2016-05-12 2018-07-03 Getgo, Inc. Interactivity driven error correction for audio communication in lossy packet-switched networks
CN106411894A (en) * 2016-09-29 2017-02-15 天脉聚源(北京)传媒科技有限公司 Video transmission method and system
CN109168064B (en) * 2018-09-17 2020-09-18 视联动力信息技术股份有限公司 Synchronous display method and system of electronic data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101398728A (en) * 2008-07-21 2009-04-01 贾颖 Electronic white board system and method based on host process
KR20100111844A (en) * 2009-04-08 2010-10-18 삼성전자주식회사 Apparatus and method for providing white board service in mobile communication system
JP2016177612A (en) * 2015-03-20 2016-10-06 株式会社リコー Information processing system, display position determination method, terminal device, information processing device and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
电子白板互操作的研究和设计;肖波等;《上海交通大学学报》;19980830(第08期);全文 *

Also Published As

Publication number Publication date
CN110855626A (en) 2020-02-28

Similar Documents

Publication Publication Date Title
CN110046021B (en) Page display method, device, system, equipment and storage medium
CN112261459B (en) Video processing method and device, electronic equipment and storage medium
CN110855626B (en) Electronic whiteboard packet loss processing method, system, medium and electronic equipment
US11711441B2 (en) Method and apparatus for publishing video synchronously, electronic device, and readable storage medium
CN110866193B (en) Feedback method, device, equipment and storage medium based on online document comments
CN110912870B (en) Method, device, medium and electronic equipment for synchronizing data of electronic whiteboard
CN111427528B (en) Display method and device and electronic equipment
CN113934349B (en) Interaction method, interaction device, electronic equipment and storage medium
CN113253885A (en) Target content display method, device, equipment, readable storage medium and product
CN110022493B (en) Playing progress display method and device, electronic equipment and storage medium
CN111246245B (en) Method and device for pushing video aggregation page, server and terminal equipment
CN110908752A (en) Control setting method and device, electronic equipment and interaction system
CN113766303B (en) Multi-screen interaction method, device, equipment and storage medium
CN110147283B (en) Display content switching display method, device, equipment and medium
CN110109597B (en) Singing list switching method, device, system, terminal and storage medium
EP4344218A1 (en) Special effect playback method and system for live broadcast room, and device
CN110851097B (en) Control method, device, medium and electronic equipment for consistency of handwriting data
CN111177260A (en) Database remote copying method and device and electronic equipment
CN111709342B (en) Subtitle segmentation method, device, equipment and storage medium
CN111832279B (en) Text partitioning method, apparatus, device and computer readable medium
CN113709573B (en) Method, device, equipment and storage medium for configuring video special effects
CN110991312A (en) Method, apparatus, electronic device, and medium for generating detection information
CN114038255B (en) Answering system and method
CN110928442A (en) Electronic whiteboard operation instruction coding method, system, medium and electronic equipment
CN113256659B (en) Picture processing method and device and electronic equipment

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

CP01 Change in the name or title of a patent holder