WO2014090016A1 - Device control method and mobile communication terminal - Google Patents

Device control method and mobile communication terminal Download PDF

Info

Publication number
WO2014090016A1
WO2014090016A1 PCT/CN2013/084437 CN2013084437W WO2014090016A1 WO 2014090016 A1 WO2014090016 A1 WO 2014090016A1 CN 2013084437 W CN2013084437 W CN 2013084437W WO 2014090016 A1 WO2014090016 A1 WO 2014090016A1
Authority
WO
WIPO (PCT)
Prior art keywords
control
mobile communication
communication terminal
designated device
control operation
Prior art date
Application number
PCT/CN2013/084437
Other languages
French (fr)
Chinese (zh)
Inventor
陈虞付
李超
刘晓健
吴军
Original Assignee
北京奇虎科技有限公司
奇智软件(北京)有限公司
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 北京奇虎科技有限公司, 奇智软件(北京)有限公司 filed Critical 北京奇虎科技有限公司
Publication of WO2014090016A1 publication Critical patent/WO2014090016A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • H04L67/025Protocols based on web technology, e.g. hypertext transfer protocol [HTTP] for remote control or remote monitoring of applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a device control method and a mobile communication terminal. Background technique
  • the electric computer brain plays a role in the life and life of the people, playing the role of the more and more important role.
  • the living and living of people and the work and work are becoming more and more dependent on the computer brain.
  • the computer brains all have equipment for input and output, for example, one type of equipment is often used for input and input equipment.
  • the keyboard keyboard and the mouse mouse are used to operate the computer brain. Among them, the keyboard keyboard is usually used as the input and input of the information, and the mouse mouse is used.
  • the key keyboard and the mouse mouse are both physical physics.
  • Li Jie Jie.. Quality the space occupied by the space and the placement of the position of the placement is also required, and only can be close to the distance from the operation An electric computer brain;
  • the key keyboard and the touch panel are both internal
  • the built-in electric corroof is only able to work as a computer brain near a close distance, and it exists in the limitations of the work. .
  • the present invention has been proposed to provide an overcoming of the above.
  • a device control method that solves the above problems or at least partially solves the problem with a mobile communication terminal.
  • a device control method including: a mobile communication terminal The control operation instruction for controlling the operation of the specified device by the set HTML page, wherein the HTML page is used to provide an interface for the user to control the specified device through the mobile communication terminal, and receive the control operation generated by the user on the interface operation. And transmitting a control operation instruction; the mobile communication terminal sends the control operation instruction to the designated device through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
  • a mobile communication terminal including: a receiving module configured to receive a control operation instruction for a user to perform a control operation on a specified device through a set HTML page, where the HTML page is used to provide a user Receiving, by the mobile communication terminal, an operation operation command for the designated device, receiving a control operation instruction generated by the user for the interface operation, and transmitting a control operation instruction; and the control module is configured to send the control operation instruction to the designated device through the HTML page, so as to specify The device performs the control operations indicated by the control operation instructions.
  • a computer readable recording medium having recorded thereon a program for executing the above device control method.
  • the mobile communication terminal receives the user's control operation on the designated device through the HTML page, and sends a control operation instruction to the designated device, so that the designated device performs the corresponding control operation according to the control operation instruction.
  • the HTML page is widely used and supported by almost all operating systems.
  • the HTML page is used to control the operation of the specified device by the mobile communication terminal. No special operation control software is required on the mobile communication terminal side and the designated device side, and the operation is convenient. Simple implementation, good compatibility, and low implementation cost.
  • the operation of a designated device such as a PC or an Internet of Things device can be controlled by a mobile communication terminal at a long distance.
  • the mobile communication terminal of the invention can replace the traditional input device, realizes convenient operation of the device away from the device, and monitors the device in real time, and comprehensively controls the device, thereby solving the problem that the existing input device cannot realize the user
  • Long-distance distance control of computers or IoT devices reduces the user's experience of operating the computer or IoT devices, achieves long-distance manipulation of the device, and enhances the user's operating experience.
  • FIG. 1 is a flow chart of steps of a device control method according to a first embodiment of the present invention
  • FIG. 2 is a flow chart of steps of a device control method according to a second embodiment of the present invention
  • FIG. 4 is a schematic diagram of an interface of a touch panel HTML page in the embodiment shown in FIG. 3
  • FIG. 5 is an interface of a shortcut operation HTML page in the embodiment shown in FIG.
  • FIG. 6 is a schematic diagram of an interface for selecting a terminal HTML page in the embodiment shown in FIG. 3.
  • FIG. 7 is a flow chart of steps of a device control method according to Embodiment 4 of the present invention
  • FIG. 8 is a flowchart according to the present invention.
  • FIG. 1 there is shown a flow chart of the steps of a device control method according to a first embodiment of the present invention.
  • Step S102 The mobile communication terminal receives a control operation instruction for the user to perform a control operation on the designated device through the set HTML page.
  • the HTML page is used to provide an interface for the user to perform control operations on the designated device through the mobile communication terminal, receive a control operation instruction generated by the user for the interface operation, and send a control operation instruction.
  • Step S104 The mobile communication terminal sends a control operation instruction to the designated device through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
  • the mobile communication terminal receives the control operation of the designated device by the user through the HTML page, and sends a control operation instruction to the designated device, so that the designated device performs a corresponding control operation according to the control operation instruction.
  • the HTML page is widely used and supported by almost all operating systems.
  • the HTML page is used to control the operation of the specified device by the mobile communication terminal. No special operation control software is required on the mobile communication terminal side and the designated device side, and the operation is convenient. Simple implementation, good compatibility, and low implementation cost.
  • the operation of a designated device e.g., a PC or an Internet of Things device
  • a mobile communication terminal can be controlled by a mobile communication terminal at a long distance.
  • the mobile communication terminal of this embodiment can replace the traditional input device, realizes convenient operation of the device away from the device, and monitors the device in real time, and comprehensively controls the device, thereby solving the existing input device.
  • the user controls the electric rot or the Internet of Things device at a long distance, which reduces the user's operation experience on the computer or the Internet of Things device, and achieves the long-distance manipulation of the device and improves the user experience.
  • FIG. 2 there is shown a flow chart of the steps of a device control method in accordance with a second embodiment of the present invention.
  • a network control server is used to connect the mobile communication terminal with the designated device, and the WebSocket connection is established between the mobile communication terminal and the network control server, and between the network control server and the designated device.
  • the WebSocket protocol is HTML5, a new protocol that implements full-duplex communication between the browser and the server.
  • the WebSocket protocol is relatively simple.
  • the device and the normal browser use the port 80 or port 443 to perform a request handshake.
  • the server identifies whether it is a WebSocket request according to the HTTP HEADER. If yes, the request is upgraded to a WebSocket connection. After the handshake is successful. It enters the data transfer phase of the two-way long connection.
  • the specified device side can set NPAPI.
  • the NPAPK Netscape Plugin Application Programming Interface is a generic interface for executing external applications in a browser. Each plugin in the Netscape plugin declares itself Holding one or several content types, when the browser encounters this type of content, it looks for a plugin that can be decoded in the plugin library, and distributes the content to it, and in the corresponding position of the webpage. display.
  • the corresponding API Application Programming Interface
  • the system can be called to implement corresponding functions, such as shutting down, adjusting the volume, controlling the mouse operation and the like.
  • the browser provides SetCursorPos, Shutdown, Snapshot, MouseDown to the javascript script in the extension web page through the NPAPI mechanism (currently the mechanism has been applied to Chrome, browsers based on Chromium open source projects and browsers such as Firefox).
  • MouseUp, KeyDown, KeyUp and other interface functions javascript communicate with the server through websocket, after receiving the control command, call these javascript interface functions extended by NPAPI, realize the control cursor position, simulate mouse click and keyboard press, computer Snapshot, computer shutdown and other functions.
  • the device control method of this embodiment includes the following steps:
  • Step S202 The mobile communication terminal acquires information of at least one designated device to be controlled from the network control server.
  • the network control server may pre-store information of one or more designated devices to be controlled, and send information of the designated devices to be controlled to the mobile communication terminal upon receiving the request of the mobile communication terminal; the network control server may also be Upon receiving the request from the mobile communication terminal, the information is transmitted to the designated device to which it is connected, and information of one or more designated devices to be controlled is acquired, and then returned to the mobile communication terminal.
  • the mobile communication terminal sends a request to the network control server through the WebSocket connection, and acquires information of at least one designated device to be controlled from the network control server through the WebSocket connection. That is, the communication between the mobile communication terminal and the network control server follows the WebSocket protocol. Similarly, there is a WebSocket connection between the network control server and the specified device, and the two also follow the WebSocket protocol for communication.
  • the mobile communication terminal acquires information of the at least one designated device to be controlled from the network control server
  • the information of the specified device includes at least one of the following: a two-dimensional code of the specified device, an identifier of the designated device, and an IP address of the designated device
  • the mobile communication terminal recognizes and displays the designated device by specifying the information of the device.
  • the network control server knows according to the information of the designated device to be controlled
  • the device does not specify a device, and the information of the specified device includes at least one of the following: a two-dimensional code of the specified device, an identifier of the designated device, and an IP address of the designated device; the mobile communication terminal acquires the specified device identified by the network control server from the network control server.
  • Information is not specify a device, and the information of the specified device includes at least one of the following: a two-dimensional code of the specified device, an identifier of the designated device, and an IP address of the designated device
  • Step S204 The mobile communication terminal selects a designated device to be controlled according to the user input, and sends the authentication information to the network control server.
  • the authentication information is used to request authorization for the control operation of the selected designated device.
  • Step S206 The mobile communication terminal receives the confirmation authorization information returned by the network control server. By authorizing the authentication, it is possible to ensure the security of the operation control of the device by the mobile communication terminal.
  • Step S208 The mobile communication terminal acquires an HTML page of the selected designated device.
  • the mobile communication terminal can obtain the HTML page of the selected specified device in a variety of ways. For example, the mobile communication terminal sends a message acquisition command to the network control server by using a WebSocket connection, where the information acquisition command is used to obtain a control operation supported by the specified device; the network control server uses the WebSocket connection to send the information acquisition command to the designated device, so that the specified device Obtaining, by the NPAPI function, the control operation supported by the specified device and returning to the network control server, and forwarding the information to the mobile communication terminal by the network control server according to the information acquisition command; the mobile communication terminal according to the control operation information supported by the specified device returned by the network control server, The controls corresponding to the control operations supported by the specified device are displayed in the HTML page, and finally the HTML page corresponding to the specified device is generated.
  • the mobile communication terminal sends a message acquisition command to the network control server by using a WebSocket connection, where the information acquisition command is used to obtain a control operation supported by the specified device; the network control server sends the information acquisition command to the designated device by using a WebSocket connection, so that the specified The device obtains the control operation supported by the specified device through the NPAPI function and returns it to the network control server according to the information acquisition command.
  • the network control server generates a corresponding HTML page according to the information of the control operation supported by the specified device, and returns the corresponding HTML page to the mobile communication terminal.
  • the mobile communication terminal is pre-built with set HTML pages
  • the pre-built HTML pages include at least one of the following: a touchpad page, a shortcut operation page, and a selection terminal page, wherein the touchpad page is used to receive the user's touch
  • the information of the touch operation of the board page generates a control operation instruction according to the information of the touch operation to control the cursor operation of the designated device;
  • the page includes at least one of the following controls: a volume adjustment control, a device desktop display control, a device screen capture control, and a device shutdown control, and the shortcut operation page is configured to receive information about a user's operation on the control in the shortcut operation page, according to the operation of the control
  • the information generation control operation instruction controls the designated device to perform the control operation indicated by the control operation instruction;
  • the selection terminal page is used to display the information of the device to be controlled and the controlled state of the device to be controlled, so that the user selects the device to be controlled
  • the Select Terminal page also includes an authorization password input control for the user to
  • the mobile communication terminal After the mobile communication terminal obtains the authorization of the designated device, the mobile communication terminal displays all or part of the above-prepared HTML pages in advance for the user to operate. It should be noted that, in practical applications, a person skilled in the art may construct one or more of the above HTML pages according to actual needs, or integrate one or more of the above HTML pages into one HTML page, and use an HTML page. It can realize the operation function of the specified device, and it is flexible and easy to expand.
  • Step S210 The mobile communication terminal receives a control operation instruction for the user to perform a control operation on the designated device through the set HTML page.
  • the HTML page in the mobile communication terminal listens to the control operation performed by the user on the specified device through the HTML page, and obtains the information of the control operation through the DOM (Document Object Model) event of the HTML page, according to the control operation.
  • the information generates control operations instructions.
  • the DOM is the standard programming interface for W3C organizations that handles markup languages. It is a platform- and language-independent application interface that dynamically accesses programs and scripts, updating their content, structure, and style of www documents. Event processing is the most important part of the DOM.
  • the sophisticated event mechanism allows programs such as JavaScript programs to trigger different execution methods based on specific events, making the program more interactive and intelligent. For example, the mouse movement data on the HTML page can be obtained through the touchstart event, the touchmove event, and the touchend event.
  • Step S212 The mobile communication terminal uses a WebSocket connection to send a control operation instruction to the network control server through the HTML page.
  • the network control server can be built using Node.js.
  • Node.js is a set of JavaScript toolkits for writing high-performance web servers with single-threaded, non-blocking 10, event-driven, and many more.
  • the network control server can also use other suitable methods.
  • Build such as building an Apache (Apache) server.
  • the network control server establishes a connection between the mobile communication terminal and the designated device controlled by the mobile communication terminal through the WebSocket protocol.
  • Step S214 The network control server forwards the control operation instruction to the designated device by using a WebSocket connection.
  • Step S216 The designated device receives the control operation instruction, and according to the control operation instruction, invokes the system API of the specified device through the NPAPI to implement the control operation indicated by the control operation instruction.
  • a browser and a browser extension having an NPAPI mechanism are installed in the designated device of the embodiment.
  • the browser extension includes an NPAPI plug-in (ie, a DLL file), the browser extension is used to implement WebSocket communication between the specified device and the network control server, and the system API of the specified device is invoked through the NPAPI plug-in.
  • the specified device listens to and receives the control operation instruction sent by the network control server through the HTML page of the browser extension; further, the HTML page of the browser extension calls the NPAPI function corresponding to the control operation indicated by the control operation instruction, and passes the NPAPI function.
  • the corresponding system API function is called to implement the control operation indicated by the control operation instruction. For example, when the control operation indicated by the control operation instruction is a cursor movement operation, the NPAPI function called by the HTML page of the browser extension of the specified device is SetCursorPos, and the NPAPI function calls the mouse-event function of the system to realize the movement of the cursor.
  • the function of the mobile communication terminal as a remote controller is realized, such as a mobile phone remote controller, and the mobile communication terminal remote controller completes communication between the mobile communication terminal, such as a mobile phone and a designated device such as a computer, through a two-way communication mechanism of WebSocket, through NPAPI.
  • the plugin mechanism invokes the system's API to execute user commands, thereby enabling full control of the specified device in the event that the user is completely detached from the traditional input device.
  • FIG. 3 there is shown a flow chart of the steps of a device control method according to a third embodiment of the present invention.
  • the mobile communication terminal is a mobile phone
  • the designated device is a personal computer as an example.
  • the user controls the device control method of the present invention by performing a touch movement operation on the touch panel page of the mobile communication terminal to control the cursor operation of the designated device.
  • the device control method of this embodiment includes the following steps:
  • Step S302 Set up a network control server.
  • Node.js As an emerging back-end language, Node.js has many advantages, such as: RESTfol APL single-threaded, non-blocking 10, Google V8, event-driven, and more.
  • the construction of the network control server includes:
  • Step 1 Install Cygwin; then, download and install Node.js.
  • Step 2 Implement WebSocket communication with socket.io.js.
  • Socket.io.js is a js library file that uses the WebSocket specification in the HTML5 draft to implement two-way communication between the browser and the server. It provides functions such as sending a message (socket.emit ( )) and receiving information (socket.on ( ) ), broadcast information (socket.broadcast.emit ( )), etc.
  • APL a js library file that uses the WebSocket specification in the HTML5 draft to implement two-way communication between the browser and the server. It provides functions such as sending a message (socket.emit ( )) and receiving information (socket.on ( ) ), broadcast information (socket.broadcast.emit ( )), etc.
  • APL
  • the third step realize the authorization and authentication of the mobile communication terminal.
  • the designated device sends the controlled password to the network control server, and the network control server backs up the controlled password.
  • the control terminal that is, the mobile communication terminal wants to control a specified device, it needs to input the controlled password and send it to the network control server. Verify that if the password is entered correctly, control is obtained.
  • Step 4 The network control server acquires the command of the designated device, the control terminal, that is, the mobile communication terminal, and implements the transfer.
  • Step S304 Construct an HTML page in the mobile communication terminal, configured to perform a control operation on the designated device by the user, and send a control operation instruction generated according to the control operation.
  • the constructed HTML page includes a touch panel page, a shortcut operation page, and a selection terminal page.
  • the interface of the touchpad page is as shown in FIG. 4.
  • the touchpad page is used to receive information of a touch operation of the user on the touchpad page, and generates a control operation instruction according to the information of the touch operation to control the cursor operation of the device. Control the movement of the specified device cursor by dragging the touch point of the touchpad page (such as the white point in Figure 4) and calculating the distance it can be dragged (the unit can be a pixel).
  • the distance conversion method is Isometric conversion, that is, how much distance the touch point drags on the touch panel page of the mobile communication terminal such as the mobile phone, and how much distance the cursor on the computer moves.
  • the control terminal that is, the mobile communication terminal acquires the movement information or the click event of the touch point through the DOM event of the HTML page (including touchstart, touchmove, touchend, etc.), and then sends the corresponding data to the network control by using the socket.emit ( ) method.
  • the server listens to the control terminal, that is, the data sent by the mobile communication terminal through the socket.on ( ) and sends the data to the specified device by using the socket.broadcast.emit ( ) method, and the browser extension of the specified device passes the socket.on ( Listening to the data sent by the network control server, and calling the relevant system APIs (such as: mouse_ event , keybd_ event , OpenProcessToken , LookupPrivilege Value , AdjustTokenPrivileges , ExitWindowsEx ) through the NPAPI plugin (a DLL of the browser extension) Operational actions.
  • the distance conversion method can also be other suitable methods, such as proportional conversion.
  • the shortcut operation page is shown in FIG. 5, and is configured to receive information about the operation of the user on the shortcut operation page, and generate a control operation instruction according to the operation information of the control to control the device to perform the control operation indicated by the control operation instruction.
  • the shortcuts in the shortcut operation page are: a volume adjustment control, a device desktop display control, a device screen capture control, and a device shutdown control, that is, the shortcut operations performed on the device through the page include: adjusting the volume , display desktop, screen capture and shutdown.
  • control terminal that is, the shortcut operation of the mobile communication terminal
  • the type of data is invoked by the NPAPI plugin mechanism to call the corresponding system API.
  • the shortcut button of the embodiment is further provided with a selection terminal button control, and when the button is clicked, the selection terminal page is displayed, as shown in FIG. 6.
  • the interface of the terminal page is displayed as shown in FIG. 6 , and is used for displaying the information of the designated device to be controlled and the controlled state of the specified device to be controlled, so that the user selects the designated device to be controlled;
  • the authorization password input control is used for the user to input an authorization password for control operation authentication.
  • the Select Terminal page displays the specified device list obtained from the network control server and the controlled state of the specified device. After inputting the authorization password and verifying by the network control server, the user can obtain the control right of the selected designated device.
  • the specified device will have local information (for example, calculations) The machine name, IP address, controlled password, etc.
  • the network control server can send related information (in addition to the controlled password) to the control terminal, that is, the mobile communication terminal, and the control terminal, that is, the mobile communication terminal selects and specifies The device (such as according to the IP address or computer name) and input the controlled password and send it to the network control server for verification.
  • the network control server After the password is correct, the network control server returns the successful information, and the control terminal, that is, the mobile communication terminal obtains the control authority, and then the control terminal That is, the mobile communication terminal can control the designated device.
  • Step S306 Setting a specified device.
  • the browser extension program specifies that the device needs to rely on a browser extension (.crx, .xpi file).
  • the background page of the extension program is an HTML page for communication with the network control server.
  • the extension's NPAPI plugin is a DLL that completes the system API call.
  • the control terminal that is, the HTML page of the mobile communication terminal sends the control operation instruction to the network control server through the WebSocket
  • the network control server sends the control operation instruction to the designated device by using the WebSocket, so that the designated device accepts the instruction of the control terminal, that is, the mobile communication terminal.
  • the background page of the specified device browser extension parses the instruction and calls the related function of NPAPI, and then calls the system API (such as mouse_event, keybd_event, OpenProcessToken) by the NPAPI function. , LookupPrivilege Value, AdjustTokenPrivileges, ExitWindowsEx, etc.) Complete mouse clicks, move cursors, turn off events, and more.
  • the NPAPI plugin is a DLL that can directly call the system API, so that the specified device can receive the API through the NPAPI call system. The command.
  • the mobile communication terminal can start the operation control of the designated device, including:
  • Step S308 The mobile communication terminal acquires a list of designated devices (PCs).
  • the specified device sends the information of the machine (such as computer name, IP address, controlled password, etc.) to the network.
  • the network control server sends the related information of the specified device (in addition to the controlled password) to the control terminal, that is, the mobile communication terminal.
  • Step S310 The mobile communication terminal selects a designated device (PC) and performs authorization authentication.
  • the designated device sends the controlled password to the network control server, and the control terminal is the mobile communication terminal.
  • the authorization password input control of the HTML page such as the input control, enters a password and sends it to the network control server for verification. If the entered password is correct, it is authorized.
  • Step S312 The mobile communication terminal moves the cursor through the touch area of the touch panel page to generate a control operation instruction.
  • the DOM event of the touch panel page acquires the movement information and the click event of the touch point, thereby generating a control operation instruction.
  • the DOM event of the shortcut operation page acquires the button click information, thereby generating a control operation instruction.
  • Step S314 The mobile communication terminal communicates with the network control server by using a WebSocket connection, and sends a control operation instruction to the network control server through the touchpad page.
  • Step S316 The network control server communicates with the designated device by using a WebSocket connection, and sends a control operation instruction to the designated device.
  • Step S318 The specified device obtains a control operation instruction sent by the network control server through a background page of the browser extension program, and invokes a related NPAPI function.
  • the device calls the NPAPI function SetCursorPos.
  • Step S320 The designated device invokes the API function of the system through the NPAPI function, and performs a control operation indicated by the control operation instruction.
  • the API function mouse_ event corresponding to the NPAPI function in step S318 is called to implement the cursor operation of the specified device.
  • the device control method of the present invention is described by taking the cursor control operation of the designated device as an example.
  • the mobile communication terminal such as a mobile phone
  • a computer input device such as a traditional keyboard, touchpad, and mouse that conveniently operates the computer away from the computer and monitors the computer's functions in real time.
  • the new web standard and the characteristics of the mobile communication terminal, such as the mobile phone are adopted, and the mobile communication terminal such as the mobile phone is used as the input device of the computer, which greatly improves the user's access to the computer while maximizing the convenience of the computer input. Operating experience.
  • FIG. 7 there is shown a flow chart of the steps of a device control method according to a fourth embodiment of the present invention.
  • the device control method of this embodiment can be applied to the control of the IoT terminal device by the mobile communication terminal.
  • Step S402 The mobile communication terminal acquires information of at least one specified device within a certain range and displays it for the user to select the designated device.
  • the mobile communication terminal transmits a corresponding request to a designated device within a certain distance through a specific connection such as Bluetooth to obtain information of the surrounding designated device.
  • a specific connection such as Bluetooth
  • the mobile communication terminal can search for multiple IoT devices (such as smart TVs, smart refrigerators, etc.) in the same room through Bluetooth, obtain information of these devices, and then display them in the mobile communication terminal for the user to select and control. Specify the device.
  • Step S404 The mobile communication terminal receives the user's selection, determines the designated device, and sends a pairing request to the designated device, requesting to establish a pairing connection with the designated device.
  • the pairing request includes information of the mobile communication terminal.
  • the information of the mobile communication terminal comprises at least one of the following: a two-dimensional code of the mobile communication terminal, an identification of the mobile communication terminal, and an IP address of the mobile communication terminal.
  • Step S406 The mobile communication terminal receives the pairing response returned by the designated device and carries the information of the designated device, and establishes a pairing connection with the designated device according to the pairing response.
  • the information of the designated device comprises at least one of the following: a two-dimensional code of the specified device, an identifier of the designated device, and an IP address of the designated device.
  • Step S408 The mobile communication terminal acquires an HTML page corresponding to the designated device. For example, after establishing a pairing connection with the designated device, the mobile communication terminal sends an information acquisition command to the designated device through the pairing connection to request to acquire the control operation supported by the designated device; and further, according to the information of the supported control operations returned by the specified device. Generate an HTML page.
  • the mobile communication terminal stores the matching with one or more types of designated devices.
  • the HTML page after obtaining the information of the specified device, the mobile communication terminal determines the type of the specified device according to the information, and then selects the matching HTML page.
  • the mobile communication terminal sends the obtained information of the specified device to the server; the server determines the type of the specified device, and generates
  • the HTML page is sent to the mobile communication terminal, or the server returns an operation supported by the designated device of the type to the mobile communication terminal according to the type of the designated device, and the corresponding HTML page is generated by the mobile communication terminal.
  • the mobile communication terminal Taking a smart TV as an example, the mobile communication terminal generates a corresponding information according to the information returned by the smart TV.
  • the HTML page which can include a switch button control, a volume adjustment control, a channel adjustment control, a menu operation control, etc., through which the remote control of the smart TV can be realized.
  • Step S410 The mobile communication terminal receives a control operation instruction that the user performs a control operation on the designated device through the HTML page.
  • Step S412 The mobile communication terminal sends the control operation instruction to the designated device successfully paired by using the paired connection through the HTML page.
  • Step S414 The designated device receives a control operation instruction sent by the mobile communication terminal through the pairing connection, and performs a control operation indicated by the control operation instruction.
  • point-to-point device control is achieved. Only one mobile communication terminal can realize the control of a variety of designated devices, without special remote control or control software, which realizes compatible operation of multiple devices in the case of far away from the device, and improves the user experience.
  • the apparatus for performing device control is provided in the mobile communication terminal of the embodiment, and includes: a receiving module 502 configured to receive a control operation of the specified device by the user through the set HTML page. Controlling an operation instruction, wherein the HTML page is configured to provide an interface for the user to perform a control operation on the designated device through the mobile communication terminal, receive a control operation instruction generated by the user for the interface operation, and send a control operation instruction; the control module 504 is configured to pass The HTML page sends a control operation instruction to the designated device, causing the designated device to perform the control operation indicated by the control operation instruction.
  • control module 504 is configured to use a WebSocket connection to send a control operation instruction to the network control server through the HTML page, and the network control server uses the WebSocket connection to forward the control operation instruction to the designated device, so that the designated device according to the control operation instruction.
  • the control function indicated by the control operation instruction is implemented by calling the system API of the specified device through the NPAPI.
  • the designated device is installed with a browser and a browser extension with NPAPI, wherein the browser extension includes an NPAPI plug-in, the browser extension is used to implement WebSocket communication between the specified device and the network control server, and is invoked through the NPAPI plug-in. Specifies the system API of the device.
  • control module 504 causes the designated device to monitor and receive the network control through the HTML page of the browser extension program when the specified device performs the control operation indicated by the control operation instruction by using the system API of the specified device according to the control operation instruction.
  • the control operation instruction sent by the server; the HTML page of the browser extension program invokes an NPAPI function corresponding to the control operation indicated by the control operation instruction, and invokes the corresponding system API function through the NPAPI function to implement the control operation indicated by the control operation instruction .
  • the mobile communication terminal of this embodiment further includes: a selection module 506 configured to acquire at least one from the network control server before the receiving module 504 receives a control operation instruction that the user controls the specified device through the set HTML page.
  • a selection module 506 configured to acquire at least one from the network control server before the receiving module 504 receives a control operation instruction that the user controls the specified device through the set HTML page.
  • Information of the designated device to be controlled selecting a designated device to be controlled, and transmitting authentication information to the network control server, the authentication information is used to request authorization for the control operation of the selected designated device; and receiving the confirmation authorization information returned by the network control server.
  • the selecting module 506 is further configured to: after receiving the confirmation authorization information returned by the network control server, send a message acquisition command to the network control server by using a WebSocket connection, where the information acquisition command is used to obtain a control operation supported by the designated device;
  • the control server sends a message acquisition command to the specified device by using a WebSocket connection, so that the specified device obtains the information according to the information.
  • the command obtains the control operation supported by the specified device through the NPAPI function and returns it to the network control server, which is forwarded to the selection module by the network control server; the selection module displays the information in the HTML page according to the information of the control operation supported by the specified device returned by the network control server.
  • a control that corresponds to the control operations supported by the specified device.
  • the selecting module 506 acquires information of at least one designated device to be controlled from the network control server when acquiring information of the at least one specified device to be controlled from the network control server, where the information of the specified device includes at least one of the following: Specifying the QR code of the device, the identifier of the specified device, and the IP address of the specified device; the mobile communication terminal identifies and displays the designated device by specifying the information of the device; or the network control server identifies the designated device according to the information of the designated device to be controlled; The mobile communication terminal acquires information of the designated device identified by the network control server from the network control server.
  • the network control server is built using Node.js.
  • control module 504 is configured to send a control operation instruction to the designated device successfully paired with the mobile communication terminal through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
  • the mobile communication terminal of this embodiment further includes: a pairing module 508, configured to send a pairing request to the designated device before the receiving module 502 receives a control operation instruction that the user controls the specified device through the set HTML page, And requesting to establish a pairing connection with the specified device, where the pairing request includes information of the mobile communication terminal; receiving a pairing response returned by the specified device and carrying the information of the designated device, and establishing a pairing connection with the designated device according to the pairing response.
  • a pairing module 508 configured to send a pairing request to the designated device before the receiving module 502 receives a control operation instruction that the user controls the specified device through the set HTML page, And requesting to establish a pairing connection with the specified device, where the pairing request includes information of the mobile communication terminal; receiving a pairing response returned by the specified device and carrying the information of the designated device, and establishing a pairing connection with the designated device according to the pairing response.
  • the information of the mobile communication terminal comprises at least one of: a two-dimensional code of the mobile communication terminal, an identifier of the mobile communication terminal, an IP address of the mobile communication terminal; the information of the designated device includes at least one of the following: Code, the identifier of the specified device, and the IP address of the specified device.
  • the mobile communication terminal of this embodiment further includes: a building module 510 configured to construct a set HTML page before the receiving module 502 receives a control operation instruction that the user controls the specified device through the set HTML page.
  • the HTML page includes at least one of the following: a touchpad page, a shortcut operation page, and a selection terminal page, wherein the touchpad page is configured to receive information of a touch operation of the user on the touchpad page, and generate a control operation finger according to the information of the touch operation.
  • the shortcut operation page includes at least one of the following controls: a volume adjustment control, a device desktop display control, a device screen capture control, and a device shutdown control, and the shortcut operation page is used to receive the user in the shortcut operation page.
  • the information of the operation of the control generates a control operation instruction according to the information of the operation of the control to control the control operation indicated by the specified operation instruction by the designated device;
  • the terminal page is configured to display the information of the device to be controlled and the device to be controlled Control state, for the user to select the device to be controlled, the selection terminal page also includes an authorization password input control for the user to input an authorization password for control operation authentication.
  • the receiving module 502 is configured to monitor, by the set HTML page, a control operation performed by the user on the specified device through the HTML page, obtain information of the control operation through the DOM event of the HTML page, and generate a control operation instruction according to the information of the control operation.
  • the mobile communication terminal in this embodiment is used to implement the corresponding device control method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
  • the present invention also provides a computer readable recording medium having recorded thereon a program for executing the control method of any of the foregoing embodiments 1 to 4.
  • the computer readable recording medium includes any mechanism for storing or transmitting information in a computer readable form.
  • a machine-readable medium includes a read only memory (ROM), a random access memory (RAM), a magnetic disk storage medium, an optical storage medium, a flash storage medium, an electrical, optical, acoustic, or other form of propagated signal (eg, a carrier wave) , infrared signals, digital signals, etc.).
  • ROM read only memory
  • RAM random access memory
  • magnetic disk storage medium an optical storage medium
  • flash storage medium an electrical, optical, acoustic, or other form of propagated signal (eg, a carrier wave) , infrared signals, digital signals, etc.).
  • Various general purpose systems can also be used with the teaching based on the teachings herein. From the above description, it is apparent that the structure required to construct the system having the solution of the present invention is apparent. Moreover, the invention is not directed to any particular programming language. It will be appreciated that the teachings of the invention described herein may be implemented in a variety of programming languages, and that the description of the specific language above is for the purpose of
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further, they may be divided into a plurality of sub-modules or sub-units or sub-assemblies.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed may be employed. Or combine all the processes or units of the device.
  • Each feature disclosed in the specification (including the accompanying claims, the abstract, and the drawings) may be replaced by alternative features that provide the same, equivalent, or similar purpose, unless stated otherwise.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the device control scheme in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • the program can be stored on a computer readable medium or can be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Provided in the present invention are a device control method and a mobile communication terminal. The device control method comprises: the mobile communication terminal receives a control operation command of a user for performing a control operation on a designated device via a set HTML page, where the HTML page is for use in providing an interface for the user to perform the control operation on the designated device via the mobile communication terminal, receives the control operation command generated by the user by operating the interface, and transmits the control operation command; and the mobile communication device transmits the control operation command to the designated device via the HTML page, thus allowing the designated device to execute the control operation indicated by the control operation command. The effects of remote control of a device and enhanced user operating experience are achieved via the present invention.

Description

设备控制方法与移动通信终端  Device control method and mobile communication terminal
技术领域 Technical field
本发明涉及计算机技术领域,特别是涉及一种设备控制方法与移动通信 终端。 背景技术  The present invention relates to the field of computer technologies, and in particular, to a device control method and a mobile communication terminal. Background technique
随随着着互互联联网网的的发发展展,, 电电脑脑在在人人们们的的生生活活中中扮扮演演着着越越来来越越重重要要的的角角色色,, 人人 们们的的生生活活和和工工作作越越来来越越依依赖赖电电脑脑。。 为为了了对对电电脑脑进进行行控控制制,, 电电脑脑都都具具有有输输入入设设 备备,, 如如,, 一一种种常常用用输输入入设设备备是是键键盘盘和和鼠鼠标标,, 用用以以操操作作电电脑脑,, 其其中中,, 键键盘盘通通常常 用用作作信信息息的的输输入入,, 鼠鼠标标用用作作选选择择或或者者一一些些常常用用操操作作;; 另另一一种种常常用用输输入入设设备备是是 使使用用键键盘盘和和触触摸摸板板操操作作电电脑脑,, 多多用用于于便便携携式式电电脑脑,, 其其中中,, 键键盘盘通通常常用用作作信信息息 的的输输入入,, 触触摸摸板板用用作作选选择择或或者者一一些些常常用用操操作作。。  With the development and development of the Internet, the electric computer brain plays a role in the life and life of the people, playing the role of the more and more important role. The living and living of people and the work and work are becoming more and more dependent on the computer brain. . In order to carry out the control system for the computer brain, the computer brains all have equipment for input and output, for example, one type of equipment is often used for input and input equipment. The keyboard keyboard and the mouse mouse are used to operate the computer brain. Among them, the keyboard keyboard is usually used as the input and input of the information, and the mouse mouse is used. Used as a choice or a part of the operation is often used;; Another type of input and use equipment is often used to make the use of the keyboard and touch touch panel The operation of the computer brain, a lot of used for portable portable computer brain, among which, the key keyboard communication is usually used as input and input of information, touch touch The slabs are used as an alternative or some of the often used operations. .
然然而而,, 使使用用上上述述第第一一种种输输入入设设备备对对电电脑脑进进行行控控制制时时,, 键键盘盘和和鼠鼠标标都都是是物物 理理介介..质质,, 占占用用空空间间且且对对放放置置的的位位置置也也有有要要求求,, 而而且且只只能能近近距距离离操操作作电电脑脑;; 使使 用用上上述述第第二二种种输输入入设设备备对对电电脑脑进进行行控控制制时时,, 键键盘盘和和 摸摸板板都都是是内内置置于于电电腐腐 的的,, 只只能能近近距距离离搡搡作作电电脑脑,, 存存在在搡搡作作的的局局限限性性。。  However, when using the first type of input and input device described above to perform the control system for the computer brain, the key keyboard and the mouse mouse are both physical physics. Li Jie Jie.. Quality, the space occupied by the space and the placement of the position of the placement is also required, and only can be close to the distance from the operation An electric computer brain;; when using the second and second types of input and input devices described above for the control of the computer brain, the key keyboard and the touch panel are both internal The built-in electric corroof is only able to work as a computer brain near a close distance, and it exists in the limitations of the work. .
同同样样,,在在物物联联网网中中,,人人 nn通通常常需需要要使使用用专专用用的的控控制制器器来来控控制制物物联联网网设设备备、、 也也存存在在着着位位置置要要求求,, 只只能能近近距距离离进进行行操操作作。。  Similarly, in the Internet of Things, it is often necessary to use a dedicated control device to control the control of the Internet of Things. , , but also exist in the position of the location requirements, only can be close to the distance to go into the operation. .
可可见见,,使使用用现现有有的的输输入入设设--备备控控制制电电脑脑或或物物联联网网设设备备,,均均存存在在着着多多种种限限制制、、 尤尤其其无无法法实实现现用用户户在在较较远远距距离离对对电电脑脑或或物物联联网网设设 --备备进进行行控控制制,, 降降低低了了用用户户对对
Figure imgf000003_0001
发明内容
It can be seen that, the use of the existing input and input devices - the preparation of control and control of the power of the computer brain or the Internet of Things network equipment, all exist in a variety of species Restricted system, especially in particular, it is impossible to implement the current user control system in the remote computer network or the Internet of Things connection network at a relatively long distance. ,, the drop is lower, and the user is right.
Figure imgf000003_0001
Summary of the invention
鉴于上述现有的输入设备无法实现用户在较远距离对电脑或物联网设 备进行控制, 降低了周户对电腐或物联网设备的操作体验的问题, 提出了本 发明以便提供一种克服上述问题或者至少部分地解决上述问题的设备控制 方法与移动通信终端。  In view of the above problem that the existing input device cannot realize the control of the computer or the Internet of Things device at a long distance, and reduces the operating experience of the household on the electric rot or the Internet of Things device, the present invention has been proposed to provide an overcoming of the above. A device control method that solves the above problems or at least partially solves the problem with a mobile communication terminal.
依据本发明的一个方面, 提供了设备控制方法, 包括: 移动通信终端接 收用户通过设定的 HTML 页面对指定设备进行控制操作的控制操作指令, 其中, HTML页面用于提供用户通过移动通信终端对指定设备进行控制操作 的界面,接收用户对界面操作所产生的控制操作指令,并发送控制操作指令; 移动通信终端通过 HTML 页面将控制操作指令发送给指定设备, 使指定设 备执行控制操作指令所指示的控制操作。 According to an aspect of the present invention, a device control method is provided, including: a mobile communication terminal The control operation instruction for controlling the operation of the specified device by the set HTML page, wherein the HTML page is used to provide an interface for the user to control the specified device through the mobile communication terminal, and receive the control operation generated by the user on the interface operation. And transmitting a control operation instruction; the mobile communication terminal sends the control operation instruction to the designated device through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
根据本发明的另一方面, 提供了一种移动通信终端, 包括: 接收模块, 配置为接收用户通过设定的 HTML 页面对指定设备进行控制操作的控制操 作指令, 其中, HTML页面用于提供用户通过移动通信终端对指定设备进行 控制操作的界面, 接收用户对界面操作所产生的控制操作指令, 并发送控制 操作指令; 控制模块, 配置为通过 HTML 页面将控制操作指令发送给指定 设备, 使指定设备执行控制操作指令所指示的控制操作。  According to another aspect of the present invention, a mobile communication terminal is provided, including: a receiving module configured to receive a control operation instruction for a user to perform a control operation on a specified device through a set HTML page, where the HTML page is used to provide a user Receiving, by the mobile communication terminal, an operation operation command for the designated device, receiving a control operation instruction generated by the user for the interface operation, and transmitting a control operation instruction; and the control module is configured to send the control operation instruction to the designated device through the HTML page, so as to specify The device performs the control operations indicated by the control operation instructions.
根据本发明的再一方面,提供了一种在其上记录有用于执行上述设备控 制方法的程序的计算机可读记录介质。  According to still another aspect of the present invention, there is provided a computer readable recording medium having recorded thereon a program for executing the above device control method.
根据本发明的设备控制方案, 移动通信终端通过 HTML 页面接收用户 对指定设备的控制操作, 向指定设备发送控制操作指令, 使指定设备根据该 控制操作指令进行相应的控制操作。 HTML页面是被广泛应用和为几乎所有 操作系统支持的页面, 通过 HTML 页面实现移动通信终端对指定设备的操 作控制, 在移动通信终端侧和指定设备侧均无须专门的操作控制软件, 操作 方便、 实现简单、 兼容性好、 实现成本低。 通过本发明的方案, 在远距离即 可通过移动通信终端控制指定设备(如 PC或物联网设备) 的操作。 本发明 的移动通信终端可以取代传统的输入设备, 实现了远离设备的情况下便捷地 操作设备, 以及实时地监控设备, 对设备进行全面操控, 从而解决了现有的 输入设备无法实現用户在较远距离对电脑或物联网设备进.行控制, 降低了用 户对电脑或物联网设备的操作体验的问题, 达到了对设备的远距离操控, 提 升用户操作体验的效果。  According to the device control scheme of the present invention, the mobile communication terminal receives the user's control operation on the designated device through the HTML page, and sends a control operation instruction to the designated device, so that the designated device performs the corresponding control operation according to the control operation instruction. The HTML page is widely used and supported by almost all operating systems. The HTML page is used to control the operation of the specified device by the mobile communication terminal. No special operation control software is required on the mobile communication terminal side and the designated device side, and the operation is convenient. Simple implementation, good compatibility, and low implementation cost. With the solution of the present invention, the operation of a designated device such as a PC or an Internet of Things device can be controlled by a mobile communication terminal at a long distance. The mobile communication terminal of the invention can replace the traditional input device, realizes convenient operation of the device away from the device, and monitors the device in real time, and comprehensively controls the device, thereby solving the problem that the existing input device cannot realize the user Long-distance distance control of computers or IoT devices reduces the user's experience of operating the computer or IoT devices, achieves long-distance manipulation of the device, and enhances the user's operating experience.
上述说明仅是本发明技术方案的概述, 为了能够更清楚了解本发明的技 术手段, 而可依照说明书的内容予以实施, 并且为了让本发明的上述和其它 目的、 特征和优点能够更明显易懂, 以下特举本发明的具体实施方式。 附图说明 The above description is only an overview of the technical solutions of the present invention, and the technical means of the present invention can be more clearly understood, and can be implemented in accordance with the contents of the specification, and the above and other objects, features and advantages of the present invention can be more clearly understood. Specific embodiments of the invention are set forth below. DRAWINGS
通过阅读下文优选实施方式的佯细描述,各种其他的优点和益处对于本 领域普通技术人员将变得清楚明了。 附图仅用于示出优选实施方式的目的, 而并不认为是对本发明的限制。 而且在整个附图中, 用相同的参考符号表示 相同的部件。 在附图中:  Various other advantages and benefits will become apparent to those skilled in the art from a <RTIgt; The drawings are only for the purpose of illustrating the preferred embodiments and are not to be construed as limiting. Throughout the drawings, the same reference numerals are used to refer to the same parts. In the drawing:
图 1是根据本发明实施例一的一种设备控制方法的步骤流程图; 图 2是根据本发明实施例二的一种设备控制方法的步骤流程图; 图 3是根据本发明实施例三的一种设备控制方法的步骤流程图; 图 4是图 3所示实施例中的一种触摸板 HTML页面的界面示意图; 图 5是图 3所示实施例中的一种快捷操作 HTML页面的界面示意图; 图 6是图 3所示实施例中的一种选择终端 HTML页面的界面示意图; 图 7是根据本发明实施例四的一种设备控制方法的步骤流程图; 图 8是根据本发明实施例五的一种移动通信终端的结构框图。 具体实施方式 下面将参照附图更佯细地描述本公开的示例性实施例。 虽然附图中显示 了本公开的示例性实施例, 然而应当理解, 可以以各种形式实现本公开而不 应被这里阐述的实施例所限制。 相反, 提供这些实施例是为了能够更透彻地 理解本公开, 并且能够将本公开的范围完整的传达给本领域的技术人员。  1 is a flow chart of steps of a device control method according to a first embodiment of the present invention; FIG. 2 is a flow chart of steps of a device control method according to a second embodiment of the present invention; FIG. 4 is a schematic diagram of an interface of a touch panel HTML page in the embodiment shown in FIG. 3; FIG. 5 is an interface of a shortcut operation HTML page in the embodiment shown in FIG. FIG. 6 is a schematic diagram of an interface for selecting a terminal HTML page in the embodiment shown in FIG. 3. FIG. 7 is a flow chart of steps of a device control method according to Embodiment 4 of the present invention; FIG. 8 is a flowchart according to the present invention. A structural block diagram of a mobile communication terminal of Example 5. DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS Exemplary embodiments of the present disclosure will be described more closely below with reference to the accompanying drawings. While the exemplary embodiments of the present invention are shown in the drawings, it is understood that Rather, these embodiments are provided so that this disclosure will be more fully understood, and the scope of the disclosure can be fully conveyed to those skilled in the art.
实施例一  Embodiment 1
参照图 1 , 示出了根据本发明实施例一的一种设备控制方法的步骤流程 图。  Referring to Fig. 1, there is shown a flow chart of the steps of a device control method according to a first embodiment of the present invention.
本实施例的设备控制方法包括以下步骤:  The device control method of this embodiment includes the following steps:
步骤 S102: 移动通信终端接收用户通过设定的 HTML页面对指定设备 进行控制操作的控制操作指令。  Step S102: The mobile communication terminal receives a control operation instruction for the user to perform a control operation on the designated device through the set HTML page.
其中, HTML页面用于提供用户通过移动通信终端对指定设备进行控制 操作的界面, 接收用户对界面操作所产生的控制操作指令, 并发送控制操作 指令。 步骤 S104: 移动通信终端通过 HTML页面将控制操作指令发送给指定 设备, 使指定设备执行控制操作指令所指示的控制操作。 The HTML page is used to provide an interface for the user to perform control operations on the designated device through the mobile communication terminal, receive a control operation instruction generated by the user for the interface operation, and send a control operation instruction. Step S104: The mobile communication terminal sends a control operation instruction to the designated device through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
通过本实施例, 移动通信终端通过 HTML 页面接收用户对指定设备的 控制操作, 向指定设备发送控制操作指令, 使指定设备根据该控制操作指令 进行相应的控制操作。 HTML页面是被广泛应用和为几乎所有操作系统支持 的页面, 通过 HTML 页面实现移动通信终端对指定设备的操作控制, 在移 动通信终端侧和指定设备侧均无须专门的操作控制软件, 操作方便、 实现简 单、 兼容性好、 实现成本低。 通过本实施例的方案, 在远距离即可通过移动 通信终端控制指定设备(如 PC或物联网设备) 的操作。 本实施例的移动通 信终端可以取代传统的输入设备, 实现了远离设备的情况下便捷地操作设 备, 以及实时地监控设备, 对设备进行全面操控, 从而解决了现有的输入设. 备无法实现用户在较远距离对电腐或物联网设备进行控制 , 降低了用户对电 脑或物联网设备的操作体验的问题, 达到了对设备的远距离操控, 提升用户 操作体验的效果。  In this embodiment, the mobile communication terminal receives the control operation of the designated device by the user through the HTML page, and sends a control operation instruction to the designated device, so that the designated device performs a corresponding control operation according to the control operation instruction. The HTML page is widely used and supported by almost all operating systems. The HTML page is used to control the operation of the specified device by the mobile communication terminal. No special operation control software is required on the mobile communication terminal side and the designated device side, and the operation is convenient. Simple implementation, good compatibility, and low implementation cost. With the solution of this embodiment, the operation of a designated device (e.g., a PC or an Internet of Things device) can be controlled by a mobile communication terminal at a long distance. The mobile communication terminal of this embodiment can replace the traditional input device, realizes convenient operation of the device away from the device, and monitors the device in real time, and comprehensively controls the device, thereby solving the existing input device. The user controls the electric rot or the Internet of Things device at a long distance, which reduces the user's operation experience on the computer or the Internet of Things device, and achieves the long-distance manipulation of the device and improves the user experience.
实施例二  Embodiment 2
参照图 2, 示出了根据本发明实施例二的一种设备控制方法的步骤流程 图。  Referring to Figure 2, there is shown a flow chart of the steps of a device control method in accordance with a second embodiment of the present invention.
本实施例中, 使用网络控制服务器连接移动通信终端和指定设备, 移动 通信终端和网络控制服务器之间, 以及网络控制服务器与指定设备之间均建 立有 WebSocket连接。  In this embodiment, a network control server is used to connect the mobile communication terminal with the designated device, and the WebSocket connection is established between the mobile communication terminal and the network control server, and between the network control server and the designated device.
WebSocket协议是 HTML5—种新的协议, 它实现了浏览器与服务器全 双工通信。 WebSocket协议比较简单,设备和普通的浏览器一样通过 80端口 或者 443端口和服务器进行请求握手,服务器根据 HTTP HEADER识别是否 是一个 WebSocket请求, 如果是, 则将请求升级为一个 WebSocket连接, 握 手成功后就进入双向长连接的数据传输阶段。  The WebSocket protocol is HTML5, a new protocol that implements full-duplex communication between the browser and the server. The WebSocket protocol is relatively simple. The device and the normal browser use the port 80 or port 443 to perform a request handshake. The server identifies whether it is a WebSocket request according to the HTTP HEADER. If yes, the request is upgraded to a WebSocket connection. After the handshake is successful. It enters the data transfer phase of the two-way long connection.
当使用 WebSocket协议时,指定设备端可以设置 NPAPI。 NPAPK Netscape Plugin Application Programming Interface , 网景插件应用程序接口 )是用于在 浏览器中执行外部应用程序的通用接口。 网景插件中的每个插件声明自己支 持某一种或几种内容类型, 当浏览器遇到这种类型的内容时, 便在插件库寻 找一种能够解码的插件, 将这部分内容交由其解析, 并在网页对应的位置中 显示出来。 通过浏览器中的 NPAPI能够调用系统中相应的 API ( Application Programming Interface, 应用程序接口), 实现相应的功能, 如关机、 调节音 量、 控制鼠标操作等。 例如, 浏览器通过 NPAPI机制 (目前该机制已被应用 于 chromium、基于 Chromium开源项目开发的浏览器及 firefox等浏览器中), 向扩展程序网页中的 javascript 脚本提供了 SetCursorPos、 Shutdown , Snapshot, MouseDown, MouseUp、 KeyDown, KeyUp等接口函数, javascript 通过 websocket与服务端通信, 接受到控制命令后, 调用这些通过 NPAPI来 扩充的 javascript接口函数, 实现了控制光标位置, 模拟鼠标点击及键盘按 下, 电脑快照, 电脑关机等功能。 When using the WebSocket protocol, the specified device side can set NPAPI. The NPAPK Netscape Plugin Application Programming Interface is a generic interface for executing external applications in a browser. Each plugin in the Netscape plugin declares itself Holding one or several content types, when the browser encounters this type of content, it looks for a plugin that can be decoded in the plugin library, and distributes the content to it, and in the corresponding position of the webpage. display. Through the NPAPI in the browser, the corresponding API (Application Programming Interface) in the system can be called to implement corresponding functions, such as shutting down, adjusting the volume, controlling the mouse operation and the like. For example, the browser provides SetCursorPos, Shutdown, Snapshot, MouseDown to the javascript script in the extension web page through the NPAPI mechanism (currently the mechanism has been applied to Chrome, browsers based on Chromium open source projects and browsers such as Firefox). , MouseUp, KeyDown, KeyUp and other interface functions, javascript communicate with the server through websocket, after receiving the control command, call these javascript interface functions extended by NPAPI, realize the control cursor position, simulate mouse click and keyboard press, computer Snapshot, computer shutdown and other functions.
基于上述设置, 本实施例的设备控制方法包括以下步骤:  Based on the above settings, the device control method of this embodiment includes the following steps:
步骤 S202: 移动通信终端从网络控制服务器获取至少一个待控制的指 定设备的信息。  Step S202: The mobile communication terminal acquires information of at least one designated device to be controlled from the network control server.
网络控制服务器中可以预先存储有一个或多个待控制的指定设备的信 息,在收到移动通信终端的请求时将这些待控制的指定设备的信息发送给移 动通信终端; 网络控制服务器也可以在收到移动通信终端的请求时, 再向其 所连接的指定设备发送信息, 获取一个或多个待控制的指定设备的信息, 然 后返回给移动通信终端。  The network control server may pre-store information of one or more designated devices to be controlled, and send information of the designated devices to be controlled to the mobile communication terminal upon receiving the request of the mobile communication terminal; the network control server may also be Upon receiving the request from the mobile communication terminal, the information is transmitted to the designated device to which it is connected, and information of one or more designated devices to be controlled is acquired, and then returned to the mobile communication terminal.
本实施例中,移动通信终端通过 WebSocket连接向网络控制服务器发送 请求,并通过 WebSocket连接从网络控制服务器获取至少一个待控制的指定 设备的信息。 也即, 移动通信终端和网络控制服务器之间的通信遵循 WebSocket协议。 同样, 网络控制服务器和指定设备之间也存在 WebSocket 连接, 二者之间也遵循 WebSocket协议进行通信。  In this embodiment, the mobile communication terminal sends a request to the network control server through the WebSocket connection, and acquires information of at least one designated device to be controlled from the network control server through the WebSocket connection. That is, the communication between the mobile communication terminal and the network control server follows the WebSocket protocol. Similarly, there is a WebSocket connection between the network control server and the specified device, and the two also follow the WebSocket protocol for communication.
优选地,移动通信终端从网络控制服务器获取至少一个待控制的指定设 备的信息时, 指定设备的信息包括以下至少之一: 指定设备的二维码、 指定 设备的标识、 指定设备的 IP地址; 移动通信终端通过指定设备的信息识别 并显示指定设备。 或者, 网络控制服务器根据待控制的指定设备的信息, 识 别指定设备, 该指定设备的信息包括以下至少之一: 指定设备的二维码、 指 定设备的标识、 指定设备的 IP地址; 移动通信终端从网络控制服务器处获 取网络控制服务器识别出的指定设备的信息。 Preferably, when the mobile communication terminal acquires information of the at least one designated device to be controlled from the network control server, the information of the specified device includes at least one of the following: a two-dimensional code of the specified device, an identifier of the designated device, and an IP address of the designated device; The mobile communication terminal recognizes and displays the designated device by specifying the information of the device. Or, the network control server knows according to the information of the designated device to be controlled The device does not specify a device, and the information of the specified device includes at least one of the following: a two-dimensional code of the specified device, an identifier of the designated device, and an IP address of the designated device; the mobile communication terminal acquires the specified device identified by the network control server from the network control server. Information.
步骤 S204: 移动通信终端根据用户输入选择一个待控制的指定设备, 并向网络控制服务器发送认证信息。  Step S204: The mobile communication terminal selects a designated device to be controlled according to the user input, and sends the authentication information to the network control server.
其中, 认证信息用于请求对选择的指定设备进行控制操作授权。  The authentication information is used to request authorization for the control operation of the selected designated device.
步骤 S206: 移动通信终端接收网络控制服务器返回的确认授权信息。 通过授权认证, 能确保移动通信终端对设备操作控制的安全性。  Step S206: The mobile communication terminal receives the confirmation authorization information returned by the network control server. By authorizing the authentication, it is possible to ensure the security of the operation control of the device by the mobile communication terminal.
步骤 S208: 移动通信终端获取选择的指定设备的 HTML页面。  Step S208: The mobile communication terminal acquires an HTML page of the selected designated device.
移动通信终端获取选择的指定设备的 HTML页面可以通过多种方式。 例如,移动通信终端使用 WebSocket连接向网络控制服务器发送信息获 取命令, 其中, 信息获取命令用于获取指定设备支持的控制操作; 网络控制 服务器使用 WebSocket连接将信息获取命令发送至指定设备,使指定设备根 据信息获取命令,通过 NPAPI函数获取指定设备支持的控制操作并返回给网 络控制服务器, 由网络控制服务器转发给移动通信终端; 移动通信终端根据 网络控制服务器返回的指定设备支持的控制操作的信息, 在 HTML 页面中 显示与指定设备支持的控制操作相对应的控件, 最终生成与指定设备相对应 的 HTML页面。  The mobile communication terminal can obtain the HTML page of the selected specified device in a variety of ways. For example, the mobile communication terminal sends a message acquisition command to the network control server by using a WebSocket connection, where the information acquisition command is used to obtain a control operation supported by the specified device; the network control server uses the WebSocket connection to send the information acquisition command to the designated device, so that the specified device Obtaining, by the NPAPI function, the control operation supported by the specified device and returning to the network control server, and forwarding the information to the mobile communication terminal by the network control server according to the information acquisition command; the mobile communication terminal according to the control operation information supported by the specified device returned by the network control server, The controls corresponding to the control operations supported by the specified device are displayed in the HTML page, and finally the HTML page corresponding to the specified device is generated.
再例如,移动通信终端使用 WebSocket连接向网络控制服务器发送信息 获取命令, 其中, 信息获取命令用于获取指定设备支持的控制操作; 网络控 制服务器使用 WebSocket连接将信息获取命令发送至指定设备,使指定设备 根据信息获取命令,通过 NPAPI函数获取指定设备支持的控制操作并返回给 网络控制服务器; 网络控制服务器根据指定设备支持的控制操作的信息, 生 成相应的 HTML页面并返回给移动通信终端。  For another example, the mobile communication terminal sends a message acquisition command to the network control server by using a WebSocket connection, where the information acquisition command is used to obtain a control operation supported by the specified device; the network control server sends the information acquisition command to the designated device by using a WebSocket connection, so that the specified The device obtains the control operation supported by the specified device through the NPAPI function and returns it to the network control server according to the information acquisition command. The network control server generates a corresponding HTML page according to the information of the control operation supported by the specified device, and returns the corresponding HTML page to the mobile communication terminal.
又例如, 移动通信终端事先构建有设定的 HTML 页面, 这些事先构建 的 HTML 页面包括以下至少之一: 触摸板页面、 快捷操作页面和选择终端 页面, 其中, 触摸板页面用于接收用户在触摸板页面的触摸操作的信息, 根 据触摸操作的信息生成控制操作指令, 以控制指定设备的光标操作; 快捷操 作页面包括以下控制至少之一: 音量调节控件、 设备桌面显示控件、 设备截 屏控件和设备关机控件, 快捷操作页面用于接收用户对快捷操作页面中的控 件的操作的信息, 根据控件的操作的信息生成控制操作指令, 以控制指定设 备进行控制操作指令所指示的控制操作; 选择终端页面用于显示待控制的设 备的信息和待控制的设备的受控状态, 以供用户选择待控制的设备, 选择终 端页面还包括授权密码输入控件, 以供用户输入授权密码进行控制操作认 证。 当移动通信终端获得指定设备的授权后, 移动通信终端即相应地显示全 部或部分上述事先构建的 HTML 页面, 供用户操作。 需要说明的是, 在实 际应用中, 本领域技术人员可以根据实际需要构建上述 HTML 页面中的一 个或多个, 或者将上述 HTML页面中的一个或多个集成于一个 HTML页面 中, 使用 HTML页面可以实现对指定设备的操作功能, 且灵活易扩展。 For another example, the mobile communication terminal is pre-built with set HTML pages, and the pre-built HTML pages include at least one of the following: a touchpad page, a shortcut operation page, and a selection terminal page, wherein the touchpad page is used to receive the user's touch The information of the touch operation of the board page generates a control operation instruction according to the information of the touch operation to control the cursor operation of the designated device; The page includes at least one of the following controls: a volume adjustment control, a device desktop display control, a device screen capture control, and a device shutdown control, and the shortcut operation page is configured to receive information about a user's operation on the control in the shortcut operation page, according to the operation of the control The information generation control operation instruction controls the designated device to perform the control operation indicated by the control operation instruction; the selection terminal page is used to display the information of the device to be controlled and the controlled state of the device to be controlled, so that the user selects the device to be controlled The Select Terminal page also includes an authorization password input control for the user to input an authorization password for control operation authentication. After the mobile communication terminal obtains the authorization of the designated device, the mobile communication terminal displays all or part of the above-prepared HTML pages in advance for the user to operate. It should be noted that, in practical applications, a person skilled in the art may construct one or more of the above HTML pages according to actual needs, or integrate one or more of the above HTML pages into one HTML page, and use an HTML page. It can realize the operation function of the specified device, and it is flexible and easy to expand.
步骤 S210: 移动通信终端接收用户通过设定的 HTML页面对指定设备 进行控制操作的控制操作指令。  Step S210: The mobile communication terminal receives a control operation instruction for the user to perform a control operation on the designated device through the set HTML page.
本实施例中 , 移动通信终端中的 HTML页面监听用户通过该 HTML页 面对指定设备进行的控制操作 , 通过 HTML页面的 DOM ( Document Object Model, 文档对象模型)事件获取控制操作的信息, 根据控制操作的信息生 成控制操作指令。  In this embodiment, the HTML page in the mobile communication terminal listens to the control operation performed by the user on the specified device through the HTML page, and obtains the information of the control operation through the DOM (Document Object Model) event of the HTML page, according to the control operation. The information generates control operations instructions.
DOM是 W3C组织推荐的处理标记语言的标准编程接口 ,它是一种与平 台和语言无关的应用程序接口, 可以动态地访问程序和脚本, 更新其内容、 结构和 www文档的风格。 事件处理是 DOM中最重要的组成部分, 完善的 事件机制使得程序如 JavaScript程序可以根据特定的事件来触发不同执行方 法,使得程序可以更具有交互性和智能化。如,通过 touchstart事件、 touchmove 事件、 touchend事件即可获取 HTML页面上的鼠标移动数据。  The DOM is the standard programming interface for W3C organizations that handles markup languages. It is a platform- and language-independent application interface that dynamically accesses programs and scripts, updating their content, structure, and style of www documents. Event processing is the most important part of the DOM. The sophisticated event mechanism allows programs such as JavaScript programs to trigger different execution methods based on specific events, making the program more interactive and intelligent. For example, the mouse movement data on the HTML page can be obtained through the touchstart event, the touchmove event, and the touchend event.
步骤 S212: 移动通信终端使用 WebSocket连接, 通过 HTML页面将控 制操作指令发送给网络控制服务器。  Step S212: The mobile communication terminal uses a WebSocket connection to send a control operation instruction to the network control server through the HTML page.
其中, 网络控制服务器可以使用 Node.js搭建。 Node.js是一套用来编写 高性能网络服务器的 JavaScript工具包, 具有单线程、 非阻塞 10、 事件驱动 等等诸多优势。 当然, 不限于此, 网络控制服务器也可以使用其它适当方式 搭建,如搭建成 Apache(阿帕奇)服务器等。网络控制服务器通过 WebSocket 协议, 在移动通信终端和移动通信终端控制的指定设备之间建立起连接。 Among them, the network control server can be built using Node.js. Node.js is a set of JavaScript toolkits for writing high-performance web servers with single-threaded, non-blocking 10, event-driven, and many more. Of course, not limited to this, the network control server can also use other suitable methods. Build, such as building an Apache (Apache) server. The network control server establishes a connection between the mobile communication terminal and the designated device controlled by the mobile communication terminal through the WebSocket protocol.
步骤 S214: 网络控制服务器使用 WebSocket连接将控制操作指令转发 至指定设备。  Step S214: The network control server forwards the control operation instruction to the designated device by using a WebSocket connection.
步骤 S216: 指定设备接收控制操作指令, 根据该控制操作指令, 通过 NPAPI调用指定设备的系统 API实现控制操作指令所指示的控制操作。  Step S216: The designated device receives the control operation instruction, and according to the control operation instruction, invokes the system API of the specified device through the NPAPI to implement the control operation indicated by the control operation instruction.
优选地, 本实施例的指定设备中安装有具有 NPAPI机制的浏览器和浏 览器扩展程序。 其中, 浏览器扩展程序包括有 NPAPI插件 (即一个 DLL文 件 ), 浏览器扩展程序用于实现指定设备与网络控制服务器的 WebSocket通 信, 以及通过 NPAPI插件调用指定设备的系统 API。  Preferably, a browser and a browser extension having an NPAPI mechanism are installed in the designated device of the embodiment. Among them, the browser extension includes an NPAPI plug-in (ie, a DLL file), the browser extension is used to implement WebSocket communication between the specified device and the network control server, and the system API of the specified device is invoked through the NPAPI plug-in.
指定设备通过浏览器扩展程序的 HTML 页面监听并接收网络控制服务 器发送的控制操作指令; 进而, 浏览器扩展程序的 HTML 页面调用与控制 操作指令指示的控制操作相对应的 NPAPI函数, 并通过 NPAPI函数调用相 对应的系统 API函数, 实现控制操作指令所指示的控制操作。 例如, 当控制 操作指令指示的控制操作为光标移动操作时, 则指定设备的浏览器扩展程序 的 HTML页面调用的 NPAPI函数为 SetCursorPos , 该 NPAPI函数调用系统 的 mouse— event函数, 实现光标的移动。  The specified device listens to and receives the control operation instruction sent by the network control server through the HTML page of the browser extension; further, the HTML page of the browser extension calls the NPAPI function corresponding to the control operation indicated by the control operation instruction, and passes the NPAPI function. The corresponding system API function is called to implement the control operation indicated by the control operation instruction. For example, when the control operation indicated by the control operation instruction is a cursor movement operation, the NPAPI function called by the HTML page of the browser extension of the specified device is SetCursorPos, and the NPAPI function calls the mouse-event function of the system to realize the movement of the cursor.
通过本实施例,实现了移动通信终端作为遥控器的功能,如手机遥控器, 该移动通信终端遥控器通过 WebSocket的双向通信完机制完成移动通信终端 如手机与指定设备如电脑的通信, 通过 NPAPI 的插件机制调用系统的 API 执行用户命令, 从而实现了在用户完全脱离传统的输入设备的情况下, 对指 定设备的全面操控。  Through the embodiment, the function of the mobile communication terminal as a remote controller is realized, such as a mobile phone remote controller, and the mobile communication terminal remote controller completes communication between the mobile communication terminal, such as a mobile phone and a designated device such as a computer, through a two-way communication mechanism of WebSocket, through NPAPI. The plugin mechanism invokes the system's API to execute user commands, thereby enabling full control of the specified device in the event that the user is completely detached from the traditional input device.
实施例三  Embodiment 3
参照图 3, 示出了根据本发明实施例三的一种设备控制方法的步骤流程 图。  Referring to Fig. 3, there is shown a flow chart of the steps of a device control method according to a third embodiment of the present invention.
本实施例以移动通信终端为手机, 指定设备为个人电脑为实例, 通过用 户在移动通信终端的触摸板页面进行触摸移动操作以控制指定设备的光标 操作为例, 对本发明的设备控制方法作以说明。 本实施例的设备控制方法包括以下步骤: In this embodiment, the mobile communication terminal is a mobile phone, and the designated device is a personal computer as an example. The user controls the device control method of the present invention by performing a touch movement operation on the touch panel page of the mobile communication terminal to control the cursor operation of the designated device. Description. The device control method of this embodiment includes the following steps:
步骤 S302: 搭建网络控制服务器。  Step S302: Set up a network control server.
本实施例中, 用 Node.js搭建网络控制服务器。 Node.js作为一个新兴 的后台语言,具有很多优势,如: RESTfol APL单线程、非阻塞 10、 Google V8、 事件驱动等。  In this embodiment, a network control server is built by using Node.js. As an emerging back-end language, Node.js has many advantages, such as: RESTfol APL single-threaded, non-blocking 10, Google V8, event-driven, and more.
网络控制服务器的搭建包括:  The construction of the network control server includes:
第一步: 安装 Cygwin; 然后, 下载并安装 Node.js。  Step 1: Install Cygwin; then, download and install Node.js.
第二步: 用 socket.io.js实现 WebSocket通信。  Step 2: Implement WebSocket communication with socket.io.js.
socket.io.js是一个利用 HTML5草案中的 WebSocket规范编程, 实现了 浏览器与服务器端的双向通信的 js库文件, 提供了如发送消息 (socket.emit ( ) )、 接收信息 (socket.on ( ) )、 广播信息 (socket.broadcast.emit ( ) ) 等 APL  Socket.io.js is a js library file that uses the WebSocket specification in the HTML5 draft to implement two-way communication between the browser and the server. It provides functions such as sending a message (socket.emit ( )) and receiving information (socket.on ( ) ), broadcast information (socket.broadcast.emit ( )), etc. APL
第三步: 实现移动通信终端的授权和认证。  The third step: realize the authorization and authentication of the mobile communication terminal.
实现方式: 指定设备将受控密码发送到网络控制服务器, 网络控制服务 器备份受控密码, 当控制端即移动通信终端要想控制某一个指定设备时, 需 要输入受控密码并发送到网络控制服务器进行验证, 如果密码输入正确, 则 获得控制权。  Implementation mode: The designated device sends the controlled password to the network control server, and the network control server backs up the controlled password. When the control terminal, that is, the mobile communication terminal wants to control a specified device, it needs to input the controlled password and send it to the network control server. Verify that if the password is entered correctly, control is obtained.
第四步: 网络控制服务器获取指定设备、 控制端即移动通信终端的命令 并实现中转。  Step 4: The network control server acquires the command of the designated device, the control terminal, that is, the mobile communication terminal, and implements the transfer.
该步骤的获取与中转都是通过 WebSocket通信完成。  The acquisition and transit of this step are completed through WebSocket communication.
步骤 S304: 在移动通信终端构建 HTML页面, 用于供用户对指定设备 进行控制操作, 发送根据控制操作生成的控制操作指令。  Step S304: Construct an HTML page in the mobile communication terminal, configured to perform a control operation on the designated device by the user, and send a control operation instruction generated according to the control operation.
本实施例中, 构建的 HTML 页面包括触摸板页面、 快捷操作页面和选 择终端页面。  In this embodiment, the constructed HTML page includes a touch panel page, a shortcut operation page, and a selection terminal page.
触摸板页面的界面如图 4所示,触摸板页面用于接收用户在触摸板页面 的触摸操作的信息, 根据触摸操作的信息生成控制操作指令, 以控制设备的 光标操作。 通过拖动触摸板页面的触摸点(如图 4中的白点)并计算其拖动 的距离 (单位可以是像素)来控制指定设备光标的移动。 距离换算的方式为 等距换算, 即触摸点在移动通信终端如手机的触摸板页面上拖动多少距离, 电脑上的光标就移动多少距离。 实现时, 控制端即移动通信终端通过 HTML 页面的 DOM事件(包括 touchstart, touchmove, touchend等)获取触摸点 的移动信息或点击事件, 然后用 socket.emit ( )方法将相应的数据发送到网 络控制服务器, 网络控制服务器通过 socket.on ( )监听控制端即移动通信终 端发来的数据并用 socket.broadcast.emit ( )方法将数据发给指定设备, 指定 设备的浏览器扩展程序通过 socket.on ( )监听网络控制服务器发来的数据, 并通过 NPAPI插件 (浏览器扩展程序的一个 DLL )调用相关的系统 API (如: mouse— event , keybd— event , OpenProcessToken , LookupPrivilege Value , AdjustTokenPrivileges , ExitWindowsEx )执行相关的操作动作。 此夕卜, 距离 换算的方式也可以为其它适当方式, 如等比换算。 The interface of the touchpad page is as shown in FIG. 4. The touchpad page is used to receive information of a touch operation of the user on the touchpad page, and generates a control operation instruction according to the information of the touch operation to control the cursor operation of the device. Control the movement of the specified device cursor by dragging the touch point of the touchpad page (such as the white point in Figure 4) and calculating the distance it can be dragged (the unit can be a pixel). The distance conversion method is Isometric conversion, that is, how much distance the touch point drags on the touch panel page of the mobile communication terminal such as the mobile phone, and how much distance the cursor on the computer moves. When implemented, the control terminal, that is, the mobile communication terminal acquires the movement information or the click event of the touch point through the DOM event of the HTML page (including touchstart, touchmove, touchend, etc.), and then sends the corresponding data to the network control by using the socket.emit ( ) method. The server, the network control server listens to the control terminal, that is, the data sent by the mobile communication terminal through the socket.on ( ) and sends the data to the specified device by using the socket.broadcast.emit ( ) method, and the browser extension of the specified device passes the socket.on ( Listening to the data sent by the network control server, and calling the relevant system APIs (such as: mouse_ event , keybd_ event , OpenProcessToken , LookupPrivilege Value , AdjustTokenPrivileges , ExitWindowsEx ) through the NPAPI plugin (a DLL of the browser extension) Operational actions. Furthermore, the distance conversion method can also be other suitable methods, such as proportional conversion.
快捷操作页面如图 5所示,用于接收用户对快捷操作页面中的控件的操 作的信息, 根据控件的操作的信息生成控制操作指令, 以控制设备进行控制 操作指令所指示的控制操作。 本实施例中, 快捷操作页面中以按钮形式设置 的控件包括: 音量调节控件、 设备桌面显示控件、 设备截屏控件和设备关机 控件, 也即, 通过该页面对设备进行的快捷操作包括: 调节音量、显示桌面、 截屏和关机等。 实现时, 控制端即移动通信终端的快捷操作 HTML 页面监 听各个按钮的点击事件, 然后将相应的信息发送到网络控制服务器, 网络控 制服务器再将数据发送到指定设备,指定设备获取到数据后根据数据的类型 通过 NPAPI插件机制调用相应的系统 API完成相应的操作。  The shortcut operation page is shown in FIG. 5, and is configured to receive information about the operation of the user on the shortcut operation page, and generate a control operation instruction according to the operation information of the control to control the device to perform the control operation indicated by the control operation instruction. In this embodiment, the shortcuts in the shortcut operation page are: a volume adjustment control, a device desktop display control, a device screen capture control, and a device shutdown control, that is, the shortcut operations performed on the device through the page include: adjusting the volume , display desktop, screen capture and shutdown. When implemented, the control terminal, that is, the shortcut operation of the mobile communication terminal, listens to the click event of each button, and then sends the corresponding information to the network control server, and the network control server sends the data to the designated device, and the specified device obtains the data according to the The type of data is invoked by the NPAPI plugin mechanism to call the corresponding system API.
此外, 本实施例的快捷操作页面中还设置了选择终端按钮控件, 当点击 该按钮时, 显示选择终端页面, 如图 6所示。  In addition, the shortcut button of the embodiment is further provided with a selection terminal button control, and when the button is clicked, the selection terminal page is displayed, as shown in FIG. 6.
选择终端页面的界面如图 6所示,用于显示待控制的指定设备的信息和 待控制的指定设备的受控状态, 以供用户选择待控制的指定设备; 此外, 选 择终端页面还可以包括授权密码输入控件, 以供用户输入授权密码进行控制 操作认证。选择终端页面显示从网络控制服务器获取的指定设备列表及指定 设备的受控状态,用户在输入授权密码并经网络控制服务器验证后即可获得 所选择的指定设备的控制权。 实现时, 指定设备将本机的信息(例如, 计算 机名、 IP地址、 受控密码等)发送到网络控制服务器, 网络控制服务器可以 将相关信息(除受控密码以外的信息)发送到控制端即移动通信终端, 控制 端即移动通信终端选择指定设备(如根据 IP地址或者计算机名选择)并输 入受控密码并发送到网络控制服务器验证, 密码正确以后网络控制服务器返 回成功的信息, 至此控制端即移动通信终端获得控制权限, 接下来控制端即 移动通信终端就可以控制指定设备了。 The interface of the terminal page is displayed as shown in FIG. 6 , and is used for displaying the information of the designated device to be controlled and the controlled state of the specified device to be controlled, so that the user selects the designated device to be controlled; The authorization password input control is used for the user to input an authorization password for control operation authentication. The Select Terminal page displays the specified device list obtained from the network control server and the controlled state of the specified device. After inputting the authorization password and verifying by the network control server, the user can obtain the control right of the selected designated device. When implemented, the specified device will have local information (for example, calculations) The machine name, IP address, controlled password, etc. are sent to the network control server, and the network control server can send related information (in addition to the controlled password) to the control terminal, that is, the mobile communication terminal, and the control terminal, that is, the mobile communication terminal selects and specifies The device (such as according to the IP address or computer name) and input the controlled password and send it to the network control server for verification. After the password is correct, the network control server returns the successful information, and the control terminal, that is, the mobile communication terminal obtains the control authority, and then the control terminal That is, the mobile communication terminal can control the designated device.
步骤 S306: 设置指定设备。  Step S306: Setting a specified device.
指定设备具有 NPAPI机制的浏览器和浏览器扩展程序, 浏览器扩展程 序也即指定设备需要依赖一个浏览器的扩展程序 (.crx, .xpi文件)。 扩展程 序的 background页面是一个 HTML页面, 用于完成与网络控制服务器的通 信, 扩展程序的 NPAPI插件是一个 DLL, 完成系统 API的调用。  Specifies that the device has a browser and browser extension with NPAPI mechanism, and the browser extension program specifies that the device needs to rely on a browser extension (.crx, .xpi file). The background page of the extension program is an HTML page for communication with the network control server. The extension's NPAPI plugin is a DLL that completes the system API call.
当控制端即移动通信终端的 HTML页面将控制操作指令通过 WebSocket 发送到网络控制服务器, 网络控制服务器用 WebSocket将控制操作指令发送 到指定设备, 使指定设备接受控制端即移动通信终端的指令进行操作。  When the control terminal, that is, the HTML page of the mobile communication terminal sends the control operation instruction to the network control server through the WebSocket, the network control server sends the control operation instruction to the designated device by using the WebSocket, so that the designated device accepts the instruction of the control terminal, that is, the mobile communication terminal. .
指定设备浏览器扩展程序的后台页面获取网络控制服务器发来的控制 操作指令后, 解析指令并调用 NPAPI的相关函数, 再由 NPAPI的函数调用 系 统的 API ( 如 mouse— event , keybd— event , OpenProcessToken , LookupPrivilege Value , AdjustTokenPrivileges , ExitWindowsEx等)完成鼠标 点击、 移动光标、 关机等等事件。 这是因为, 浏览器扩展程序是不能直接调 用系统 API的, 但是可以调用 NPAPI插件的导出函数, NPAPI插件是一个 DLL, 可以直接调用系统 API, 从而实现指定设备通过 NPAPI调用系统的 API执行接受到的命令。  After specifying the control operation command sent by the network control server, the background page of the specified device browser extension parses the instruction and calls the related function of NPAPI, and then calls the system API (such as mouse_event, keybd_event, OpenProcessToken) by the NPAPI function. , LookupPrivilege Value, AdjustTokenPrivileges, ExitWindowsEx, etc.) Complete mouse clicks, move cursors, turn off events, and more. This is because the browser extension cannot directly call the system API, but can call the export function of the NPAPI plugin. The NPAPI plugin is a DLL that can directly call the system API, so that the specified device can receive the API through the NPAPI call system. The command.
需要说明的是, 上述步骤 S302、 S304、 S306之间的执行可以不分先后 顺序。  It should be noted that the execution between the foregoing steps S302, S304, and S306 may be performed in no particular order.
在移动通信终端、 网络控制服务器和指定设备完成了上述相应设置后, 即可开始移动通信终端对指定设备的操作控制了, 包括:  After the mobile communication terminal, the network control server, and the designated device complete the foregoing corresponding settings, the mobile communication terminal can start the operation control of the designated device, including:
步骤 S308: 移动通信终端获取指定设备 ( PC ) 列表。  Step S308: The mobile communication terminal acquires a list of designated devices (PCs).
指定设备将本机的信息(如计算机名、 IP地址、 受控密码等)发送到网 络控制服务器, 网络控制服务器将指定设备的相关信息(除受控密码以外的 信息)发送到控制端即移动通信终端。 The specified device sends the information of the machine (such as computer name, IP address, controlled password, etc.) to the network. The network control server sends the related information of the specified device (in addition to the controlled password) to the control terminal, that is, the mobile communication terminal.
步骤 S310: 移动通信终端选择指定设备(PC )并进行授权认证。  Step S310: The mobile communication terminal selects a designated device (PC) and performs authorization authentication.
指定设备将受控密码发送到网络控制服务器,控制端即移动通信终端在 The designated device sends the controlled password to the network control server, and the control terminal is the mobile communication terminal.
HTML页面的授权密码输入控件如 input控件中输入密码并发送到网络控制 服务器进行验证, 如果输入的密码正确则获得授权。 The authorization password input control of the HTML page, such as the input control, enters a password and sends it to the network control server for verification. If the entered password is correct, it is authorized.
步骤 S312: 移动通信终端通过触摸板页面的触摸区域移动光标, 生成 控制操作指令。  Step S312: The mobile communication terminal moves the cursor through the touch area of the touch panel page to generate a control operation instruction.
当用户在触摸板页面的触摸区域拖动触摸点, 以移动光标时, 触摸板页 面的 DOM事件获取触摸点的移动信息及点击事件,进而生成控制操作指令。  When the user drags the touch point in the touch area of the touch panel page to move the cursor, the DOM event of the touch panel page acquires the movement information and the click event of the touch point, thereby generating a control operation instruction.
同样, 当用户通过快捷操作页面的按钮发起操作命令(如调节音量、 显 示桌面、截屏和关机等)时, 快捷操作页面的 DOM事件获取按钮点击信息, 进而生成控制操作指令。  Similarly, when the user initiates an operation command (such as adjusting the volume, displaying the desktop, taking a screenshot, and shutting down) through the button of the shortcut operation page, the DOM event of the shortcut operation page acquires the button click information, thereby generating a control operation instruction.
步骤 S314: 移动通信终端使用 WebSocket连接与网络控制服务器通信, 通过触摸板页面将控制操作指令发送给网络控制服务器。  Step S314: The mobile communication terminal communicates with the network control server by using a WebSocket connection, and sends a control operation instruction to the network control server through the touchpad page.
步骤 S316: 网络控制服务器使用 WebSocket连接与指定设备通信, 将 控制操作指令发送给指定设备。  Step S316: The network control server communicates with the designated device by using a WebSocket connection, and sends a control operation instruction to the designated device.
步骤 S318: 指定设备通过浏览器扩展程序的后台页面获取网络控制服 务器发送的控制操作指令, 调用相关 NPAPI函数。  Step S318: The specified device obtains a control operation instruction sent by the network control server through a background page of the browser extension program, and invokes a related NPAPI function.
例如, 当控制操作指令指示光标操作时, 设备调用 NPAPI 函数 SetCursorPos。  For example, when a control operation instruction indicates a cursor operation, the device calls the NPAPI function SetCursorPos.
步骤 S320: 指定设备通过 NPAPI函数调用系统的 API函数, 执行控制 操作指令指示的控制操作。  Step S320: The designated device invokes the API function of the system through the NPAPI function, and performs a control operation indicated by the control operation instruction.
如,调用与步骤 S318中的 NPAPI函数相对应的 API函数 mouse— event, 以实现指定设备的光标操作。  For example, the API function mouse_ event corresponding to the NPAPI function in step S318 is called to implement the cursor operation of the specified device.
本实施例以指定设备的光标控制操作为例,对本发明的设备控制方法进 行了说明。 但本领域技术人员应当明了, 其它控制操作如音量控制、 关机操 作等均可参照本实施例进行。 通过本实施例, 实现了移动通信终端如手机取 代传统的键盘、 触摸板和鼠标等电脑输入设备, 在远离电脑的情况下便捷地 操作电脑, 以及实时地监控电脑的功能。 本实施例利用新的 Web标准及移 动通信终端如手机随身携带的特性,将移动通信终端如手机作为电脑的输入 设备, 在最大限度地扩展电脑输入便捷性的同时, 极大地改善了用户对电脑 的操作体验。 In this embodiment, the device control method of the present invention is described by taking the cursor control operation of the designated device as an example. However, it should be understood by those skilled in the art that other control operations such as volume control, shutdown operation, and the like can be performed with reference to the present embodiment. With the embodiment, the mobile communication terminal, such as a mobile phone, is implemented. A computer input device such as a traditional keyboard, touchpad, and mouse that conveniently operates the computer away from the computer and monitors the computer's functions in real time. In this embodiment, the new web standard and the characteristics of the mobile communication terminal, such as the mobile phone, are adopted, and the mobile communication terminal such as the mobile phone is used as the input device of the computer, which greatly improves the user's access to the computer while maximizing the convenience of the computer input. Operating experience.
实施例四  Embodiment 4
参照图 7, 示出了根据本发明实施例四的一种设备控制方法的步骤流程 图。  Referring to Figure 7, there is shown a flow chart of the steps of a device control method according to a fourth embodiment of the present invention.
本实施例的设备控制方法可应用于移动通信终端对物联网终端设备的 控制。  The device control method of this embodiment can be applied to the control of the IoT terminal device by the mobile communication terminal.
本实施例的设备控制方法包括以下步骤:  The device control method of this embodiment includes the following steps:
步骤 S402: 移动通信终端获取一定范围内的至少一个指定设备的信息 并显示, 供用户选择指定设备。  Step S402: The mobile communication terminal acquires information of at least one specified device within a certain range and displays it for the user to select the designated device.
如, 移动通信终端通过特定连接如蓝牙, 向一定距离内的指定设备发送 相应的请求, 以获得周围的指定设备的信息。 如, 移动通信终端可以通过蓝 牙搜索同一房间内的多个物联网设备(如智能电视、 智能冰箱等), 获得这 些设备的信息, 进而在移动通信终端中显示出来, 以供用户选择受控的指定 设备。  For example, the mobile communication terminal transmits a corresponding request to a designated device within a certain distance through a specific connection such as Bluetooth to obtain information of the surrounding designated device. For example, the mobile communication terminal can search for multiple IoT devices (such as smart TVs, smart refrigerators, etc.) in the same room through Bluetooth, obtain information of these devices, and then display them in the mobile communication terminal for the user to select and control. Specify the device.
步骤 S404: 移动通信终端接收用户的选择, 确定指定设备, 并向该指 定设备发送配对请求, 请求与该指定设备建立配对连接。  Step S404: The mobile communication terminal receives the user's selection, determines the designated device, and sends a pairing request to the designated device, requesting to establish a pairing connection with the designated device.
其中, 配对请求中包括有移动通信终端的信息。 优选地, 移动通信终端 的信息包括以下至少之一: 移动通信终端的二维码、 移动通信终端的标识、 移动通信终端的 IP地址。  The pairing request includes information of the mobile communication terminal. Preferably, the information of the mobile communication terminal comprises at least one of the following: a two-dimensional code of the mobile communication terminal, an identification of the mobile communication terminal, and an IP address of the mobile communication terminal.
步骤 S406: 移动通信终端接收指定设备返回的、 携带有指定设备的信 息的配对响应, 根据配对响应建立与指定设备的配对连接。  Step S406: The mobile communication terminal receives the pairing response returned by the designated device and carries the information of the designated device, and establishes a pairing connection with the designated device according to the pairing response.
优选地, 指定设备的信息包括以下至少之一: 指定设备的二维码、 指定 设备的标识、 指定设备的 IP地址。  Preferably, the information of the designated device comprises at least one of the following: a two-dimensional code of the specified device, an identifier of the designated device, and an IP address of the designated device.
步骤 S408: 移动通信终端获取与指定设备对应的 HTML页面。 例如, 移动通信终端在与指定设备建立配对连接后, 通过配对连接向指 定设备发送信息获取命令, 以请求获取指定设备所支持的控制操作; 进而, 根据指定设备返回的所支持的控制操作的信息生成 HTML页面。 Step S408: The mobile communication terminal acquires an HTML page corresponding to the designated device. For example, after establishing a pairing connection with the designated device, the mobile communication terminal sends an information acquisition command to the designated device through the pairing connection to request to acquire the control operation supported by the designated device; and further, according to the information of the supported control operations returned by the specified device. Generate an HTML page.
再例如, 移动通信终端中保存有与一至多种类型的指定设备相匹配的 For another example, the mobile communication terminal stores the matching with one or more types of designated devices.
HTML页面; 移动通信终端在获取到指定设备的信息后, 根据该信息确定指 定设备的类型 , 进而选择相匹配的 HTML页面。 The HTML page; after obtaining the information of the specified device, the mobile communication terminal determines the type of the specified device according to the information, and then selects the matching HTML page.
又例如, 在某些服务器也可以参与的情况下, 移动通信终端将获得的指 定设备的信息发送给服务器; 由服务器确定指定设备的类型, 进而生成 For another example, in a case where some servers can also participate, the mobile communication terminal sends the obtained information of the specified device to the server; the server determines the type of the specified device, and generates
HTML页面发送给移动通信终端, 或者, 由服务器根据指定设备的类型, 向 移动通信终端返回该类型的指定设备所支持的操作,进而由移动通信终端生 成相应的 HTML页面。 The HTML page is sent to the mobile communication terminal, or the server returns an operation supported by the designated device of the type to the mobile communication terminal according to the type of the designated device, and the corresponding HTML page is generated by the mobile communication terminal.
以智能电视为例, 移动通信终端根据智能电视返回的信息, 生成相应的 Taking a smart TV as an example, the mobile communication terminal generates a corresponding information according to the information returned by the smart TV.
HTML页面, 该 HTML页面上可以包括开关机按钮控件、 音量调节控件、 频道调节控件、 菜单操作控件等等, 通过这些控件实现对智能电视的远距离 控制。 The HTML page, which can include a switch button control, a volume adjustment control, a channel adjustment control, a menu operation control, etc., through which the remote control of the smart TV can be realized.
步骤 S410: 移动通信终端接收用户通过 HTML页面对指定设备进行控 制操作的控制操作指令。  Step S410: The mobile communication terminal receives a control operation instruction that the user performs a control operation on the designated device through the HTML page.
步骤 S412: 移动通信终端通过 HTML页面, 使用配对连接将控制操作 指令发送给配对成功的指定设备。  Step S412: The mobile communication terminal sends the control operation instruction to the designated device successfully paired by using the paired connection through the HTML page.
步骤 S414: 指定设备接收移动通信终端通过配对连接发送的控制操作 指令, 执行控制操作指令所指示的控制操作。  Step S414: The designated device receives a control operation instruction sent by the mobile communication terminal through the pairing connection, and performs a control operation indicated by the control operation instruction.
通过本实施例, 实现了点对点的设备控制。 只需一个移动通信终端, 即 可实现多种指定设备的控制, 无须专用的遥控器或控制软件, 实现了远离设 备的情况下多种设备的兼容操控, 提升了用户操作体验的效果。  With this embodiment, point-to-point device control is achieved. Only one mobile communication terminal can realize the control of a variety of designated devices, without special remote control or control software, which realizes compatible operation of multiple devices in the case of far away from the device, and improves the user experience.
实施例五  Embodiment 5
参照图 8,示出了根据本发明实施例五的一种移动通信终端的结构框图。 本实施例的移动通信终端中设置有进行设备控制的装置, 包括: 接收模 块 502,配置为接收用户通过设定的 HTML页面对指定设备进行控制操作的 控制操作指令, 其中, HTML页面用于提供用户通过移动通信终端对指定设 备进行控制操作的界面, 接收用户对界面操作所产生的控制操作指令, 并发 送控制操作指令; 控制模块 504, 配置为通过 HTML页面将控制操作指令发 送给指定设备, 使指定设备执行控制操作指令所指示的控制操作。 Referring to Figure 8, there is shown a block diagram of a structure of a mobile communication terminal in accordance with a fifth embodiment of the present invention. The apparatus for performing device control is provided in the mobile communication terminal of the embodiment, and includes: a receiving module 502 configured to receive a control operation of the specified device by the user through the set HTML page. Controlling an operation instruction, wherein the HTML page is configured to provide an interface for the user to perform a control operation on the designated device through the mobile communication terminal, receive a control operation instruction generated by the user for the interface operation, and send a control operation instruction; the control module 504 is configured to pass The HTML page sends a control operation instruction to the designated device, causing the designated device to perform the control operation indicated by the control operation instruction.
优选地, 控制模块 504, 配置为使用 WebSocket连接, 通过 HTML页面 将控制操作指令发送给网络控制服务器, 由网络控制服务器使用 WebSocket 连接将控制操作指令转发至指定设备, 使指定设备根据控制操作指令, 通过 NPAPI调用指定设备的系统 API实现控制操作指令所指示的控制操作。  Preferably, the control module 504 is configured to use a WebSocket connection to send a control operation instruction to the network control server through the HTML page, and the network control server uses the WebSocket connection to forward the control operation instruction to the designated device, so that the designated device according to the control operation instruction. The control function indicated by the control operation instruction is implemented by calling the system API of the specified device through the NPAPI.
优选地, 指定设备安装有具有 NPAPI 的浏览器和浏览器扩展程序, 其 中,浏览器扩展程序包括 NPAPI插件,浏览器扩展程序用于实现指定设备与 网络控制服务器的 WebSocket通信, 以及通过 NPAPI插件调用指定设备的 系统 API。  Preferably, the designated device is installed with a browser and a browser extension with NPAPI, wherein the browser extension includes an NPAPI plug-in, the browser extension is used to implement WebSocket communication between the specified device and the network control server, and is invoked through the NPAPI plug-in. Specifies the system API of the device.
优选地, 控制模块 504在使指定设备根据控制操作指令, 通过 NPAPI 调用指定设备的系统 API实现控制操作指令所指示的控制操作时,使指定设 备通过浏览器扩展程序的 HTML 页面监听并接收网络控制服务器发送的控 制操作指令; 浏览器扩展程序的 HTML 页面调用与控制操作指令指示的控 制操作相对应的 NPAPI函数, 并通过 NPAPI函数调用相对应的系统 API函 数, 实现控制操作指令所指示的控制操作。  Preferably, the control module 504 causes the designated device to monitor and receive the network control through the HTML page of the browser extension program when the specified device performs the control operation indicated by the control operation instruction by using the system API of the specified device according to the control operation instruction. The control operation instruction sent by the server; the HTML page of the browser extension program invokes an NPAPI function corresponding to the control operation indicated by the control operation instruction, and invokes the corresponding system API function through the NPAPI function to implement the control operation indicated by the control operation instruction .
优选地, 本实施例的移动通信终端还包括: 选择模块 506, 配置为在接 收模块 504接收用户通过设定的 HTML页面对指定设备进行控制操作的控 制操作指令之前, 从网络控制服务器获取至少一个待控制的指定设备的信 息; 选择一个待控制的指定设备, 并向网络控制服务器发送认证信息, 认证 信息用于请求对选择的指定设备进行控制操作授权;接收网络控制服务器返 回的确认授权信息。  Preferably, the mobile communication terminal of this embodiment further includes: a selection module 506 configured to acquire at least one from the network control server before the receiving module 504 receives a control operation instruction that the user controls the specified device through the set HTML page. Information of the designated device to be controlled; selecting a designated device to be controlled, and transmitting authentication information to the network control server, the authentication information is used to request authorization for the control operation of the selected designated device; and receiving the confirmation authorization information returned by the network control server.
优选地, 选择模块 506, 还配置为在接收网络控制服务器返回的确认授 权信息之后, 使用 WebSocket连接向网络控制服务器发送信息获取命令, 其 中, 信息获取命令用于获取指定设备支持的控制操作; 网络控制服务器使用 WebSocket连接将信息获取命令发送至指定设备, 使指定设备根据信息获取 命令,通过 NPAPI函数获取指定设备支持的控制操作并返回给网络控制服务 器, 由网络控制服务器转发给选择模块; 选择模块根据网络控制服务器返回 的指定设备支持的控制操作的信息, 在 HTML 页面中显示与指定设备支持 的控制操作相对应的控件。 Preferably, the selecting module 506 is further configured to: after receiving the confirmation authorization information returned by the network control server, send a message acquisition command to the network control server by using a WebSocket connection, where the information acquisition command is used to obtain a control operation supported by the designated device; The control server sends a message acquisition command to the specified device by using a WebSocket connection, so that the specified device obtains the information according to the information. The command obtains the control operation supported by the specified device through the NPAPI function and returns it to the network control server, which is forwarded to the selection module by the network control server; the selection module displays the information in the HTML page according to the information of the control operation supported by the specified device returned by the network control server. A control that corresponds to the control operations supported by the specified device.
优选地,选择模块 506在从网络控制服务器获取至少一个待控制的指定 设备的信息时 , 从网络控制服务器获取至少一个待控制的指定设备的信息 , 其中, 指定设备的信息包括以下至少之一: 指定设备的二维码、 指定设备的 标识、 指定设备的 IP地址; 移动通信终端通过指定设备的信息识别并显示 指定设备; 或者, 网络控制服务器根据待控制的指定设备的信息, 识别指定 设备; 移动通信终端从网络控制服务器处获取网络控制服务器识别出的指定 设备的信息。  Preferably, the selecting module 506 acquires information of at least one designated device to be controlled from the network control server when acquiring information of the at least one specified device to be controlled from the network control server, where the information of the specified device includes at least one of the following: Specifying the QR code of the device, the identifier of the specified device, and the IP address of the specified device; the mobile communication terminal identifies and displays the designated device by specifying the information of the device; or the network control server identifies the designated device according to the information of the designated device to be controlled; The mobile communication terminal acquires information of the designated device identified by the network control server from the network control server.
优选地, 网络控制服务器使用 Node.js搭建。  Preferably, the network control server is built using Node.js.
优选地, 控制模块 504, 配置为通过 HTML页面, 将控制操作指令发送 给与移动通信终端配对成功的指定设备,使指定设备执行控制操作指令所指 示的控制操作。  Preferably, the control module 504 is configured to send a control operation instruction to the designated device successfully paired with the mobile communication terminal through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
优选地, 本实施例的移动通信终端还包括: 配对模块 508, 配置为在接 收模块 502接收用户通过设定的 HTML页面对指定设备进行控制操作的控 制操作指令之前,向指定设备发送配对请求,请求与指定设备建立配对连接, 其中, 配对请求中包括有移动通信终端的信息; 接收指定设备返回的、 携带 有指定设备的信息的配对响应, 根据配对响应建立与指定设备的配对连接。  Preferably, the mobile communication terminal of this embodiment further includes: a pairing module 508, configured to send a pairing request to the designated device before the receiving module 502 receives a control operation instruction that the user controls the specified device through the set HTML page, And requesting to establish a pairing connection with the specified device, where the pairing request includes information of the mobile communication terminal; receiving a pairing response returned by the specified device and carrying the information of the designated device, and establishing a pairing connection with the designated device according to the pairing response.
优选地, 移动通信终端的信息包括以下至少之一: 移动通信终端的二维 码、 移动通信终端的标识、 移动通信终端的 IP地址; 指定设备的信息包括 以下至少之一: 指定设备的二维码、 指定设备的标识、 指定设备的 IP地址。  Preferably, the information of the mobile communication terminal comprises at least one of: a two-dimensional code of the mobile communication terminal, an identifier of the mobile communication terminal, an IP address of the mobile communication terminal; the information of the designated device includes at least one of the following: Code, the identifier of the specified device, and the IP address of the specified device.
优选地, 本实施例的移动通信终端还包括: 构建模块 510, 配置为在接 收模块 502接收用户通过设定的 HTML页面对指定设备进行控制操作的控 制操作指令之前, 构建设定的 HTML页面, HTML页面包括以下至少之一: 触摸板页面、 快捷操作页面和选择终端页面, 其中, 触摸板页面用于接收用 户在触摸板页面的触摸操作的信息, 根据触摸操作的信息生成控制操作指 令, 以控制指定设备的光标操作; 快捷操作页面包括以下控制至少之一: 音 量调节控件、 设备桌面显示控件、 设备截屏控件和设备关机控件, 快捷操作 页面用于接收用户对快捷操作页面中的控件的操作的信息,根据控件的操作 的信息生成控制操作指令, 以控制指定设备进行控制操作指令所指示的控制 操作; 选择终端页面用于显示待控制的设备的信息和待控制的设备的受控状 态, 以供用户选择待控制的设备, 选择终端页面还包括授权密码输入控件, 以供用户输入授权密码进行控制操作认证。 Preferably, the mobile communication terminal of this embodiment further includes: a building module 510 configured to construct a set HTML page before the receiving module 502 receives a control operation instruction that the user controls the specified device through the set HTML page. The HTML page includes at least one of the following: a touchpad page, a shortcut operation page, and a selection terminal page, wherein the touchpad page is configured to receive information of a touch operation of the user on the touchpad page, and generate a control operation finger according to the information of the touch operation. To control the cursor operation of the specified device; the shortcut operation page includes at least one of the following controls: a volume adjustment control, a device desktop display control, a device screen capture control, and a device shutdown control, and the shortcut operation page is used to receive the user in the shortcut operation page. The information of the operation of the control generates a control operation instruction according to the information of the operation of the control to control the control operation indicated by the specified operation instruction by the designated device; the terminal page is configured to display the information of the device to be controlled and the device to be controlled Control state, for the user to select the device to be controlled, the selection terminal page also includes an authorization password input control for the user to input an authorization password for control operation authentication.
优选地, 接收模块 502, 配置为通过设定的 HTML 页面监听用户通过 HTML页面对指定设备进行的控制操作 ,通过 HTML页面的 DOM事件获取 控制操作的信息, 根据控制操作的信息生成控制操作指令。  Preferably, the receiving module 502 is configured to monitor, by the set HTML page, a control operation performed by the user on the specified device through the HTML page, obtain information of the control operation through the DOM event of the HTML page, and generate a control operation instruction according to the information of the control operation.
本实施例移动通信终端用于实现前述方法实施例中相应的设备控制方 法, 并具有相应的方法实施例的有益效果, 在此不再赘述。 本发明还提供一种在其上记录有用于执行前述实施例一至四中任一设 备控制方法的程序的计算机可读记录介质。 所述计算机可读记录介质包括用 于以计算机可读的形式存储或传送信息的任何机制。 例如, 机器可读介质包 括只读存储器 (ROM )、 随机存取存储器(RAM )、 磁盘存储介质、 光存储 介质、 闪速存储介质、 电、 光、 声或其他形式的传播信号(例如, 载波、 红 外信号、 数字信号等)等。 在此提供的设备控制方案不与任何特定计算机、虚拟系统或者其它设备 固有相关。 各种通用系统也可以与基于在此的示教一起使用。 根据上面的描 述, 构造具有本发明方案的系统所要求的结构是显而易见的。 此外, 本发明 也不针对任何特定编程语言。 应当明白, 可以利用各种编程语言实现在此描 述的本发明的内容, 并且上面对特定语言所做的描述是为了披露本发明的最 佳实施方式。  The mobile communication terminal in this embodiment is used to implement the corresponding device control method in the foregoing method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again. The present invention also provides a computer readable recording medium having recorded thereon a program for executing the control method of any of the foregoing embodiments 1 to 4. The computer readable recording medium includes any mechanism for storing or transmitting information in a computer readable form. For example, a machine-readable medium includes a read only memory (ROM), a random access memory (RAM), a magnetic disk storage medium, an optical storage medium, a flash storage medium, an electrical, optical, acoustic, or other form of propagated signal (eg, a carrier wave) , infrared signals, digital signals, etc.). The device control schemes provided herein are not inherently related to any particular computer, virtual system, or other device. Various general purpose systems can also be used with the teaching based on the teachings herein. From the above description, it is apparent that the structure required to construct the system having the solution of the present invention is apparent. Moreover, the invention is not directed to any particular programming language. It will be appreciated that the teachings of the invention described herein may be implemented in a variety of programming languages, and that the description of the specific language above is for the purpose of illustrating the preferred embodiments of the invention.
在此处所提供的说明书中, 说明了大量具体细节。 然而, 能够理解, 本 发明的实施例可以在没有这些具体细节的情况下实践。 在一些实例中, 并未 佯细示出公知的方法、 结构和技术, 以便不模糊对本说明书的理解。 Numerous specific details are set forth in the description provided herein. However, it is understood that the embodiments of the invention may be practiced without these specific details. In some instances, it is not Well-known methods, structures, and techniques are shown in detail so as not to obscure the description.
类似地, 应当理解, 为了精简本公开并帮助理解各个发明方面中的一个 或多个, 在上面对本发明的示例性实施例的描述中, 本发明的各个特征有时 被一起分组到单个实施例、 图、 或者对其的描述中。 然而, 并不应将该公开 的方法解释成反映如下意图: 即所要求保护的本发明要求比在每个权利要求 中所明确记载的特征更多的特征。更确切地说,如权利要求书所反映的那样, 发明方面在于少于前面公开的单个实施例的所有特征。 因此, 遵循具体实施 方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身 都作为本发明的单独实施例。  Similarly, the various features of the present invention are sometimes grouped together into a single embodiment, in the above description of the exemplary embodiments of the invention, Figure, or a description of it. However, the method disclosed is not to be interpreted as reflecting the intention that the claimed invention requires more features than those recited in the appended claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed. Therefore, the claims following the specific embodiments are hereby explicitly incorporated into the specific embodiments, and each of the claims as a separate embodiment of the invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自 适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。 可以 把实施例中的模块或单元或组件组合成一个模块或单元或组件, 以及此外可 以把它们分成多个子模块或子单元或子组件。除了这样的特征和 /或过程或者 单元中的至少一些是相互排斥之外, 可以釆用任何组合对本说明书(包括伴 随的权利要求、 摘要和附图)中公开的所有特征以及如此公开的任何方法或 者设备的所有过程或单元进行组合。 除非另外明确陈述, 本说明书(包括伴 随的权利要求、 摘要和附图) 中公开的每个特征可以由提供相同、 等同或相 似目的的替代特征来代替。  Those skilled in the art will appreciate that the modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and further, they may be divided into a plurality of sub-modules or sub-units or sub-assemblies. In addition to the fact that at least some of such features and/or processes or units are mutually exclusive, any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed may be employed. Or combine all the processes or units of the device. Each feature disclosed in the specification (including the accompanying claims, the abstract, and the drawings) may be replaced by alternative features that provide the same, equivalent, or similar purpose, unless stated otherwise.
此外, 本领域的技术人员能够理解, 尽管在此所述的一些实施例包括其 它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组 合意味着处于本发明的范围之内并且形成不同的实施例。 例如, 在权利要求 书中, 所要求保护的实施例的任意之一都可以以任意的组合方式来使用。  In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features that are included in other embodiments and not in other features, combinations of features of different embodiments are intended to be within the scope of the present invention. Different embodiments are formed and formed. For example, in the claims, any one of the claimed embodiments can be used in any combination.
本发明的各个部件实施例可以以硬件实现, 或者以在一个或者多个处理 器上运行的软件模块实现, 或者以它们的组合实现。 本领域的技术人员应当 理解, 可以在实践中使用微处理器或者数字信号处理器(DSP )来实现根据 本发明实施例的设备控制方案中的一些或者全部部件的一些或者全部功能。 本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备 或者装置程序 (例如, 计算机程序和计算机程序产品)。 这样的实现本发明 的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形 式。 这样的信号可以从因特网网站上下载得到, 或者在载体信号上提供, 或 者以任何其他形式提供。 The various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of the device control scheme in accordance with embodiments of the present invention. The invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein. Such an implementation of the invention The program can be stored on a computer readable medium or can be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制, 并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换 实施例。 在权利要求中, 不应将位于括号之间的任何参考符号构造成对权利 要求的限制。 单词 "包含" 不排除存在未列在权利要求中的元件或步骤。 位 于元件之前的单词 "一" 或 "一个" 不排除存在多个这样的元件。 本发明可 以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。 在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一 个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。 可将这些单词解释为名称。  It is to be noted that the above-described embodiments are illustrative of the present invention and are not intended to limit the invention, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as a limitation. The word "comprising" does not exclude the presence of the elements or steps that are not recited in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by the same item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

Claims

权 利 要 求 书 claims
1、 一种设备控制方法, 包括: 1. A device control method, including:
移动通信终端接收用户通过设定的 HTML 页面对指定设备进行控制操 作的控制操作指令, 其中, 所述 HTML 页面用于提供所述用户通过所述移 动通信终端对所述指定设备进行控制操作的界面,接收所述用户对界面操作 所产生的所述控制操作指令, 并发送所述控制操作指令; The mobile communication terminal receives control operation instructions for the user to control the designated device through the set HTML page, wherein the HTML page is used to provide an interface for the user to control the designated device through the mobile communication terminal. , receiving the control operation instructions generated by the user's operation on the interface, and sending the control operation instructions;
所述移动通信终端通过所述 HTML 页面将所述控制操作指令发送给所 述指定设备, 使所述指定设备执行所述控制操作指令所指示的控制操作。 The mobile communication terminal sends the control operation instruction to the designated device through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
2、根据权利要求 1所述的方法,其中,所述移动通信终端通过所述 HTML 页面将所述控制操作指令发送给所述指定设备,使所述指定设备执行所述控 制操作指令所指示的控制操作的步骤包括: 2. The method according to claim 1, wherein the mobile communication terminal sends the control operation instruction to the designated device through the HTML page, so that the designated device executes the instruction indicated by the control operation instruction. The steps to control operations include:
所述移动通信终端使用 WebSocket连接, 通过所述 HTML页面将所述 控制操作指令发送给网络控制服务器, 由所述网络控制服务器使用所述 WebSocket连接将所述控制操作指令转发至所述指定设备, 使所述指定设备 根据所述控制操作指令, 通过 NPAPI调用所述指定设备的系统 API实现所 述控制操作指令所指示的控制操作。 The mobile communication terminal uses a WebSocket connection to send the control operation instructions to the network control server through the HTML page, and the network control server forwards the control operation instructions to the designated device using the WebSocket connection, The designated device is caused to call the system API of the designated device through NPAPI according to the control operation instruction to implement the control operation indicated by the control operation instruction.
3、根据权利要求 2所述的方法,其中,所述指定设备安装有具有 NPAPI 的浏览器和浏览器扩展程序, 其中, 所述浏览器扩展程序包括 NPAPI插件, 所述浏览器扩展程序用于实现所述指定设备与所述网络控制服务器的 WebSocket通信, 以及通过所述 NPAPI插件调用所述指定设备的系统 API。 3. The method according to claim 2, wherein the designated device is installed with a browser and a browser extension program having NPAPI, wherein the browser extension program includes an NPAPI plug-in, and the browser extension program is used to Implement WebSocket communication between the designated device and the network control server, and call the system API of the designated device through the NPAPI plug-in.
4、 根据权利要求 3所述的方法, 其中, 所述指定设备根据所述控制操 作指令, 通过 NPAPI调用所述指定设备的系统 API实现所述控制操作指令 所指示的控制操作的步骤包括: 4. The method according to claim 3, wherein the step of the designated device calling the system API of the designated device through NPAPI to implement the control operation indicated by the control operation instruction according to the control operation instruction includes:
所述指定设备通过所述浏览器扩展程序的 HTML 页面监听并接收所述 网络控制服务器发送的所述控制操作指令; The designated device monitors and receives the control operation instructions sent by the network control server through the HTML page of the browser extension;
所述浏览器扩展程序的 HTML 页面调用与所述控制操作指令指示的控 制操作相对应的 NPAPI函数,并通过所述 NPAPI函数调用相对应的系统 API 函数, 实现所述控制操作指令所指示的控制操作。 The HTML page of the browser extension calls the NPAPI function corresponding to the control operation indicated by the control operation instruction, and calls the corresponding system API function through the NPAPI function to realize the control indicated by the control operation instruction. operate.
5、 根据权利要求 1所述的方法, 其中, 在所述移动通信终端接收用户 通过设定的 HTML 页面对指定设备进行控制操作的控制操作指令的步骤之 前, 还包括: 5. The method according to claim 1, wherein: receiving user information at the mobile communication terminal Before the steps of control operation instructions for controlling the specified device through the set HTML page, it also includes:
所述移动通信终端从网络控制服务器获取至少一个待控制的所述指定 设备的信息; The mobile communication terminal obtains information about at least one designated device to be controlled from the network control server;
选择一个所述待控制的指定设备,并向所述网络控制服务器发送认证信 息, 所述认证信息用于请求对选择的所述指定设备进行控制操作授权; Select one of the designated devices to be controlled, and send authentication information to the network control server, where the authentication information is used to request control operation authorization for the selected designated device;
接收所述网络控制服务器返回的确认授权信息。 Receive the confirmation authorization information returned by the network control server.
6、 根据权利要求 5所述的方法, 其中, 在所述接收所述网络控制服务 器返回的确认授权信息之后, 还包括: 6. The method according to claim 5, wherein after receiving the confirmation authorization information returned by the network control server, further comprising:
所述移动通信终端使用 WebSocket连接向所述网络控制服务器发送信 息获取命令, 其中, 所述信息获取命令用于获取所述指定设备支持的控制操 作; The mobile communication terminal uses a WebSocket connection to send an information acquisition command to the network control server, where the information acquisition command is used to obtain the control operations supported by the designated device;
所述网络控制服务器使用所述 WebSocket连接将所述信息获取命令发 送至所述指定设备, 使所述指定设备根据所述信息获取命令, 通过 NPAPI 函数获取所述指定设备支持的控制操作并返回给所述网络控制服务器, 由所 述网络控制服务器转发给所述移动通信终端; The network control server uses the WebSocket connection to send the information acquisition command to the designated device, so that the designated device obtains the command according to the information, obtains the control operations supported by the designated device through the NPAPI function and returns it to The network control server forwards it to the mobile communication terminal by the network control server;
所述移动通信终端根据所述网络控制服务器返回的所述指定设备支持 的控制操作的信息, 在 HTML 页面中显示与所述指定设备支持的控制操作 相对应的控件。 The mobile communication terminal displays controls corresponding to the control operations supported by the specified device in the HTML page based on the information about the control operations supported by the specified device returned by the network control server.
7、 根据权利要求 5或 6所述的方法, 其中, 所述移动通信终端从网络 控制服务器获取至少一个待控制的所述指定设备的信息的步骤包括: 7. The method according to claim 5 or 6, wherein the step of the mobile communication terminal obtaining the information of at least one designated device to be controlled from the network control server includes:
所述移动通信终端从所述网络控制服务器获取至少一个待控制的所述 指定设备的信息, 其中, 所述指定设备的信息包括以下至少之一: 所述指定 设备的二维码、 所述指定设备的标识、 所述指定设备的 IP地址; 所述移动 通信终端通过所述指定设备的信息识别并显示所述指定设备; The mobile communication terminal obtains information about at least one designated device to be controlled from the network control server, wherein the information about the designated device includes at least one of the following: the QR code of the designated device, the designated The identification of the device and the IP address of the designated device; The mobile communication terminal identifies and displays the designated device through the information of the designated device;
或者, or,
所述网络控制服务器根据所述待控制的指定设备的信息 ,识别所述指定 设备; 所述移动通信终端从所述网络控制服务器处获取所述网络控制服务器 识别出的所述指定设备的信息。 The network control server identifies the designated device according to the information of the designated device to be controlled; the mobile communication terminal obtains the network control server from the network control server Information about the identified specified device.
8、根据权利要求 2所述的方法,其中,所述网络控制服务器使用 Node.js 搭建。 8. The method according to claim 2, wherein the network control server is built using Node.js.
9、根据权利要求 1所述的方法,其中,所述移动通信终端通过所述 HTML 页面将所述控制操作指令发送给所述指定设备,使所述指定设备执行所述控 制操作指令所指示的控制操作的步骤包括: 9. The method according to claim 1, wherein the mobile communication terminal sends the control operation instruction to the designated device through the HTML page, so that the designated device executes the control operation instruction. The steps to control operations include:
所述移动通信终端通过所述 HTML 页面, 将所述控制操作指令发送给 与所述移动通信终端配对成功的所述指定设备,使所述指定设备执行所述控 制操作指令所指示的控制操作。 The mobile communication terminal sends the control operation instruction to the designated device that is successfully paired with the mobile communication terminal through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
10、 根据权利要求 9所述的方法, 其中, 在所述移动通信终端接收用户 通过设定的 HTML 页面对指定设备进行控制操作的控制操作指令的步骤之 前, 还包括: 10. The method according to claim 9, wherein before the step of the mobile communication terminal receiving the control operation instruction from the user to control the designated device through the set HTML page, it further includes:
所述移动通信终端向所述指定设备发送配对请求,请求与所述指定设备 建立配对连接, 其中, 所述配对请求中包括有所述移动通信终端的信息; 所述移动通信终端接收所述指定设备返回的、携带有所述指定设备的信 息的配对响应, 根据所述配对响应建立与所述指定设备的配对连接。 The mobile communication terminal sends a pairing request to the designated device, requesting to establish a pairing connection with the designated device, wherein the pairing request includes information about the mobile communication terminal; the mobile communication terminal receives the designation The device returns a pairing response that carries information about the specified device, and establishes a pairing connection with the specified device based on the pairing response.
11、 根据权利要求 10所述的方法, 其中, 所述移动通信终端的信息包 括以下至少之一: 所述移动通信终端的二维码、 所述移动通信终端的标识、 所述移动通信终端的 IP地址; 所述指定设备的信息包括以下至少之一: 所 述指定设备的二维码、 所述指定设备的标识、 所述指定设备的 IP地址。 11. The method according to claim 10, wherein the information of the mobile communication terminal includes at least one of the following: a QR code of the mobile communication terminal, an identification of the mobile communication terminal, an identification number of the mobile communication terminal IP address; The information of the designated device includes at least one of the following: the QR code of the designated device, the identification of the designated device, and the IP address of the designated device.
12、 根据权利要求 1所述的方法, 其中, 在所述移动通信终端接收用户 通过设定的 HTML 页面对指定设备进行控制操作的控制操作指令的步骤之 前, 还包括: 12. The method according to claim 1, wherein before the step of the mobile communication terminal receiving the control operation instruction from the user to control the designated device through the set HTML page, it further includes:
构建所述设定的 HTML页面 , 所述 HTML页面包括以下至少之一: 触 摸板页面、 快捷操作页面和选择终端页面, 其中, 所述触摸板页面用于接收 所述用户在所述触摸板页面的触摸操作的信息,根据所述触摸操作的信息生 成所述控制操作指令, 以控制所述指定设备的光标操作; 所述快捷操作页面 包括以下控制至少之一: 音量调节控件、 设备桌面显示控件、 设备截屏控件 和设备关机控件, 所述快捷操作页面用于接收所述用户对所述快捷操作页面 中的控件的操作的信息, 根据所述控件的操作的信息生成所述控制操作指 令, 以控制所述指定设备进行所述控制操作指令所指示的控制操作; 所述选 择终端页面用于显示待控制的设备的信息和所述待控制的设备的受控状态, 以供所述用户选择所述待控制的设备, 所述选择终端页面还包括授权密码输 入控件, 以供所述用户输入授权密码进行控制操作认证。 Construct the HTML page of the setting, and the HTML page includes at least one of the following: a touch panel page, a shortcut operation page and a terminal selection page, wherein the touch panel page is used to receive the user's input on the touch panel page. The touch operation information is used to generate the control operation instructions according to the touch operation information to control the cursor operation of the specified device; the shortcut operation page includes at least one of the following controls: volume adjustment control, device desktop display control , device screenshot control and a device shutdown control, the shortcut operation page is used to receive the information about the user's operation of the control in the shortcut operation page, and generate the control operation instruction according to the information about the operation of the control to control the specified The device performs the control operation indicated by the control operation instruction; the selection terminal page is used to display the information of the device to be controlled and the controlled status of the device to be controlled, so that the user can select the device to be controlled. Equipment, the terminal selection page also includes an authorization password input control for the user to input the authorization password for control operation authentication.
13、 根据权利要求 1或 2所述的方法, 其中, 所述移动通信终端接收用 户通过设定的 HTML 页面对指定设备进行控制操作的控制操作指令的步骤 包括: 13. The method according to claim 1 or 2, wherein the step of the mobile communication terminal receiving a control operation instruction from a user to control a designated device through a set HTML page includes:
所述设定的 HTML页面监听所述用户通过所述 HTML页面对所述指定 设备进行的控制操作,通过所述 HTML页面的 DOM事件获取所述控制操作 的信息, 根据所述控制操作的信息生成所述控制操作指令。 The set HTML page monitors the control operation performed by the user on the designated device through the HTML page, obtains the information of the control operation through the DOM event of the HTML page, and generates information based on the information of the control operation. The control operation instructions.
14、 一种移动通信终端, 包括: 14. A mobile communication terminal, including:
接收模块, 配置为接收用户通过设定的 HTML 页面对指定设备进行控 制操作的控制操作指令, 其中, 所述 HTML 页面用于提供所述用户通过所 述移动通信终端对所述指定设备进行控制操作的界面,接收所述用户对界面 操作所产生的所述控制操作指令, 并发送所述控制操作指令; The receiving module is configured to receive control operation instructions for the user to control the designated device through the set HTML page, wherein the HTML page is used to provide the user to control the designated device through the mobile communication terminal. The interface, receives the control operation instructions generated by the user's operation on the interface, and sends the control operation instructions;
控制模块, 配置为通过所述 HTML 页面将所述控制操作指令发送给所 述指定设备, 使所述指定设备执行所述控制操作指令所指示的控制操作。 The control module is configured to send the control operation instruction to the designated device through the HTML page, so that the designated device performs the control operation indicated by the control operation instruction.
15、 根据权利要求 14所述的移动通信终端, 其中, 所述控制模块, 配 置为使用 WebSocket连接, 通过所述 HTML页面将所述控制操作指令发送 给网络控制服务器, 由所述网络控制服务器使用所述 WebSocket连接将所述 控制操作指令转发至所述指定设备, 使所述指定设备根据所述控制操作指 令, 通过 NPAPI调用所述指定设备的系统 API实现所述控制操作指令所指 示的控制操作。 15. The mobile communication terminal according to claim 14, wherein the control module is configured to use a WebSocket connection to send the control operation instructions to the network control server through the HTML page, and is used by the network control server The WebSocket connection forwards the control operation instruction to the designated device, so that the designated device calls the system API of the designated device through NPAPI to implement the control operation indicated by the control operation instruction according to the control operation instruction. .
16、 根据权利要求 15所述的移动通信终端, 其中, 所述指定设备安装 有具有 NPAPI的浏览器和浏览器扩展程序,其中,所述浏览器扩展程序包括 NPAPI插件,所述浏览器扩展程序用于实现所述指定设备与所述网络控制服 务器的 WebSocket通信, 以及通过所述 NPAPI插件调用所述指定设备的系 统 API。 16. The mobile communication terminal according to claim 15, wherein the designated device is installed with a browser and a browser extension program having NPAPI, wherein the browser extension program includes an NPAPI plug-in, and the browser extension program Used to implement the specified equipment and the network control service WebSocket communication of the server, and calling the system API of the specified device through the NPAPI plug-in.
17、 根据权利要求 16所述的移动通信终端, 其中, 所述控制模块在使 所述指定设备根据所述控制操作指令,通过 NPAPI调用所述指定设备的系统 API实现所述控制操作指令所指示的控制操作时, 使所述指定设备通过所述 浏览器扩展程序的 HTML 页面监听并接收所述网络控制服务器发送的所述 控制操作指令; 所述浏览器扩展程序的 HTML 页面调用与所述控制操作指 令指示的控制操作相对应的 NPAPI函数, 并通过所述 NPAPI函数调用相对 应的系统 API函数, 实现所述控制操作指令所指示的控制操作。 17. The mobile communication terminal according to claim 16, wherein the control module causes the designated device to call the system API of the designated device through NPAPI according to the control operation instruction to implement the instructions indicated by the control operation instruction. During the control operation, the designated device is caused to monitor and receive the control operation instruction sent by the network control server through the HTML page of the browser extension program; the HTML page call of the browser extension program is related to the control operation. The control operation indicated by the operation instruction corresponds to the NPAPI function, and the corresponding system API function is called through the NPAPI function to implement the control operation indicated by the control operation instruction.
18、 根据权利要求 14所述的移动通信终端, 其中, 所述移动通信终端 还包括: 18. The mobile communication terminal according to claim 14, wherein the mobile communication terminal further includes:
选择模块, 配置为在所述接收模块接收用户通过设定的 HTML 页面对 指定设备进行控制操作的控制操作指令之前,从网络控制服务器获取至少一 个待控制的所述指定设备的信息; 选择一个所述待控制的指定设备, 并向所 述网络控制服务器发送认证信息, 所述认证信息用于请求对选择的所述指定 设备进行控制操作授权; 接收所述网络控制服务器返回的确认授权信息。 The selection module is configured to obtain the information of at least one designated device to be controlled from the network control server before the receiving module receives the control operation instruction of the user to control the designated device through the set HTML page; select one of the designated devices. Describe the designated device to be controlled, and send authentication information to the network control server, where the authentication information is used to request control operation authorization for the selected designated device; receive confirmation authorization information returned by the network control server.
19、 根据权利要求 18所述的移动通信终端, 其中, 所述选择模块, 还 配置为在所述接收所述网络控制服务器返回的确认授权信息之后, 使用 WebSocket连接向所述网络控制服务器发送信息获取命令, 其中, 所述信息 获取命令用于获取所述指定设备支持的控制操作; 所述网络控制服务器使用 所述 WebSocket连接将所述信息获取命令发送至所述指定设备,使所述指定 设备根据所述信息获取命令,通过 NPAPI函数获取所述指定设备支持的控制 操作并返回给所述网络控制服务器, 由所述网络控制服务器转发给所述选择 模块; 所述选择模块根据所述网络控制服务器返回的所述指定设备支持的控 制操作的信息, 在 HTML 页面中显示与所述指定设备支持的控制操作相对 应的控件。 19. The mobile communication terminal according to claim 18, wherein the selection module is further configured to use a WebSocket connection to send information to the network control server after receiving the confirmation authorization information returned by the network control server. Obtain a command, wherein the information acquisition command is used to obtain the control operations supported by the specified device; the network control server uses the WebSocket connection to send the information acquisition command to the specified device, so that the specified device According to the information acquisition command, the control operations supported by the specified device are obtained through the NPAPI function and returned to the network control server, which is forwarded to the selection module by the network control server; the selection module is based on the network control The information about the control operations supported by the specified device returned by the server displays controls corresponding to the control operations supported by the specified device in the HTML page.
20、 根据权利要求 18或 19所述的移动通信终端, 其中, 所述选择模块 在从网络控制服务器获取至少一个待控制的所述指定设备的信息时,从所述 网络控制服务器获取至少一个待控制的所述指定设备的信息, 其中, 所述指 定设备的信息包括以下至少之一: 所述指定设备的二维码、 所述指定设备的 标识、 所述指定设备的 IP地址; 所述移动通信终端通过所述指定设备的信 息识别并显示所述指定设备; 或者, 所述网络控制服务器根据所述待控制的 指定设备的信息, 识别所述指定设备; 所述移动通信终端从所述网络控制服 务器处获取所述网络控制服务器识别出的所述指定设备的信息。 20. The mobile communication terminal according to claim 18 or 19, wherein when the selection module obtains the information of at least one designated device to be controlled from the network control server, The network control server obtains information about at least one designated device to be controlled, where the information about the designated device includes at least one of the following: the QR code of the designated device, the identification of the designated device, the designated device the IP address; the mobile communication terminal identifies and displays the designated device through the information of the designated device; or, the network control server identifies the designated device based on the information of the designated device to be controlled; The mobile communication terminal obtains the information of the designated device identified by the network control server from the network control server.
21、 根据权利要求 15所述的移动通信终端, 其中, 所述网络控制服务 器使用 Node.js搭建。 21. The mobile communication terminal according to claim 15, wherein the network control server is built using Node.js.
22、 根据权利要求 14所述的移动通信终端, 其中, 所述控制模块, 配 置为通过所述 HTML 页面, 将所述控制操作指令发送给与所述移动通信终 端配对成功的所述指定设备,使所述指定设备执行所述控制操作指令所指示 的控制操作。 22. The mobile communication terminal according to claim 14, wherein the control module is configured to send the control operation instruction to the designated device that is successfully paired with the mobile communication terminal through the HTML page, causing the specified device to perform the control operation indicated by the control operation instruction.
23、 根据权利要求 22所述的移动通信终端, 其中, 所述移动通信终端 还包括: 23. The mobile communication terminal according to claim 22, wherein the mobile communication terminal further includes:
配对模块, 配置为在所述接收模块接收用户通过设定的 HTML 页面对 指定设备进行控制操作的控制操作指令之前, 向所述指定设备发送配对请 求, 请求与所述指定设备建立配对连接, 其中, 所述配对请求中包括有所述 移动通信终端的信息; 接收所述指定设备返回的、 携带有所述指定设备的信 息的配对响应, 根据所述配对响应建立与所述指定设备的配对连接。 The pairing module is configured to send a pairing request to the designated device before the receiving module receives the control operation instruction of the user to control the designated device through the set HTML page, requesting to establish a pairing connection with the designated device, wherein , the pairing request includes the information of the mobile communication terminal; receiving a pairing response returned by the designated device that carries the information of the designated device, and establishing a pairing connection with the designated device according to the pairing response. .
24、 根据权利要求 23所述的移动通信终端, 其中, 所述移动通信终端 的信息包括以下至少之一: 所述移动通信终端的二维码、 所述移动通信终端 的标识、 所述移动通信终端的 IP地址; 所述指定设备的信息包括以下至少 之一: 所述指定设备的二维码、 所述指定设备的标识、 所述指定设备的 IP 地址。 24. The mobile communication terminal according to claim 23, wherein the information of the mobile communication terminal includes at least one of the following: a QR code of the mobile communication terminal, an identification of the mobile communication terminal, the mobile communication terminal The IP address of the terminal; the information of the designated device includes at least one of the following: the QR code of the designated device, the identification of the designated device, and the IP address of the designated device.
25、 根据权利要求 14所述的移动通信终端, 其中, 所述移动通信终端 还包括: 25. The mobile communication terminal according to claim 14, wherein the mobile communication terminal further includes:
构建模块, 配置为在所述接收模块接收用户通过设定的 HTML 页面对 指定设备进行控制操作的控制操作指令之前, 构建所述设定的 HTML页面, 所述 HTML 页面包括以下至少之一: 触摸板页面、 快捷操作页面和选择终 端页面, 其中, 所述触摸板页面用于接收所述用户在所述触摸板页面的触摸 操作的信息, 根据所述触摸操作的信息生成所述控制操作指令, 以控制所述 指定设备的光标操作; 所述快捷操作页面包括以下控制至少之一: 音量调节 控件、 设备桌面显示控件、 设备截屏控件和设备关机控件, 所述快捷操作页 面用于接收所述用户对所述快捷操作页面中的控件的操作的信息,根据所述 控件的操作的信息生成所述控制操作指令, 以控制所述指定设备进行所述控 制操作指令所指示的控制操作; 所述选择终端页面用于显示待控制的设备的 信息和所述待控制的设备的受控状态, 以供所述用户选择所述待控制的设 备, 所述选择终端页面还包括授权密码输入控件, 以供所述用户输入授权密 码进行控制操作认证。 a building module configured to build the set HTML page before the receiving module receives the control operation instruction of the user to control the specified device through the set HTML page, The HTML page includes at least one of the following: a touch panel page, a shortcut operation page and a terminal selection page, wherein the touch panel page is used to receive information about the user's touch operations on the touch panel page, according to The control operation instructions are generated from the touch operation information to control the cursor operation of the specified device; the shortcut operation page includes at least one of the following controls: volume adjustment control, device desktop display control, device screenshot control and device shutdown control, The shortcut operation page is used to receive information about the user's operation of the controls in the shortcut operation page, and generate the control operation instructions according to the information about the operation of the controls to control the designated device to perform the control. The control operation indicated by the operation instruction; the selection terminal page is used to display the information of the device to be controlled and the controlled status of the device to be controlled, so that the user can select the device to be controlled, the selection The terminal page also includes an authorization password input control for the user to input the authorization password for control operation authentication.
26、根据权利要求 14或 15所述的移动通信终端,其中,所述接收模块, 配置为通过所述设定的 HTML页面监听所述用户通过所述 HTML页面对所 述指定设备进行的控制操作,通过所述 HTML页面的 DOM事件获取所述控 制操作的信息, 根据所述控制操作的信息生成所述控制操作指令。 26. The mobile communication terminal according to claim 14 or 15, wherein the receiving module is configured to monitor the user's control operation on the designated device through the set HTML page. , obtain the information of the control operation through the DOM event of the HTML page, and generate the control operation instruction according to the information of the control operation.
27、一种在其上记录有用于执行权利要求 1所述方法的程序的计算机可 读记录介质。 27. A computer-readable recording medium having recorded thereon a program for executing the method of claim 1.
PCT/CN2013/084437 2012-12-12 2013-09-27 Device control method and mobile communication terminal WO2014090016A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210537144.1 2012-12-12
CN201210537144.1A CN103051693B (en) 2012-12-12 2012-12-12 Apparatus control method and mobile communication terminal

Publications (1)

Publication Number Publication Date
WO2014090016A1 true WO2014090016A1 (en) 2014-06-19

Family

ID=48064187

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/084437 WO2014090016A1 (en) 2012-12-12 2013-09-27 Device control method and mobile communication terminal

Country Status (2)

Country Link
CN (1) CN103051693B (en)
WO (1) WO2014090016A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051693B (en) * 2012-12-12 2016-12-21 北京奇虎科技有限公司 Apparatus control method and mobile communication terminal
CN103401738B (en) * 2013-07-31 2017-03-01 小米科技有限责任公司 A kind of method and device connecting terminal
CN104424002B (en) * 2013-09-10 2017-12-12 中国科学院声学研究所 A kind of dynamic load assembly method and system based on Plugin Mechanism
CN104461413B (en) * 2013-09-17 2017-11-28 哈尔滨安天科技股份有限公司 A kind of LED display control programs and method based on web technology
CN103631556A (en) * 2013-11-06 2014-03-12 天脉聚源(北京)传媒科技有限公司 Method, mobile terminal and system for remote control over display device
CN103605491A (en) * 2013-11-08 2014-02-26 天脉聚源(北京)传媒科技有限公司 Method, mobile terminal and system of remote control display device
CN104796565B (en) * 2014-01-16 2018-12-07 华为终端有限公司 Control method, terminal and the mobile terminal of mobile terminal loudness
CN103746906A (en) * 2014-01-22 2014-04-23 北京奇虎科技有限公司 Method, device and system for pushing mobile terminal to control PC (personal computer) operation-related message
WO2016017978A1 (en) * 2014-07-31 2016-02-04 Samsung Electronics Co., Ltd. Device and method for performing functions
CN104394237B (en) * 2014-12-19 2018-07-13 北京奇虎科技有限公司 The method and browser device communicated between browser and mobile terminal
CN104966015B (en) * 2015-07-30 2018-01-19 成都中科创达软件有限公司 Control method and system between a kind of smart machine
CN105630376A (en) * 2015-12-18 2016-06-01 小米科技有限责任公司 Terminal control method and device
CN105898893B (en) * 2016-05-31 2020-09-22 北京乐美无限科技有限公司 Full-duplex communication method for mobile terminal and Internet of things equipment
CN106341489A (en) * 2016-10-09 2017-01-18 珠海我爱拍科技有限公司 Control system for remote interaction with intelligent Internet of things equipment through webpage
CN108810054A (en) * 2017-05-04 2018-11-13 宏碁股份有限公司 High in the clouds manages system and its apparatus configuration method
CN108038129A (en) * 2017-11-11 2018-05-15 南京邮电大学 A kind of Internet of Things Web browser scheme based on chromium kernels
CN113433831A (en) * 2021-06-29 2021-09-24 青岛海尔科技有限公司 Control method and module of intelligent household equipment and storage medium
CN113452588A (en) * 2021-06-29 2021-09-28 青岛海尔科技有限公司 Display method and device of equipment binding list, storage medium and electronic device
CN114095555A (en) * 2021-12-08 2022-02-25 金蝶医疗软件科技有限公司 Information acquisition method and related equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132335A (en) * 2007-07-24 2008-02-27 南昌大学 Remote equipment control in Web mode
US20100241254A1 (en) * 2007-09-05 2010-09-23 Savant Systems Llc Web browser based remote control for programmable multimedia controller
CN102594997A (en) * 2012-04-05 2012-07-18 何乙诚 Method for remotely controlling computer by using mobile phone
CN102611753A (en) * 2012-03-21 2012-07-25 张雷 System and method for controlling controlled equipment through mobile terminal based on cloud platform
CN102692881A (en) * 2012-05-16 2012-09-26 中国海洋大学 Household appliance control method and control system based on two-dimension code
CN102739800A (en) * 2012-07-05 2012-10-17 合一网络技术(北京)有限公司 System and method for remotely controlling browser Web page based on internet
CN103049190A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Mobile communication terminal and method controlling device operation
CN103051694A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Method for controlling equipment by mobile communication terminal and mobile communication terminal
CN103051693A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Equipment control method and mobile communication terminal
CN103067448A (en) * 2012-12-12 2013-04-24 北京奇虎科技有限公司 Device control method and mobile communication terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638716A (en) * 2012-03-21 2012-08-15 华为技术有限公司 Method, device and system for television remote control by mobile terminal

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101132335A (en) * 2007-07-24 2008-02-27 南昌大学 Remote equipment control in Web mode
US20100241254A1 (en) * 2007-09-05 2010-09-23 Savant Systems Llc Web browser based remote control for programmable multimedia controller
CN102611753A (en) * 2012-03-21 2012-07-25 张雷 System and method for controlling controlled equipment through mobile terminal based on cloud platform
CN102594997A (en) * 2012-04-05 2012-07-18 何乙诚 Method for remotely controlling computer by using mobile phone
CN102692881A (en) * 2012-05-16 2012-09-26 中国海洋大学 Household appliance control method and control system based on two-dimension code
CN102739800A (en) * 2012-07-05 2012-10-17 合一网络技术(北京)有限公司 System and method for remotely controlling browser Web page based on internet
CN103049190A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Mobile communication terminal and method controlling device operation
CN103051694A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Method for controlling equipment by mobile communication terminal and mobile communication terminal
CN103051693A (en) * 2012-12-12 2013-04-17 北京奇虎科技有限公司 Equipment control method and mobile communication terminal
CN103067448A (en) * 2012-12-12 2013-04-24 北京奇虎科技有限公司 Device control method and mobile communication terminal

Also Published As

Publication number Publication date
CN103051693A (en) 2013-04-17
CN103051693B (en) 2016-12-21

Similar Documents

Publication Publication Date Title
WO2014090016A1 (en) Device control method and mobile communication terminal
CN103049190B (en) A kind of method of mobile communication terminal and control appliance operation
US10552518B2 (en) Administration of web page
CN103051694B (en) The method and mobile communication terminal of mobile communication terminal control device
CN103067448B (en) device control method and mobile communication terminal
US9553953B2 (en) Method and apparatus for extending capabilities of a virtualization domain to support features available in a normal desktop application
US8863237B2 (en) Remote-session-to-go method and apparatus
WO2015161786A1 (en) Remote control method, server, control device and system
US9578113B2 (en) Method and apparatus for transferring remote session data
US20130041938A1 (en) Dynamic Mobile Interaction Using Customized Interfaces
US20140298188A1 (en) Remote operation method and system
CN104270662A (en) System of terminal equipment for controlling intelligent television through browser
JP7359234B2 (en) Information processing device, information processing system, information processing method and program
US20190011997A1 (en) Command relay device, system and method for providing remote assistance/remote control
AU2011352057A1 (en) Methods and systems for displaying content on multiple networked devices with a simple command
JP2015191505A (en) Information processing terminal, display terminal, display method and program
WO2017193678A1 (en) Device control method and apparatus, and device control system
WO2017096813A1 (en) Webpage displaying method, mobile terminal, intelligent terminal, program, and storage medium
WO2018000623A1 (en) Webpage operating method and apparatus
WO2017096812A1 (en) Webpage displaying method, mobile terminal, intelligent terminal, computer program, and storage medium
WO2015081716A1 (en) Method, system, and related device for providing application service
KR101896135B1 (en) Information processing apparatus, information processing system, and program
KR101514535B1 (en) Method of inputting to mobile device through personal computer and system thereof
CN103269360A (en) Method and device capable of controlling electrical device
KR20160093877A (en) Virtual client, cloud streaming server, cloud streaming server test system comprising the same, control method thereof and computer readable medium having computer program recorded therefor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13861577

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13861577

Country of ref document: EP

Kind code of ref document: A1