Input method starting method, device and electronic equipment

By adding components to the target application layout file of small electronic devices and using component attribute parameters to launch the input method, the problems of cumbersome operating system switching and high power consumption are solved, achieving the effect of simplifying input method launch and saving power.

CN116149488BActive Publication Date: 2026-04-21VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
VIVO MOBILE COMM CO LTD
Filing Date
2023-01-30
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Current methods for inputting information on small electronic devices involve cumbersome operating system switching and consume a lot of power, which reduces the user experience.

Method used

Add a first component to the layout file of the target application to receive input and launch the input method application through the component. Obtain and pass component attribute parameters to start the input method function, simplify the input method launch steps and save power.

Benefits of technology

It simplifies the input method startup process, saves system power consumption, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116149488B_ABST
    Figure CN116149488B_ABST
Patent Text Reader

Abstract

The application discloses an input method starting method, a terminal device and an electronic device, and belongs to the field of communication. The method comprises the following steps: adding a first component in a layout file of a target application, wherein the first component is a component in a system where the target application is located; receiving a first input for the target application; starting an input method application program through the first component in response to the first input; obtaining a first attribute parameter of the first component and delivering the first attribute parameter to the input method application program, so as to start an input method function in an application interface of the target application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communications, specifically relating to an input method activation method, device, and electronic device. Background Technology

[0002] With the continuous development of technology, small electronic devices, such as wearable devices, are becoming increasingly popular. These devices are not only portable and easy to use, but also suitable for a wide range of users. While enjoying the convenience of using small electronic devices for social interaction, communication, and entertainment, people are also placing higher demands on their information input functions.

[0003] In existing technologies, small electronic devices, such as wearable devices, input information by installing two operating systems: a stronger one and a weaker one. When the user inputs information, the stronger operating system is activated; after input is complete, the system switches to the weaker one. This existing technology suffers from cumbersome operating system switching, high power consumption, and a reduced user experience. Summary of the Invention

[0004] The purpose of this application is to provide an input method startup method, terminal device, and electronic device that can solve the problem of cumbersome input method startup steps in the prior art.

[0005] In a first aspect, embodiments of this application provide an input method activation method, the method comprising:

[0006] Add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application resides;

[0007] Receive the first input for the target application;

[0008] In response to the first input, the input method application is launched via the first component;

[0009] The first attribute parameter of the first component is obtained and passed to the input method application to start the input method function in the application interface of the target application.

[0010] Furthermore, after adding the first component to the layout file of the target application and before receiving the first input for the target application, the method further includes:

[0011] Configure the first property for the first component;

[0012] The step of obtaining the first attribute of the first component and passing it to the input method application to activate the input function includes:

[0013] Get the first attribute;

[0014] The first attribute is passed to the input method application for parsing and to activate the input method function of the input method type corresponding to the first attribute.

[0015] Furthermore, after adding the first component to the layout file of the target application and before receiving the first input for the target application, the method further includes:

[0016] Configure the second attribute parameter for the first component;

[0017] Register the first callback function using the second attribute parameter;

[0018] After obtaining the first attribute parameter of the first component and passing it to the input method application to activate the input method function in the application interface of the target application, the method further includes:

[0019] The input method interface is displayed in the application interface;

[0020] Receive a second input to the input method interface;

[0021] In response to the second input, the input content corresponding to the second input is obtained through the first callback function;

[0022] The input content is sent back to the target application to be displayed on the input method interface.

[0023] Furthermore, after adding the first component to the layout file of the target application and before receiving the first input for the target application, the method further includes:

[0024] Write an input method interface into the system where the target application resides;

[0025] Before sending the input content back to the target application, the method further includes:

[0026] The input content is passed from the input method application to the first component that calls the input method application through the input method interface, and the input method application is then closed.

[0027] Furthermore, prior to receiving the first input, the method further includes:

[0028] Add a second component to the layout file of the target application. The second component is a component in the system where the target application resides.

[0029] Before launching the input method application via the first component after responding to the first input, the method further includes:

[0030] The first component is invoked through the second component.

[0031] Furthermore, calling the first component through the second component includes:

[0032] Get the third attribute parameter of the second component;

[0033] The second callback function, registered through the third attribute parameter, calls the first component based on the component ID of the second component.

[0034] Furthermore, after adding the first component to the layout file for the target application, the method further includes:

[0035] Configure a fourth attribute parameter for the first component, the fourth attribute parameter being used to hide the first component.

[0036] Secondly, embodiments of this application provide an input method activation device, characterized in that it includes:

[0037] The first component adding module is used to add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0038] The instruction receiving module is used to receive the first input for the target application;

[0039] An input method startup module is used to launch an input method application through the first component in response to the first input.

[0040] An input function activation module is used to obtain the first attribute parameter of the first component and pass it to the input method application to activate the input method function in the application interface of the target application.

[0041] Furthermore, the device also includes:

[0042] The first attribute configuration module is used to configure the first attribute for the first component;

[0043] The input function activation module includes:

[0044] The first attribute acquisition submodule is used to acquire the first attribute;

[0045] The input method type parsing submodule is used to pass the first attribute to the input method application for parsing and to start the input method function of the input method type corresponding to the first attribute.

[0046] Furthermore, the device also includes:

[0047] The second attribute configuration module is used to configure second attribute parameters for the first component;

[0048] The first callback function registration module is used to register the first callback function through the second attribute parameter;

[0049] Content data return module, the content data return module is used for:

[0050] The input method interface is displayed in the application interface;

[0051] Receive a second input to the input method interface;

[0052] In response to the second input, the input content corresponding to the second input is obtained through the first callback function;

[0053] The input content is sent back to the target application to be displayed on the input method interface.

[0054] Furthermore, the device also includes:

[0055] An input method interface writing module is used to write the input method interface into the system where the target application resides.

[0056] An input content transmission module is used to transmit the input content from the input method application to a first component that calls the input method application through the input method interface, and then close the input method application.

[0057] Furthermore, the device also includes:

[0058] The second component adding module is used to add a second component to the layout file of the target application, wherein the second component is a component in the system where the target application is located;

[0059] The calling module is used to call the first component through the second component.

[0060] Furthermore, the calling module is specifically used for:

[0061] Get the third attribute parameter of the second component;

[0062] The second callback function, registered through the third attribute parameter, calls the first component based on the component ID of the second component.

[0063] Furthermore, the device also includes:

[0064] The first component hiding module is used to configure a fourth attribute parameter for the first component, and the fourth attribute parameter is used to hide the first component.

[0065] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.

[0066] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0067] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.

[0068] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.

[0069] In this embodiment, a first component is added to the layout file of the target application. This first component is a component within the system where the target application resides. A first input is received for the target application. In response to the first input, an input method application is launched via the first component. A first attribute parameter of the first component is obtained and passed to the input method application to launch the input method function within the application interface of the target application. This input method launch method avoids the problems of cumbersome operating system switching and high power consumption in existing technologies. By obtaining the first parameter of the first component in the system where the target application resides to determine the preset input method type and passing the first parameter to the input method to launch the input function, the input method launch steps are simplified, system power consumption is saved, and the user experience is improved. Attached Figure Description

[0070] Figure 1 This is a flowchart illustrating the input method startup method provided in an embodiment of this application;

[0071] Figure 2 This is a flowchart illustrating the input method startup method provided in an embodiment of this application;

[0072] Figure 3 This is a flowchart illustrating the input method startup method provided in an embodiment of this application;

[0073] Figure 4 This is a flowchart illustrating the input method startup method provided in an embodiment of this application;

[0074] Figure 5This is a flowchart illustrating the input method startup method provided in an embodiment of this application;

[0075] Figure 6 This is a flowchart illustrating the input method startup method provided in an embodiment of this application;

[0076] Figure 7 This is a flowchart illustrating the input method startup method provided in an embodiment of this application;

[0077] Figure 8 This is a schematic diagram of the input method activation device provided in the embodiments of this application;

[0078] Figure 9 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0079] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0080] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0081] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0082] The following description, in conjunction with the accompanying drawings, details an input method activation method provided in this application through specific embodiments and application scenarios.

[0083] Figure 1 This is a flowchart illustrating the input method startup method provided in an embodiment of this application. Figure 1 As shown, the specific steps include the following:

[0084] S101, add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0085] First, this solution can be used in scenarios where an input method needs to be activated on a wearable device, such as when using a watch to access third-party applications (such as communication or social applications) and needing to input text into those applications.

[0086] Based on the above usage scenarios, it can be understood that the executing entity of this application may be a wearable device capable of activating the input method and receiving, parsing, and transmitting input data, or a control system on the wearable device.

[0087] In this solution, the target application can be one or more software applications that the user needs, are installed in the wearable device system, and can be displayed on the wearable device's screen, such as WeChat, Weibo, and browser apps. The layout file can be a file that organizes and lays out the data on the target application's display interface. Specifically, the layout file is a document file that can contain text and image data, as well as information on how to format the data. The formatting can include page size, margins, content organization, object padding, grids, templates, etc. The first component can be a component running in the system where the target application resides. Specifically, it can be a component used to provide text input functionality, activate the input method, receive callback data, and upload the callback data to a third-party application, such as a system input component. Based on the type of the target application and the system attribute parameters of the target application, the first component application is written into the target application's layout file through encoding.

[0088] S102, Receive the first input for the target application;

[0089] In this solution, the first input can be an instruction to operate on a component of the system containing the target application on the wearable device, such as clicking the search box or text input box of the target application. The control system of the user's wearable device can receive the first input for the target application by acquiring focus.

[0090] S103, in response to the first input, the input method application is launched through the first component;

[0091] In this solution, the input method application can be a program capable of calling the input method for user use. Specifically, the input method application can be launched through the first component after receiving the first input. The input method can be used to search for and confirm specific characters and symbols in the input content. Specifically, the working principle of the input method can be as follows: the input information is first sent to the input method manager (front end), the input method manager calls the input method's conversion function (input method engine), the input method's conversion function obtains the keystroke messages and saves them in its own array, when the specified conditions are met (such as Wubi input method input: four keys, two keys + space, etc.), the input method returns the appropriate characters or words to the input method manager, and the input method manager then passes the result characters or words to the associated application window. The input method is essentially a table lookup operation; the input information is keyboard information, and the corresponding Chinese characters are looked up in the table based on the input information.

[0092] S104, obtain the first attribute parameter of the first component and pass it to the input method application to start the input method function in the application interface of the target application.

[0093] In this solution, the first attribute parameter can be a parameter used to specify the input method. Specifically, it can be a parameter of the input method that the user has pre-set for the target application and stored in the first component. When the first component starts the input method program, this parameter is called first to provide the user with a text input method. The input method can be voice input, keyboard input, handwriting input, etc., without further limitation. The first attribute parameter stored in the first component is obtained through encoding and passed to the startup code of the input method application, thereby activating the input method function in the application interface of the target application.

[0094] The technical solution provided in this application adds a first component to the layout file of the target application. This first component is a component within the system where the target application resides. It receives a first input for the target application; responds to the first input by launching an input method application through the first component; and obtains a first attribute parameter of the first component and passes it to the input method application to launch the input method function within the application interface of the target application. This input method launch method avoids the problems of cumbersome operating system switching and high power consumption in existing technologies. By obtaining the first parameter of the first component in the system where the target application resides to determine the preset input method type and passing the first parameter to the input method to launch the input function, the launch steps are simplified, system power consumption is saved, and the user experience is improved.

[0095] Figure 2 This is a flowchart illustrating the input method startup method provided in an embodiment of this application. Figure 2 As shown, the specific steps include the following:

[0096] S201, Add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0097] S202, Configure the first attribute for the first component;

[0098] In this solution, the first attribute can be an attribute of the text input method configured for the first component. Taking the system input component as an example, configuring the first attribute for the first component can be achieved through the following code:

[0099] <input

[0100] type="speak"

[0101] onchange="textChange"

[0102] / >

[0103] Among them, "type" is the input method type attribute, which is used to provide the user with the input method, i.e., the first attribute; onchange is the attribute for registering a callback function, which is used to send the input data back to the target application.

[0104] Based on their text input needs or habits, when using the first component of the target application for the first time, users select the "type" option on the target application interface. The control system on the wearable device stores this type as the first attribute in the target application where the first component is located.

[0105] S203, Receive the first input for the target application;

[0106] S204, in response to the first input, the input method application is launched through the first component;

[0107] S205, Obtain the first attribute;

[0108] In this solution, the first attribute pre-configured for the first component can be obtained through the configuration code described above. For example, if the type in the configuration code is "speak", then the first attribute is "speak".

[0109] S206, the first attribute is passed to the input method application for parsing and to start the input method function of the input method type corresponding to the first attribute.

[0110] In this solution, after obtaining the first attribute, it is passed to the input method application for parsing, thereby activating the input method function corresponding to the first attribute. For example, if the obtained first attribute is "speak", the control system on the wearable device passes the "speak" attribute to the input method application. The input method application parses the first attribute and finds that the input method type corresponding to the first input method is "voice input", and then displays the voice input method on the target application interface.

[0111] The technical solution provided in this application embodiment, by pre-configuring a first attribute for the first component, and after launching the input method application through the first component, obtaining the first attribute, and passing the first attribute to the input method application for parsing, can improve the efficiency and accuracy of input method launch and enhance the user experience.

[0112] Figure 3 This is a flowchart illustrating the input method startup method provided in an embodiment of this application. Figure 3 As shown, the specific steps include the following:

[0113] S301, Add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0114] S302, Configure the second attribute parameter for the first component;

[0115] S303, Register the first callback function through the second attribute parameter;

[0116] In this solution, the second attribute parameter can be a parameter used to determine the type of callback function. Specifically, the callback function type can be a way of calling back a function. The first callback function can be a function registered through the second attribute parameter, used to call back user input data so that the target application can read the user input data. Taking the input component as an example, the configuration method for configuring the second attribute parameter for the first component can be implemented through the following code:

[0117] <input

[0118] type="speak"

[0119] onchange="textChange"

[0120] / >

[0121] Among them, "type" is the input method type attribute, which is used to provide the user with an input method, i.e., the first attribute; onchange is the attribute for registering a callback function, which is used to send the input data back to the target application, i.e., the second attribute parameter.

[0122] The code above allows us to obtain the parameter type of the second attribute parameter pre-configured for the first component, i.e., the first callback function type is "textChange", and then register the first callback function through the second attribute parameter.

[0123] S304, Receive the first input for the target application;

[0124] S305, in response to the first input, the input method application is launched through the first component;

[0125] S306, Obtain the first attribute parameter of the first component and pass it to the input method application to start the input method function in the application interface of the target application.

[0126] S307, The input method interface is displayed in the application interface;

[0127] In this solution, the input method interface can be an input method interface for users to input text and voice, a keyboard input method interface including punctuation, symbols, and letters, or a voice input method interface including a voice input box, etc., without further limitations. After activating the input method function, the input method interface can be displayed in the application interface for users to use the input function.

[0128] S308, Receive a second input for the input method interface;

[0129] In this solution, the second input can be data entered by the user in the first component system of the application interface. Specifically, the second input can be text, numbers, symbols, or other content or data that the user needs to query, send, or transmit. After the input method interface is displayed in the application interface, the second input from the user is received regarding the input method interface.

[0130] S309, in response to the second input, obtain the input content corresponding to the second input through the first callback function;

[0131] In this solution, after receiving the second input for the input method interface, the second input is sent back to the first component according to the system characteristics of the target application's system. The input content corresponding to the second input is then obtained through the first callback function and displayed on the interface of the first system component. Specifically, obtaining the input content corresponding to the second input through the first callback function can be implemented using the following code:

[0132] textChange(data){

[0133] console.log('data value is'+data.value)

[0134] }

[0135] Here, textChange is the first callback function registered through the second attribute parameter, and the target application reads the content and data of the second input through the data.value parameter.

[0136] S310, the input content is sent back to the target application to display the input content on the input method interface.

[0137] In this solution, after obtaining the input content corresponding to the second input, the first component sends the input content back to the target application to display the input content on the input method interface. Specifically, the input method may bind to the first system component through system features, returning the received second input to the first system component through system features. The first system component obtains the input content corresponding to the second input through the first callback function and sends the input content back to the application, allowing the application to perform functions such as sending, querying, and displaying the input content.

[0138] The technical solution provided in this application embodiment configures a second attribute parameter for the first component; registers a first callback function through the second attribute parameter; displays an input method interface on the application interface; receives a second input for the input method interface; in response to the second input, obtains the input content corresponding to the second input through the first callback function; and sends the input content back to the target application to display the input content on the input method interface. This improves the efficiency and reliability of the target application in obtaining the second input content, thereby improving the accuracy of the target application in processing the input content.

[0139] Figure 4 This is a flowchart illustrating the input method startup method provided in an embodiment of this application. Figure 4 As shown, the specific steps include the following:

[0140] S401, add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0141] S402, Configure the second attribute parameter for the first component;

[0142] S403, Register the first callback function through the second attribute parameter;

[0143] S404, Write the input method interface into the system where the target application is located;

[0144] In this solution, the input method interface can be a data return interface used to bind the input method program to the first component, thereby transmitting the input content of the second input from the input method program back to the first component. Based on the function of the target application, the supported input method types, and the attribute parameters of the system where the target application resides, the type of the input method interface is determined, and the input method interface is written into the system where the target application resides through encoding.

[0145] S405, Receive the first input for the target application;

[0146] S406, in response to the first input, the input method application is launched through the first component;

[0147] S407, obtain the first attribute parameter of the first component and pass it to the input method application to start the input method function in the application interface of the target application.

[0148] S408, The input method interface is displayed in the application interface;

[0149] S409, Receive a second input to the input method interface;

[0150] S410, in response to the second input, obtain the input content corresponding to the second input through the first callback function;

[0151] S411, the input content is transferred from the input method application to the first component that calls the input method application through the input method interface, and the input method application is closed;

[0152] In this solution, the input content of the second input received can be returned from the input method application to the first component that calls the input method application through the input method interface. Specifically, the return of the input content can be implemented through the following code:

[0153] inputmethod.setInput({

[0154] value:"hello vivo watch'

[0155] })

[0156] Wherein, inputmethod is the input method interface written to the system where the target application is located.

[0157] S412, the input content is sent back to the target application to display the input content on the input method interface.

[0158] The technical solution provided in this application embodiment involves writing an input method interface into the system where the target application resides. This allows the first component to obtain the input content of the second input and then send the input content back to the target application, thereby improving the efficiency of the target application in obtaining the input content. At the same time, by passing the input content from the input method application to the first component that calls the input method application through the input method interface and closing the input method application, the input method application can be prevented from being continuously running, reducing the power consumption of the wearable device and improving the battery life of the wearable device.

[0159] Figure 5 This is a flowchart illustrating the input method startup method provided in an embodiment of this application. Figure 5 As shown, the specific steps include the following:

[0160] S501, Add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0161] S502, add a second component to the layout file of the target application, wherein the second component is a component in the system where the target application is located;

[0162] In this solution, the second component can be a component displayed on the target application interface for receiving user operation instructions, such as a text component. The operation instructions can be click operations on text, images, and links displayed on the target application interface, thereby achieving operations such as querying, viewing, and logging in. Based on the function and type of the target application and the attributes of the system where the target component resides, the second component is added to the layout file of the target application through encoding.

[0163] S503 receives the first input for the target application;

[0164] S504, responding to the first input;

[0165] S505, the first component is called through the second component;

[0166] In this solution, the method of calling the first component through the second component in the target application can be achieved by obtaining the corresponding first component through the type, function, and attribute parameters of the second component. The specific content and implementation process of the first component, the input method being launched based on the first component, and the first attribute parameters of the first component being obtained and passed to the input method to start the input function are similar to those in Embodiment 1 of this application, and will not be described in detail here.

[0167] S506, The input method application is launched through the first component;

[0168] S507, obtain the first attribute parameter of the first component and pass it to the input method application to start the input method function in the application interface of the target application.

[0169] The technical solution provided in this application adds a second component to the layout file of the target application. The second component is a component in the system where the target application is located. It can obtain operation instructions by using different system components and call the first component through the second component, thereby optimizing the layout design of the target application. At the same time, it can start the corresponding input method according to different operation instructions, thereby improving the applicability of the system input method.

[0170] Figure 6 This is a flowchart illustrating the input method startup method provided in an embodiment of this application. Figure 6 As shown, the specific steps include the following:

[0171] S601, Add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0172] S602, add a second component to the layout file of the target application, wherein the second component is a component in the system where the target application is located;

[0173] S603, receives the first input for the target application;

[0174] S604, in response to the first input;

[0175] S605, obtain the third attribute parameter of the second component;

[0176] In this scheme, the third attribute parameter can be an attribute parameter used to register the second callback function of the second component, and the second callback function can be a function used to find and call the first system component. Specifically, the parameter type of the third attribute parameter can be determined by the following code:

[0177] <input

[0178] id="inputId"

[0179] type="text"

[0180] onchange="textChange"

[0181] show="false"

[0182] / >

[0183] The third attribute parameter can be obtained using the following code:

[0184] textChange(data){

[0185] console.log('data value is'+data.value)

[0186] }

[0187] S606, the second callback function registered through the third attribute parameter calls the first component based on the component ID of the second component;

[0188] In this scheme, the second callback function can be a function used to find and call the first system component. Specifically, in response to an operation instruction on the second component, the target application system calls the second callback function and obtains the first component through the component ID of the second component. Specifically, obtaining the first component through the component ID of the second component can be achieved by pre-setting a mapping table between the second component ID and the first component, storing it in the system where the target application resides, and after obtaining the component ID of the second component, retrieving the first component corresponding to the second component ID through the mapping table. The registration process of the second callback function can be implemented using the following code:

[0189] btnClick(){

[0190] Enclosing$element("inputId").focus()

[0191] }

[0192] In this solution, the second component can receive user operation commands by registering a click event for the second system component. Specifically, this can be done using the following code:

[0193] <text

[0194] onclick = "btnClick"

[0195] >

[0196] In this solution, after obtaining the first component through the second component, the first component is used to receive user input and start the input method. The specific process is similar to that in Embodiment 1 of this application, and will not be repeated here.

[0197] S607, The input method application is launched through the first component;

[0198] S608, obtain the first attribute parameter of the first component and pass it to the input method application to start the input method function in the application interface of the target application.

[0199] The technical solution provided in this application embodiment obtains the third attribute parameter of the second component and calls the first component based on the component ID of the second component through the second callback function registered by the third attribute parameter to start the input method. It can start the corresponding input method according to different click operation instructions, which simplifies the steps of starting the input method and improves the adaptability of the input method.

[0200] Figure 7 This is a flowchart illustrating the input method startup method provided in an embodiment of this application. Figure 7 As shown, the specific steps include the following:

[0201] S701, Add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0202] S702, Configure a fourth attribute parameter for the first component, the fourth attribute parameter being used to hide the first component;

[0203] In this solution, the fourth attribute parameter can be pre-set and used to determine whether the first component is displayed in the application interface, such as a "show" attribute parameter. The fourth attribute parameter is configured for the first component according to user needs. When the fourth attribute parameter is a preset value, the first system component is hidden. Specifically, this can be implemented using the following code:

[0204] <input

[0205] id="inputId"

[0206] type="text"

[0207] onchange="textChange"

[0208] show="false"

[0209] / >

[0210] S703 receives a first input for the target application;

[0211] S704, in response to the first input, the input method application is launched through the first component;

[0212] S705, obtain the first attribute parameter of the first component and pass it to the input method application to start the input method function in the application interface of the target application.

[0213] The technical solution provided in this application embodiment can reduce the system component's occupation of the application interface by pre-configuring a fourth attribute parameter for the first system component and hiding the first system component when the fourth attribute parameter is a preset value. This can optimize the application interface layout according to user needs and improve the user experience.

[0214] The input method startup method provided in this application can be executed by an input method startup device. This application uses an input method startup device executing the input method startup method as an example to illustrate the input method startup device provided in this application.

[0215] Figure 8 This is a schematic diagram of the structure of the input method activation device provided in the embodiments of this application. Figure 8 As shown, it specifically includes the following:

[0216] The first component adding module 801 is used to add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0217] Instruction receiving module 802 is used to receive the first input for the target application;

[0218] The input method startup module 803 is used to launch the input method application through the first component in response to the first input;

[0219] The input function activation module 804 is used to obtain the first attribute parameter of the first component and pass it to the input method application to activate the input method function in the application interface of the target application.

[0220] Furthermore, the device also includes:

[0221] The first attribute configuration module is used to configure the first attribute for the first component;

[0222] The input function activation module includes:

[0223] The first attribute acquisition submodule is used to acquire the first attribute;

[0224] The input method type parsing submodule is used to pass the first attribute to the input method application for parsing and to start the input method function of the input method type corresponding to the first attribute.

[0225] Furthermore, the device also includes:

[0226] The second attribute configuration module is used to configure second attribute parameters for the first component;

[0227] The first callback function registration module is used to register the first callback function through the second attribute parameter;

[0228] Content data return module, the content data return module is used for:

[0229] The input method interface is displayed in the application interface;

[0230] Receive a second input to the input method interface;

[0231] In response to the second input, the input content corresponding to the second input is obtained through the first callback function;

[0232] The input content is sent back to the target application to be displayed on the input method interface.

[0233] Furthermore, the device also includes:

[0234] An input method interface writing module is used to write the input method interface into the system where the target application resides.

[0235] An input content transmission module is used to transmit the input content from the input method application to a first component that calls the input method application through the input method interface, and then close the input method application.

[0236] Furthermore, the device also includes:

[0237] The second component adding module is used to add a second component to the layout file of the target application, wherein the second component is a component in the system where the target application is located;

[0238] The calling module is used to call the first component through the second component.

[0239] Furthermore, the calling module is specifically used for:

[0240] Get the third attribute parameter of the second component;

[0241] The second callback function, registered through the third attribute parameter, calls the first component based on the component ID of the second component.

[0242] Furthermore, the device also includes:

[0243] The first component hiding module is used to configure a fourth attribute parameter for the first component, and the fourth attribute parameter is used to hide the first component.

[0244] The technical solution provided in this application includes a first component adding module, used to add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application resides; an instruction receiving module, used to receive a first input for the target application; an input method launching module, used to launch an input method application through the first component in response to the first input; and an input function launching module, used to obtain a first attribute parameter of the first component and pass it to the input method application to launch the input method function in the application interface of the target application. Through the above-described input method launching device, the problems of cumbersome operating system switching and high power consumption in the prior art can be avoided. By obtaining the first parameter of the first component in the system where the target application resides to determine the preset input method type and passing the first parameter to the input method to launch the input function, the input method launching steps can be simplified, system power consumption can be saved, and the user experience can be improved.

[0245] The input method activation device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the specific device.

[0246] The input method launch device in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit the specific operating system used.

[0247] The input method activation device provided in this application embodiment can achieve... Figures 1 to 7 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0248] Optionally, such as Figure 9 As shown, this application embodiment also provides an electronic device 900, including a processor 901 and a memory 902. The memory 902 stores a program or instructions that can run on the processor 901. When the program or instructions are executed by the processor 901, they implement the various steps of the above-described input method startup method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0249] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0250] Figure 10 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0251] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.

[0252] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0253] The input unit 1004 is used to add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located;

[0254] Display unit 1006 is used to receive a first input for a target application;

[0255] Processor 1010 is configured to launch an input method application via the first component in response to the first input;

[0256] The first attribute parameter of the first component is obtained and passed to the input method application to start the input method function in the application interface of the target application.

[0257] This solution avoids the problems of cumbersome operating system switching and high power consumption in the prior art by using the above-mentioned input method startup method. By obtaining the first parameter of the first component in the system where the target application is located to determine the preset input method type, and passing the first parameter to the input method to start the input function, the startup steps of the input method can be simplified, system power consumption can be saved, and the user experience can be improved.

[0258] Optionally, the input unit 1004 is further configured to configure a first attribute for the first component;

[0259] The processor 1010 is also used to obtain the first attribute;

[0260] The first attribute is passed to the input method application for parsing and to activate the input method function of the input method type corresponding to the first attribute.

[0261] This solution improves the efficiency and accuracy of input method startup and enhances user experience by pre-configuring a first attribute for the first component, obtaining the first attribute after launching the input method application through the first component, and passing the first attribute to the input method application for parsing and launching the input method function corresponding to the first attribute.

[0262] Optionally, the input unit 1004 is further configured to configure a second attribute parameter for the first component;

[0263] The processor 1010 is also used to register a first callback function through the second attribute parameter;

[0264] Display unit 1006 is used to display the input method interface in the application interface;

[0265] Display unit 1006 is used to receive a second input to the input method interface;

[0266] The processor 1010 is also configured to, in response to the second input, obtain the input content corresponding to the second input through the first callback function;

[0267] The input content is sent back to the target application to be displayed on the input method interface.

[0268] This solution improves the efficiency and reliability of the target application in acquiring the second input content, thereby improving the accuracy of the target application in processing the input content.

[0269] Optionally, the input unit 1004 is also used to write an input method interface into the system where the target application is located;

[0270] The processor 1010 is also configured to pass the input content from the input method application to a first component that calls the input method application via the input method interface, and to close the input method application.

[0271] This solution uses the input method interface to transfer the input content from the input method application to the first component that calls the input method application, and then closes the input method application. This avoids the input method application being continuously running, reduces power consumption of the wearable device, and improves the battery life of the wearable device.

[0272] Optionally, the input unit 1004 is further configured to add a second component to the layout file of the target application, wherein the second component is a component in the system where the target application resides;

[0273] The processor 1010 is also used to call the first component through the second component.

[0274] This solution optimizes the layout design of the target application by calling the first component through the second component, and at the same time, it activates the corresponding input method according to different operation commands, thereby improving the applicability of the system input method.

[0275] Optionally, the processor 1010 is also configured to obtain a third attribute parameter of the second component;

[0276] The second callback function, registered through the third attribute parameter, calls the first component based on the component ID of the second component.

[0277] This solution obtains the third attribute parameter of the second component and calls the first component based on the component ID of the second component through the second callback function registered with the third attribute parameter to start the input method. It can start the corresponding input method according to different click operation instructions, which simplifies the input method startup steps and improves the adaptability of the input method.

[0278] Optionally, the input unit 1004 is further configured to configure a fourth attribute parameter for the first component, the fourth attribute parameter being used to hide the first component.

[0279] This solution reduces the system component's footprint on the application interface by pre-configuring a fourth attribute parameter for the first system component and hiding the first system component when the fourth attribute parameter is a preset value. This optimizes the application interface layout according to user needs and improves the user experience.

[0280] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.

[0281] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0282] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.

[0283] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described input method startup method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0284] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0285] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described input method startup method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0286] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0287] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described input method startup method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0288] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0289] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0290] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. An input method starting method, characterized in that, The method includes: Add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application resides; Add a second component to the layout file of the target application. The second component is a component in the system where the target application resides. Receive the first input for the target application; In response to the first input, the third attribute parameter of the second component is obtained, a second callback function is registered based on the third attribute parameter, and the first component is called based on the second callback function and the component ID of the second component; The input method application is launched via the first component; The first attribute parameter of the first component is obtained and passed to the input method application to start the input method function in the application interface of the target application.

2. The method of claim 1, wherein, After adding the first component to the layout file of the target application and before receiving the first input for the target application, the method further includes: Configure the first property for the first component; The step of obtaining the first attribute parameter of the first component and passing it to the input method application to start the input method function in the application interface of the target application includes: Get the first attribute; The first attribute is passed to the input method application for parsing and to activate the input method function of the input method type corresponding to the first attribute.

3. The method of claim 1, wherein, After adding the first component to the layout file of the target application and before receiving the first input for the target application, the method further includes: Configure the second attribute parameter for the first component; Register the first callback function using the second attribute parameter; After obtaining the first attribute parameter of the first component and passing it to the input method application to activate the input method function in the application interface of the target application, the method further includes: The input method interface is displayed in the application interface; Receive a second input to the input method interface; In response to the second input, the input content corresponding to the second input is obtained through the first callback function; The input content is sent back to the target application to be displayed on the input method interface.

4. The method of claim 3, wherein, After adding the first component to the layout file of the target application and before receiving the first input for the target application, the method further includes: Write an input method interface into the system where the target application resides; Before sending the input content back to the target application, the method further includes: The input content is passed from the input method application to the first component that calls the input method application through the input method interface, and the input method application is then closed.

5. The method of claim 1, wherein, After adding the first component to the layout file of the target application, the method further includes: Configure a fourth attribute parameter for the first component, the fourth attribute parameter being used to hide the first component.

6. An input method starting apparatus characterized by comprising: include: The first component adding module is used to add a first component to the layout file of the target application, wherein the first component is a component in the system where the target application is located; The second component adding module is used to add a second component to the layout file of the target application, wherein the second component is a component in the system where the target application is located; The instruction receiving module is used to receive the first input for the target application; The calling module is used to respond to the first input, obtain the third attribute parameter of the second component, register a second callback function based on the third attribute parameter, and call the first component based on the second callback function and the component ID of the second component; An input method startup module is used to launch an input method application through the first component; An input function activation module is used to obtain the first attribute parameter of the first component and pass it to the input method application to activate the input method function in the application interface of the target application.

7. The apparatus of claim 6, wherein, The device further includes: The first attribute configuration module is used to configure the first attribute for the first component; The input function activation module includes: The first attribute acquisition submodule is used to acquire the first attribute; The input method type parsing submodule is used to pass the first attribute to the input method application for parsing and to start the input method function of the input method type corresponding to the first attribute.

8. The apparatus of claim 6, wherein, The device further includes: The second attribute configuration module is used to configure second attribute parameters for the first component; The first callback function registration module is used to register the first callback function through the second attribute parameter; Content data return module, the content data return module is used for: The input method interface is displayed in the application interface; Receive a second input to the input method interface; In response to the second input, the input content corresponding to the second input is obtained through the first callback function; The input content is sent back to the target application to be displayed on the input method interface.

9. The apparatus of claim 8, wherein, The device further includes: An input method interface writing module is used to write the input method interface into the system where the target application resides. An input content transmission module is used to transmit the input content from the input method application to a first component that calls the input method application through the input method interface, and then close the input method application.

10. The apparatus of claim 6, wherein, The device further includes: The first component hiding module is used to configure a fourth attribute parameter for the first component, and the fourth attribute parameter is used to hide the first component.

11. An electronic device, comprising: It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the input method activation method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Information input method and device, electronic equipment and computer readable storage medium

    CN114647450A