Disclosure of Invention
In view of this, embodiments of the present invention provide a method, a system, and a storage medium for responding to local input content by a cloud phone with a fast response speed, so as to improve the input experience of a user.
In a first aspect, an embodiment of the present invention provides a method for responding to local input content by a cloud mobile phone, including the following steps:
feeding back a first signal to the server according to the received touch click information so that the client starts to receive user input information according to the first signal;
and feeding back a second signal to the server according to the received user input information, so that the client stops receiving the user input information according to the second signal.
Further, the step of feeding back the first signal to the server according to the received touch click information includes the following steps:
writing touch click information sent by a server into an equipment node through a remote play module;
sending the touch click information to a window management service module through the equipment node;
sending the touch click information to a binder driver through a window management service module;
sending the touch click information to an application program of the cloud mobile phone through a binder drive;
according to the touch click information, feeding back a first signal to the input method service module and the binder driver by an application program;
the first signal is sent to a remote playing module through binder driving;
and feeding back the first signal to the server through the remote play module.
Further, the step of feeding back the second signal to the server according to the received user input information includes the following steps:
user input information sent by a server is sent to a binder driver through a remote play module;
sending user input information to an input method service module through a binder drive;
based on a binder mechanism, submitting user input information to an application program of the cloud mobile phone through an input method service module;
sending the second signal to a binder driver through an application program according to the user input information;
the second signal is sent to the remote playing module through the binder drive;
and feeding back the second signal to the server through the remote play module.
Further, the step of sending the second signal to the binder driver through the application program according to the user input information includes the following steps:
submitting user input information to an edit box of an application program through an input channel;
displaying user input information in real time through an edit box;
and after determining that the input focus of the application program disappears, generating a second signal by the application program and sending the second signal to the binder driver for driving.
In a second aspect, an embodiment of the present invention further provides a method for responding to locally input content by a cloud mobile phone, including the following steps:
receiving touch click information sent by a client, and sending the touch click information to the cloud mobile phone;
receiving a first signal sent by a cloud mobile phone, and sending the first signal to a client;
receiving user input information sent by a client, and sending a user input signal to a cloud mobile phone;
and receiving a second signal sent by the cloud mobile phone, and sending the second signal to the client.
In a third aspect, an embodiment of the present invention further provides a method for responding to local input content by a cloud mobile phone, including the following steps:
acquiring touch click information, and then sending the touch click information to a server;
receiving a first signal sent by a server, then acquiring user input information, and sending the user input information to the server;
and receiving a second signal sent by the server, and then stopping acquiring the user input information.
In a fourth aspect, an embodiment of the present invention further provides a system for responding to local input content by a cloud mobile phone, where the system includes:
the first feedback module is used for feeding back a first signal to the server according to the received touch click information so that the client starts to receive user input information according to the first signal;
and the second feedback module is used for feeding back a second signal to the server according to the received user input information so as to enable the client to stop receiving the user input information according to the second signal.
In a fifth aspect, an embodiment of the present invention further provides a system for responding to locally input content by a cloud mobile phone, including a client, a server, and a cloud mobile phone;
the cloud cell phone comprises:
the first feedback module is used for feeding back a first signal to the server according to the received touch click information so that the client starts to receive user input information according to the first signal;
the second feedback module is used for feeding back a second signal to the server according to the received user input information so as to enable the client to stop receiving the user input information according to the second signal;
the client comprises:
the first acquisition module is used for acquiring touch click information and then sending the touch click information to the server;
the second acquisition module is used for receiving the first signal sent by the server, then acquiring user input information and sending the user input information to the server;
the stopping module is used for receiving a second signal sent by the server and then stopping acquiring the user input information;
the server side comprises:
the first forwarding module is used for receiving touch click information sent by the client and sending the touch click information to the cloud mobile phone;
the second forwarding module is used for receiving a first signal sent by the cloud mobile phone and sending the first signal to the client;
the third forwarding module is used for receiving user input information sent by the client and sending a user input signal to the cloud mobile phone;
and the fourth forwarding module is used for receiving the second signal sent by the cloud mobile phone and sending the second signal to the client.
In a sixth aspect, an embodiment of the present invention further provides a system for responding to local input content by a cloud mobile phone, where the system includes:
at least one processor;
at least one memory for storing at least one program;
when the at least one program is executed by the at least one processor, the at least one processor is caused to implement the method for responding to locally input content by the cloud handset.
In a seventh aspect, an embodiment of the present invention further provides a storage medium, where processor-executable instructions are stored, and when executed by a processor, the processor-executable instructions are configured to perform the method for responding to the local input content by the cloud handset.
One or more of the above-described embodiments of the present invention have the following advantages: according to the embodiment of the invention, a first signal is fed back to the client through the cloud mobile phone according to the touch click information acquired by the client, so that the client starts to acquire the input information of the user; after the client acquires the complete user input information, the cloud mobile phone feeds back a second signal to the client so that the client stops receiving the user input information; compared with the prior art, the method and the device have the advantages that the input method does not need to be installed on the cloud mobile phone again, so that the influence of network fluctuation is avoided, the response speed is increased, and the use experience of the user is improved.
Detailed Description
The invention will be further explained and explained with reference to the drawings and the embodiments in the description. The step numbers in the embodiments of the present invention are set for convenience of illustration only, the order between the steps is not limited at all, and the execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
Referring to fig. 1, an embodiment of the present invention provides a method for responding to a local input content by a cloud mobile phone, including the following steps:
feeding back a first signal to the server according to the received touch click information so that the client starts to receive user input information according to the first signal;
and feeding back a second signal to the server according to the received user input information, so that the client stops receiving the user input information according to the second signal.
Further, as a preferred embodiment, the step of feeding back the first signal to the server according to the received touch click information includes the following steps:
writing touch click information sent by a server into an equipment node through a remote play module;
sending the touch click information to a window management service module through the equipment node;
sending the touch click information to a binder driver through a window management service module;
sending the touch click information to an application program of the cloud mobile phone through a binder drive;
according to the touch click information, feeding back a first signal to the input method service module and the binder driver by an application program;
the first signal is sent to a remote playing module through binder driving;
and feeding back the first signal to the server through the remote play module.
Further as a preferred embodiment, the step of feeding back the second signal to the server according to the received user input information includes the following steps:
user input information sent by a server is sent to a binder driver through a remote play module;
sending user input information to an input method service module through a binder drive;
based on a binder mechanism, submitting user input information to an application program of the cloud mobile phone through an input method service module;
sending the second signal to a binder driver through an application program according to the user input information;
the second signal is sent to the remote playing module through the binder drive;
and feeding back the second signal to the server through the remote play module.
Further as a preferred embodiment, the step of sending the second signal to the binder driver by the application program according to the user input information includes the following steps:
submitting user input information to an edit box of an application program through an input channel;
displaying user input information in real time through an edit box;
and after determining that the input focus of the application program disappears, generating a second signal by the application program and sending the second signal to the binder driver for driving.
Referring to fig. 1, an embodiment of the present invention further provides a method for responding to local input content by a cloud mobile phone, including the following steps:
receiving touch click information sent by a client, and sending the touch click information to the cloud mobile phone;
receiving a first signal sent by a cloud mobile phone, and sending the first signal to a client;
receiving user input information sent by a client, and sending a user input signal to a cloud mobile phone;
and receiving a second signal sent by the cloud mobile phone, and sending the second signal to the client.
Referring to fig. 1, an embodiment of the present invention further provides a method for responding to local input content by a cloud mobile phone, including the following steps:
acquiring touch click information, and then sending the touch click information to a server;
receiving a first signal sent by a server, then acquiring user input information, and sending the user input information to the server;
and receiving a second signal sent by the server, and then stopping acquiring the user input information.
Referring to fig. 2, the following describes in detail specific implementation steps of the method for responding to the local input content by the cloud mobile phone of the present invention:
s1, the client sends the acquired touch click information to the server;
s2, the server transmits the touch click information to the cloud mobile phone;
s3, the cloud mobile phone feeds back a first signal to the server according to the touch click information;
specifically, the step S3 includes the following steps:
s31, writing the touch click information sent by the server into the equipment node through the remote play module;
s32, sending the touch click information to a window management service module through the equipment node;
s33, sending the touch click information to a binder driver through a window management service module;
s34, sending the touch click information to an application program of the cloud mobile phone through a binder drive;
s35, feeding back a first signal to the input method service module and the binder driver by the application program according to the touch click information;
s36, sending the first signal to a remote playing module through binder driving;
and S37, feeding back the first signal to the server through the remote play module.
First, when a user clicks an editable control EditText of a client, the EditText will obtain an input focus, and at this time, an input method service module InputMethodManager in parent View sends a first signal startInput to an input method system service inputmethodmanageservice (IMMS for short) through an IPC (inter-process communication) Binder mechanism, where the first signal is referred to as an input start event in this embodiment.
At this time, the imms. startinput function will be called, the imms. startinput function seals the parameter IInputContext (input context) therein, and at this time, the input start event and the parameter EditorInfo information analysis information need to be transmitted to the client for input, so as to prompt the client to start acquiring the input information of the user; the specific way of transmitting the input starting event and the parameter analysis information to the client is as follows: sending the second signal to a remote-play module remote-play through binder driving; and then feeding back the second signal to the server through the remote playing module.
Of course, the end state is the state in which the finishingmount event is passed to the IMMS in the same way also through the InputMethodManager object when EditText loses focus, and this time the client needs to be notified to end the input as well. It is necessary to insert code to pass events back to the client by modifying the inputmethodmanageservice source file, thus solving the problem of when to start an input and when to end an input.
S4, the client receives user input information according to the first signal sent by the server;
s5, the client transmits the user input information to the server;
s6, the server transmits the user input information to the cloud mobile phone;
s7, the cloud mobile phone feeds back a second signal to the server according to the user input information;
specifically, the step S7 includes the steps of:
s71, sending the second signal to a binder driver through an application program according to the user input information;
wherein the step S71 includes the steps of:
s711, submitting the user input information to an edit box of the application program through an input channel;
s712, displaying the input information of the user in real time through an edit box;
and S713, after the input focus of the application program is determined to disappear, the application program generates a second signal and sends the second signal to a binder driver.
S72, sending the second signal to a remote playing module through binder driving;
and S73, feeding back the second signal to the server through the remote playing module.
The problem to be solved in step S7 of this embodiment is to determine when the client App starts scheduling the local input method, and the client play page is displayed based on the GLSurfaceView View, and since the GLSurfaceView is a derivative of View, functions onCheckIsTextEditor (a function that determines whether text editing is allowed) and onCreateInputConnection (a channel that creates an input connection) can be rewritten to set an inputtable state for the GLSurfaceView (by clicking the View, a default input method installed by the user' S own mobile phone will be hidden).
First, the present embodiment rewrites onCheckIsTextEditor to set its return value to true to identify that text input can be received. Next, rewriting the onCreateInputConnection function to construct an input channel (InputConnection), and implementing a commitText function and a sendKeyEvent by inheriting the baselnputconnection. The parameter of the commitText function specifically refers to the content input locally by the user, and the content input locally by the user can be transmitted to the cloud mobile phone end for display after being filtered by a certain condition. In addition, for the processing of the delete key keymode _ DEL and the ENTER key _ ENTER key, the present embodiment captures the delete and ENTER events by overwriting sendKeyEvent and passes the events to the cloud handset for processing.
The specific way for transmitting the content input by the user locally to the cloud mobile phone end is as follows: the client APP sends the content input by the user to the server, then the server forwards the content input by the user to a remote playing module remote-play of the cloud mobile phone, and finally the remote playing module sends the content input by the user to an input method system service IMMS.
And S8, the client stops receiving the user input information and hides the local input method according to the second signal sent by the server.
The method comprises the steps of receiving local input contents of a user through a starting input event transmitted back by the cloud mobile phone, transmitting the local input contents to the cloud mobile phone end in real time, submitting contents and key information through the InputConnection of IInputContext reserved by the system service IMMS, displaying the input contents through EditText, and finishing input and hiding a local input method by a client when receiving a finishing input event.
In addition, the whole set of input flow of the invention also needs a cloud mobile phone instruction control service (namely a server), and the service can realize the function of mutual communication between the client and the cloud mobile phone. Firstly, a control server (ControlServer) needs to be established in a server, remote-play (namely a remote play module) is realized at a cloud mobile phone end, data (including video stream, instruction, text and other data) are transmitted between the remote service and the control service in real time in a Socket long connection mode, and the client also needs to establish a corresponding Socket client to keep communication with the ControlServer.
The method can realize the functional scene of 'cloud copy', solve the problems of unsmooth input card, misplaced input content and the like in the traditional scheme, does not need a user to install a preferred input method on the cloud mobile phone, saves the setting operation of the user on the input method, and can enable the user to feel the experience as local input. In addition, the method can be applied to a web end, an iOS end, a windows end, a macOS end, an Android end and the like, and specific application scenes can be switched according to actual needs.
Corresponding to the method in fig. 1, an embodiment of the present invention further provides a system for responding to local input content by a cloud phone, including:
the first feedback module is used for feeding back a first signal to the server according to the received touch click information so that the client starts to receive user input information according to the first signal;
and the second feedback module is used for feeding back a second signal to the server according to the received user input information so as to enable the client to stop receiving the user input information according to the second signal.
In a fifth aspect, an embodiment of the present invention further provides a system for responding to locally input content by a cloud mobile phone, including a client, a server, and a cloud mobile phone;
the cloud cell phone comprises:
the first feedback module is used for feeding back a first signal to the server according to the received touch click information so that the client starts to receive user input information according to the first signal;
the second feedback module is used for feeding back a second signal to the server according to the received user input information so as to enable the client to stop receiving the user input information according to the second signal;
the client comprises:
the first acquisition module is used for acquiring touch click information and then sending the touch click information to the server;
the second acquisition module is used for receiving the first signal sent by the server, then acquiring user input information and sending the user input information to the server;
the stopping module is used for receiving a second signal sent by the server and then stopping acquiring the user input information;
the server side comprises:
the first forwarding module is used for receiving touch click information sent by the client and sending the touch click information to the cloud mobile phone;
the second forwarding module is used for receiving a first signal sent by the cloud mobile phone and sending the first signal to the client;
the third forwarding module is used for receiving user input information sent by the client and sending a user input signal to the cloud mobile phone;
and the fourth forwarding module is used for receiving the second signal sent by the cloud mobile phone and sending the second signal to the client.
Corresponding to the method in fig. 1, an embodiment of the present invention further provides a system for responding to local input content by a cloud phone, including:
at least one processor;
at least one memory for storing at least one program;
when the at least one program is executed by the at least one processor, the at least one processor is caused to implement the method for responding to locally input content by the cloud handset.
Corresponding to the method of fig. 1, an embodiment of the present invention further provides a storage medium, in which processor-executable instructions are stored, and when the processor-executable instructions are executed by a processor, the method for responding to local input content by a cloud handset is performed.
In alternative embodiments, the functions/acts noted in the block diagrams may occur out of the order noted in the operational illustrations. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality/acts involved. Furthermore, the embodiments presented and described in the flow charts of the present invention are provided by way of example in order to provide a more thorough understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
Furthermore, while the invention is described in the context of functional modules and illustrated in the form of block diagrams, it should be understood that, unless otherwise stated to the contrary, one or more of the described functions and/or features may be integrated into a single physical device and/or software module or one or more functions and/or features may be implemented in a separate physical device or software module. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary for an understanding of the present invention. Rather, the actual implementation of the various functional modules in the apparatus disclosed herein will be understood within the ordinary skill of an engineer, given the nature, function, and internal relationship of the modules. Accordingly, those skilled in the art can, using ordinary skill, practice the invention as set forth in the claims without undue experimentation. It is also to be understood that the specific concepts disclosed are merely illustrative of and not intended to limit the scope of the invention, which is defined by the appended claims and their full scope of equivalents.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While the preferred embodiments of the present invention have been illustrated and described, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.