Disclosure of Invention
The invention provides a method for sharing an electronic whiteboard based on an Android tablet computer and a network conference system, which are used for realizing the sharing of the electronic whiteboard based on the Android tablet computer and realizing the synchronous data transmission among all tablet computers sharing the electronic whiteboard.
The embodiment of the invention provides the following specific technical scheme:
a method for sharing an electronic whiteboard is applied to a network conference by using an Android tablet computer in a wireless mode, and comprises the following steps:
the Android tablet personal computer of the server receives a control request message which is sent by a first client belonging to the same network conference and used for controlling an electronic whiteboard shared by the network conference, and grants the control right of the electronic whiteboard to the first client;
and the server receives an action message generated by operating the electronic whiteboard and sent by the first client, and sends the action message to other clients belonging to the network conference, and the other clients in the network conference analyze the action message and then locally display an analysis result.
A network conference system is applied to network conference by using an Android tablet computer in a wireless mode, and comprises: the system comprises a tablet computer serving as a server and a tablet computer serving as a client, wherein the client at least comprises a first client and other clients except the first client;
the server receives a control request message which is sent by a first client belonging to the same network conference and is used for controlling the electronic whiteboard shared by the network conference, grants the control right of the electronic whiteboard to the first client, receives an action message which is sent by the first client and is generated by operating the electronic whiteboard, and sends the action message to other clients belonging to the network conference;
the first client sends a control request message for controlling the electronic whiteboard of the network conference to the server, operates the electronic whiteboard after obtaining the control right of the electronic whiteboard, generates a corresponding action message and sends the action message to the server;
and the other clients except the first client receive action messages which are sent by the server and generated by the operation of the first client on the electronic whiteboard, and display analysis results locally after analysis.
Based on the technical scheme, in the embodiment of the invention, the Android tablet computer serving as the server receives the control request message which is sent by the first client and used for controlling the electronic whiteboard shared by the network conferences and grants the control right of the electronic whiteboard to the first client, so that the clients belonging to the same network conference can operate the electronic whiteboard, and after receiving the action message which is sent by the first client and used for operating the electronic whiteboard, the server sends the action message to other clients belonging to the network conferences, and the action message is analyzed by the other clients and then the analysis result is displayed locally, so that the clients located in the same network conference can synchronize data.
Detailed Description
In order to realize sharing of an electronic whiteboard based on an Android tablet computer and synchronous data transmission among all tablet computers sharing the electronic whiteboard, the embodiment of the invention provides a method for sharing the electronic whiteboard, which is applied to a network conference by using the Android tablet computers in a wireless mode.
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
As shown in fig. 1, in the embodiment of the present invention, when an Android tablet computer is used for a web conference in a wireless manner, a detailed method flow for sharing an electronic whiteboard is as follows:
step 101: and the Android tablet computer of the server receives a control request message which is sent by a first client belonging to the same network conference and is used for controlling the electronic whiteboard shared by the network conference, and grants the control right of the electronic whiteboard to the first client.
After the server grants the control right of the electronic whiteboard to the first client, if the server receives a control request message sent by a second client belonging to the network conference, the control request message is forwarded to the first client; and if the server receives a abandoning request message which is sent by the first client aiming at the control request message of the second client and is used for abandoning the control right of the electronic whiteboard, the server grants the control right of the electronic whiteboard to the second client, and the second client is any one of other clients except the first client.
In practical application, for a client currently obtaining the control right of the electronic whiteboard, the user identification of the client is distributed to other clients in a network conference, and the electronic whiteboard of each client is displayed.
Step 102: the server receives an action message generated by operating the electronic whiteboard and sent by the first client, and sends the action message to other clients belonging to the network conference, and the other clients in the network conference analyze the action message and display an analysis result locally.
The operation performed on the electronic whiteboard can be various, and correspondingly, the action message generated by operating the electronic whiteboard is also various, and at least the action message is any one of a straight line, a rectangle, a circle and a broken line drawn on the electronic whiteboard; or, using an eraser tool to erase the action message of the operation on the electronic whiteboard; or loading the action message of the picture or the geometric figure on the electronic whiteboard; or, any one of the action messages of newly creating a page or turning up and down the page on the electronic whiteboard.
For example, the electronic whiteboard adopts a message driving mechanism, each message type has common attributes, and the common attributes are encapsulated in a message base class CMsg, which is specifically as follows:
class CMsg
{ int msgType; // type of message
int UserlD; // sender id of message
int LocalNum; // local sequence number of message
int GlobalNum; // Global sequence number of message
int LastDeliver; v/last message Global number processed by the Member
CMsg next; points to the next message
For another example, the common message classes are specifically as follows:
drawing a straight line: class MsgDrawLine extensions CM
{ Cpoint beginnPoint; // starting point of straight line
Cpoint endpoint; end of the line }// c
Drawing a rectangle class: class MsgDrawRec: public CM sg
{ Cpoint comer; diagonal points of the rectangle
Drawing circles: class MsgDrawcircle: public CM sg
{ Cpoint center; // center of circle
int radius; // radius }
Drawing a broken line class: class MsgDrawPolyLine:
public CMsg { int pointNum; // number of break points
Cpoint pointSet [ MAX _ POINT _ NUM ]; // device Point coordinates }
Image sharing class: class msgpicturechar:
public CMsg { connecting)// image file transfer person's address and port number
The method comprises the following steps of operating the electronic whiteboard to generate an action message for loading a picture on the electronic whiteboard, and specifically comprises the following steps: the electronic whiteboard carries out screen capture operation by utilizing a bottom screen capture function provided by an Android system, captures a display screen of the local tablet computer to obtain a picture, and sends an action message carrying the picture information to the server.
For example, a screen capture operation is performed on a bottom-level screenshot function provided by the Android system, the screenshot function is composed- > captureScreen (0, & heap, & w, & h, & f, 0, 0), and after the screenshot, a function execution result is transmitted back to whiteboard software of the application layer and is stored in a local corresponding directory.
In this embodiment, the server creates a web conference based on the electronic whiteboard, sends an identifier of the web conference to the client in the wireless network environment, and adds the client to the web conference after receiving a request message for adding to the web conference sent by the client.
In practical application, when a client is started, the electronic whiteboard software system is logged in according to the user name at the last login, and if the client logs in the electronic whiteboard software system for the first time, the user name needs to be created and then the client logs in.
In practical application, after a client is started, the client can send a conference list query request to all service ends in a wireless network environment through a conference list refreshing operation of an electronic whiteboard; after receiving the conference list query request, each server side located in the wireless network environment sends the locally created network conference identifier to the corresponding client side; the client analyzes and displays the identifier of the network conference in a local conference list after receiving the identifier of the network conference, selects a network conference based on the locally displayed conference list and sends a request message for joining the network conference to a server of the network conference; and the server adds the request message into the network conference after receiving the request message which is sent by the client and is added into the network conference.
Specifically, when sending the conference list query request, the client sends the conference list query request in a broadcast form in the wireless local area network by using a MulticastSocket of a sending interface of the Android system.
For example, when the client sends a request message for joining a web conference, the client may be implemented by a client login class, where the client login class is: class MsgLogin: public CMsg
{ CString text; ) // sender name, Login information }
In practical application, the client may also send a request message for logging out to the server, and after receiving the request message for logging out, the server may delete the request message from the conference list and return a response message to the client. For example, when the client sends the log-out request message, the log-out can be implemented by the client logging-out class: class msglolout: public CMsg
{ CStringtext; // Exit name, Exit information }
In this embodiment, after receiving an action message generated by operating the electronic whiteboard sent by the client, the server locally stores the action message, and after the network conference is ended, the server may play back the conference record based on the electronic whiteboard and the locally stored action message.
In practical application, the Android tablet computer serving as a server or a client adopts touch screen input.
As shown in fig. 2, an embodiment of the present invention further provides a web conference system, which is applied to a web conference through an Android tablet computer in a wireless manner, and mainly includes a tablet computer serving as a server and a tablet computer serving as a client, where the client includes at least a first client and other clients except the first client;
the server receives a control request message which is sent by a first client belonging to the same network conference and is used for controlling the electronic whiteboard shared by the network conference, grants the control right of the electronic whiteboard to the first client, receives an action message which is sent by the first client and is generated by operating the electronic whiteboard, and sends the action message to other clients belonging to the network conference;
the first client sends a control request message for controlling the electronic whiteboard of the network conference to the server, operates the electronic whiteboard after obtaining the control right of the electronic whiteboard, generates a corresponding action message and sends the action message to the server;
and other clients except the first client receive action messages which are sent by the server and generated by the operation of the first client on the electronic whiteboard, and display analysis results locally after analysis.
After the server grants the control right of the electronic whiteboard to the first client, if the server receives a control request message sent by a second client belonging to the network conference, the control request message is forwarded to the first client, and if the server receives a abandon request message which is sent by the first client aiming at the control request message of the second client and is used for abandoning the control right of the electronic whiteboard, the control right of the electronic whiteboard is granted to the second client.
In this embodiment, the corresponding action message generated by the first client operating the electronic whiteboard is an action message for drawing any one of a straight line, a rectangle, a circle or a broken line on the electronic whiteboard; or, using an eraser tool to erase the action message of the operation on the electronic whiteboard; or loading the action message of the picture or the geometric figure on the electronic whiteboard; or, any one of the action messages of newly creating a page or turning up and down the page on the electronic whiteboard.
The server is further used for creating a network conference based on the electronic whiteboard, sending an identifier of the network conference to the client in the wireless network environment, and adding the client into the network conference after receiving a request message sent by the client for adding the network conference.
The server is further used for locally storing the action message after receiving the action message which is sent by the first client and generated by operating the electronic whiteboard; and after the network conference is finished, the server performs conference record playback based on the electronic whiteboard and the locally stored action message.
Preferably, the server may further connect to a projection device, so that the content of the electronic whiteboard shared by the network conference is displayed through the projection device.
In this embodiment, the server and the client are connected via a wireless local area network (wifi).
Based on the technical scheme, in the embodiment of the invention, the Android tablet computer serving as the server receives the control request message which is sent by the first client and used for controlling the electronic whiteboard shared by the network conferences and grants the control right of the electronic whiteboard to the first client, so that the clients belonging to the same network conference can operate the electronic whiteboard, and after receiving the action message which is sent by the first client and used for operating the electronic whiteboard, the server sends the action message to other clients belonging to the network conferences, and the action message is analyzed by the other clients and then the analysis result is displayed locally, so that the clients located in the same network conference can synchronize data.
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.