The content of the invention
The embodiment of the present invention proposes a kind of cross-platform multi-screen interaction method, apparatus and system, it is possible to increase cross-platform
Robustness, speed and the quality of multi-screen interactive process.
A kind of cross-platform multi-screen interaction method provided in an embodiment of the present invention, is specifically included:
Receive the master control priority assignation request that requesting client is sent;Wherein, the master control priority assignation request includes
Master control client identification code and at least one controlled client identification code;
Asked according to the master control priority assignation, based on the client setting corresponding to the master control client identification code
Client is controlled, the client corresponding to each controlled client identification code is arranged to controlled client;
The display interface of the master control client is obtained, and the display interface is sent to each controlled client
Middle display;
The control operation that the master control client is sent is received, and the control operation is sent to each controlled visitor
In the end of family, so that each controlled client carries out corresponding operation processing according to the control operation.
Further, it is described to be asked according to the master control priority assignation, by corresponding to the master control client identification code
Client is arranged to master control client, and the client corresponding to each controlled client identification code is arranged into controlled client
End, is specifically included:
Asked according to the master control priority assignation, inquire about the client registers table pre-set;Wherein, the client is stepped on
The client identification code and master control rights state of at least one client are included in note table;
Master control rights state corresponding with the master control client identification code-phase in the client registers table is arranged to
Open;
Master control rights state corresponding with the controlled client identification code-phase in the client registers table is arranged to
Close.
Further, before the master control priority assignation request that the reception requesting client is sent, in addition to:
Receive the connection request that the requesting client is sent;Asking comprising the requesting client in the connection request
Seek client identification code;
The client registers table pre-set according to connection request inquiry;Wherein, wrapped in the client registers table
Client identification code containing at least one client;
If including the requesting client identification code in the client registers table, send successful connection and notify to described
Requesting client;
If not including the requesting client identification code in the client registers table, the requesting client is identified
Code is added in the client registers table, and is sent successful connection and notified to the requesting client.
Further, the master control client identification code is the requesting client identification code;The requesting client mark
Know code to be generated by the requesting client dynamic random.
Further, the master control priority assignation request for receiving requesting client and sending, is specifically included:
The master control priority assignation that the requesting client uses WebSocket agreements to send is obtained from port 8881
Request.
Correspondingly, the embodiment of the present invention additionally provides a kind of cross-platform multi-screen interactive device, specifically includes:
Master control priority assignation request receiving module, for receiving the master control priority assignation request of requesting client transmission;Its
In, the master control priority assignation request includes master control client identification code and at least one controlled client identification code;
Client jurisdiction setup module, for being asked according to the master control priority assignation, by the master control client identification
Client corresponding to code is arranged to master control client, and the client corresponding to each controlled client identification code is set
To be controlled client;
Interface simultaneous display module, sent out for obtaining the display interface of the master control client, and by the display interface
Deliver in each controlled client and show;And
Synchronization interactive module is operated, the control operation sent for receiving the master control client, and the control is grasped
Send into each controlled client, so that each controlled client is carried out accordingly according to the control operation
Operation is handled.
Further, the client jurisdiction setup module, is specifically included:
Client registers table query unit, for being asked according to the master control priority assignation, inquire about the client pre-set
Hold registration form;Wherein, the client identification code and master control authority shape of at least one client are included in the client registers table
State;
Master control client setting unit, for by the client registers table with the master control client identification code-phase pair
The master control rights state answered is set on;And
Controlled client setting unit, for by the client registers table with the controlled client identification code-phase pair
The master control rights state answered is set off.
Further, the cross-platform multi-screen interactive device, in addition to:
Connection request receiving module, the connection request sent for receiving the requesting client;In the connection request
Requesting client identification code comprising the requesting client;
Client registers table enquiry module, for the client registers table pre-set according to connection request inquiry;
Wherein, the client identification code of at least one client is included in the client registers table;
First successful connection notifies sending module, for when including the requesting client mark in the client registers table
When knowing code, send successful connection and notify to the requesting client;And
Second successful connection notifies sending module, for when not including the requesting client in the client registers table
During identification code, by the requesting client identification code be added to the client registers table in, and send successful connection notify to
The requesting client.
Further, the master control client identification code is the requesting client identification code;The requesting client mark
Know code to be generated by the requesting client dynamic random.
Correspondingly, the embodiment of the present invention additionally provides a kind of cross-platform Multi-screen interaction system, specifically include service end and
At least one client;
The service end, for cross-platform multi-screen interactive device as described above;
Each client is connected in real time with the service end by WebSocket agreements.
Implement the embodiment of the present invention, have the advantages that:
Cross-platform multi-screen interaction method provided in an embodiment of the present invention, apparatus and system, by master control client and
Addition middle device is regulated and controled and transition in controlled client so that and data can be preserved temporarily into intermediate medium,
Avoid because of power-off and the surprisingly loss of data that brings suddenly, save the substantial amounts of data recovery time, so as to improve across
Robustness, speed and the quality of the multi-screen interactive process of platform.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
As shown in figure 1, the structure of a preferred embodiment for cross-platform Multi-screen interaction system provided by the invention
Schematic diagram, including service end 11 and at least one client 12;
The service end 11, it is the cross-platform multi-screen interactive device described in following any embodiment;
Each client 12 is connected in real time with the service end 11 by WebSocket agreements.
As shown in Fig. 2 the flow of a preferred embodiment for cross-platform multi-screen interaction method provided by the invention
Schematic diagram, including step S21 to S24, it is specific as follows:
S21:Receive the master control priority assignation request that requesting client is sent;Wherein, in the master control priority assignation request
Including master control client identification code and at least one controlled client identification code.
It should be noted that the present embodiment is performed by the service end in above-mentioned cross-platform Multi-screen interaction system.
In the present embodiment, any one client in above-mentioned cross-platform Multi-screen interaction system can be to service end
The request of master control priority assignation is initiated, so that oneself or other a certain clients are arranged into master control client.As request visitor
The client at family end is sent to the client comprising master control client to be arranged in the master control priority assignation request of service end
Client identification code of the client identification code with other not as the client of master control client.
In another preferred embodiment, above-mentioned steps S21 can further include sub-step S2101, specifically such as
Under:
S2101:The ownership that the requesting client uses WebSocket agreements to send is obtained from port 8881
Limit sets request.
In the present embodiment, port 8881 is included in service end, for being led to the html web page service in client
Letter.It is highly preferred that communicated between service end and client using WebSocket agreements.
Specifically, requesting client can be sent out by way of clicking on specific function button or making certain gestures action
Master control priority assignation is sent to ask to service end so that master control authority of the service end to each client is configured.
S22:Asked according to the master control priority assignation, the client corresponding to the master control client identification code is set
For master control client, the client corresponding to each controlled client identification code is arranged to controlled client.
In the present embodiment, service end is asked the master control priority assignation after the request of master control priority assignation is received
Parsed, obtain master control client identification code therein and each controlled client identification code, and by the master control client mark
Know the client corresponding to code and be arranged to master control client, the client corresponding to each controlled client identification code is arranged to
Controlled client.
Specifically, above-mentioned steps S22 can further include sub-step S2201 to S2203, specific as follows:
S2201:Asked according to the master control priority assignation, inquire about the client registers table pre-set;Wherein, the visitor
The client identification code and master control rights state of at least one client are included in the registration form of family end.
In the present embodiment, client registers table is previously stored with service end, for pair with all visitors for being locally connected
The relevant information at family end is registered.Specifically, included and the visitor for each client being locally connected in the client registers table
Family end identification code, chained address and master control rights state.Wherein, in some preferred embodiments, the master control rights state
Represented with parameter masterCtrl.
S2202:By master control rights state corresponding with the master control client identification code-phase in the client registers table
It is set on.
In the present embodiment, service end is obtained and the request of above-mentioned master control priority assignation by inquiring about above-mentioned client registers table
In master control client identification code-phase corresponding to after master control rights state, the master control rights state is set on, i.e. will
Above-mentioned parameter masterCtrl value is arranged to true, represents the client corresponding to the master control client identification code being arranged to
Master control client.
S2203:By master control rights state corresponding with the controlled client identification code-phase in the client registers table
It is set off.
In the present embodiment, service end is obtained and the request of above-mentioned master control priority assignation by inquiring about above-mentioned client registers table
In controlled client identification code-phase corresponding to after master control rights state, the master control rights state is set off, i.e. will
Above-mentioned parameter masterCtrl value is arranged to false, and the client for representing to be controlled this corresponding to client identification code is set
To be controlled client.
In some specific embodiments, it can also allow according to total administrative standard of project and be defaulted as learning authority
User automatically elimination obtain master control qualification, master control display end could can only passively be turned into by master control mandate.
S23:The display interface of the master control client is obtained, and the display interface is sent to each controlled visitor
Family is shown in end.
In the present embodiment, after service end determines the master control authority of each client, master control visitor therein is obtained automatically
The display interface at family end, and by the display screen of the display interface simultaneous display of the master control client to each controlled client.
In another preferred embodiment, service end can also be by way of master control client by master control client
Display interface is shown to the display interface of each client.Specifically, master control client is clicked on screen function button, is sent same
Screen order is to service end, and to trigger the interface simultaneous display operation of service end, ordering norms is:ws.send("
drawPointDragEnd:::right-top|5,"+diuid+",<%=sessionId%>");Wherein,
" drawPointDragEnd " is function name, and " right-top " and " 5 " is the parameter of function, and multiple parameters are needed between " | "
Separate.
In yet another preferred embodiment, the display interface of the master control client is obtained, and by the display interface
Logical order behind state is sent into each controlled client, with a series of, simulates same frame, non-same
Series then draws position line by practice sites corresponding to hind computation organ, marked in the series with straight line-absolutely not
The simultaneous techniques of simple remote desktop or video flowing.The interface each shown can be drawn according to the back-end data of medical imaging
The picture, which needs to present, meets the operation effect of medical diagnosis qualification, such as the independent acquisition etc. of CT values.
S24:The control operation that the master control client is sent is received, and the control operation is sent to each quilt
Control in client, so that each controlled client carries out corresponding operation processing according to the control operation.
In the present embodiment, the control that is shown during user is in master control client to local display, word, picture etc. enter
The corresponding operation of row, master control client send the related control operation of user into service end.Service end grasps the control
Each controlled client is transmitted to, so that each controlled client realizes that corresponding operation is handled according to the control operation, from
And reach the effect in associative operation simultaneous display to each controlled client of the user in master control client.
Specifically, service end is sending above-mentioned control operation to before each controlled client, and inquiry first is deposited in advance
The client registers table of storage, therefrom obtains the chained address corresponding to each controlled client identification code, and by the control operation
Send to the client corresponding to each chained address, so as to which the control operation is sent to each controlled client.
In some preferred embodiments, service end is right after the master control priority assignation to each client is completed
Processing and Fuzzy Processing is fixed in each functional module in local.Wherein, fixing process refers to referring in message response
The functional module called is determined;What Fuzzy Processing was specified is to redefine the function mould for needing to call by intellectual analysis sentence
Block, wherein, this functional module after piecing together character string again by by generating new object to perform.
In other preferred embodiments, service end can also be according to specific demand before control operation is forwarded
The related operation function of service end is called, and operation result is together forwarded to together with control operation each controlled client.
In an additional preferred embodiment, the cross-platform multi-screen interaction method also includes step S01 to S04, specifically
It is as follows:
S01:Receive the connection request that the requesting client is sent;The requesting client is included in the connection request
Requesting client identification code.
In the present embodiment, before cross-platform multi-screen interactive is carried out, requesting client needs to carry out in service end
Register and be attached with service end.Specifically, the identification code of requesting client dynamic generation itself, and according to the identification code
After generating corresponding connection request, the connection request is sent to service end.Service end receives the connection request, and please to this
Ask whether client is registered to test.
It should be further stated that in some preferred embodiments, the master control client identification code is described
Requesting client identification code;The requesting client identification code is generated by the requesting client dynamic random.That is, master control client
End is requesting client.Specifically, the requesting client identification code passes through server dynamic by the requesting client
Session id dynamic randoms generate.The requesting client identification code is by the request central server in First Contact Connections
When dynamic random generate.
S02:The client registers table pre-set according to connection request inquiry;Wherein, the client registers table
In include the client identification code of at least one client.
In the present embodiment, service end parses to the connection request received, obtains requesting client mark therein
Know code, and in inquiring client terminal registration form whether it is registered have with the requesting client identification code identical identification code, if having stepped on
Note has, then illustrates that the requesting client has been registered, and otherwise, then illustrates that the requesting client is unregistered.
In some specific embodiments, identification code, which has, checks total coding and serial 2 kinds of total coding, and every kind of is all substantially complete
The identification code of unique 128 bit digital of ball (a numeral+separation) combination above.
S03:If including the requesting client identification code in the client registers table, send successful connection notify to
The requesting client.
In the present embodiment, service end then directly transmits successful connection when examining registered to above-mentioned requesting client
Notice is asked to above-mentioned requesting client so that the requesting client initiates follow-up cross-platform multi-screen interactive to service end.
By the subordinate relation of general inspection coding and series coding, to determine whether requesting client is consistent with sending main control end.
S04:If the requesting client identification code is not included in the client registers table, by the requesting client
Identification code is added in the client registers table, and is sent successful connection and notified to the requesting client.
In the present embodiment, service end is when examining unregistered to above-mentioned requesting client, then by the request received visitor
The chained address of family end identification code and the requesting client is added in client registers table, to complete to the requesting client
Registration.Finally, send successful connection to notify to above-mentioned requesting client, so that the requesting client initiates follow-up to service end
Cross-platform multi-screen interactive request.
Cross-platform multi-screen interaction method provided in an embodiment of the present invention, by master control client and controlled client
Addition middle device is regulated and controled and transition so that data can be preserved temporarily into intermediate medium, are avoided because suddenly
Power-off and the loss of data that surprisingly brings, save the substantial amounts of data recovery time, mutual so as to the multi-screen that improves cross-platform
Robustness, speed and the quality of dynamic process.Also solve master control simultaneously and reduce a large amount of image datas unnecessary between being controlled
Interaction, flow is saved, the other interactive teaching and learning effect of quantum stage is realized in the case where not needing high bandwidth, with the net that consumption is minimum
More intelligent, more superior function is realized under the premise of network resource.It is in addition, soft with operated screen-sized, background drive
Part platform, client software etc. are all irrelevant, it is only necessary to which Intranet configures center of inside service module or connected by internet
Kernel service is connect, by browser compatible common HTML5 it is achieved that without doing specially treated in addition.
Correspondingly, the present invention a kind of cross-platform multi-screen interactive device is also provided, can realize in above-described embodiment across
All flows of the multi-screen interaction method of platform.
As shown in figure 3, the structure of a preferred embodiment for cross-platform multi-screen interactive device provided by the invention
Schematic diagram, it is specific as follows:
Master control priority assignation request receiving module 31, for receiving the master control priority assignation request of requesting client transmission;
Wherein, the master control priority assignation request includes master control client identification code and at least one controlled client identification code;
Client jurisdiction setup module 32, for being asked according to the master control priority assignation, by the master control client mark
Know the client corresponding to code and be arranged to master control client, the client corresponding to each controlled client identification code is set
It is set to controlled client;
Interface simultaneous display module 33, for obtaining the display interface of the master control client, and by the display interface
Transmission is shown into each controlled client;Specifically, the display interface is sent to each controlled client
The middle similar function of startup does interface simultaneous display;
Interface asynchronous display module, for obtaining the display command of the master control client, and by the display interface
Order calculates corresponding order and parameter, sent to each in addition when the contrast discovery of central service end is not belonging to Universal Serial
Start foreign peoples's function in the controlled client and do interface concord display;And
Synchronization interactive module 34 is operated, the control operation sent for receiving the master control client, and by the control
Operation is sent into each controlled client, so that each controlled client is carried out accordingly according to the control operation
It is adapted to the operation logic processing of local screen.
In another preferred embodiment, the client jurisdiction setup module, is specifically included:
Client registers table query unit, for being asked according to the master control priority assignation, inquire about the client pre-set
Hold registration form;Wherein, the client identification code and master control authority shape of at least one client are included in the client registers table
State;
Master control client setting unit, for by the client registers table with the master control client identification code-phase pair
The master control rights state answered is set on;And
Controlled client setting unit, for by the client registers table with the controlled client identification code-phase pair
The master control rights state answered is set off.
In yet another preferred embodiment, the cross-platform multi-screen interactive device, in addition to:
Connection request receiving module, the connection request sent for receiving the requesting client;In the connection request
Requesting client identification code comprising the requesting client;
Client registers table enquiry module, for the client registers table pre-set according to connection request inquiry;
Wherein, the client identification code of at least one client is included in the client registers table;
First successful connection notifies sending module, for when including the requesting client mark in the client registers table
When knowing code, send successful connection and notify to the requesting client;And
Second successful connection notifies sending module, for when not including the requesting client in the client registers table
During identification code, by the requesting client identification code be added to the client registers table in, and send successful connection notify to
The requesting client.
Further, the master control client identification code is the requesting client identification code;The requesting client mark
Know code to be generated by the requesting client dynamic random.
Specifically, the master control client identification code is the requesting client identification code;The requesting client mark
Code is generated by request central server dynamic random in First Contact Connections, and before holding to next page furbishing effectively.
In yet another preferred embodiment, the master control priority assignation request receiving module, is specifically included:
Request reception unit, sent for obtaining the requesting client from port 8881 using WebSocket agreements
The master control priority assignation request.
Cross-platform multi-screen interactive device provided in an embodiment of the present invention, by master control client and controlled client
Addition middle device is regulated and controled and transition so that data can be preserved temporarily into intermediate medium, are avoided because suddenly
Power-off and the loss of data that surprisingly brings, save the substantial amounts of data recovery time, mutual so as to the multi-screen that improves cross-platform
Robustness, speed and the quality of dynamic process.
Described above is the preferred embodiment of the present invention, it is noted that for those skilled in the art
For, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also considered as
Protection scope of the present invention.