This application is a National Stage of International Application No. PCT/CN2017/081372, filed on Apr. 21, 2017, which claims priority to Chinese Patent Application No. 201710054086.X, filed on Jan. 22, 2017. Both of the aforementioned applications are hereby incorporated by reference in their entireties.
Embodiments of this application relate to the field of information technologies, and more specifically, to a method and a terminal device for managing an application snippet.
As a native (Native) application on an intelligent terminal becomes increasingly complex, the native application becomes increasingly large. Consequently, a larger volume of traffic is consumed for downloading the native application from a server (an application market) and more space is occupied for storing the native application on the intelligent terminal. More importantly, even though a user usually uses only some functions of the native application, the user needs to download and install the entire application, lowering entire usage efficiency of the application.
To resolve the foregoing problem, an improved technology, that is, a segmented native application, also referred to as a sliced or an instant application (Instant App), is provided. A technical key point is that a large native application is segmented into application snippets that can be independently executed, and the application snippets can be independently downloaded to an intelligent terminal for running. This resolves, to some extent, a problem that usage efficiency of an existing application is low, so that downloaded content highly matches content used by the user, thereby saving traffic and storage space, and time consumed from raising a requirement by the user to the application snippet becoming executable is shorter.
A native application is segmented into a plurality of application snippets, and an application snippet instead of an application is downloaded from an application market. That is, the application snippet may be independently searched for, downloaded, deployed, and run. The application is segmented into a plurality of application snippets, so that a quantity of application snippets is increased. Therefore, how to manage the application snippets on the intelligent terminal becomes a key problem.
There are a plurality of methods for managing the application snippets that are downloaded to the intelligent terminal. One method is to find an application snippet through native search on the intelligent terminal. This has a relatively high requirement on a keyword entered by the user. If different keywords are used during a plurality of searches, search results may be inconsistent. Another method is to arrange, at a unified access entrance, an application snippet block downloaded from the intelligent terminal. For example, a “historical record” records links of previously-downloaded application snippets. However, an increasing quantity of entries in the historical record makes it difficult to search. There is still another method. For example, no application snippet is stored on the intelligent terminal, and a new request is obtained from the server every time. A disadvantage of this method is that, the Internet needs to be accessed and traffic needs to be consumed every time, and it cannot be ensured that a same application snippet that is familiar to the user and favored by the user is requested for a plurality of times. A desktop icon management tool of the intelligent terminal provides a folder management function. That is, a folder is created, and icons representing applications are added to the folder, so that the applications are classified. In this way, the applications are managed hierarchically and a quantity of icons on the desktop is decreased effectively.
After the quantity of application snippets increases, how to manage these application snippets on the intelligent terminal, and especially, how to highly effectively find an application snippet, becomes a prominent problem that, cannot be well resolved using a current technology.
Embodiments of this application provide a method and a terminal device for managing an application snippet, so that a large quantity of application snippets can be effectively managed. This helps a user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
According to a first aspect, a method for managing an application snippet is provided. The method includes: obtaining a first application snippet; determining first classification information of the first application snippet; determining that classification information of a first composite application on the terminal device matches the first classification information; and adding the first application snippet to the first composite application.
In some possible implementations, the determining second classification information of the second application snippet includes: obtaining the second classification information through decomposition according to a constitutive rule of a release package of the second application snippet.
With reference to the first aspect, in a first possible implementation of the first aspect, before the obtaining a first application snippet, the method further includes: obtaining a second application snippet; determining second classification information of the second application snippet; determining that classification information of no composite application on the terminal device matches the second classification information; creating the first composite application, where the classification information of the first composite application matches the first classification information and the second classification information; and adding, by the terminal device, the second application snippet to the first composite application.
In some possible implementations, the determining second classification information of the second application snippet includes: obtaining the second classification information through decomposition according to a constitutive rule of a release package of the second application snippet.
With reference to the first aspect or the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the first composite application includes a configuration file, where the adding the first application snippet to the first composite application includes: adding description information of the first application snippet to the configuration file of the first composite application, to establish an association relationship between the first application snippet and the first composite application, where the association relationship is an access navigation path from the first composite application to the first application snippet.
In some possible implementations, the adding the second application snippet to the first composite application includes: adding description information of the second application snippet to the configuration file of the first composite application, to establish an association relationship between the second application snippet and the first composite application, where the association relationship is an access navigation path from the first composite application to the second application snippet.
With reference to the second possible implementation of the first aspect, in a third possible implementation of the first aspect, the description information includes at least one of a name of the first application snippet, an executable code access path of the first application snippet, and an icon of the first application snippet.
With reference to any one of the first aspect or the first possible implementation to the third possible implementation of the first aspect, in a fourth possible implementation of the first aspect, before the determining first classification information of the first application snippet, the method further includes: determining that a user has executed the first application snippet.
With reference to any one of the first aspect or the first possible implementation to the fourth possible implementation of the first aspect, in a fifth possible implementation of the first aspect, the obtaining a first application snippet includes: obtaining the first application snippet sent by a server; or obtaining the first application snippet obtained by the user through native search.
In some possible implementations, the method further includes: displaying the first composite application in a display module.
According to the method for managing an application snippet in this embodiment of this application, a large quantity of application snippets can be effectively managed. This helps the user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
According to a second aspect, a terminal device is provided. The terminal device includes a communications interface and a processor, where the communications interface is configured to obtain a first application snippet; the processor is configured to determine first classification information of the first application snippet; the processor is further configured to determine that classification information of a first composite application on the terminal device matches the first classification information; and the processor is further configured to add the first application snippet to the first composite application.
In some possible implementations, the processor is specifically configured to obtain the first classification information through decomposition according to a constitutive rule of a release package of the first application snippet.
With reference to the second aspect, in a first possible implementation of the second aspect, the communications interface is further configured to obtain a second application snippet; the processor is further configured to determine second classification information of the second application snippet; the processor is further configured to determine that classification information of no composite application on the terminal device matches the second classification information; the processor is further configured to create the first composite application, where the classification information of the first composite application matches the first classification information and the second classification information; and the processing module is further configured to add the second application snippet to the first composite application.
In some possible implementations, the processor is specifically configured to obtain the second classification information through decomposition according to a constitutive rule of a release package of the second application snippet.
With reference to the second aspect or the first possible implementation of the second aspect, in a second possible implementation of the second aspect, the first composite application includes a configuration file, where the processor is specifically configured to add description information of the first application snippet to the configuration file of the first composite application, to establish an association relationship between the first application snippet and the first composite application, where the association relationship is an access navigation path from the first composite application to the first application snippet.
With reference to the second possible implementation of the second aspect, in a third possible implementation of the second aspect, the description information includes at least one of a name of the first application snippet, an executable code access path of the first application snippet, and an icon of the first application snippet.
With reference to any one of the second aspect or the first possible implementation to the third possible implementation of the second aspect, in a fourth possible implementation of the second aspect, the processor is further configured to determine that a user has executed the first application snippet.
With reference to any one of the second aspect or the first possible implementation to the third possible implementation of the second aspect, in a fourth possible implementation of second aspect, the communications interface is specifically configured to: obtain the first application snippet sent by a server; or obtain the first application snippet obtained by the user through native search.
In some possible implementations, the terminal device further includes a display, configured to display the first composite application.
The terminal device in this embodiment of this application can effectively manage a large quantity of application snippets. This helps the user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
According to a third aspect, a terminal device is provided. The terminal device includes a communications module and a processing module, where the communications module is configured to obtain a first application snippet; the processing module is configured to determine first classification information of the first application snippet; the processing module is further configured to determine that classification information of a first composite application on the terminal device matches the first classification information; and the processing module is further configured to add the first application snippet to the first composite application.
In some possible implementations, the processing module is specifically configured to obtain the first classification information through decomposition according to a constitutive rule of a release package of the first application snippet.
With reference to the third aspect, in a first possible implementation of the third aspect, the communications module is further configured to obtain a second application snippet; the processing module is further configured to determine second classification information of the second application snippet; the processing module is further configured to determine that classification information of no composite application on the terminal device matches the second classification information; the processing module is further configured to create the first composite application, where the classification information of the first composite application matches the first classification information and the second classification information; and the processing module is further configured to add the second application snippet to the first composite application.
In some possible implementations, the processing module is specifically configured to obtain the second classification information through decomposition according to a constitutive rule of a release package of the second application snippet.
With reference to the third aspect or the first possible implementation of the third aspect, in a second possible implementation of the third aspect, the first composite application includes a configuration file, and the processing module is specifically configured to add description information of the first application snippet to the configuration file of the first composite application, to establish an association relationship between the first application snippet and the first composite application, where the association relationship is an access navigation path from the first composite application to the first application snippet.
With reference to the third aspect or the second possible implementation of the third aspect, in a third possible implementation of the third aspect, the description information includes at least one of a name of the first application snippet, an executable code access path of the first application snippet, and an icon of the first application snippet.
With reference to any one of the third aspect or the first possible implementation to the third possible implementation of the third aspect, in a fourth possible implementation of the third aspect, the processing module is further configured to determine that a user has executed the first application snippet.
With reference to any one of the third aspect or the first possible implementation to the fourth possible implementation of the third aspect, in a fifth possible implementation of third aspect, the obtaining module is specifically configured to: obtain the first application snippet sent by a server; or obtain the first application snippet obtained by the user through native search.
In some possible implementations, the processing module includes a composite application management module. The composite application management module and a plurality of configuration files form a plurality of composite applications on the terminal device.
In some possible implementations, the terminal device further includes a display module, configured to display the first composite application.
The terminal device in this embodiment of this application can effectively manage a large quantity of application snippets. This helps the user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
According to a fourth aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes an instruction, where when the instruction is run on a computer, the computer is enabled to perform the method according to the foregoing aspects.
According to a fifth aspect, a computer program product is provided, where when the computer program product is run on a computer, the computer is enabled to perform the method according to the foregoing aspects.
The following describes technical solutions in embodiments of this application with reference to accompanying drawings.
It should be understood that, in this embodiment of this application, the user may search for the application snippet by using the server, so that the terminal device manages the obtained application snippet. Alternatively, the user obtains the application snippet through native search on the terminal device, to manage the application snippet. Alternatively, the application snippet may be obtained in another manner. This application is not limited thereto.
The technical solution in this embodiment of this application may be applied to various terminal devices (also referred to as user equipment) that manage a received application snippet, for example, a mobile phone, a hand ring, a tablet computer, a notebook computer, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a personal digital assistant (Personal Digital Assistant, PDA) device, a handheld device having a wireless communication function, a computing device, another processing device connected to a wireless modem, an in-vehicle device, and a wearable device, and are not limited to a communications terminal.
First, a mobile phone 100 shown in
The following specifically describes the components of the mobile phone 100 with reference to
The RF circuit 110 may be configured to receive and send information or receive and send a signal during a call. Particularly, the RF circuit receives downlink information from a base station, then delivers the downlink information to the processor 130 for processing, and sends related uplink data to the base station. Usually, the RE circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, the RF circuit 110 may further communicate with a network and another device through wireless communication. The wireless communication may use any communication standard or protocol, including, but not limited to, Global System for Mobile communications (GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Lon© Term Evolution, LTE), e-mail, Short Messaging Service (Short Messaging Service, SMS), and the like. In this application, the mobile phone 100 may obtain an application snippet by using the RF circuit 110, and sends the application snippet to the processor 130 for processing.
The memory 140 may be configured to store a software program and a module. The processor 130 executes various function applications of the mobile phone 100 and data processing by running the software program and the module that are stored in the memory 140. The memory 140 may include a program storage area and a data storage area. The program storage area may store an operating system, an application required by at least one function (such as a voice playback function and an image playback function), and the like. The data storage area may store data (such as audio data and a phonebook) that is created based on use of the mobile phone 100, and the like. In addition, the memory 140 may include a high speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory, or another volatile solid-state storage device.
The input unit 150 may be configured to receive an entered digit or entered character information, and generate a key signal input related to user setting and function control of the mobile phone 100. In this application, the user sends, to the server by using the input unit 150, a request for searching for the application snippet, or searches for a local application slice of the mobile phone by using the input unit 150. Content that is entered may have various forms, for example, a keyword or a sentence. There may be a plurality of types of input media, for example, text, voice, and image. The input unit 150 may be implemented in various manners. For example, a word can be entered on a touchpad, the microphone 182 can receive a voice input, and a camera can receive an image input. Specifically, the input unit 150 may include a touch panel 151 and another input device 152. The touch panel 151, also referred to as a touchscreen, may collect a touch operation of the user on or near the touch panel 151 (such as an operation of the user on the touch panel 151 or near the touch panel 151 by using any suitable object or accessory such as a finger or a stylus), and drive a corresponding connection apparatus based on a preset program. Optionally, the touch panel 151 may include two parts: a touch detection apparatus and a touch controller. The touch detection apparatus detects a touch position of the user, detects a signal generated by the touch operation, and transfers the signal to the touch controller. The touch controller receives touch information from the touch detection apparatus, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 130. Moreover, the touch controller can receive and execute a command sent from the processor 130. In addition, the touch panel 151 may be implemented in a plurality of types, such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. The input unit 150 may include another input device 152 in addition to the touch panel 151. Specifically, the another input device 152, may include, but is not limited to, one or more of a physical keyboard, a functional key (such as a volume control key or a switch key), a trackball, a mouse, and a joystick.
The display unit 160 may be configured to display information entered by the user or information provided for the user, and various menus of the mobile phone 100. In this embodiment of this application, after the composite application is successfully created, a new icon is added to the display unit 160 of the mobile phone, and the composite application is displayed in the display unit 160. The display unit 160 may include a display panel 161. Optionally, the display panel 161 may be configured in a form of an LCD or OLED. Further, the touch panel 151 may cover the display panel 161. After detecting a touch operation on or near the touch panel 151, the touch panel 151 transfers the touch operation to the processor 130 to determine a touch event type. Subsequently, the processor 130 provides a corresponding visual output on the display panel 161 based on the touch event type. Although, in
The audio frequency circuit 180 and a speaker 181 may provide an audio interface between the user and the mobile phone 100. The audio frequency circuit 180 may convert received audio data into an electrical signal and transmit the electrical signal to the speaker 181, and the speaker 181 converts the electrical signal into a sound signal and outputs the sound signal. In addition, the microphone 182 converts a collected sound signal into an electrical signal, and the audio frequency circuit 180 receives the electrical signal and converts the electrical signal into audio data, and outputs the audio data to the RF circuit 110 to send the audio data to, for example, another mobile phone, or outputs the audio data to the memory 140 for further processing.
The Bluetooth module 183 is a printed circuit board (Printed Circuit Board Assembly, PCBA) having a Bluetooth function and used for short-distance wireless communication, and is classified into a Bluetooth data module and a Bluetooth voice module based on functions, and the mobile phone communicates with another user by using the Bluetooth module 183, and obtains the application snippet by using the Bluetooth module 183.
Wi-Fi belongs to a short-distance wireless transmission technology. By using the Wi-Fi module 190, the mobile phone 100 may help the user receive and send an email, browse a web page, access streaming media, and the like. The Wi-Fi module 190 provides wireless access to the broadband Internet for the user. Although
The processor 130 is a control center of the mobile phone 100, is connected to various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone 100 and data processing by running or executing the software program and/or the module stored in the memory 140 and invoking data stored in the memory 140, to implement various mobile-phone-based services. Optionally, the processor 130 may include one or more processing units. Preferably, the processor 130 may integrate an application processor and a modem processor, where the application processor may process the operating system, a user interface, an application, and the like, and the modem processor may process wireless communication. It may be understood that the foregoing modem processor may alternatively not be integrated into the processor 130. The processor 130 obtains an application snippet obtained through native search or an application snippet obtained from the server, the processor 130 determines classification information of the application snippet, and searches an existing composite application of the mobile phone for a composite application of a same type based on the classification information. If there is a composite application of a same type, the processor 130 adds the application snippet to the composite application; or if there is no composite application of a same type, the processor 130 generates a new composite application, and adds the application snippet to the newly-generated composite application, that is, establishes an association relationship between the application snippet and the composite application. The processor 130 further sends an instruction to the display unit 160, to instruct the display unit 160 to add a new icon to a desktop of the mobile phone to indicate the newly-generated composite application.
The mobile phone 100 may further include the power supply 120 (such as a battery) supplying power to the components. Preferably, the power supply may be logically connected to the processor 130 by using a power management system, to implement functions such as management of charging, discharging, and energy consumption by using the power management system.
Although not shown, a camera and the like may be further included in the mobile phone 100, and details are not described herein.
It should be noted that, the mobile phone shown in
S210, Obtain a first application snippet.
Specifically, a user may obtain the first application snippet from a server or through native search on the terminal device. For example, the user may search for the first application snippet by sending a search instruction to the server in two manners: entering text by using the input unit 150 of the mobile phone 100 or entering a voice to the server by using the microphone 182, or obtain the first application snippet through native search on the mobile phone 100. The entered text or voice includes classification information of the first application snippet (for example, a service identifier of the first application snippet). A communications interface of the mobile phone 100 receives the obtained first application snippet.
It should be understood that, the communications interface of the mobile phone 100 may be the RF circuit 110 in the mobile phone 100, the Wi-Fi module 190 in the mobile phone 100, or the Bluetooth module 183. This application is not limited thereto.
The application snippet may include the following parts:
(1) Entrance: The user executes the application snippet through the entrance. For example, an icon is an entrance, and the user clicks the icon to execute a program corresponding to the icon.
(2) Program: The program is a body of the application snippet and is capable of implementing service logic of the application snippet.
(3) Classification: The classification describes function classifications of the application snippet. The attribute of classification may be expressed in a plurality of forms.
It should be understood that, the foregoing function classification information of the application snippet is usually stored in a configuration file published along with the application snippet. This application is not limited thereto.
S220. Determine first classification information of the first application snippet.
Specifically, after obtaining the first application snippet, the terminal device processes the first application snippet, to determine first classification information in the first application snippet. The first classification information may be at least one of the classification tag, the service function description, and the classification identifier in the foregoing function classification information.
For example, the terminal device is the mobile phone 100. The mobile phone 100 obtains the first application snippet by using the RF circuit 110, the Wi-Fi module 190, or the Bluetooth module 183. The RF circuit 110, the Wi-Fi module 190, or the Bluetooth module 183 may send the obtained first application snippet to the processor 130 for processing. After receiving the first application snippet, the processor 130 determines the classification information of the first application snippet.
S230. Determine that classification information of a first composite application on the terminal device matches the first classification information.
Specifically, the terminal device may have a plurality of composite applications, and each composite application has respective classification information. The terminal device may perform matching between classification information of the plurality of composite applications and the first classification information, to determine that classification information of a first composite application in the plurality of composite applications matches the first classification information.
For example, the terminal device is the mobile phone 100. After processing the first classification information, the processor 130 of the mobile phone 100 may further determine the classification information of the plurality of composite applications in the mobile phone 100, and the processor 130 performs matching between the classification information of the plurality of composite applications and the first classification information, to determine that classification information of a specific composite application in the plurality of composite applications matches the first classification information.
The following describes the composite application. The composite application may include the following four parts:
(1) Entrance: The user executes the composite application through the entrance. For example, a desktop icon of the terminal device is a typical entrance.
(2) Container: The container is configured to manage an application module in the composite application. The user executes the composite application through the entrance, that is, first enters the container. The container displays an application snippet included in the composite application. If there is no application snippet in the composite application, the container is empty. It should be understood that, a rectangular frame displayed on the desktop of the intelligent terminal is a typical container.
(3) Application snippet: content included in the container. When the application snippet is added to a composite application, an association relationship is established between the application snippet and the container of the composite application. When the container is displayed, the application snippet included in the container is displayed. The user can execute the application snippet through the entrance of the application snippet.
(4) Classification: The classification is used to describe classification information of the composite application. Usually; a tag or an “attribute-value” pair is a common method for describing classification information. For example, “food ordering”, “film ticket”, “car ordering”, “group buying”, or the like can be used as a classification.
The composite application has no service logic, and therefore functions of a plurality of composite applications can be implemented by using a composite application management module plus a plurality of configuration files. Each composite application resolves three problems: how to navigate a container by using an entrance icon, how to display the icon of the application snippet by using the container, and how to execute the application snippet by using the icon of the application snippet. Certainly, the composite application can provide a basic public capacity to the application snippet included in the composite application, for example, a user management capability and a payment management capability.
S240. Add the first application snippet to the first composite application.
Specifically, after determining that the first classification information matches the classification information of the first composite application, the terminal device may add the first application snippet to the first composite application.
Optionally, the adding the first application snippet to the first composite application includes: adding description information of the first application snippet to a configuration file of the first composite application, where the description information includes at least one of a name of the first application snippet, an executable code access path of the first application snippet, and art icon of the first application snippet.
It should be understood that, an association relationship between the first application snippet and the first composite application is established when the first application snippet is added to the first composite application, where the association relationship is an access navigation path from the first composite application to the first application snippet.
It should further be understood that, an application snippet file can be located through the executable code access path of the application snippet, so that the application snippet cart be executed by using the composite application as an entrance.
According to the method for managing an application snippet in this embodiment of this application, a large quantity of application snippets can be effectively managed. This helps a user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
S310. Obtain a second application snippet.
It should be understood that, the terminal device may obtain the second application snippet before obtaining the first application snippet in S210. The first application snippet and the second application snippet are different application snippets, or may be a same application snippet. An obtaining process is the same as an application process of the foregoing first application snippet. For brevity, details are not described herein again.
S320. Determine second classification information of the second application snippet.
It should be understood that, a process of determining the second classification information of the second application snippet by the terminal device is the same as the foregoing process of determining the first classification information. For brevity, details are not described herein again.
S330. Determine that classification information of no composite application on the terminal device matches the second classification information.
Specifically, the terminal device may have a plurality of composite applications, and each composite application has respective classification information. The terminal device may perform matching between the classification information of the plurality of composite applications and the second classification information, to determine that the classification information of the plurality of composite applications does not match the second classification information.
For example, the terminal device is the mobile phone 100. After processing the first classification information, the processor 130 of the mobile phone 100 may further determine the classification information of the plurality of composite applications in the mobile phone 100, and the processor 130 performs matching between the classification information of the plurality of composite applications and the second classification information, to determine that the classification information of the plurality of composite applications does not match the second classification information.
S340. Create a first composite application, where classification information of the first composite application matches the first classification information and the second classification information.
Specifically, after the terminal device determines that the classification information of the plurality of composite applications does not match the second classification information, the terminal device creates the first composite application, where the classification information of the first composite application matches the first classification information and the second classification information. After obtaining the first application snippet, the terminal device may add the first application snippet to the first composite application.
For example, when the terminal device is a mobile phone 100, after the processor 130 of the mobile phone 100 determines that classification information of no composite application in the mobile phone 100 matches the second classification information, the processor 130 creates the first composite application. After obtaining the first application snippet by using the RF circuit 110, the Wi-Fi module 190, or the Bluetooth module 183, the mobile phone 100 sends the first application snippet to the processor 130. After determining the first classification information of the first application snippet, the processor 130 determines that the classification information of the first composite application matches the first classification information, so that the processor 130 determines to add the first application snippet to the first composite application.
S350. Add the second application snippet to the first composite application.
It should be understood that, a process of adding the second application snippet to the first composite application by the terminal device is the same as the process of adding the first application snippet to the first composite application. For brevity, details are not described herein again.
It should further be understood that, the method 300 for managing an application snippet may be performed before the method 200.
According to the method for managing an application snippet provided in this embodiment of this application, a large quantity of application snippets can be effectively managed. This helps a user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
S410. A user sends, to a server by using an input unit, a request for searching for an application snippet.
Specifically, content entered by the user by using the input unit of a terminal device (for example, the input unit 150 of the mobile phone 100) may have a plurality of forms, for example, a keyword or a sentence. There may be a plurality of types of input media, for example, text, voice, and image. The input unit may be implemented in various forms. For example, a touchpad can receive an entered word, a microphone can receive a voice input, and a camera can receive an image input.
It should be understood that, the user not only can search for the application snippet by using the server, but also cart obtain the application snippet through native search on the terminal device. This application is not limited thereto.
S420. The server sends the application snippet to a processor of a terminal device.
Specifically, after receiving the search request, the terminal device finds the matched application snippet and returns the application snippet to the processor of the terminal device.
S430. The processor of the terminal device determines classification information of the application snippet.
Specifically, the processor of the terminal device obtains an application snippet release package, and obtains a function classification attribute through decomposition according to a constitutive rule of the application snippet release package. For example, a group of tags or a paragraph of function description is obtained. The obtained function classification attribute is further processed, to determine the classification information of the application snippet. For example, an application snippet is provided with a plurality of tags, and one of the tags is selected; or an application snippet is provided with a paragraph of text description, word segmentation and syntax analysis are performed, to extract a word that is used to describe a function.
Optionally, before the step is performed, it can be determined whether the user has executed the application snippet, that is, if the user does not execute the application snippet, it is considered that the application snippet is unimportant and does not need to be stored on the intelligent terminal, and therefore the step and a subsequent step of generating a composite application do not need to be performed.
S440. The processor of the terminal device adds the application snippet to a composite application.
Specifically, the processor of the terminal device searches a classification of an existing composite application for a composite application of a same type based on a function classification extracted in the foregoing step. If there is a composite application of a same classification, the application snippet is added to the composite application; or if there is no composite application of a same classification, a new composite application is generated. To generate a new composite application or add the application snippet to an existed composite application is to establish an association relationship between the application snippet and the composite application.
S510. The processor obtains classification information of the application snippet.
S520. A composite application management module determines whether a matched composite application can be found.
Specifically, a configuration file managed by the composite application management module includes classification information of the composite application, and the classification information is compared with classification information of the application snippet. If the two pieces of classification information are the same or are similar, it is considered that a composite application of the classification has been created; or if the two pieces of classification information do not match each other, it is considered that a composite application of the classification has not been created yet.
It should be understood that, the composite application management module may be a part of the processor.
S530. The processor creates a configuration file of the composite application.
Specifically, when determining that no configuration file has been created, the processor generates a new configuration file. Necessary information, such as a composite application icon, a composite application name, and a composite application classification, in the configuration file is determined. In addition, the icon is placed on a desktop of the terminal device, and an association relationship between the icon on the desktop and the configuration file of the composite application is established by invoking a function of an operating system.
S540. The processor adds information about the application snippet to the configuration file.
Specifically, that the information about the application snippet is added to the configuration file indicates that a navigation process from the composite application icon to the application snippet program has been established.
S450. Display the composite application in a display module.
Specifically, after the composite application is successfully established, a new icon is added to the desktop.
For example, when the terminal device is the mobile phone 100, after the composite application is successfully created by the processor 130, a new icon is added to the desktop of the mobile phone 100, and the composite application is displayed in the display unit 160.
Optionally, the container represented by using the dashed lines may not be displayed on the interface.
It should be understood that, the method for managing an application snippet in this embodiment of this application further includes an application snippet update mechanism, to be specific, an application snippet that meets a specific condition is automatically deleted from a composite application. For example, a time period may be set on the terminal device. If an application snippet saved in the time period is not started or used again, the application snippet is automatically deleted from the composite application.
According to the method for managing an application snippet in this embodiment of this application, application snippets of a same classification are grouped based on classification information, so that the application snippet can be smoothly found by the user next time without needing to be obtained from the server every time, thereby reducing traffic used in a search process and for downloading.
Each user has a different requirement, and different composite applications are formed through long-time accumulation, so that a personalization degree of the terminal device is higher.
The method for managing an application snippet according to this embodiment of this application is described in detail above with reference to
An embodiment of this application provides a terminal device for managing an application snippet. The terminal device may correspond to the mobile phone 100 in
The terminal device includes a communications interface and a processor.
The communications interface is configured to obtain a first application snippet.
The processor is configured to determine first classification information of the first application snippet.
The processor is further configured to determine that classification information of a first composite application on the terminal device matches the first classification information.
The processor is further configured to add the first application snippet to the first composite application.
Specifically, as shown in
It should be understood that, the “communications interface” represents a device configured to obtain an application snippet, and may alternatively be described as another device, for example, an “obtaining device” or a “communications device”. This application is not limited thereto.
Specifically, the mobile phone 100 may obtain a first application snippet by using the communications interface, so that the processor 130 processes the first application snippet, determines first classification information of the first application snippet, and determines that classification information of a first composite application on the terminal device matches the first classification information. Finally, the processor 130 adds the first application snippet to the first composite application.
Optionally, the communications interface is further configured to obtain a second application snippet.
The processor is further configured to determine second classification information of the second application snippet.
The processor is further configured to determine that classification information of no composite application on the terminal device matches the second classification information.
The processor is further configured to create the first composite application, where the classification information of the first composite application matches the first classification information and the second classification information.
The processing module is further configured to add the second application snippet to the first composite application.
Specifically, before obtaining the first application snippet, the mobile phone 100 obtains a second application snippet by using the communications interface. The processor 130 processes the second application snippet, determines second classification information of the second application snippet, and determines that classification information of no composite application on the terminal device matches the second classification information. The processor 130 creates the first composite application, where the first composite application matches the first classification information and the second classification information. Finally, the processor 130 adds the second application snippet to the first composite application.
Optionally, the first composite application includes a configuration file. The processor is specifically configured to add description information of the first application snippet to the configuration file of the first composite application, to establish an association relationship between the first application snippet and the first composite application, where the association relationship is an access navigation path from the first composite application to the first application snippet.
Optionally, the description information includes at least one of a name of the first application snippet, an executable code access path of the first application snippet, and an icon of the first application snippet.
Optionally, the processor is further configured to determine that a user has executed the first application snippet.
Optionally, the communications interface is specifically configured to:
obtain the first application snippet sent by a server; or
obtain the first application snippet obtained by the user through native search.
The terminal device in this embodiment of this application can effectively manage a large quantity of application snippets. This helps a user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
The terminal device groups application snippets of a same classification based on classification information, so that the application snippet can be smoothly found by the user next time without needing to be obtained from the server every time, thereby reducing traffic used in a search process and for downloading. Each user has a different requirement, and different composite applications are formed through long-time accumulation, so that a personalization degree of the terminal device is higher.
An embodiment of this application further provides a terminal device for managing an application snippet. The terminal device includes a communications module and a processing module.
The communications module is configured to obtain a first application snippet.
The processing module is configured to determine first classification information of the first application snippet.
The processing module is further configured to determine that classification information of a first composite application on the terminal device matches the first classification information.
The processing module is further configured to add the first application snippet to the first composite application.
It should be understood that, the communications module may correspond to the Wi-Fi module 190, the RF circuit 110, or the Bluetooth module 183 configured in the mobile phone 100 in
Specifically, the mobile phone 100 may obtain a first application snippet by using a communications interface, so that the processor 130 processes the first application snippet, determines first classification information of the first application snippet, and determines that classification information of a first composite application on the terminal device matches the first classification information. Finally, the processor 130 adds the first application snippet to the first composite application.
It should be understood that, the communications module may correspond to the foregoing communications interface, and the processing module may correspond to the foregoing processor. For brevity, details are not described herein again.
Optionally, the communications module is further configured to obtain a second application snippet.
The processing module is further configured to determine second classification information of the second application snippet.
The processing module is further configured to determine that classification information of no composite application on the terminal device matches the second classification information.
The processing module is further configured to create the first composite application, where the classification information of the first composite application matches the first classification information and the second classification information.
The processing module is further configured to add the second application snippet to the first composite application.
Optionally, the first composite application includes a configuration file. The processing module is specifically configured to add description information of the first application snippet to the configuration file of the first composite application, to establish an association relationship between the first application snippet and the first composite application, where the association relationship is an access navigation path from the first composite application to the first application snippet.
Optionally, the description information includes at least one of a name f the first application snippet, an executable code access path of the first application snippet, and an icon of the first application snippet.
Optionally, the processing module is further configured to determine that a user has executed the first application snippet.
Optionally, the obtaining module is specifically configured to: obtain the first application snippet sent by a server; or obtain the first application snippet obtained by the user through native search.
The terminal device in this embodiment of this application can effectively manage a large quantity of application snippets. This helps a user reduce difficulty in using a same application snippet again, and is beneficial to improvement of distribution efficiency of the application snippet.
The terminal device groups application snippets of a same classification based on classification information, so that the application snippet can be smoothly-found by the user next time without needing to be obtained from the server every time, thereby reducing traffic used in a search process and for downloading. Each user has a different requirement, and different composite applications are formed through long-time accumulation, so that a personalization degree of the terminal device is higher.
An embodiment of this application further provides a computer program product, where when the computer program product is run on a computer, the computer is enabled to perform the foregoing method for managing an application snippet.
It should be understood that the computer program product may be software, or another type of computer program product. This application is not limited thereto.
In this embodiment of this application, the processor may be a central processing unit (central processing unit, CPU), a network processor (network processor, NP), or a combination of a CPU and an NP. The processor may further include a hardware chip. The foregoing hardware chip may be an application-specific integrated circuit (Application-Specific Integrated Circuit, ASIC), a programmable logic device (Programmable Logic Device, PLD), or a combination thereof. The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (Field-Programmable Gate Array, FPGA), generic array logic (Generic Array Logic, GAL), or a combination thereof.
The memory may be a volatile memory or a non-volatile memory, or may include a volatile memory and a non-volatile memory. The non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electrically erasable programmable read-only memory (Electrically EPROM, EEPROM), or a flash memory. The volatile memory may be a random access memory (Random Access Memory, RAM), used as an external cache.
All or some of the foregoing embodiments may be implemented by using software, hardware, firmware, or any combination thereof. When software is used to implement the embodiments, the embodiments may be implemented completely or partially in a form of a computer program product. The computer program product may include one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the procedure or functions according to the embodiments of this application are all or partially generated. The computer may be a general purpose computer, a dedicated computer, a computer network, or another programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or may be transmitted from a computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired (for example, a coaxial cable, an optical fiber, or a digital subscriber line (DSL)) or wireless (for example, infrared, radio, or microwave) manner. The computer-readable storage medium may be any usable medium accessible by a computer, or a data storage device, such as a server or a data center, integrating one or more usable media. The usable medium may be a magnetic medium (for example, a soft disk, a hard disk, or a magnetic disk), an optical medium (for example, a DVD), a semiconductor medium (for example, a solid state disk (Solid State Disk, SSD)), or the like.
A person of ordinary skill in the art may be aware that, the units and algorithm steps in the examples described with reference to the embodiments disclosed in this specification may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of this application.
It may be clearly understood by a person skilled in the art that, for the purpose of convenient and brief description, for a detailed working, process of the system, apparatus, and unit, refer to a corresponding process in the method embodiments. Details are not described herein again.
In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely an example. For example, the unit division is merely logical function division and may be other division during actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented by using some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected based on actual requirements to achieve the objectives of the solutions of the embodiments.
In addition, functional units in the embodiments of this application may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units may be integrated into one unit.
When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of this application essentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The computer software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, a network device, or the like) to perform all or some of the steps of the methods described in the embodiments of this application. The foregoing storage medium includes: any medium that can store program code, such as a flash drive, a removable hard disk, a read-only memory, a random access memory, a magnetic disk, or an optical disc.
The foregoing descriptions are merely specific implementations of this application, but are not intended to limit the protection scope of this application. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in this application shall fall within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claims.
Number | Date | Country | Kind |
---|---|---|---|
201710054086.X | Jan 2017 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2017/081372 | 4/21/2017 | WO |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2018/133228 | 7/26/2018 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
9614920 | Agarwal | Apr 2017 | B1 |
10698930 | Naqvi | Jun 2020 | B2 |
20090089752 | Tristram | Apr 2009 | A1 |
20100257508 | Bajaj et al. | Oct 2010 | A1 |
20120272232 | Song | Oct 2012 | A1 |
20130159892 | Suraj | Jun 2013 | A1 |
20130174121 | Pindrik | Jul 2013 | A1 |
20140095667 | Quan et al. | Apr 2014 | A1 |
20160299972 | Samdani | Oct 2016 | A1 |
Number | Date | Country |
---|---|---|
101861566 | Oct 2010 | CN |
103455330 | Dec 2013 | CN |
105868226 | Aug 2016 | CN |
105955757 | Sep 2016 | CN |
106227400 | Dec 2016 | CN |
Entry |
---|
Yu, L., “Lucene Search Engine Development Authoritative Classic,” Oct. 31, 2008, China Railway Press, 7 pages. |
Da Pu, “Development reference: JSTL Network Label and SSH Reference Manual,” Nov. 30, 2010, China Railway Press, 6 pages. |
Machine Translation and Abstract of Chinese Publication No. CN105955757, Sep. 21, 2016, 10 pages. |
Machine Translation and Abstract of Chinese Publication No. CN105868226, Aug. 17, 2016, 16 pages. |
Machine Translation and Abstract of Chinese Publication No. CN106227400, Dec. 14, 2016, 16 pages. |
Foreign Communication From A Counterpart Application, PCT Application No. PCT/CN2017/081372, English Translation of International Search Report dated Oct. 26, 2017, 2 pages. |
Foreign Communication From A Counterpart Application, PCT Application No. PCT/CN2017/081372, English Translation of Written Opinion dated Oct. 26, 2017, 6 pages. |
Number | Date | Country | |
---|---|---|---|
20200175069 A1 | Jun 2020 | US |