Control method and device of intelligent equipment, equipment and medium
By establishing peer-to-peer network channels between smart devices and forwarding user operation instructions on one device to another device, the problem of poor user experience during collaborative processing of multiple smart devices is solved, and the function of manipulating multiple devices is realized in a unified operation mode is realized, which improves the user experience.
Patent Information
- Application Number
- CN202311801392.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2025-06-27
AI Technical Summary
When multiple smart devices are processed in a coordinated manner, due to different device types, interaction logic, interaction methods and system structures, users cannot use a unified operating method to control multiple devices, resulting in poor user experience.
By obtaining the user's operation instructions when the first device is connected to at least one second device, and establishing a peer-to-peer network channel with the second device when the operation instructions meet the preset conditions, forwarding the operation instructions to the second device, enabling the user to operate on the second device.
It realizes that when the connection status of the smart device and the external control device is not required to switch the connection status of the smart device and the external control device, the control of multiple smart devices is completed on a single smart device or an external control device, improving the user experience.
Smart Images

Figure CN120223703A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent device interaction, and particularly to a method, device, equipment and medium for controlling an intelligent device. Background Art
[0002] With the development of electronic technology and mobile Internet, a user often owns multiple intelligent devices, such as mobile phones, tablet computers, personal computers (PCs), and smart home devices (such as televisions). Generally, the use and interaction of intelligent devices are independent. Therefore, when multiple intelligent devices are collaboratively processed, due to the differences in device types, interaction logics, interaction methods, and system structures of each intelligent device, users cannot use a unified operation method to control multiple devices, resulting in a poor user experience. Summary of the Invention
[0003] The present invention provides a method, device, equipment and medium for controlling an intelligent device, so as to solve the technical problem in the related art that when multiple intelligent devices are collaboratively processed, due to the differences in device types, interaction logics, interaction methods, and system structures of each intelligent device, users cannot use a unified operation method to control multiple devices, resulting in a poor user experience.
[0004] In a first aspect, an embodiment of the present invention provides a method for controlling an intelligent device, the method including:
[0005] When a first device is connected to at least one second device, obtain an operation instruction of a user on the first device;
[0006] When the operation instruction meets a preset condition, establish a peer-to-peer network channel with the second device;
[0007] Forward the operation instruction to the second device by using the peer-to-peer network channel, so that the user can perform an operation corresponding to the operation instruction on the second device.
[0008] In a possible implementation manner, in the method provided by the embodiment of the present invention, when a first device is connected to at least one second device, obtaining an operation instruction of a user on the first device includes:
[0009] When receiving connection information of the second device, determine the connection with the second device;
[0010] Obtain the operation instruction of the user on the first device in real time.
[0011] In a possible implementation manner, in the method provided by the embodiment of the present invention, when the operation instruction meets a preset condition, establishing a peer-to-peer network channel with the second device includes:
[0012] When the operation instruction meets the preset conditions, establish a command channel with the second device;
[0013] Notify the second device of the operation instruction through the command channel;
[0014] When receiving the response of the second device to the notification of sharing the operation instruction, establish a peer - to - peer network channel with the second device.
[0015] In a possible implementation manner, in the method provided by the embodiments of the present invention, if the preset conditions include the first preset condition, then when the operation instruction meets the preset conditions, establishing a peer - to - peer network channel with the second device includes:
[0016] When the duration of the indication flag corresponding to the operation instruction in the first preset area is greater than the first preset duration, determine that the operation instruction meets the first preset condition and establish a peer - to - peer network channel with the second device; / or
[0017] When the input content corresponding to the operation instruction is the first preset character, determine that the operation instruction meets the first preset condition and establish a peer - to - peer network channel with the second device.
[0018] In a possible implementation manner, in the method provided by the embodiments of the present invention, using the peer - to - peer network channel to forward the operation instruction to the second device includes:
[0019] Encapsulate the operation instruction in a pre - set manner;
[0020] Forward the operation instruction to the second device through the peer - to - peer network channel so that the user can complete the control of the second device using the operation instruction on the first device.
[0021] In a possible implementation manner, in the method provided by the embodiments of the present invention, after using the peer - to - peer network channel to forward the operation instruction to the second device, the method further includes:
[0022] When the operation instruction meets the second preset condition, stop forwarding the operation instruction to the second device.
[0023] In a possible implementation manner, in the method provided by the embodiments of the present invention, when the operation instruction meets the second preset condition, stopping forwarding the operation instruction to the second device includes:
[0024] When the duration of the indication flag corresponding to the operation instruction in the second preset area is greater than the second preset duration, stop forwarding the operation instruction to the second device; / or
[0025] When the input content corresponding to the operation instruction is the second preset character, stop forwarding the operation instruction to the second device, and the second preset area is displayed on the second device.
[0026] In a possible implementation manner, in the method provided by the embodiments of the present invention, after forwarding the operation instruction to the second device by using the peer-to-peer network channel, the method further includes:
[0027] Do not respond to the operation instruction on the first device;
[0028] When the operation instruction meets the second preset condition and stops forwarding the operation instruction to the second device, the method further includes:
[0029] Respond to the operation instruction on the first device.
[0030] In a possible implementation manner, in the method provided by the embodiments of the present invention, if the preset condition includes a third preset condition, when the operation instruction meets the preset condition, establishing a peer-to-peer network channel with the second device includes:
[0031] When dragging the first file corresponding to the operation instruction into the third preset area based on the operation instruction, it is determined that the operation instruction meets the third preset condition, and a peer-to-peer network channel is established with the second device.
[0032] In a possible implementation manner, in the method provided by the embodiments of the present invention, forwarding the operation instruction to the second device by using the peer-to-peer network channel includes:
[0033] Sending the first file corresponding to the operation instruction to the second device through the peer-to-peer network channel.
[0034] In a possible implementation manner, in the method provided by the embodiments of the present invention, the method further includes:
[0035] If the user drags the second file into the fourth preset area on the second device through the operation instruction, it is determined that the operation instruction meets the fourth preset condition;
[0036] Receiving the second file sent by the second device through the peer-to-peer network channel.
[0037] In a second aspect, an operating device for an intelligent device provided by an embodiment of the present invention includes:
[0038] An acquisition unit, configured to acquire an operation instruction of a user on a first device when the first device is connected to at least one second device;
[0039] A establishing unit, configured to establish a peer-to-peer network channel with the second device when the operation instruction meets the preset condition;
[0040] A processing unit, configured to forward the operation instruction to the second device by using the peer-to-peer network channel so that the user can perform an operation corresponding to the operation instruction on the second device.
[0041] In a possible implementation manner, in the device provided by the embodiment of the present invention, the obtaining unit specifically:
[0042] When receiving the connection information of the second device, determine the connection with the second device;
[0043] Obtain the operation instruction of the user on the first device in real time.
[0044] In a possible implementation manner, in the device provided by the embodiment of the present invention, the establishing unit is specifically used for:
[0045] When the operation instruction meets the preset condition, establish a command channel with the second device;
[0046] Notify the second device of the operation instruction through the command channel;
[0047] When receiving the response of the second device to the notified shared operation instruction, establish a peer-to-peer network channel with the second device.
[0048] In a possible implementation manner, in the device provided by the embodiment of the present invention, if the preset condition includes a first preset condition, the establishing unit is specifically used for:
[0049] When the duration of the indication flag corresponding to the operation instruction in the first preset area is greater than the first preset duration, determine that the operation instruction meets the first preset condition, and establish a peer-to-peer network channel with the second device; / or
[0050] When the input content corresponding to the operation instruction is the first preset character, determine that the operation instruction meets the first preset condition, and establish a peer-to-peer network channel with the second device.
[0051] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit is specifically used for:
[0052] Encapsulate the operation instruction in a pre-set manner;
[0053] Forward the operation instruction to the second device through the peer-to-peer network channel, so that the user can complete the control of the second device by using the operation instruction on the first device.
[0054] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit is further used for:
[0055] When the operation instruction meets the second preset condition, stop forwarding the operation instruction to the second device.
[0056] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit is further used for:
[0057] When the duration for which the indication flag corresponding to the operation instruction remains in the second preset area is greater than the second preset duration, stop forwarding the operation instruction to the second device; / or
[0058] When the input content corresponding to the operation instruction is the second preset character, stop forwarding the operation instruction to the second device, and the second preset area is displayed on the second device.
[0059] In a possible implementation manner, in the device provided in the embodiment of the present invention, the processing unit is further configured to:
[0060] Do not respond to the operation instruction on the first device;
[0061] After stopping forwarding the operation instruction to the second device when the operation instruction meets the second preset condition, the method further includes:
[0062] Respond to the operation instruction on the first device.
[0063] In a possible implementation manner, in the device provided in the embodiment of the present invention, if the preset condition includes a third preset condition, the establishing unit is specifically configured to:
[0064] When dragging the first file corresponding to the operation instruction into the third preset area based on the operation instruction, determine that the operation instruction meets the third preset condition, and establish a peer-to-peer network channel with the second device.
[0065] In a possible implementation manner, in the device provided in the embodiment of the present invention, the processing unit is specifically configured to:
[0066] Send the first file corresponding to the operation instruction to the second device through the peer-to-peer network channel.
[0067] In a possible implementation manner, in the device provided in the embodiment of the present invention, the processing unit is further configured to:
[0068] If the user drags the second file into the fourth preset area on the second device through the operation instruction, determine that the operation instruction meets the fourth preset condition;
[0069] Receive the second file sent by the second device through the peer-to-peer network channel.
[0070] In a third aspect, an electronic device provided in an embodiment of the present invention includes: at least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method provided in the first aspect of the embodiment of the present invention is implemented.
[0071] Fourthly, an embodiment of the present invention provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method provided in the first aspect of the embodiment of the present invention is implemented.
[0072] In an embodiment of the present invention, first, when a first device is connected to at least one second device, an operation instruction of a user on the first device is obtained. Then, when the operation instruction meets a preset condition, a peer-to-peer network channel is established with the second device. Finally, the operation instruction is forwarded to the second device by using the peer-to-peer network channel, so that the user can perform an operation corresponding to the operation instruction on the second device. Compared with the related art, when simultaneously controlling multiple cross-system intelligent devices, it is possible to complete the control of multiple intelligent devices on a single intelligent device or an external control device without switching the connection state between the intelligent device and the external control device, making the control of multiple devices more in line with the user's intuitive feeling and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a schematic flowchart of a method for controlling an intelligent device provided by an embodiment of the present invention;
[0074] Figure 2 It is a specific schematic flowchart of a method for controlling an intelligent device provided by an embodiment of the present invention;
[0075] Figure 3 It is a schematic diagram of an operation interface of a method for controlling an intelligent device provided by an embodiment of the present invention;
[0076] Figure 4 It is a schematic diagram of an operation interface of a method for controlling an intelligent device provided by an embodiment of the present invention;
[0077] Figure 5 It is a schematic diagram of an operation interface of another method for controlling an intelligent device provided by an embodiment of the present invention;
[0078] Figure 6 It is a schematic diagram of the principle of a method for controlling an intelligent device provided by an embodiment of the present invention;
[0079] Figure 7 It is a specific schematic flowchart of another method for controlling an intelligent device provided by an embodiment of the present invention;
[0080] Figure 8 It is a schematic diagram of the principle of a method for dragging files of an intelligent device provided by an embodiment of the present invention;
[0081] Figure 9 It is a schematic diagram of the principle of another method for dragging files of an intelligent device provided by an embodiment of the present invention;
[0082] Figure 10Structural schematic diagram of a control device for an intelligent device provided by an embodiment of the present invention;
[0083] Figure 11 Structural schematic diagram of an electronic device provided by an embodiment of the present invention. Detailed implementation manners
[0084] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention.
[0085] The following explains some terms appearing in the text:
[0086] 1. In the embodiments of the present invention, the term "and / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0087] 2. In the embodiments of the present invention, the term "Hook", that is, a hook, is a platform of the Windows message processing mechanism. An application program can set a subroutine on it to monitor a certain message of a specified window, and the monitored window can be created by other processes. When the message arrives, it is processed before the target window's processing function. The hook mechanism allows an application program to intercept and process window messages or specific events. In this application, it specifically refers to intercepting keyboard and mouse messages.
[0088] 3. In the embodiments of the present invention, the term "UAC pop-up window", that is, the User Account Control (UAC) pop-up window, is a control mechanism adopted in the operating system. Its principle is to notify the user whether to authorize an application program to use the hard disk drive and system files, so as to help prevent malicious programs (sometimes also called "malware") from damaging the system.
[0089] With the development of electronic technology and mobile Internet, a user often owns multiple intelligent devices, such as mobile phones, tablet computers, personal computers (PCs), smart home devices (such as televisions), etc. Generally, the use and interaction of intelligent devices are independent. Therefore, when multiple intelligent devices cooperate for processing, due to the differences in the device types, interaction logics, interaction methods and system structures of each intelligent device, the user cannot use a unified operation method to control multiple devices, resulting in a poor user experience.
[0090] The following further describes in detail the method, apparatus, device, and medium for controlling an intelligent device provided by the present invention in conjunction with the accompanying drawings and embodiments.
[0091] It should be noted that the first device and the second device in the embodiments of the present invention may be a personal computer, or other intelligent electronic devices such as a smart phone, a smart tablet, a smart speaker, etc. The embodiments of the present invention do not limit this.
[0092] The embodiments of the present invention provide a method for controlling an intelligent device, as Figure 1 shown, including:
[0093] Step S101, when the first device is connected to at least one second device, obtain an operation instruction of a user on the first device.
[0094] In specific implementation, when the first device can receive connection information broadcast by the second device, establish a connection with the second device, and then monitor in real time the operation instruction of the user obtained by the first device. This operation instruction can be obtained by the user directly operating the interaction component of the first device, or by operating an external interaction device connected to the first device. For example, when the first device is a personal computer, the user can operate an interaction device such as a mouse, a keyboard, a stylus, a ring, a touchpad, etc. connected to the first device by wire or wirelessly to generate an operation instruction. When the first device is a smart phone or a smart tablet, the user can operate the screen of the device to generate an operation instruction. When the first device is a virtual reality device, the user can operate the handle of the device or make gestures in a specified area to generate an operation instruction. In the embodiments of the present disclosure, in the first device and the second device, each device will display its own screen and application, but the user only needs to use a keyboard, a mouse, or a touchpad to generate an operation instruction, and can seamlessly move the pointer, type content, and even copy content between the first device and the second device.
[0095] Step S102, when the operation instruction meets a preset condition, establish a peer-to-peer network channel with the second device.
[0096] In specific implementation, when the operation instruction meets a preset condition, establish a peer-to-peer network P2P channel for transmitting information with the second device. Specifically, when meeting the preset condition, first establish a command channel with the second device, and then notify the second device of the operation instruction to be performed by the user through this command channel. The second device will give feedback after receiving it. When the first device receives the feedback information, establish a P2P channel connected to the second device for subsequent transmission of operation instructions.
[0097] In this step, the preset conditions include a first preset condition and a third preset condition. When the first preset condition is met, it is determined that the user wants to control a second device through an operation instruction on a first device. When the second preset condition is met, it is determined that the user wants to transfer a first file corresponding to the operation instruction to the second device.
[0098] Step S103, forward the operation instruction to the second device using a peer-to-peer network channel.
[0099] Specifically, in implementation, the operation instruction is forwarded to the second device in real time using a peer-to-peer network channel so that the user can perform the operation corresponding to the operation instruction on the second device.
[0100] As Figure 2 shown, the specific process of the control method for the intelligent device provided by the embodiment of the present invention may include the following steps:
[0101] Step S201, when the first device is connected to at least one second device, obtain the operation instruction of the user on the first device.
[0102] Specifically, in implementation, when the first device can receive the connection information broadcast by the second device, establish a connection with the second device, and then monitor in real time the operation instruction of the user obtained by the first device. This operation instruction can be obtained by the user directly operating the interaction component of the first device, or by operating the external interaction device connected to the first device. For example, when the first device is a personal computer, the user can generate an operation instruction by operating a wired or wireless interaction device such as a mouse or keyboard connected to the first device. When the first device is a smart phone or a smart tablet, the user can generate an operation instruction by operating the screen of the device. When the first device is a virtual reality device, the user can generate an operation instruction by operating the handle of the device or making gestures in a specified area.
[0103] It should be noted that the second device mentioned in the embodiments of the present disclosure can be a single device or multiple devices.
[0104] Step S202, when the operation instruction meets the first preset condition, establish a peer-to-peer network channel with the second device.
[0105] Specifically, in implementation, the first preset condition can be that the duration of the indication flag corresponding to the operation instruction in the first preset area is greater than the first preset duration, or that the input content corresponding to the operation instruction is the first preset character. The position of the specific first preset area, the first preset duration, the second preset duration, and the first preset character can all be set according to requirements, and the embodiments of the present disclosure do not limit this.
[0106] When the preset conditions are met, first establish a command channel with the second device, and then notify the second device of the operation instruction to be performed by the user through this command channel. The second device will give feedback after receiving it. When the first device receives the feedback information, establish a P2P channel connected to the second device for subsequent transmission of operation instructions.
[0107] In one example, taking the first device as a personal computer and the second device including a smartphone and another personal computer as an example for illustration, hereinafter the first device will be referred to as the first computer, and the other personal computer will be referred to as the second computer. The user generates an operation instruction by manipulating the keyboard and mouse connected to the first computer. When the user operates the keyboard and mouse connected to the first computer, if the mouse pointer stays in the first preset area for the first preset duration, or the user operates the mouse to click on the first preset area, or the user enters the corresponding preset character, such as "F4", through the keyboard, it is determined that the operation instruction meets the first preset conditions, as Figure 3 shown, when the user manipulates the mouse and places it on the right side of the display area, a first preset area appears on the right side of the display area. When the user clicks on the first preset area or the mouse pointer stays in the first preset area for the first preset duration, such as 4s. It should be noted that there are various ways to display the preset area, which can be directly set in the display area for a long time, or hidden at any position in the display area. The embodiments of the present disclosure do not limit this.
[0108] When the second device includes multiple devices, such as the second computer and the smartphone, as Figure 4 shown, corresponding areas can be set for the second computer and the smartphone in the first preset area, that is, Figure 4 shown as 401 and 402, or different preset characters can be set for the second computer and the smartphone respectively, such as "F4" and "F5", etc. When the user clicks on the area 401 corresponding to the second computer in the first preset area or the mouse pointer stays in the area 401 for the first preset duration, such as 4s, it is determined that it directly meets the first preset conditions with the second computer. When the user clicks on the area 402 corresponding to the smartphone in the first preset area or the mouse pointer stays in the area 402 for the first preset duration, it is determined that it directly meets the first preset conditions with the smartphone.
[0109] In another example, taking the first device as a smart tablet and the second device including a smartphone and another personal computer as an example for illustration, hereinafter the first device will be referred to as the first computer, and the other personal computer will be referred to as the second computer. The user generates operation instructions by manipulating the keyboard and mouse connected to the first computer. When the user operates the screen of the smart tablet, if the first preset area is pressed or hovered for the first preset duration, it is determined that the operation instruction meets the first preset condition. When the user presses or hovers on the right side of the display area, the first preset area appears on the right side of the display area. When the user presses or hovers in the first preset area for the first preset duration, such as 4 s, it is determined that the first preset condition is met. It should be noted that there are various ways to display the preset area. It can be directly set in the display area for a long time, or hidden at any position in the display area. The embodiments of the present disclosure do not limit this.
[0110] When the second device includes multiple devices, such as the second computer and the smartphone, as Figure 5 shown, corresponding areas can be set for the second computer and the smartphone in the first preset area, that is, Figure 5 as shown in 501 and 502. When the user presses or hovers in the area 501 corresponding to the second computer in the first preset area for the first preset duration, such as 4 s, it is determined that the first preset condition is met between the user and the second computer. When the user presses or hovers in the area 502 corresponding to the smartphone in the first preset area for the first preset duration, it is determined that the first preset condition is met between the user and the smartphone.
[0111] Step S203, forwarding the operation instruction to the second device through the peer-to-peer network channel.
[0112] Specifically, when implementing, the operation instruction is forwarded to the second device in real time through the peer-to-peer network channel so that the user can perform the manipulation corresponding to the operation instruction on the second device.
[0113] Step S204, stopping forwarding the operation instruction to the second device when the operation instruction meets the second preset condition.
[0114] In specific implementation, when the user operates the second device, if the operation instruction meets the second preset condition on the second device, it is determined that the user wants to stop operating the second device, and at this time, the forwarding of the operation instruction to the second device is stopped. When the duration of the indication flag corresponding to the operation instruction in the second preset area is greater than the second preset duration, or the input content corresponding to the operation instruction is the second preset character, it is determined that the second preset condition is met, and the second preset area is displayed on the second device. The second preset condition is similar to the first preset condition and can be the same to enable the user to use a unified operation logic, or can be different. The embodiments of the present disclosure do not limit this. The first device and the second device can be connected wirelessly, for example, through a mobile hotspot wifi or Bluetooth technology. Of course, it can also be other forms of wireless connection protocols and combinations of multiple wireless connection methods, such as simultaneously using low-power Bluetooth and wifi for connection. The embodiments of the present disclosure do not limit this. At the same time, it can also be a wired connection, for example, through a data cable for connection, or indirectly connected through a data cable and other intermediate devices.
[0115] At the same time, when forwarding the operation instruction to the second device, the first device does not respond to the operation instruction to prevent misoperation, and after stopping the forwarding, continues to respond to the operation instruction. Of course, it can also be through other methods such as user settings to enable the user's operation to be carried out on the first device and the second device simultaneously. The embodiments of the present disclosure do not limit this.
[0116] Of course, in this step, if no operation instruction is received within the third preset duration, the forwarding of the operation instruction to the second device is stopped. The third preset duration can be set according to requirements. If the first device cannot receive the operation instruction for a long time, for example, the control device is disconnected or the user has stopped operating, then after the third preset duration, for example, 5 minutes later, the forwarding of the operation instruction to the second device is stopped.
[0117] Next, in conjunction with Figure 6 , the operation instructions in the embodiments of the present disclosure will be described in detail.
[0118] In the embodiments of the present disclosure, the operation instructions are directly transmitted between the first device and the second device, such as Figure 7As shown, when the first device is a personal computer and the second device is a smart tablet, the smart tablet broadcasts connection information via Bluetooth / LAN to indicate its ability to share the keyboard and mouse. After the personal computer receives the connection information through the service process, it notifies the Hook process to start listening for changes in the mouse position. When the mouse position reaches the edge of the display screen of the personal computer and stays for more than 500 ms, it starts to establish a command channel with the smart tablet via Bluetooth or LAN. After the command channel is established, it sends a keyboard and mouse sharing command to the smart tablet to notify the smart tablet to prepare for the injection of keyboard and mouse instructions. The smart tablet will return a feedback message to the personal computer after it is ready, and then the personal computer starts to establish a P2P (peer-to-peer network) channel with the smart tablet. After the P2P channel is established, it notifies the Hook process to capture keyboard and mouse messages in real time, encapsulate the keyboard and mouse messages according to the agreed protocol, and forward them to the smart tablet through the P2P channel. After receiving the messages, the smart tablet unpacks the messages and injects them into its own system, enabling the user to control the smart tablet by manipulating the keyboard and mouse connected to the personal computer.
[0119] The following combines Figure 7 and Figure 8 to elaborate in detail on the file drag-and-drop transmission in the embodiments of the present disclosure.
[0120] As Figure 7 shown, the specific process of the method for controlling a smart device provided by the embodiments of the present invention may include the following steps:
[0121] Step S701, when the first device is connected to at least one second device, obtain an operation instruction of a user on the first device.
[0122] Specifically, in implementation, step S701 is the same as step S201, and details are not described herein again.
[0123] Step S702, when the operation instruction meets a third preset condition, establish a peer-to-peer network channel with the second device.
[0124] Specifically, in implementation, when the first file corresponding to the operation instruction is dragged into a third preset area based on the operation instruction, it is determined that the operation instruction meets the third preset condition, and a peer-to-peer network channel is established with the second device.
[0125] Step S703, send the first file corresponding to the operation instruction to the second device through the peer-to-peer network channel.
[0126] In an example, as Figure 8As shown, when a file is dragged from a personal computer to a smart tablet, after the personal computer responds to the user's file transfer instruction, if the mouse moves to the edge of the personal computer's screen display, a window will be immediately created at the edge. The pixels and transparency of this window can be set as needed. In this example, a window with 1*1 pixel and 1% transparency is used to ensure that the window does not affect the user's perception. This window is used to visually receive the file dragged by the user. That is, when the user drags a file onto this window, detailed information about the dragged file can be obtained, such as the file size, name, thumbnail, etc. At this time, the personal computer encapsulates these drag information through an agreed protocol and forwards it to the smart tablet. The specific forwarding can be through a command channel based on Bluetooth / LAN. After receiving the drag message, the smart tablet will initiate a simulated drag box display. When the user drops the mouse on the smart tablet, the smart tablet starts to establish a file P2P channel with the personal computer to transfer the file, thus realizing the file drag from the personal computer to the smart tablet.
[0127] In addition, after step S203, if the user drags a second file into a fourth preset area on the second device through an operation instruction, and it is determined that the operation instruction meets the fourth preset condition, then the second file sent by the second device is received through the peer-to-peer network channel. The specific process is as Figure 9 As shown, when a file is dragged from a smart tablet to a personal computer, when the dragging starts on the smart tablet, file information such as the file name and thumbnail of the dragged file is sent to the personal computer through a command channel based on Bluetooth / LAN. Since the keyboard and mouse are connected to the personal computer control, when the personal computer detects that the mouse returns to the personal computer, a completely transparent and drag-supported window is created and moved to the current position of the mouse. In this way, as the mouse moves, it can slide over this window to form a drag. At this time, the user can see the drag effect on the personal computer, and the display effect is as if it is dragged out from the smart tablet. After the drag is formed, if the user releases the mouse, a P2P channel is started to transfer the file, that is, the file drag from the smart tablet to the personal computer is completed.
[0128] As Figure 10 As shown, based on the same inventive concept of the control method for smart devices, the present invention also provides a control device for smart devices, including:
[0129] An acquisition unit 1001, configured to acquire an operation instruction of a user on a first device when the first device is connected to at least one second device;
[0130] A establishment unit 1002, configured to establish a peer-to-peer network channel with the second device when the operation instruction meets a preset condition;
[0131] The processing unit 1003 is configured to forward the operation instruction to the second device through the peer - to - peer network channel, so that the user can perform the operation corresponding to the operation instruction on the second device.
[0132] In a possible implementation manner, in the device provided by the embodiment of the present invention, the obtaining unit 1001 specifically:
[0133] When receiving the connection information of the second device, determine the connection with the second device;
[0134] Obtain the operation instruction of the user on the first device in real time.
[0135] In a possible implementation manner, in the device provided by the embodiment of the present invention, the establishing unit 1002 is specifically configured to:
[0136] When the operation instruction meets the preset condition, establish a command channel with the second device;
[0137] Notify the second device of the operation instruction through the command channel;
[0138] When receiving the response of the second device to the notification of sharing the operation instruction, establish a peer - to - peer network channel with the second device.
[0139] In a possible implementation manner, in the device provided by the embodiment of the present invention, if the preset condition includes a first preset condition, the establishing unit 1002 is specifically configured to:
[0140] When the duration of the indication flag corresponding to the operation instruction in the first preset area is greater than the first preset duration, determine that the operation instruction meets the first preset condition, and establish a peer - to - peer network channel with the second device; / or
[0141] When the input content corresponding to the operation instruction is the first preset character, determine that the operation instruction meets the first preset condition, and establish a peer - to - peer network channel with the second device.
[0142] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 1003 is specifically configured to:
[0143] Encapsulate the operation instruction in a pre - set manner;
[0144] Forward the operation instruction to the second device through the peer - to - peer network channel, so that the user can complete the control of the second device by using the operation instruction on the first device.
[0145] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 1003 is further configured to:
[0146] When the operation instruction meets the second preset condition, stop forwarding the operation instruction to the second device.
[0147] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 1003 is further configured to:
[0148] When the duration for which the indication flag corresponding to the operation instruction persists in the second preset area is greater than the second preset duration, stop forwarding the operation instruction to the second device; / or
[0149] When the input content corresponding to the operation instruction is the second preset character, stop forwarding the operation instruction to the second device, and the second preset area is displayed on the second device.
[0150] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 1003 is further configured to:
[0151] Do not respond to the operation instruction on the first device;
[0152] When the operation instruction meets the second preset condition and after stopping forwarding the operation instruction to the second device, the method further includes:
[0153] Respond to the operation instruction on the first device.
[0154] In a possible implementation manner, in the device provided by the embodiment of the present invention, if the preset condition includes a third preset condition, the establishing unit 1002 is specifically configured to:
[0155] When dragging the first file corresponding to the operation instruction into the third preset area based on the operation instruction, determine that the operation instruction meets the third preset condition, and establish a peer-to-peer network channel with the second device.
[0156] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 1003 is specifically configured to:
[0157] Send the first file corresponding to the operation instruction to the second device through the peer-to-peer network channel.
[0158] In a possible implementation manner, in the device provided by the embodiment of the present invention, the processing unit 1003 is further configured to:
[0159] If the user drags the second file into the fourth preset area on the second device through the operation instruction, determine that the operation instruction meets the fourth preset condition;
[0160] Receive the second file sent by the second device through the peer-to-peer network channel.
[0161] In addition, the control method and device for the intelligent device according to the embodiment of the present invention described in combination with Figures 1 - 10 can be implemented by an electronic device. Figure 11 FIG. shows a schematic hardware structure diagram of the electronic device provided by the embodiment of the present invention.
[0162] Specifically, with reference to Figure 11 , which shows a schematic structural diagram of an electronic device 1100 suitable for implementing the embodiments of the present disclosure. Figure 11 The electronic device shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0163] As Figure 11 shown, the electronic device 1100 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1101, which may perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1102 or the program loaded from the storage device 1108 into the random access memory (RAM) 1103 to implement the voice control method of the embodiments as described in the present disclosure. In the RAM 1103, various programs and data required for the operation of the electronic device 1100 are also stored. The processing device 1101, the ROM 1102, and the RAM 1103 are connected to each other through a bus 1104. The input / output (I / O) interface 1105 is also connected to the bus 1104.
[0164] Generally, the following devices may be connected to the I / O interface 1105: an input device 1106 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1107 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1108 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1109. The communication device 1109 may allow the electronic device 1100 to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 11 the electronic device 1100 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices may be alternatively implemented or had.
[0165] Specifically, according to the embodiments of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the method shown in the flowchart, so as to implement the voice control method as described above. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 1109, or installed from the storage device 1108, or installed from the ROM 1102. When the computer program is executed by the processing device 1101, the above functions defined in the method of the embodiments of the present disclosure are executed.
[0166] It should be noted that the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on a computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0167] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (for example, a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (for example, the Internet), and end-to-end networks (for example, ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0168] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist separately without being assembled into the electronic device.
[0169] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is caused to:
[0170] When the first device is connected to at least one second device, obtain the operation instructions of the user on the first device;
[0171] When the operation instructions meet the preset conditions, establish a peer-to-peer network channel with the second device;
[0172] Use the peer-to-peer network channel to forward the operation instructions to the second device, so that the user can perform the operations corresponding to the operation instructions on the second device.
[0173] Optionally, when one or more of the above programs are executed by the electronic device, the electronic device can also perform the other steps described in the above embodiments.
[0174] Computer program code for performing the operations of the present disclosure can be written in one or more programming languages or combinations thereof. The above programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0175] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0176] The units involved in the embodiments of the present disclosure can be implemented in software or in hardware. In some cases, the name of a unit does not constitute a limitation on the unit itself.
[0177] The functions described above herein can be performed, at least in part, by one or more hardware logic components. By way of example, and without limitation, the types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0178] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0179] In an embodiment of the present invention, first, when a first device is connected to at least one second device, an operation instruction of a user on the first device is obtained. Then, when the operation instruction meets a preset condition, a peer-to-peer network channel is established with the second device. Finally, the operation instruction is forwarded to the second device by using the peer-to-peer network channel, so that the user can perform an operation corresponding to the operation instruction on the second device. Compared with the related art, when simultaneously controlling multiple cross-system intelligent devices, it is possible to complete the control of multiple intelligent devices on a single intelligent device or an external control device without switching the connection state between the intelligent device and the external control device, making the control of multiple devices more in line with the user's intuitive feeling and improving the user experience.
[0180] Those skilled in the art will appreciate that the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0181] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and combinations of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0182] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or multiple blocks.
[0184] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they learn the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0185] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these changes and modifications.
Claims
1. A control method for an intelligent device, characterized in that, Including: When the first device is connected to at least one second device, obtaining an operation instruction of the user on the first device; When the operation instruction meets a preset condition, establishing a peer-to-peer network channel with the second device; Forwarding the operation instruction to the second device through the peer-to-peer network channel, so that the user can perform the operation corresponding to the operation instruction on the second device.
2. The control method of the intelligent device according to claim 1, wherein The step of "When the first device is connected to at least one second device, obtaining an operation instruction of the user on the first device" includes: When receiving the connection information of the second device, determining the connection with the second device; Obtaining the operation instruction of the user on the first device in real time.
3. The control method of the intelligent device according to claim 2, characterized in that, The step of "When the operation instruction meets a preset condition, establishing a peer-to-peer network channel with the second device" includes: When the operation instruction meets the preset condition, establishing a command channel with the second device; Notifying the second device of the operation instruction through the command channel; When receiving the response of the second device to notify sharing the operation instruction, establishing the peer-to-peer network channel with the second device.
4. The control method of the intelligent device according to claim 3, wherein, If the preset condition includes a first preset condition, the step of "When the operation instruction meets the preset condition, establishing a peer-to-peer network channel with the second device" includes: When the duration of the indication flag corresponding to the operation instruction in the first preset area is greater than the first preset duration, determining that the operation instruction meets the first preset condition, and establishing the peer-to-peer network channel with the second device; / or When the input content corresponding to the operation instruction is the first preset character, determining that the operation instruction meets the first preset condition, and establishing the peer-to-peer network channel with the second device.
5. The control method of the intelligent device according to claim 4, wherein The step of "Forwarding the operation instruction to the second device through the peer-to-peer network channel" includes: Encapsulating the operation instruction in a pre-set manner; Forwarding the operation instruction to the second device through the peer-to-peer network channel, so that the user can complete the control of the second device by using the operation instruction on the first device.
6. The control method of the intelligent device according to claim 5, characterized in that, After forwarding the operation instruction to the second device through the peer-to-peer network channel, the method further includes: When the operation instruction meets a second preset condition, stopping forwarding the operation instruction to the second device.
7. The control method of the intelligent device according to claim 6, wherein The step of "When the operation instruction meets a second preset condition, stopping forwarding the operation instruction to the second device" includes: When the duration of the indication flag corresponding to the operation instruction in the second preset area is greater than the second preset duration, stopping forwarding the operation instruction to the second device; / or When the input content corresponding to the operation instruction is the second preset character, stopping forwarding the operation instruction to the second device, and the second preset area is displayed on the second device.
8. The control method of the intelligent device according to claim 6, wherein After forwarding the operation instruction to the second device through the peer-to-peer network channel, the method further includes: Not responding to the operation instruction on the first device; After the step of "When the operation instruction meets a second preset condition, stopping forwarding the operation instruction to the second device", the method further includes: Respond to the operation instruction on the first device.
9. The control method of the intelligent device according to claim 3, characterized in that, If the preset condition includes a third preset condition, then when the operation instruction meets the preset condition, establishing a peer-to-peer network channel with the second device includes: When dragging the first file corresponding to the operation instruction into a third preset area based on the operation instruction, determining that the operation instruction meets the third preset condition, and establishing the peer-to-peer network channel with the second device.
10. The control method of the intelligent device according to claim 9, wherein Forwarding the operation instruction to the second device by using the peer-to-peer network channel includes: Sending the first file corresponding to the operation instruction to the second device through the peer-to-peer network channel.
11. The control method of the intelligent device according to claim 5, characterized in that, The method further includes: If the user drags a second file into a fourth preset area on the second device through the operation instruction, determining that the operation instruction meets the fourth preset condition; Receiving the second file sent by the second device through the peer-to-peer network channel.
12. A control device for an intelligent device, characterized in that, Includes: An acquisition unit, configured to acquire an operation instruction of a user on the first device when the first device is connected to at least one second device; A establishing unit, configured to establish a peer-to-peer network channel with the second device when the operation instruction meets the preset condition; A processing unit, configured to forward the operation instruction to the second device by using the peer-to-peer network channel, so that the user performs an operation corresponding to the operation instruction on the second device.
13. An electronic device, characterized in that, Includes: At least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method according to any one of claims 1-11 is implemented.
14. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, the method according to any one of claims 1-11 is implemented.