CN117675805B - Remote control method and electronic equipment - Google Patents
Remote control method and electronic equipment Download PDFInfo
- Publication number
- CN117675805B CN117675805B CN202410128623.0A CN202410128623A CN117675805B CN 117675805 B CN117675805 B CN 117675805B CN 202410128623 A CN202410128623 A CN 202410128623A CN 117675805 B CN117675805 B CN 117675805B
- Authority
- CN
- China
- Prior art keywords
- remote control
- control instruction
- electronic device
- bottom layer
- notebook computer
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 238000002347 injection Methods 0.000 claims abstract description 121
- 239000007924 injection Substances 0.000 claims abstract description 121
- 230000004044 response Effects 0.000 claims abstract description 110
- 230000006870 function Effects 0.000 claims description 31
- 238000004590 computer program Methods 0.000 claims description 10
- 230000009471 action Effects 0.000 description 32
- 238000004891 communication Methods 0.000 description 12
- 238000007726 management method Methods 0.000 description 12
- VLCQZHSMCYCDJL-UHFFFAOYSA-N tribenuron methyl Chemical compound COC(=O)C1=CC=CC=C1S(=O)(=O)NC(=O)N(C)C1=NC(C)=NC(OC)=N1 VLCQZHSMCYCDJL-UHFFFAOYSA-N 0.000 description 8
- 238000012545 processing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000001960 triggered effect Effects 0.000 description 6
- 230000008569 process Effects 0.000 description 5
- 239000008186 active pharmaceutical agent Substances 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 239000000203 mixture Substances 0.000 description 4
- 239000000243 solution Substances 0.000 description 4
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 238000013473 artificial intelligence Methods 0.000 description 2
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012512 characterization method Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/08—Protocols specially adapted for terminal emulation, e.g. Telnet
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/08—Network architectures or network communication protocols for network security for authentication of entities
- H04L63/083—Network architectures or network communication protocols for network security for authentication of entities using passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/40—Network security protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Selective Calling Equipment (AREA)
Abstract
The application provides a remote control method and electronic equipment, relates to the technical field of electronics, and is used for realizing remote control of a PC (personal computer) by equipment such as a mobile phone and the like when the PC is in a screen locking state. The method is applied to a first electronic device, which includes a remote control application. The method comprises the following steps: and when the electronic device is in the screen locking state, receiving a remote control instruction sent by the second electronic device through the remote control application. And injecting a remote control instruction into the bottom layer of the first electronic device in a first injection mode through the remote control application, so that the bottom layer of the first electronic device responds according to the remote control instruction. And obtaining a response result of the bottom layer of the first electronic device to the remote control instruction through the remote control application. And if the response result indicates that the bottom layer of the first electronic device refuses the access of the remote control instruction, injecting the remote control instruction into the bottom layer in a second injection mode through the remote control application. Of the two injection modes, the second injection mode has higher access right.
Description
Technical Field
The embodiment of the application relates to the technical field of electronics, in particular to a remote control method and electronic equipment.
Background
Personal computers (personal computer, PCs), notebook computers, and the like are not portable enough relative to cell phones and tablet computers. Therefore, a remote control PC through a portable device such as a mobile phone or a tablet computer is receiving increasing attention from a user.
However, to achieve remote control, the controlled device typically needs to remain powered on and in a normally networked state. If the controlled equipment is in a non-working state such as screen locking, remote control of the equipment such as a mobile phone to the PC can not be realized. Based on this, a method is needed to realize remote control of the PC by the device such as the mobile phone when the PC is in a locked state.
Disclosure of Invention
The embodiment of the application provides a remote control method and electronic equipment, which are used for realizing remote control of a PC (personal computer) by mobile phones and other equipment when the PC is in a screen locking state.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
In a first aspect, a remote control method is provided, the method being applied to a first electronic device, the first electronic device including a remote control application the method comprising:
And under the condition of being in a screen locking state, the first electronic equipment receives a remote control instruction sent by the second electronic equipment through the remote control application. Then, by the remote control application, injecting a remote control instruction into the bottom layer of the first electronic device in a first injection mode. In order to determine whether the first electronic device responds to the remote control instruction, the first electronic device further obtains a response result of the bottom layer of the first electronic device to the remote control instruction through the remote control application. If the response result indicates that the bottom layer of the first electronic device refuses the access of the remote control instruction, the first electronic device can inject the remote control instruction into the bottom layer of the first electronic device in a second injection mode through the remote control application. The access right of the second injection mode is higher than that of the first injection mode. Thus, under the condition that the first electronic equipment is in the screen locking state, the bottom layer of the first electronic equipment can still receive the remote control instruction, so that the response action corresponding to the remote control instruction is executed.
In a possible implementation manner of the first aspect, the first injection manner includes: input injection mode. And an input type injection mode is adopted to inject a remote control instruction into the bottom layer of the first electronic equipment, the interaction step is simple, and the response to the remote control instruction is faster.
In one possible implementation manner of the first aspect, the bottom layer of the first electronic device includes an operating system OS layer. The injecting, by the remote control application, the remote control instruction into the bottom layer of the first electronic device by adopting the first injection mode may specifically include: the remote control instructions are converted by the remote control application into remote control instructions in pointer input type data format. The pointer injection device is configured for a remote control application. Remote control instructions in a pointer input type data format are injected into an operating system by a remote control application based on a pointer injection device. In the scheme, an input type injection mode is adopted by a preset application, a remote control instruction is injected into an OS layer, and under the condition that the OS layer allows access of the remote control instruction, the OS layer can respond to the remote control instruction and execute corresponding response actions. In this way, the interaction steps are simple, and the response to the remote control instruction is quicker.
In a possible implementation manner of the first aspect, the injecting, by the remote control application, a remote control instruction into an underlying layer of the first electronic device may specifically include: and calling a first preset interface of the first electronic equipment through the remote control application so as to inject a remote control instruction into the bottom layer of the first electronic equipment. The first preset interface is used for injecting a remote control instruction into the bottom layer in a first injection mode.
In a possible implementation manner of the first aspect, after the remote control application invokes the first preset interface of the first electronic device to inject the remote control instruction into the bottom layer of the first electronic device, the bottom layer of the first electronic device generates a response result corresponding to the remote control instruction.
In a possible implementation manner of the first aspect, the obtaining, by the remote control application, a response result of the bottom layer of the first electronic device to the remote control instruction may specifically include: and acquiring a calling result of the bottom layer of the first electronic device on the first preset interface by using the remote control application calling result acquisition function. The call result is used for representing a response result of the bottom layer of the first electronic device to the remote control instruction.
In a possible implementation manner of the first aspect, the result acquisition function may be specifically an error code acquisition function; the calling result of the first preset interface may specifically be an error code generated for calling the first preset interface. In this way, the error code generated by the call request of the first electronic device to the preset application to the first preset interface is utilized to determine the response result of the bottom layer of the first electronic device to the remote control instruction injected by the preset application in the first injection mode. In this way, the method can help to quickly determine whether the response of the first electronic device to the remote control instruction can be completed in the first injection mode, and is convenient to re-inject the remote control instruction in the second injection mode under the condition that the response in the first injection mode is unsuccessful.
In a possible implementation manner of the first aspect, the method further includes: and when the error code is 5, the characterization response result indicates that the bottom layer of the first electronic device refuses the access of the remote control instruction.
In a possible implementation manner of the first aspect, the method further includes: and when the error code is 0, the characterization response result indicates that the bottom layer of the first electronic device allows the access of the remote control instruction.
In a possible implementation manner of the first aspect, the injecting, by the remote control application, the remote control instruction in the pointer input type data format into the operating system based on the pointer injection device may specifically include: and calling a first preset interface of the first electronic device by the remote control application based on the pointer injection device to inject a remote control instruction in a pointer input type data format into the bottom layer of the first electronic device. That is, when the remote control command in the type data format is input to the bottom layer of the first electronic device by the pointer in the input type injection mode, the remote control command is completed by calling the first preset interface. And then, determining a response result of the first electronic device to the remote control instruction by acquiring an error code generated by the call request of the first electronic device to the first preset interface.
In a possible implementation manner of the first aspect, the second injection manner includes: the virtual man-machine interface device HID framework injection mode.
In a possible implementation manner of the first aspect, the bottom layer of the first electronic device includes an operating system and a preset virtual HID driver. Injecting a remote control instruction into the bottom layer of the first electronic device in a second injection mode through a remote control application, wherein the remote control instruction comprises the following steps: the remote control instructions are converted by the remote control application into remote control instructions in a touch screen input report data format. And calling a second preset interface of the operating system, writing a remote control instruction of the touch screen input report data format into a preset virtual HID driver, and transmitting data to the preset virtual HID driver by the second preset interface. And when the remote control instruction is injected in a first injection mode (such as an input injection mode), the bottom layer of the first electronic equipment cannot respond to the remote control instruction, and the remote control instruction can be injected again into the bottom layer of the first electronic equipment by adopting a virtual HID frame injection mode with higher access authority through preset application. In this manner, the preset application writes the remote control instruction into the preset virtual HID driver in a corresponding format by calling the second preset interface, and the response to the remote control instruction is executed by the preset virtual HID driver. Thus, the remote control instruction is injected by adopting an input type injection mode with simpler interaction and quicker response under the non-screen locking state, and the remote control instruction can be injected by adopting a virtual HID frame injection mode with higher access authority under the screen locking state. The advantages of the two injection modes can be considered, and the response of the first electronic equipment to the remote control instruction can be realized.
In a possible implementation manner of the first aspect, the remote control instruction sent by the second electronic device is in UIBC data format.
In a second aspect, the application further provides electronic equipment. The electronic device may include: a processor, a memory, and a computer program stored on the memory. The memory is coupled to the processor. The processor executes the computer program to cause the electronic device to perform the remote control method as in any one of the first aspects above.
In a possible implementation manner of the second aspect, the electronic device includes a preset virtual HID driver.
In a third aspect, the present application provides a computer readable storage medium having instructions stored therein which, when run on an electronic device, enable the electronic device to perform the remote control method of any one of the first aspects above.
In a fourth aspect, there is provided a computer program product comprising instructions which, when run on an electronic device, cause the computer device to perform the remote control method of any of the first aspects described above.
In a fifth aspect, there is provided an apparatus (e.g. the apparatus may be a system-on-a-chip) comprising a processor for supporting an electronic device to implement the functions referred to in the first aspect above. In one possible design, the apparatus further includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, the device can be formed by a chip, and can also comprise the chip and other discrete devices.
The technical effects of any one of the design manners of the second aspect to the fifth aspect may refer to the technical effects of different design manners of the first aspect, which are not described herein.
Drawings
FIG. 1 is a schematic diagram of a remote control scenario in the related art;
FIG. 2 is a schematic diagram of a remote control scenario in the related art;
FIG. 3 is a schematic diagram of a remote control scenario in the related art;
fig. 4 is a schematic flow chart of a remote control method according to an embodiment of the present application;
fig. 5 is a schematic view of a scenario for implementing a remote control method according to an embodiment of the present application;
fig. 6 is a schematic view of a scenario for implementing a remote control method according to an embodiment of the present application;
fig. 7 is a schematic flow chart of a remote control method according to an embodiment of the present application;
fig. 8 is a software architecture diagram of an electronic device for implementing a remote control method according to an embodiment of the present application;
Fig. 9 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
Fig. 10 is a block diagram of a chip system according to an embodiment of the present application.
Detailed Description
Fig. 1 illustrates a scenario in which a tablet computer remotely controls a notebook computer in some embodiments. In this scenario, a connection is established between the notebook computer 1 and the tablet computer 2, and the user can remotely control the notebook computer 1 through the tablet computer 2. The notebook computer 1 and the tablet computer 2 are both provided with a preset application, and the preset application is used for supporting remote control between devices. The preset application may be a remote control application, for example. Or the preset application has a remote control function.
In some embodiments, the notebook computer 1 and the tablet computer 2 may be in the same lan, and the preset application of the notebook computer 1 and the preset application of the tablet computer 2 may directly communicate, such as send data to each other, through the lan.
In other embodiments, the connection between the notebook computer 1 and the tablet computer 2 may be established by a wireless network (e.g., wi-Fi) and/or bluetooth, etc. The notebook computer 1 and the tablet computer 2 are connected through a wireless network, and further may include forwarding data sent by a preset application between the notebook computer 1 and the tablet computer 2 through a router, and the like. Or Wi-Fi point-to-point direct connection (P2P connection) can be established between the notebook computer 1 and the tablet computer 2, so that the preset application of the notebook computer 1 and the preset application of the tablet computer 2 can directly communicate, such as mutually sending data.
In other embodiments, in this embodiment, the notebook computer 1 and the tablet computer 2 may log in to the same user account, and then forward data between the notebook computer 1 and the tablet computer 2 through the corresponding server. The user account may be, for example, an account of a preset application.
Specifically, as shown in fig. 2, the notebook computer 1 is in a power-on and non-screen-locking state, and the main interface 10 may be displayed. The main interface 10 includes application icons (e.g., web, recycle bin, mail, browser, etc.), taskbars. The taskbar includes a start key 101 and time. In the remote control scenario, the tablet pc 2 may synchronously display the currently displayed interface of the notebook computer 1, such as the main interface 10. And, the operations performed by the user on the tablet computer 2 can be synchronously transmitted to the notebook computer 1 for response. After the notebook computer 1 responds to the remote control operation of the user on the tablet computer 2, the update on the display interface is synchronously displayed on the tablet computer 2.
Illustratively, the user may operate at the interface 20 of the tablet computer 2 to trigger a remote control instruction to remotely control the notebook computer 1 to perform a response event. For example, the tablet pc 2 may transmit a remote control instruction to the notebook pc 1 in response to a user's trigger operation of the start key 201 (corresponding to the start key 101 of the notebook pc) in the interface 20. After the notebook computer 1 receives the remote control command, the remote control command is injected into the bottom layer. After receiving the remote control command, the bottom layer of the notebook computer 1 will respond to the remote control command. For example, after the notebook computer 1 responds to the remote control instruction, the start menu 102 is displayed. It will be appreciated that tablet 2 will simultaneously display start menu 202.
In some embodiments, the above-mentioned function of remotely controlling the notebook computer 1 through the tablet computer 2 may be implemented through a preset application. For example, after the tablet computer 2 starts the remote control function and establishes a connection with the notebook computer 1, the tablet computer 2 may display a remote control interface in case of entering a preset application. The remote control interface is displayed in synchronization with the interface of the notebook computer 1.
In some remote control schemes of the related art, in the controlled device, the preset application generally uses input injection to inject a remote control instruction into an operating system of the controlled device, so that the operating system responds according to the remote control instruction.
However, there are certain limitations in injecting remote control instructions into an operating system by using an input injection method. Specifically, the input type injection has insufficient access rights, and under the scenes of screen locking and the like, the response to the remote control instruction cannot be completed, and the main control equipment cannot display an unlocking interface or unlock the controlled equipment. It should be noted that, in some embodiments, the lock screen state may be named as another name, such as a sleep state, or a lock state; when the electronic equipment is in a screen locking state (or other names), a user is required to execute an operation, so that the state can be released, and the interface before entering the screen locking state is restored for display.
As shown in fig. 3, the notebook computer 1 is in a screen locking state, and a screen locking interface 103 is displayed. The lock screen interface 103 includes a lock screen image. And meanwhile, time information, network information and electric quantity information can be displayed on the screen locking interface 103. At this time, the same lock screen interface 203 as the notebook computer 1 can be displayed synchronously in the preset application of the tablet computer 2. At this time, the tablet pc 2 transmits a remote control instruction to the notebook pc 1 in response to an operation triggered by the user on the lock screen interface 203. At this time, the notebook computer 1 cannot inject the remote control command into the bottom layer, and thus the bottom layer of the notebook computer 1 cannot respond to the remote control command. When the remote control instruction is used for unlocking the notebook computer 1, the remote unlocking of the notebook computer 1 by the tablet computer 2 fails.
Based on the above, the embodiment of the application provides a remote control method applied to a controlled device. The remote control device can realize the response of remote control instructions when the controlled device is in the scene of screen locking and the like. Therefore, the user can also remotely control the controlled device through the main control device under the condition that the controlled device is in remote control.
Specifically, in some embodiments of the present application, in a screen locking state, a controlled device (such as a first electronic device) receives a remote control instruction sent by a main control device (such as a second electronic device) through a preset application, and the remote control instruction is injected into a bottom layer of the first electronic device through the preset application by adopting a first injection mode, so that an operating system responds according to the remote control instruction. And then, obtaining a response result of the bottom layer to the remote control instruction through a preset application. Under the condition that the response result represents that the operating system refuses to access the remote control instruction, the first electronic device can inject the remote control instruction into the bottom layer again through a preset application in a second injection mode. The access right of the second injection mode is higher than that of the first injection mode. Thus, even if the first electronic device is in the screen locking state, the first electronic device can still respond to a remote control instruction triggered by a user at the second electronic device.
In some embodiments, the first electronic device is an electronic device that implements injection of the remote control instructions using a first injection mode.
The first electronic device may be a tablet computer, a personal computer (personal computer, PC), a smart screen, a desktop, a laptop, a handheld computer, a notebook, an ultra-mobile personal computer, a UMPC, or a netbook, for example.
The second electronic device may specifically be a mobile phone, a tablet computer, a personal computer, a smart screen, a desktop, a laptop, a handheld computer, a notebook, an ultra mobile personal computer, a netbook, a smart watch, a wearable device such as an artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) sound box, a vehicle-mounted device, various teaching aids (e.g., a learning machine, an early education machine), a smart toy, a portable robot, a personal digital assistant (personal DIGITAL ASSISTANT, PDA), an augmented reality (augmented reality, AR) \virtual reality (VR) device, a media player, a device with a mobile office function, a device with an intelligent home function, a device with an audio-video entertainment function, a device supporting travel intelligence, and the like. The embodiment of the application does not limit the specific form of the device.
Technical terms that may be related to the embodiments of the present application are briefly described below.
Input injection means that allows a Windows application to simulate input from various types of input devices and direct the input to any location, including directing the input to an application client area.
Virtual human interface device (human INTERFACE DEVICE, HID) framework, HID contains two basic concepts: "report descriptor" and "report". Reports are the actual data exchanged between the device and the software client. The report descriptor describes the format and meaning of the data supported by the device. An input report is data sent from an HID device to an application, writing the data to a specified file or input/output (I/O) device.
An Operating System (OS) is used to control and manage the hardware and software resources of the entire computer system and to reasonably organize the work and allocation of resources of the scheduling computer to provide a convenient interface and environment for users and other software. It is the most basic system software in computer systems.
The remote control method provided by the embodiment of the application is applied to the scene that the controlled equipment is in the screen locking state. In the screen locking state, after the first electronic device (i.e. the controlled device) receives a remote control instruction from the second electronic device (i.e. the main control device), the remote control instruction is injected into the bottom layer of the first electronic device through a preset application according to a first injection mode. And after the bottom layer is detected to reject the access of the remote control instruction, the first electronic device injects the remote control instruction into the bottom layer of the first electronic device again through a preset application in a second injection mode. Thus, in the screen locking scene, the first electronic device can still respond to the remote control instruction of the second electronic device to respond.
The remote control method according to the embodiment of the application is described in detail below with reference to the accompanying drawings.
Fig. 4 illustrates a flow of a remote control method in some embodiments. In this embodiment, a notebook computer is taken as an example of the first electronic device (i.e., the controlled device), and a tablet computer is taken as the second electronic device (i.e., the master device). The connection between the notebook computer and the tablet computer is established, and the connection can be used for supporting the remote control of the tablet computer on the notebook computer. And the notebook computer and the tablet personal computer are both provided with preset applications, and the preset applications are used for supporting the notebook computer to accept remote control of the tablet personal computer.
After the notebook computer is connected with the tablet computer, a user can execute control operation (such as first operation) on the tablet computer through a preset application, so that the effect of remotely controlling the notebook computer is achieved.
S600, the tablet personal computer receives a first operation.
The first operation is used for remotely controlling the notebook computer. The first operation may be triggered by a user.
The tablet personal computer is used as the main control equipment, can receive the operation of a user on the tablet personal computer, and responds to the operation to remotely control the notebook personal computer to execute the corresponding operation.
The user can operate on the display screen of the tablet computer through body parts such as fingers. In this embodiment, the above-described first operation is a touch operation.
The user can operate on the display screen of the tablet computer through the handwriting pen. In this embodiment, the first operation is an operation triggered by an input device such as a stylus.
The user can also connect input devices such as a keyboard, a mouse, a touch pad and the like to the tablet personal computer externally, and operate the tablet personal computer through the input devices such as the keyboard, the mouse and the like. In this embodiment, the first operation may be an operation triggered by inputting a mouse through a keyboard, a mouse, a touch pad, or the like.
Operations performed by a user on a tablet computer for remotely controlling the notebook computer may be different forms of operations. The first operation may be, for example, a click, a slide, or a press operation.
As can be seen from the above description, in the embodiment of the present application, the notebook computer realizes the remote control function through the preset application. The preset application is installed in both the notebook computer and the tablet computer.
In some embodiments, the first operation may be a click operation (single click operation), a double click operation, a long press operation, etc., performed by the user on the tablet computer.
S601, responding to a first operation, and sending a remote control instruction to the notebook computer by the tablet personal computer.
Accordingly, the notebook computer can receive the remote control instruction sent by the tablet computer.
In some embodiments, the tablet computer may generate the control instruction corresponding to the first operation in response to the first operation, and then send the remote control instruction to the notebook computer. Specifically, the tablet computer sends the remote control instruction to the notebook computer, and the remote control instruction can be realized based on connection between the tablet computer and the notebook computer.
In different scenarios, the purpose of the remote control instruction sent by the tablet computer to the notebook computer may be different. In some embodiments, a remote control instruction sent by the tablet computer to the notebook computer may be used to control the notebook computer to display an unlock interface or unlock, and the remote control instruction may be denoted as a remote unlock instruction. In other embodiments, the remote control command sent by the tablet computer to the notebook computer may be used to control the notebook computer to be powered off, and the remote control command may be recorded as a remote power off command. In other embodiments, the remote control command sent by the tablet computer to the notebook computer may be used to control the notebook computer to disconnect from the network, and the remote control command may be recorded as a remote disconnection command. In other embodiments, the remote control command sent by the tablet computer to the notebook computer may be used to control the notebook computer to log off the logged-on account, and the remote control command may be recorded as a remote log-off command, etc. It will be appreciated that the above remote control command is for example only, and in other embodiments, the remote control command may be used to control a controlled device such as a notebook computer to perform other response actions.
In an embodiment of the application, the remote control function is implemented by a preset application. Therefore, the notebook computer receives the remote control instruction sent by the tablet computer, and specifically may include the notebook computer receiving the remote control instruction sent by the tablet computer through a preset application.
As can be seen from the above description, in some embodiments, both the tablet computer and the notebook computer log in to the same user account. When the remote control of the tablet personal computer to the notebook computer is realized, the remote control instruction of the tablet personal computer to the notebook computer can be forwarded through the corresponding server.
In some embodiments, in response to the first operation, the tablet computer may first determine an operation purpose corresponding to the first operation. Then, the tablet pc may send a remote control instruction to the notebook pc, where the remote control instruction is used to instruct the notebook pc to execute a response action corresponding to the operation purpose. Illustratively, in the example shown in fig. 2, the first operation corresponds to a clicking operation of the start key 201 by the user on the tablet computer, and the tablet computer may determine that the corresponding operation purpose is to open the start menu based on the clicking operation. Then, the tablet pc may send a remote control instruction to the notebook pc, where the remote control instruction is used to instruct the notebook pc to open the start menu.
In other embodiments, in response to the first operation, the tablet computer may first determine operation information corresponding to the first operation. And then the tablet personal computer sends a remote control instruction to the notebook computer, wherein the remote control instruction carries the operation information of the first operation, and the remote control instruction is used for indicating the notebook computer to execute corresponding response action based on the first operation. In some embodiments, the operation information of the first operation may include an operation type of the first operation and an operation position corresponding to the first operation. The operation type of the first operation may be a click operation, a double click operation, a long press operation, or the like; the operation position corresponding to the first operation represents the position of the first operation on the display screen.
For example, still in the example shown in fig. 2, the clicking operation performed by the user on the start key 201 on the tablet computer is the first operation described above, and the tablet computer may determine the operation information of the first operation; such as a click operation and a click position. Then, the tablet computer sends a remote control instruction to the notebook computer based on the operation information of the first operation, wherein the remote control instruction comprises the operation information of the first operation. Therefore, the notebook computer executes the response action corresponding to the first operation based on the remote control instruction.
The mode of the embodiment can realize the effect that the user can control the notebook computer on the tablet computer through the preset application.
After the notebook computer receives the remote control instruction sent by the tablet computer, the response action corresponding to the remote control instruction can be executed. In some examples, the notebook computer receiving the remote control command is that a preset application of the notebook computer receives the remote control command first. Then, the notebook computer needs to inject the remote control instruction into the bottom layer of the notebook computer so that the bottom layer of the notebook computer can execute response action to the remote control instruction; as in S602.
S602, injecting a remote control instruction into the bottom layer of the notebook computer by the notebook computer through a first injection mode by a preset application.
The notebook computer can adopt different modes by injecting remote control instructions into the bottom layer of the notebook computer through preset application. In the embodiment of the application, the notebook computer can inject the remote control instruction into the bottom layer by adopting a first injection mode through a preset application.
In some embodiments, the first injection manner may specifically inject a remote control instruction into an OS layer of the operating system of the notebook computer through a preset application, and the OS layer of the notebook computer may execute a response action based on the remote control instruction. Illustratively, the first injection mode includes: input injection mode.
In some examples, the bottom layer of the notebook computer includes an OS layer of the notebook computer. The method for injecting the remote control command into the bottom layer by the notebook computer through the preset application in the first injection mode is specifically realized by the following steps: the notebook computer calls a first preset interface of the OS layer through a preset application to inject a remote control instruction.
Under the condition that the notebook computer is in a starting-up and working state or a starting-up and non-working state, the notebook computer can call a first preset interface of the OS layer through the preset application. The method for calling the first preset interface of the OS layer by the notebook computer through the preset application specifically includes: the preset application sends a call request for the first preset interface to the OS layer. Wherein, the notebook computer is in a starting and non-working state can include: the notebook computer is in a screen locking state. It should be noted that, the abnormal states such as the failure of the notebook computer do not belong to the above-mentioned power-on and working state and power-on and non-working state.
However, the first injection mode (e.g., the input injection mode) has a lower access right. In the application, when the notebook computer is in a starting and non-working state, the remote control instruction is injected into the bottom layer of the notebook computer in the first injection mode, and the access can be refused to respond to the remote control instruction. If the remote control instruction is used for controlling the unlocking of the equipment, the master control equipment (namely the tablet computer) cannot remotely unlock the controlled equipment (notebook computer).
In some embodiments, when the notebook computer is in a power-on and working state, the notebook computer invokes the first preset interface through the preset application, and may inject a remote control instruction into the OS layer. The notebook computer is in a starting and non-working state, and the notebook computer can call the first preset interface through the preset application, but cannot inject a remote control instruction into the OS layer. That is, only when the notebook computer is in a power-on and operating state, the OS layer can receive the remote control instruction and execute a response action based on the remote control instruction.
In other embodiments, when the notebook computer is in a power-on and operating state or a power-on and non-operating state, the preset application invokes the first preset interface of the OS layer, and the preset application may inject a remote control instruction into the OS layer. That is, the notebook computer is in a power-on and working state or a power-on and non-working state, and the OS layer can receive a remote control instruction injected by a preset application. However, when the notebook computer is in a power-on and non-working state, the OS layer cannot complete the response action corresponding to the remote control command.
The specific implementation process of injecting the remote control command into the bottom layer by the notebook computer through the preset application in an input injection mode will be described in detail in the following embodiments.
S603, generating a response result corresponding to the remote control instruction by the bottom layer of the notebook computer.
As can be seen from the above description of the embodiments, in some embodiments, the notebook computer is in a power-on and operating state or a power-on and non-operating state, and the OS layer of the notebook computer may receive a remote control instruction injected by the preset application by calling the first preset interface. And in the starting-up and non-working state, the OS layer of the notebook computer cannot execute the response action corresponding to the remote control instruction. In this embodiment, the step S603 may specifically include: and generating a response result corresponding to the remote control instruction according to whether the response action corresponding to the remote control instruction can be executed on the OS layer. The OS layer generates a first response result when the OS layer can execute the response action corresponding to the remote control instruction; the first response result is used to indicate that the remote control instruction was executed successfully (i.e., access to the remote control instruction is allowed). When the OS layer cannot execute the response action corresponding to the remote control instruction, generating a second response result; the second response result is used to indicate that access to the remote control instruction is denied.
In other embodiments, the OS layer of the notebook computer may receive a remote control instruction injected by the preset application by calling the first preset interface when the notebook computer is turned on and in a working state. The OS layer of the notebook computer cannot receive a remote control instruction which is injected by a preset application through calling a first preset interface under the starting and non-working state. In this embodiment, the step S603 may specifically include: the bottom layer (such as an OS layer) of the notebook computer generates a response result corresponding to the remote control instruction according to whether the remote control instruction injected by the preset application can be received. The OS layer generates a first response result if a remote control instruction that is injected by the preset application is received after receiving a call request for a first preset interface sent by the preset application; the first response result is used to indicate that access to the remote control instruction is allowed. After receiving a call request for a first preset interface sent by a preset application, the OS layer generates a second response result if a remote control instruction which is injected by the preset application is not received; the second response result is used to indicate that access to the remote control instruction is denied.
In some embodiments, the response result corresponding to the remote control instruction generated in S603 may specifically be an error code (last error) of the preset application calling the first preset interface. In some specific examples, the first response result may include: last error=0; the second response result may include: last error=5.
According to the technical scheme provided by the embodiment of the application, the OS layer of the notebook computer generates the response result corresponding to the remote control instruction in the mode, so that the preset application can conveniently acquire the response result corresponding to the remote control instruction, and the corresponding operation is pointed out according to the response result.
S604, the notebook computer obtains a response result of the bottom layer of the notebook computer to the remote control instruction through a preset application.
The response result of the bottom layer of the notebook computer to the remote control instruction, that is, the response result corresponding to the remote control instruction generated in S603. In some embodiments, the step S604 may specifically include: the notebook computer obtains a response result of the bottom layer of the notebook computer to the remote control instruction by calling a preset function. In an embodiment in which the bottom layer of the notebook computer responds to the remote control instruction by calling the error code of the first preset interface by the preset application, the preset function may specifically be an error code acquisition function. Illustratively, the error code acquisition function may be denoted getlasterror ().
After S602, the preset application has injected the remote control command into the bottom layer by adopting the first injection mode, but because the notebook computer is in a power-on and non-working state, the corresponding response action cannot be executed for the remote control command, and thus the remote control of the user on the notebook computer cannot be realized. Taking the example that the remote control instruction corresponds to the operation triggered by the user on the lock screen interface 203 in the example shown in fig. 3, the tablet computer sends the remote control instruction to the notebook computer 1, and at this time, the notebook computer does not respond to the remote control instruction. Therefore, the user cannot remotely control and unlock the notebook computer on the tablet computer.
In order to reduce the occurrence of the above problem, in the embodiment of the present application, after the above step S602, the notebook computer may further obtain a response result to the remote control command through the preset application. The response result may be a response result corresponding to the remote control instruction generated by the bottom layer of the notebook computer in S603. Therefore, the notebook computer can conveniently judge the response result of the remote control instruction through the preset application, and whether the notebook computer responds to the remote control instruction successfully or not is determined. And, in the case that it is determined that the notebook computer does not respond successfully to the remote control instruction, the remote control instruction may be injected in other manners.
S605, the notebook computer judges whether the response result indicates that the bottom layer refuses to access the remote control instruction through the preset application.
The determination result in S605 specifically indicates whether the bottom layer of the notebook computer refuses to access the remote control command injected by the first injection method.
As can be seen from the above description of the embodiments, in some embodiments, the response result corresponding to the remote control instruction is an error code last error for calling the first preset interface for the preset application. In a specific implementation, it may be first determined whether last error is 0. If last error=0, it means that the notebook computer allows access to the remote control instruction. That is, the judgment result corresponding to S605 is no. In this case, the notebook computer may perform a corresponding response action to the remote control instruction, and the preset application may not perform other operations. The case where the determination result of S605 is no is not shown in fig. 4.
In other embodiments, if the determination result of last error is 0 is no, the next step of determining whether last error is 5 may be performed. If last error=5, it means that the notebook computer refuses the access of the remote control command.
That is, in some embodiments, the step S605 may specifically include: whether the last error is 0 is judged first, and if the last error is not 0, whether the last error=0 is 5 is judged. As is clear from the description of the above embodiments, the above determination result of S605 is no, if the last error is 0, or if the last error is other than 5 (i.e., the last error is not 5). And last error=5, the determination result corresponding to S605 is yes. In this case, the notebook computer cannot execute the response action corresponding to the remote control command, and at this time, the preset application may reinject the remote control command to the bottom layer of the notebook computer in other manners, as shown in S606-S607.
S606, injecting a remote control instruction into the bottom layer of the notebook computer by the notebook computer in a second injection mode through a preset application; the access right of the second injection mode is higher than that of the first injection mode.
In some embodiments, the step S606 may specifically include: the notebook computer firstly injects a remote control instruction into an OS layer of the notebook computer through a preset application, then the OS layer sends the remote control instruction to a corresponding driving layer, and the corresponding driving layer executes response action based on the remote control instruction.
The method for injecting the remote control instruction into the OS layer of the notebook computer by the notebook computer through the preset application comprises the following steps: the notebook computer calls a second preset interface of the OS layer through a preset application to inject a remote control instruction. The second preset interface may be used to inject remote control instructions in a second injection manner. The notebook computer calls a second preset interface of the OS layer through a preset application, which specifically may include: the preset application sends a call request for a second preset interface to the OS layer.
Illustratively, the second injection mode may include: virtual HID framework injection. In this embodiment, the sending, by the OS layer, the remote control instruction to the corresponding driving layer may specifically include: the OS layer sends the remote control instruction to the HID driver. In the embodiment in which the second injection mode is the virtual HID frame injection mode, the notebook computer is provided with an HID driver.
The specific implementation process of injecting the remote control command into the bottom layer by the notebook computer through the preset application in a virtual HID frame injection mode will be described in detail in the following embodiments.
S607, the bottom layer of the notebook computer executes response actions according to the remote control instruction.
In an embodiment where the second injection mode is a virtual HID frame injection mode, the step S607 may specifically include: and the HID driver of the notebook computer executes corresponding response actions according to the remote control instruction.
In some embodiments, the notebook computer executes a response action corresponding to the remote control instruction, which may specifically include: and the notebook computer responds to the remote control instruction and displays a corresponding interface. As can be seen from the description of the above embodiments, when the notebook computer is in a power-on and non-working state, the remote control command is injected into the bottom layer of the notebook computer in the first injection mode, and the bottom layer cannot execute the response action corresponding to the remote control command. The power-on and non-operating state includes a screen locking state. In some embodiments, the screen locking interface is displayed on the notebook computer before the remote control instruction is received, and the remote control instruction is used for controlling the notebook computer to release the screen locking state, so that the notebook computer executes a response action corresponding to the remote control instruction, which specifically may include: the notebook computer displays an unlocking interface. If the notebook computer needs to input a password to release the screen locking state, the unlocking interface can be a password input interface. If the notebook computer can release the unlocking state without inputting a password, the unlocking interface can be specifically an interface before the notebook computer enters the screen locking state.
Referring to fig. 5, the notebook computer is in a locked state, and the locked interface 104 is displayed. The tablet computer (i.e., tablet computer 2) displays a remote control interface, i.e., a lock screen interface 204 that is synchronized with the notebook computer (i.e., notebook computer 1). The user performs a first operation (which may be a click operation, a double click operation, a slide operation, or the like) on the lock screen interface 204. In response to the first operation, the notebook computer will execute a corresponding response action, i.e. display the unlock interface 105. It will be appreciated that the tablet computer will display the unlock interface 205 simultaneously on the remote control interface. Then, the user may input an unlocking password of the notebook computer on the unlocking interface 205 to remotely control the notebook computer to perform the unlocking operation. It will be appreciated that fig. 5 shows a response interface in a scenario where a notebook computer needs to enter a password to unlock the screen. In other examples, the notebook computer may release the unlocked state without entering a password, and the unlock interface displayed by the notebook computer in response to the remote control command may be an interface before entering the locked state, such as a main interface.
After the notebook computer displays the password input interface, the process of remotely inputting the password on the tablet computer by the user still belongs to the state that the notebook computer is in a screen locking state. In other embodiments, the notebook computer displays a password input interface before receiving the remote control command, and the remote control command is used for controlling a keyboard of a display screen of the notebook computer (or is used for inputting a password), so that the notebook computer executes a response action corresponding to the remote control command, which specifically may include: a screen keyboard (displaying the entered password) is displayed.
Fig. 6 shows another scenario in which a remote control method of an embodiment of the present application is implemented. The tablet computer (i.e., tablet computer 2) displays a remote control interface, i.e., an unlock interface synchronized with the notebook computer (i.e., notebook computer 1), specifically, a password input interface 206, synchronized with the password input interface 106 displayed by the notebook computer. The user performs a first operation on the password input interface 206. In response to the first operation, the notebook computer will execute a corresponding response action, i.e. display the password input interface 107, which includes the on-screen keyboard 108. It will be appreciated that the tablet computer will simultaneously display the password entry interface 207, including the on-screen keyboard 208, on the remote control interface. The user can sequentially input passwords by clicking or the like on the screen keyboard 208 on the password input interface 207.
In the technical scheme provided by the embodiment of the application, after the notebook computer receives the remote control instruction from the tablet computer, the remote control instruction is injected into the bottom layer of the notebook computer by adopting a first injection mode through preset application. After the remote control command is injected, the preset application obtains the response result of the notebook computer to the remote control command. When the notebook computer is in a starting and non-working state, the notebook computer refuses to access the remote control instruction injected by the first injection mode. After determining that the response result indicates that the bottom layer of the notebook computer refuses to access the remote control instruction, the preset application re-injects the remote control instruction into the bottom layer of the notebook computer in a second injection mode with higher access authority. Thus, the bottom layer of the notebook computer can receive the remote control instruction and execute the response action corresponding to the remote control instruction. Thus, when the notebook computer is in a starting and non-working state, the response to the remote control instruction can be still realized, and the response action corresponding to the remote control instruction is executed.
Taking the first injection mode as an input injection mode and the second input mode as a virtual HID frame injection mode as an example, a detailed description will be given of a specific implementation procedure of the above method with reference to fig. 7. In this embodiment, a connection is established between a tablet computer and a notebook computer, the tablet computer is a master control device, and the notebook computer is a controlled device. The tablet computer can remotely control the notebook computer through the established connection.
S701, the tablet personal computer receives a first operation.
S702, responding to a first operation by the tablet personal computer, and filling a remote control instruction according to a preset data format.
The preset data format is a preset data format. In some embodiments, when the master device transmits the remote control command to the controlled device, the remote control command needs to be filled according to the preset data format. In some specific examples, the preset data format includes a user reverse control (user input back control, UIBC) data format. The specific format contents of UIBC data format may be referred to table 1.
TABLE 1
Where T is that there is an optional timestamp before entering the body, where 0 indicates that the timestamp field is not present and 1 indicates that the timestamp field is present. The reservation parameters are reserved for use, should be set to all zeros at transmission and ignored at reception. The input class represents the class of input for TCP payload delivery. The length represents the length of the entire TCP payload in 8 bits, from bit offset 0 to the end of the UIBC input body.
S703, sending a remote control instruction with a preset data format to the notebook computer.
S704, converting the remote control instruction from a preset data format into a pointer input type data format.
The pointer input type data format is a data format supported by the OS layer. In some embodiments, pointer input type data formats may be categorized into touch pointer type data formats and pen pointer type data formats.
In some embodiments, the remote control instruction in the pointer input type data format is a data format that the OS layer of the notebook computer can read.
By way of example, the above S704 may be specifically implemented by the following codes:
typedef struct tagPOINTER _TYPE_INFO {// TYPE definition structure tag pointer TYPE information
POINTER INPUT TYPE information TYPE
union {
POINTER_TOUCH_ INFO touchInfo;// TOUCH POINTER information
Pointer_PEN_ INFO penInfo;// PEN POINTER information
DUMMYUNIONNAME;// opaque members
Interter TYPE INFO PPOINTER TYPE INFO POINTER TYPE information
S705. configuring a pointer injection device for a preset application, and initializing a maximum number of pointers that allow the preset application to be injected simultaneously.
It should be noted that, the notebook computer may execute S704 first through the preset application, and then execute S705; or S705 may be performed first and then S704 may be performed; or the notebook computer may execute S704 and S705 simultaneously, and in the embodiment of the present application, the execution sequence of S704 and S705 is not limited.
In some embodiments, the pointer injection device may specifically include a touch pointer injection device (pt_touch) or a pen pointer injection device (pt_pen). For example, the notebook computer may determine, according to the remote control instruction, a pointer injection device that needs to be configured for the preset application.
By way of example, the above S705 may be implemented by the following code:
HSYNTHETICPOINTERDEVICE CreateSyntheticPointerDevice (//composition pointer device creation composition pointer device
[ In POINTER_INPUT_ TYPE pointerType,// POINTER injection device type
[ In ] ULONG maxCount,// maximum contact number
[ In ] POINTER_FEEDBACK_MODE MODE// POINTER FEEDBACK MODE
);
S706, injecting a remote control instruction in a pointer input type data format into an operating system of the notebook computer based on the pointer injection equipment.
As can be seen from the description of the above embodiments, the injection device types may include a touch pointer injection device or a pen pointer injection device. If the type of the injection equipment is a touch pointer injection type, injecting a remote control instruction in a pointer input type data format into an operating system of the notebook computer based on the touch pointer injection equipment. If the injection equipment type is pen pointer injection type, injecting a remote control instruction in a pointer input type data format into an operating system of the notebook computer based on the pen pointer injection equipment.
In some embodiments, the step S706 may specifically include: the preset application injects a remote control instruction into an operating system simulation pointer of the notebook computer. By way of example, S706 described above may be implemented in particular by the following code (analog pen pointer or touch pointer input):
BOOL InjectSyntheticPointerInput (//inject composition pointer input
HSYNTHETICPOINTERDEVICE device,// composition pointer device
[ In & const POINTER_TYPE_INFO ] pointerInfo,// POINTER TYPE information ] POINTER information
[ In ] UINT32 count// count
);
And S707, generating a response result corresponding to the remote control instruction.
S708, obtaining a response result of the operating system of the notebook computer to the remote control instruction.
The response result of the operating system to the remote control instruction, that is, the response result corresponding to the remote control instruction generated in S708.
S709, judging whether the response result indicates that the operating system refuses the access of the remote control instruction.
S710, converting the remote control instruction from a preset data format into a touch screen input report data format.
The method for converting the remote control command from the preset data format to the touch screen input report data format can specifically comprise the following steps: and combining a specific format of the report data format input by the touch screen, and filling a remote control instruction of a preset data format according to the report data format input by the touch screen. The specific format of the touch screen input report data format may be referred to in the description of the following embodiments.
S711, calling a second preset interface of an operating system of the notebook computer, and writing a remote control instruction of a report data format into the virtual HID driver.
In some embodiments, the S711 may be specifically implemented by an application programming interface (application programming interface, API) function of the write serial operation, and a remote control instruction is injected into the OS layer corresponding to the call of the second preset interface in the above embodiment.
By way of example, the API function of the write serial operation may specifically include the following code (writing data (including remote control instructions in the touch screen input report data format described above) to a specified file or input/output (I/O) device):
BOOL WriteFile(
[ in ] HANDLE HFILE,// handle to point to identity
[ In ] LPCVOID lpBuffer,// point to a buffer
[ In ] DWORD nNumberOfBytesToWrite,// specifies the number of bytes to be written to the serial device
[ Out, optional ] LPDWORD lpNumberOfBytesWritten,// points to the number of bytes written to call the function
[ In, out, optional ] LPOVERLAPPED lpOverlapped// one OVERLAPPED structure
);
In some embodiments, the specific format of the remote control instructions for the touch screen input report data format may be referred to in Table 2.
TABLE 2
Wherein an electronic device (e.g., a notebook computer) may report two points for each contact. The first point (called T) is considered the point the user intends to touch, while the second point (called C) is considered the center of the contact. The device capable of reporting T and C should have a usage array containing two X values and two Y values. The value of the first position in the array is interpreted as the coordinates of T and the value of the second position is interpreted as the coordinates of C.
S712, the virtual HID driver responds according to a remote control instruction of the report data format input by the touch screen.
According to the technical scheme provided by the application, after the notebook computer receives the remote control instruction from the tablet personal computer through the preset application, the remote control instruction is injected into the OS layer according to the pointer input type data format. Under the condition that the OS layer cannot reject the remote control instruction in the pointer input type data format, the preset application converts the remote control instruction into the touch screen input report data format, and then the remote control instruction in the touch screen input report data format is injected into the virtual HID driver through the OS layer. Because the access authority of the injection mode (namely, the second injection mode) of the remote control command for inputting the report data format into the virtual HID driver injection touch screen is higher than that of the injection mode (namely, the first injection mode) of the remote control command for inputting the pointer input type data format into the OS layer, the virtual HID driver of the notebook computer still allows the access of the remote control command even if the notebook computer is in a starting and non-working state. Thus, the virtual HID may perform a response action corresponding to the remote control instruction.
In addition, in the technical scheme provided by the embodiment of the application, when the controlled equipment such as the notebook computer is in a starting and working state, the remote control instruction is injected into the operating system of the controlled equipment by adopting a first injection mode through the preset application, so that the operating system executes the response action corresponding to the remote control instruction. When the controlled equipment is in a starting-up and non-working state, a first injection mode is adopted to inject a remote control instruction, so that the problem of unresponsiveness can occur. Thus, in the embodiment of the present application, once the remote control command is found to be unsuccessfully injected in the first injection mode, the second injection mode is used. And injecting a remote control instruction in a second injection mode, wherein the remote control instruction is required to be sent to an operating system by a preset application, then the operating system injects the remote control instruction into a virtual HID driver, and finally the virtual HID driver executes a response action corresponding to the remote control instruction. Compared with the second injection mode, the first injection mode can realize remote control only by interaction between the preset application and the operating system, and the implementation is simpler. When the controlled equipment is in a starting-up and working state, the first injection mode is adopted to respond to the remote control instruction more quickly. And when the controlled equipment is in a starting-up and non-working state, the second injection mode is adopted to ensure that the controlled equipment can still respond to the remote control instruction.
Fig. 8 illustrates a software architecture diagram of some electronic devices according to an embodiment of the present application. In this embodiment, the electronic device may include an application layer, an OS layer, and a driver layer. The application layer may include a preset application including a message format for user input (simulate and automate user input from touch) through touch simulation and automation, and a message format for input report (input report), among others. The preset application also comprises a response result judging module. The user library file of the OS layer includes a touch input interface (touch injection API, the first preset interface described above) and a data transfer HID interface (data movement HID API, the second preset interface described above). The HID class driver (hidclass. Sys) of the driver layer includes virtual HID drivers.
In the process that the remote control instruction is injected into the OS layer by the notebook computer through the preset application in an input type injection mode, the preset application can call a touch input interface of the OS layer by adopting a message format input by a touch simulation and automatic user so as to inject the remote control instruction into the OS layer. In the process that the remote control command is injected into the OS layer by the preset application in a virtual HID framework injection mode, the preset application can call the data transmission HID interface by adopting a message format of an input report, so that the remote control command is injected into the virtual HID driver through the OS layer.
In addition, after the remote control instruction is injected into the OS layer through the preset application in an input injection mode, a response result judging module of the preset application can acquire a response result corresponding to the remote control instruction generated by the OS layer, judge the response result and determine whether the OS layer refuses to access the remote control instruction.
Fig. 9 illustrates a hardware structure of an electronic device in some embodiments. The electronic device may be the first electronic device described above, for example.
As shown in fig. 9, the electronic device 800 may include: processor 810, internal memory 820, universal serial bus (universal serial bus, USB) interface 830, power interface 831, charge management module 840, power management module 841, battery 842, wireless communication module 850, display 860, fan 870, and the like.
It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 800. In other embodiments, electronic device 800 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 810 may include one or more processing units, such as: the processor 810 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and command center of the electronic device 800. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 810 for storing instructions and data. In some embodiments, the memory in processor 810 is a cache memory. The memory may hold instructions or data that the processor 810 has just used or recycled. If the processor 810 needs to reuse the instruction or data, it may be called directly from memory. Repeated accesses are avoided and the latency of the processor 810 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 810 may include one or more interfaces. The interfaces may include an I2C interface, an integrated circuit built-in audio (inter-INTEGRATED CIRCUIT SOUND, I2S) interface, a pulse code modulation (pulsecodemodulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a USB interface, among others.
It should be understood that the connection relationship between the modules illustrated in this embodiment is merely illustrative, and does not limit the structure of the electronic device 800. In other embodiments, the electronic device 800 may also employ different interfaces in the above embodiments, or a combination of interfaces.
Internal memory 820 may be used to store computer-executable program code that includes instructions. The processor 810 executes various functional applications of the electronic device 800 and data processing by executing instructions stored in the internal memory 820. For example, in an embodiment of the present application, the processor 810 may be configured to execute instructions stored in the internal memory 820, and the internal memory 820 may include a stored program area and a stored data area.
The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 800 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 820 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash memory (universal flash storage, UFS), and the like.
USB interface 830 may be used to transfer data between electronic device 800 and peripheral devices.
The charge management module 840 is for receiving charge input from a charger. The charger may access the charge management module 840 through the power interface 831. The charging management module 840 may also provide power to the electronic device through the power management module 841 while charging the battery 842.
The power management module 841 is configured to connect the battery 842, the charge management module 840 and the processor 810. The power management module 841 receives input from the battery 842 and/or the charge management module 840, and provides power to the processor 810, the internal memory 820, the external memory, the display 860, the wireless communication module 850, and the like. In some embodiments, the power management module 841 and the charge management module 840 may also be provided in the same device.
The wireless communication module 850 may provide solutions for wireless communication including WLAN (e.g., wi-Fi), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near Field Communication (NFC), infrared (IR), etc. applied to the electronic device 800. For example, in an embodiment of the present application, the electronic device 800 may establish a bluetooth connection with other devices through the wireless communication module 850.
The wireless communication module 850 may be one or more devices that integrate at least one communication processing module. The wireless communication module 850 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 810. The wireless communication module 850 may also receive signals to be transmitted from the processor 810, frequency modulate them, amplify them, and convert them to electromagnetic waves for radiation via an antenna.
The display screen 860 is for displaying images, videos, and the like, and the display screen 860 includes a display panel. The electronic device 800 implements display functions via a GPU, a display screen 860, and an application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 860 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 810 may include one or more GPUs that execute program instructions to generate or change display information.
The fan 870 may be used to dissipate heat for an electronic device, such as a CPU.
The remote control methods in the above embodiments may be implemented in the electronic device 500 having the above-described hardware configuration.
Other embodiments of the present application provide an electronic device (e.g., a notebook computer). The electronic device may include: a memory, one or more processors, and computer instructions stored on the memory. The memory is coupled to the processor. When the processor executes the computer instructions, the electronic device may perform the functions or steps performed by the notebook computer in the method embodiments described above. The structure of the electronic device may refer to the structure of the electronic device 800 shown in fig. 9.
In some embodiments, the electronic device may include: and presetting a virtual HID driver.
The embodiment of the present application further provides a chip system, as shown in fig. 10, the chip system 900 includes at least one processor 901 and at least one interface circuit 902. The processor 901 and the interface circuit 902 may be interconnected by wires. For example, the interface circuit 902 may be used to receive signals from other devices (e.g., a memory of a computer). For another example, interface circuitry 902 may be used to send signals to other devices (e.g., processor 901). The interface circuit 902 may, for example, read instructions stored in a memory and send the instructions to the processor 901. The instructions, when executed by the processor 901, may cause a computer to perform the various steps in the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
Embodiments of the present application also provide a computer-readable storage medium, where the computer-readable storage medium includes computer instructions that, when executed on an electronic device (e.g., a notebook computer) described above, cause the electronic device to perform functions or steps performed by the notebook computer in the method embodiment described above.
The embodiment of the application also provides a computer program product, which when run on a computer, causes the computer to execute the functions or steps executed by the notebook computer in the method embodiment. The computer may be an electronic device, such as a notebook computer.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts shown as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.
Claims (10)
1. A remote control method, characterized in that the method is applied to a first electronic device, the first electronic device comprising a remote control application; the method comprises the following steps:
Under the condition of being in a screen locking state, receiving a remote control instruction sent by the second electronic equipment through the remote control application;
Injecting the remote control instruction into the bottom layer of the first electronic device in a first injection mode through the remote control application, so that the bottom layer of the first electronic device responds according to the remote control instruction; the first injection mode comprises the following steps: an input injection mode; the input type injection mode is used for simulating the input of the input device and directing the input of the input device to the bottom layer of the first electronic device;
Acquiring a response result of the bottom layer of the first electronic device to the remote control instruction through the remote control application;
if the response result indicates that the bottom layer of the first electronic device refuses the access of the remote control instruction, the remote control instruction is injected into the bottom layer of the first electronic device in a second injection mode through the remote control application; the access right of the second injection mode is higher than that of the first injection mode;
The second injection mode comprises the following steps: the method comprises the following steps of (1) injecting an HID frame into a virtual man-machine interface device;
The bottom layer of the first electronic device comprises an operating system and a preset virtual HID driver; the injecting, by the remote control application, the remote control instruction into the bottom layer of the first electronic device in a second injection manner includes:
converting the remote control instruction into a remote control instruction in a touch screen input report data format through the remote control application;
and calling a second preset interface of the operating system, writing a remote control instruction of the touch screen input report data format into the preset virtual HID driver, wherein the second preset interface is used for transmitting data to the preset virtual HID driver.
2. The method of claim 1, wherein the bottom layer of the first electronic device comprises an operating system; the injecting, by the remote control application, the remote control instruction into the bottom layer of the first electronic device in a first injection manner includes:
Converting the remote control instruction into a remote control instruction in a pointer input type data format through the remote control application;
Configuring a pointer injection device for the remote control application;
and injecting a remote control instruction in the pointer input type data format into the operating system through the remote control application based on the pointer injection device.
3. The method of claim 1, wherein said injecting, by said remote control application, said remote control instructions into an underlying layer of said first electronic device in a first injection manner comprises:
And calling a first preset interface of the first electronic equipment through the remote control application so as to inject the remote control instruction into the bottom layer of the first electronic equipment.
4. The method of claim 3, wherein the obtaining, by the remote control application, a result of the response of the bottom layer of the first electronic device to the remote control instruction comprises:
Acquiring a calling result of the bottom layer of the first electronic device on the first preset interface through the remote control application calling result acquisition function; and the calling result is used for representing a response result of the bottom layer of the first electronic device to the remote control instruction.
5. The method of claim 4, wherein the result retrieval function comprises an error code retrieval function, and wherein the call result to the first preset interface comprises an error code generated based on a call request to the first preset interface.
6. The method of claim 5, wherein the method further comprises:
and when the error code is 5, characterizing that the response result indicates that the bottom layer of the first electronic device refuses the access of the remote control instruction.
7. The method of claim 5, wherein the method further comprises:
and when the error code is 0, characterizing that the response result indicates that the bottom layer of the first electronic device allows the access of the remote control instruction.
8. An electronic device, wherein the electronic device is a first electronic device, the electronic device comprising: a processor, a memory, and a computer program stored on the memory; the memory is respectively coupled with the processor;
when the electronic device is running, the processor executes the computer program to implement the method of any one of claims 1-7.
9. A computer readable storage medium, characterized in that a computer program is stored, which computer program, when being executed by a processor of an electronic device, implements the method according to any of claims 1-7.
10. A computer program product comprising a computer program which, when executed by a processor, implements the method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410128623.0A CN117675805B (en) | 2024-01-30 | 2024-01-30 | Remote control method and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410128623.0A CN117675805B (en) | 2024-01-30 | 2024-01-30 | Remote control method and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN117675805A CN117675805A (en) | 2024-03-08 |
CN117675805B true CN117675805B (en) | 2024-06-11 |
Family
ID=90064398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410128623.0A Active CN117675805B (en) | 2024-01-30 | 2024-01-30 | Remote control method and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117675805B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107659597A (en) * | 2016-07-25 | 2018-02-02 | 北京北信源软件股份有限公司 | A kind of method that screen locking is remotely carried out to controlled terminal |
CN115242825A (en) * | 2021-04-25 | 2022-10-25 | 华为技术有限公司 | Remote control method and device |
CN115904588A (en) * | 2022-11-21 | 2023-04-04 | 厦门天锐科技股份有限公司 | Remote control method, device and system for terminal screen |
CN116419184A (en) * | 2023-04-18 | 2023-07-11 | 中国第一汽车股份有限公司 | Processing method for vehicle remote wake-up and computer readable storage medium |
CN116521460A (en) * | 2023-04-13 | 2023-08-01 | 中信建投证券股份有限公司 | Screen unlocking method and device for test equipment, electronic equipment and storage medium |
CN116743496A (en) * | 2023-07-31 | 2023-09-12 | 腾讯科技(深圳)有限公司 | Device remote operation method, device, computer device and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8670748B2 (en) * | 2009-05-01 | 2014-03-11 | Apple Inc. | Remotely locating and commanding a mobile device |
US8959323B2 (en) * | 2010-10-27 | 2015-02-17 | International Business Machines Corporation | Remote restarting client logical partition on a target virtual input/output server using hibernation data in a cluster aware data processing system |
US20130212702A1 (en) * | 2012-01-06 | 2013-08-15 | Redporte Inc. | Apparatus and Method for Data Security on Mobile Devices |
-
2024
- 2024-01-30 CN CN202410128623.0A patent/CN117675805B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107659597A (en) * | 2016-07-25 | 2018-02-02 | 北京北信源软件股份有限公司 | A kind of method that screen locking is remotely carried out to controlled terminal |
CN115242825A (en) * | 2021-04-25 | 2022-10-25 | 华为技术有限公司 | Remote control method and device |
CN115904588A (en) * | 2022-11-21 | 2023-04-04 | 厦门天锐科技股份有限公司 | Remote control method, device and system for terminal screen |
CN116521460A (en) * | 2023-04-13 | 2023-08-01 | 中信建投证券股份有限公司 | Screen unlocking method and device for test equipment, electronic equipment and storage medium |
CN116419184A (en) * | 2023-04-18 | 2023-07-11 | 中国第一汽车股份有限公司 | Processing method for vehicle remote wake-up and computer readable storage medium |
CN116743496A (en) * | 2023-07-31 | 2023-09-12 | 腾讯科技(深圳)有限公司 | Device remote operation method, device, computer device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN117675805A (en) | 2024-03-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP4040277A1 (en) | Method for displaying multiple windows, and electronic device and system | |
CN111190748B (en) | Data sharing method, device, equipment and storage medium | |
US20060160569A1 (en) | Cellular phone and portable storage device using the same | |
US7949708B2 (en) | Using a remote handheld device as a local device | |
CN103106109A (en) | Mobile communication device and application interface switching method | |
WO2022022490A1 (en) | Cross-device object dragging method and device | |
US20240129742A1 (en) | Method For Unlocking Terminal Device by Wearable Device and Communication System | |
CN104391695A (en) | Method for performing synchronous control through external equipment and device thereof | |
WO2023179425A1 (en) | Input device connection method, device, and system | |
WO2011120329A1 (en) | Computer and method to realize the coupling between computers | |
EP4195870B1 (en) | Data transmission method and terminal | |
WO2023124141A1 (en) | Input method calling method and related device | |
CN109144723B (en) | Method and terminal for allocating storage space | |
US20110163949A1 (en) | Control system using portable electronic device for performing operations | |
CN112269086A (en) | Charging cable identification method and device, charging cable and readable storage medium | |
KR20140090112A (en) | Method and apparatus for pairing electronic devices | |
CN114115673B (en) | Control method of vehicle-mounted screen | |
CN117675805B (en) | Remote control method and electronic equipment | |
WO2024139279A1 (en) | Access control list rule configuration method and apparatus, electronic device, and storage medium | |
US20230378767A1 (en) | Charging control method and apparatus, electronic device, and charger | |
CN117215990A (en) | Inter-core communication method and device of multi-core chip and multi-core chip | |
CN115278616A (en) | File sharing method and electronic equipment | |
WO2017211260A1 (en) | Data access method and related device | |
CN115567395B (en) | Master-slave node determination method and device, electronic equipment and storage medium | |
WO2023088198A1 (en) | Network connection method and apparatus, and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |