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

Device control method and mobile communication terminal Download PDF

Info

Publication number
WO2014090017A1
WO2014090017A1 PCT/CN2013/084444 CN2013084444W WO2014090017A1 WO 2014090017 A1 WO2014090017 A1 WO 2014090017A1 CN 2013084444 W CN2013084444 W CN 2013084444W WO 2014090017 A1 WO2014090017 A1 WO 2014090017A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
designated device
communication terminal
mobile communication
html page
Prior art date
Application number
PCT/CN2013/084444
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 WO2014090017A1 publication Critical patent/WO2014090017A1/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]

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 integration between networks is more and more extensive.
  • the interaction between a mobile communication terminal and a wired computer terminal is achieved through wireless and wired network convergence, or the interaction between the mobile communication terminal and an IoT intelligent terminal such as a smart TV is becoming more and more common.
  • this existing method needs to set a corresponding control mode for each controlled device on the one hand, and the implementation is complicated, and the corresponding control mode needs to be replaced when the controlled device is replaced, and the compatibility is poor; on the other hand, the control method
  • the type is artificially set, and the artificially set control mode is limited.
  • the function of the controlled device cannot be utilized to the greatest extent, resulting in waste of resources. If the function of a controlled device is only turned on and off, The controller can only turn the controlled device on or off, and cannot use other features of the controlled device. Summary of the invention
  • the present invention has been made in order to provide a device control method and a mobile communication terminal that overcome the above problems or at least partially solve the above problems.
  • a device control method including: a mobile communication terminal transmitting an information acquisition command to a network control server, where the network control server forwards the information acquisition command to a designated device, where The information acquisition command is used to acquire device information of the specified device; the mobile communication terminal receives the network control server to acquire the information The feedback of the command is performed to obtain an HTML page for performing control operations on the specified device, and the specified device is controlled by the HTML page, wherein the network control server feeds back the information acquisition command according to the The device information returned by the specified device is generated.
  • a mobile communication terminal including: a first sending module, configured to send an information acquisition command to a network control server, where the network control server forwards the information acquisition command to a designated device
  • the information obtaining command is configured to acquire device information of the specified device
  • the acquiring module is configured to receive feedback from the network control server on the information acquiring command, and obtain a control operation for the specified device.
  • the HTML page is configured to perform a control operation on the specified device by using the HTML page, wherein the feedback of the information acquisition command by the network control server is generated according to the device information returned by the specified device.
  • a device control method including: the mobile communication terminal sends an information acquisition command to a designated device that is successfully paired, wherein the information acquisition command is used to acquire device information of the specified device. And the mobile communication terminal generates an HTML page for performing control operations on the designated device according to the device information returned by the specified device, and performs a control operation on the designated device by using the HTML page.
  • a mobile communication terminal including: a second sending module, configured to send an information acquisition command to a designated device that is successfully paired, wherein the information obtaining command is used to obtain the specified
  • the device information of the device is configured to generate, according to the device information returned by the specified device, an HTML page for performing a control operation on the specified device, and perform a control operation on the specified device by using the HTML page.
  • a computer readable recording medium having recorded thereon a program for executing the above device control method.
  • the mobile communication terminal generates an HTML page by acquiring feedback generated based on the device information of the specified device, and controls the IoT device through the generated HTML page.
  • the device information carries the information related to the specified device, and the type of the information to be carried can be appropriately set by a person skilled in the art according to actual needs.
  • all the information supported by the designated device can be obtained through feedback generated according to the device information of the specified device.
  • Control operations to fully utilize designated devices to avoid wasting resources on devices on the other hand, HTML pages are Widely used and supported by almost all operating systems, the operation of the mobile communication terminal to control the device through the HTML page is simple, and it is not necessary to set a dedicated control mode for a single designated device, thereby improving the compatibility of device control;
  • the mobile communication terminal side and the designated device side do not need special operation control software, and the operation is convenient, the implementation is simple, the compatibility is good, and the implementation cost is low.
  • the solution of the present invention solves the problem that the existing controlled device realizes poor complex compatibility and wastes resources, and achieves the effects of simple implementation, good compatibility, and full utilization of device resources.
  • 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 an HTML page in the embodiment shown in FIG.
  • FIG. 5 is a flow chart showing the steps of a device control method according to Embodiment 4 of the present invention
  • FIG. 6 is a flow chart showing the steps of a device control method according to Embodiment 5 of the present invention
  • FIG. 8 is a block diagram showing the structure of a mobile communication terminal according to a seventh embodiment of the present invention.
  • DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood, and the scope of the disclosure may be fully disclosed to those skilled in the art.
  • Embodiment 1 Embodiment 1
  • 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 sends an information acquisition command to the network control server, and the network control server forwards the information acquisition command to the designated device.
  • the information obtaining command is used to obtain device information of the specified device.
  • the specified device may be a computer terminal device such as a PC or a terminal device in the Internet of Things.
  • Step S104 The mobile communication terminal receives the feedback of the network control server for the information acquisition command, obtains an HTML page for performing control operations on the designated device, and performs a control operation on the designated device through the HTML page.
  • the feedback of the network control server to the information acquisition command is generated according to the device information returned by the specified device.
  • the HTML (Hypertext Markup Language) page is generated according to the device information of the specified device, and has an operation control corresponding to the control operation supported by the specified device, and is used for the user to perform control operations on the specified device, and is sent according to the control.
  • the generated control operation instructions are manipulated to control the operation of the specified device.
  • the mobile communication terminal generates an HTML page by acquiring feedback generated according to the device information of the specified device, and implements control of the Internet of Things device through the generated HTML page.
  • the device information carries the information related to the specified device, and the type of the information to be carried can be appropriately set by a person skilled in the art according to actual needs.
  • all the information supported by the designated device can be obtained through feedback generated according to the device information of the specified device.
  • HTML pages are widely used and supported by almost all operating systems.
  • the operation of the mobile communication terminal is controlled by the HTML page. There is no need to set a dedicated control mode for a single designated device, which improves the compatibility of device control.
  • the solution of the present embodiment solves the problem that the existing controlled device is complicated to implement, has poor compatibility, and wastes resources. The problem is achieved by achieving simple implementation, good compatibility, and full use of equipment resources.
  • 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.
  • the mobile communication terminal interacts with the designated device via the network control server.
  • the communication between the mobile communication terminal and the network control server, and between the network control server and the designated device all comply with the WebSocket protocol.
  • WebSocket protocol it is not limited thereto, and other similar communication protocols can also be referred to the present embodiment.
  • 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 supports the NPAPI (Netscape Plugin Application Programming Interface) mechanism, in which the NPAPI plug-in is set.
  • NPAPI Network Plugin Application Programming Interface
  • Each plugin in the Netscape plugin declares that it supports 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. It is parsed and displayed in the corresponding location of the web page.
  • 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, Sna shot 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).
  • MouseDown, MouseUp, KeyDown, KeyU and other interface functions javascript communicates with the server through websocket. After receiving the control command, it calls these javascript interface functions extended by NPAPI, such as controlling cursor position, simulating mouse click and keyboard press. , snapshots, power on and off, and more.
  • the device control method of this embodiment includes the following steps:
  • the mobile communication terminal obtains, from the network control server, information of at least one designated device to be controlled, where 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 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 the designated device identified by the network control server from the network control server Information and display.
  • the mobile communication terminal acquires the registration information of the specified device from the network control server, where the registration information of the designated device is the designated device to the network control server. Registered information; the mobile communication terminal locates the designated device according to the registration information of the specified device; or, the mobile communication terminal acquires the device identifier of the designated device, and sends the device identifier to the network control server; the network control server identifies the designated device according to the device identifier, and The recognition result is returned to the mobile communication terminal; the mobile communication terminal locates the designated device according to the recognition result. In this way, you can also obtain information about the specified device, which in turn can establish a connection with the specified device.
  • the mobile communication terminal establishes a WebSocket connection between the network control server and the designated device.
  • Step S206 The mobile communication terminal sends an information acquisition command to the network control server, and the network control server forwards the information acquisition command to the designated device.
  • the information obtaining command is used to obtain device information of the specified device.
  • the mobile communication terminal sends an information acquisition command to the network control server through the WebSocket connection between the mobile communication terminal and the network control server; the network control server forwards the information acquisition command to the designated device through the WebSocket connection between the mobile control server and the designated device. To get the device information of the specified device.
  • Step S208 The mobile communication terminal receives feedback from the network control server on the information acquisition command. Get the HTML page used to control the specified device.
  • the feedback of the network control server to the information acquisition command is generated according to the device information returned by the specified device.
  • the network control server receives the device information returned by the designated device, and determines a control operation supported by the specified device according to the device information; the network control server generates a corresponding HTML page according to the control operation supported by the specified device and sends the corresponding HTML page to the mobile communication terminal; The communication terminal obtains an HTML page;
  • the network control server receives the device information returned by the designated device, and determines a control operation supported by the designated device according to the device information; the network control server transmits information of the control operation supported by the specified device to the mobile communication terminal; the mobile communication terminal according to the designation The information of the control operation supported by the device generates a corresponding HTML page;
  • the network control server receives the device information returned by the designated device, where the device information carries information about the control operation supported by the specified device; the network control server generates an HTML page to send the mobile device according to the information of the control operation supported by the specified device.
  • a communication terminal the mobile communication terminal acquires an HTML page;
  • the network control server receives the device information returned by the designated device, and the device information carries information of the control operation supported by the specified device; the network control server forwards the information of the control operation supported by the specified device to the mobile communication terminal; The terminal generates an HTML page according to the information of the control operation supported by the specified device.
  • the network control server or the mobile communication terminal when the network control server or the mobile communication terminal generates the corresponding HTML page according to the control operation supported by the specified device, the network control server or the mobile communication terminal determines the corresponding HTML according to the control operation supported by the specified device.
  • the page element generates a corresponding control operation control according to the HTML page element; the control operation control is used to generate the HTML page.
  • Step S210 The mobile communication terminal performs a control operation on the designated device through the HTML page.
  • the mobile communication terminal displays an HTML page, and the user operates the operation control in the HTML page; the mobile communication terminal acquires operation information of the operation performed by the user, and then generates a corresponding control operation instruction; the mobile communication terminal sends the control operation to the network control server via the network control server Specify a device to implement control operations on the specified device.
  • the mobile communication terminal receives a control operation instruction for the user to perform a control operation on the designated device through the HTML page; the control operation instruction is sent to the network control server through the WebSocket connection, and the network operation server connects the control operation instruction through the WebSocket connection. Forwarding to the specified device, causing the designated device to implement the control operation indicated by the control operation instruction by calling the system API of the specified device through the NPAPI function according to the control operation instruction.
  • the mobile communication terminal listens to the user's operation on the HTML page through the HTML page; acquires the information of the operation through the DOM (Document Obj ect Model) event of the HTML page, according to the operation information Determine the control operation for the specified device and generate control operation instructions.
  • DOM Document Obj ect Model
  • FIG. 3 a flow chart of steps of a device control method according to a third embodiment of the present invention is shown.
  • the device control method of the present application is described by taking the mobile communication terminal as the mobile phone and the designated device as the PC, and generating an HTML page according to the device information of the specified device.
  • Step S302 Set up a network control server.
  • a network control server is built by 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 be built in other appropriate ways, 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.
  • 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 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 controlled designated device, it needs to input the controlled password and send it to the network.
  • the control server performs verification, and if the password is entered correctly, control is obtained.
  • Step 4 The network control server obtains the command of the controlled designated device, the control terminal, that is, the mobile communication terminal, and implements the transfer.
  • the device has a browser and browser extension with NPAPI mechanism, and the browser extension is controlled to specify that the device needs to rely on a browser extension (.crx, .xpi file).
  • the background page of the extension is an HTML page that is used to complete the server with the network control.
  • the communication, extension NPAPI plugin is a DLL that completes the system API call.
  • the background page of the controlled device browser extension program obtains the control operation command sent by the network control server, parses the command and calls the related function of NPAPI, and then calls the system API (such as mouse_event, keybd_event) by the NPAPI function. , OpenProcessToken , LookupPrivilege Value , AdjustTokenPrivileges , ExitWindowsEx , etc.) to complete the operation. This is because the browser extension program cannot directly call the system API, but can call the export function of the NPAPI plug-in.
  • the NPAPI plug-in is a DLL that can directly call the system API, thereby implementing the controlled specified device to execute the API of the system through the NPAPI. Accepted instructions.
  • Step S306 The mobile communication terminal selects the designated device, and sends a WebSocket information acquisition command to the network control server through the WebSocket connection, and requests to obtain the device information of the selected specified device.
  • Step S314 The network control server forwards the device information of the specified device to the mobile communication terminal through the WebSocket connection.
  • Step S316 The mobile communication terminal receives the device information of the designated device, obtains information about the control operation supported by the specified device, and generates a corresponding control operation control according to the information, and uses The control action control generates an HTML page corresponding to the specified device.
  • the HTML page generated by the mobile communication terminal is used for the user to perform control operations on the designated device, and sends a control operation instruction generated according to the control operation.
  • the generated HTML page is set as shown in FIG. That is, the mobile communication terminal learns from the device information of the designated device that the specified device supports the volume adjustment, the power on/off, the screenshot, the display desktop, and the like, and generates corresponding controls, and uses the generated controls to generate and control the designated device.
  • HTML page is only exemplary.
  • the actual control and HTML pages can be generated according to the specific operations supported by the specified device.
  • the generated HTML pages can be one or more.
  • a "select terminal" control is added to the generated HTML page, so that the user can return to the terminal selection page at any time as needed, and replace the required controlled terminal (ie, the controlled designated device).
  • the control operations performed on the specified device through the HTML page include: adjusting the volume, displaying the desktop, taking a screenshot, and shutting down.
  • the control terminal ie, the HTML page 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 controlled designated device, and the controlled designated device acquires the data.
  • the corresponding system API is called through the NPAPI plug-in mechanism to complete the corresponding operation.
  • Step S318 The mobile communication terminal receives an operation performed by the user on the designated device through the HTML page, and generates a control operation instruction according to the operation.
  • the DOM event of the HTML page acquires a button click information, thereby generating a corresponding control operation instruction.
  • Step S320 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 HTML page.
  • Step S322 The network control server uses the WebSocket connection to communicate with the controlled designated device, and sends a control operation instruction to the controlled designated device.
  • Step S324 The controlled designated device acquires 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.
  • Step S326 The controlled designated device invokes the API function of the system through the NPAPI function, and executes Controls the control operations indicated by the operation instructions.
  • the HTML page performs the specified device control as an example, and the device control method of the present application is described. However, it should be apparent to those skilled in the art that other ways of generating an HTML page can be combined with the foregoing embodiments and the present embodiment.
  • the mobile communication terminal such as the mobile phone
  • the mobile communication terminal comprehensively acquires the control operations supported by the designated device and performs the operation control on the designated device.
  • the new web standard and the characteristics of the mobile communication terminal such as the mobile phone are carried, and the mobile communication terminal, such as the mobile phone, is used as the input device of the designated device, and the convenience of the control of the designated device is maximized, and the user is greatly improved.
  • the operating experience of the specified device is carried, and the mobile communication terminal, such as the mobile phone, is used as the input device of the designated device, and the convenience of the control of the designated device is maximized, and the user is greatly improved.
  • the device control method of this embodiment does not require the participation of the network control server, and can be applied to control operations of devices in a set area (e.g., a room).
  • Step S402 The mobile communication terminal sends an information acquisition command to the designated device that successfully pairs.
  • the information obtaining command is used to obtain device information of the specified device.
  • the designated device in this embodiment may be an IoT intelligent terminal, such as a smart TV, a smart refrigerator, or the like.
  • Step S404 The mobile communication terminal generates an HTML page for performing control operations on the designated device according to the device information returned by the specified device, and controls the specified device through the HTML page.
  • the operation control of the mobile communication device to the designated device in the case of no server participation is realized.
  • the HTML page generated according to the device information of the specified device can obtain the control operations supported by the specified device, thereby fully utilizing the designated device and avoiding waste of resources of the device;
  • the HTML page is widely used and is almost All the pages supported by the operating system realize the operation control of the mobile communication terminal through the HTML page, which is simple to implement, and does not need to set a dedicated control mode for a single designated device, thereby improving the design.
  • FIG. 6 there is shown a flow chart showing the steps of a device control method according to a fifth embodiment of the present invention.
  • This embodiment is a further optimization scheme of the device control scheme in the fourth embodiment.
  • the device control method in this embodiment includes the following steps:
  • Step S502 The mobile communication terminal 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 identifier of the mobile communication terminal, and an IP address of the mobile communication terminal. This information can be used by the designated device to effectively identify the mobile communication terminal.
  • Step S504 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 smart television when the smart television receives a pairing request sent by the mobile communication terminal and carries the information of the mobile communication terminal, the smart communication terminal is identified; and then, the pairing response is sent to the mobile communication terminal, and the pairing response is Carrying its own information, such as the two-dimensional code of the smart TV, the two-dimensional code carries rich information, such as the identity, address, etc. of the smart TV; after the mobile communication terminal receives the pairing response, acquires the designated device Corresponding information, and then based on this information to establish a paired connection with the specified device.
  • the two-dimensional code carries rich information, such as the identity, address, etc. of the smart TV
  • Step S506 The mobile communication terminal sends an information acquisition command to the designated device that successfully pairs.
  • the information obtaining command is used to obtain device information of the specified device.
  • Device letter of the specified device Information may include the model number of the specified device, and/or, specify the control operations supported by the device
  • Step S508 The mobile communication terminal generates an HTML page for performing a control operation on the designated device according to the device information returned by the specified device.
  • the method includes: the mobile communication terminal determines, according to the device information returned by the specified device, a control operation supported by the specified device; determines a corresponding HTML page element according to a control operation supported by the specified device, and generates a corresponding control operation control according to the HTML page element. ; Use the control action controls to generate an HTML page.
  • the mobile communication terminal can search for the control operation supported by the smart TV of the model from the specified device data stored by itself, and generate a corresponding HTML page;
  • the information of the control operations supported by the mobile communication terminal is returned to the mobile communication terminal, and the mobile communication terminal can directly generate a corresponding HTML page based on the information.
  • the mobile communication terminal can also send the model information to the corresponding server through the wireless network to which it is connected, and then obtain the smart TV of the model from the server. Information about supported control operations, etc.
  • the mobile communication terminal monitors the user's operation on the HTML page through the HTML page; obtains the operation information through the DOM event of the HTML page, determines the control operation on the designated device according to the operation information, and generates a control operation instruction.
  • the operation control of the mobile communication device to the designated device is realized in the case of no server participation, and the existing controlled device is complicated to implement and has poor compatibility.
  • the problem of wasting resources the effect of simple implementation, good compatibility, and full utilization of equipment resources is achieved.
  • the mobile communication terminal of this embodiment includes: a first sending module 602, configured to send an information obtaining command to the network control server, where the network control server forwards the information obtaining command to the designated device, where the information obtaining command is used to obtain the designated device
  • the device information 604 is configured to receive feedback from the network control server on the information acquisition command, obtain an HTML page for performing control operations on the specified device, and perform control operations on the specified device through the HTML page, where the network control server pairs information The feedback of the get command is generated based on the device information returned by the specified device.
  • the obtaining module 604 is configured to receive the device information returned by the specified device by the network control server, determine a control operation supported by the specified device according to the device information, and receive and acquire the network control server to generate a corresponding operation according to the control operation supported by the specified device.
  • an HTML page or configured to receive, by the network control server, device information returned by the specified device, determine a control operation supported by the specified device according to the device information, and receive information about a control operation supported by the specified device sent by the network control server;
  • the information of the supported control operation generates a corresponding HTML page; or is configured to receive, by the network control server, device information returned by the specified device, where the device information carries information of a control operation supported by the specified device; and receives and acquires the network control server.
  • Controlling information receiving information of control operations supported by a specified device sent by the network control server; generating an HTML page based on information of control operations supported by the specified device.
  • the obtaining module 604 receives and acquires the corresponding HTML page generated by the network control server according to the control operation supported by the specified device, and receives and acquires the corresponding control HTML operation server according to the control operation supported by the specified device, and determines the corresponding HTML page.
  • the element generates a corresponding control operation control according to the HTML page element, and generates an HTML page by using the control operation control; or, the obtaining module 604 generates the corresponding HTML page according to the control operation supported by the specified device, according to the control supported by the specified device. Operation, determining the corresponding HTML page element, Generate corresponding control action controls based on HTML page elements; use control action controls to generate HTML pages.
  • the first sending module 602 is configured to send an information obtaining command to the network control server by using a WebSocket connection between the mobile communication terminal and the network control server; the network control server obtains an information obtaining command by using a WebSocket connection with the designated device. Forward to the specified device to obtain device information of the specified device.
  • the mobile communication terminal of this embodiment further includes: an identification module 606 configured to send an information acquisition command to the network control server in the first sending module 602, before the network control server forwards the information acquisition command to the designated device, from the network
  • the control server acquires at least one information of the specified device to be controlled, where 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, an IP address of the designated device, and the information of the specified device is identified and Displaying the specified device; or configuring the network control server to identify the designated device according to the information of the designated device to be controlled; and obtaining information of the specified device identified by the network control server from the network control server.
  • the mobile communication terminal of the embodiment further includes: a positioning module 608 configured to send an information acquisition command to the network control server in the first sending module 602, before the network control server forwards the information acquisition command to the designated device, from the network
  • the control server obtains the registration information of the specified device, where the registration information of the specified device is the information that the specified device registers with the network control server; locates the specified device according to the registration information of the specified device; or, is configured to obtain the device identifier of the specified device, and configure the device
  • the identifier is sent to the network control server; the network control server identifies the specified device according to the device identifier, and returns a recognition result; and locates the designated device according to the returned recognition result.
  • the obtaining module 604 receives a control operation instruction for the user to perform a control operation on the designated device through the HTML page when performing the control operation on the specified device through the HTML page; and sends the control operation instruction to the network control server through the WebSocket connection, which is controlled by the network
  • the server forwards the control operation instruction to the designated device through the WebSocket connection, so that the designated device invokes the system API of the specified device through the NPAPI function to implement the control operation indicated by the control operation instruction according to the control operation instruction.
  • the obtaining module 604 receives the user to control the specified device through the HTML page.
  • the operation instruction is controlled, the operation of the HTML page is monitored by the HTML page; the information of the operation is obtained through the DOM event of the HTML page, the control operation of the specified device is determined according to the information of the operation, and the control operation instruction is generated. .
  • 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 mobile communication terminal of this embodiment includes: a second sending module 702, configured to send an information obtaining command to a designated device that is successfully paired, where the information obtaining command is used to obtain device information of the specified device; and the generating module 704 is configured to be configured according to the specified
  • the device information returned by the device generates an HTML page for performing control operations on the specified device, and controls the specified device through an HTML page.
  • the mobile communication terminal of the embodiment further includes: a pairing module 706, configured to send a pairing request to the designated device before the second sending module 702 sends the information obtaining command to the designated device that successfully pairs, requesting to establish a pair with the designated device.
  • the connection wherein the pairing request includes information of the mobile communication terminal; receiving a pairing response returned by the designated device and carrying the information of the designated device, and establishing a paired 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 generating module 704 receives a control operation instruction for the user to perform a control operation on the designated device through the HTML page when performing the control operation on the specified device through the HTML page; and using the paired connection between the mobile communication terminal and the designated device to control the operation instruction Send to the specified device, so that the specified device performs control operations according to the control operation instructions.
  • the generating module 704 monitors the user's operation on the HTML page through the HTML page when receiving the control operation instruction that the user controls the specified device through the HTML page; and acquires the information of the operation through the DOM event of the HTML page, according to the The information of the operation determines a control operation for the designated device, and generates a control operation command.
  • the various component embodiments of the present invention may be implemented in hardware, or in software modules 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.
  • a program implementing the present invention may be stored on a computer readable medium or may have 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.

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 transmits an information acquisition command to a network control server, the network control server forwards the information acquisition command to a designated device, where the information acquisition command is for use in acquiring device information of the designated device; the mobile communication terminal receives a feedback on the information acquisition command by the network control server, acquires an HTML page for use in performing a control operation on the designated device, and performs the control operation on the designated device via the HTML page, where the feedback on the information acquisition command by the network control server is generated on the basis of the device information returned by the designated device. The effects of easy implementation of control of a controlled device by the mobile communication terminal, great compatibility, and full utilization of device resources 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 of communication technology and computer technology, the integration between networks is more and more extensive. For example, the interaction between a mobile communication terminal and a wired computer terminal is achieved through wireless and wired network convergence, or the interaction between the mobile communication terminal and an IoT intelligent terminal such as a smart TV is becoming more and more common.
目前, 人们使用移动通信终端控制受控设备依赖于设定的、 与受控设备 相对应的特定方式, 如, 在短信中携带指令, 通过短信中的指令控制受控设 备的方式。  Currently, people use a mobile communication terminal to control a controlled device depending on a specific mode that is set corresponding to the controlled device, such as carrying an instruction in a short message, and controlling the manner of controlling the device through an instruction in the short message.
然而,这种现有方式一方面需要针对每种受控设备设定相对应的控制方 式, 实现复杂, 并且更换受控设备时即需更换相应的控制方式, 兼容性差; 另一方面, 控制方式的种类由人为设定, 而人为设定的控制方式有限, 不能 最大程度地利用受控设备的功能, 造成资源浪费, 如人为设定对某一受控设 备的功能仅是开启和关闭, 则控制者只能开启或关闭该受控设备, 而无法使 用该受控设备的其它功能。 发明内容  However, this existing method needs to set a corresponding control mode for each controlled device on the one hand, and the implementation is complicated, and the corresponding control mode needs to be replaced when the controlled device is replaced, and the compatibility is poor; on the other hand, the control method The type is artificially set, and the artificially set control mode is limited. The function of the controlled device cannot be utilized to the greatest extent, resulting in waste of resources. If the function of a controlled device is only turned on and off, The controller can only turn the controlled device on or off, and cannot use other features of the controlled device. Summary of the invention
鉴于上述现有的受控设.备实现复杂、 兼容性差、 以及浪费资源的问题, 提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的 设备控制方法与移动通信终端。  In view of the above-mentioned problems of complicated implementation, poor compatibility, and waste of resources, the present invention has been made in order to provide a device control method and a mobile communication terminal that overcome the above problems or at least partially solve the above problems.
依据本发明的一个方面, 提供了一种设备控制方法, 包括: 移动通信终 端向网络控制服务器发送信息获取命令, 由所述网络控制服务器将所述信息 获取命令转发至指定设备, 其中, 所述信息获取命令用于获取所述指定设备 的设备信息; 所述移动通信终端接收所述网络控制服务器对所述信息获取命 令的反馈, 获取用于对所述指定设备进行控制操作的 HTML 页面, 通过所 述 HTML 页面对所述指定设备进行控制操作, 其中, 所述网络控制服务器 对所述信息获取命令的反馈根据所述指定设备返回的设备信息生成。 According to an aspect of the present invention, a device control method is provided, including: a mobile communication terminal transmitting an information acquisition command to a network control server, where the network control server forwards the information acquisition command to a designated device, where The information acquisition command is used to acquire device information of the specified device; the mobile communication terminal receives the network control server to acquire the information The feedback of the command is performed to obtain an HTML page for performing control operations on the specified device, and the specified device is controlled by the HTML page, wherein the network control server feeds back the information acquisition command according to the The device information returned by the specified device is generated.
根据本发明的再一方面, 提供了一种移动通信终端, 包括: 第一发送模 块, 配置为向网络控制服务器发送信息获取命令, 由所述网络控制服务器将 所述信息获取命令转发至指定设备, 其中, 所述信息获取命令用于获取所述 指定设备的设备信息; 获取模块, 配置为接收所述网络控制服务器对所述信 息获取命令的反馈, 获取用于对所述指定设备进行控制操作的 HTML页面, 通过所述 HTML 页面对所述指定设备进行控制操作, 其中, 所述网络控制 服务器对所述信息获取命令的反馈根据所述指定设备返回的设备信息生成。  According to still another aspect of the present invention, a mobile communication terminal is provided, including: a first sending module, configured to send an information acquisition command to a network control server, where the network control server forwards the information acquisition command to a designated device The information obtaining command is configured to acquire device information of the specified device, and the acquiring module is configured to receive feedback from the network control server on the information acquiring command, and obtain a control operation for the specified device. The HTML page is configured to perform a control operation on the specified device by using the HTML page, wherein the feedback of the information acquisition command by the network control server is generated according to the device information returned by the specified device.
依据本发明的另一个方面, 提供了另一种设备控制方法, 包括: 移动通 信终端向配对成功的指定设备发送信息获取命令, 其中, 所述信息获取命令 用于获取所述指定设备的设备信息; 所述移动通信终端根据所述指定设备返 回的设备信息, 生成用于对所述指定设备进行控制操作的 HTML 页面, 通 过所述 HTML页面对所述指定设备进行控制操作。  According to another aspect of the present invention, a device control method is provided, including: the mobile communication terminal sends an information acquisition command to a designated device that is successfully paired, wherein the information acquisition command is used to acquire device information of the specified device. And the mobile communication terminal generates an HTML page for performing control operations on the designated device according to the device information returned by the specified device, and performs a control operation on the designated device by using the HTML page.
依据本发明的又一个方面, 提供了另一种移动通信终端, 包括: 第二发 送模块, 用于向配对成功的指定设备发送信息获取命令, 其中, 所述信息获 取命令用于获取所述指定设备的设备信息; 生成模块, 用于根据所述指定设 备返回的设备信息, 生成用于对所述指定设备进行控制操作的 HTML页面, 通过所述 HTML页面对所述指定设备进行控制操作。  According to still another aspect of the present invention, a mobile communication terminal is provided, including: a second sending module, configured to send an information acquisition command to a designated device that is successfully paired, wherein the information obtaining command is used to obtain the specified The device information of the device is configured to generate, according to the device information returned by the specified device, an HTML page for performing a control operation on the specified device, and perform a control operation on the specified device by using the HTML page.
依据本发明的再一个方面,提供了一种在其上记录有用于执行上述设备 控制方法的程序的计算机可读记录介质。  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页面是被 广泛应用和为几乎所有操作系统支持的页面, 通过 HTML 页面实现移动通 信终端对设备的操作控制, 实现简单, 无须针对单个指定设备设置专用的控 制方式, 提高了设备控制的兼容性; 并且, 在移动通信终端侧和指定设备侧 均无须专门的操作控制软件,操作方便、 实现简单、 兼容性好、 实现成本低。 通过本发明的方案, 解决了现有的受控设^"实现复杂 兼容性差、 以及浪费 资源的问题, 达到了实现简单、 兼容性好、 充分利用设备资源的效果。 According to the device control scheme of the present invention, the mobile communication terminal generates an HTML page by acquiring feedback generated based on the device information of the specified device, and controls the IoT device through the generated HTML page. The device information carries the information related to the specified device, and the type of the information to be carried can be appropriately set by a person skilled in the art according to actual needs. On the one hand, all the information supported by the designated device can be obtained through feedback generated according to the device information of the specified device. Control operations to fully utilize designated devices to avoid wasting resources on devices; on the other hand, HTML pages are Widely used and supported by almost all operating systems, the operation of the mobile communication terminal to control the device through the HTML page is simple, and it is not necessary to set a dedicated control mode for a single designated device, thereby improving the compatibility of device control; The mobile communication terminal side and the designated device side do not need special operation control software, and the operation is convenient, the implementation is simple, the compatibility is good, and the implementation cost is low. The solution of the present invention solves the problem that the existing controlled device realizes poor complex compatibility and wastes resources, and achieves the effects of simple implementation, good compatibility, and full utilization of device resources.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技 术手段, 而可依照说明书的内容予以实施, 并且为了让本发明的上述和其它 目的、 特征和优点能够更明显易懂, 以下特举本发明的具体实施方式。 附图说明  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 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页面的界面示意图;  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; A flow chart of steps of a device control method; FIG. 4 is a schematic diagram of an interface of an HTML page in the embodiment shown in FIG.
图 5是根据本发明实施例四的一种设备控制方法的步骤流程图; 图 6是根据本发明实施例五的一种设备控制方法的步骤流程图; 图 Ί是根据本发明实施例六的一种移动通信终端的结构框图;  5 is a flow chart showing the steps of a device control method according to Embodiment 4 of the present invention; FIG. 6 is a flow chart showing the steps of a device control method according to Embodiment 5 of the present invention; A structural block diagram of a mobile communication terminal;
图 8是根据本发明实施例七的一种移动通信终端的结构框图。 具体实施方式 下面将参照附图更详细地描述本公开的示例性实施例。 虽然附图中显示 了本公开的示例性实施例, 然而应当理解, 可以以各种形式实现本公开而不 应被这里阐述的实施例所限制。 相反, 提供这些实施例是为了能够更透彻地 理解本公开, 并且能够将本公开的范围完整的传达给本领域的技术人员。 实施例一 Figure 8 is a block diagram showing the structure of a mobile communication terminal according to a seventh embodiment of the present invention. DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While the embodiments of the present invention have been shown in the drawings, the embodiments Rather, these embodiments are provided so that this disclosure will be more fully understood, and the scope of the disclosure may be fully disclosed 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: 移动通信终端向网络控制服务器发送信息获取命令, 由网 络控制服务器将信息获取命令转发至指定设备。  Step S102: The mobile communication terminal sends an information acquisition command to the network control server, and the network control server forwards the information acquisition command to the designated device.
其中, 信息获取命令用于获取指定设备的设备信息。  The information obtaining command is used to obtain device information of the specified device.
指定设备可能是计算机终端设备如 PC,也可能是物联网中的终端设备。 步骤 S104: 移动通信终端接收网络控制服务器对信息获取命令的反馈, 获取用于对指定设备进行控制操作的 HTML页面, 通过 HTML页面对指定 设备进行控制操作。  The specified device may be a computer terminal device such as a PC or a terminal device in the Internet of Things. Step S104: The mobile communication terminal receives the feedback of the network control server for the information acquisition command, obtains an HTML page for performing control operations on the designated device, and performs a control operation on the designated device through the HTML page.
其中, 网络控制服务器对信息获取命令的反馈根据指定设备返回的设备 信息生成。  The feedback of the network control server to the information acquisition command is generated according to the device information returned by the specified device.
HTML ( Hypertext Markup Language, 超文本标记语言) 页面根据指定 设备的设备信息生成, 具有与指定设备所支持的控制操作相对应的操作控 件, 用于供用户对指定设备进行控制操作, 并发送根据控制操作生成的控制 操作指令, 进而控制指定设备的操作。  The HTML (Hypertext Markup Language) page is generated according to the device information of the specified device, and has an operation control corresponding to the control operation supported by the specified device, and is used for the user to perform control operations on the specified device, and is sent according to the control. The generated control operation instructions are manipulated to control the operation of the specified device.
通过本实施例,移动通信终端通过获取根据指定设备的设备信息生成的 反馈, 生成 HTML页面, 通过该生成的 HTML页面实现对物联网设备的控 制。 设备信息中携带有与指定设备相关的信息, 具体携带的信息种类可以由 本领域技术人员根据实际需求适当设置, 一方面, 通过根据指定设备的设备 信息生成的反馈, 能够获取指定设备所支持的所有控制操作, 从而全面利用 指定设备, 避免设备的资源浪费; 另一方面, HTML页面是被广泛应用和为 几乎所有操作系统支持的页面, 通过 HTML 页面实现移动通信终端对设备 的操作控制, 实现简单, 无须针对单个指定设备设置专用的控制方式, 提高 了设备控制的兼容性; 并且, 在移动通信终端侧和指定设备侧均无须专门的 操作控制软件, 操作方便、 实现简单、 兼容性好、 实现成本低。 通过本实施 例的方案, 解决了现有的受控设备实现复杂、 兼容性差、 以及浪费资源的问 题, 达到了实现简单、 兼容性好、 充分利用设备资源的效果。 With the embodiment, the mobile communication terminal generates an HTML page by acquiring feedback generated according to the device information of the specified device, and implements control of the Internet of Things device through the generated HTML page. The device information carries the information related to the specified device, and the type of the information to be carried can be appropriately set by a person skilled in the art according to actual needs. On the one hand, all the information supported by the designated device can be obtained through feedback generated according to the device information of the specified device. Control operations to fully utilize designated devices to avoid waste of resources on the device. On the other hand, HTML pages are widely used and supported by almost all operating systems. The operation of the mobile communication terminal is controlled by the HTML page. There is no need to set a dedicated control mode for a single designated device, which improves the compatibility of device control. Moreover, no special operation control software is required on the mobile communication terminal side and the designated device side, and the operation is convenient, the implementation is simple, the compatibility is good, and the implementation is realized. low cost. The solution of the present embodiment solves the problem that the existing controlled device is complicated to implement, has poor compatibility, and wastes resources. The problem is achieved by achieving simple implementation, good compatibility, and full use of equipment resources.
实施例二  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, the mobile communication terminal interacts with the designated device via the network control server. Preferably, the communication between the mobile communication terminal and the network control server, and between the network control server and the designated device all comply with the WebSocket protocol. However, it is not limited thereto, and other similar communication protocols can also be referred to the present embodiment.
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 ( Netscape Plugin Application Programming Interface , 网景插件应用程序接 口)机制, 其中设置有 NPAPI插件。 NPAPI是用于在浏览器中执行外部应 用程序的通用接口。 网景插件中的每个插件声明自己支持某一种或几种内容 类型, 当浏览器遇到这种类型的内容时, 便在插件库寻找一种能够解码的插 件, 将这部分内容交由其解析, 并在网页对应的位置中显示出来。 通过浏览 器中的 NPAPI 能够调用系统中相应的 API ( Application Programming Interface, 应用程序接口), 实现相应的功能, 如关机、 调节音量、 控制鼠标 操作等。 例如, 浏览器通过 NPAPI机制(目前该机制已被应用于 chromium, 基于 Chromium开源项目开发的浏览器及 firefox等浏览器中), 向扩展程序 网页中的 javascript 脚本提供了 SetCursorPos、 Shutdown , Sna shot , MouseDown、 MouseUp、 KeyDown、 KeyU 等接口函数, javascript 通过 websocket与服务端通信, 接受到控制命令后, 调用这些通过 NPAPI来扩充 的 javascript接口函数, 实现了诸如控制光标位置, 模拟鼠标点击及键盘按 下, 快照, 开关机等多种功能。 基于以上设置, 本实施例的设备控制方法包括以下步骤: In this embodiment, based on the WebSocket protocol, the specified device supports the NPAPI (Netscape Plugin Application Programming Interface) mechanism, in which the NPAPI plug-in is set. NPAPI is a generic interface for executing external applications in a browser. Each plugin in the Netscape plugin declares that it supports 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. It is parsed and displayed in the corresponding location of the web page. 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, Sna shot 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). MouseDown, MouseUp, KeyDown, KeyU and other interface functions, javascript communicates with the server through websocket. After receiving the control command, it calls these javascript interface functions extended by NPAPI, such as controlling cursor position, simulating mouse click and keyboard press. , snapshots, power on and off, and more. Based on the above settings, the device control method of this embodiment includes the following steps:
步骤 S202: 移动通信终端识别并显示指定设备。  Step S202: The mobile communication terminal recognizes and displays the designated device.
包括: 移动通信终端从网络控制服务器获取至少一个待控制的指定设备 的信息, 其中, 指定设备的信息包括以下至少之一: 指定设备的二维码、 指 定设备的标识、 指定设备的 IP地址; 移动通信终端通过指定设备的信息识 别并显示指定设备; 或者, 网络控制服务器根据待控制的指定设备的信息, 识别指定设备; 移动通信终端从网络控制服务器处获取网络控制服务器识别 出的指定设备的信息并显示。  The mobile communication terminal obtains, from the network control server, information of at least one designated device to be controlled, where 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 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 the designated device identified by the network control server from the network control server Information and display.
需要说明的是,指定设备信息的获取和识别也可以釆用定位的方式,如, 移动通信终端从网络控制服务器获取指定设备的注册信息, 其中, 指定设备 的注册信息为指定设备向网络控制服务器注册的信息; 移动通信终端根据指 定设备的注册信息定位指定设备; 或者, 移动通信终端获取指定设备的设备 标识, 将设备标识发送至网络控制服务器; 网络控制服务器根据设备标识识 别指定设备, 并将识别结果返回给移动通信终端; 移动通信终端根据识别结 果定位指定设备。 这样, 也可以获得指定设备的相关信息, 进而可以与指定 设备建立起连接。  It should be noted that the acquiring and identifying of the specified device information may also be performed by using a positioning method. For example, the mobile communication terminal acquires the registration information of the specified device from the network control server, where the registration information of the designated device is the designated device to the network control server. Registered information; the mobile communication terminal locates the designated device according to the registration information of the specified device; or, the mobile communication terminal acquires the device identifier of the designated device, and sends the device identifier to the network control server; the network control server identifies the designated device according to the device identifier, and The recognition result is returned to the mobile communication terminal; the mobile communication terminal locates the designated device according to the recognition result. In this way, you can also obtain information about the specified device, which in turn can establish a connection with the specified device.
步骤 S204: 移动通信终端选择一个指定设备, 与选择的该指定设备建 立连接。  Step S204: The mobile communication terminal selects a designated device to establish a connection with the selected designated device.
本实施例中,移动通信终端通过网络控制服务器与指定设备之间建立起 WebSocket连接。  In this embodiment, the mobile communication terminal establishes a WebSocket connection between the network control server and the designated device.
步骤 S206: 移动通信终端向网络控制服务器发送信息获取命令, 由网 络控制服务器将信息获取命令转发至指定设备。  Step S206: The mobile communication terminal sends an information acquisition command to the network control server, and the network control server forwards the information acquisition command to the designated device.
其中, 信息获取命令用于获取指定设备的设备信息。  The information obtaining command is used to obtain device information of the specified device.
本实施例中, 移动通信终端通过其与网络控制服务器之间的 WebSocket 连接向网络控制服务器发送信息获取命令; 网络控制服务器通过其与指定设 备之间的 WebSocket连接将信息获取命令转发给指定设备, 以获取指定设备 的设备信息。  In this embodiment, the mobile communication terminal sends an information acquisition command to the network control server through the WebSocket connection between the mobile communication terminal and the network control server; the network control server forwards the information acquisition command to the designated device through the WebSocket connection between the mobile control server and the designated device. To get the device information of the specified device.
步骤 S208: 移动通信终端接收网络控制服务器对信息获取命令的反馈, 获取用于对指定设备进行控制操作的 HTML页面。 Step S208: The mobile communication terminal receives feedback from the network control server on the information acquisition command. Get the HTML page used to control the specified device.
其中, 网络控制服务器对信息获取命令的反馈根据指定设备返回的设备 信息生成。  The feedback of the network control server to the information acquisition command is generated according to the device information returned by the specified device.
本步骤的实现方式包括但不限于以下几种方式:  The implementation of this step includes but is not limited to the following ways:
( 1 ) 网络控制服务器接收指定设备返回的设备信息, 根据设备信息确 定指定设备所支持的控制操作; 网络控制服务器根据指定设备所支持的控制 操作生成对应的 HTML 页面并发送给移动通信终端; 移动通信终端获取 HTML页面;  (1) the network control server receives the device information returned by the designated device, and determines a control operation supported by the specified device according to the device information; the network control server generates a corresponding HTML page according to the control operation supported by the specified device and sends the corresponding HTML page to the mobile communication terminal; The communication terminal obtains an HTML page;
或者,  Or,
( 2 ) 网络控制服务器接收指定设备返回的设备信息, 根据设备信息确 定指定设备所支持的控制操作; 网络控制服务器将指定设备所支持的控制操 作的信息发送给移动通信终端; 移动通信终端根据指定设备所支持的控制操 作的信息生成对应的 HTML页面;  (2) the network control server receives the device information returned by the designated device, and determines a control operation supported by the designated device according to the device information; the network control server transmits information of the control operation supported by the specified device to the mobile communication terminal; the mobile communication terminal according to the designation The information of the control operation supported by the device generates a corresponding HTML page;
或者,  Or,
( 3 ) 网络控制服务器接收指定设备返回的设备信息 , 所述设备信息中 携带有指定设备所支持的控制操作的信息; 网络控制服务器根据指定设备所 支持的控制操作的信息生成 HTML 页面发送给移动通信终端; 移动通信终 端获取 HTML页面;  (3) The network control server receives the device information returned by the designated device, where the device information carries information about the control operation supported by the specified device; the network control server generates an HTML page to send the mobile device according to the information of the control operation supported by the specified device. a communication terminal; the mobile communication terminal acquires an HTML page;
或者,  Or,
( 4 ) 网络控制服务器接收指定设备返回的设备信息, 设备信息中携带 有指定设备所支持的控制操作的信息; 网络控制服务器将指定设备所支持的 控制操作的信息转发给移动通信终端; 移动通信终端根据指定设备所支持的 控制操作的信息生成 HTML页面。  (4) The network control server receives the device information returned by the designated device, and the device information carries information of the control operation supported by the specified device; the network control server forwards the information of the control operation supported by the specified device to the mobile communication terminal; The terminal generates an HTML page according to the information of the control operation supported by the specified device.
优选地, 上述过程中, 网络控制服务器或移动通信终端根据指定设备所 支持的控制操作生成对应的 HTML 页面时, 网络控制服务器或移动通信终 端根据指定设备所支持的控制操作, 确定相对应的 HTML 页面元素, 根据 HTML页面元素生成相对应的控制操作控件;使用控制操作控件生成 HTML 页面。 步骤 S210: 移动通信终端通过 HTML页面对指定设备进行控制操作。 移动通信终端显示 HTML页面, 用户对 HTML页面中的操作控件进行 操作; 移动通信终端获取用户进行操作的操作信息, 进而生成相应的控制操 作指令; 移动通信终端将该控制操作经由网络控制服务器发送给指定设备, 从而实现对指定设备的控制操作。 Preferably, in the above process, when the network control server or the mobile communication terminal generates the corresponding HTML page according to the control operation supported by the specified device, the network control server or the mobile communication terminal determines the corresponding HTML according to the control operation supported by the specified device. The page element generates a corresponding control operation control according to the HTML page element; the control operation control is used to generate the HTML page. Step S210: The mobile communication terminal performs a control operation on the designated device through the HTML page. The mobile communication terminal displays an HTML page, and the user operates the operation control in the HTML page; the mobile communication terminal acquires operation information of the operation performed by the user, and then generates a corresponding control operation instruction; the mobile communication terminal sends the control operation to the network control server via the network control server Specify a device to implement control operations on the specified device.
本实施例中, 移动通信终端接收用户通过 HTML 页面对指定设备进行 控制操作的控制操作指令;通过 WebSocket连接将该控制操作指令发送给网 络控制服务器, 由网络控制服务器通过 WebSocket连接将该控制操作指令转 发至指定设备,使指定设备根据该控制操作指令,通过 NPAPI函数调用指定 设备的系统 API实现该控制操作指令所指示的控制操作。  In this embodiment, the mobile communication terminal receives a control operation instruction for the user to perform a control operation on the designated device through the HTML page; the control operation instruction is sent to the network control server through the WebSocket connection, and the network operation server connects the control operation instruction through the WebSocket connection. Forwarding to the specified device, causing the designated device to implement the control operation indicated by the control operation instruction by calling the system API of the specified device through the NPAPI function according to the control operation instruction.
优选地,上述过程中 ,移动通信终端通过 HTML页面监听用户对 HTML 页面的操作; 通过 HTML页面的 DOM ( Document Obj ect Model , 文档对象 模型)事件获取所述操作的信息, 根据所述操作的信息确定对指定设备的控 制操作, 生成控制操作指令。  Preferably, in the above process, the mobile communication terminal listens to the user's operation on the HTML page through the HTML page; acquires the information of the operation through the DOM (Document Obj ect Model) event of the HTML page, according to the operation information Determine the control operation for the specified device and generate control operation 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.
通过本实施例, 实现了移动通信终端作为遥控器的功能, 该移动通信终 端遥控器通过 WebSocket的双向通信完机制完成移动通信终端经由网络控制 服务器与指定设备之间的通信,进而由指定设备通过 NPAPI的插件机制调用 系统的 API执行相应的控制操作,从而实现了移动通信终端对指定设备的全 面操控。  With the embodiment, the function of the mobile communication terminal as the remote controller is realized, and the remote controller of the mobile communication terminal completes the communication between the mobile communication terminal and the designated device via the network control server through the two-way communication mechanism of the WebSocket, and then passes by the designated device. The plug-in mechanism of NPAPI calls the API of the system to perform corresponding control operations, thereby realizing the overall manipulation of the designated device by the mobile communication terminal.
实施例三  Embodiment 3
参照图 3 , 示出了根据本发明实施例三的一种设备控制方法的步骤流程 图。 本实施例中, 以移动通信终端为手机, 指定设备为 PC, 根据指定设备 的设备信息生成 HTML页面为例, 对本申请的设备控制方法作以说明。 Referring to FIG. 3, a flow chart of steps of a device control method according to a third embodiment of the present invention is shown. In this embodiment, the device control method of the present application is described by taking the mobile communication terminal as the mobile phone and the designated device as the PC, and generating an HTML page according to the device information of the specified device.
本实施例的设备控制方法包括以下步骤:  The device control method of this embodiment includes the following steps:
步骤 S302: 搭建网络控制服务器。  Step S302: Set up a network control server.
本实施例中, 用 Node.js搭建网络控制服务器。 Node.js是一套用来编写 高性能网络服务器的 JavaScript工具包, 具有单线程、 非阻塞 10、 事件驱动 等等诸多优势。 当然, 不限于此, 网络控制服务器也可以使用其它适当方式 搭建,如搭建成 Apache (阿帕奇)服务器等。网络控制服务器通过 WebSocket 协议, 在移动通信终端和移动通信终端控制的指定设备之间建立起连接。  In this embodiment, a network control server is built by 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, it is not limited to this, the network control server can also be built in other appropriate ways, 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.
网络控制服务器的搭建包括:  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 controlled designated device, it needs to input the controlled password and send it to the network. The control server performs verification, and if the password is entered correctly, control is obtained.
第四步: 网络控制服务器获取受控指定设备、 控制端即移动通信终端的 命令并实现中转。  Step 4: The network control server obtains the command of the controlled 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: 设置指定设备。  Step S304: 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 is controlled to specify that the device needs to rely on a browser extension (.crx, .xpi file). The background page of the extension is an HTML page that is used to complete the server with the network control. The communication, extension 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 command to the controlled designated device by using the WebSocket, so that the controlled designated device accepts the command of the control terminal, that is, the mobile communication terminal. Take action.
受控指定设备浏览器扩展程序的后台页面获取网络控制服务器发来的 控制操作指令后, 解析命令并调用 NPAPI的相关函数, 再由 NPAPI的函数 调用系统的 API (如 mouse— event , keybd— event , OpenProcessToken , LookupPrivilege Value , AdjustTokenPrivileges , ExitWindowsEx等)完成操作。 这是因为 ,浏览器扩展程序是不能直接调用系统 API的 ,但是可以调用 NPAPI 插件的导出函数, NPAPI插件是一个 DLL, 可以直接调用系统 API, 从而实 现受控指定设备通过 NPAPI调用系统的 API执行接受到的指令。  The background page of the controlled device browser extension program obtains the control operation command sent by the network control server, parses the command and calls the related function of NPAPI, and then calls the system API (such as mouse_event, keybd_event) by the NPAPI function. , OpenProcessToken , LookupPrivilege Value , AdjustTokenPrivileges , ExitWindowsEx , etc.) to complete the operation. This is because the browser extension program cannot directly call the system API, but can call the export function of the NPAPI plug-in. The NPAPI plug-in is a DLL that can directly call the system API, thereby implementing the controlled specified device to execute the API of the system through the NPAPI. Accepted instructions.
需要说明的是, 上述步骤 S302、 S304之间的执行可以不分先后顺序。 在移动通信终端、 网络控制服务器和指定设备完成了上述相应设置后, 即可开始移动通信终端与受控指定设备的交互操作了, 包括:  It should be noted that the execution between the foregoing steps S302 and S304 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 interaction between the mobile communication terminal and the controlled designated device can be started, including:
步骤 S306: 移动通信终端选择指定设备, 通过 WebSocket连接向网络 控制服务器发送 WebSocket信息获取命令,请求获取选择的指定设备的设备 信息。  Step S306: The mobile communication terminal selects the designated device, and sends a WebSocket information acquisition command to the network control server through the WebSocket connection, and requests to obtain the device information of the selected specified device.
步骤 S308: 网络控制服务器通过 WebSocket连接将 WebSocket信息获 取命令转发给指定设备。  Step S308: The network control server forwards the WebSocket information acquisition command to the designated device through the WebSocket connection.
步骤 S310: 指定设备接收 WebSocket信息获取命令, 根据 WebSocket 信息获取命令调用 NPAPI函数, 通过 NPAPI函数调用系统 API函数, 获取 系统所支持的控制操作。  Step S310: The designated device receives the WebSocket information obtaining command, invokes the NPAPI function according to the WebSocket information obtaining command, and invokes the system API function through the NPAPI function to obtain the control operation supported by the system.
步骤 S312: 指定设备将其所支持的控制操作的信息携带在设备信息中, 通过 WebSocket连接发送给网络控制服务器。  Step S312: The designated device carries the information of the control operations supported by the device in the device information, and sends the information to the network control server through the WebSocket connection.
步骤 S314: 网络控制服务器通过 WebSocket连接将指定设备的设备信 息转发给移动通信终端。  Step S314: The network control server forwards the device information of the specified device to the mobile communication terminal through the WebSocket connection.
步骤 S316: 移动通信终端接收指定设备的设备信息, 从中获取指定设 备所支持的控制操作的信息, 根据该信息生成相对应的控制操作控件, 使用 控制操作控件生成对应于该指定设备的 HTML页面。 Step S316: The mobile communication terminal receives the device information of the designated device, obtains information about the control operation supported by the specified device, and generates a corresponding control operation control according to the information, and uses The control action control generates an HTML page corresponding to the specified device.
移动通信终端生成的 HTML 页面, 用于供用户对指定设备进行控制操 作, 发送根据控制操作生成的控制操作指令。  The HTML page generated by the mobile communication terminal is used for the user to perform control operations on the designated device, and sends a control operation instruction generated according to the control operation.
本实施例中, 设定生成的 HTML页面如图 4所示。 也即, 移动通信终 端从指定设备的设备信息中获知, 指定设备支持音量调节、 开关机、 屏幕截 图、 显示桌面等控制操作, 则生成相对应的控件, 使用生成的控件生成对指 定设备进行控制的 HTML 页面。 当然, 以上控制操作仅为示例性说明, 实 际的控件和 HTML 页面可以根据获得的指定设备所支持的具体操作生成, 生成的 HTML页面可以为一个或多个。此外,本实施例中,在生成的 HTML 页面中还增加了 "选择终端"控件, 以便用户根据需要随时返回终端选择页 面, 更换需要的受控终端 (即受控指定设备)。  In this embodiment, the generated HTML page is set as shown in FIG. That is, the mobile communication terminal learns from the device information of the designated device that the specified device supports the volume adjustment, the power on/off, the screenshot, the display desktop, and the like, and generates corresponding controls, and uses the generated controls to generate and control the designated device. HTML page. Of course, the above control operations are only exemplary. The actual control and HTML pages can be generated according to the specific operations supported by the specified device. The generated HTML pages can be one or more. In addition, in this embodiment, a "select terminal" control is added to the generated HTML page, so that the user can return to the terminal selection page at any time as needed, and replace the required controlled terminal (ie, the controlled designated device).
通过该 HTML 页面对指定设备进行的控制操作包括: 调节音量、 显示 桌面、 截屏和关机等。 实现时, 控制端即移动通信终端的 HTML 页面监听 各个按钮的点击事件, 然后将相应的信息发送到网络控制服务器, 网络控制 服务器再将数据发送到受控指定设备, 受控指定设备获取到数据后根据数据 的类型通过 NPAPI插件机制调用相应的系统 API完成相应的操作。  The control operations performed on the specified device through the HTML page include: adjusting the volume, displaying the desktop, taking a screenshot, and shutting down. In implementation, the control terminal, ie, the HTML page 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 controlled designated device, and the controlled designated device acquires the data. After that, according to the type of data, the corresponding system API is called through the NPAPI plug-in mechanism to complete the corresponding operation.
步骤 S318: 移动通信终端接收用户通过 HTML页面对指定设备进行的 操作, 根据该操作生成控制操作指令。  Step S318: The mobile communication terminal receives an operation performed by the user on the designated device through the HTML page, and generates a control operation instruction according to the operation.
当用户通过 HTML 页面的按钮发起操作 (如调节音量、 显示桌面、 截 屏和关机等)时, HTML页面的 DOM事件获取按钮点击信息, 进而生成相 应的控制操作指令。  When a user initiates an operation through a button of an HTML page (such as adjusting volume, displaying a desktop, cutting a screen, and shutting down, etc.), the DOM event of the HTML page acquires a button click information, thereby generating a corresponding control operation instruction.
步骤 S320: 移动通信终端使用 WebSocket连接与网络控制服务器通信, 通过 HTML页面将控制操作指令发送给网络控制服务器。  Step S320: 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 HTML page.
步骤 S322: 网络控制服务器使用 WebSocket连接与受控指定设备通信, 将控制操作指令发送给受控指定设备。  Step S322: The network control server uses the WebSocket connection to communicate with the controlled designated device, and sends a control operation instruction to the controlled designated device.
步骤 S324: 受控指定设备通过浏览器扩展程序的后台页面获取网络控 制服务器发送的控制操作指令, 调用相关 NPAPI函数。  Step S324: The controlled designated device acquires 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.
步骤 S326: 受控指定设备通过 NPAPI函数调用系统的 API函数, 执行 控制操作指令指示的控制操作。 Step S326: The controlled designated device invokes the API function of the system through the NPAPI function, and executes Controls the control operations indicated by the operation instructions.
本实施例以指定设备在设备信息中携带指定设备所支持的控制操作的 信息, 网络控制服务器将该信息转发给移动通信终端, 由移动通信终端生成 In this embodiment, the specified device carries the information of the control operation supported by the specified device in the device information, and the network control server forwards the information to the mobile communication terminal, and is generated by the mobile communication terminal.
HTML页面进行指定设备控制为例, 对本申请的设备控制方法进行了说明。 但本领域技术人员应当明了, 其它生成 HTML 页面的方式均可结合前述实 施例和本实施例进行。 通过本实施例, 实现了移动通信终端如手机全面获取 指定设备所支持的控制操作, 对指定设备进行操作控制的功能。 本实施例利 用新的 Web标准及移动通信终端如手机随身携带的特性, 将移动通信终端 如手机作为指定设备的输入设备,在最大限度地扩展指定设备控制便捷性的 同时, 极大地改善了用户对指定设备的操作体验。 The HTML page performs the specified device control as an example, and the device control method of the present application is described. However, it should be apparent to those skilled in the art that other ways of generating an HTML page can be combined with the foregoing embodiments and the present embodiment. With the embodiment, the mobile communication terminal, such as the mobile phone, comprehensively acquires the control operations supported by the designated device and performs the operation control on the designated device. In this embodiment, the new web standard and the characteristics of the mobile communication terminal such as the mobile phone are carried, and the mobile communication terminal, such as the mobile phone, is used as the input device of the designated device, and the convenience of the control of the designated device is maximized, and the user is greatly improved. The operating experience of the specified device.
实施例四  Embodiment 4
参照图 5, 示出了根据本发明实施例四的一种设备控制方法的步骤流程 图。  Referring to Fig. 5, 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 does not require the participation of the network control server, and can be applied to control operations of devices in a set area (e.g., a room).
本实施例的设备控制方法包括以下步骤:  The device control method of this embodiment includes the following steps:
步骤 S402: 移动通信终端向配对成功的指定设备发送信息获取命令。 其中, 信息获取命令用于获取指定设备的设备信息。 本实施例中的指定 设备可以是物联网智能终端, 如智能电视机、 智能冰箱等。  Step S402: The mobile communication terminal sends an information acquisition command to the designated device that successfully pairs. The information obtaining command is used to obtain device information of the specified device. The designated device in this embodiment may be an IoT intelligent terminal, such as a smart TV, a smart refrigerator, or the like.
步骤 S404: 移动通信终端根据指定设备返回的设备信息, 生成用于对 指定设备进行控制操作的 HTML页面, 通过 HTML页面对指定设备进行控 制操作。  Step S404: The mobile communication terminal generates an HTML page for performing control operations on the designated device according to the device information returned by the specified device, and controls the specified device through the HTML page.
通过本实施例,实现了无服务器参与情形下,移动通信设备对指定设备, 如物联网终端设备的操作控制。 一方面, 通过根据指定设备的设备信息生成 的 HTML 页面, 能够获取指定设备所支持的控制操作, 从而全面利用指定 设备, 避免设备的资源浪费; 另一方面, HTML页面是被广泛应用和为几乎 所有操作系统支持的页面, 通过 HTML 页面实现移动通信终端对设备的操 作控制, 实现简单, 无须针对单个指定设备设置专用的控制方式, 提高了设 备控制的兼容性; 并且, 在移动通信终端侧和指定设备侧均无须专门的操作 控制软件, 操作方便、 实现简单、 兼容性好、 实现成本低。 可见, 通过本实 施例的方案, 解决了现有的受控设备实现复杂、 兼容性差、 以及浪费资源的 问题, 达到了实现简单、 兼容性好、 充分利用设备资源的效果。 Through the embodiment, the operation control of the mobile communication device to the designated device, such as the Internet of Things terminal device, in the case of no server participation is realized. On the one hand, the HTML page generated according to the device information of the specified device can obtain the control operations supported by the specified device, thereby fully utilizing the designated device and avoiding waste of resources of the device; on the other hand, the HTML page is widely used and is almost All the pages supported by the operating system realize the operation control of the mobile communication terminal through the HTML page, which is simple to implement, and does not need to set a dedicated control mode for a single designated device, thereby improving the design. The compatibility of the standby control; Moreover, no special operation control software is required on the mobile communication terminal side and the designated device side, and the operation is convenient, the implementation is simple, the compatibility is good, and the implementation cost is low. It can be seen that, through the solution of the embodiment, the problem that the existing controlled device is complicated to implement, has poor compatibility, and wastes resources is solved, and the effects of simple implementation, good compatibility, and full utilization of device resources are achieved.
实施例五  Embodiment 5
参照图 6, 示出了根据本发明实施例五的一种设备控制方法的步骤流程 图。  Referring to Fig. 6, there is shown a flow chart showing the steps of a device control method according to a fifth embodiment of the present invention.
本实施例是实施例四的设备控制方案的进一步优化方案,本实施例的设 备控制方法包括以下步骤:  This embodiment is a further optimization scheme of the device control scheme in the fourth embodiment. The device control method in this embodiment includes the following steps:
步骤 S502: 移动通信终端向指定设备发送配对请求, 请求与指定设备 建立配对连接。  Step S502: The mobile communication terminal 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.
优选地, 移动通信终端的信息包括以下至少之一: 移动通信终端的二维 码、 移动通信终端的标识、 移动通信终端的 IP地址。 这些信息可以供指定 设备有效地识别出移动通信终端。  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 identifier of the mobile communication terminal, and an IP address of the mobile communication terminal. This information can be used by the designated device to effectively identify the mobile communication terminal.
步骤 S504: 移动通信终端接收指定设备返回的、 携带有指定设备的信 息的配对响应, 根据配对响应建立与指定设备的配对连接。  Step S504: 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. The mobile communication terminal can effectively identify the designated device based on the information of the specified devices, thereby establishing a paired connection with the designated device.
以智能电视为例, 当智能电视接收到移动通信终端发送的携带有移动通 信终端的信息的配对请求后, 识别出该移动通信终端; 然后, 向该移动通信 终端发送配对响应,在该配对响应中携带自身的信息,如智能电视的二维码, 该二维码中携带有丰富的信息, 如智能电视的标识、 地址等等; 在移动通信 终端收到该配对响应后, 获取指定设备的相应信息, 进而根据这些信息与指 定设备建立配对连接。  Taking a smart television as an example, when the smart television receives a pairing request sent by the mobile communication terminal and carries the information of the mobile communication terminal, the smart communication terminal is identified; and then, the pairing response is sent to the mobile communication terminal, and the pairing response is Carrying its own information, such as the two-dimensional code of the smart TV, the two-dimensional code carries rich information, such as the identity, address, etc. of the smart TV; after the mobile communication terminal receives the pairing response, acquires the designated device Corresponding information, and then based on this information to establish a paired connection with the specified device.
步骤 S506: 移动通信终端向配对成功的指定设备发送信息获取命令。 其中, 信息获取命令用于获取指定设备的设备信息。 指定设备的设备信 息可以包括有指定设备的型号, 和 /或, 指定设备所支持的控制操作 Step S506: The mobile communication terminal sends an information acquisition command to the designated device that successfully pairs. The information obtaining command is used to obtain device information of the specified device. Device letter of the specified device Information may include the model number of the specified device, and/or, specify the control operations supported by the device
比如, 智能电视在收到信息获取命令后, 可以向移动通信终端返回智能 电视的型号, 也可以返回智能电视所支持的控制操作如开关机、 音量调节、 频道调节等等, 还可以两种信息都返回。 当然, 还可以在设备信息中携带其 它更多相关的信息。  For example, after receiving the information acquisition command, the smart TV can return the model of the smart TV to the mobile communication terminal, and can also return to the control operations supported by the smart TV, such as power on/off, volume adjustment, channel adjustment, etc., and two types of information. Both return. Of course, it is also possible to carry other more relevant information in the device information.
步骤 S508: 移动通信终端根据指定设备返回的设备信息, 生成用于对 指定设备进行控制操作的 HTML页面。  Step S508: The mobile communication terminal generates an HTML page for performing a control operation on the designated device according to the device information returned by the specified device.
包括: 移动通信终端根据指定设备返回的设备信息, 确定指定设备所支 持的控制操作; 根据指定设备所支持的控制操作, 确定相对应的 HTML 页 面元素, 根据 HTML 页面元素生成相对应的控制操作控件; 使用控制操作 控件生成 HTML页面。  The method includes: the mobile communication terminal determines, according to the device information returned by the specified device, a control operation supported by the specified device; determines a corresponding HTML page element according to a control operation supported by the specified device, and generates a corresponding control operation control according to the HTML page element. ; Use the control action controls to generate an HTML page.
例如, 若智能电视仅将型号信息返回给移动通信终端, 则移动通信终端 可以从自身存储的指定设备数据中查找该型号的智能电视所支持的控制操 作, 进而生成相应的 HTML 页面; 若智能电视将其所支持的控制操作的信 息返回给了移动通信终端, 则移动通信终端可以直接根据这些信息生成相应 的 HTML 页面。 另外, 如前所述, 当智能电视仅将型号信息返回给移动通 信终端时,移动通信终端还可以通过其连接的无线网络向相应的服务器发送 该型号信息,进而从服务器获取该型号的智能电视所支持的控制操作的信息 等。  For example, if the smart TV only returns the model information to the mobile communication terminal, the mobile communication terminal can search for the control operation supported by the smart TV of the model from the specified device data stored by itself, and generate a corresponding HTML page; The information of the control operations supported by the mobile communication terminal is returned to the mobile communication terminal, and the mobile communication terminal can directly generate a corresponding HTML page based on the information. In addition, as described above, when the smart TV only returns the model information to the mobile communication terminal, the mobile communication terminal can also send the model information to the corresponding server through the wireless network to which it is connected, and then obtain the smart TV of the model from the server. Information about supported control operations, etc.
步骤 S510: 移动通信终端通过 HTML页面对指定设备进行控制操作。 包括: 移动通信终端接收用户通过 HTML 页面对指定设备进行控制操 作的控制操作指令;使用移动通信终端和指定设备之间的配对连接将控制操 作指令发送给指定设备, 使指定设备根据控制操作指令进行控制操作。  Step S510: The mobile communication terminal performs a control operation on the designated device through the HTML page. The method includes: a mobile communication terminal receives a control operation instruction that a user controls a specified device through an HTML page; and uses a paired connection between the mobile communication terminal and the designated device to send a control operation instruction to the designated device, so that the designated device performs the operation according to the control operation instruction. Control operation.
优选地,上述过程中 ,移动通信终端通过 HTML页面监听用户对 HTML 页面的操作; 通过 HTML页面的 DOM事件获取操作的信息,根据操作的信 息确定对指定设备的控制操作, 生成控制操作指令。  Preferably, in the above process, the mobile communication terminal monitors the user's operation on the HTML page through the HTML page; obtains the operation information through the DOM event of the HTML page, determines the control operation on the designated device according to the operation information, and generates a control operation instruction.
通过本实施例,实现了无服务器参与情形下,移动通信设备对指定设备, 如物联网终端设备的操作控制,解决了现有的受控设备实现复杂、兼容性差、 以及浪费资源的问题, 达到了实现简单、 兼容性好、 充分利用设备资源的效 果。 Through the embodiment, the operation control of the mobile communication device to the designated device, such as the Internet of Things terminal device, is realized in the case of no server participation, and the existing controlled device is complicated to implement and has poor compatibility. As well as the problem of wasting resources, the effect of simple implementation, good compatibility, and full utilization of equipment resources is achieved.
实施例六  Embodiment 6
参照图 7,示出了根据本发明实施例六的一种移动通信终端的结构框图。 本实施例的移动通信终端包括: 第一发送模块 602, 配置为向网络控制 服务器发送信息获取命令, 由网络控制服务器将信息获取命令转发至指定设 备, 其中, 信息获取命令用于获取指定设备的设备信息; 获取模块 604, 配 置为接收网络控制服务器对信息获取命令的反馈,获取用于对指定设备进行 控制操作的 HTML页面,通过 HTML页面对指定设备进行控制操作, 其中, 网络控制服务器对信息获取命令的反馈根据指定设备返回的设备信息生成。  Referring to Fig. 7, there is shown a block diagram showing the structure of a mobile communication terminal according to a sixth embodiment of the present invention. The mobile communication terminal of this embodiment includes: a first sending module 602, configured to send an information obtaining command to the network control server, where the network control server forwards the information obtaining command to the designated device, where the information obtaining command is used to obtain the designated device The device information 604 is configured to receive feedback from the network control server on the information acquisition command, obtain an HTML page for performing control operations on the specified device, and perform control operations on the specified device through the HTML page, where the network control server pairs information The feedback of the get command is generated based on the device information returned by the specified device.
优选地, 获取模块 604, 配置为由网络控制服务器接收指定设备返回的 设备信息, 根据设备信息确定指定设备所支持的控制操作; 接收并获取网络 控制服务器根据指定设备所支持的控制操作生成对应的 HTML页面; 或者, 配置为由网络控制服务器接收指定设备返回的设备信息,根据设备信息确定 指定设备所支持的控制操作;接收网络控制服务器发送的指定设备所支持的 控制操作的信息;根据指定设备所支持的控制操作的信息生成对应的 HTML 页面; 或者, 配置为由网络控制服务器接收指定设备返回的设备信息, 设备 信息中携带有指定设备所支持的控制操作的信息;接收并获取网络控制服务 器根据指定设备所支持的控制操作的信息生成 HTML 页面; 或者, 配置为 由网络控制服务器接收指定设备返回的设备信息 ,设备信息中携带有指定设 备所支持的控制操作的信息;接收网络控制服务器发送的指定设备所支持的 控制操作的信息; 根据指定设备所支持的控制操作的信息生成 HTML页面。  Preferably, the obtaining module 604 is configured to receive the device information returned by the specified device by the network control server, determine a control operation supported by the specified device according to the device information, and receive and acquire the network control server to generate a corresponding operation according to the control operation supported by the specified device. Or an HTML page; or configured to receive, by the network control server, device information returned by the specified device, determine a control operation supported by the specified device according to the device information, and receive information about a control operation supported by the specified device sent by the network control server; The information of the supported control operation generates a corresponding HTML page; or is configured to receive, by the network control server, device information returned by the specified device, where the device information carries information of a control operation supported by the specified device; and receives and acquires the network control server. Generating an HTML page according to the information of the control operation supported by the specified device; or configuring the network control server to receive the device information returned by the specified device, where the device information carries the information supported by the specified device. Controlling information; receiving information of control operations supported by a specified device sent by the network control server; generating an HTML page based on information of control operations supported by the specified device.
优选地,获取模块 604在接收并获取网络控制服务器根据指定设备所支 持的控制操作生成的对应的 HTML 页面时, 接收并获取网络控制服务器根 据指定设备所支持的控制操作,确定相对应的 HTML页面元素,根据 HTML 页面元素生成相对应的控制操作控件, 使用控制操作控件生成 HTML页面; 或者, 获取模块 604在根据指定设备所支持的控制操作生成对应的 HTML 页面时, 根据指定设备所支持的控制操作, 确定相对应的 HTML页面元素, 根据 HTML 页面元素生成相对应的控制操作控件; 使用控制操作控件生成 HTML页面。 Preferably, the obtaining module 604 receives and acquires the corresponding HTML page generated by the network control server according to the control operation supported by the specified device, and receives and acquires the corresponding control HTML operation server according to the control operation supported by the specified device, and determines the corresponding HTML page. The element generates a corresponding control operation control according to the HTML page element, and generates an HTML page by using the control operation control; or, the obtaining module 604 generates the corresponding HTML page according to the control operation supported by the specified device, according to the control supported by the specified device. Operation, determining the corresponding HTML page element, Generate corresponding control action controls based on HTML page elements; use control action controls to generate HTML pages.
优选地, 第一发送模块 602, 配置为通过移动通信终端与网络控制服务 器之间的 WebSocket连接向网络控制服务器发送信息获取命令; 网络控制服 务器通过其与指定设备之间的 WebSocket连接将信息获取命令转发给指定设 备, 以获取指定设备的设备信息。  Preferably, the first sending module 602 is configured to send an information obtaining command to the network control server by using a WebSocket connection between the mobile communication terminal and the network control server; the network control server obtains an information obtaining command by using a WebSocket connection with the designated device. Forward to the specified device to obtain device information of the specified device.
优选地, 本实施例的移动通信终端还包括: 识别模块 606, 配置为在第 一发送模块 602向网络控制服务器发送信息获取命令, 由网络控制服务器将 信息获取命令转发至指定设备之前 ,从网络控制服务器获取至少一个待控制 的指定设备的信息, 其中, 指定设备的信息包括以下至少之一: 指定设备的 二维码、 指定设备的标识、 指定设备的 IP地址; 通过指定设备的信息识别 并显示指定设备; 或者, 配置为由网络控制服务器根据待控制的指定设备的 信息, 识别指定设备; 从网络控制服务器处获取网络控制服务器识别出的指 定设备的信息。  Preferably, the mobile communication terminal of this embodiment further includes: an identification module 606 configured to send an information acquisition command to the network control server in the first sending module 602, before the network control server forwards the information acquisition command to the designated device, from the network The control server acquires at least one information of the specified device to be controlled, where 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, an IP address of the designated device, and the information of the specified device is identified and Displaying the specified device; or configuring the network control server to identify the designated device according to the information of the designated device to be controlled; and obtaining information of the specified device identified by the network control server from the network control server.
优选地, 本实施例的移动通信终端还包括: 定位模块 608, 配置为在第 一发送模块 602向网络控制服务器发送信息获取命令, 由网络控制服务器将 信息获取命令转发至指定设备之前,从网络控制服务器获取指定设备的注册 信息,其中,指定设备的注册信息为指定设备向网络控制服务器注册的信息; 根据指定设备的注册信息定位指定设备; 或者, 配置为获取指定设备的设备 标识, 将设备标识发送至网络控制服务器; 由网络控制服务器根据设备标识 识别指定设备, 并返回识别结果; 根据返回的识别结果定位指定设备。  Preferably, the mobile communication terminal of the embodiment further includes: a positioning module 608 configured to send an information acquisition command to the network control server in the first sending module 602, before the network control server forwards the information acquisition command to the designated device, from the network The control server obtains the registration information of the specified device, where the registration information of the specified device is the information that the specified device registers with the network control server; locates the specified device according to the registration information of the specified device; or, is configured to obtain the device identifier of the specified device, and configure the device The identifier is sent to the network control server; the network control server identifies the specified device according to the device identifier, and returns a recognition result; and locates the designated device according to the returned recognition result.
优选地, 获取模块 604在通过 HTML页面对指定设备进行控制操作时, 接收用户通过 HTML 页面对指定设备进行控制操作的控制操作指令; 通过 WebSocket连接将控制操作指令发送给网络控制服务器, 由网络控制服务器 通过 WebSocket连接将控制操作指令转发至指定设备,使指定设备根据控制 操作指令, 通过 NPAPI函数调用指定设备的系统 API实现控制操作指令所 指示的控制操作。  Preferably, the obtaining module 604 receives a control operation instruction for the user to perform a control operation on the designated device through the HTML page when performing the control operation on the specified device through the HTML page; and sends the control operation instruction to the network control server through the WebSocket connection, which is controlled by the network The server forwards the control operation instruction to the designated device through the WebSocket connection, so that the designated device invokes the system API of the specified device through the NPAPI function to implement the control operation indicated by the control operation instruction according to the control operation instruction.
优选地, 获取模块 604在接收用户通过 HTML页面对指定设备进行控 制操作的控制操作指令时,通过 HTML页面监听用户对 HTML页面的操作; 通过 HTML页面的 DOM事件获取所述操作的信息,根据所述操作的信息确 定对指定设备的控制操作, 生成控制操作指令。 Preferably, the obtaining module 604 receives the user to control the specified device through the HTML page. When the operation instruction is controlled, the operation of the HTML page is monitored by the HTML page; the information of the operation is obtained through the DOM event of the HTML page, the control operation of the specified device is determined according to the information of the operation, and the control operation instruction is generated. .
本实施例移动通信终端用于实现前述方法实施例一至三中相应的设备 控制方法, 并具有相应的方法实施例的有益效果, 在此不再赘述。  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.
实施例七  Example 7
参照图 8,示出了根据本发明实施例七的一种移动通信终端的结构框图。 本实施例的移动通信终端包括: 第二发送模块 702, 配置为向配对成功 的指定设备发送信息获取命令, 其中, 信息获取命令用于获取指定设备的设 备信息; 生成模块 704, 配置为根据指定设备返回的设备信息, 生成用于对 指定设备进行控制操作的 HTML页面, 通过 HTML页面对所述指定设备进 行控制操作。  Referring to Figure 8, there is shown a block diagram of a structure of a mobile communication terminal according to a seventh embodiment of the present invention. The mobile communication terminal of this embodiment includes: a second sending module 702, configured to send an information obtaining command to a designated device that is successfully paired, where the information obtaining command is used to obtain device information of the specified device; and the generating module 704 is configured to be configured according to the specified The device information returned by the device generates an HTML page for performing control operations on the specified device, and controls the specified device through an HTML page.
优选地, 生成模块 704, 配置为根据指定设备返回的设备信息, 确定指 定设备所支持的控制操作; 根据指定设备所支持的控制操作, 确定相对应的 HTML页面元素, 根据 HTML页面元素生成相对应的控制操作控件; 使用 控制操作控件生成 HTML页面;通过 HTML页面对指定设备进行控制操作。  Preferably, the generating module 704 is configured to: determine, according to the device information returned by the specified device, a control operation supported by the specified device; determine, according to the control operation supported by the specified device, the corresponding HTML page element, and generate corresponding information according to the HTML page element. Control operation control; use control operation control to generate HTML page; control operation on specified device through HTML page.
优选地, 本实施例的移动通信终端还包括: 配对模块 706, 配置为在第 二发送模块 702向配对成功的指定设备发送信息获取命令之前, 向指定设备 发送配对请求, 请求与指定设备建立配对连接, 其中, 配对请求中包括有移 动通信终端的信息; 接收指定设备返回的、 携带有指定设备的信息的配对响 应, 根据配对响应建立与指定设备的配对连接。  Preferably, the mobile communication terminal of the embodiment further includes: a pairing module 706, configured to send a pairing request to the designated device before the second sending module 702 sends the information obtaining command to the designated device that successfully pairs, requesting to establish a pair with the designated device. The connection, wherein the pairing request includes information of the mobile communication terminal; receiving a pairing response returned by the designated device and carrying the information of the designated device, and establishing a paired 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.
优选地, 生成模块 704在通过 HTML页面对指定设备进行控制操作时, 接收用户通过 HTML 页面对指定设备进行控制操作的控制操作指令; 使用 移动通信终端和指定设备之间的配对连接将控制操作指令发送给指定设备, 使指定设备根据控制操作指令进行控制操作。 优选地, 生成模块 704在接收用户通过 HTML页面对指定设备进行控 制操作的控制操作指令时,通过 HTML页面监听用户对 HTML页面的操作; 通过 HTML页面的 DOM事件获取所述操作的信息,根据所述操作的信息确 定对指定设备的控制操作, 生成控制操作指令。 Preferably, the generating module 704 receives a control operation instruction for the user to perform a control operation on the designated device through the HTML page when performing the control operation on the specified device through the HTML page; and using the paired connection between the mobile communication terminal and the designated device to control the operation instruction Send to the specified device, so that the specified device performs control operations according to the control operation instructions. Preferably, the generating module 704 monitors the user's operation on the HTML page through the HTML page when receiving the control operation instruction that the user controls the specified device through the HTML page; and acquires the information of the operation through the DOM event of the HTML page, according to the The information of the operation determines a control operation for the designated device, and generates a control operation command.
本实施例移动通信终端用于实现前述方法实施例四至五中相应的设备 控制方法, 并具有相应的方法实施例的有益效果, 在此不再赘述。 本发明还提供一种在其上记录有用于执行前述实施例一至五中任一设 备控制方法的程序的计算机可读记录介质。 所述计算机可读记录介质包括用 于以计算机可读的形式存储或传送信息的任何机制。 例如, 机器可读介质包 括只读存储器(ROM )、 随机存取存储器(RAM )、 磁盘存储介质、 光存储 介质、 闪速存储介质、 电、 光、 声或其他形式的传播信号(例如, 载波、 红 外信号、 数字信号等)等。  The mobile communication terminal of this embodiment is used to implement the corresponding device control method in the foregoing method embodiments 4 to 5, and has the beneficial effects of the corresponding method embodiment, 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 one of the foregoing embodiments 1 to 5. 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, well-known methods, structures, and techniques have not been 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 claims. Rather, as the following claims reflect, inventive aspects reside in less than all features of the single embodiments disclosed. Therefore, follow the implementation The claims of the present invention are hereby expressly incorporated into this particular embodiment, and each of the claims
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自 适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。 可以 把实施例中的模块或单元或组件组合成一个模块或单元或组件, 以及此外可 以把它们分成多个子模块或子单元或子组件。除了这样的特征和 /或过程或者 单元中的至少一些是相互排斥之外, 可以釆用任何组合对本说明书(包括伴 随的权利要求、 摘要和附图)中公开的所有特征以及如此公开的任何方法或 者设备的所有过程或单元进行组合。 除非另外明确陈述, 本说明书(包括伴 随的权利要求、 摘要和附图) 中公开的每个特征可以由提供相同、 等同或相 似目的的替代特征来代替。  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 software modules 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 a program implementing the present invention may be stored on a computer readable medium or may have 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 invention and are not intended to limit the scope of 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 in the claims. Bit The word "a" or "an" preceding an element 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 hardware item. The use of the words first, second, and third does not indicate any order. These words can be interpreted as names.

Claims

1、 一种设备控制方法, 包括: 1. A device control method, including:
移动通信终端向网络控制服务器发送信息获取命令, 由所述网络控制服 务器将所述信息获取命令转发至指定设备, 其中, 所述信息获取命令用于获 取所述指定设备的设备信息; The mobile communication terminal sends an information acquisition command to the network control server, and the network control server forwards the information acquisition command to the designated device, where the information acquisition command is used to obtain device information of the designated device;
所述移动通信终端权接收所述网络控制服务器对所述信息获取命令的反 馈,获取用于对所述指定设备进行控制操作的 HTML页面,通过所述 HTML 页面对所述指定设备进行控制操作, 其中, 所述网络控制服务器对所述信息 获取命令的反馈根据所述指定设备返回的设备信息生成。 The mobile communication terminal receives feedback from the network control server on the information acquisition command, obtains an HTML page for controlling the designated device, and performs control operations on the designated device through the HTML page, Wherein, the network control server's feedback to the information acquisition command is generated based on the device information returned by the designated device.
2、 根据权利要求 1 所述的方法, 其中, 所述移动通信终端接收所述网 络控制服务器对所述信息获取命令的反馈, 获取用于对所述指定设备进行控 制操作的 HTML页面的步骤包括: 2. The method according to claim 1, wherein the mobile communication terminal receives feedback from the network control server on the information acquisition command, and the step of obtaining an HTML page for controlling the designated device includes: :
所述网络控制服务器接收所述指定设备返回的书设备信息,根据所述设备 信息确定所述指定设备所支持的控制操作; The network control server receives the device information returned by the designated device, and determines the control operations supported by the designated device based on the device information;
所述网络控制服务器根据所述指定设备所支持的控制操作生成对应的 HTML页面并发送给所述移动通信终端; The network control server generates a corresponding HTML page based on the control operations supported by the designated device and sends it to the mobile communication terminal;
所述移动通信终端获取所述 HTML页面; The mobile communication terminal obtains the HTML page;
或者, or,
所述网络控制服务器接收所述指定设备返回的设备信息,根据所述设备 信息确定所述指定设备所支持的控制操作; The network control server receives the device information returned by the designated device, and determines the control operations supported by the designated device according to the device information;
所述网络控制服务器将所述指定设备所支持的控制操作的信息发送给 所述移动通信终端; The network control server sends information about the control operations supported by the designated device to the mobile communication terminal;
所述移动通信终端根据所述指定设备所支持的控制操作的信息生成对 应的 HTML页面; The mobile communication terminal generates a corresponding HTML page based on information about control operations supported by the designated device;
或者, or,
所述网络控制服务器接收所述指定设备返回的设备信息,所述设备信息 中携带有所述指定设备所支持的控制操作的信息; The network control server receives the device information returned by the designated device, where the device information carries information about control operations supported by the designated device;
所述网络控制服务器根据所述指定设备所支持的控制操作的信息生成 HTML页面发送给所述移动通信终端; 所述移动通信终端获取所述 HTML页面; The network control server generates an HTML page based on information about control operations supported by the designated device and sends it to the mobile communication terminal; The mobile communication terminal obtains the HTML page;
或者, or,
所述网络控制服务器接收所述指定设备返回的设备信息,所述设备信息 中携带有所述指定设备所支持的控制操作的信息; The network control server receives the device information returned by the designated device, where the device information carries information about control operations supported by the designated device;
所述网络控制服务器将所述指定设备所支持的控制操作的信息转发给 所述移动通信终端; The network control server forwards the information about the control operations supported by the designated device to the mobile communication terminal;
所述移动通信终端根据所述指定设备所支持的控制操作的信息生成 HTML页面。 The mobile communication terminal generates an HTML page based on information about control operations supported by the specified device.
3、 根据权利要求 2所述的方法, 其中, 所述网络控制服务器或所述移 动通信终端根据所述指定设备所支持的控制操作生成对应的 HTML 页面的 步骤包括: 3. The method according to claim 2, wherein the step of the network control server or the mobile communication terminal generating the corresponding HTML page according to the control operation supported by the designated device includes:
所述网络控制服务器或所述移动通信终端根据所述指定设备所支持的 控制操作, 确定相对应的 HTML页面元素, 根据所述 HTML页面元素生成 相对应的控制操作控件; The network control server or the mobile communication terminal determines the corresponding HTML page element according to the control operation supported by the designated device, and generates the corresponding control operation control according to the HTML page element;
使用所述控制操作控件生成所述 HTML页面。 The HTML page is generated using the control operation control.
4、 根据权利要求 1 所述的方法, 其中, 所述移动通信终端向网络控制 服务器发送信息获取命令 , 由所述网络控制服务器将所述信息获取命令转发 至指定设备的步骤包括: 4. The method according to claim 1, wherein the mobile communication terminal sends an information acquisition command to a network control server, and the step of forwarding the information acquisition command to a designated device by the network control server includes:
所述移动通信终端通过其与所述网络控制服务器之间的 WebSocket连 接向所述网络控制服务器发送所述信息获取命令; 所述网络控制服务器通过 其与所述指定设备之间的 WebSocket连接将所述信息获取命令转发给所述指 定设备, 以获取所述指定设备的设备信息。 The mobile communication terminal sends the information acquisition command to the network control server through the WebSocket connection between the mobile communication terminal and the network control server; the network control server transmits the information acquisition command through the WebSocket connection between the network control server and the designated device. The information acquisition command is forwarded to the specified device to obtain device information of the specified device.
5、 根据权利要求 1 所述的方法, 其中, 在所述移动通信终端向网络控 制服务器发送信息获取命令 , 由所述网络控制服务器将所述信息获取命令转 发至指定设备的步骤之前, 还包括: 5. The method according to claim 1, wherein before the mobile communication terminal sends an information acquisition command to a network control server, and the network control server forwards the information acquisition command to a designated device, it further 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 movement The 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 information of the designated device identified by the network control server from the network control server.
6、 根据权利要求 1 所述的方法, 其中, 在所述移动通信终端向网络控 制服务器发送信息获取命令 , 由所述网络控制服务器将所述信息获取命令转 发至指定设备的步骤之前, 还包括: 6. The method according to claim 1, wherein before the mobile communication terminal sends an information acquisition command to a network control server, and the network control server forwards the information acquisition command to a designated device, it further includes :
所述移动通信终端从所述网络控制服务器获取所述指定设备的注册信 息, 其中, 所述指定设备的注册信息为所述指定设备向所述网络控制服务器 注册的信息; The mobile communication terminal obtains the registration information of the designated device from the network control server, wherein the registration information of the designated device is the information registered by the designated device with the network control server;
所述移动通信终端根据所述指定设备的注册信息定位所述指定设备; 或者, The mobile communication terminal locates the designated device according to the registration information of the designated device; or,
所述移动通信终端获取所述指定设备的设备标识,将所述设备标识发送 至所述网络控制服务器; The mobile communication terminal obtains the device identification of the designated device and sends the device identification to the network control server;
所述网络控制服务器根据所述设备标识识别所述指定设备,并将所述识 别结果返回给所述移动通信终端; The network control server identifies the designated device according to the device identification, and returns the identification result to the mobile communication terminal;
所述移动通信终端根据所述识别结果定位所述指定设备。 The mobile communication terminal locates the designated device according to the identification result.
7、 根据权利要求 1所述的方法, 其中, 所述通过所述 HTML页面对所 述指定设备进行控制操作的步骤包括: 7. The method according to claim 1, wherein the step of controlling the designated device through the HTML page includes:
所述移动通信终端接收用户通过所述 HTML 页面对所述指定设备进行 控制操作的控制操作指令; The mobile communication terminal receives a control operation instruction from the user to control the designated device through the HTML page;
通过 WebSocket连接将所述控制操作指令发送给所述网络控制服务器, 由所述网络控制服务器通过 WebSocket连接将所述控制操作指令转发至所述 指定设备,使所述指定设备根据所述控制操作指令,通过 NPAPI函数调用所 述指定设备的系统 API实现所述控制操作指令所指示的控制操作。 The control operation instruction is sent to the network control server through the WebSocket connection, and the network control server forwards the control operation instruction to the designated device through the WebSocket connection, so that the designated device operates according to the control operation instruction. , calling the system API of the specified device through the NPAPI function to implement the control operation indicated by the control operation instruction.
8、 根据权利要求 7所述的方法, 其中, 所述移动通信终端接收用户通 过所述 HTML 页面对所述指定设备进行控制操作的控制操作指令的步骤包 括: 8. The method according to claim 7, wherein the mobile communication terminal receives a step package of control operation instructions from the user to control the designated device through the HTML page. Includes:
所述移动通信终端通过所述 HTML页面监听所述用户对所述 HTML页 面的操作; The mobile communication terminal monitors the user's operation on the HTML page through the HTML page;
通过所述 HTML页面的 DOM事件获取所述操作的信息,根据所述操作 的信息确定对所述指定设备的控制操作, 生成所述控制操作指令。 The operation information is obtained through the DOM event of the HTML page, the control operation on the designated device is determined based on the operation information, and the control operation instruction is generated.
9、 一种移动通信终端, 包括: 9. A mobile communication terminal, including:
第一发送模块, 配置为向网络控制服务器发送信息获取命令, 由所述网 络控制服务器将所述信息获取命令转发至指定设备, 其中, 所述信息获取命 令用于获取所述指定设备的设备信息; The first sending module is configured to send an information acquisition command to the network control server, and the network control server forwards the information acquisition command to the designated device, where the information acquisition command is used to obtain device information of the designated device. ;
获取模块, 配置为接收所述网络控制服务器对所述信息获取命令的反 馈,获取用于对所述指定设备进行控制操作的 HTML页面,通过所述 HTML 页面对所述指定设备进行控制操作, 其中, 所述网络控制服务器对所述信息 获取命令的反馈根据所述指定设备返回的设备信息生成。 The acquisition module is configured to receive feedback from the network control server on the information acquisition command, obtain an HTML page for controlling the designated device, and perform control operations on the designated device through the HTML page, wherein , the network control server's feedback to the information acquisition command is generated based on the device information returned by the designated device.
10、 根据权利要求 9所述的移动通信终端, 其中, 所述获取模块, 配置 为由所述网络控制服务器接收所述指定设备返回的设备信息,根据所述设备 信息确定所述指定设备所支持的控制操作;接收并获取所述网络控制服务器 根据所述指定设备所支持的控制操作生成对应的 HTML页面; 10. The mobile communication terminal according to claim 9, wherein the acquisition module is configured to receive the device information returned by the designated device by the network control server, and determine what the designated device supports based on the device information. Control operations; receive and obtain the corresponding HTML page generated by the network control server according to the control operations supported by the designated device;
或者, or,
配置为由所述网络控制服务器接收所述指定设备返回的设备信息,根据 所述设备信息确定所述指定设备所支持的控制操作;接收所述网络控制服务 器发送的所述指定设备所支持的控制操作的信息;根据所述指定设备所支持 的控制操作的信息生成对应的 HTML页面; The network control server is configured to receive device information returned by the designated device, determine control operations supported by the designated device based on the device information, and receive control operations supported by the designated device sent by the network control server. Operation information; generate a corresponding HTML page based on the control operation information supported by the specified device;
或者, or,
配置为由所述网络控制服务器接收所述指定设备返回的设备信息,所述 设备信息中携带有所述指定设备所支持的控制操作的信息;接收并获取所述 网络控制服务器根据所述指定设备所支持的控制操作的信息生成 HTML 页 面; Configured to receive, by the network control server, device information returned by the specified device, where the device information carries information about control operations supported by the specified device; receive and obtain the information of the network control server according to the specified device Generate HTML pages with information about supported control operations;
或者, 配置为由所述网络控制服务器接收所述指定设备返回的设备信息,所述 设备信息中携带有所述指定设备所支持的控制操作的信息;接收所述网络控 制服务器发送的所述指定设备所支持的控制操作的信息;根据所述指定设备 所支持的控制操作的信息生成 HTML页面。 or, Configured to receive, by the network control server, device information returned by the designated device, where the device information carries information about control operations supported by the designated device; and receive the information sent by the network control server and sent by the designated device. Information on supported control operations; generate an HTML page based on information on control operations supported by the specified device.
11、 根据权利要求 10所述的移动通信终端, 其中, 11. The mobile communication terminal according to claim 10, wherein,
所述获取模块在接收并获取所述网络控制服务器根据所述指定设备所 支持的控制操作生成的对应的 HTML 页面时, 接收并获取所述网络控制服 务器根据所述指定设备所支持的控制操作, 确定相对应的 HTML页面元素, 根据所述 HTML 页面元素生成相对应的控制操作控件, 使用所述控制操作 控件生成所述 HTML页面; When the acquisition module receives and acquires the corresponding HTML page generated by the network control server according to the control operations supported by the specified device, it receives and acquires the control operations supported by the network control server according to the specified device, Determine the corresponding HTML page element, generate the corresponding control operation control according to the HTML page element, and use the control operation control to generate the HTML page;
或者, or,
所述获取模块在根据所述指定设备所支持的控制操作生成对应的 HTML页面时,根据所述指定设备所支持的控制操作,确定相对应的 HTML 页面元素, 根据所述 HTML 页面元素生成相对应的控制操作控件; 使用所 述控制操作控件生成所述 HTML页面。 When the acquisition module generates the corresponding HTML page according to the control operation supported by the specified device, it determines the corresponding HTML page element according to the control operation supported by the specified device, and generates the corresponding HTML page element according to the HTML page element. control operation control; use the control operation control to generate the HTML page.
12、 根据权利要求 9所述的移动通信终端, 其中, 12. The mobile communication terminal according to claim 9, wherein,
所述第一发送模块, 配置为通过所述移动通信终端与所述网络控制服务 器之间的 WebSocket连接向所述网络控制服务器发送所述信息获取命令; 所 述网络控制服务器通过其与所述指定设备之间的 WebSocket连接将所述信息 获取命令转发给所述指定设备, 以获取所述指定设备的设备信息。 The first sending module is configured to send the information acquisition command to the network control server through the WebSocket connection between the mobile communication terminal and the network control server; the network control server communicates with the specified The WebSocket connection between devices forwards the information acquisition command to the specified device to obtain device information of the specified device.
13、 根据权利要求 9所述的移动通信终端, 其中, 所述移动通信终端还 包括: 13. The mobile communication terminal according to claim 9, wherein the mobile communication terminal further includes:
识别模块, 配置为在所述第一发送模块向网络控制服务器发送信息获取 命令, 由所述网络控制服务器将所述信息获取命令转发至指定设备之前, 从 所述网络控制服务器获取至少一个待控制的所述指定设备的信息, 其中, 所 述指定设备的信息包括以下至少之一: 所述指定设备的二维码、 所述指定设 备的标识、 所述指定设备的 IP地址; 通过所述指定设备的信息识别并显示 所述指定设备; 或者, Identification module, configured to obtain at least one to-be-controlled device from the network control server before the first sending module sends an information acquisition command to the network control server, and before the network control server forwards the information acquisition command to the designated device. The information of the designated device, wherein 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, the IP address of the designated device; through the designated The device information identifies and displays the specified device; or,
配置为由所述网络控制服务器根据所述待控制的指定设备的信息,识别 所述指定设备; 从所述网络控制服务器处获取所述网络控制服务器识别出的 所述指定设备的信息。 The network control server is configured to identify the designated device according to the information of the designated device to be controlled; and obtain the information of the designated device identified by the network control server from the network control server.
14、 根据权利要求 9所述的移动通信终端, 其中, 所述移动通信终端还 包括: 14. The mobile communication terminal according to claim 9, wherein the mobile communication terminal further includes:
定位模块, 配置为在所述第一发送模块向网络控制服务器发送信息获取 命令, 由所述网络控制服务器将所述信息获取命令转发至指定设备之前, 从 所述网络控制服务器获取所述指定设备的注册信息, 其中, 所述指定设备的 注册信息为所述指定设备向所述网络控制服务器注册的信息; 根据所述指定 设备的注册信息定位所述指定设备; The positioning module is configured to obtain the specified device from the network control server before the first sending module sends an information acquisition command to the network control server, and before the network control server forwards the information acquisition command to the specified device. The registration information, wherein, the registration information of the designated device is the information registered by the designated device with the network control server; locate the designated device according to the registration information of the designated device;
或者, or,
配置为获取所述指定设备的设备标识,将所述设备标识发送至所述网络 控制服务器; 由所述网络控制服务器根据所述设备标识识别所述指定设备, 并返回所述识别结果; 根据返回的所述识别结果定位所述指定设备。 Configured to obtain the device identification of the designated device, and send the device identification to the network control server; The network control server identifies the designated device according to the device identification, and returns the identification result; According to the return The identification result locates the specified device.
15、 根据权利要求 9所述的移动通信终端, 其中, 所述获取模块在通过 所述 HTML页面对所述指定设备进行控制操作时,接收用户通过所述 HTML 页面对所述指定设备进行控制操作的控制操作指令;通过 WebSocket连接将 所述控制操作指令发送给所述网络控制服务器 , 由所述网络控制服务器通过 WebSocket连接将所述控制操作指令转发至所述指定设备, 使所述指定设备 根据所述控制操作指令, 通过 NPAPI函数调用所述指定设备的系统 API实 现所述控制操作指令所指示的控制操作。 15. The mobile communication terminal according to claim 9, wherein when the acquisition module performs a control operation on the designated device through the HTML page, it receives the user's control operation on the designated device through the HTML page. control operation instructions; send the control operation instructions to the network control server through the WebSocket connection, and the network control server forwards the control operation instructions to the designated device through the WebSocket connection, so that the designated device can The control operation instruction calls the system API of the specified device through the NPAPI function to implement the control operation indicated by the control operation instruction.
16、 根据权利要求 15所述的移动通信终端, 其中, 所述获取模块在接 收用户通过所述 HTML 页面对所述指定设备进行控制操作的控制操作指令 时, 通过所述 HTML页面监听所述用户对所述 HTML页面的操作; 通过所 述 HTML页面的 DOM事件获取所述操作的信息,根据所述操作的信息确定 对所述指定设备的控制操作, 生成所述控制操作指令。 16. The mobile communication terminal according to claim 15, wherein when receiving a control operation instruction from a user to control the designated device through the HTML page, the acquisition module monitors the user through the HTML page. Operation on the HTML page: Obtain the information of the operation through the DOM event of the HTML page, determine the control operation on the designated device according to the information of the operation, and generate the control operation instruction.
17、 一种设备控制方法, 包括: 移动通信终端向配对成功的指定设备发送信息获取命令, 其中, 所述信 息获取命令用于获取所述指定设备的设备信息; 17. An equipment control method, including: The mobile communication terminal sends an information acquisition command to the designated device that has been paired successfully, wherein the information acquisition command is used to obtain device information of the designated device;
所述移动通信终端根据所述指定设备返回的设备信息,生成用于对所述 指定设备进行控制操作的 HTML页面, 通过所述 HTML页面对所述指定设 备进行控制操作。 The mobile communication terminal generates an HTML page for controlling the designated device based on the device information returned by the designated device, and performs control operations on the designated device through the HTML page.
18、 根据权利要求 17所述的方法, 其中, 所述移动通信终端根据所述 指定设备返回的设备信息,生成用于对所述指定设备进行控制操作的 HTML 页面的步骤包括: 18. The method according to claim 17, wherein the step of the mobile communication terminal generating an HTML page for controlling the designated device based on the device information returned by the designated device includes:
所述移动通信终端根据所述指定设备返回的设备信息,确定所述指定设 备所支持的控制操作; The mobile communication terminal determines the control operations supported by the designated device based on the device information returned by the designated device;
根据所述指定设备所支持的控制操作, 确定相对应的 HTML页面元素, 根据所述 HTML页面元素生成相对应的控制操作控件; Determine the corresponding HTML page element according to the control operation supported by the specified device, and generate the corresponding control operation control according to the HTML page element;
使用所述控制操作控件生成所述 HTML页面。 The HTML page is generated using the control operation control.
19、 根据权利要求 17或 18所述的方法, 其中, 在所述移动通信终端向 配对成功的指定设备发送信息获取命令的步骤之前, 还包括: 19. The method according to claim 17 or 18, wherein before the mobile communication terminal sends an information acquisition command to the designated device that has been paired successfully, 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.
20、 根据权利要求 19所述的方法, 其中, 所述移动通信终端的信息包 括以下至少之一: 所述移动通信终端的二维码、 所述移动通信终端的标识、 所述移动通信终端的 IP地址; 所述指定设备的信息包括以下至少之一: 所 述指定设备的二维码、 所述指定设备的标识、 所述指定设备的 IP地址。 20. The method according to claim 19, wherein the information of the mobile communication terminal includes at least one of the following: the QR code of the mobile communication terminal, the identification of the mobile communication terminal, the 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.
21、 根据权利要求 17所述的方法, 其中, 所述通过所述 HTML页面对 所述指定设备进行控制操作的步骤包括: 21. The method according to claim 17, wherein the step of controlling the designated device through the HTML page includes:
所述移动通信终端接收用户通过所述 HTML 页面对所述指定设备进行 控制操作的控制操作指令; The mobile communication terminal receives a control operation instruction from the user to control the designated device through the HTML page;
使用所述移动通信终端和所述指定设备之间的配对连接将所述控制操 作指令发送给所述指定设备,使所述指定设备根据所述控制操作指令进行控 制操作。 The control operation is performed using a paired connection between the mobile communication terminal and the designated device. The operating instructions are sent to the designated device, so that the designated device performs control operations according to the control operation instructions.
22、 根据权利要求 21所述的方法, 其中, 所述移动通信终端接收用户 通过所述 HTML 页面对所述指定设备进行控制操作的控制操作指令的步骤 包括: 22. The method according to claim 21, wherein the step of the mobile communication terminal receiving a control operation instruction from the user to control the designated device through the HTML page includes:
所述移动通信终端通过所述 HTML页面监听所述用户对所述 HTML页 面的操作; The mobile communication terminal monitors the user's operation on the HTML page through the HTML page;
通过所述 HTML页面的 DOM事件获取所述操作的信息,根据所述操作 的信息确定对所述指定设备的控制操作, 生成所述控制操作指令。 The operation information is obtained through the DOM event of the HTML page, the control operation on the designated device is determined based on the operation information, and the control operation instruction is generated.
23、 一种移动通信终端, 包括: 23. A mobile communication terminal, including:
第二发送模块,配置为向配对成功的指定设备发送信息获取命令,其中, 所述信息获取命令用于获取所述指定设备的设备信息; The second sending module is configured to send an information acquisition command to the designated device that has been successfully paired, wherein the information acquisition command is used to obtain device information of the designated device;
生成模块, 配置为根据所述指定设备返回的设备信息, 生成用于对所述 指定设备进行控制操作的 HTML页面, 通过所述 HTML页面对所述指定设 备进行控制操作。 The generation module is configured to generate an HTML page for controlling the designated device based on the device information returned by the designated device, and perform control operations on the designated device through the HTML page.
24、 根据权利要求 23所述的移动通信终端, 其中, 所述生成模块, 配 置为根据所述指定设备返回的设备信息,确定所述指定设备所支持的控制操 作; 根据所述指定设备所支持的控制操作, 确定相对应的 HTML页面元素, 根据所述 HTML 页面元素生成相对应的控制操作控件; 使用所述控制操作 控件生成所述 HTML页面; 通过所述 HTML页面对所述指定设备进行控制 操作。 24. The mobile communication terminal according to claim 23, wherein the generating module is configured to determine the control operations supported by the designated device according to the device information returned by the designated device; control operation, determine the corresponding HTML page element, generate the corresponding control operation control according to the HTML page element; use the control operation control to generate the HTML page; control the designated device through the HTML page operate.
25、 根据权利要求 23或 24所述的移动通信终端, 其中, 所述移动通信 终端还包括: 25. The mobile communication terminal according to claim 23 or 24, wherein the mobile communication terminal further includes:
配对模块, 配置为在所述第二发送模块向配对成功的指定设备发送信息 获取命令之前, 向所述指定设备发送配对请求, 请求与所述指定设备建立配 对连接, 其中, 所述配对请求中包括有所述移动通信终端的信息; 接收所述 指定设备返回的、 携带有所述指定设备的信息的配对响应, 根据所述配对响 应建立与所述指定设备的配对连接。 The pairing module is configured to send a pairing request to the designated device before the second sending module sends an information acquisition command to the designated device that has been paired successfully, requesting to establish a pairing connection with the designated device, wherein, in the pairing request including the information of the mobile communication terminal; receiving a pairing response returned by the designated device and carrying the information of the designated device, and establishing a pairing connection with the designated device according to the pairing response.
26、 根据权利要求 25所述的移动通信终端, 其中, 所述移动通信终端 的信息包括以下至少之一: 所述移动通信终端的二维码、 所述移动通信终端 的标识、 所述移动通信终端的 IP地址; 所述指定设备的信息包括以下至少 之一: 所述指定设备的二维码、 所述指定设备的标识、 所述指定设备的 IP 地址。 26. The mobile communication terminal according to claim 25, 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.
27、 根据权利要求 25所述的移动通信终端, 其中, 所述生成模块在通 过所述 HTML 页面对所述指定设备进行控制操作时, 接收用户通过所述 HTML页面对所述指定设备进行控制操作的控制操作指令;使用所述移动通 信终端和所述指定设备之间的配对连接将所述控制操作指令发送给所述指 定设备, 使所述指定设备根据所述控制操作指令进行控制操作。 27. The mobile communication terminal according to claim 25, wherein when the generating module performs a control operation on the designated device through the HTML page, it receives the user's control operation on the designated device through the HTML page. the control operation instruction; using the paired connection between the mobile communication terminal and the designated device to send the control operation instruction to the designated device, so that the designated device performs a control operation according to the control operation instruction.
28、 根据权利要求 27所述的移动通信终端, 其中, 所述生成模块在接 收用户通过所述 HTML 页面对所述指定设备进行控制操作的控制操作指令 时, 通过所述 HTML页面监听所述用户对所述 HTML页面的操作; 通过所 述 HTML页面的 DOM事件获取所述操作的信息,根据所述操作的信息确定 对所述指定设备的控制操作, 生成所述控制操作指令。 28. The mobile communication terminal according to claim 27, wherein when receiving a control operation instruction from a user to control the designated device through the HTML page, the generation module monitors the user through the HTML page. Operation on the HTML page: Obtain the information of the operation through the DOM event of the HTML page, determine the control operation on the designated device according to the information of the operation, and generate the control operation instruction.
29、 一种在其上记录有用于执行权利要求 1或权利要求 17所述方法的 程序的计算机可读记录介质。 29. A computer-readable recording medium having a program for executing the method of claim 1 or claim 17 recorded thereon.
PCT/CN2013/084444 2012-12-12 2013-09-27 Device control method and mobile communication terminal WO2014090017A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210537736.3A CN103067448B (en) 2012-12-12 2012-12-12 device control method and mobile communication terminal
CN201210537736.3 2012-12-12

Publications (1)

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

Family

ID=48109902

Family Applications (1)

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

Country Status (2)

Country Link
CN (1) CN103067448B (en)
WO (1) WO2014090017A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067448B (en) * 2012-12-12 2017-04-19 北京奇虎科技有限公司 device control method and mobile communication terminal
CN103051693B (en) * 2012-12-12 2016-12-21 北京奇虎科技有限公司 Apparatus control method and mobile communication terminal
CN104954449B (en) * 2015-05-29 2019-12-10 深圳市常胜信息技术有限公司 Internet of things control method and device
CN106101783A (en) * 2016-05-24 2016-11-09 乐视控股(北京)有限公司 The control method of equipment and device
CN105898893B (en) * 2016-05-31 2020-09-22 北京乐美无限科技有限公司 Full-duplex communication method for mobile terminal and Internet of things equipment
CN106790430A (en) * 2016-12-02 2017-05-31 无锡久源软件股份有限公司 Mobile phone control method and system
CN109120716A (en) * 2018-09-25 2019-01-01 珠海格力电器股份有限公司 Apparatus control method, device, storage medium and equipment unit
CN110471743A (en) * 2019-08-15 2019-11-19 北京莱利时空科技有限公司 Mobile manipulation treating method and apparatus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325612A (en) * 2008-07-24 2008-12-17 中兴通讯股份有限公司 Remote access control system and method for household network
CN102685254A (en) * 2012-05-31 2012-09-19 深圳英宝通科技有限公司 Control method and system for cross-platform mobile network terminal
CN102799473A (en) * 2012-06-18 2012-11-28 Tcl集团股份有限公司 Method and device for managing third-party applications of intelligent display equipment
EP2530947A2 (en) * 2011-06-03 2012-12-05 Samsung Electronics Co., Ltd. Apparatus and method for performing web browsing using remote controller
CN103067448A (en) * 2012-12-12 2013-04-24 北京奇虎科技有限公司 Device control method and mobile communication terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1172485C (en) * 2002-09-30 2004-10-20 联想(北京)有限公司 Remote control of networked information household electrical appliances and safety authentication device as well as method
KR101924974B1 (en) * 2011-01-04 2018-12-04 삼성전자주식회사 Methods and apparatus for remote controlling peripheral device in mobile communication terminal
CN102739800A (en) * 2012-07-05 2012-10-17 合一网络技术(北京)有限公司 System and method for remotely controlling browser Web page based on internet

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101325612A (en) * 2008-07-24 2008-12-17 中兴通讯股份有限公司 Remote access control system and method for household network
EP2530947A2 (en) * 2011-06-03 2012-12-05 Samsung Electronics Co., Ltd. Apparatus and method for performing web browsing using remote controller
CN102685254A (en) * 2012-05-31 2012-09-19 深圳英宝通科技有限公司 Control method and system for cross-platform mobile network terminal
CN102799473A (en) * 2012-06-18 2012-11-28 Tcl集团股份有限公司 Method and device for managing third-party applications of intelligent display equipment
CN103067448A (en) * 2012-12-12 2013-04-24 北京奇虎科技有限公司 Device control method and mobile communication terminal

Also Published As

Publication number Publication date
CN103067448A (en) 2013-04-24
CN103067448B (en) 2017-04-19

Similar Documents

Publication Publication Date Title
WO2014090017A1 (en) Device control method and mobile communication terminal
WO2014090016A1 (en) Device control method and mobile communication terminal
US10805380B2 (en) Data transmission method and device
KR101691446B1 (en) Method, apparatus, and system for intelligently controlling device, and plug-and-play device
WO2015161786A1 (en) Remote control method, server, control device and system
WO2017211020A1 (en) Television control method and apparatus
US11611633B2 (en) Systems and methods for platform-independent application publishing to a front-end interface
JP5757750B2 (en) Head-mounted display device and client device
CN103051694B (en) The method and mobile communication terminal of mobile communication terminal control device
US8990404B2 (en) Directing data in a web browser from a portable electronic device
CN103049190A (en) Mobile communication terminal and method controlling device operation
CN104038527A (en) Remote operation method and system
WO2014180331A1 (en) Method, device and system for realizing webpage screenshot
WO2017020523A1 (en) Method and apparatus for remote control of terminal
JP2016502338A (en) Network connection parameter setting method, apparatus, network facility, program, and recording medium
WO2017096813A1 (en) Webpage displaying method, mobile terminal, intelligent terminal, program, and storage medium
US20160335370A1 (en) Data processing method and apparatus
CN103607654A (en) A mobile terminal auxiliary input apparatus based on a multi-screen cooperation system and a method
WO2017059703A1 (en) Method of controlling network appliance, network appliance, feature phone, and system
JP2016533550A (en) Apparatus and method for communication between device-specific application programs
CN101707627A (en) Method and device for presenting page information
WO2017096812A1 (en) Webpage displaying method, mobile terminal, intelligent terminal, computer program, and storage medium
WO2018000623A1 (en) Webpage operating method and apparatus
WO2020228013A1 (en) Account association method, device, system, server, and storage medium
CN109714425A (en) Communication means and device

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: 13863044

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: 13863044

Country of ref document: EP

Kind code of ref document: A1