WO2022095885A1 - 应用程序切换处理方法、装置和电子设备 - Google Patents

应用程序切换处理方法、装置和电子设备 Download PDF

Info

Publication number
WO2022095885A1
WO2022095885A1 PCT/CN2021/128355 CN2021128355W WO2022095885A1 WO 2022095885 A1 WO2022095885 A1 WO 2022095885A1 CN 2021128355 W CN2021128355 W CN 2021128355W WO 2022095885 A1 WO2022095885 A1 WO 2022095885A1
Authority
WO
WIPO (PCT)
Prior art keywords
input
application
interface
target
content
Prior art date
Application number
PCT/CN2021/128355
Other languages
English (en)
French (fr)
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 WO2022095885A1 publication Critical patent/WO2022095885A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/017Gesture based interaction, e.g. based on a set of recognized hand gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • 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/461Saving or restoring of program or task context

Definitions

  • the present application belongs to the field of communication technologies, and in particular relates to a method, apparatus and electronic device for switching application programs.
  • the purpose of the embodiments of the present application is to provide an application switching processing method, apparatus and electronic device, which can solve the problem of poor convenience of input method character input caused by application switching.
  • an embodiment of the present application provides an application switching processing method, which includes:
  • the target input content exists in the first input interface of the target input method, save the input state information of the first input interface and the target input content; wherein the first input The interface is associated with the first application, and the input state information includes the state of the input keyboard and/or the word selection candidate box corresponding to the target input content.
  • an embodiment of the present application provides a device for application switching processing, including:
  • a first receiving module configured to receive the first input of the first application switching from foreground running to background running;
  • a saving module configured to, in response to the first input, save the input state information of the first input interface and the target input content when the target input content exists on the first input interface of the target input method
  • the first input interface is associated with the first application program, and the input state information includes the state of the input keyboard and/or the word selection candidate box corresponding to the target input content.
  • embodiments of the present application provide an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor, the program or instruction being The processor implements the steps of the method according to the first aspect when executed.
  • an embodiment of the present application provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or instruction is executed by a processor, the steps of the method according to the first aspect are implemented .
  • an embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction, and implement the first aspect the method described.
  • a computer program product is provided, the computer program product is stored in a non-transitory storage medium, the computer program product is executed by at least one processor to implement the method according to the first aspect.
  • a communication device configured to perform the method of the first aspect.
  • the input state information of the input interface of the input method and the corresponding input content are saved by switching the application program from the foreground running to the background running, and when the input interface of the input method has corresponding input content.
  • the electronic device can redisplay the input interface of the input method and the corresponding input content according to the saved input state information and target input content, and the user does not need to repeatedly input the previous input content. Therefore, the embodiment of the present application can enable the user to not lose the input content that already exists in the input interface when switching between the front and the background of the application program, which improves the convenience of input method character input.
  • FIG. 1 is one of the flowcharts of the application switching processing method provided by the embodiment of the present application
  • FIG. 2 is one of the interface display schematic diagrams of the electronic device provided by the embodiment of the present application.
  • FIG 3 is the second schematic diagram of the interface display of the electronic device provided by the embodiment of the present application.
  • FIG. 4 is the third schematic diagram of the interface display of the electronic device provided by the embodiment of the present application.
  • FIG. 5 is the fourth schematic diagram of the interface display of the electronic device provided by the embodiment of the present application.
  • FIG. 6 is a fifth schematic diagram of an interface display of an electronic device provided by an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of an apparatus for application switching processing provided by an embodiment of the present application.
  • FIG. 9 is one of the schematic structural diagrams of the electronic device provided by the embodiment of the present application.
  • FIG. 10 is a second schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 1 is a flowchart of an application switching processing method provided by an embodiment of the present application. As shown in FIG. 1, the following steps are included:
  • Step 101 the electronic device receives a first input of switching the first application program from running in the foreground to running in the background.
  • the above-mentioned first application program may be any application program in the electronic device that needs to perform input method input.
  • the above-mentioned first application program may be a social chat program, an online shopping program, or a network search program, etc., which is not specifically limited herein.
  • the above-mentioned first input may be the user's input through function keys on the touch panel of the electronic device, or specific operation gestures on the touch screen, including but not limited to conscious triggering and unconscious mistaken touch.
  • the above-mentioned first application can be regarded as switching from the foreground to the background; if the user wants to obtain the relevant information in the third application when performing the input operation of the input method in the first application, so as to continue the input
  • the user switches from the first application program to the third application program through a specific operation gesture or the function key, which can also be regarded as the first input for switching the above-mentioned first application program from the foreground to the background running.
  • the switching of the above application from foreground running to background running may also be triggered by the electronic device.
  • the electronic device switches the interface of the first application to the incoming call interface.
  • application program interface can also be regarded as the first input for switching the first application program from the foreground to running in the background.
  • Step 102 In response to the first input, the electronic device saves the input state information of the first input interface and the target input content when the target input content exists on the first input interface of the target input method.
  • the first input interface is associated with the first application program, and the input state information includes the state of the input keyboard and/or the word selection candidate box corresponding to the target input content.
  • the above-mentioned target input method may be any input method software that supports input method input, which may be the input method software provided by the electronic device system, or may be other input method software.
  • the input interface of the target input method can be displayed in a floating display on the interface of the first application program, or can be displayed in a split screen with the interface of the application program, that is, the input interface of the target input method can be displayed with the first application program. interface coexist.
  • the above-mentioned first input interface may be an input interface displayed when the first application program has not switched from running in the foreground to running in the background.
  • the first input interface will also be closed or switched to the background, so as to avoid blocking relevant operation buttons or display content.
  • the above-mentioned first application program can establish an association relationship with the above-mentioned target input method, and the association relationship can be actively established by the user. For example, this can be achieved by enabling switches associated with the application and the target input method. If the first application has been associated with the target input method, a relevant storage directory of the first application may be established in the configuration file directory of the target input method to store relevant input state information and input content.
  • the input state information of the above-mentioned first input interface may include the display state of the above-mentioned first input interface, or the input state of the above-mentioned input method, and the like.
  • the above-mentioned input status information may be displayed on a horizontal screen or a vertical screen of the input interface; in another optional embodiment, the above-mentioned input status information may also be the folding or Expand the display, or, the keyboard type is Pinyin 26 keys or Pinyin 9 keys.
  • the above-mentioned target input content may be the content input by the user on the input interface of the above-mentioned target input method.
  • the area a is the input content display area of the input interface of the target input method, and in the area a, the above-mentioned target input content can be a character string, including the Chinese characters that the user has performed the word selection operation and the The pinyin characters of the word selection operation, that is, the above-mentioned target input content exists in the above-mentioned first input interface, but have not been displayed in the text box of the above-mentioned first application program interface.
  • the input status information of the above-mentioned first input interface may also include the word selection progress of the above-mentioned target input content.
  • the above-mentioned target input content is " tianqizhenbucuo today ", and now the above-mentioned target input content has carried out partial word selection, then save the word selection candidate of this pinyin string of "tianqizhenbucuo" frame. In this way, it is convenient for the user to continue the word selection operation when the first application program is restored to run in the foreground.
  • the above-mentioned input state information and target input content can be stored in the configuration file directory of the above-mentioned target input method, and specifically can be located in the relevant storage directory of the above-mentioned established first application program, so as to facilitate the storage of different application programs. Content is managed separately. The user can also delete the above-mentioned input state information and target input content saved in the configuration file directory of the target input method by manually clearing the cache.
  • FIG. 3 is a possible setting interface of the embodiment of the present application. Whether the above-mentioned input state information and target input content of different applications are to be saved, and the duration of the storage can be set independently by the user, so as to meet the user's diverse needs for different applications.
  • the input state information of the input interface of the input method and the corresponding input content are saved by switching the application program from the foreground running to the background running, and when the input interface of the input method has corresponding input content.
  • the electronic device can redisplay the input interface of the input method and the corresponding input content according to the saved input state information and target input content, and the user does not need to repeatedly input the previous input content. Therefore, the embodiment of the present application can enable the user to not lose the input content that already exists in the input interface when switching between the front and the background of the application program, which improves the convenience of input method character input.
  • the above method further includes:
  • the electronic device receives a second input for resuming the first application from running in the background to running in the foreground;
  • the electronic device displays the second input method of the target input method according to the input state information under the condition that the duration of running the first application in the background is less than or equal to the first preset threshold.
  • input interface
  • the second input interface includes the target input content.
  • the above-mentioned second input is similar to the above-mentioned first input, and may be a conscious or unconscious touch operation by the user, or may be an electronic device that restores the interface of other application programs to the above-mentioned first application program. interface input. For example, after the user ends the call, the electronic device will automatically close the call interface and restore to the previous application interface. At this time, the electronic device switches from the call interface to the input of the previous application interface, which can be regarded as the above-mentioned second input.
  • the input state of the second input interface is the same as the input state of the first input interface
  • the display position of the target input content in the second input interface is the same as that in the first input interface.
  • the display position of the target input content is the same.
  • the above-mentioned second input interface may be displayed according to the above-mentioned input state information stored in the above-mentioned step 102 . It should be understood that the input state of the second input interface may be consistent with the input state of the first input interface, which is equivalent to restoring the display of the input interface of the target input method.
  • the above-mentioned target input content may also be displayed in the above-mentioned second input interface.
  • the position and content of the above-mentioned target input content can be kept consistent with the above-mentioned first input interface, that is, if the user has carried out part of the word selection operation to the pinyin characters of input, then in the above-mentioned second input interface, the selected Chinese characters and The remaining pinyin characters that have not undergone word selection operations can be displayed as word selection candidate boxes for the pinyin characters that have undergone word selection operations.
  • the electronic device can search for the existence of a corresponding file in the relevant storage directory, so as to determine whether it is necessary to display the above-mentioned second input interface according to the above-mentioned input state information. .
  • the embodiment of the present application displays the second input interface of the target input method according to the pre-stored input state information when the first application program is restored from the background operation to the foreground operation, and simultaneously displays the target input content on the second input interface. , so as to realize the restoration and display of the input interface of the target input method and the input content.
  • the input interface of the input method and the corresponding input content are redisplayed according to the saved input state information, so that the user can make the application program before running the application program.
  • the input content that already exists in the input interface will not be lost, which improves the convenience of input method character input.
  • the method further includes:
  • the electronic device In response to the second input, the electronic device displays a third input interface of the target input method according to the input state information when the duration of running the first application in the background is greater than a first preset threshold ;
  • the third input interface does not include the target input content.
  • the duration of the background operation of the above-mentioned first application program may be judged first, and if the duration is less than or equal to the above-mentioned first preset threshold In this case, the second input interface of the target input method is displayed according to the previously stored input state information, and the target input content is displayed on the second input interface.
  • the target input method background can simultaneously record the switching time point, and when the above-mentioned first application program is restored from background running to foreground running, the timing is stopped, thereby Get the duration that the first application is running in the background.
  • the third input interface can be displayed with the above-mentioned input state information, but the above-mentioned target input content is not displayed, thereby making the processing of switching the corresponding application of the input method more intelligent and improving the user experience.
  • the method further includes:
  • the electronic device receives a third input from the user on the third input interface
  • the electronic device displays, in the third input interface, historical input content saved by the target input method, where the historical input content includes the target input content.
  • the target input content is not displayed in the area d of the third input interface.
  • a third input can be performed on the third input interface of the electronic device.
  • the third input may be a touch operation performed by the user on the third input interface, for example, long pressing the input content display area of the third input interface, that is, area d in FIG. 6 .
  • the historical input content may be displayed in the target display area of the third input interface in response to the third input.
  • the above-mentioned historical input content may be one piece or multiple pieces of input content, that is, all the input content stored, or several pieces of input content that have been stored recently, which may be displayed through the historical input content table.
  • the above-mentioned historical input content may be displayed in the e-area at the upper right of the above-mentioned third input interface. The user may select the corresponding input content through a touch operation, so that the historical input content selected by the user is displayed in the input content display area of the third input interface.
  • the above-mentioned historical input content may be the input content stored in the storage directory corresponding to the above-mentioned first application program. In other words, the above historical input content does not include input content in other applications.
  • the user can also acquire the previously stored input content by using the same method.
  • the above-mentioned target input content has been displayed in the b area of the input interface of the target input method, so when the stored input content is displayed in the c area, the above-mentioned target input content may not be included.
  • a third input interface that does not include the above-mentioned target input content is displayed.
  • the third input interface obtains the stored historical input content of the target input method, and the user can touch the operation, that is, click on the corresponding input content, so that the historical input content selected by the user is displayed in the input content display area of the third input interface. , thereby further improving the convenience of the user when performing input operations.
  • the foregoing step 102 may specifically include:
  • the electronic device in response to the first input, judges whether the first application program satisfies the first preset condition in the presence of the target input content on the first input interface of the target input method;
  • the electronic device saves the input state information of the first input interface and the target input content when the first application satisfies the first preset condition;
  • the first preset condition is to enable the input state saving function.
  • the manner of enabling the above input state saving function can be set according to actual needs.
  • the user can turn on the input state saving switch of the first application in the input method setting in the system settings; of course, in another embodiment, the user can also set the option in the target input method input interface Turn on the corresponding input state saving switch in , which is not further limited here.
  • FIG. 4 is a possible setting interface of an embodiment of the present application.
  • the input state saving function of applications A, B, and C is enabled, while the input state saving function of application D is disabled.
  • the above-mentioned input state information of the above-mentioned first input interface and the above-mentioned target input content can be saved.
  • the above-mentioned first application program does not enable the above-mentioned input state saving function, the corresponding target input content and input state information are not saved.
  • the input state saving function of the application program in which the user frequently performs the input operation of the target input method can be enabled by default;
  • the input state saving function of the application that performs the input operation of the target input method is used to improve the user experience.
  • This embodiment of the present application determines whether the first application program enables the input state saving function, so that the user can independently select the application program that needs to enable the input state saving function, and the convenience of the user's input operation in different application programs is improved.
  • the foregoing step 102 may specifically include:
  • the input state information of the first input interface and the target input content are saved.
  • the application program can be switched from the foreground operation to the background operation within a preset period.
  • the number of switchovers is counted. Specifically, whenever the above-mentioned first application performs a switch from the foreground to the background when the target input content exists in the first input interface of the target input method, the background of the target input method will record the first switch of the current switch. application, and query the type to which the first application belongs.
  • each application program can be classified in advance, for example, it can be divided into social chat program, online shopping program or network search program according to the function, when the application program switched this time is recorded in the background of the target input method, Query the application type to which the application belongs. If the application belongs to the target type, count the current switching.
  • the above target type may be a preset type, and may generally be an application type that requires a large amount of content to be input, or an input method is frequently invoked, such as a chat social type or a document editing type.
  • the electronic device can automatically enable the input state saving function of the second application program corresponding to the above target type, thereby avoiding the need for the user to manually select the application program that needs to enable the input state saving function, making the switching of the application program easier.
  • the processing is more intelligent, which improves the user experience.
  • the electronic device receives user input, for example, the user manually turns on the switch for enabling the above-mentioned input state saving function through input method settings, in this case, it can also be regarded as the above-mentioned switching times. greater than or equal to the second preset threshold.
  • FIG. 7 is a possible flowchart of an application switching processing method according to an embodiment of the present application.
  • the method can include:
  • Step 201 open the input method setting, click switch setting, and enter the switch setting interface. Click the "+" sign to enter the creation page, fill in the name of the application that saves the state of the input method, and the state content to be saved, including: whether to save the input content of the input interface, whether to save the state of the input interface, and the time to save the state, Finally, click Save to complete the creation.
  • Step 202 according to the user's needs, select an application name that supports state saving from applications that have been set with a state switching function, and turn on the switching and saving switch in the settings. If the toggle save switch is turned on in the settings, the input method will automatically bind the set state information to the corresponding application.
  • Step 203 when the user switches between applications, if the current user is using the input method, the input method will automatically identify the name of the application currently using the input method, and match the name of the application saved in the switching settings according to the identified application name.
  • the application list if the application name exists in the setting list and the switch to save switch is turned on, turn it on and execute step 204 .
  • Step 204 During the switching process, if it is detected that the switching and saving switch of the application program is turned on, step 205 is executed; otherwise, step 206 is executed.
  • Step 205 automatically calling the input method state saving setting bound to the application, the input method will create an input cache list of the application, and save the corresponding input method state and content in the input method cache according to the setting content, the The list content will be stored in the configuration file and can be deleted manually. After the data is saved and recorded, the input method input interface will be collapsed to keep consistent with the currently referenced background running state. If the saving time of the state is set in the switching setting, start and execute step 207, otherwise, execute step 208;
  • Step 206 if the application belongs to chat software, browser, notepad and other application types that need to frequently call the input method, then the input method will enable the automatic learning switching function, and perform step 209, otherwise the application is not saved when switching by default The state of the input method before switching.
  • Step 207 Record the switching time of the current application, and turn on the timing function.
  • the switching application time reaches the threshold for saving the record and it is not detected that the current application has been switched back, the content in the current input interface of the application will be cleared, but the content of the current application will be cleared. Part of the content is added to the input method record content, but the status information of the input interface will still be retained;
  • Step 208 when switching back to the current application from another application, when the input method background detects that the current application is running, restores the state of the input keyboard temporarily stored in the cache to the state before the switch, for example, the keyboard remains expanded, the input method is Set to full keyboard, etc., and return the user input content information recorded in the cache to the input interface.
  • the user can long press the input content display area of the input interface to view the content recorded in the previous input interface, which is convenient and quick to use the historical data. If the threshold time of the record is set, the timing will be stopped, the timing status will be cleared, and the input method status will be set to the query status. .
  • Step 209 the input method background will record the object to be switched this time, and query the category of the switching object, and at the same time increase the number of times of switching of the corresponding switching type by 1. If the user counts 15 switching types within a month, it is the user's habit switching operation by default. The input method will automatically update the switch settings, add the corresponding application name and information to be saved to the switch settings, and the switch save switch is enabled by default.
  • the embodiments of the present application can solve the loss of the user's input content and input state during the process of using the input method due to application switching.
  • the input information and state of the last application can be automatically saved, and user switching operation habits can be set or automatically learned, which makes management more convenient and operation faster.
  • the execution subject may be an application switching processing device, or a control module in the application switching processing device for executing the loading application switching processing method .
  • the method for the application switching processing provided by the embodiments of the present application is described by taking the method for performing the loading application switching processing by the device for the application switching processing as an example.
  • FIG. 8 is a structural diagram of an apparatus 800 for application switching processing provided by an embodiment of the present application. As shown in Figure 8, including:
  • the first receiving module 810 is configured to receive the first input of switching from the foreground running to the background running of the first application
  • the saving module 820 is configured to, in response to the first input, save the input state information of the first input interface and the target input content in the case that the target input content exists on the first input interface of the target input method;
  • the first input interface is associated with the first application program, and the input state information includes the state of the input keyboard and/or the word selection candidate box corresponding to the target input content.
  • the above-mentioned apparatus 800 for application switching processing may further include:
  • a second receiving module configured to receive a second input for restoring the first application from running in the background to running in the foreground
  • a first display module configured to, in response to the second input, display the target according to the input state information when the duration of the first application running in the background is less than or equal to a first preset threshold
  • the second input interface includes the target input content.
  • the above-mentioned apparatus 800 for application switching processing may further include:
  • a second display module configured to, in response to the second input, display the target input method according to the input state information when the duration of the first application running in the background is greater than a first preset threshold the third input interface;
  • the third input interface does not include the target input content.
  • the above-mentioned apparatus 800 for application switching processing may further include:
  • a third receiving module configured to receive a third input from the user on the third input interface
  • a third display module configured to display the historical input content saved by the target input method in the third input interface in response to the third input, wherein the historical input content includes the target input content.
  • the above-mentioned saving module 820 may specifically include:
  • a determination unit for determining, in response to the first input, the number of times that the first application is switched from foreground operation to background operation within a preset time period
  • a saving unit configured to save the input state information of the first input interface and the target input content when the number of times of switching is greater than or equal to a second preset threshold.
  • the apparatus for application switching processing in this embodiment of the present application may be an apparatus, and may also be a component, an integrated circuit, or a chip in a terminal.
  • the apparatus may be a mobile electronic device or a non-mobile electronic device.
  • the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (personal digital assistant).
  • UMPC ultra-mobile personal computer
  • netbook or a personal digital assistant
  • non-mobile electronic devices can be servers, network attached storage (Network Attached Storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machine, etc., this application Examples are not specifically limited.
  • Network Attached Storage NAS
  • personal computer personal computer, PC
  • television television
  • teller machine or self-service machine etc.
  • the device for application switching processing in this embodiment of the present application may be a device having an operating system.
  • the operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, which are not specifically limited in the embodiments of the present application.
  • the apparatus for application switching processing provided by the embodiments of the present application can implement each process implemented by the apparatus for application switching processing in the method embodiments of FIG. 1 to FIG. 6 , and to avoid repetition, details are not repeated here.
  • This embodiment of the present application receives the first input of switching the first application program from the foreground to the background through the first receiving module, and responds to the first input through the saving module, if the target input content exists in the first input interface of the target input method , save the input state information of the first input interface and the input content of the target, so that the target can be displayed according to the input state information when the first application is restored from running in the background to running in the foreground
  • the second input interface of the input method makes it possible for the user to not lose the input content already existing in the input interface when switching between the front and the background of the application program, which improves the convenience of using the input method when the application program is switched.
  • an embodiment of the present application further provides an electronic device 900, including a processor 901, a memory 902, a program or instruction stored in the memory 902 and executable on the processor 901, the program Or, when the instruction is executed by the processor 901, each process of the foregoing application switching processing method embodiment can be implemented, and the same technical effect can be achieved. In order to avoid repetition, details are not repeated here.
  • the electronic devices in the embodiments of the present application include the aforementioned mobile electronic devices and non-mobile electronic devices.
  • FIG. 10 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
  • the electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010, etc. part.
  • the electronic device 1000 may also include a power source (such as a battery) for supplying power to various components, and the power source may be logically connected to the processor 1010 through a power management system, so that the power management system can manage charging, discharging, and power functions. consumption management and other functions.
  • a power source such as a battery
  • the power management system can manage charging, discharging, and power functions. consumption management and other functions.
  • the structure of the electronic device shown in FIG. 10 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or arrange different components, which will not be repeated here. .
  • the processor 1010 is configured to receive a first input that the first application program switches from running in the foreground to running in the background; in response to the first input, in the case that the first input interface of the target input method has the target input content, Save the input state information of the first input interface and the target input content; wherein the first input interface is associated with the first application, and the input state information includes the state of the input keyboard and/or the The word selection candidate box corresponding to the target input content.
  • the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042. Such as camera) to obtain still pictures or video image data for processing.
  • 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 other input devices 10072 .
  • the touch panel 10071 is also called a touch screen.
  • the touch panel 10071 may include two parts, 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 keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.
  • Memory 1009 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
  • the processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and application programs, and the like, and the modem processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 1010.
  • the embodiments of the present application further provide a readable storage medium, the readable storage medium may be non-volatile or volatile, and a program or an instruction is stored on the readable storage medium, and the program or instruction is stored in the readable storage medium.
  • the processor executes, each process of the above-mentioned embodiment of the application switching processing method is implemented, and the same technical effect can be achieved. In order to avoid repetition, details are not repeated here.
  • the processor is the processor in the electronic device described in the foregoing embodiments.
  • the readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.
  • An embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to run a program or an instruction to implement the above application switching processing method In order to avoid repetition, the details are not repeated here.
  • the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, a system-on-chip, a system-on-a-chip, or a system-on-a-chip, or the like.
  • An embodiment of the present application further provides a computer program product, wherein the computer program product is stored in a non-transitory readable storage medium, and the computer program product is executed by at least one processor to implement the above application switching
  • the computer program product is stored in a non-transitory readable storage medium, and the computer program product is executed by at least one processor to implement the above application switching

Abstract

一种应用程序切换处理方法、装置和电子设备,属于通信技术领域。该方法包括:接收第一应用程序从前台运行切换至后台运行的第一输入(101);响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容(102);其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。

Description

应用程序切换处理方法、装置和电子设备
相关申请的交叉引用
本申请主张在2020年11月03日在中国提交的中国专利申请No.202011209199.0的优先权,其全部内容通过引用包含于此。
技术领域
本申请属于通信技术领域,具体涉及一种应用程序切换处理方法、装置和电子设备。
背景技术
目前,在电子设备中,为了实现文字输入,用户常常利用输入法软件输入字符串,根据输入法的编码方式生成对应的文字。
而在实现本申请过程中,申请人发现现有技术中至少存在如下问题:在移动终端用户在使用输入法输入较长内容的过程中,如果该应用突然被电话或视频等系统应用中断,或者用户需要在不同应用之间相互切换来完成输入内容时,输入法界面上输入的内容以及输入法界面的输入状态信息将会丢失,用户需要重新输入,从而导致输入法字符输入的便捷性较差。
发明内容
本申请实施例的目的是提供一种应用程序切换处理方法、装置和电子设备,能够解决应用程序切换导致输入法字符输入的便捷性较差的问题。
为了解决上述技术问题,本申请是这样实现的:
第一方面,本申请实施例提供了一种应用程序切换处理方法,该方法包括:
接收第一应用程序从前台运行切换至后台运行的第一输入;
响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容; 其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。
第二方面,本申请实施例提供了一种应用程序切换处理的装置,包括:
第一接收模块,用于接收第一应用程序从前台运行切换至后台运行的第一输入;
保存模块,用于响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容;
其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。
第三方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的方法的步骤。
第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法的步骤。
第五方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的方法。
第六方面,提供了一种计算机程序产品,所述计算机程序产品存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如第一方面所述的方法。
第七方面,提供了一种通信设备,被配置为执行如第一方面所述的方法。
在本申请实施例中,通过在应用程序从前台运行切换至后台运行,且在输入法的输入界面存在相应的输入内容的情况下,保存输入法的输入界面的输入状态信息以及相应输入内容。这样在进行应用程序切换操作时,电子设备可以按照保存的输入状态信息和目标输入内容重新显示输入法的输入界面 和相应的输入内容,用户无需反复输入之前的输入内容。因此,本申请实施例能够使得用户在进行应用程序前后台切换时,不会丢失已经存在于输入界面的输入内容,提升了输入法字符输入的便捷性。
附图说明
图1是本申请实施例提供的应用程序切换处理方法的流程图之一;
图2是本申请实施例提供的电子设备的界面显示示意图之一;
图3是本申请实施例提供的电子设备的界面显示示意图之二;
图4是本申请实施例提供的电子设备的界面显示示意图之三;
图5是本申请实施例提供的电子设备的界面显示示意图之四;
图6是本申请实施例提供的电子设备的界面显示示意图之五;
图7是本申请实施例提供的应用程序切换处理方法的流程图之二;
图8是本申请实施例提供的应用程序切换处理的装置的结构示意图;
图9是本申请实施例提供的电子设备的结构示意图之一;
图10是本申请实施例提供的电子设备的结构示意图之二。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。
下面结合附图,通过具体地实施例及其应用场景对本申请实施例提供的应用程序切换处理方法进行详细地说明。
参见图1,图1是本申请实施例提供的应用程序切换处理方法的流程图,如图1所示,包括以下步骤:
步骤101,电子设备接收第一应用程序从前台运行切换至后台运行的第一输入。
在上述步骤101中,上述第一应用程序可以为电子设备中需要进行输入法输入的任一应用程序。例如,在可选的实施例中,上述第一应用程序可以为社交聊天程序、网上购物程序或者网络搜索程序等,具体在此不作进一步的限定。
对于上述第一应用程序,上述第一输入可以为用户通过电子设备的触摸面板上的功能按键,或者触摸屏上的特定操作手势等输入,包括但不限于有意识地触发和无意识地误触。举例说明,若用户在第一应用程序进行输入法的输入操作时,误触了触摸面板上的起始键(Home键)或者菜单键,使得上述第一应用程序的界面切换至桌面或者菜单界面,此时上述第一应用程序可以看作是由前台切换至后台;若用户在第一应用程序进行输入法的输入操作时,想要获取第三应用程序中查找相关信息,以继续进行该输入操作,此时用户通过特定操作手势,或者功能键由第一应用程序切换至第三应用程序,也可以看作是将上述第一应用程序由前台切换至后台运行的第一输入。
当然,在其他可选的实施例中,上述应用程序由前台运行切换至后台运行的情况也可以由电子设备触发。例如,若用户在第一应用程序进行输入法的输入操作时,接收到来电、视频或语音等需要强制切换应用程序的第一输入时,电子设备将上述第一应用程序的界面切换至来电界面,或者其他应用程序界面,也可以看作是上述第一应用程序由前台切换至后台运行的第一输入。
步骤102,电子设备响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及 所述目标输入内容。
其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。
在上述步骤102中,上述目标输入法可以为支持输入法输入的任一输入法软件,其可以为电子设备系统自带的输入法软件,也可以为其他输入法软件。通常地,若用户需要在第一应用程序的界面进行输入法的输入操作,需要点选第一应用程序的界面中的文本框。此时,上述目标输入法的输入界面可以悬浮显示于上述第一应用程序的界面上,也可以与上述应用程序的界面分屏显示,即上述目标输入法的输入界面可以与上述第一应用程序的界面共存。上述第一输入界面,可以为在第一应用程序还未从前台运行切换至后台运行时,所显示的输入界面。
需要说明的是,上述第一应用程序从前台切换至后台运行时,上述第一输入界面也会随之关闭或者切换至后台,以避免遮挡相关的操作按键或者显示内容。
可以理解的是,上述第一应用程序可以与上述目标输入法建立关联关系,该关联关系可以由用户主动建立。例如,可以通过启用应用程序和目标输入法关联的开关来实现。若上述第一应用程序已与上述目标输入法关联,在上述目标输入法的配置文件目录中,可以建立第一应用程序的相关存储目录,以存储相关的输入状态信息和输入内容。
上述第一输入界面的输入状态信息,可以包括上述第一输入界面的显示状态,或者上述输入法的输入状态等。例如,在一可选的实施例中,上述输入状态信息可以为输入界面的横屏或者竖屏显示;在另一可选的实施例中,上述输入状态信息也可以为输入界面的收起或者展开显示,或者,键盘的类型为拼音26键或者拼音9键。
上述目标输入内容,可以为用户在上述目标输入法的输入界面输入的内容。如图2所示,区域a为目标输入法的输入界面的输入内容显示区域,在区域a中,上述目标输入内容,可以为一字符串,包括用户已经进行选词操 作的汉字和还未进行选词操作的拼音字符,即上述目标输入内容存在于上述第一输入界面,而还未显示于上述第一应用程序界面的文本框之中。
应理解,上述第一输入界面的输入状态信息,还可以包括上述目标输入内容的选词进度。例如,参照图2,在本申请实施例中,上述目标输入内容为“今天tianqizhenbucuo”,此时上述目标输入内容已经进行了部分选词,则保存“tianqizhenbucuo”这一拼音字符串的选词候选框。这样,可以在上述第一应用程序恢复为前台运行的情况下,便于用户继续进行选词操作。
具体地,上述输入状态信息和目标输入内容,可以保存于上述目标输入法的配置文件目录中,具体可以位于上述已建立的第一应用程序的相关存储目录中,以便于对不同应用程序的存储内容进行分别管理。用户也可以通过手动清除缓存的操作,将上述保存于目标输入法的配置文件目录中的输入状态信息和目标输入内容删除。
需要说明的是,参照图3,图3为本申请实施例一种可能的设置界面。不同应用程序的上述输入状态信息和目标输入内容的是否进行保存,以及保存的时长可以根据用户自主设置,从而可以满足用户对于不用应用程序的多样化需求。
在本申请实施例中,通过在应用程序从前台运行切换至后台运行,且在输入法的输入界面存在相应的输入内容的情况下,保存输入法的输入界面的输入状态信息以及相应输入内容。这样在进行应用程序切换操作时,电子设备可以按照保存的输入状态信息和目标输入内容重新显示输入法的输入界面和相应的输入内容,用户无需反复输入之前的输入内容。因此,本申请实施例能够使得用户在进行应用程序前后台切换时,不会丢失已经存在于输入界面的输入内容,提升了输入法字符输入的便捷性。
可选地,在上述步骤102之后,上述方法还包括:
电子设备接收将所述第一应用程序从后台运行恢复至前台运行的第二输入;
电子设备响应于所述第二输入,在所述第一应用程序在后台运行的持续 时长小于或等于第一预设阈值的情况下,根据所述输入状态信息显示所述目标输入法的第二输入界面;
其中,所述第二输入界面包括所述目标输入内容。
在本发明实施例中,上述第二输入与上述第一输入类似,可以为用户有意识或者无意识的触控操作,也可以为电子设备进行的从其他应用程序的界面恢复至上述第一应用程序的界面的输入。举例说明,在用户结束通话后,电子设备会自行关闭通话界面,而恢复至此前的应用界面,此时电子设备由通话界面切换至此前应用界面的输入,可以看作上述第二输入。
可选地,所述第二输入界面的输入状态与所述第一输入界面的输入状态相同,且所述第二输入界面中的所述目标输入内容的显示位置与所述第一输入界面中的所述目标输入内容的显示位置相同。
在上述第一应用程序从后台运行恢复至前台运行的情况下,可以根据上述步骤102中存储的上述输入状态信息显示上述第二输入界面。应理解,上述第二输入界面的输入状态与上述第一输入界面的输入状态可以保持一致,也即相当于对目标输入法的输入界面进行恢复显示。
同时,上述第二输入界面中,也可以显示有上述目标输入内容。上述目标输入内容所处的位置与内容可以与上述第一输入界面中保持一致,即若用户已经对输入的拼音字符进行了部分选词操作,则在上述第二输入界面显示已选取的汉字和剩余未进行选词操作的拼音字符,并可以同时显示为进行选词操作的拼音字符的选词候选框。
应理解,在上述第一应用程序从后台运行恢复至前台运行时,电子设备可以在相关的存储目录中,查找是否存在相应的文件,从而确定是否需要按照上述输入状态信息显示上述第二输入界面。
本申请实施例通过在第一应用程序从后台运行恢复至前台运行的情况下,按照预先存储的输入状态信息显示所述目标输入法的第二输入界面,同时在第二输入界面显示目标输入内容,从而实现了对目标输入法输入界面及输入内容的恢复显示。
在本申请实施例中,通过在应用程序从后台运行恢复至前台运行的情况下,按照保存的输入状态信息重新显示输入法的输入界面和相应的输入内容,从而能够使得用户在进行应用程序前后台切换时,不会丢失已经存在于输入界面的输入内容,提升了输入法字符输入的便捷性。
可选地,上述接收将所述第一应用程序从后台运行恢复至前台运行的第二输入的步骤之后,上述方法还包括:
电子设备响应于所述第二输入,在所述第一应用程序在后台运行的持续时长大于第一预设阈值的情况下,根据所述输入状态信息显示所述目标输入法的第三输入界面;
其中,所述第三输入界面不包括所述目标输入内容。
在本申请实施例中,在上述第一应用程序从后台运行恢复至前台运行时,可以先对上述第一应用程序后台运行的持续时长进行判断,在时长小于或者等于上述第一预设阈值的情况下,按照此前存储的输入状态信息显示目标输入法的第二输入界面,并在第二输入界面显示目标输入内容。
具体地,上述第一应用程序由前台运行切换至后台运行时,目标输入法后台可以同时记录进行切换的时间点,而在上述第一应用程序从后台运行恢复至前台运行时,停止计时,从而得到第一应用程序在后台运行的持续时长。
若上述第一应用程序后台运行的持续时长大于或等于第一预设阈值,此时用户可能不再需要此前输入的内容。在此种情况下,可以以上述输入状态信息显示第三输入界面,但不显示上述目标输入内容,从而使得输入法对应应用切换时的处理更加智能化,提升用户的使用体验。
进一步地,上述根据所述输入状态信息,在所述目标界面显示第三输入界面的步骤之后,上述方法还包括:
电子设备接收用户在所述第三输入界面的第三输入;
电子设备响应于所述第三输入,在所述第三输入界面中显示所述目标输入法保存的历史输入内容,其中,所述历史输入内容包括所述目标输入内容。
本申请实施例中,在上述第一应用程序后台运行的持续时长大于或等于 第一预设阈值的情况下,如图6所示,上述第三输入界面的d区域未显示上述目标输入内容。此时,如果用户需要获取包括目标输入内容在内,已经存储的输入内容,可以在电子设备的第三输入界面上进行第三输入。具体地,上述第三输入可以为用户在上述第三输入界面上进行的触控操作,例如长按上述第三输入界面的输入内容显示区域,即图6中的d区域。
在电子设备接收上述第三输入的情况下,可以响应于第三输入,在上述第三输入界面的目标显示区域显示历史输入内容。上述历史输入内容可以为一条,也可以为多条,即可以为存储的所有输入内容,也可以为最近已存储的几条输入内容,具体可以通过历史输入内容表进行展示。如图6所示,在本申请实施例中,上述历史输入内容可以显示于上述第三输入界面的右上方的e区域。用户可以通过触控操作,即点选相应的输入内容,使得用户选取的历史输入内容显示于上述第三输入界面的输入内容显示区域。
需要说明的是,上述历史输入内容,可以为存储于上述第一应用程序对应的存储目录中的输入内容。换句话说,上述历史输入内容不包括在其他应用程序输入的内容。
应理解,在上述第一时长小于第一预设阈值的情况下,用户也可以采用相同的方法获取此前已存储的输入内容。如图5所示,上述目标输入内容已显示于目标输入法的输入界面的b区域,则在c区域显示已存储的输入内容时,可以不包括上述目标输入内容。
本申请实施例通过在后台运行的持续时长大于或等于第一预设阈值时,显示不包括上述目标输入内容的第三输入界面,用户可以通过在第三输入界面上进行的第三输入,在第三输入界面获取到目标输入法已存储的历史输入内容,用户可以通过触控操作,即点选相应的输入内容,使得用户选取的历史输入内容显示于上述第三输入界面的输入内容显示区域,从而进一步提升了用户在进行输入操作时的便捷性。
可选地,上述步骤102具体可以包括:
电子设备响应于所述第一输入,在目标输入法的第一输入界面存在目标 输入内容的情况下,判断所述第一应用程序是否为满足第一预设条件;
电子设备在所述第一应用程序满足第一预设条件的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容;
其中,所述第一预设条件为启用输入状态保存功能。
在本申请实施例中,可以在第一应用程序切换从前台运行至后台运行时,若上述目标输入法的第一输入界面存在目标输入内容,则对上述第一应用程序是否启用输入状态保存功能进行判断。具体地,启用上述输入状态保存功能的方式可以根据实际需要进行设置。在一实施例中,用户可以在系统设置中的输入法设置中,开启第一应用程序的输入状态保存开关;当然,在另一实施例中,用户也可以在目标输入法输入界面的设置选项中开启相应的输入状态保存开关,在此不作进一步的限定。
参照图4,图4为本申请实施例一种可能的设置界面。在图4中,应用程序A、B和C的输入状态保存功能启用,而应用程序D的输入状态保存功能关闭。同时,还可以通过下方的“+”和“-”按键增加或减少应用程序。
若上述第一应用程序已启用上述输入状态保存功能,则可以对上述第一输入界面的输入状态信息以及上述目标输入内容进行保存,具体地保存方式如上所述,在此不再赘述。相应的,若上述第一应用程序未启用上述输入状态保存功能,则不保存相应的目标输入内容和输入状态信息。
可以理解的是,本申请实施例中,可以默认启用用户频繁进行目标输入法的输入操作的应用程序的输入状态保存功能,例如社交聊天应用程序、网络搜索应用程序等;而默认关闭用户较少进行目标输入法的输入操作的应用程序的输入状态保存功能,以提升用户的使用体验,具体设置可以根据实际需要而定,在此不作进一步的限定。
本申请实施例通过上述第一应用程序是否启用输入状态保存功能进行判断,从而可以使得用户自主选择需要开启输入状态保存功能的应用程序,提升用户在不同应用程序进行输入操作的便捷性。
可选地,上述步骤102具体可以包括:
响应于所述第一输入,确定所述第一应用程序在预设时间段内从前台运行切换至后台运行的切换次数;
在所述切换次数大于或等于第二预设阈值的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容。
在本申请实施例中,可以在预设周期内,对上述未启用输入状态保存功能的应用程序,在目标输入法的第一输入界面存在目标输入内容的情况下,从前台运行切换至后台运行的切换次数进行统计。具体地,每当上述第一应用程序在目标输入法的第一输入界面存在目标输入内容的情况下,进行一次由前台到后台的切换,则目标输入法后台将记录下本次切换的第一应用程序,并查询第一应用程序所属的类型。
其中,在上述电子设备中,可以预先对每一应用程序进行分类,例如按照功能分为社交聊天程序、网上购物程序或者网络搜索程序等,在目标输入法后台记录本次切换的应用程序时,查询该应用程序所属的应用类型,若该应用程序属于目标类型,则统计本次切换。上述目标类型可以为预设类型,通常可以为聊天社交类型或文档编辑类型等需要输入大量内容,或频繁调用输入法的应用类型。
在上述第二应用程序的切换次数大于第二预设阈值的情况下,例如在一个月内,上述第二应用程序的切换次数大于15,说明用户频繁地在输入过程中,进行上述目标类型对应的应用程序的切换操作。通常地,该情况通常发生于社交聊天程序,或者网络搜索程序等需要进行大段文字输入的应用类型中。在此种情况下,电子设备可以自动启用上述目标类型所对应的第二应用程序的输入状态保存功能,从而避免了用户需要手动选取需要启用输入状态保存功能的应用程序,使得对应用程序切换的处理更加智能化,提升了用户的使用体验。
需要说明的是,在本申请实施例中,上述切换次数大于或等于第二预设阈值的情况,可以为电子设备的计数器的计数大于或等于第二预设阈值。当然,在其他可选的实施例中,若电子设备接收到用户输入,例如用户通过输 入法设置,手动打开启用上述输入状态保存功能的开关,在此种情况下,也可以看作上述切换次数大于或等于第二预设阈值。
为了更好的理解本申请,以下将以具体地实施方式为例详细阐述本申请的具体实现过程。
如图7所示,图7为本申请实施例应用程序切换处理方法一种可能的流程图。该方法可以包括:
步骤201,打开输入法设置,点击切换设置,进入切换设置界面。点击“+”号,进入创建页面,填写保存输入法状态的应用名称,以及待保存的状态内容,具体包括:是否保存输入界面的输入内容,是否保存输入界面的状态,以及状态保存的时间,最后点击保存,完成创建。
步骤202,根据用户需要,从已设置状态切换功能的应用中选择支持状态保存的应用名称,打开设置中切换保存开关。若设置中切换保存开关打开,输入法自动将设置的状态信息与对应的应用程序进行绑定。
步骤203,当用户进行应用程序间的切换时,若当前用户正在使用输入法,输入法将自动识别当前使用输入法的应用程序名,并根据识别到的应用程序名去匹配切换设置中保存的应用列表,若应用名存在于设置列表中且切换保存开关已打开,则开启执行步骤204。
步骤204,在切换过程中,若检测到该应用程序的切换保存开关打开,则开启执行步骤205,反之,开启执行步骤206。
步骤205,自动调用与该应用程序相绑定的输入法状态保存设置,输入法会创建该应用的输入缓存列表,并根据设置内容将对应的输入法状态和内容保存至输入法缓存中,该列表内容将存于配置文件中,可手动删除。数据保存记录后,输入法输入界面将收起与当前引用的后台运行状态保持一致。若切换设置中设置了状态的保存时间,则开启执行步骤207,反之,执行步骤208;
步骤206,若该应用程序属于聊天软件、浏览器、记事本等需要经常调用输入法的应用程序类型,则输入法会开启自动学习切换功能,执行步骤209, 反之默认该应用在切换时不保存切换前的输入法状态。
步骤207,记录当前应用的切换时间,开启计时功能,当切换应用时间达到记录保存的阈值时并且未检测到已切回当前应用时,将清空该应用当前输入界面中的内容,但是会将该部分的内容加入输入法记录内容,但是仍会保留输入界面的状态信息;
步骤208,当从其他应用程序切换回当前应用程序时,输入法后台检测到当前应用处于运行状态时,将暂存在缓存中的输入键盘状态恢复至切换前的状态,例如键盘保持展开、输入方式设置为全键盘等,同时将缓存记录的用户输入内容信息返回至输入界面。同时用户可以通过长按输入界面的输入内容显示区域,查看之前输入界面记录的内容,方便快速使用历史数据若设置记录的阈值时间则停止计时,清空计时状态,同时将输入法状态置为查询状态。
步骤209,输入法后台将记录本次切换的对象,并查询切换对象的类别,同时将对应的切换类型切换次数增加1。如果用户在1个月内的某种切换类型计数达到15次,则默认这是用户的习惯切换操作。输入法将自动更新切换设置,将对应的应用程序名和待保存信息加入切换设置中,并且默认开启切换保存开关。
本申请实施例能够解决由于应用程序切换,造成用户在使用输入法过程中输入内容和输入状态的丢失。能够实现多应用切换时,自动保存上次应用的输入信息和状态,并能设置或者自动学习用户切换操作习惯,管理更方便,操作更快捷。
需要说明的是,本申请实施例提供的应用程序切换处理方法,执行主体可以为应用程序切换处理的装置,或者该应用程序切换处理的装置中的用于执行加载应用程序切换处理方法的控制模块。本申请实施例中以应用程序切换处理的装置执行加载应用程序切换处理的方法为例,说明本申请实施例提供的应用程序切换处理的方法。
参照图8,图8为本申请实施例提供的一种应用程序切换处理的装置800 的结构图。如图8所示,包括:
第一接收模块810,用于接收第一应用程序从前台运行切换至后台运行的第一输入;
保存模块820,用于响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容;
其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。
可选地,上述应用程序切换处理的装置800还可以包括:
第二接收模块,用于接收将所述第一应用程序从后台运行恢复至前台运行的第二输入;
第一显示模块,用于响应于所述第二输入,在所述第一应用程序在后台运行的持续时长小于或等于第一预设阈值的情况下,根据所述输入状态信息显示所述目标输入法的第二输入界面;
其中,所述第二输入界面包括所述目标输入内容。
可选地,上述应用程序切换处理的装置800还可以包括:
第二显示模块,用于响应于所述第二输入,在所述第一应用程序在后台运行的持续时长大于第一预设阈值的情况下,根据所述输入状态信息显示所述目标输入法的第三输入界面;
其中,所述第三输入界面不包括所述目标输入内容。
可选地,上述应用程序切换处理的装置800还可以包括:
第三接收模块,用于接收用户在所述第三输入界面的第三输入;
第三显示模块,用于响应于所述第三输入,在所述第三输入界面中显示所述目标输入法保存的历史输入内容,其中,所述历史输入内容包括所述目标输入内容。
可选地,上述保存模块820具体可以包括:
确定单元,用于响应于所述第一输入,确定所述第一应用程序在预设时 间段内从前台运行切换至后台运行的切换次数;
保存单元,用于在所述切换次数大于或等于第二预设阈值的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容。
本申请实施例中的应用程序切换处理的装置可以是装置,也可以是终端中的部件、集成电路或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。
本申请实施例中的应用程序切换处理的装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。
本申请实施例提供的应用程序切换处理的装置能够实现图1至图6的方法实施例中应用程序切换处理的装置实现的各个过程,为避免重复,这里不再赘述。
本申请实施例通过第一接收模块接收将第一应用程序由前台切换至后台的第一输入,并通过保存模块响应于第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容,从而可以在所述第一应用程序从后台运行恢复至前台运行的情况下,按照所述输入状态信息显示所述目标输入法的第二输入界面,从而能够使得用户在进行应用程序前后台切换时,不会丢失已经存在于输入界面的输入内容,提升了输入法在应用程序切换时使用的便捷性。
可选地,参照图9,本申请实施例还提供一种电子设备900,包括处理器901,存储器902,存储在存储器902上并可在所述处理器901上运行的程序或指令,该程序或指令被处理器901执行时实现上述应用程序切换处理方法 实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要注意的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。
图10为实现本申请实施例的一种电子设备的硬件结构示意图。
该电子设备1000包括但不限于:射频单元1001、网络模块1002、音频输出单元1003、输入单元1004、传感器1005、显示单元1006、用户输入单元1007、接口单元1008、存储器1009、以及处理器1010等部件。
本领域技术人员可以理解,电子设备1000还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1010逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图10中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。
其中,处理器1010,用于接收第一应用程序从前台运行切换至后台运行的第一输入;响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容;其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。
应理解的是,本申请实施例中,输入单元1004可以包括图形处理器(Graphics Processing Unit,GPU)10041和麦克风10042,图形处理器10041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1006可包括显示面板10061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板10061。用户输入单元1007包括触控面板10071以及其他输入设备10072。触控面板10071,也称为触摸屏。触控面板10071可包括触摸检测装置和触摸控制器两个部分。其他输入设备10072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器1009可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理 器1010可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器1010中。
本申请实施例还提供一种可读存储介质,所述可读存储介质可以是非易失的,也可以是易失的,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述应用程序切换处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述应用程序切换处理方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。
本申请实施例另提供了一种计算机程序产品,其中,所述计算机程序产品被存储在非瞬态的可读存储介质中,所述计算机程序产品被至少一个处理器执行以实现上述应用程序切换处理方法实施例中的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申 请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。

Claims (19)

  1. 一种应用程序切换处理方法,包括:
    接收第一应用程序从前台运行切换至后台运行的第一输入;
    响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容;
    其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。
  2. 根据权利要求1所述的方法,其中,在所述保存所述第一输入界面的输入状态信息以及所述目标输入内容的步骤之后,所述方法还包括:
    接收将所述第一应用程序从后台运行恢复至前台运行的第二输入;
    响应于所述第二输入,在所述第一应用程序在后台运行的持续时长小于或等于第一预设阈值的情况下,根据所述输入状态信息显示所述目标输入法的第二输入界面;
    其中,所述第二输入界面包括所述目标输入内容。
  3. 根据权利要求2所述的方法,其中,所述第二输入界面的输入状态与所述第一输入界面的输入状态相同,且所述第二输入界面中所述目标输入内容的显示位置与所述第一输入界面中所述目标输入内容的显示位置相同。
  4. 根据权利要求2所述的方法,其中,所述接收将所述第一应用程序从后台运行恢复至前台运行的第二输入的步骤之后,所述方法还包括:
    响应于所述第二输入,在所述第一应用程序在后台运行的持续时长大于第一预设阈值的情况下,根据所述输入状态信息显示所述目标输入法的第三输入界面;
    其中,所述第三输入界面不包括所述目标输入内容。
  5. 根据权利要求4所述的方法,其中,所述根据所述输入状态信息,在所述目标界面显示第三输入界面的步骤之后,所述方法还包括:
    接收用户在所述第三输入界面的第三输入;
    响应于所述第三输入,在所述第三输入界面中显示所述目标输入法保存的历史输入内容,其中,所述历史输入内容包括所述目标输入内容。
  6. 根据权利要求5所述的方法,其中,所述历史输入内容为储存于所述第一应用程序对应的存储目录中的输入内容。
  7. 根据权利要求1所述的方法,其中,所述响应于所述第一输入,保存所述第一输入界面的输入状态信息的步骤包括:
    响应于所述第一输入,确定所述第一应用程序在预设时间段内从前台运行切换至后台运行的切换次数;
    在所述切换次数大于或等于第二预设阈值的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容。
  8. 一种应用程序切换处理的装置,包括:
    第一接收模块,用于接收第一应用程序从前台运行切换至后台运行的第一输入;
    保存模块,用于响应于所述第一输入,在目标输入法的第一输入界面存在目标输入内容的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容;
    其中,所述第一输入界面与所述第一应用程序关联,所述输入状态信息包括输入键盘的状态和/或所述目标输入内容对应的选词候选框。
  9. 根据权利要求8所述的装置,其中,还包括:
    第二接收模块,用于接收将所述第一应用程序从后台运行恢复至前台运行的第二输入;
    第一显示模块,用于响应于所述第二输入,在所述第一应用程序在后台运行的持续时长小于或等于第一预设阈值的情况下,根据所述输入状态信息显示所述目标输入法的第二输入界面;
    其中,所述第二输入界面包括所述目标输入内容。
  10. 根据权利要求9所述的装置,其中,所述第二输入界面的输入状态与所述第一输入界面的输入状态相同,且所述第二输入界面中的所述目标输入内容的显示位置与所述第一输入界面中的所述目标输入内容的显示位置相同。
  11. 根据权利要求9所述的装置,其中,还包括:
    第二显示模块,用于响应于所述第二输入,在所述第一应用程序在后台运行的持续时长大于第一预设阈值的情况下,根据所述输入状态信息显示所 述目标输入法的第三输入界面;
    其中,所述第三输入界面不包括所述目标输入内容。
  12. 根据权利要求11所述的装置,其中,还包括:
    第三接收模块,用于接收用户在所述第三输入界面的第三输入;
    第三显示模块,用于响应于所述第三输入,在所述第三输入界面中显示所述目标输入法保存的历史输入内容,其中,所述历史输入内容包括所述目标输入内容。
  13. 根据权利要求12所述的装置,其中,所述历史输入内容为储存于所述第一应用程序对应的存储目录中的输入内容。
  14. 根据权利要求8所述的装置,其中,所述保存模块包括:
    确定单元,用于响应于所述第一输入,确定所述第一应用程序在预设时间段内从前台运行切换至后台运行的切换次数;
    保存单元,用于在所述切换次数大于或等于第二预设阈值的情况下,保存所述第一输入界面的输入状态信息以及所述目标输入内容。
  15. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1-7中任一项所述的应用程序切换处理方法的步骤。
  16. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1-7中任一项所述的应用程序切换处理方法的步骤。
  17. 一种芯片,所述芯片包括处理器和通信接口,其中,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至7任一项所述的应用程序切换处理方法的步骤。
  18. 一种计算机程序产品,其中,所述计算机程序产品存储在非瞬态的存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1至7任一项所述的应用程序切换处理方法的步骤。
  19. 一种通信设备,其中,被配置为执行如权利要求1至7任一项所述的应用程序切换处理方法的步骤。
PCT/CN2021/128355 2020-11-03 2021-11-03 应用程序切换处理方法、装置和电子设备 WO2022095885A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011209199.0 2020-11-03
CN202011209199.0A CN112306256A (zh) 2020-11-03 2020-11-03 应用程序切换处理方法、装置和电子设备

Publications (1)

Publication Number Publication Date
WO2022095885A1 true WO2022095885A1 (zh) 2022-05-12

Family

ID=74333932

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/128355 WO2022095885A1 (zh) 2020-11-03 2021-11-03 应用程序切换处理方法、装置和电子设备

Country Status (2)

Country Link
CN (1) CN112306256A (zh)
WO (1) WO2022095885A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112306256A (zh) * 2020-11-03 2021-02-02 维沃移动通信有限公司 应用程序切换处理方法、装置和电子设备
CN113032637A (zh) * 2021-03-09 2021-06-25 中广核工程有限公司 事故规程保存方法、装置、设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073559A (zh) * 2011-01-12 2011-05-25 北京搜狗科技发展有限公司 一种网页输入数据保护方法及系统
US20130229334A1 (en) * 2012-03-04 2013-09-05 Jihwan Kim Portable device and control method thereof
CN104077194A (zh) * 2013-03-26 2014-10-01 腾讯科技(深圳)有限公司 一种文本输入保护方法及装置
CN108196947A (zh) * 2017-12-28 2018-06-22 维沃移动通信有限公司 一种应用运行状态控制方法及移动终端
CN108363499A (zh) * 2018-01-31 2018-08-03 维沃移动通信有限公司 一种文本恢复方法及移动终端
CN112306256A (zh) * 2020-11-03 2021-02-02 维沃移动通信有限公司 应用程序切换处理方法、装置和电子设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102073559A (zh) * 2011-01-12 2011-05-25 北京搜狗科技发展有限公司 一种网页输入数据保护方法及系统
US20130229334A1 (en) * 2012-03-04 2013-09-05 Jihwan Kim Portable device and control method thereof
CN104077194A (zh) * 2013-03-26 2014-10-01 腾讯科技(深圳)有限公司 一种文本输入保护方法及装置
CN108196947A (zh) * 2017-12-28 2018-06-22 维沃移动通信有限公司 一种应用运行状态控制方法及移动终端
CN108363499A (zh) * 2018-01-31 2018-08-03 维沃移动通信有限公司 一种文本恢复方法及移动终端
CN112306256A (zh) * 2020-11-03 2021-02-02 维沃移动通信有限公司 应用程序切换处理方法、装置和电子设备

Also Published As

Publication number Publication date
CN112306256A (zh) 2021-02-02

Similar Documents

Publication Publication Date Title
WO2022068773A1 (zh) 桌面元素调整方法、装置和电子设备
WO2017032005A1 (zh) 一种操作菜单显示方法及终端
US9626094B2 (en) Communication device and electronic device
WO2022095885A1 (zh) 应用程序切换处理方法、装置和电子设备
WO2018119584A1 (zh) 柔性显示屏的交互方法及装置
WO2022042701A1 (zh) 权限设置方法、装置及电子设备
WO2023005920A1 (zh) 分屏方法、装置及电子设备
WO2022166820A1 (zh) 应用界面处理方法、装置、电子设备及可读存储介质
WO2022199454A1 (zh) 显示方法和电子设备
WO2022121877A1 (zh) 消息处理方法、装置和电子设备
WO2023046130A1 (zh) 应用图标的显示方法、装置、电子设备及存储介质
WO2022242586A1 (zh) 应用界面显示方法、装置和电子设备
WO2022213944A1 (zh) 信息引用方法、装置和电子设备
WO2022022566A1 (zh) 图形码识别方法、装置和电子设备
WO2022242542A1 (zh) 应用图标的管理方法和电子设备
WO2023040896A1 (zh) 内容分享方法、装置和电子设备
WO2023046068A1 (zh) 文件处理方法及装置
WO2023005828A1 (zh) 消息显示方法、装置和电子设备
WO2023030115A1 (zh) 界面显示方法和装置
AU2014200272B2 (en) Method and electronic device for displaying application
WO2023045927A1 (zh) 对象移动方法和电子设备
WO2022156668A1 (zh) 信息处理方法和电子设备
WO2022253181A1 (zh) 图标整理方法、装置和电子设备
WO2022253182A1 (zh) 通信方法、装置、电子设备以及可读存储介质
WO2022233276A1 (zh) 显示方法、装置和电子设备

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: 21888582

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21888582

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.11.2023)