WO2023035758A1 - Input method setting method and apparatus, input method, and electronic device - Google Patents

Input method setting method and apparatus, input method, and electronic device Download PDF

Info

Publication number
WO2023035758A1
WO2023035758A1 PCT/CN2022/104472 CN2022104472W WO2023035758A1 WO 2023035758 A1 WO2023035758 A1 WO 2023035758A1 CN 2022104472 W CN2022104472 W CN 2022104472W WO 2023035758 A1 WO2023035758 A1 WO 2023035758A1
Authority
WO
WIPO (PCT)
Prior art keywords
input method
operating system
service
input
default
Prior art date
Application number
PCT/CN2022/104472
Other languages
French (fr)
Chinese (zh)
Inventor
李京
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023035758A1 publication Critical patent/WO2023035758A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • G06F9/441Multiboot arrangements, i.e. selecting an operating system to be loaded
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Definitions

  • the present disclosure relates to the technical field of input methods, in particular to an input method setting method and device thereof, an input method, electronic equipment, a storage medium, a computer program product and a computer program.
  • the main operating system on the terminal device needs to be compatible with the applications of the sub-operating system.
  • the operating system is applied, only the respective input methods of the operating system are activated as input methods.
  • the Android operating system runs as a sub-system in the Linux operating system, and its level is equivalent to Linux applications.
  • the input method can be regarded as a kind of application in the operating system
  • the sub-input method framework in the Android operating system is installed in the Android operating system along with the Android operating system
  • the input method framework itself is integrated in the Linux operating system, which causes the user to perform Only the main input method can be started when the Linux operating system is used, and only the sub-input method can be started when the Android operating system is used, and the user cannot freely switch the input method when using different operating system applications.
  • the main purpose of the present disclosure is to provide an input method setting method and its device, input method, electronic equipment, storage medium, computer program product, and computer program to solve the problem that users cannot freely switch input methods when using different operating system applications. question.
  • One aspect of the present disclosure provides an input method setting method, which is applied to an electronic device.
  • the electronic device includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system.
  • the first The operating system includes a first input method service
  • the second operating system includes a second input method service
  • the method includes:
  • a default input method is set from the input methods supported by the second operating system and the input methods supported by the first operating system.
  • the establishing a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system includes:
  • a socket communication channel is established between the second input method service and the first input method service.
  • step of starting the second operating system in the first operating system specifically including:
  • the boot program preset in the configuration file is started by the command set to start the second operating system.
  • the method further includes:
  • the proxy objects of the input methods supported by the second operating system are saved through the first input method service.
  • Another aspect of the present disclosure provides an input method, which is applied to an electronic device adopting any of the aforementioned input method setting methods, and the method includes:
  • the text input through the default input method is sent to the application.
  • the acquiring the input request of the application and starting the default input method include:
  • startup instruction start the default input method through the second input method service
  • the text input through the default input method is sent to the application.
  • a socket connection is established between the application and the default input method
  • the text input through the default input method is sent to the application.
  • the electronic device includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system.
  • An operating system includes a first input method service, a second operating system includes a second input method service, and the device includes:
  • a socket communication channel establishment unit configured to establish a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system
  • a sending unit configured to use the socket communication channel to send the input method supported by the second operating system from the second input method service to the first input method service;
  • the setting unit is configured to set a default input method from the input methods supported by the second operating system and the input methods supported by the first operating system through the first input method service.
  • Another aspect of the present disclosure provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the input method setting method and input method provided by any one of the foregoing .
  • Another aspect of the present disclosure provides an electronic device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores information that can be used by the at least one processor.
  • a computer program executed by a processor the computer program is executed by the at least one processor, so that the at least one processor executes the input method setting method and the input method provided by any one of the foregoing.
  • Another aspect of the present disclosure provides a computer program product, including a computer program.
  • the computer program When the computer program is executed by a processor, the input method setting method and the input method provided by any one of the foregoing are implemented.
  • Yet another aspect of the present disclosure provides a computer program.
  • the computer program When the computer program is executed by a processor, the input method setting method and the input method provided by any one of the foregoing are implemented.
  • a socket communication channel is established between the second input method service in the second operating system and the first input method service in the first operating system; using the socket communication channel , sending the input method supported by the second operating system from the second input method service to the first input method service; finally, through the first input method service, from the input method supported by the second operating system and the first input method service Set the default input method in the input methods supported by the operating system.
  • the input method supported by the second operating system is sent to the first input method service through the socket communication channel, and the input method supported by the first operating system and the input method supported by the second operating system are managed by the first input method service, and the input method supported by the second operating system can be passed through the first input method service
  • the default input method can be freely set in the input method service, which solves the problem that the user cannot freely switch the input method when using different operating system applications, and improves the user's input efficiency.
  • FIG. 1 is a schematic flowchart of an input method setting method provided by an embodiment of the present disclosure
  • Fig. 2 is the schematic diagram that the Android operating system provided by the embodiment of the present disclosure is installed in the Linux operating system in a containerized manner;
  • Fig. 3 is the flowchart of the Linux input method service unified management input method that the embodiment of the present disclosure provides;
  • Fig. 4 is the flow chart of establishing a relationship between the input method supported by the Andorid operating system and the Andorid application using the Linux operating system provided by the embodiment of the present disclosure
  • Fig. 5 is a flow chart of establishing a relationship between the input method supported by the Andorid operating system and the Linux application using the Linux operating system provided by the embodiment of the present disclosure
  • FIG. 6 is a flow chart of establishing a relationship between an input method supported by a Linux operating system and an Andorid application using the Linux operating system provided by an embodiment of the present disclosure
  • FIG. 7 is a block diagram of an input method setting device provided by an embodiment of the present disclosure.
  • Fig. 8 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
  • orientations or positional relationships indicated by “vertical”, “horizontal”, “horizontal”, and “longitudinal” are based on the orientations or positional relationships shown in the drawings. These terms are mainly used to better describe the present disclosure and its embodiments, and are not intended to limit that the indicated device, element or component must have a specific orientation, or be constructed and operated in a specific orientation.
  • the terms “installed”, “disposed”, “provided”, “connected”, “connected”, “socketed” are to be interpreted broadly. For example, it may be a fixed connection, a detachable connection, or an integral structure; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediary; internal connectivity.
  • installed disposed, “provided”, “connected”, “connected”, “socketed”
  • it may be a fixed connection, a detachable connection, or an integral structure; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediary; internal connectivity.
  • the main operating system on the terminal device needs to be compatible with the applications of the sub-operating system.
  • the operating system is used, only the input methods of the operating system are activated, so that the user cannot freely switch the input method when using different operating system applications.
  • an embodiment of the present disclosure provides an input method setting method, as shown in FIG. 1 , the method includes the following steps S101 to S103:
  • the first operating system serving as the host and the second operating system deployed in the first operating system share a Linux kernel, which is realized by technologies such as LXC and containerization.
  • the first operating system may be various desktop Linux distributions, such as Ubuntu, Debian, RedHat, and the like. It should be noted that the first operating system is not limited to running on a physical machine, and may also be an operating system hosted on another operating system, such as WSL (Windows Subsystem for Linux) in the Windows system.
  • WSL Windows Subsystem for Linux
  • the second operating system can be Android (Android) operating system, covering Android OS (operating system) issued by Google, AOSP (Android Open Source Project) and various derivative systems based on AOSP, such as MIUI, EMUI, One UI, etc. .
  • Android Android
  • AOSP Android Open Source Project
  • the first operating system is a Linux operating system and the second operating system is an Android operating system for illustration.
  • the Android operating system is deployed in a containerized manner in the Linux operating system.
  • the Android operating system in the container shares an operating system kernel with the Linux operating system, which can isolate a group of processes from other contents of the Linux operating system.
  • the Android operating system is installed in the Linux operating system in a containerized manner ,as shown in picture 2.
  • the above step of pre-deploying the second operating system in the first operating system in a containerized manner is a pre-step and broadly describes deploying the second operating system in the first operating system.
  • the input method setting method and input method of the embodiments of the present disclosure can be directly applied.
  • the electronic device that has completed this step includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system, the first operating system includes a first input method service, and the second operating system includes The second input method service.
  • Step S101 establishing a socket communication channel between the second input method service (InputMethodService) in the second operating system and the first input method service (InputMethodService) in the first operating system;
  • the first operating system is a Linux operating system
  • the second operating system is an Android operating system for illustration.
  • the first input method service is a Linux input method service
  • the second input method service is an Android input method. law services.
  • the input method is a kind of software in the operating system, which is managed uniformly by the operating system.
  • an application requests input, such as the Notepad application
  • Notepad will request the input method connection from the input method service in the system.
  • the input method service will query the input method currently set by the system. If the input method is set to Xunfei,
  • the input method service is responsible for establishing a socket connection between the Xunfei Input Method and the Notepad application. After the connection is established successfully, the Xunfei Input Method will send the input content to the Notepad application through the socket.
  • the step S101 includes:
  • a socket communication channel is established between the second input method service and the first input method service.
  • the startup process of the Linux operating system is to start the Linux system first, start the Linux input method service after the necessary system startup process, and then the Linux system starts to start the Android operating system , start the Android input method service during the startup process of the Android system, and establish a communication channel with the Linux input method service during the startup process of the Android input method service, that is, a socket communication channel.
  • the type of communication channel is the local socket connection of unix domain. Since the Android system will not be started until the Linux system is started, the Linux input method service in the Linux system has been started at this time. During the service initialization process, the Linux input method service will be used as The main service creates a socket server and starts to monitor the connection of the Android input method service. When the Android system starts, the Android input method service establishes a connection with the Linux input method service as a client service to complete the establishment of the communication channel.
  • step S101 it also includes the step of starting a second operating system in the first operating system, and after starting the first input method service, starting the second operating system specifically includes:
  • the boot program preset in the configuration file is started by the command set to start the second operating system.
  • the first operating system container is a Linux container (Linux Container, referred to as LXC)
  • LXC Linux Container
  • the installation process of the Android container image needs to call the command set in the LXC lxc-start and other commands are carried out, and two file systems are preset before running the Android operating system: system (system service level library) and vendor (driver program), write the LXC startup configuration file config, the preset boot program init and the required Mounted file systems system, vendor, data, etc.;
  • the lxc-start command When starting the Android operating system, call the lxc-start command in the LXC command set, and specify the path of the LXC configuration file config; the lxc-start command first mounts the preset file system system and vendor in the configuration file config, and creates data and other directories; then the lxc-start command starts the init bootloader preset in the configuration file config to start the Android operating system.
  • Step S102 Using the socket communication channel, sending the input method supported by the second operating system from the second input method service to the first input method service;
  • the input methods supported in the Android operating system are sent to the Linux input method service for unified management.
  • the method further includes:
  • the proxy object (Proxy) of the input method supported by the second operating system is saved through the first input method service.
  • the Linux input method service when the Linux input method service is started, it scans the input methods installed in the Linux operating system, and processes the list of input methods sent by the Android input method service. Unified management of input methods supported by the operating system;
  • the Linux input method service is managed in the form of a plug-in; for the input methods supported by the Android operating system, only the proxy object of the input method supported by the Android operating system is saved in the Linux input method service, when the user selects After setting the input method supported by the Android operating system, the Linux input method service exchanges data with the Android input method service through the proxy object.
  • Step S103 through the first input method service, set a default input method from the input methods supported by the second operating system and the input methods supported by the first operating system.
  • the Linux input method service manages the input methods supported by the Linux operating system and the input methods supported by the Android operating system. All input methods, including the input methods supported by the Linux operating system and the input methods supported by the Android operating system, are Managed by the Linux operating system;
  • the Android input method service initiates the establishment of a socket communication channel to the Linux input method service, the Linux input method service sends a successfully established command to the Android input method service; the Android input method service sends a list of input methods supported by the Android system to the Linux input method service , the user sets the input method to be used through the Linux input method service.
  • Wubi input method and Sogou input method are installed in Linux, and Xunfei input method and Baidu input method are installed in Android, these four input methods are included in the input method list maintained by Linux input method service. These four input methods will be seen in the Linux input method list, and one input method can be selected as the default input method.
  • the processing flow of Linux and Andorid input methods can be unified, so that users can freely switch between the input methods supported by the Linux operating system and the input methods supported by the Android operating system without perception, and freely set the default input method , which solves the problem that the user cannot freely switch the input method when using different operating system applications, and improves the user's input efficiency.
  • the input method includes:
  • the text input through the default input method is sent to the application.
  • the text input by the user using the default input method can be directly sent to the operating system application for display without going through the operating system input method service; any input method supported by the operating system
  • the input method can be connected with the operating system application through a local socket to complete the transmission of the user input text.
  • the default input method (such as Xunfei input method or Wubi input method) establishes a socket connection with the application (such as Android Notepad or Linux Notepad), and the character symbols input by the user can be sent to the application through the socket connection;
  • the application such as Android Notepad or Linux Notepad
  • the input method supported by the operating system (such as Xunfei Input Method or Wubi Input Method) is an application process, and the Android application or Linux application (such as Android Notepad or Linux Notepad) is also an application process, regardless of the two application processes. Whichever operating system is running, can communicate through the local socket to realize the compatibility of the input method functions supported by the Android operating system and the Linux operating system; any input method included in the input method supported by the Linux operating system or the input method supported by the Android operating system Both methods can be connected with Linux applications or Android applications through local sockets to complete the transmission of input content. After the socket connection is established between the default input method and the application, the communication is carried out through the local socket without going through the Ethernet device, and the input method supported by any operating system can be freely switched under the application of the two operating systems.
  • the Android application or Linux application such as Android Notepad or Linux Notepad
  • input methods include:
  • the input focus is obtained through the input box of the application, wherein the application is located in the first operating system or the second operating system; the input focus can be obtained through the input box of the operating system application;
  • the default input method request instruction obtain the set default input method through the first input method service; after the first input method service receives the default input method request instruction, query and obtain the default input method set by the user;
  • the default input method set by the user may belong to the first operating system, or it may belong to the input method supported by the second operating system. Therefore, it is necessary to determine the operating system to which the default input method belongs, and determine the input corresponding to the activated default input method according to the judgment result. law services.
  • startup instruction start the default input method through the second input method service
  • the text input through the default input method is sent to the application.
  • the first operating system uses the input method supported by the second operating system to establish a relationship with the application in the second operating system;
  • the Linux operating system uses the input method supported by the Andorid operating system to establish a relationship with the Andorid application.
  • the flow chart of the process is as shown in Figure 4, wherein the corresponding content of each frame is as follows:
  • InputMethodService input method service
  • InputMethodClient input method client
  • AndroidApp Android application
  • AndroidInputMethod Android input method
  • socket (socket) the connection and communication between the server and the client, Linux is equivalent to the server, Android is equivalent to the client Terminal
  • Linux operating system, Android runs in Linux in a containerized manner.
  • the Android input method service establishes a socket connection with the Linux input method service
  • the user sets the default input method to an input method supported by Android through the Linux input method service, for example, setting the default input method to Xunfei input method supported by Android;
  • the Android application requests the input method from the Android input method client;
  • the Android input method client requests the input method from the Android input method service
  • the Android input method service sends an instruction to start the input method to the Linux input method service through the socket;
  • the Linux input method service obtains the default input method set by the user.
  • the obtained result is the Xunfei input method supported by Android;
  • the key step in the input method startup process is to obtain the default input method of the system, and all input methods Unified management in the Linux input method service, so Android needs to query Linux for the default input method currently set by the user during the process of starting the input method;
  • the Linux input method service determines that the default input method is the Xunfei input method supported by Android, it sends an instruction to start the Android input method to the Android input method service;
  • the Android input method service starts the Android input method
  • the Xunfei input method supported by Android establishes a socket connection with the Android input method client;
  • the user uses the Xunfei input method supported by Android to input text to the Android input method client;
  • the Android input method client sends the text entered by the user to the Android application.
  • the first operating system uses the input method supported by the second operating system to establish a relationship with the application in the first operating system;
  • the flow chart of the process is as shown in Figure 5, wherein, the Linux application: the application program under the Linux operating system, Such as Linux Notepad;
  • the Linux application obtains the input focus through the input box
  • the Linux application requests the input method from the Linux input method service
  • the Linux input method service queries the default input method set by the user, and the query result is the Xunfei input method supported by Android;
  • the Linux input method service sends an instruction to start the Xunfei input method supported by Android to the Android input method service;
  • the Android input method service starts the Xunfei input method supported by Android
  • the Android input method service feeds back the startup success command to the Linux input method service
  • the Linux input method service sends an instruction to establish a connection with the Xunfei input method supported by Android to the Linux application;
  • the Linux application establishes a socket connection with the Xunfei input method supported by Android; communicate through the socket, that is, after the Xunfei input method supported by Android is successfully started, the input method supported by Android establishes a socket connection with the Linux application, and the socket communication is cross-connected. system connectivity and communication;
  • a socket connection is established between the application and the default input method
  • the text input through the default input method is sent to the application.
  • the first operating system uses the input method supported by the second operating system to establish a relationship with the application in the first operating system;
  • the Linux operating system uses the input method supported by the Linux operating system to establish a relationship with the Andorid application.
  • the flow chart of the process is as shown in Figure 6, wherein the input method supported by the Linux operating system is the Wubi input method ;
  • the user sets the default input method through the Linux input method service, such as the Wubi input method supported by the Linux system;
  • the Android application obtains the input focus through the input box
  • the Android application requests the input method from the Android input method client;
  • the Android input method client requests the input method from the Android input method service
  • the Android input method service requests the input method from the Linux input method service through the socket;
  • the Linux input method service queries the default input method set by the user, and the query result is the Wubi input method supported by the Linux system;
  • the Linux input method service starts the Wubi input method supported by the Linux system
  • the Linux input method service sends the Wubi input method startup success command supported by the Linux system to the Android input method service;
  • the Android input method service passes the Linux input method socket to the Android application
  • the Android application establishes a socket connection with the Wubi input method supported by the Linux system
  • the Wubi input method supported by Linux can be used to establish a connection with the Android application under the Linux operating system.
  • the principle of input provided by this embodiment is that the input method supported by the operating system (such as Xunfei input method or Wubi input method) establishes a socket connection with an application (such as Android notepad or Linux notepad), and the user input can be input through the socket connection.
  • the text symbol is sent to the application;
  • the input method supported by the main system or the input method supported by the subsystem is an application process
  • the Android application or Linux application is also an application process, regardless of In whichever system these two application processes are running, they can communicate through the local socket, so as to realize the compatibility of the input method functions supported by the Android operating system and the Linux operating system.
  • This disclosure sends the input method supported by the second operating system to the first input method service through the socket communication channel, and the first input method service manages the input method supported by the first operating system and the input method supported by the second operating system in a unified manner. Freely set the default input method through the first input method service, which solves the problem that the user cannot freely switch the input method when using different operating system applications, and improves the user's input efficiency;
  • the communication is carried out through the local socket without going through the Ethernet device, so that the input method supported by any operating system can be freely switched under the application of the two operating systems; the input method supported by the operating system Any input method in the input method can be connected with the operating system application through a local socket, and the input text can be sent to the application through the input method.
  • An embodiment of the present disclosure also provides an input method setting device for implementing the above input method setting method, which is applied to an electronic device, and the electronic device includes a first operating system and shares a kernel with the first operating system and is deployed on the first operating system
  • the first operating system includes the first input method service
  • the second operating system includes the second input method service, as shown in Figure 7, the device includes:
  • a socket communication channel establishment unit 71 configured to establish a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system;
  • a sending unit 72 configured to use the socket communication channel to send the input method supported by the second operating system from the second input method service to the first input method service;
  • the setting unit 73 is configured to set a default input method from the input methods supported by the second operating system and the input methods supported by the first operating system through the first input method service.
  • An embodiment of the present disclosure also provides an electronic device.
  • the electronic device includes one or more processors 81 and a memory 82 , and one processor 81 is taken as an example in FIG. 8 .
  • the controller may also include: an input device 83 and an output device 84 .
  • the processor 81 , memory 82 , input device 83 and output device 84 may be connected via a bus or in other ways, and connection via a bus is taken as an example in FIG. 8 .
  • the processor 81 can be a central processing unit (Central Processing Unit, referred to as CPU), and the processor 81 can also be other general processors, digital signal processors (Digital Signal Processor, referred to as DSP), application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), field-programmable gate array (Field-Programmable Gate Array, referred to as FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various chips , the general purpose processor can be a microprocessor or any conventional processor.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • the general purpose processor can be a microprocessor or any conventional processor.
  • the memory 82 can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the control method in the embodiments of the present disclosure.
  • Processor 81 executes various functional applications and data processing of the server by running non-transitory software programs, instructions and modules stored in memory 82, that is, implements the input method setting method and input method of the above method embodiments.
  • the memory 82 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function; the data storage area may store data created according to use of a processing device operated by a server, and the like.
  • the memory 82 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices.
  • memory 82 may optionally include memory located remotely from processor 81, and these remote memories may be connected to network connection devices via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 83 can receive input numbers or character information, and generate key signal input related to user settings and function control of the processing device of the server.
  • the output device 84 may include a display device such as a display screen.
  • One or more modules are stored in memory 82, and when executed by one or more processors 81, perform the method shown in FIG. 1 .
  • An embodiment of the present disclosure further provides a computer program product, including a computer program.
  • the computer program is executed by a processor, the input method setting method and the input method provided in any one of the foregoing embodiments are implemented.
  • An embodiment of the present disclosure further provides a computer program, which, when executed by a processor, implements the input method setting method and the input method provided in any one of the foregoing embodiments.
  • Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external A computer (connected via the Internet, eg, using an Internet service provider).
  • LAN Local Area Network
  • WAN Wide Area Network
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a flash memory (Flash Memory, referred to as FM), hard disk (Hard Disk Drive, referred to as HDD) or solid-state drive (Solid-State Drive, referred to as SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
  • ROM Read-Only Memory
  • RAM random access memory
  • FM Flash Memory
  • HDD Hard Disk Drive
  • SSD solid-state drive

Abstract

Disclosed are an input method setting method and apparatus, an input method, and an electronic device. The input method setting method comprises: establishing a socket communication channel between a second input method service in a second operating system and a first input method service in a first operating system; sending, by means of the socket communication channel, an input method supported by the second operating system to the first input method service from the second input method service; and setting, by means of the first input method service, a default input method from the input method supported by the second operating system and an input method supported by the first operating system. In the present disclosure, the input method supported by the first operating system and the input method supported by the second operating system are uniformly managed by the first input method service, and the input method can be freely set by means of the first input method service, thereby solving the problem that a user cannot freely switch input methods when using different operating system applications.

Description

输入法设置方法及其装置、输入方法及电子设备Input method setting method and device thereof, input method and electronic equipment
本公开要求于2021年09月10日提交中国专利局、申请号为202111061024.4、申请名称为“输入法设置方法及其装置、输入方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本公开中。This disclosure claims the priority of the Chinese patent application submitted to the China Patent Office on September 10, 2021, with the application number 202111061024.4, and the application name is "Input method setting method and its device, input method and electronic equipment", the entire content of which is passed References are incorporated into this disclosure.
技术领域technical field
本公开涉及输入法技术领域,具体涉及一种输入法设置方法及其装置、输入方法、电子设备、存储介质、计算机程序产品及计算机程序。The present disclosure relates to the technical field of input methods, in particular to an input method setting method and device thereof, an input method, electronic equipment, a storage medium, a computer program product and a computer program.
背景技术Background technique
随着操作系统的发展和应用需要,一些操作系统的丰富应用可以在另一些操作系统中运行,此时,终端设备上的主操作系统就需要兼容子操作系统的应用,但在进行这两种操作系统的应用时,启动的输入法分别只有操作系统各自的输入法。With the development of the operating system and application needs, rich applications of some operating systems can run in other operating systems. At this time, the main operating system on the terminal device needs to be compatible with the applications of the sub-operating system. When the operating system is applied, only the respective input methods of the operating system are activated as input methods.
以Linux操作系统为主操作系统、Android操作系统为子操作系统举例,Android操作系统作为子系统运行于Linux操作系统中,层级相当于Linux应用。输入法可以视为操作系统中的一种应用,Android操作系统内的子输入法框架随着Android操作系统安装在Android操作系统中,Linux操作系统内本身集成有输入法框架,这导致用户在进行Linux操作系统应用时只能启动主输入法,在进行Android操作系统应用时只能启动子输入法,用户在使用不同的操作系统应用时无法自由切换输入法。Taking the Linux operating system as the main operating system and the Android operating system as the sub-operating system as an example, the Android operating system runs as a sub-system in the Linux operating system, and its level is equivalent to Linux applications. The input method can be regarded as a kind of application in the operating system, the sub-input method framework in the Android operating system is installed in the Android operating system along with the Android operating system, and the input method framework itself is integrated in the Linux operating system, which causes the user to perform Only the main input method can be started when the Linux operating system is used, and only the sub-input method can be started when the Android operating system is used, and the user cannot freely switch the input method when using different operating system applications.
针对终端设备中同时具有主操作系统和子操作系统时,容易导致用户在使用不同的操作系统应用时无法自由切换输入法的问题,目前尚未提出有效的解决方案。Aiming at the problem that when a terminal device has a main operating system and a sub-operating system at the same time, it is easy to cause the user to be unable to freely switch input methods when using different operating system applications, and no effective solution has been proposed so far.
发明内容Contents of the invention
本公开的主要目的在于提供一种输入法设置方法及其装置、输入方法、电子设备、存储介质、计算机程序产品及计算机程序,以解决用户在使用不同的操作系统应用时无法自由切换输入法的问题。The main purpose of the present disclosure is to provide an input method setting method and its device, input method, electronic equipment, storage medium, computer program product, and computer program to solve the problem that users cannot freely switch input methods when using different operating system applications. question.
本公开的一个方面提供了一种输入法设置方法,应用于电子设备,电子设备包括第一操作系统和与第一操作系统共享内核并部署在第一操作系统中的第二操作系统,第一操作系统包括第一输入法服务,第二操作系统包括第二输入法服务,所述方法包括:One aspect of the present disclosure provides an input method setting method, which is applied to an electronic device. The electronic device includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system. The first The operating system includes a first input method service, the second operating system includes a second input method service, and the method includes:
在第二操作系统中的第二输入法服务与所述第一操作系统中的第一输入法服务之间建立socket通信通道;Establishing a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system;
利用所述socket通信通道,从所述第二输入法服务向第一输入法服务发送所述第二操作系统支持的输入法;sending the input method supported by the second operating system from the second input method service to the first input method service by using the socket communication channel;
通过第一输入法服务,从所述第二操作系统支持的输入法和所述第一操作系统支持的输入法中设置默认输入法。Through the first input method service, a default input method is set from the input methods supported by the second operating system and the input methods supported by the first operating system.
可选地,所述在第二操作系统中的第二输入法服务与所述第一操作系统中的第一输入法服务之间建立socket通信通道,包括:Optionally, the establishing a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system includes:
在第一操作系统中启动第一输入法服务;Start the first input method service in the first operating system;
在第二操作系统中启动第二输入法服务;Start the second input method service in the second operating system;
在所述第二输入法服务与所述第一输入法服务之间建立socket通信通道。A socket communication channel is established between the second input method service and the first input method service.
进一步地,还包括在第一操作系统中启动第二操作系统的步骤,具体包括:Further, it also includes the step of starting the second operating system in the first operating system, specifically including:
调用第一操作系统容器的命令集,并指定第一操作系统容器的配置文件的路径;calling the command set of the first operating system container, and specifying the path of the configuration file of the first operating system container;
通过所述命令集挂载配置文件中预设的文件系统;Mount the preset file system in the configuration file through the command set;
通过所述命令集启动配置文件中预设的引导程序,以启动所述第二操作系统。The boot program preset in the configuration file is started by the command set to start the second operating system.
可选地,在从所述第二输入法服务向第一输入法服务发送所述第二操作系统支持的输入法之后,所述方法还包括:Optionally, after sending the input method supported by the second operating system from the second input method service to the first input method service, the method further includes:
通过第一输入法服务扫描所述第一操作系统支持的输入法;scanning for input methods supported by the first operating system through the first input method service;
通过第一输入法服务保存所述第二操作系统支持的输入法的代理对象。The proxy objects of the input methods supported by the second operating system are saved through the first input method service.
本公开的另一个方面提供了一种输入方法,应用于采用前述任一输入法设置方法的电子设备,所述方法包括:Another aspect of the present disclosure provides an input method, which is applied to an electronic device adopting any of the aforementioned input method setting methods, and the method includes:
获取应用的输入请求,启动所述默认输入法,其中,所述应用位于第一操作系统或第二操作系统;acquiring an input request of an application, and starting the default input method, wherein the application is located in the first operating system or the second operating system;
在所述默认输入法与应用之间建立socket连接;Establish a socket connection between the default input method and the application;
基于所述socket连接,将通过所述默认输入法输入的文本发送至所述应用。Based on the socket connection, the text input through the default input method is sent to the application.
可选地,所述获取应用的输入请求,启动所述默认输入法,包括:Optionally, the acquiring the input request of the application and starting the default input method include:
通过应用的输入框获取输入焦点;Get the input focus through the input box of the application;
基于所述输入焦点,从所述应用向第一输入法服务发送默认输入法请求指令;Based on the input focus, sending a default input method request instruction from the application to the first input method service;
根据所述默认输入法请求指令,通过第一输入法服务获取设置的默认输入法;Acquire the set default input method through the first input method service according to the default input method request instruction;
判断所述默认输入法的从属关系,其中,所述默认输入法属于第一操作系统或第二操作系统支持的输入法。Judging the affiliation of the default input method, wherein the default input method belongs to the input methods supported by the first operating system or the second operating system.
进一步地,在所述默认输入法属于第二操作系统支持的输入法的情况下:Further, in the case that the default input method belongs to the input method supported by the second operating system:
从第一输入法服务向第二输入法服务发送启动指令;sending an activation command from the first input method service to the second input method service;
根据所述启动指令,通过第二输入法服务启动所述默认输入法;According to the startup instruction, start the default input method through the second input method service;
在所述默认输入法与所述应用之间建立socket连接;Establishing a socket connection between the default input method and the application;
基于所述socket连接,将通过所述默认输入法输入的文本发送至所述应用。Based on the socket connection, the text input through the default input method is sent to the application.
进一步地,所述默认输入法属于第一操作系统支持的输入法的情况下:Further, when the default input method belongs to the input method supported by the first operating system:
通过所述第一输入法服务启动所述默认输入法;Start the default input method through the first input method service;
从所述第一输入法服务向第二输入法服务发送默认输入法启动成功指令;sending a default input method startup success instruction from the first input method service to the second input method service;
根据所述默认输入法启动成功指令,从第二输入法服务向所述应用传递默认输入法socket;According to the default input method startup success instruction, transfer the default input method socket to the application from the second input method service;
根据默认输入法socket,在应用与所述默认输入法之间建立socket连接;According to the default input method socket, a socket connection is established between the application and the default input method;
基于所述socket连接,将通过所述默认输入法输入的文本发送至所述应用。Based on the socket connection, the text input through the default input method is sent to the application.
本公开的还一个方面提供了一种输入法设置装置,应用于电子设备,电子设备包括第一操作系统和与第一操作系统共享内核并部署在第一操作系统中的第二操作系统,第一操作系统包括第一输入法服务,第二操作系统包括第二输入法服务,所述装置包括:Another aspect of the present disclosure provides an input method setting device, which is applied to an electronic device. The electronic device includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system. An operating system includes a first input method service, a second operating system includes a second input method service, and the device includes:
socket通信通道建立单元,用于在第二操作系统中的第二输入法服务与所述第一操作系统中的第一输入法服务之间建立socket通信通道;A socket communication channel establishment unit, configured to establish a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system;
发送单元,用于利用所述socket通信通道,从所述第二输入法服务向第一输入法服务发送所述第二操作系统支持的输入法;a sending unit, configured to use the socket communication channel to send the input method supported by the second operating system from the second input method service to the first input method service;
设置单元,用于通过第一输入法服务,从所述第二操作系统支持的输入法和所述第一操作系统支持的输入法中设置默认输入法。The setting unit is configured to set a default input method from the input methods supported by the second operating system and the input methods supported by the first operating system through the first input method service.
本公开的又一个方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使计算机执行前述任意一项提供的输入法设置方法和输入方法。Another aspect of the present disclosure provides a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and the computer instructions are used to make the computer execute the input method setting method and input method provided by any one of the foregoing .
本公开的又一个方面提供了一种电子设备,所述电子设备包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个 处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器执行前述任意一项提供的输入法设置方法和输入方法。Another aspect of the present disclosure provides an electronic device, which includes: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores information that can be used by the at least one processor. A computer program executed by a processor, the computer program is executed by the at least one processor, so that the at least one processor executes the input method setting method and the input method provided by any one of the foregoing.
本公开的又一个方面提供了一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现前述任意一项提供的输入法设置方法和输入方法。Another aspect of the present disclosure provides a computer program product, including a computer program. When the computer program is executed by a processor, the input method setting method and the input method provided by any one of the foregoing are implemented.
本公开的又一个方面提供了一种计算机程序,所述计算机程序被处理器执行时,实现前述任意一项提供的输入法设置方法和输入方法。Yet another aspect of the present disclosure provides a computer program. When the computer program is executed by a processor, the input method setting method and the input method provided by any one of the foregoing are implemented.
在本公开实施例提供的输入法设置方法中,在第二操作系统中的第二输入法服务与第一操作系统中的第一输入法服务之间建立socket通信通道;利用所述socket通信通道,从所述第二输入法服务向第一输入法服务发送所述第二操作系统支持的输入法;最后通过第一输入法服务,从所述第二操作系统支持的输入法和所述第一操作系统支持的输入法中设置默认输入法。通过socket通信通道将第二操作系统支持的输入法发送至第一输入法服务,由第一输入法服务统一管理第一操作系统支持的输入法和第二操作系统支持的输入法,可以通过第一输入法服务自由设置默认输入法,解决了用户在使用不同的操作系统应用时无法自由切换输入法的问题,提高了用户的输入效率。In the input method setting method provided by the embodiment of the present disclosure, a socket communication channel is established between the second input method service in the second operating system and the first input method service in the first operating system; using the socket communication channel , sending the input method supported by the second operating system from the second input method service to the first input method service; finally, through the first input method service, from the input method supported by the second operating system and the first input method service Set the default input method in the input methods supported by the operating system. The input method supported by the second operating system is sent to the first input method service through the socket communication channel, and the input method supported by the first operating system and the input method supported by the second operating system are managed by the first input method service, and the input method supported by the second operating system can be passed through the first input method service The default input method can be freely set in the input method service, which solves the problem that the user cannot freely switch the input method when using different operating system applications, and improves the user's input efficiency.
附图说明Description of drawings
为了更清楚地说明本公开具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本公开的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the following will briefly introduce the drawings that need to be used in the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description The drawings are only some implementations of the present disclosure, and those skilled in the art can obtain other drawings based on these drawings without creative effort.
图1为本公开实施例提供的输入法设置方法流程示意图;FIG. 1 is a schematic flowchart of an input method setting method provided by an embodiment of the present disclosure;
图2为本公开实施例提供的Android操作系统以容器化方式安装在Linux操作系统中的示意图;Fig. 2 is the schematic diagram that the Android operating system provided by the embodiment of the present disclosure is installed in the Linux operating system in a containerized manner;
图3为本公开实施例提供的Linux输入法服务统一管理输入法的流程图;Fig. 3 is the flowchart of the Linux input method service unified management input method that the embodiment of the present disclosure provides;
图4为本公开实施例提供的Linux操作系统使用Andorid操作系统支持的输入法与Andorid应用建立关系的流程图;Fig. 4 is the flow chart of establishing a relationship between the input method supported by the Andorid operating system and the Andorid application using the Linux operating system provided by the embodiment of the present disclosure;
图5为本公开实施例提供的Linux操作系统使用Andorid操作系统支持的输入法与Linux应用建立关系的流程图;Fig. 5 is a flow chart of establishing a relationship between the input method supported by the Andorid operating system and the Linux application using the Linux operating system provided by the embodiment of the present disclosure;
图6为本公开实施例提供的Linux操作系统使用Linux操作系统支持的输入法与Andorid应用建立关系的流程图;6 is a flow chart of establishing a relationship between an input method supported by a Linux operating system and an Andorid application using the Linux operating system provided by an embodiment of the present disclosure;
图7为本公开实施例提供的输入法设置装置框图;FIG. 7 is a block diagram of an input method setting device provided by an embodiment of the present disclosure;
图8为本公开实施例提供的电子设备框图。Fig. 8 is a block diagram of an electronic device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本公开方案,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分的实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本公开保护的范围。In order to enable those skilled in the art to better understand the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only It is an embodiment of a part of the present disclosure, but not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present disclosure.
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the terms "first" and "second" in the specification and claims of the present disclosure and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It should be understood that the data so used may be interchanged under appropriate circumstances for the embodiments of the disclosure described herein. Furthermore, the terms "comprising" and "having", as well as any variations thereof, are intended to cover a non-exclusive inclusion, for example, a process, method, system, product or device comprising a sequence of steps or elements is not necessarily limited to the expressly listed instead, may include other steps or elements not explicitly listed or inherent to the process, method, product or apparatus.
在本公开中,术语“上”、“下”、“左”、“右”、“前”、“后”、“顶”、“底”、“内”、“外”、“中”、“竖直”、“水平”、“横向”、“纵向”等指示的方位或位置关系为基于附图所示的方位或位置关系。这些术语主要是为了更好地描述本公开及其实施例,并非用于限定所指示的装置、元件或组成部分必须具有特定方位,或以特定方位进行构造和操作。In this disclosure, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", The orientations or positional relationships indicated by "vertical", "horizontal", "horizontal", and "longitudinal" are based on the orientations or positional relationships shown in the drawings. These terms are mainly used to better describe the present disclosure and its embodiments, and are not intended to limit that the indicated device, element or component must have a specific orientation, or be constructed and operated in a specific orientation.
并且,上述部分术语除了可以用于表示方位或位置关系以外,还可能用于表示其他含义,例如术语“上”在某些情况下也可能用于表示某种依附关系或连接关系。对于本领域普通技术人员而言,可以根据具体情况理解这些术语在本公开中的具体含义。Moreover, some of the above terms may be used to indicate other meanings besides orientation or positional relationship, for example, the term "upper" may also be used to indicate a certain attachment relationship or connection relationship in some cases. Those of ordinary skill in the art can understand the specific meanings of these terms in the present disclosure according to specific situations.
此外,术语“安装”、“设置”、“设有”、“连接”、“相连”、“套接”应做广义理解。例如,可以是固定连接,可拆卸连接,或整体式构造;可以是机械连接,或电连接;可以是直接相连,或者是通过中间媒介间接相连,又或者是两个装置、元件或组成部分之间内部的连通。对于本领域普通技术人员而言,可以根据具体情况理解上述术语在本公开中的具体含义。Furthermore, the terms "installed", "disposed", "provided", "connected", "connected", "socketed" are to be interpreted broadly. For example, it may be a fixed connection, a detachable connection, or an integral structure; it may be a mechanical connection or an electrical connection; it may be a direct connection or an indirect connection through an intermediary; internal connectivity. Those of ordinary skill in the art can understand the specific meanings of the above terms in the present disclosure according to specific situations.
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。It should be noted that, in the case of no conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and embodiments.
随着操作系统的发展和应用需要,一些操作系统的丰富应用可以在另一些操作系统中运行,此时,终端设备上的主操作系统就需要兼容子操作系统的应用,但在进行这两种操作系统的应用时,启动的输入法分别只有操作系统各自的输入法,导致用户在使用不同的操作系统应用时无法自由切换输入法。With the development of the operating system and application needs, rich applications of some operating systems can run in other operating systems. At this time, the main operating system on the terminal device needs to be compatible with the applications of the sub-operating system. When the operating system is used, only the input methods of the operating system are activated, so that the user cannot freely switch the input method when using different operating system applications.
为了解决上述问题,本公开实施例提供了一种输入法设置方法,如图1所示,该方法包括如下的步骤S101至步骤S103:In order to solve the above problems, an embodiment of the present disclosure provides an input method setting method, as shown in FIG. 1 , the method includes the following steps S101 to S103:
预先在第一操作系统中以容器化方式部署第二操作系统;pre-deploying the second operating system in a containerized manner in the first operating system;
例如,作为宿主的第一操作系统和部署在第一操作系统中的第二操作系统是共享Linux内核,通过LXC、容器化等技术实现。For example, the first operating system serving as the host and the second operating system deployed in the first operating system share a Linux kernel, which is realized by technologies such as LXC and containerization.
例如,第一操作系统可以是各种桌面Linux发行版,如Ubuntu、Debian、RedHat等。需要说明的是,第一操作系统并不限定是运行在物理机上的,也可以是托管在其它操作系统上的操作系统,如Windows系统中的WSL(Windows Subsystem for Linux)。For example, the first operating system may be various desktop Linux distributions, such as Ubuntu, Debian, RedHat, and the like. It should be noted that the first operating system is not limited to running on a physical machine, and may also be an operating system hosted on another operating system, such as WSL (Windows Subsystem for Linux) in the Windows system.
例如,第二操作系统可以是Android(安卓)操作系统,涵盖Google发行的Android OS(operating system)以及AOSP(Android Open Source Project)和基于AOSP的各种衍生系统,如MIUI、EMUI、One UI等。For example, the second operating system can be Android (Android) operating system, covering Android OS (operating system) issued by Google, AOSP (Android Open Source Project) and various derivative systems based on AOSP, such as MIUI, EMUI, One UI, etc. .
如本领域技术人员所知,还存在多种其它的基于Linux Kernel的操作系统,如Tizen、鸿蒙、Meego等作为第二操作系统的示例,同样适用于本公开实施例的技术方案。As known to those skilled in the art, there are many other Linux Kernel-based operating systems, such as Tizen, Hongmeng, Meego, etc., as examples of the second operating system, which are also applicable to the technical solutions of the embodiments of the present disclosure.
在本实施例中,以第一操作系统是Linux操作系统、第二操作系统是Android操作系统进行举例说明,这种情况下,在Linux操作系统中以容器化方式部署Android操作系统。容器中的Android操作系统与Linux操作系统共享一个操作系统内核,可以将一组进程与Linux操作系统的其他内容进行隔离,在本实施例中,Android操作系统以容器化方式安装在Linux操作系统中,如图2所示。In this embodiment, the first operating system is a Linux operating system and the second operating system is an Android operating system for illustration. In this case, the Android operating system is deployed in a containerized manner in the Linux operating system. The Android operating system in the container shares an operating system kernel with the Linux operating system, which can isolate a group of processes from other contents of the Linux operating system. In this embodiment, the Android operating system is installed in the Linux operating system in a containerized manner ,as shown in picture 2.
可以理解的是,本公开实施例中第一操作系统、第二操作系统的示例仅作为对本公开技术方案的解释说明,而不应视为对本公开的限定。It can be understood that the examples of the first operating system and the second operating system in the embodiment of the present disclosure are only used as an explanation of the technical solution of the present disclosure, and should not be regarded as a limitation of the present disclosure.
容易理解,上述预先在第一操作系统中以容器化方式部署第二操作系统的步骤是前置步骤,宽泛地描述了在第一操作系统中部署第二操作系统。对于已经完成该步骤的电子设备,可以直接应用本公开实施例的输入法设置方法和输入方法。已经完成该步骤的电子设备包括第一操作系统和与第一操作系统共享内核并部署在第一操作系统中的第二操作系统,第一操作系统包括第一输入法服务,第二操作系统包括第二输入法服务。It is easy to understand that the above step of pre-deploying the second operating system in the first operating system in a containerized manner is a pre-step and broadly describes deploying the second operating system in the first operating system. For electronic devices that have completed this step, the input method setting method and input method of the embodiments of the present disclosure can be directly applied. The electronic device that has completed this step includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system, the first operating system includes a first input method service, and the second operating system includes The second input method service.
步骤S101:在第二操作系统中的第二输入法服务(InputMethodService)与所述第一操作系统中的第一输入法服务(InputMethodService)之间建立socket通信通道;Step S101: establishing a socket communication channel between the second input method service (InputMethodService) in the second operating system and the first input method service (InputMethodService) in the first operating system;
在本实施例中,以第一操作系统是Linux操作系统、第二操作系统是Android操作系统进行举例说明,相应的,第一输入法服务是Linux输入法服务,第二输入法服务是Android输入法服务。In this embodiment, the first operating system is a Linux operating system, and the second operating system is an Android operating system for illustration. Correspondingly, the first input method service is a Linux input method service, and the second input method service is an Android input method. law services.
输入法是操作系统中的一种软件,由操作系统统一管理。当应用请求输入时,如记事本应用,记事本会向系统中的输入法服务请求输入法连接,此时,输入法服务会查询当前系统设置的输入法,如设置的是讯飞输入法,输入法服务负责将讯飞输入法和记事本应用建立socket连接,连接建立成功后,讯飞输入法会将输入的内容通过socket发送给记事本应用。The input method is a kind of software in the operating system, which is managed uniformly by the operating system. When an application requests input, such as the Notepad application, Notepad will request the input method connection from the input method service in the system. At this time, the input method service will query the input method currently set by the system. If the input method is set to Xunfei, The input method service is responsible for establishing a socket connection between the Xunfei Input Method and the Notepad application. After the connection is established successfully, the Xunfei Input Method will send the input content to the Notepad application through the socket.
具体的,所述步骤S101包括:Specifically, the step S101 includes:
在第一操作系统中启动第一输入法服务;在启动第一操作系统时,启动第一输入法服务;Start the first input method service in the first operating system; when starting the first operating system, start the first input method service;
在启动所述第一输入法服务后,启动第二操作系统;After starting the first input method service, start the second operating system;
在第二操作系统中启动第二输入法服务;在启动所述第二操作系统时,启动第二输入法服务;Start the second input method service in the second operating system; when starting the second operating system, start the second input method service;
在所述第二输入法服务与所述第一输入法服务之间建立socket通信通道。A socket communication channel is established between the second input method service and the first input method service.
例如,如果用户已经在Linux操作系统中部署了Android操作系统,那么Linux操作系统的启动过程为首先Linux系统开机,经过必要的系统启动过程后启动Linux输入法服务,然后Linux系统开始启动Android操作系统,在Android系统启动过程中启动Android输入法服务,Android输入法服务启动过程中会与Linux输入法服务建立通信通道,即socket通信通道。For example, if the user has deployed the Android operating system in the Linux operating system, the startup process of the Linux operating system is to start the Linux system first, start the Linux input method service after the necessary system startup process, and then the Linux system starts to start the Android operating system , start the Android input method service during the startup process of the Android system, and establish a communication channel with the Linux input method service during the startup process of the Android input method service, that is, a socket communication channel.
通信通道的类型为unix domain的本地socket连接,由于Linux系统启动完成后才会启动Android系统,此时Linux系统中的Linux输入法服务已经启动,在服务初始化的过程中,Linux输入法服务会作为主服务创建socket服务端,并开始监听Android输入法服务的连接,当Android系统启动时,Android输入法服务作为客户端服务与Linux输入法服务建立连接,完成通信通道的建立。The type of communication channel is the local socket connection of unix domain. Since the Android system will not be started until the Linux system is started, the Linux input method service in the Linux system has been started at this time. During the service initialization process, the Linux input method service will be used as The main service creates a socket server and starts to monitor the connection of the Android input method service. When the Android system starts, the Android input method service establishes a connection with the Linux input method service as a client service to complete the establishment of the communication channel.
进一步的,步骤S101中,还包括在第一操作系统中启动第二操作系统的步骤,所述在启动所述第一输入法服务后,启动第二操作系统,具体包括:Further, in step S101, it also includes the step of starting a second operating system in the first operating system, and after starting the first input method service, starting the second operating system specifically includes:
调用第一操作系统容器的命令集,并指定第一操作系统容器的配置文件的路径;calling the command set of the first operating system container, and specifying the path of the configuration file of the first operating system container;
通过所述命令集挂载配置文件中预设的文件系统;Mount the preset file system in the configuration file through the command set;
通过所述命令集启动配置文件中预设的引导程序,以启动所述第二操作系统。The boot program preset in the configuration file is started by the command set to start the second operating system.
例如,在启动Linux输入法服务后,启动Android操作系统时,相应的,第一操作系统容器是Linux容器(Linux Container,简称为LXC),Android容器镜像的安装过程需调用LXC的命令集里的lxc-start等命令进行,并在运行Android操作系统前预设两个文件系统:system(系统服务级库)和vendor(驱动程序),编写LXC启动配置文件config、预设的引导程序init及需要挂载的文件系统system、vendor和data等;For example, after starting the Linux input method service, when starting the Android operating system, correspondingly, the first operating system container is a Linux container (Linux Container, referred to as LXC), and the installation process of the Android container image needs to call the command set in the LXC lxc-start and other commands are carried out, and two file systems are preset before running the Android operating system: system (system service level library) and vendor (driver program), write the LXC startup configuration file config, the preset boot program init and the required Mounted file systems system, vendor, data, etc.;
启动Android操作系统时,调用LXC的命令集里的lxc-start命令,并指定LXC的配置文件config的路径;lxc-start命令首先挂载配置文件config中预设的文件系统system、vendor,并创建data等目录;然后lxc-start命令启动配置文件config中预设的init引导程序来启动Android操作系统。When starting the Android operating system, call the lxc-start command in the LXC command set, and specify the path of the LXC configuration file config; the lxc-start command first mounts the preset file system system and vendor in the configuration file config, and creates data and other directories; then the lxc-start command starts the init bootloader preset in the configuration file config to start the Android operating system.
步骤S102:利用所述socket通信通道,从所述第二输入法服务向第一输入法服务发送所述第二操作系统支持的输入法;Step S102: Using the socket communication channel, sending the input method supported by the second operating system from the second input method service to the first input method service;
例如,socket通信通道建立成功后,将Android操作系统中支持的输入法发送给Linux输入法服务做统一管理。For example, after the socket communication channel is successfully established, the input methods supported in the Android operating system are sent to the Linux input method service for unified management.
具体的,在步骤S102中的从所述第二输入法服务向第一输入法服务发送所述第二操作系统支持的输入法之后,所述方法还包括:Specifically, after sending the input method supported by the second operating system from the second input method service to the first input method service in step S102, the method further includes:
通过第一输入法服务对第二操作系统支持的输入法和第一操作系统支持的输入法进行统一管理;Perform unified management of the input methods supported by the second operating system and the input methods supported by the first operating system through the first input method service;
通过第一输入法服务扫描所述第一操作系统支持的输入法;scanning for input methods supported by the first operating system through the first input method service;
通过第一输入法服务保存所述第二操作系统支持的输入法的代理对象(Proxy)。The proxy object (Proxy) of the input method supported by the second operating system is saved through the first input method service.
例如,Linux输入法服务在启动时,扫描Linux操作系统中已经安装的输入法,并且,处理Android输入法服务发送过来的输入法列表,通过Linux输入法服务对Android操作系统支持的输入法和Linux操作系统支持的输入法进行统一管理;For example, when the Linux input method service is started, it scans the input methods installed in the Linux operating system, and processes the list of input methods sent by the Android input method service. Unified management of input methods supported by the operating system;
对于Linux操作系统支持的输入法,Linux输入法服务以插件的形式进行管理;对于Android操作系统支持的输入法,Linux输入法服务中仅保存Android操作系统支持的输入法的代理对象,当用户选择设置Android操作系统支持的输入法后,Linux输入法服务通过代理对象与Android输入法服务进行数据交互。For the input methods supported by the Linux operating system, the Linux input method service is managed in the form of a plug-in; for the input methods supported by the Android operating system, only the proxy object of the input method supported by the Android operating system is saved in the Linux input method service, when the user selects After setting the input method supported by the Android operating system, the Linux input method service exchanges data with the Android input method service through the proxy object.
步骤S103:通过第一输入法服务,从所述第二操作系统支持的输入法和所述第一操作系统支持的输入法中设置默认输入法。Step S103: through the first input method service, set a default input method from the input methods supported by the second operating system and the input methods supported by the first operating system.
例如,Linux输入法服务一并将Linux操作系统支持的输入法和Android操作系统支持的输入法做统一管理,所有输入法,包括Linux操作系统支持的输入法和Android操作系统支持的输入法,均由Linux操作系统进行管理;For example, the Linux input method service manages the input methods supported by the Linux operating system and the input methods supported by the Android operating system. All input methods, including the input methods supported by the Linux operating system and the input methods supported by the Android operating system, are Managed by the Linux operating system;
Linux输入法服务统一管理输入法的流程图如图3所示,其中,InputMethodService:输入法服务;The flowchart of Linux input method service unified management input method is shown in Figure 3, wherein, InputMethodService: input method service;
具体包括:Android输入法服务向Linux输入法服务发起建立socket通信通道,Linux输入法服务向Android输入法服务发送成功建立的指令;Android输入法服务向Linux输入法服务发送Android系统支持的输入法列表,用户通过Linux输入法服务设置需要使用的输入法。Specifically include: the Android input method service initiates the establishment of a socket communication channel to the Linux input method service, the Linux input method service sends a successfully established command to the Android input method service; the Android input method service sends a list of input methods supported by the Android system to the Linux input method service , the user sets the input method to be used through the Linux input method service.
如果Linux中安装有五笔输入法和搜狗输入法,Android中安装有讯飞输入法和百度输入法,此时,Linux输入法服务维护的输入法列表中就包含了这四个输入法,用户在Linux的输入法列表中会看到这四个输入法,并且可以从中选择一个输入法设置为默认输入法。If Wubi input method and Sogou input method are installed in Linux, and Xunfei input method and Baidu input method are installed in Android, these four input methods are included in the input method list maintained by Linux input method service. These four input methods will be seen in the Linux input method list, and one input method can be selected as the default input method.
通过Linux输入法服务,可以将Linux与Andorid输入法处理流程进行统一,使得用户可以在无感知的情况下自由切换Linux操作系统支持的输入法与Android操作系统支持的输入法,自由设置默认输入法,解决了用户在使用不同的操作系统应用时无法自由切换输入法的问题,提高了用户的输入效率。Through the Linux input method service, the processing flow of Linux and Andorid input methods can be unified, so that users can freely switch between the input methods supported by the Linux operating system and the input methods supported by the Android operating system without perception, and freely set the default input method , which solves the problem that the user cannot freely switch the input method when using different operating system applications, and improves the user's input efficiency.
在步骤S103之后,当应用提出输入请求时,输入方法包括:After step S103, when the application makes an input request, the input method includes:
获取应用的输入请求,启动所述默认输入法,其中,所述应用位于第一操作系统或第二操作系统;acquiring an input request of an application, and starting the default input method, wherein the application is located in the first operating system or the second operating system;
在所述默认输入法与应用之间建立socket连接;默认输入法与应用之间建立socket连接后,通过本地socket进行通信,不需要经过以太网设备,实现在两种操作系统的应用下自由切换任意操作系统支持的输入法;Establish a socket connection between the default input method and the application; after the default input method and the application establish the socket connection, communicate through the local socket without going through the Ethernet device, and realize free switching under the application of the two operating systems Input methods supported by any operating system;
基于所述socket连接,将通过所述默认输入法输入的文本发送至所述应用。Based on the socket connection, the text input through the default input method is sent to the application.
通过默认输入法与应用之间建立的socket连接,用户使用默认输入法输入的文本可以直接发送至操作系统应用进行显示,不需要再经过操作系统输入法服务;操作系统支持的输入法中的任意输入法,都可以与操作系统应用通过本地socket连接,完成用户输入文本的传递。Through the socket connection established between the default input method and the application, the text input by the user using the default input method can be directly sent to the operating system application for display without going through the operating system input method service; any input method supported by the operating system The input method can be connected with the operating system application through a local socket to complete the transmission of the user input text.
本公开实施例中,默认输入法(如讯飞输入法或五笔输入法)与应用(如Android记事本或Linux记事本)建立socket连接,通过socket连接可以将用户输入的文字符号发送给应用;In the embodiment of the present disclosure, the default input method (such as Xunfei input method or Wubi input method) establishes a socket connection with the application (such as Android Notepad or Linux Notepad), and the character symbols input by the user can be sent to the application through the socket connection;
由于Android系统运行于Linux容器中,与Linux共享一个操作系统内核,所以两个操作系统中的进程或应用可以通过本地socket进行通信,采用本地socket的通信方式不需要经过以太网设备;Since the Android system runs in a Linux container and shares an operating system kernel with Linux, the processes or applications in the two operating systems can communicate through local sockets, and the communication method using local sockets does not need to go through an Ethernet device;
操作系统支持的输入法(如讯飞输入法或五笔输入法)是一个应用进程,Android应用或Linux应用(如Android记事本或Linux记事本)也是一个应用进程,不管这两个应用进程分别在哪个操作系统中运行,均可以通过本地socket进行通信,实现Android操作系统和Linux操作系统支持的输入法功能的兼容;Linux操作系统支持的输入法或Android操作系统支持的输入法中包括的任意输入法,都可以与Linux应用或Android应用通过本地socket连接,完成输入内容的传递。默认输入法与应用之间建立socket连接后,通过本地socket进行通信,不需要经过以太网设备,实现在两种操作系统的应用下自由切换任意操作系统支持的输入法。The input method supported by the operating system (such as Xunfei Input Method or Wubi Input Method) is an application process, and the Android application or Linux application (such as Android Notepad or Linux Notepad) is also an application process, regardless of the two application processes. Whichever operating system is running, can communicate through the local socket to realize the compatibility of the input method functions supported by the Android operating system and the Linux operating system; any input method included in the input method supported by the Linux operating system or the input method supported by the Android operating system Both methods can be connected with Linux applications or Android applications through local sockets to complete the transmission of input content. After the socket connection is established between the default input method and the application, the communication is carried out through the local socket without going through the Ethernet device, and the input method supported by any operating system can be freely switched under the application of the two operating systems.
在一些实施例中,输入方法包括:In some embodiments, input methods include:
通过应用的输入框获取输入焦点,其中,所述应用位于第一操作系统或第二操作系统;通过操作系统应用的输入框,可以获取输入焦点;The input focus is obtained through the input box of the application, wherein the application is located in the first operating system or the second operating system; the input focus can be obtained through the input box of the operating system application;
基于所述输入焦点,从所述应用向第一输入法服务发送默认输入法请求指令;获取输入焦点后,通过默认输入法请求指令请求获取默认输入法,以通过默认输入法输入文本;Based on the input focus, send a default input method request instruction from the application to the first input method service; after obtaining the input focus, request to obtain the default input method through the default input method request instruction, so as to input text through the default input method;
根据所述默认输入法请求指令,通过第一输入法服务获取设置的默认输入法;第一输入法服务接收默认输入法请求指令后,查询获取用户设置的默认输入法;According to the default input method request instruction, obtain the set default input method through the first input method service; after the first input method service receives the default input method request instruction, query and obtain the default input method set by the user;
判断所述默认输入法的从属关系,其中,所述默认输入法属于第一操作系统或第二操作系统支持的输入法。用户设置的默认输入法可能属于第一操作系统,也可能属于第二操作系统支持的输入法,因此,需要判断默认输入法所属的操作系统,根据判断结果确定所启动的默认输入法对应的输入法服务。Judging the affiliation of the default input method, wherein the default input method belongs to the input methods supported by the first operating system or the second operating system. The default input method set by the user may belong to the first operating system, or it may belong to the input method supported by the second operating system. Therefore, it is necessary to determine the operating system to which the default input method belongs, and determine the input corresponding to the activated default input method according to the judgment result. law services.
进一步的,在所述默认输入法属于第二操作系统支持的输入法的情况下:Further, in the case that the default input method belongs to the input method supported by the second operating system:
从第一输入法服务向第二输入法服务发送启动指令;sending an activation command from the first input method service to the second input method service;
根据所述启动指令,通过第二输入法服务启动所述默认输入法;According to the startup instruction, start the default input method through the second input method service;
在所述默认输入法与所述应用之间建立socket连接;Establishing a socket connection between the default input method and the application;
基于所述socket连接,将通过所述默认输入法输入的文本发送至所述应用。Based on the socket connection, the text input through the default input method is sent to the application.
当所述应用位于第二操作系统且所述默认输入法属于第二操作系统支持的输入法时,第一操作系统使用第二操作系统支持的输入法与第二操作系统中的应用建立关系;When the application is located in the second operating system and the default input method is an input method supported by the second operating system, the first operating system uses the input method supported by the second operating system to establish a relationship with the application in the second operating system;
在本实施例中,即Linux操作系统使用Andorid操作系统支持的输入法与Andorid应用建立关系的过程,该过程的流程图如图4所示,其中,各框对应的内容如下:In this embodiment, that is, the Linux operating system uses the input method supported by the Andorid operating system to establish a relationship with the Andorid application. The flow chart of the process is as shown in Figure 4, wherein the corresponding content of each frame is as follows:
InputMethodService:输入法服务;InputMethodClient:输入法客户端;AndroidApp:安卓应用;AndroidInputMethod:安卓输入法;套接字(socket):服务端与客户端的连接和通信,Linux相当于服务端,Android相当于客户端;Linux:操作系统,Android以容器化的方式在Linux中运行。InputMethodService: input method service; InputMethodClient: input method client; AndroidApp: Android application; AndroidInputMethod: Android input method; socket (socket): the connection and communication between the server and the client, Linux is equivalent to the server, Android is equivalent to the client Terminal; Linux: operating system, Android runs in Linux in a containerized manner.
各数字对应的流程内容如下:The process content corresponding to each number is as follows:
1.Android输入法服务与Linux输入法服务建立socket连接;1. The Android input method service establishes a socket connection with the Linux input method service;
2.用户通过Linux输入法服务设置默认输入法为Android支持的输入法,例如设置默认输入法为Android支持的讯飞输入法;2. The user sets the default input method to an input method supported by Android through the Linux input method service, for example, setting the default input method to Xunfei input method supported by Android;
3.Android应用(例如Android记事本),用户需要进行输入,通过输入框获取输入焦点;3. For Android applications (such as Android Notepad), the user needs to input and obtain the input focus through the input box;
4.Android应用向Android输入法客户端请求输入法;4. The Android application requests the input method from the Android input method client;
5.Android输入法客户端向Android输入法服务请求输入法;5. The Android input method client requests the input method from the Android input method service;
6.Android输入法服务通过socket向Linux输入法服务发送启动输入法的指令;6. The Android input method service sends an instruction to start the input method to the Linux input method service through the socket;
7.Linux输入法服务获取用户设置的默认输入法,本实施例中,获取结果为Android支持的讯飞输入法;输入法启动流程中的关键一步是获取系统的默认输入法,而输入法全部在Linux输入法服务中统一管理,所以Android在启动输入法过程中,需要向Linux进行查询目前用户设置的默认输入法;7. The Linux input method service obtains the default input method set by the user. In this embodiment, the obtained result is the Xunfei input method supported by Android; the key step in the input method startup process is to obtain the default input method of the system, and all input methods Unified management in the Linux input method service, so Android needs to query Linux for the default input method currently set by the user during the process of starting the input method;
8.Linux输入法服务确定默认输入法为Android支持的讯飞输入法后,向Android输入法服务发送启动Android输入法的指令;8. After the Linux input method service determines that the default input method is the Xunfei input method supported by Android, it sends an instruction to start the Android input method to the Android input method service;
9.Android输入法服务启动Android输入法;9. The Android input method service starts the Android input method;
10.Android支持的讯飞输入法与Android输入法客户端建立socket连接;10. The Xunfei input method supported by Android establishes a socket connection with the Android input method client;
11.Android输入法客户端与Android应用(如Android记事本)之间的连接建立成功;11. The connection between the Android input method client and the Android application (such as Android Notepad) is successfully established;
12.用户使用Android支持的讯飞输入法向Android输入法客户端进行文字输入;12. The user uses the Xunfei input method supported by Android to input text to the Android input method client;
13.Android输入法客户端将用户输入的文字发送至Android应用。13. The Android input method client sends the text entered by the user to the Android application.
通过上述Linux操作系统使用Andorid操作系统支持的输入法与Andorid应用建立关系的过程,可以实现在Linux操作系统下使用Android支持的讯飞输入法与Android记事本建立连接。Through the above-mentioned process of establishing a relationship between the input method supported by the Andorid operating system and the Andorid application in the Linux operating system, it is possible to establish a connection with the Android Notepad using the Xunfei input method supported by Android under the Linux operating system.
当所述应用位于第一操作系统且所述默认输入法属于第二操作系统支持的输入法时,第一操作系统使用第二操作系统支持的输入法与第一操作系统中的应用建立关系;When the application is located in the first operating system and the default input method belongs to the input method supported by the second operating system, the first operating system uses the input method supported by the second operating system to establish a relationship with the application in the first operating system;
在本实施例中,即Linux操作系统使用Andorid操作系统支持的输入法与Linux应用建立关系的过程,该过程的流程图如图5所示,其中,Linux应用:Linux操作系统下的应用程序,如Linux记事本;In the present embodiment, namely, the process that the Linux operating system uses the input method supported by the Andorid operating system to establish a relationship with the Linux application, the flow chart of the process is as shown in Figure 5, wherein, the Linux application: the application program under the Linux operating system, Such as Linux Notepad;
该过程中,Linux输入法服务与Android输入法服务建立socket连接的流程与图4相同,此处不再赘述,图5中各数字对应的流程内容如下:In this process, the process of establishing a socket connection between the Linux input method service and the Android input method service is the same as that in Figure 4, and will not be repeated here. The process content corresponding to each number in Figure 5 is as follows:
1.Linux应用通过输入框获取输入焦点;1. The Linux application obtains the input focus through the input box;
2.Linux应用向Linux输入法服务请求输入法;2. The Linux application requests the input method from the Linux input method service;
3.Linux输入法服务查询用户设置的默认输入法,查询结果为Android支持的讯飞输入法;3. The Linux input method service queries the default input method set by the user, and the query result is the Xunfei input method supported by Android;
4.Linux输入法服务向Android输入法服务发送启动Android支持的讯飞输入法的指令;4. The Linux input method service sends an instruction to start the Xunfei input method supported by Android to the Android input method service;
5.Android输入法服务启动Android支持的讯飞输入法;5. The Android input method service starts the Xunfei input method supported by Android;
6.Android支持的讯飞输入法向Android输入法服务反馈启动成功指令;6. The Xunfei input method supported by Android feeds back the startup success command to the Android input method service;
7.Android输入法服务向Linux输入法服务反馈启动成功指令;7. The Android input method service feeds back the startup success command to the Linux input method service;
8.Linux输入法服务向Linux应用发送与Android支持的讯飞输入法建立连接的指令;8. The Linux input method service sends an instruction to establish a connection with the Xunfei input method supported by Android to the Linux application;
9.Linux应用与Android支持的讯飞输入法建立socket连接;通过socket进行通信,即在Android支持的讯飞输入法启动成功后,Android支持的输入法与Linux应用建立socket连接,socket通信做跨系统连接和通信;9. The Linux application establishes a socket connection with the Xunfei input method supported by Android; communicate through the socket, that is, after the Xunfei input method supported by Android is successfully started, the input method supported by Android establishes a socket connection with the Linux application, and the socket communication is cross-connected. system connectivity and communication;
10.使用Android支持的讯飞输入法向Linux应用传输用户输入的文字。10. Use the Xunfei input method supported by Android to transmit the text entered by the user to the Linux application.
通过上述Linux操作系统使用Andorid操作系统支持的输入法与Linux应用建立关系的过程,可以实现在Linux操作系统下使用Android支持的讯飞输入法与Linux应用建立连接。Through the process of establishing a relationship between the Linux operating system using the input method supported by the Andorid operating system and the Linux application, it is possible to establish a connection with the Linux application using the Xunfei input method supported by the Android operating system under the Linux operating system.
在所述默认输入法属于第一操作系统支持的输入法的情况下:In the case where the default input method belongs to the input method supported by the first operating system:
通过所述第一输入法服务启动所述默认输入法;Start the default input method through the first input method service;
从所述第一输入法服务向第二输入法服务发送默认输入法启动成功指令;sending a default input method startup success instruction from the first input method service to the second input method service;
根据所述默认输入法启动成功指令,从第二输入法服务向应用传递默认输入法socket;According to the default input method startup success instruction, transfer the default input method socket to the application from the second input method service;
根据默认输入法socket,在应用与所述默认输入法之间建立socket连接;According to the default input method socket, a socket connection is established between the application and the default input method;
基于所述socket连接,将通过所述默认输入法输入的文本发送至所述应用。Based on the socket connection, the text input through the default input method is sent to the application.
当应用位于第二操作系统且所述默认输入法属于第一操作系统支持的输入法时,第一操作系统使用第二操作系统支持的输入法与第一操作系统中的应用建立关系;When the application is located in the second operating system and the default input method belongs to the input method supported by the first operating system, the first operating system uses the input method supported by the second operating system to establish a relationship with the application in the first operating system;
在本实施例中,即Linux操作系统使用Linux操作系统支持的输入法与Andorid应用建立关系的过程,该过程的流程图如图6所示,其中,Linux操作系统支持的输入法为五笔输入法;In this embodiment, that is, the Linux operating system uses the input method supported by the Linux operating system to establish a relationship with the Andorid application. The flow chart of the process is as shown in Figure 6, wherein the input method supported by the Linux operating system is the Wubi input method ;
该过程中,Linux输入法服务与Android输入法服务建立socket连接的流程与图4相同,此处不再赘述,图6中各数字对应的流程内容如下:In this process, the process of establishing a socket connection between the Linux input method service and the Android input method service is the same as that in Figure 4, and will not be repeated here. The process content corresponding to each number in Figure 6 is as follows:
1.用户通过Linux输入法服务设置默认输入法,例如为Linux系统支持的五笔输入法;1. The user sets the default input method through the Linux input method service, such as the Wubi input method supported by the Linux system;
2.Android应用通过输入框获取输入焦点;2. The Android application obtains the input focus through the input box;
3.Android应用向Android输入法客户端请求输入法;3. The Android application requests the input method from the Android input method client;
4.Android输入法客户端向Android输入法服务请求输入法;4. The Android input method client requests the input method from the Android input method service;
5.Android输入法服务通过socket向Linux输入法服务请求输入法;5. The Android input method service requests the input method from the Linux input method service through the socket;
6.Linux输入法服务查询用户设置的默认输入法,查询结果为Linux系统支持的五笔输入法;6. The Linux input method service queries the default input method set by the user, and the query result is the Wubi input method supported by the Linux system;
7.Linux输入法服务启动Linux系统支持的五笔输入法;7. The Linux input method service starts the Wubi input method supported by the Linux system;
8.Linux系统支持的五笔输入法向Linux输入法服务反馈启动成功指令;8. The Wubi input method supported by the Linux system feeds back the startup success command to the Linux input method service;
9.Linux输入法服务向Android输入法服务发送Linux系统支持的五笔输入法启动成功指令;9. The Linux input method service sends the Wubi input method startup success command supported by the Linux system to the Android input method service;
10.Android输入法服务向Android应用传递Linux输入法socket;10. The Android input method service passes the Linux input method socket to the Android application;
11.Android应用与Linux系统支持的五笔输入法建立socket连接;11. The Android application establishes a socket connection with the Wubi input method supported by the Linux system;
12.使用Linux系统支持的五笔输入法向Android应用传输用户输入的文字。12. Use the Wubi input method supported by the Linux system to transmit the text entered by the user to the Android application.
通过上述Linux操作系统使用Linux操作系统支持的输入法与Andorid应用建立关系的过程,可以实现在Linux操作系统下使用Linux支持的五笔输入法与Android应用建立连接。Through the process of establishing a relationship between the Linux operating system using the input method supported by the Linux operating system and the Andorid application, the Wubi input method supported by Linux can be used to establish a connection with the Android application under the Linux operating system.
本实施例提供的输入的原理为操作系统支持的输入法(如讯飞输入法或五笔输入法)与应用(如Android记事本或Linux记事本)建立socket连接,通过socket连接可以将用户输入的文字符号发送给应用;The principle of input provided by this embodiment is that the input method supported by the operating system (such as Xunfei input method or Wubi input method) establishes a socket connection with an application (such as Android notepad or Linux notepad), and the user input can be input through the socket connection. The text symbol is sent to the application;
由于Android系统运行于Linux容器中,与Linux共享一个操作系统内核,所以两个操作系统中的进程或应用可以通过本地socket进行通信,其中,本地socket的通信方式不经过以太网设备;Since the Android system runs in a Linux container and shares an operating system kernel with Linux, processes or applications in the two operating systems can communicate through local sockets, where the communication mode of local sockets does not go through Ethernet devices;
主系统支持的输入法或子系统支持的输入法(如五笔输入法或讯飞输入法)是一个应用进程,Android应用或Linux应用(如Android记事本或Linux记事本)也是一个应用进程,不管这两个应用进程分别在哪个系统中运行,均可以通过本地socket进行通信,实现Android操作系统和Linux操作系统支持的输入法功能的兼容。The input method supported by the main system or the input method supported by the subsystem (such as Wubi input method or Xunfei input method) is an application process, and the Android application or Linux application (such as Android Notepad or Linux Notepad) is also an application process, regardless of In whichever system these two application processes are running, they can communicate through the local socket, so as to realize the compatibility of the input method functions supported by the Android operating system and the Linux operating system.
从以上的描述中,可以看出,本公开实现了如下技术效果:From the above description, it can be seen that the present disclosure achieves the following technical effects:
本公开通过socket通信通道将第二操作系统支持的输入法发送至第一输入法服务,由第一输入法服务统一管理第一操作系统支持的输入法和第二操作系统支持的输入法,可以通过第一输入法服务自由设置默认输入法,解决了用户在使用不同的操作系统应用时无法自由切换输入法的问题,提高了用户的输入效率;This disclosure sends the input method supported by the second operating system to the first input method service through the socket communication channel, and the first input method service manages the input method supported by the first operating system and the input method supported by the second operating system in a unified manner. Freely set the default input method through the first input method service, which solves the problem that the user cannot freely switch the input method when using different operating system applications, and improves the user's input efficiency;
本公开默认输入法与应用之间建立socket连接后,通过本地socket进行通信,不需要经过以太网设备,实现在两种操作系统的应用下自由切换任意操作系统支持的输入法;操作系统支持的输入法中的任意输入法,都可以与操作系统应用通过本地socket连接,通过输入法将输入的文本的发送至应用。After the default input method of this disclosure establishes a socket connection with the application, the communication is carried out through the local socket without going through the Ethernet device, so that the input method supported by any operating system can be freely switched under the application of the two operating systems; the input method supported by the operating system Any input method in the input method can be connected with the operating system application through a local socket, and the input text can be sent to the application through the input method.
需要说明的是,在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行,并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that the steps shown in the flowcharts of the accompanying drawings may be performed in a computer system, such as a set of computer-executable instructions, and that although a logical order is shown in the flowcharts, in some cases, The steps shown or described may be performed in an order different than here.
本公开实施例还提供了一种用于实施上述输入法设置方法的输入法设置装置,应用于电子设备,电子设备包括第一操作系统和与第一操作系统共享内核并部署在第一操作系统中的第二操作系统,第一操作系统包括第一输入法服务,第二操作系统包括第二输入法服务,如图7所示,该装置包括:An embodiment of the present disclosure also provides an input method setting device for implementing the above input method setting method, which is applied to an electronic device, and the electronic device includes a first operating system and shares a kernel with the first operating system and is deployed on the first operating system In the second operating system, the first operating system includes the first input method service, and the second operating system includes the second input method service, as shown in Figure 7, the device includes:
socket通信通道建立单元71,用于在第二操作系统中的第二输入法服务与所述第一操作系统中的第一输入法服务之间建立socket通信通道;A socket communication channel establishment unit 71, configured to establish a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system;
发送单元72,用于利用所述socket通信通道,从所述第二输入法服务向第一输入法服务发送所述第二操作系统支持的输入法;A sending unit 72, configured to use the socket communication channel to send the input method supported by the second operating system from the second input method service to the first input method service;
设置单元73,用于通过第一输入法服务,从所述第二操作系统支持的输入法和所述第一操作系统支持的输入法中设置默认输入法。The setting unit 73 is configured to set a default input method from the input methods supported by the second operating system and the input methods supported by the first operating system through the first input method service.
本公开实施例还提供了一种电子设备,如图8所示,该电子设备包括一个或多个处理器81以及存储器82,图8中以一个处理器81为例。An embodiment of the present disclosure also provides an electronic device. As shown in FIG. 8 , the electronic device includes one or more processors 81 and a memory 82 , and one processor 81 is taken as an example in FIG. 8 .
该控制器还可以包括:输入装置83和输出装置84。The controller may also include: an input device 83 and an output device 84 .
处理器81、存储器82、输入装置83和输出装置84可以通过总线或者其他方式连接,图8中以通过总线连接为例。The processor 81 , memory 82 , input device 83 and output device 84 may be connected via a bus or in other ways, and connection via a bus is taken as an example in FIG. 8 .
处理器81可以为中央处理器(Central Processing Unit,简称为CPU),处理器81还可以为其他通用处理器、数字信号处理器(Digital Signal Processor,简称为DSP)、专用集成电路(Application Specific Integrated Circuit,简称为ASIC)、现场可编程门阵列(Field-Programmable Gate Array,简称为FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等芯片,或者上述各类芯片的组合,通用处理器可以是微处理器或者任何常规的处理器。The processor 81 can be a central processing unit (Central Processing Unit, referred to as CPU), and the processor 81 can also be other general processors, digital signal processors (Digital Signal Processor, referred to as DSP), application specific integrated circuits (Application Specific Integrated Circuit, referred to as ASIC), field-programmable gate array (Field-Programmable Gate Array, referred to as FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various chips , the general purpose processor can be a microprocessor or any conventional processor.
存储器82作为一种非暂态计算机可读存储介质,可用于存储非暂态软件程序、非暂态计算机可执行程序以及模块,如本公开实施例中的控制方法对应的程序指令/模块。处理器81通过运行存储在存储器82中的非暂态软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的输入法设置方法、输入方法。The memory 82, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs and modules, such as program instructions/modules corresponding to the control method in the embodiments of the present disclosure. Processor 81 executes various functional applications and data processing of the server by running non-transitory software programs, instructions and modules stored in memory 82, that is, implements the input method setting method and input method of the above method embodiments.
存储器82可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据服务器操作的处理装置的使用所创建的数据等。此外,存储器82可以包括高速随机存取存储器,还可以包括非暂态存储器,例如至少一个磁盘存储器件、闪存器件、或其他非暂态固态存储器件。在一些实施例中,存储器82可选地包括相对于处理器81远程设置的存储器,这些远程存储器可以通过网络连接至网络连接装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 82 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function; the data storage area may store data created according to use of a processing device operated by a server, and the like. In addition, the memory 82 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, memory 82 may optionally include memory located remotely from processor 81, and these remote memories may be connected to network connection devices via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置83可接收输入的数字或字符信息,以及产生与服务器的处理装置的用户设置以及功能控制有关的键信号输入。输出装置84可包括显示屏等显示设备。The input device 83 can receive input numbers or character information, and generate key signal input related to user settings and function control of the processing device of the server. The output device 84 may include a display device such as a display screen.
一个或者多个模块存储在存储器82中,当被一个或者多个处理器81执行时,执行如图1所示的方法。One or more modules are stored in memory 82, and when executed by one or more processors 81, perform the method shown in FIG. 1 .
本公开实施例还提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时,实现前述任一实施例提供的输入法设置方法和输入方法。An embodiment of the present disclosure further provides a computer program product, including a computer program. When the computer program is executed by a processor, the input method setting method and the input method provided in any one of the foregoing embodiments are implemented.
本公开实施例还提供了一种计算机程序,所述计算机程序被处理器执行时,实现前述任一项实施例提供的输入法设置方法和输入方法。An embodiment of the present disclosure further provides a computer program, which, when executed by a processor, implements the input method setting method and the input method provided in any one of the foregoing embodiments.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可 以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(Local Area Network,简称LAN)或广域网(Wide Area Network,简称WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external A computer (connected via the Internet, eg, using an Internet service provider).
本领域技术人员可以理解,实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成的,程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各电机控制方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,简称为ROM)、随机存储记忆体(Random Access Memory,简称为RAM)、快闪存储器(Flash Memory,简称为FM)、硬盘(Hard Disk Drive,简称为HDD)或固态硬盘(Solid-State Drive,简称为SSD)等;存储介质还可以包括上述种类的存储器的组合。Those skilled in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. , may include the processes of the embodiments of the motor control methods described above. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), a flash memory (Flash Memory, referred to as FM), hard disk (Hard Disk Drive, referred to as HDD) or solid-state drive (Solid-State Drive, referred to as SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
虽然结合附图描述了本公开的实施方式,但是本领域技术人员可以在不脱离本公开的精神和范围的情况下作出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope of the appended claims. within the limited range.

Claims (14)

  1. 一种输入法设置方法,应用于电子设备,电子设备包括第一操作系统和与所述第一操作系统共享内核并部署在所述第一操作系统中的第二操作系统,所述第一操作系统包括第一输入法服务,所述第二操作系统包括第二输入法服务,所述方法包括:An input method setting method, applied to an electronic device, the electronic device includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system, the first operating system The system includes a first input method service, the second operating system includes a second input method service, and the method includes:
    在所述第二操作系统中的所述第二输入法服务与所述第一操作系统中的所述第一输入法服务之间建立socket通信通道;Establishing a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system;
    利用所述socket通信通道,从所述第二输入法服务向所述第一输入法服务发送所述第二操作系统支持的输入法;sending the input method supported by the second operating system from the second input method service to the first input method service by using the socket communication channel;
    通过所述第一输入法服务,从所述第二操作系统支持的输入法和所述第一操作系统支持的输入法中设置默认输入法。Through the first input method service, a default input method is set from the input methods supported by the second operating system and the input methods supported by the first operating system.
  2. 根据权利要求1所述的输入法设置方法,其中,所述在所述第二操作系统中的所述第二输入法服务与所述第一操作系统中的所述第一输入法服务之间建立socket通信通道,包括:The input method setting method according to claim 1, wherein, between the second input method service in the second operating system and the first input method service in the first operating system Establish a socket communication channel, including:
    在所述第一操作系统中启动所述第一输入法服务;Start the first input method service in the first operating system;
    在所述第二操作系统中启动所述第二输入法服务;Start the second input method service in the second operating system;
    在所述第二输入法服务与所述第一输入法服务之间建立所述socket通信通道。The socket communication channel is established between the second input method service and the first input method service.
  3. 根据权利要求1或2所述的输入法设置方法,还包括在所述第一操作系统中启动所述第二操作系统。The input method setting method according to claim 1 or 2, further comprising starting the second operating system in the first operating system.
  4. 根据根据权利要求3所述的输入法设置方法,其中,所述在所述第一操作系统中启动所述第二操作系统,具体包括:According to the input method setting method according to claim 3, wherein said starting the second operating system in the first operating system specifically includes:
    调用所述第一操作系统容器的命令集,并指定所述第一操作系统容器的配置文件的路径;calling the command set of the first operating system container, and specifying the path of the configuration file of the first operating system container;
    通过所述命令集挂载所述配置文件中预设的文件系统;mount the preset file system in the configuration file through the command set;
    通过所述命令集启动所述配置文件中预设的引导程序,以启动所述第二操作系统。The boot program preset in the configuration file is started by the command set to start the second operating system.
  5. 根据权利要求1-4任意一项所述的输入法设置方法,在所述从所述第二输入法服务向所述第一输入法服务发送所述第二操作系统支持的输入法之后,所述方法还包括:According to the input method setting method according to any one of claims 1-4, after the input method supported by the second operating system is sent from the second input method service to the first input method service, the The method also includes:
    通过所述第一输入法服务扫描所述第一操作系统支持的输入法;scanning for input methods supported by the first operating system through the first input method service;
    通过所述第一输入法服务保存所述第二操作系统支持的输入法的代理对象。The proxy object of the input method supported by the second operating system is saved through the first input method service.
  6. 一种输入方法,应用于采用权利要求1-5任意一项所述的输入法设置方法的电子设备,所述方法包括:An input method, applied to an electronic device adopting the input method setting method described in any one of claims 1-5, said method comprising:
    获取应用的输入请求,启动所述默认输入法,其中,所述应用位于所述第一操作系统或所述第二操作系统;acquiring an input request of an application, and starting the default input method, wherein the application is located in the first operating system or the second operating system;
    在所述默认输入法与所述应用之间建立socket连接;Establishing a socket connection between the default input method and the application;
    基于所述socket连接,将通过所述默认输入法输入的文本发送至所述应用。Based on the socket connection, the text input through the default input method is sent to the application.
  7. 根据权利要求6所述的输入方法,所述获取应用的输入请求,启动所述默认输入法,包括:According to the input method according to claim 6, said obtaining the input request of the application and starting the default input method comprises:
    通过所述应用的输入框获取输入焦点;Obtain the input focus through the input box of the application;
    基于所述输入焦点,从所述应用向所述第一输入法服务发送默认输入法请求指令;Based on the input focus, sending a default input method request instruction from the application to the first input method service;
    根据所述默认输入法请求指令,通过所述第一输入法服务获取设置的所述默认输入法;Acquiring the set default input method through the first input method service according to the default input method request instruction;
    判断所述默认输入法的从属关系,其中,所述默认输入法属于所述第一操作系统或所述第二操作系统支持的输入法。Judging the affiliation of the default input method, wherein the default input method belongs to the input methods supported by the first operating system or the second operating system.
  8. 根据权利要求7所述的输入方法,在所述默认输入法属于所述第二操作系统支持的输入法的情况下,所述方法还包括:According to the input method according to claim 7, when the default input method belongs to the input method supported by the second operating system, the method further comprises:
    从所述第一输入法服务向所述第二输入法服务发送启动指令;sending an activation command from the first input method service to the second input method service;
    根据所述启动指令,通过所述第二输入法服务启动所述默认输入法。According to the starting instruction, the default input method is started through the second input method service.
  9. 根据权利要求7所述的输入方法,在所述默认输入法属于所述第一操作系统支持的输入法的情况下,所述方法还包括:According to the input method according to claim 7, when the default input method belongs to the input method supported by the first operating system, the method further comprises:
    通过所述第一输入法服务启动所述默认输入法;Start the default input method through the first input method service;
    从所述第一输入法服务向所述第二输入法服务发送默认输入法启动成功指令;sending a default input method startup success instruction from the first input method service to the second input method service;
    根据所述默认输入法启动成功指令,从所述第二输入法服务向所述应用传递默认输入法socket;According to the default input method startup success instruction, transfer the default input method socket to the application from the second input method service;
    其中,所述在所述默认输入法与所述应用之间建立socket连接包括:根据默认输入法socket,在所述应用与所述默认输入法之间建立socket连接。Wherein, the establishing a socket connection between the default input method and the application includes: establishing a socket connection between the application and the default input method according to the default input method socket.
  10. 一种输入法设置装置,应用于电子设备,电子设备包括第一操作系统和与所述第一操作系统共享内核并部署在所述第一操作系统中的第二操作系统,所述第一操作系统包括第一输入法服务,所述第二操作系统包括第二输入法服务,所述装置包括:An input method setting device, applied to an electronic device, the electronic device includes a first operating system and a second operating system that shares a kernel with the first operating system and is deployed in the first operating system, the first operating system The system includes a first input method service, the second operating system includes a second input method service, and the device includes:
    socket通信通道建立单元,用于在所述第二操作系统中的所述第二输入法服务与所述第一操作系统中的所述第一输入法服务之间建立socket通信通道;a socket communication channel establishment unit, configured to establish a socket communication channel between the second input method service in the second operating system and the first input method service in the first operating system;
    发送单元,用于利用所述socket通信通道,从所述第二输入法服务向所述第一输入法服务发送所述第二操作系统支持的输入法;a sending unit, configured to use the socket communication channel to send the input method supported by the second operating system from the second input method service to the first input method service;
    设置单元,用于通过所述第一输入法服务,从所述第二操作系统支持的输入法和所述第一操作系统支持的输入法中设置默认输入法。The setting unit is configured to set a default input method from the input methods supported by the second operating system and the input methods supported by the first operating system through the first input method service.
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使计算机执行权利要求1-5任意一项所述的输入法设置方法或权利 要求6-9任意一项所述的输入方法。A computer-readable storage medium, the computer-readable storage medium stores computer instructions, and the computer instructions are used to make a computer execute the input method setting method described in any one of claims 1-5 or claims 6-9 Any one of the input methods described.
  12. 一种电子设备,所述电子设备包括:至少一个处理器;以及与所述至少一个处理器通信连接的存储器;其中,所述存储器存储有可被所述至少一个处理器执行的计算机程序,所述计算机程序被所述至少一个处理器执行,以使所述至少一个处理器执行权利要求1-5任意一项所述的输入法设置方法或权利要求6-9任意一项所述的输入方法。An electronic device, the electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores a computer program executable by the at least one processor, the The computer program is executed by the at least one processor, so that the at least one processor executes the input method setting method described in any one of claims 1-5 or the input method described in any one of claims 6-9 .
  13. 一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时,实现权利要求1-5任意一项所述的输入法设置方法或权利要求6-9任意一项所述的输入方法。A computer program product, comprising a computer program, when the computer program is executed by a processor, it realizes the input method setting method described in any one of claims 1-5 or the input method described in any one of claims 6-9 .
  14. 一种计算机程序,所述计算机程序被处理器执行时,实现权利要求1-5任意一项所述的输入法设置方法或权利要求6-9任意一项所述的输入方法。A computer program, when the computer program is executed by a processor, it realizes the input method setting method according to any one of claims 1-5 or the input method according to any one of claims 6-9.
PCT/CN2022/104472 2021-09-10 2022-07-07 Input method setting method and apparatus, input method, and electronic device WO2023035758A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111061024.4A CN113918227A (en) 2021-09-10 2021-09-10 Input method setting method and device, input method and electronic equipment
CN202111061024.4 2021-09-10

Publications (1)

Publication Number Publication Date
WO2023035758A1 true WO2023035758A1 (en) 2023-03-16

Family

ID=79234481

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/104472 WO2023035758A1 (en) 2021-09-10 2022-07-07 Input method setting method and apparatus, input method, and electronic device

Country Status (2)

Country Link
CN (1) CN113918227A (en)
WO (1) WO2023035758A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918227A (en) * 2021-09-10 2022-01-11 北京鲸鲮信息系统技术有限公司 Input method setting method and device, input method and electronic equipment
CN115309567B (en) * 2022-08-10 2023-09-12 亿咖通(湖北)技术有限公司 Method for sharing input method among multiple systems, electronic device and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142851A (en) * 2014-08-04 2014-11-12 福州靠谱网络有限公司 Method for using computer input method in android simulator
CN104740872A (en) * 2015-04-13 2015-07-01 北京奇虎科技有限公司 Method and device for operating and controlling game program in simulated Android environment
US20150193904A1 (en) * 2012-10-24 2015-07-09 OpenMobile World Wide, Inc. Graphics acceleration for applications executing on mobile devices with multi-operating system environment
CN112882675A (en) * 2021-03-29 2021-06-01 努比亚技术有限公司 Screen-casting character input method and device and computer readable storage medium
CN113741708A (en) * 2020-05-31 2021-12-03 华为技术有限公司 Input method and electronic equipment
CN113918227A (en) * 2021-09-10 2022-01-11 北京鲸鲮信息系统技术有限公司 Input method setting method and device, input method and electronic equipment

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1508657A (en) * 2002-12-20 2004-06-30 宇龙计算机通信科技(深圳)有限公司 Three-key integrated input method changing and browse type information processing device
US9516128B2 (en) * 2007-12-13 2016-12-06 International Business Machines Corporation Generic remote connection to a command line interface application
CN101706690A (en) * 2009-12-07 2010-05-12 北京搜狗科技发展有限公司 Adaptive input method and adaptive input system
CN102799490B (en) * 2011-05-27 2014-08-06 北京神州泰岳软件股份有限公司 System and method for realizing one-to-many interprocess communication
CN105094355B (en) * 2014-04-29 2018-03-27 联发科技(新加坡)私人有限公司 Input method and related electronic device
CN106980531B (en) * 2016-01-19 2021-01-29 斑马智行网络(香港)有限公司 Input method operation processing method and device
CN106528099A (en) * 2016-10-21 2017-03-22 合肥联宝信息技术有限公司 Method and device for recognizing operation command based on different operation systems
TWI658401B (en) * 2017-11-14 2019-05-01 財團法人工業技術研究院 Mobile communication device based on virtual mobile infrastructure and related input method switching methods thereof
CN108536480B (en) * 2017-12-28 2021-05-28 Oppo广东移动通信有限公司 Input method configuration method and related product
CN113282181B (en) * 2021-05-21 2024-04-05 南京市德赛西威汽车电子有限公司 Method for supporting double-input method in vehicle-mounted entertainment system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150193904A1 (en) * 2012-10-24 2015-07-09 OpenMobile World Wide, Inc. Graphics acceleration for applications executing on mobile devices with multi-operating system environment
CN104142851A (en) * 2014-08-04 2014-11-12 福州靠谱网络有限公司 Method for using computer input method in android simulator
CN104740872A (en) * 2015-04-13 2015-07-01 北京奇虎科技有限公司 Method and device for operating and controlling game program in simulated Android environment
CN113741708A (en) * 2020-05-31 2021-12-03 华为技术有限公司 Input method and electronic equipment
CN112882675A (en) * 2021-03-29 2021-06-01 努比亚技术有限公司 Screen-casting character input method and device and computer readable storage medium
CN113918227A (en) * 2021-09-10 2022-01-11 北京鲸鲮信息系统技术有限公司 Input method setting method and device, input method and electronic equipment

Also Published As

Publication number Publication date
CN113918227A (en) 2022-01-11

Similar Documents

Publication Publication Date Title
WO2023035758A1 (en) Input method setting method and apparatus, input method, and electronic device
US11622010B2 (en) Virtualizing device management services on a multi-session platform
US11301280B2 (en) System and method for managing a monitoring agent in an operating system of a virtual computing instance
CN113452830B (en) Batch control method of android cloud mobile phone, computer readable medium and electronic device
US20180123968A1 (en) Method and system for securely transmitting volumes into cloud
WO2016112825A1 (en) Remote control method, terminal device, management server, and remote control system
US20130254759A1 (en) Installing an operating system in a host system
EP3117314B1 (en) Method and system for securely transmitting volumes into cloud
CN103984575A (en) Rapid deployment method of cluster Linux operation system in cloud-computing environment
US20190171443A1 (en) Method of Updating Application and Recording Medium
US11418566B2 (en) Adding and removing virtual disks remotely to a streaming machine
CN108667779B (en) Method and server for remotely logging in container
US11165888B1 (en) Image acquisition device virtualization for remote computing
US11252051B2 (en) Method, device and computer program product for configuring service instance
US11875174B2 (en) Method and apparatus for virtual machine emulator upgrading virtualization emulator
US20120233628A1 (en) Out-of-band host management via a management controller
US20170329739A1 (en) Methods and systems for loading a boot agent on a router network device
WO2012142838A1 (en) Resource sharing system, mobile terminal and resource sharing method
WO2021113110A1 (en) Network function virtualization compute element image upgrade
WO2019201248A1 (en) Re-bootstrap method and device in lightweight machine to machine system
CN114115917A (en) Operating system installation method and device
EP3193253B1 (en) Method, apparatus and system for displaying names of virtual machine
CN107861761B (en) Starting method and system of physical host
CN116339761B (en) Method, system, storage medium and equipment for automatically constructing mirror image template
US20230325203A1 (en) Provisioning dpu management operating systems using host and dpu boot coordination

Legal Events

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

Ref document number: 22866233

Country of ref document: EP

Kind code of ref document: A1