WO2020228033A1 - Sdk plug-in loading method and apparatus, and mobile terminal and storage medium - Google Patents

Sdk plug-in loading method and apparatus, and mobile terminal and storage medium Download PDF

Info

Publication number
WO2020228033A1
WO2020228033A1 PCT/CN2019/087298 CN2019087298W WO2020228033A1 WO 2020228033 A1 WO2020228033 A1 WO 2020228033A1 CN 2019087298 W CN2019087298 W CN 2019087298W WO 2020228033 A1 WO2020228033 A1 WO 2020228033A1
Authority
WO
WIPO (PCT)
Prior art keywords
sdk plug
application
target
mobile terminal
plug
Prior art date
Application number
PCT/CN2019/087298
Other languages
French (fr)
Chinese (zh)
Inventor
朱洪波
Original Assignee
深圳市欢太科技有限公司
Oppo广东移动通信有限公司
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 深圳市欢太科技有限公司, Oppo广东移动通信有限公司 filed Critical 深圳市欢太科技有限公司
Priority to CN201980091635.8A priority Critical patent/CN113412468A/en
Priority to PCT/CN2019/087298 priority patent/WO2020228033A1/en
Publication of WO2020228033A1 publication Critical patent/WO2020228033A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Definitions

  • This application relates to the technical field of the Internet of Things, and more specifically, to a method, device, mobile terminal, and storage medium for loading an SDK plug-in.
  • Mobile terminals such as tablet computers and smart phones, have become one of the most commonly used consumer electronic products in people's daily lives. Users can install applications on mobile terminals to implement various functions.
  • this application proposes a method, device, mobile terminal, and storage medium for loading an SDK plug-in to solve the above problems.
  • an embodiment of the present application provides a method for loading an SDK plug-in, which is applied to a mobile terminal, where an application is installed on the mobile terminal, and a quick application is added to the application, and the method includes: the mobile The terminal receives the first start instruction for the application; when it responds to the first start instruction and meets the specified download conditions, downloads and saves the target software development kit SDK plug-in corresponding to the fast application; when it receives When the second startup instruction for the quick application is executed, the target SDK plug-in is loaded locally from the mobile terminal in response to the second startup instruction.
  • an embodiment of the present application provides a device for loading an SDK plug-in, which is applied to a mobile terminal, the mobile terminal is installed with an application program, and a quick application is added to the application program, and the device includes: an instruction receiving module , For the mobile terminal to receive the first startup instruction for the application; the SDK plug-in download module, for downloading the corresponding fast application when responding to the first startup instruction and meeting specified download conditions The target software development kit SDK plug-in is saved; the SDK plug-in loading module is used to load the target from the mobile terminal locally in response to the second start instruction when a second start instruction for the fast application is received SDK plugin.
  • an embodiment of the present application provides a mobile terminal, including a memory and a processor, the memory is coupled to the processor, and the memory stores instructions that are executed when the instructions are executed by the processor.
  • the processor executes the above method.
  • an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the foregoing method.
  • the SDK plug-in loading method, device, mobile terminal, and storage medium provided by the embodiments of the present application.
  • the mobile terminal receives the first startup instruction for the application.
  • the download and fast Apply the corresponding target SDK plug-in and save it.
  • the second startup instruction for the fast application load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction, thereby separating the download and loading of the SDK plug-in, Facilitate the optimization and management of SDK plug-ins.
  • Fig. 1 shows a schematic structural diagram of a smart home system provided by an embodiment of the present application.
  • FIG. 2 shows a schematic structural diagram of another smart home system provided by an embodiment of the present application
  • FIG. 3 shows a schematic diagram of a fast application engine architecture provided by an embodiment of the present application.
  • Fig. 4 shows a schematic diagram of an operating environment of a method for adding a quick application provided by an embodiment of the present application.
  • FIG. 5 shows a schematic flowchart of a method for loading an SDK plug-in provided by an embodiment of the present application
  • FIG. 6 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application
  • FIG. 7 shows a schematic flowchart of step S220 of the method for loading the SDK plug-in shown in FIG. 6 of the present application;
  • FIG. 8 shows a schematic flowchart of step S230 of the method for loading the SDK plug-in shown in FIG. 6 of the present application;
  • FIG. 9 shows a schematic flowchart of step S232 of the method for loading the SDK plug-in shown in FIG. 8 of the present application;
  • FIG. 10 shows a schematic flowchart of step S250 of the method for loading the SDK plug-in shown in FIG. 6 of the present application;
  • FIG. 11 shows a schematic flow chart of a method for loading an SDK plug-in provided by another embodiment of the present application.
  • FIG. 12 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application.
  • FIG. 13 shows a schematic flow chart of a method for loading an SDK plug-in provided by another embodiment of the present application
  • FIG. 14 shows a block diagram of a module of a device for loading an SDK plug-in provided by an embodiment of the present application
  • FIG. 15 shows a block diagram of an electronic device used to execute the method for loading an SDK plug-in according to an embodiment of the present application
  • Fig. 16 shows a storage unit used to store or carry the program code implementing the method for loading the SDK plug-in according to the embodiment of the present application.
  • Smart home connects various smart home devices in the home (such as air conditioners, lights, refrigerators, washing machines, etc.) through the Internet of Things technology to provide home appliance control, lighting control, telephone remote control, indoor and outdoor remote control, anti-theft alarm, and environmental monitoring , HVAC control, infrared forwarding and programmable timing control and other controls.
  • various smart home devices in the home such as air conditioners, lights, refrigerators, washing machines, etc.
  • the Internet of Things technology to provide home appliance control, lighting control, telephone remote control, indoor and outdoor remote control, anti-theft alarm, and environmental monitoring , HVAC control, infrared forwarding and programmable timing control and other controls.
  • household equipment can be air conditioners, lighting fixtures, smart lights, smart cameras, smart sockets, wireless switches, smart curtain motors, smart speakers, and various sensors (such as human sensors, door and window sensors, smoke alarms, etc.).
  • the home equipment is managed and controlled through a mobile terminal, usually by establishing a wireless connection with the smart gateway 300 through the mobile terminal 100, and establishing a wireless connection between the home equipment 200 and the smart gateway 300 to realize the mobile terminal 100 and Data interaction between household devices.
  • the mobile terminal 100 and the smart gateway 300 are in communication connection with the server 400, and the mobile terminal 100 can interact with household equipment through the server 400 and the smart gateway 300.
  • the mobile terminal 100 may be in communication connection with the first cloud server 402 to realize data interaction with the first cloud server 402.
  • the household equipment 200 communicates with the second cloud server 401 through the smart gateway 300 to realize data interaction between the second and the server 401.
  • data interaction can be performed between the first cloud server 402 and the second cloud server 401, so that the mobile terminal 100 can communicate with the household equipment 200 through the first cloud server 402, the second cloud server 404, and the smart gateway 300. Data interaction.
  • home appliances of different manufacturers usually need to be controlled through different applications. That is to say, the communication between the applications of the home equipment of different manufacturers and the servers of different manufacturers requires more applications to be installed, thus occupying mobile More storage space for the terminal.
  • the fast application is a new application form based on the hardware platform of the terminal device. It does not need to be installed, it is click-to-use, and it has the original application experience (performance, system integration, interaction, etc.).
  • the structure diagram of the fast application engine, the front-end design of the fast application draws on and integrates the design ideas of mainstream front-end frameworks (Vue, React, etc.): build applications in a componentized way, with data binding as the core
  • the MVVM design mode uses V-DOM to improve performance, while choosing a concise and clear Vue-like template.
  • a quick application and an application program 110 are running.
  • the fast application runs on the fast application engine, and the fast application engine is provided with an extension interface 97 provided by the application program.
  • the application program 110 is provided with an expansion interface 96 that communicates with the expansion interface 97.
  • the application program 110 may call software development kit (SDK, Software Development Kit) plug-ins of various manufacturers through an extended interface.
  • SDK plug-in 111 of manufacturer A, the SDK plug-in 112 of manufacturer B, and the SDK plug-in 113 of manufacturer C in the figure can be called.
  • the data processing instructions triggered in the fast application can be transferred to the extended interface 96 in the client through the extension interface 97 set in the fast application engine, and then the data processing instructions are transmitted to the SDK plug-ins of various manufacturers .
  • the application program 110 may provide an entrance to the quick application, that is, the application program 110 may enter the quick application.
  • the communication between the fast application and the application 110 may be through a cross-application communication method, such as using AIDL interaction.
  • a parameter transfer interface can be set between the application 110 and the embedded fast application for data transfer between the application 110 and the fast application.
  • a channel class can be defined between the fast application and the application 110 Interface, all interface functions are implemented using a channel class interface.
  • the application 110 may instruct the quick application engine to access the corresponding quick application according to the link of the quick application, thereby displaying the interface of the quick application.
  • the interface of the quick app can receive control information, and after the application program 110 learns the control information, it transmits the control information to the server of the home device through the above-mentioned SDK to realize the management and control of the home device.
  • the quick application engine can also receive the information transmitted by the application program 110, and display the information that needs to be displayed on the quick application control page.
  • the inventor found that when the current application enters the fast application, the SDK plug-in corresponding to the fast application will be checked and updated and judged whether to download, and the update judgment is complicated, the process is longer, and it is easy to compare with the loading time of the SDK plug-in.
  • the overlap causes the slow loading of the SDK plug-in.
  • the inventors proposed the method, device, mobile terminal, and storage medium for loading the SDK plug-in provided by the embodiments of the present application. By separating the downloading and loading of the SDK plug-in, it is convenient to optimize and manage the SDK plug-in. Wherein, the specific method for loading the SDK plug-in is described in detail in the subsequent embodiments.
  • FIG. 5 shows a schematic flowchart of a method for loading an SDK plug-in provided by an embodiment of the present application.
  • the method for loading the SDK plug-in is used to facilitate the optimization and management of the SDK plug-in by separating the downloading and loading of the SDK plug-in.
  • the SDK plug-in loading method is applied to the SDK plug-in loading device 200 as shown in FIG. 14 and the mobile terminal 100 (FIG. 15) equipped with the SDK plug-in loading device 500 (FIG. 15), An application is installed on the mobile terminal, and a quick application is added to the application.
  • the following will take a mobile terminal as an example to illustrate the specific process of this embodiment.
  • the mobile terminal applied in this embodiment can be a smart phone, a tablet computer, a wearable electronic device, a vehicle-mounted device, a gateway, etc. , There is no specific limitation here.
  • the following will elaborate on the process shown in FIG. 5, and the loading method of the SDK plug-in may specifically include the following steps:
  • Step S110 The mobile terminal receives a first start instruction for the application.
  • an application is installed on the mobile terminal and a quick application is added to the application.
  • the user wants to start the quick application, the user needs to start the application first, and then start the quick application added to the application Therefore, the user can send a startup instruction instructing to start the application to the mobile terminal, where the startup instruction is recorded as the first startup instruction, and accordingly, the mobile terminal receives the first startup instruction for the application.
  • the first start instruction may be generated when the user performs a touch operation on the icon of the application, for example, it may be generated when a single-finger click operation on the icon of the application is detected, or It is generated when a pressing operation on the icon of the application is detected, it can be generated when a multi-finger click operation on the icon of the application is detected, or it can be generated when a long operation on the icon of the application is detected.
  • the first start instruction can be generated when it is detected that the user searches for an application in the search box of the mobile terminal, for example, when the mobile terminal detects that the user searches for " When the mobile terminal detects that the user searches for “application B” in the search box, it generates the first instruction to start “application B”.
  • a startup instruction; the first startup instruction can also be generated when it is detected that the user inputs voice information to start the application on the mobile terminal. For example, when the mobile terminal detects the voice information of the user "start application A”, it is generated The first startup instruction instructing to start the "application A", when the mobile terminal detects the voice information of the user "starting the application B", it generates the first startup instruction instructing to start the "application B".
  • Step S120 When the first start instruction is responded to and the specified download condition is satisfied, download and save the target software development kit SDK plug-in corresponding to the fast application.
  • the mobile terminal is set with designated download conditions, where the designated download conditions can be stored locally in the mobile terminal after pre-setting, or can be obtained from the server in real time.
  • the designated download conditions can be configured by the mobile terminal or by User configuration is not limited here. Therefore, when the mobile terminal receives the first start instruction, it can determine whether the mobile terminal currently satisfies the specified download condition, wherein, when the mobile terminal meets the specified download condition, it downloads the target SDK corresponding to the fast application in response to the first start instruction The plug-in is saved; when the mobile terminal does not meet the specified download conditions, it does not respond to the first start instruction.
  • the specified download conditions include, but are not limited to, network conditions, SDK plug-in update conditions, etc.
  • the mobile terminal may not respond to the first start instruction; and if the current network status of the mobile terminal is good, that is, the network condition is satisfied, which means that the mobile terminal can download the fast application from the server through the network Corresponding to the target SDK plug-in, the mobile terminal responds to the first start instruction to download and save the target SDK plug-in.
  • Step S130 When a second startup instruction for the quick application is received, load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction.
  • the user when the user wants to start the quick application in the application, he can send a startup instruction instructing to start the quick application to the mobile terminal, where the startup instruction is recorded as the second startup instruction, and correspondingly, the mobile terminal Receive a second start instruction for the fast application.
  • the second start instruction may be generated when the user performs a touch operation on the controls of the quick application in the application, for example, may be a single-finger click operation on the controls of the quick application is detected Time generation, it can be generated when a pressing operation on the control of the quick application is detected, it can be generated when a multi-finger click operation on the control of the quick application is detected, or it can be generated when the It is generated during long-press operation on the control of the application, etc., which are not limited here; the second start instruction may be generated when it is detected that the user searches for the fast application in the search box of the application, for example, when the mobile terminal detects the user When searching for "Quick Application A" in the search box of the application, a second startup instruction instructing to start "Quick Application A" is generated.
  • a second start instruction indicating to start "Quick Application B" is generated; the second start instruction can also be generated when it is detected that the user enters the voice information to start the application in the application, for example, when the mobile terminal detects that the user is in When the voice message of "Launch Quick App A" is input in the application, a second start instruction instructing to start "Quick App A” is generated.
  • a second start instruction instructing to start "Quick Application B" is generated.
  • the mobile terminal loads the target SDK plug-in locally from the mobile terminal in response to the second start instruction, so that the fast app can obtain corresponding control and services from its corresponding vendor server through the target SDK plug-in. Therefore, in this embodiment of the application, the download and loading of the target SDK plug-in is time-sharing processing, making the processing of downloading and loading the target SDK plug-in more flexible and more conducive to optimization.
  • the target SDK plug-in is downloaded and saved in the mobile terminal in advance. Locally, it also makes the target SDK plug-in load faster when entering the fast application, improving the user experience.
  • the target SDK plug-in may be implemented through the main process of the mobile terminal, and the loading of the target SDK plug-in may be implemented through the ipc process or main thread of the mobile terminal; or the target SDK plug-in may be implemented through the main process of the mobile terminal.
  • the target SDK plug-in can be loaded in a mixed manner, for example, through the main process and the ipc process of the mobile terminal at the same time, or through the main process and the main thread of the mobile terminal at the same time.
  • the SDK plug-in has the main process UI, so this part of the trustworthy part can be loaded separately in the main process, while the other parts can be implemented by the ipc process or main thread of the mobile terminal. Since the technical side is loaded separately, it can facilitate subsequent optimization of the SDK plug-in .
  • the mobile terminal receives the first startup instruction for the application, and when it responds to the first startup instruction and meets the specified download conditions, downloads the target SDK plug-in corresponding to the fast application and Save, when receiving the second startup instruction for the quick application, load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction, so as to facilitate the optimization and optimization of the SDK plug-in by separating the download and loading of the SDK plug-in management.
  • FIG. 6 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application.
  • the method is applied to the above-mentioned mobile terminal.
  • the process shown in FIG. 6 will be described in detail below.
  • the method for loading the SDK plug-in may specifically include the following steps:
  • Step S210 The mobile terminal receives a first start instruction for the application.
  • step S210 For the specific description of step S210, please refer to step S110, which will not be repeated here.
  • Step S220 Acquire parameter information of the quick application when the first start instruction is responded to and the specified download condition is satisfied.
  • the mobile terminal when it is determined that the mobile terminal satisfies the specified download conditions, it can also respond to the first start instruction to obtain the parameter information of the fast application, where the parameter information can be used as the mobile terminal corresponding to the fast application
  • the input parameters of the download interface of the target SDK plug-in when it is determined that the mobile terminal satisfies the specified download conditions, it can also respond to the first start instruction to obtain the parameter information of the fast application, where the parameter information can be used as the mobile terminal corresponding to the fast application.
  • FIG. 7 shows a schematic flowchart of step S220 of the method for loading the SDK plug-in shown in FIG. 6 of the present application.
  • the process shown in FIG. 7 will be described in detail below, and the method may specifically include the following steps:
  • Step S221 Obtain brand information corresponding to the quick application.
  • the mobile terminal can obtain the brand information corresponding to the quick app, where the mobile terminal can obtain the brand information corresponding to the quick app from its corresponding terminal server, or obtain the brand information from the manufacturer server corresponding to the quick app. Quickly apply the corresponding brand information, which is not limited here.
  • the mobile terminal can obtain the identification information of the quick application and send the identification information to the terminal server, and the terminal server searches for the quick application according to the identification information. Identify the brand information corresponding to the identification information and return the brand information to the mobile terminal.
  • the terminal server stores multiple identification information and the mapping relationship between multiple brand information.
  • the identification information A can be sent to the terminal server, and the terminal server searches for the brand information corresponding to the identification information A from the saved mapping relationship, and when it finds that the brand information corresponding to the identification information A is the brand In the case of information A, the brand information A can be returned to the mobile terminal.
  • Step S222 Obtain a first protocol version number of the application program, where the first protocol version number is used to characterize the largest version among the protocol version numbers supported by the application program.
  • the mobile terminal obtains the first protocol version number of the application program, where the first protocol version number is used to characterize the largest version among the protocol version numbers supported by the application program, and the first protocol version number is hard-coded It is written, that is, the version number of the first protocol is fixed.
  • the version number of the first protocol can remain unchanged, or it can remain unchanged after the update. This is not limited.
  • the first protocol version number is fixed as “version number 1”
  • the version number of the application program is updated to “version number 2”
  • the first protocol version number can remain unchanged, that is, continue to be fixed as “version number 1”, or it can be updated and fixed as “version number 2", which is not limited here.
  • Step S223 Generate parameter information of the quick application based on the brand information and the first protocol version number.
  • the parameter information of the quick application can be generated based on the brand information and the first protocol version number, and The parameter information is used as the input parameter of the download interface of the target SDK plug-in corresponding to the fast application by the mobile terminal.
  • Step S230 Download and save the target SDK plug-in corresponding to the fast application based on the parameter information.
  • the target SDK plug-in corresponding to the quick application can be downloaded and saved, so as to improve the accuracy of downloading the target SDK plug-in.
  • the latest version of the SDK plug-in corresponding to the quick application can be downloaded and saved based on the parameter information. For example, if the protocol version number includes protocol version number 1 and protocol version number 2, and the protocol version number of the protocol is 2 The version number is greater than the protocol version number of the protocol version number 1, where the protocol version number is the version number of the jar package defining the interface specification of the SDK plug-in.
  • the vendor server corresponding to the fast app will first search for the SDK plug-in of the protocol version number 2. If it finds that the protocol version number 2 includes For SDK plug-in, search for the latest version of SDK plug-in from protocol version number 2, and return the latest version of SDK plug-in to the mobile terminal as the target SDK plug-in; if no SDK plug-in of protocol version number 2 is found
  • the protocol version number requested by the mobile terminal is protocol version number 2
  • the protocol version number used by the manufacturer’s server corresponding to the fast app is protocol version number 1
  • the vendor server corresponding to the fast app will only search for the SDK plug-in of the protocol version number 1. If the protocol version number 1 includes When the SDK plug-in is used, the latest version of the SDK plug-in is retrieved from the protocol version number 1, and the latest version of the SDK plug-in is returned to the mobile terminal as the target SDK plug-in. Therefore, in this embodiment, the SDK plug-in is downward compatible.
  • FIG. 8 shows a schematic flowchart of step S230 of the method for loading the SDK plug-in shown in FIG. 6 of the present application.
  • the process shown in FIG. 8 will be described in detail below, and the method may specifically include the following steps:
  • Step S231 Obtain a vendor server corresponding to the fast application based on the brand information.
  • the vendor server corresponding to the fast application can be obtained based on the brand information in the parameter information.
  • different fast apps correspond to different brand information
  • different brand information corresponds to different vendor servers. Therefore, it can be based on the correspondence between fast apps-brand information-vendor servers, and based on the brand information Obtain the vendor server corresponding to the quick app.
  • Table 1 shows a correspondence between fast apps, brand information, and vendor servers.
  • fast application is represented by K
  • brand information is represented by P
  • vendor server is represented by C.
  • K Brand Information
  • P Vendor Server
  • the fast app is K1, then based on the correspondence between K1-P1-C1, it can be determined that the brand information corresponding to the fast app K1 is brand P1, and the manufacturer server corresponding to the fast app K1 is the manufacturer server C1; if The fast application is K2, then, based on the correspondence between K2-P2-C2, it can be determined that the brand information corresponding to the fast application K2 is brand P2, and the manufacturer server corresponding to the fast application K2 is the manufacturer server C2, etc. This will not be repeated here.
  • Step S232 Based on the first protocol version number, search for the latest version of the SDK plug-in under the first protocol version number in the vendor server and save it.
  • the latest version under the first protocol version number can be searched in the vendor server based on the first protocol version number in the parameter information SDK plug-in and save. For example, if the first protocol version number is protocol version number 2, search for the latest version of the SDK plug-in of protocol version number 2 in the manufacturer’s server and save it; if the first protocol version number is protocol version number 1, then Find the latest version of the SDK plug-in with protocol version 1 in the manufacturer's server and save it.
  • FIG. 9 shows a schematic flowchart of step S232 of the method for loading the SDK plug-in shown in FIG. 8 of the present application.
  • the process shown in FIG. 9 will be described in detail below, and the method may specifically include the following steps:
  • Step S2321 Determine whether the vendor server includes the SDK plug-in under the first protocol version number.
  • the mall server includes the SDK plug-in under the first protocol version number. For example, if the first protocol version number is the protocol version number 2, it can be judged whether the manufacturer’s server includes the SDK plug-in of the protocol version number 2; if the first protocol version number is the protocol version number 1, the manufacturer’s server can be judged Whether to include the SDK plug-in of the protocol version number 1.
  • Step S2322 If the vendor server includes the SDK plug-in under the first protocol version number, based on the first protocol version number, search the vendor server for the latest version of the SDK under the first protocol version number Plug-in and save.
  • the latest version of the SDK plug-in under the first protocol version number can be searched and saved in the manufacturer's server. For example, if the first protocol version number is protocol version number 2, and the manufacturer’s server includes the SDK plug-in under protocol version number 2, then the manufacturer’s server can search for the latest version of all SDK plugins under protocol version number 2. SDK plug-in to obtain the latest version of the SDK plug-in and save it.
  • Step S2323 If the vendor server does not include the SDK plug-in under the first protocol version number, obtain the second protocol version number of the application, where the second protocol version number is smaller than the first protocol version number.
  • the second protocol version number of the application can be obtained, where the second protocol version number is smaller than the first protocol version
  • the first protocol version number is protocol version number 5
  • the manufacturer’s server does not include the SDK plug-in under protocol version number 5
  • Protocol version number 4 and other protocol version numbers less than protocol version number 5 select a second protocol version number, for example, select protocol version number 4 as the second protocol version number, and protocol version number 2 as the second Protocol version number, etc.
  • the second protocol version number is only smaller than the first protocol version number. For example, if the first protocol version number is the protocol version number 5, then the second protocol version number is the protocol version number 4; if the first protocol version number is the protocol version number 4, then the second protocol The version number is the protocol version number 3. It will not be repeated here.
  • Step S2324 Based on the second protocol version number, search for the latest version of the SDK plug-in under the second protocol version number in the vendor server.
  • the latest version of the SDK plug-in under the second protocol version number can be searched in the manufacturer’s server to improve the possibility that the mobile terminal can obtain the latest version of the SDK plug-in that can be run , Improve user experience.
  • Step S240 When receiving the second startup instruction for the fast application, respond to the second startup instruction to obtain the target SDK plug-in locally from the mobile terminal.
  • step S240 please refer to step S130, which will not be repeated here.
  • Step S250 Separate the target file from the target SDK plugin and load the target SDK plugin.
  • the target file in the SDK plug-in can be separated and the target SDK plug-in can be loaded, where the target file includes at least a configuration file and a so file, thereby Ensure that the SDK plugin reads files quickly when in use.
  • the target SDK plug-in can be directly loaded dynamically, but the so file in the target file still needs to be loaded separately.
  • the so file can be loaded using loadlibrary, and the configuration file can be loaded when loading. Read in the code.
  • FIG. 10 shows a schematic flowchart of step S250 of the method for loading the SDK plug-in shown in FIG. 6 of the present application.
  • the following will elaborate on the process shown in FIG. 10, and the method may specifically include the following steps:
  • Step S251 Separate the target file from the target SDK plug-in, and determine whether the target file is complete.
  • the mobile terminal after the mobile terminal separates the target file from the target SDK plug-in, it can determine whether the target file is complete, for example, whether the configuration file and the so file are complete.
  • Step S252 If the target file is complete, load the target SDK plug-in.
  • the target SDK file can be loaded directly.
  • the target file such as the configuration file and the so file is separated from the SDK plug-in, it can be removed from the SDK again.
  • the target file is separated from the plug-in, so as to ensure that when the target file such as the configuration file or the so file is accidentally damaged or deleted, it can be processed again. This can ensure that there will be no errors when loading, and ensure the safety and security of the SDK plug-in loading. The integrity of the loaded SDK plug-in, while ensuring the speed of loading.
  • Step S260 When the mobile terminal downloads the SDK plug-in corresponding to the quick application to be loaded, it is determined whether the application is killed after the target SDK plug-in is loaded.
  • the mobile terminal downloads the SDK to be loaded corresponding to the fast application again after loading the target SDK, it can judge whether the application is killed after loading the target SDK plug-in, that is, it can be judged Whether the application completely exits after loading the target SDK plug-in.
  • Step S270 If the mobile terminal is not killed after loading the target SDK plug-in, save the SDK plug-in to be loaded, and keep the target SDK plug-in as the current SDK plug-in of the fast application.
  • the SDK plug-in to be loaded can be saved as the SDK plug-in to be loaded next time, and the target SDK plug-in can be kept as the Kuaiapp’s current SDK plug-in, that is, even if the mobile terminal downloads the SDK plug-in to be loaded again, if the application is not killed during the process from loading the target SDK plug-in to downloading to the SDK plug-in to be loaded, it will not be restarted Load other SDK plugins, such as not reloading the SDK plugin to be loaded.
  • the mobile terminal receives the first startup instruction for the application, and when it responds to the first startup instruction and satisfies the specified download conditions, obtains the parameter information of the quick application, based on the The parameter information downloads the target SDK plug-in corresponding to the quick application and saves it.
  • the target SDK plug-in is obtained locally from the mobile terminal, the target file is separated from the target SDK plug-in, and the target SDK plug-in is loaded.
  • this embodiment can download the SDK plug-in based on the parameter information of the fast application to improve the speed and accuracy of obtaining the SDK plug-in.
  • the target file can be separated from the target SDK plug-in. And load it to improve the loading speed of the target SDK plug-in and the security of records.
  • FIG. 11 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application.
  • the method is applied to the above-mentioned mobile terminal.
  • the process shown in FIG. 11 will be described in detail below.
  • the method for loading the SDK plug-in may specifically include the following steps:
  • Step S310 The mobile terminal receives a first start instruction for the application.
  • Step S320 Acquire parameter information of the quick application when the first start instruction is responded to and the specified download condition is satisfied.
  • Step S330 Download and save the target SDK plug-in corresponding to the fast application based on the parameter information.
  • Step S340 When receiving a second startup instruction for the quick application, respond to the second startup instruction to obtain the target SDK plug-in locally from the mobile terminal.
  • Step S350 Separate the target file from the target SDK plugin and load the target SDK plugin.
  • step S310 to step S350 please refer to step S210 to step S250, which will not be repeated here.
  • Step S360 When the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application, it is determined whether the target SDK plug-in is deleted.
  • the mobile terminal downloads the SDK plug-in to be loaded corresponding to the fast application again, it can determine whether the target SDK plug-in is deleted, that is, it can detect whether the target SDK plug-in It is deleted from the memory of the mobile terminal.
  • Step S370 If the target SDK plug-in is not deleted, save the SDK plug-in to be loaded, and keep the target SDK plug-in as the current SDK plug-in of the quick application.
  • the SDK plug-in to be loaded can be saved as the SDK plug-in to be loaded next time, and the target SDK plug-in can be kept as the current SDK plug-in of the fast application. That is, even if the mobile terminal downloads the SDK plug-in to be loaded again, if the target SDK plug-in is not deleted from the memory of the mobile terminal from loading the target SDK plug-in to downloading to the SDK plug-in to be loaded, it will not be reloaded Other SDK plug-ins, such as not reloading the SDK plug-in to be loaded, so as to ensure that multiple versions of SDK plug-ins will not be loaded together.
  • the mobile terminal receives the first startup instruction for the application, and when it responds to the first startup instruction and satisfies the specified download conditions, obtains the parameter information of the quick application, based on the The parameter information downloads the target SDK plug-in corresponding to the quick application and saves it.
  • the target SDK plug-in is obtained locally from the mobile terminal, the target file is separated from the target SDK plug-in, and the target SDK plug-in is loaded.
  • the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick app again, it is judged whether the target SDK plug-in is deleted.
  • this embodiment can download the SDK plug-in based on the parameter information of the fast application to improve the speed and accuracy of obtaining the SDK plug-in.
  • the target file can be separated from the target SDK plug-in. And load it to improve the loading speed of the target SDK plug-in and the security of records.
  • FIG. 12 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application.
  • the method is applied to the above-mentioned mobile terminal, the mobile terminal is installed with an application program, and multiple quick applications are added to the application program.
  • the process shown in FIG. 12 will be described in detail below.
  • the loading method of the SDK plug-in is specifically It can include the following steps:
  • Step S410 The mobile terminal receives a first start instruction for the application.
  • step S410 For the specific description of step S410, please refer to step S110, which will not be repeated here.
  • Step S420 In response to the first start instruction, start the application and display the home page of the application.
  • the mobile terminal can start the application in response to the first start instruction, and enter and display the home page of the application.
  • Step S430 Obtain the device information displayed on the home page, and obtain the target quick application corresponding to the device information.
  • the homepage of the application can display device information of multiple devices, and the device information can be displayed in text form.
  • the homepage of the application displays "XX air conditioner", “XX refrigerator”, “XX TV”, etc.
  • "XX” can characterize the brand; device information can be displayed in the form of pictures, for example, the home page of the application displays pictures including XX air conditioning text, displays pictures including XX refrigerator text, displays pictures including XX TV text, etc.
  • the home page display of the application program includes controls for XX air conditioner text, controls for display including XX refrigerator text, and controls for display including XX TV text, which are not limited here.
  • the display content of the homepage of the application can be recognized.
  • the picture displayed on the homepage of the mobile terminal, the text displayed on the homepage, and the controls displayed on the homepage can be recognized to obtain the device displayed on the homepage of the application. information.
  • the target quick application corresponding to the device information can be obtained according to the device information.
  • the corresponding relationship between the quick application and the device information can be established, so as to determine the quick application corresponding to the device identification according to the device identification.
  • the correspondence between quick apps and device information can be stored in the mobile terminal where the application is installed in the form of a list. In the list, each device information corresponds to one quick app, or multiple device information corresponds to A quick application.
  • Step S440 download and save the target SDK plug-in corresponding to the target quick application among the multiple quick applications first.
  • the control corresponding to the device information is most likely to be selected by the user. Therefore, in order to ensure that the user selects the control corresponding to the device information,
  • the SDK plug-in corresponding to the target quick application corresponding to the device information has been downloaded to improve user experience, and the target SDK plug-in corresponding to the target quick application among the multiple quick applications can be downloaded first and saved.
  • the mobile terminal can separately download the target SDK plug-in corresponding to each of the multiple quick applications, and save the target SDK plug-in corresponding to each quick application in a different storage area, thereby achieving different brands , SDK plug-ins with different protocol versions and different protocol version numbers are stored in different directories, and will not interfere with each other when downloading and loading.
  • Step S450 When receiving a second startup instruction for the target flash application, load the target SDK plug-in corresponding to the target flash application from the local of the mobile terminal in response to the second startup instruction, and continue to download the Target SDK plug-ins corresponding to other fast applications in the multiple fast applications except the target fast application.
  • the mobile terminal loads the target SDK plug-in corresponding to the target fast application in response to the second start instruction, it can also continue to download the target SDK plug-ins corresponding to other fast apps among the multiple fast apps except the target fast application. Therefore, , Can realize that the download of SDK plug-in will not affect the normal use of users, and improve user experience.
  • the mobile terminal receives the first startup instruction for the application, responds to the first startup instruction, starts the application and displays the homepage of the application, and obtains the device information displayed on the homepage , And obtain the target fast application corresponding to the device information, download and save the target SDK plug-in corresponding to the target fast application among multiple fast applications first, and respond to the second start instruction for the target fast application when receiving the second start instruction for the target fast application.
  • the start instruction loads the target SDK plug-in corresponding to the target fast application from the local of the mobile terminal, and continues to download the target SDK plug-ins corresponding to other fast applications in the multiple fast applications except the target fast application.
  • this embodiment also preferentially records the target SDK plug-in of the fast application corresponding to the device information displayed by the application program, thereby improving user experience.
  • FIG. 13 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application.
  • the method is applied to the above-mentioned mobile terminal, the mobile terminal is installed with an application program, and multiple quick applications are added to the application program.
  • the process shown in FIG. 13 will be described in detail below.
  • the method for loading the SDK plug-in is specifically It can include the following steps:
  • Step S510 The mobile terminal receives a first start instruction for the application.
  • step S510 For the specific description of step S510, please refer to step S110, which will not be repeated here.
  • Step S520 In response to the first startup instruction, obtain the current SDK plug-in of the quick application and identify the current version of the current SDK plug-in.
  • the mobile terminal when the mobile terminal receives the first startup instruction, it can respond to the first startup instruction to obtain the current SDK plug-in of the fast application, and identify the current version of the current SDK plug-in.
  • Step S530 Determine whether the current version is the latest version.
  • the version number of the current version and the version number of the latest version can be obtained separately, and whether the version number of the current version is consistent with the version number of the latest version is compared, if the version number of the current version is consistent with the version number of the latest version , It can be determined that the current version is the latest version. If the version number of the current version is inconsistent with the version number of the latest version, it can be determined that the current version is not the latest version.
  • Step S540 If the current version is not the latest version, download the latest version of the SDK plug-in corresponding to the quick application and save it.
  • the latest version of the SDK plug-in corresponding to the quick app can be downloaded and saved to ensure that the SDK plug-in loaded by the quick app is the latest version; as another In this way, if the judgment result indicates that the current version is the latest version, the download processing of the SDK plug-in may not be performed to reduce the power consumption of the mobile terminal.
  • Step S550 In response to the second start instruction, detect whether the mobile terminal is configured with an original SDK plug-in corresponding to the quick application.
  • the mobile terminal when the mobile terminal receives the second startup instruction, it can respond to the second startup instruction to detect whether the mobile terminal is configured with the original SDK plug-in corresponding to the quick application, that is, it can respond to the second startup
  • the instruction detects whether the mobile terminal is loaded with the original SDK plug-in corresponding to the fast application.
  • Step S560 If the mobile terminal is configured with an original SDK plug-in corresponding to the quick application, forcibly update the original SDK plug-in to the target SDK plug-in.
  • the original SDK plug-in can be forced to update to the target SDK plug-in to ensure that the version of the SDK plug-in loaded by the mobile terminal is the latest version .
  • Step S570 If the mobile terminal is configured with the original SDK plug-in corresponding to the quick application, output a prompt message, wherein the prompt message user prompts the user to choose whether to update the original SDK plug-in to the target SDK plug-in.
  • a prompt message can be output to deliberately prompt the user to choose whether to update the original SDK plug-in to the target SDK plug-in, so as to improve user experience.
  • the mobile terminal receives the first startup instruction for the application, responds to the first startup instruction, obtains the current SDK plug-in of the fast application and identifies the current version of the current SDK plug-in, and judges Whether the current version is the latest version, if the current version is not the latest version, download the latest version of the SDK plug-in corresponding to the quick app and save it, respond to the second start instruction, and detect whether the mobile terminal is configured with the original corresponding to the quick app SDK plug-in, if the mobile terminal is configured with the original SDK plug-in corresponding to the quick app, it is mandatory to update the original SDK plug-in to the target SDK plug-in, or if the mobile terminal is configured with the original SDK plug-in corresponding to the quick app, a prompt message is output, the prompt message Used to prompt the user to choose whether to update the original SDK plugin to the target SDK plugin.
  • this embodiment downloads the target SDK plug-in when the current SDK plug-in version of the fast application is not the latest version, reducing the power consumption of the mobile terminal.
  • the mobile terminal is configured with a fast When applying the corresponding original SDK plug-in, it is mandatory to update or the user chooses to update to improve user experience.
  • FIG. 14 shows a block diagram of a device 500 for loading an SDK plug-in according to an embodiment of the present application.
  • the loading device 500 of the SDK plug-in is applied to the above-mentioned mobile terminal, the mobile terminal is installed with an application program, and a quick application is added to the application program.
  • the SDK plug-in loading device 500 includes: an instruction receiving module 510, an SDK plug-in downloading module 520, and an SDK plug-in loading module 530, where:
  • the instruction receiving module 510 is used for the mobile terminal to receive a first start instruction for the application.
  • the SDK plug-in download module 520 is configured to download and save the target software development kit SDK plug-in corresponding to the fast application when the specified download condition is met in response to the first start instruction. Further, the SDK plug-in download module 520 includes: a parameter information acquisition sub-module and a first SDK plug-in download sub-module, wherein:
  • the parameter information acquisition sub-module is used to acquire the parameter information of the fast application. Further, the parameter information obtaining submodule includes: a brand information obtaining unit, a first protocol version number obtaining unit, and a parameter information obtaining unit, wherein:
  • the brand information acquiring unit is used to acquire brand information corresponding to the quick application.
  • the first protocol version number obtaining unit is configured to obtain the first protocol version number of the application program, where the first protocol version number is used to characterize the largest version of the protocol version numbers supported by the application program.
  • the parameter information acquiring unit is configured to generate parameter information of the quick application based on the brand information and the first protocol version number.
  • the first SDK plug-in download sub-module is configured to download and save the target SDK plug-in corresponding to the fast application based on the parameter information. Further, the SDK plug-in download sub-module includes: a vendor server acquisition unit and an SDK plug-in search unit, wherein:
  • the vendor server obtaining unit is configured to obtain the vendor server corresponding to the fast application based on the brand information.
  • the SDK plug-in search unit is configured to search for and save the latest version of the SDK plug-in under the first protocol version number in the vendor server based on the first protocol version number. Further, the SDK plug-in search unit includes: a judgment subunit, a first SDK plug-in search subunit, a second protocol version number acquisition subunit, and a second SDK plug-in search subunit, wherein:
  • the judging subunit is used to judge whether the vendor server includes the SDK plug-in under the first protocol version number.
  • the first SDK plug-in search subunit is configured to, if the vendor server includes the SDK plug-in under the first protocol version number, search for the first protocol version in the vendor server based on the first protocol version number Save the latest version of the SDK plug-in under the number.
  • the second protocol version number obtaining subunit is configured to obtain the second protocol version number of the application program if the vendor server does not include the SDK plug-in under the first protocol version number, where the second protocol version The number is smaller than the first protocol version number.
  • the second SDK plug-in searching subunit is configured to search for the latest version of the SDK plug-in under the second protocol version number in the vendor server based on the second protocol version number.
  • the SDK plug-in download module 420 further includes: a second target SDK plug-in download sub-module, a target SDK plug-in saving sub-module, a home page display sub-module, and a target quick application acquisition Sub-modules and priority download sub-modules, including:
  • the second target SDK plug-in downloading sub-module is used to download the target SDK plug-in corresponding to each of the multiple quick applications.
  • the target SDK plugin saving submodule is used to save the target SDK plugin corresponding to each quick application in a different storage area.
  • a display sub-module is used to respond to the first start instruction to start the application and display the home page of the application.
  • the target quick app acquisition submodule is used to obtain the device information displayed on the homepage, and obtain the target quick app corresponding to the device information.
  • the priority downloading sub-module is used to download and save the target SDK plug-in corresponding to the target fast application among the multiple fast applications.
  • the SDK plug-in download module 520 further includes: a current version acquisition sub-module, a current version judgment sub-module, and a third target SDK plug-in download sub-module, where:
  • the current version obtaining submodule is used to respond to the first start instruction, obtain the current SDK plug-in of the quick application and identify the current version of the current SDK plug-in.
  • the current version judgment sub-module is used to judge whether the current version is the latest version.
  • the third target SDK plug-in download sub-module is used to download and save the latest version of the SDK plug-in corresponding to the quick application if the current version is not the latest version.
  • the SDK plug-in loading module 530 is configured to load the target SDK plug-in locally in the mobile terminal in response to the second startup instruction when a second startup instruction for the quick application is received. Further, the SDK plug-in loading module 530 includes: an SDK plug-in obtaining sub-module and a first SDK plug-in loading sub-module, wherein:
  • the SDK plug-in acquiring sub-module is used to respond to the second start instruction to acquire the target SDK plug-in locally from the mobile terminal.
  • the first SDK plug-in loading sub-module is used to separate the target file from the target SDK plug-in and load the target SDK plug-in. Further, the SDK plug-in loading sub-module includes: a target file separation unit and an SDK plug-in loading unit, wherein:
  • the target file separating unit is used to separate the target file from the target SDK plug-in and determine whether the target file is complete.
  • the SDK plug-in loading unit is configured to load the target SDK plug-in if the target file is complete.
  • the SDK plug-in loading module 530 includes: a second SDK plug-in loading sub-module, wherein:
  • the second SDK plug-in loading sub-module is used to load the target SDK corresponding to the target flash application from the local of the mobile terminal in response to the second startup instruction when a second startup instruction for the target flash application is received Plug-ins, and continue to download target SDK plug-ins corresponding to other quick apps among the plurality of quick apps except the target quick app.
  • the SDK plug-in loading module 530 includes: an original SDK plug-in detection sub-module, a mandatory update to the module, and a prompt information output sub-module, wherein:
  • the original SDK plug-in detection sub-module is configured to respond to the second start instruction and detect whether the mobile terminal is configured with the original SDK plug-in corresponding to the quick application.
  • the mandatory update sub-module is used to force the original SDK plug-in to be updated to the target SDK plug-in if the mobile terminal is configured with the original SDK plug-in corresponding to the fast application.
  • the prompt information output sub-module is configured to output prompt information if the mobile terminal is configured with the original SDK plug-in corresponding to the quick application, wherein the prompt information user prompts the user to choose whether to update the original SDK plug-in to all The target SDK plug-in.
  • the device 500 for loading the SDK plug-in further includes: a first judgment module, a first reservation module, a second judgment module, and a second reservation module, wherein:
  • the first judging module is configured to judge whether the application is killed after loading the target SDK plug-in when the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application.
  • the first retention module is configured to save the SDK plug-in to be loaded if the mobile terminal is not killed after loading the target SDK plug-in, and retain the target SDK plug-in to continue as the current SDK plug-in of the quick application .
  • the second judgment module is configured to judge whether the target SDK plug-in is deleted when the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application.
  • the second retention module is configured to save the SDK plug-in to be loaded if the target SDK plug-in is not deleted, and retain the target SDK plug-in to continue as the current SDK plug-in of the quick application.
  • the coupling between the modules may be electrical, mechanical or other forms of coupling.
  • each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • FIG. 15 shows a structural block diagram of a mobile terminal 100 provided by an embodiment of the present application.
  • the mobile terminal 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book.
  • the mobile terminal 100 in this application may include one or more of the following components: a processor 110, a memory 120, a screen 130, a codec 140, and one or more application programs, of which one or more application programs may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
  • the processor 110 may include one or more processing cores.
  • the processor 110 uses various interfaces and lines to connect various parts of the entire mobile terminal 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
  • the processor 110 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 110 may be integrated with one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), and a modem.
  • CPU Central Processing Unit
  • GPU Graphics Processing Unit
  • the CPU mainly processes the operating system, user interface, and application programs
  • the GPU is used for rendering and drawing of display content
  • the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
  • the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
  • the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
  • the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc.
  • the data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
  • FIG. 16 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
  • the computer-readable medium 600 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
  • the computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
  • the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium.
  • the computer-readable storage medium 600 has a storage space for the program code 610 for executing any method steps in the above methods. These program codes can be read out from or written into one or more computer program products.
  • the program code 610 may be compressed in a suitable form, for example.
  • the SDK plug-in loading method, device, mobile terminal, and storage medium provided in the embodiments of the present application.
  • the mobile terminal receives the first start instruction for the application, and when it responds to the first start instruction and satisfies the specified download condition Download and save the target SDK plug-in corresponding to the quick application.
  • When receiving the second startup instruction for the quick application load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction.
  • the separation of downloading and loading facilitates the optimization and management of SDK plug-ins.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

Disclosed are an SDK plug-in loading method and apparatus, and a mobile terminal and a storage medium, relating to the technical field of the Internet of Things. The method is applied to a mobile terminal, an application program is installed on the mobile terminal, and a quick application is added to the application program. The method comprises: a mobile terminal receiving a first start instruction for an application program, and when the first start instruction is responded to and a designated download condition is met, downloading and saving a target SDK plug-in corresponding to a quick application, and when a second start instruction for the quick application is received, responding to the second start instruction to locally load the target SDK plug-in from the mobile terminal. The SDK plug-in loading method and apparatus, the mobile terminal and the storage medium provided in the embodiments of the present application facilitate the optimization and management of an SDK plug-in by means of separating the downloading and loading of the SDK plug-in.

Description

SDK插件的加载方法、装置、移动终端以及存储介质SDK plug-in loading method, device, mobile terminal and storage medium 技术领域Technical field
本申请涉及物联网技术领域,更具体地,涉及一种SDK插件的加载方法、装置、移动终端以及存储介质。This application relates to the technical field of the Internet of Things, and more specifically, to a method, device, mobile terminal, and storage medium for loading an SDK plug-in.
背景技术Background technique
移动终端,例如平板电脑、智能手机等,已经成为人们日常生活中最常用的消费型电子产品之一。使用者可以在移动终端上安装应用程序来实现各种各样的功能。Mobile terminals, such as tablet computers and smart phones, have become one of the most commonly used consumer electronic products in people's daily lives. Users can install applications on mobile terminals to implement various functions.
发明内容Summary of the invention
鉴于上述问题,本申请提出了一种SDK插件的加载方法、装置、移动终端以及存储介质,以解决上述问题。In view of the above problems, this application proposes a method, device, mobile terminal, and storage medium for loading an SDK plug-in to solve the above problems.
第一方面,本申请实施例提供了一种SDK插件的加载方法,应用于移动终端,所述移动终端安装有应用程序,所述应用程序中添加有快应用,所述方法包括:所述移动终端接收针对所述应用程序的第一启动指令;当响应到所述第一启动指令并满足指定下载条件时,下载与所述快应用对应的目标软件开发工具包SDK插件并保存;当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件。In the first aspect, an embodiment of the present application provides a method for loading an SDK plug-in, which is applied to a mobile terminal, where an application is installed on the mobile terminal, and a quick application is added to the application, and the method includes: the mobile The terminal receives the first start instruction for the application; when it responds to the first start instruction and meets the specified download conditions, downloads and saves the target software development kit SDK plug-in corresponding to the fast application; when it receives When the second startup instruction for the quick application is executed, the target SDK plug-in is loaded locally from the mobile terminal in response to the second startup instruction.
第二方面,本申请实施例提供了一种SDK插件的加载装置,应用于移动终端,所述移动终端安装有应用程序,所述应用程序中添加有快应用,所述装置包括:指令接收模块,用于所述移动终端接收针对所述应用程序的第一启动指令;SDK插件下载模块,用于当响应到所述第一启动指令并满足指定下载条件时,下载与所述快应用对应的目标软件开发工具包SDK插件并保存;SDK插件加载模块,用于当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件。In the second aspect, an embodiment of the present application provides a device for loading an SDK plug-in, which is applied to a mobile terminal, the mobile terminal is installed with an application program, and a quick application is added to the application program, and the device includes: an instruction receiving module , For the mobile terminal to receive the first startup instruction for the application; the SDK plug-in download module, for downloading the corresponding fast application when responding to the first startup instruction and meeting specified download conditions The target software development kit SDK plug-in is saved; the SDK plug-in loading module is used to load the target from the mobile terminal locally in response to the second start instruction when a second start instruction for the fast application is received SDK plugin.
第三方面,本申请实施例提供了一种移动终端,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行上述方法。In a third aspect, an embodiment of the present application provides a mobile terminal, including a memory and a processor, the memory is coupled to the processor, and the memory stores instructions that are executed when the instructions are executed by the processor. The processor executes the above method.
第四方面,本申请实施例提供了一种计算机可读取存储介质,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行上述方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the foregoing method.
本申请实施例提供的SDK插件的加载方法、装置、移动终端以及存储介质,移动终端接收针对该应用程序的第一启动指令,当响应到第一启动指令并满足指定下载条件时,下载与快应用对应的目标SDK插件并保存,当接收到针对快应用的第二启动指令时,响应该第二启动指令从移动终端的本地加载该目标SDK插件,从而通过将SDK插件的下载和加载分离,方便对SDK插件的优化和管理。The SDK plug-in loading method, device, mobile terminal, and storage medium provided by the embodiments of the present application. The mobile terminal receives the first startup instruction for the application. When the first startup instruction is responded to and the specified download conditions are met, the download and fast Apply the corresponding target SDK plug-in and save it. When receiving the second startup instruction for the fast application, load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction, thereby separating the download and loading of the SDK plug-in, Facilitate the optimization and management of SDK plug-ins.
附图说明Description of the drawings
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly describe the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
图1示出了本申请实施例提供的一种智能家居系统的架构示意图。Fig. 1 shows a schematic structural diagram of a smart home system provided by an embodiment of the present application.
图2示出了本申请实施例提供的另一种智能家居系统的架构示意图;FIG. 2 shows a schematic structural diagram of another smart home system provided by an embodiment of the present application;
图3示出了本申请实施例提供的一种快应用引擎架构的示意图。FIG. 3 shows a schematic diagram of a fast application engine architecture provided by an embodiment of the present application.
图4示出了本申请实施例提供的快应用的添加方法运行环境示意图。Fig. 4 shows a schematic diagram of an operating environment of a method for adding a quick application provided by an embodiment of the present application.
图5示出了本申请一个实施例提供的SDK插件的加载方法的流程示意图;FIG. 5 shows a schematic flowchart of a method for loading an SDK plug-in provided by an embodiment of the present application;
图6示出了本申请又一个实施例提供的SDK插件的加载方法的流程示意图;FIG. 6 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application;
图7示出了本申请的图6所示的SDK插件的加载方法的步骤S220的流程示意图;FIG. 7 shows a schematic flowchart of step S220 of the method for loading the SDK plug-in shown in FIG. 6 of the present application;
图8示出了本申请的图6所示的SDK插件的加载方法的步骤S230的流程示意图;FIG. 8 shows a schematic flowchart of step S230 of the method for loading the SDK plug-in shown in FIG. 6 of the present application;
图9示出了本申请的图8所示的SDK插件的加载方法的步骤S232的流程示意图;FIG. 9 shows a schematic flowchart of step S232 of the method for loading the SDK plug-in shown in FIG. 8 of the present application;
图10示出了本申请的图6所示的SDK插件的加载方法的步骤S250的流程示意图;FIG. 10 shows a schematic flowchart of step S250 of the method for loading the SDK plug-in shown in FIG. 6 of the present application;
图11示出了本申请再一个实施例提供的SDK插件的加载方法的流程示意图;FIG. 11 shows a schematic flow chart of a method for loading an SDK plug-in provided by another embodiment of the present application;
图12示出了本申请另一个实施例提供的SDK插件的加载方法的流程示意图;FIG. 12 shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application;
图13示出了本申请又再一个实施例提供的SDK插件的加载方法的流程示意图;FIG. 13 shows a schematic flow chart of a method for loading an SDK plug-in provided by another embodiment of the present application;
图14示出了本申请实施例提供的SDK插件的加载装置的模块框图;FIG. 14 shows a block diagram of a module of a device for loading an SDK plug-in provided by an embodiment of the present application;
图15示出了本申请实施例用于执行根据本申请实施例的SDK插件的加载方法的电子设备的框图;FIG. 15 shows a block diagram of an electronic device used to execute the method for loading an SDK plug-in according to an embodiment of the present application;
图16示出了本申请实施例的用于保存或者携带实现根据本申请实施例的SDK插件的加载方法 的程序代码的存储单元。Fig. 16 shows a storage unit used to store or carry the program code implementing the method for loading the SDK plug-in according to the embodiment of the present application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
随着科技水平的进步,智能家居深入各个家庭中,由于其带来的便利性,深受众多家庭的喜爱。智能家居通过物联网技术将家中的各种智能家居设备(如空调、照明灯、冰箱、洗衣机等)连接到一起,提供家电控制、照明控制、电话远程控制、室内外遥控、防盗报警、环境监测、暖通控制、红外转发以及可编程定时控制等多种控制。With the advancement of science and technology, smart homes have penetrated into various families and are loved by many families because of the convenience it brings. Smart home connects various smart home devices in the home (such as air conditioners, lights, refrigerators, washing machines, etc.) through the Internet of Things technology to provide home appliance control, lighting control, telephone remote control, indoor and outdoor remote control, anti-theft alarm, and environmental monitoring , HVAC control, infrared forwarding and programmable timing control and other controls.
由于移动终端上可以安装应用来实现各种各样的功能,因此,通过安装用于管理和控制家居设备的应用程序于移动终端,可以远程实现对于家居设备的管理和控制。其中,家居设备可以是空调、照明灯具、智能灯、智能摄像头、智能插座、无线开关、智能窗帘电机、智能音箱以及各类传感器(例如人体传感器、门窗传感器、烟雾报警器等)。Since applications can be installed on the mobile terminal to implement various functions, by installing an application program for managing and controlling home equipment on the mobile terminal, the management and control of the home equipment can be realized remotely. Among them, household equipment can be air conditioners, lighting fixtures, smart lights, smart cameras, smart sockets, wireless switches, smart curtain motors, smart speakers, and various sensors (such as human sensors, door and window sensors, smoke alarms, etc.).
请参见图1,目前通过移动终端对家居设备进行管理和控制,通常是通过移动终端100与智能网关300建立无线连接,并且家居设备200与智能网关300建立无线连接的方式,实现移动终端100与家居设备之间的数据交互。另外,移动终端100以及智能网关300与服务器400通信连接,移动终端100可以通过服务器400以及智能网关300,与家居设备进行数据交互。Referring to Fig. 1, at present, the home equipment is managed and controlled through a mobile terminal, usually by establishing a wireless connection with the smart gateway 300 through the mobile terminal 100, and establishing a wireless connection between the home equipment 200 and the smart gateway 300 to realize the mobile terminal 100 and Data interaction between household devices. In addition, the mobile terminal 100 and the smart gateway 300 are in communication connection with the server 400, and the mobile terminal 100 can interact with household equipment through the server 400 and the smart gateway 300.
请参见图2,移动终端100可以与第一云服务器402通信连接,实现与第一云服务器402之间的数据交互。家居设备200通过智能网关300,与第二云服务器401通信连接,实现与第二与服务器401之间的数据交互。另外,第一云服务器402与第二云服务器401之间可以进行数据交互,从而移动终端100可以通过第一云服务器402、第二云服务器404以及智能网关300,实现与家居设备200之间的数据交互。Referring to FIG. 2, the mobile terminal 100 may be in communication connection with the first cloud server 402 to realize data interaction with the first cloud server 402. The household equipment 200 communicates with the second cloud server 401 through the smart gateway 300 to realize data interaction between the second and the server 401. In addition, data interaction can be performed between the first cloud server 402 and the second cloud server 401, so that the mobile terminal 100 can communicate with the household equipment 200 through the first cloud server 402, the second cloud server 404, and the smart gateway 300. Data interaction.
目前,不同厂商的家居设备通常需要通过不同的应用程序进行控制,也就是说,不同厂商的家居设备的应用程序与不同厂商的服务器之间通信,需要安装较多的应用程序,从而占用了移动终端的较多的存储空间。At present, home appliances of different manufacturers usually need to be controlled through different applications. That is to say, the communication between the applications of the home equipment of different manufacturers and the servers of different manufacturers requires more applications to be installed, thus occupying mobile More storage space for the terminal.
而随着快应用(Quick APP)的普及,移动终端开发者更期望通过快应用来实现与前述客户端相同的功能,以便提升智能家居功能的开发效率,并同时节约移动终端的存储空间。其中,快应用是一种基于终端设备硬件平台的新型应用形态,无需安装,即点即用,又兼具原生应用体验(性能、系统整合、交互等)。如图3所示的快应用引擎的结构示意图,快应用的前端设计借鉴并整合了主流前端框架(Vue,React等)的设计思路:以组件化的方式构建应用,以数据绑定为核心的MVVM设计模式,以V-DOM的方式提升性能,同时选择了简洁清晰的类Vue的模板。With the popularization of Quick APP, mobile terminal developers expect to use Quick APP to achieve the same functions as the aforementioned client, so as to improve the development efficiency of smart home functions and at the same time save the storage space of the mobile terminal. Among them, the fast application is a new application form based on the hardware platform of the terminal device. It does not need to be installed, it is click-to-use, and it has the original application experience (performance, system integration, interaction, etc.). As shown in Figure 3, the structure diagram of the fast application engine, the front-end design of the fast application draws on and integrates the design ideas of mainstream front-end frameworks (Vue, React, etc.): build applications in a componentized way, with data binding as the core The MVVM design mode uses V-DOM to improve performance, while choosing a concise and clear Vue-like template.
另外,如图4所示,图4所示的移动终端100中,运行有快应用以及应用程序110。其中快应用是运行于快应用引擎上,并且在快应用引擎中设置有应用程序提供的扩展接口97。而在应用程序110中设有与扩展接口97通信的扩展接口96。而应用程序110可以通过扩展接口调用各个厂商的软件开发工具包(SDK,Software Development Kit)插件。例如,可以调用图中的厂商A的SDK插件111、厂商B的SDK插件112以及厂商C的SDK插件113。在这种情况下,在快应用中触发的数据处理指令可以通过设置在快应用引擎中的扩展接口97传递到客户端中的扩展接口96,进而再将数据处理指令传输给各个厂商的SDK插件。In addition, as shown in FIG. 4, in the mobile terminal 100 shown in FIG. 4, a quick application and an application program 110 are running. The fast application runs on the fast application engine, and the fast application engine is provided with an extension interface 97 provided by the application program. The application program 110 is provided with an expansion interface 96 that communicates with the expansion interface 97. The application program 110 may call software development kit (SDK, Software Development Kit) plug-ins of various manufacturers through an extended interface. For example, the SDK plug-in 111 of manufacturer A, the SDK plug-in 112 of manufacturer B, and the SDK plug-in 113 of manufacturer C in the figure can be called. In this case, the data processing instructions triggered in the fast application can be transferred to the extended interface 96 in the client through the extension interface 97 set in the fast application engine, and then the data processing instructions are transmitted to the SDK plug-ins of various manufacturers .
进一步的,应用程序110可以提供进入快应用的入口,也就是说,可以由应用程序110进入快应用。快应用与该应用程序110之间的通讯可以通过跨应用的通讯方式,如使用AIDL交互。具体的,应用程序110与内嵌的快应用之间可以设置有参数传递的接口,用于应用程序110与快应用之间的数据传递,例如,快应用与应用程序110之间可以定义通道类接口,所有的接口函数使用一个通道类接口实现。在通过应用程序110进入快应用时,应用程序110可以指示快应用引擎,根据快应用的链接,访问相应的快应用,从而展示出快应用的界面。快应用的界面可以接收控制信息,并应用程序110在获知该控制信息后,通过上述的SDK将控制信息传至家居设备的服务器,实现对家居设备的管理和控制。另外,快应用引擎还可以接收应用程序110传递的信息,并且将需要显示的信息在快应用控制页面显示。Further, the application program 110 may provide an entrance to the quick application, that is, the application program 110 may enter the quick application. The communication between the fast application and the application 110 may be through a cross-application communication method, such as using AIDL interaction. Specifically, a parameter transfer interface can be set between the application 110 and the embedded fast application for data transfer between the application 110 and the fast application. For example, a channel class can be defined between the fast application and the application 110 Interface, all interface functions are implemented using a channel class interface. When entering the quick application through the application 110, the application 110 may instruct the quick application engine to access the corresponding quick application according to the link of the quick application, thereby displaying the interface of the quick application. The interface of the quick app can receive control information, and after the application program 110 learns the control information, it transmits the control information to the server of the home device through the above-mentioned SDK to realize the management and control of the home device. In addition, the quick application engine can also receive the information transmitted by the application program 110, and display the information that needs to be displayed on the quick application control page.
发明人经过长期的研究发现,目前应用程序在进入快应用时,会对快应用对应的SDK插件均进行检查更新并判断是否下载,且更新判断复杂,流程较长,容易与SDK插件的加载时间重合,造成SDK插件的加载缓慢。针对上述问题,发明人提出了本申请实施例提供的SDK插件的加载方法、装置、移动终端以及存储介质,通过将SDK插件的下载和加载分离,方便对SDK插件的优化和管理。其中,具体的SDK插件的加载方法在后续的实施例中进行详细的说明。After long-term research, the inventor found that when the current application enters the fast application, the SDK plug-in corresponding to the fast application will be checked and updated and judged whether to download, and the update judgment is complicated, the process is longer, and it is easy to compare with the loading time of the SDK plug-in. The overlap causes the slow loading of the SDK plug-in. In response to the above problems, the inventors proposed the method, device, mobile terminal, and storage medium for loading the SDK plug-in provided by the embodiments of the present application. By separating the downloading and loading of the SDK plug-in, it is convenient to optimize and manage the SDK plug-in. Wherein, the specific method for loading the SDK plug-in is described in detail in the subsequent embodiments.
请参阅图5,图5示出了本申请一个实施例提供的SDK插件的加载方法的流程示意图。所述SDK插件的加载方法用于通过将SDK插件的下载和加载分离,方便对SDK插件的优化和管理。在 具体的实施例中,所述SDK插件的加载方法应用于如图14所示的SDK插件的加载装置200以及配置有所述SDK插件的加载装置500的移动终端100(图15),其中,该移动终端安装有应用程序,该应用程序中添加有快应用。下面将以移动终端为例,说明本实施例的具体流程,当然,可以理解的,本实施例所应用的移动终端可以为智能手机、平板电脑、穿戴式电子设备、车载设备、网关等电子设备,在此不做具体的限定。下面将针对图5所示的流程进行详细的阐述,所述SDK插件的加载方法具体可以包括以下步骤:Please refer to FIG. 5, which shows a schematic flowchart of a method for loading an SDK plug-in provided by an embodiment of the present application. The method for loading the SDK plug-in is used to facilitate the optimization and management of the SDK plug-in by separating the downloading and loading of the SDK plug-in. In a specific embodiment, the SDK plug-in loading method is applied to the SDK plug-in loading device 200 as shown in FIG. 14 and the mobile terminal 100 (FIG. 15) equipped with the SDK plug-in loading device 500 (FIG. 15), An application is installed on the mobile terminal, and a quick application is added to the application. The following will take a mobile terminal as an example to illustrate the specific process of this embodiment. Of course, it is understandable that the mobile terminal applied in this embodiment can be a smart phone, a tablet computer, a wearable electronic device, a vehicle-mounted device, a gateway, etc. , There is no specific limitation here. The following will elaborate on the process shown in FIG. 5, and the loading method of the SDK plug-in may specifically include the following steps:
步骤S110:所述移动终端接收针对所述应用程序的第一启动指令。Step S110: The mobile terminal receives a first start instruction for the application.
在本实施例中,移动终端安装有应用程序且该应用程序中添加有快应用,则当用户欲启动该快应用时,需要先启动该应用程序,再启动添加在该应用程序中的快应用,因此,用户可以发送指示启动该应用程序的启动指令至移动终端,其中,该启动指令记为第一启动指令,相应的,移动终端接收针对该应用程序的第一启动指令。In this embodiment, an application is installed on the mobile terminal and a quick application is added to the application. When the user wants to start the quick application, the user needs to start the application first, and then start the quick application added to the application Therefore, the user can send a startup instruction instructing to start the application to the mobile terminal, where the startup instruction is recorded as the first startup instruction, and accordingly, the mobile terminal receives the first startup instruction for the application.
作为一种方式,该第一启动指令可以是用户针对该应用程序的图标进行触控操作时生成,例如,可以是在检测到作用于应用程序的图标上的单指点击操作时生成、可以是在检测到作用于应用程序的图标上的按压操作时生成、可以是在检测到作用于应用程序的图标上的多指点击操作时生成,也可以是在检测到作用于应用程序图标上的长按操作时生成等,在此不做限定;该第一启动指令可以是在检测到用户在移动终端的搜索框中搜索应用程序时生成,例如,当移动终端检测到用户在搜索框中搜索“应用程序A”时,则生成指示启动“应用程序A”的第一启动指令,当移动终端检测到用户在搜索框中搜索“应用程序B”时,则生成指示启动“应用程序B”的第一启动指令;该第一启动指令也可以是在检测到用户在移动终端输入启动应用程序的语音信息时生成,例如,当移动终端检测到用户“启动应用程序A”的语音信息时,则生成指示启动“应用程序A”的第一启动指令,当移动终端检测到用户“启动应用程序B”的语音信息时,则生成指示启动“应用程序B”的第一启动指令。As a way, the first start instruction may be generated when the user performs a touch operation on the icon of the application, for example, it may be generated when a single-finger click operation on the icon of the application is detected, or It is generated when a pressing operation on the icon of the application is detected, it can be generated when a multi-finger click operation on the icon of the application is detected, or it can be generated when a long operation on the icon of the application is detected. Generated by operation, etc., which are not limited here; the first start instruction can be generated when it is detected that the user searches for an application in the search box of the mobile terminal, for example, when the mobile terminal detects that the user searches for " When the mobile terminal detects that the user searches for “application B” in the search box, it generates the first instruction to start “application B”. A startup instruction; the first startup instruction can also be generated when it is detected that the user inputs voice information to start the application on the mobile terminal. For example, when the mobile terminal detects the voice information of the user "start application A", it is generated The first startup instruction instructing to start the "application A", when the mobile terminal detects the voice information of the user "starting the application B", it generates the first startup instruction instructing to start the "application B".
步骤S120:当响应到所述第一启动指令并满足指定下载条件时,下载与所述快应用对应的目标软件开发工具包SDK插件并保存。Step S120: When the first start instruction is responded to and the specified download condition is satisfied, download and save the target software development kit SDK plug-in corresponding to the fast application.
进一步地,移动终端设置有指定下载条件,其中,该指定下载条件可以预先设置完成后存储在移动终端本地,也可以实时从服务器获取,另外,该指定下载条件可以由移动终端配置、也可以由用户配置,在此不做限定。因此,当移动终端接收到第一启动指令时,可以判断该移动终端当前是否满足指定下载条件,其中,当移动终端满足指定下载条件时,则响应第一启动指令下载与快应用对应的目标SDK插件并保存;当移动终端不满足指定下载条件时,则不响应该第一启动指令。其中,该指定下载条件包括但不限于网络条件,SDK插件的更新条件等,以网络条件为例,若移动终端的当前网络状态较差,即不满足网络条件,表征该移动终端无法通过网络从服务器下载快应用对应的目标SDK插件,则移动终端可以不响应该第一启动指令;而若移动终端当前的网络状态较好,即满足网络条件,表征该移动终端可以通过网络从服务器下载快应用对应的目标SDK插件,则移动终端响应第一启动指令进行目标SDK插件的下载并保存。Further, the mobile terminal is set with designated download conditions, where the designated download conditions can be stored locally in the mobile terminal after pre-setting, or can be obtained from the server in real time. In addition, the designated download conditions can be configured by the mobile terminal or by User configuration is not limited here. Therefore, when the mobile terminal receives the first start instruction, it can determine whether the mobile terminal currently satisfies the specified download condition, wherein, when the mobile terminal meets the specified download condition, it downloads the target SDK corresponding to the fast application in response to the first start instruction The plug-in is saved; when the mobile terminal does not meet the specified download conditions, it does not respond to the first start instruction. Among them, the specified download conditions include, but are not limited to, network conditions, SDK plug-in update conditions, etc. Taking network conditions as an example, if the current network status of the mobile terminal is poor, that is, the network conditions are not met, which means that the mobile terminal cannot be accessed via the network. If the server downloads the target SDK plug-in corresponding to the fast application, the mobile terminal may not respond to the first start instruction; and if the current network status of the mobile terminal is good, that is, the network condition is satisfied, which means that the mobile terminal can download the fast application from the server through the network Corresponding to the target SDK plug-in, the mobile terminal responds to the first start instruction to download and save the target SDK plug-in.
步骤S130:当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件。Step S130: When a second startup instruction for the quick application is received, load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction.
在本实施例中,当用户欲在应用程序中启动该快应用时,可以发送指示启动该快应用的启动指令至移动终端,其中,该启动指令记为第二启动指令,相应的,移动终端接收针对该快应用的第二启动指令。In this embodiment, when the user wants to start the quick application in the application, he can send a startup instruction instructing to start the quick application to the mobile terminal, where the startup instruction is recorded as the second startup instruction, and correspondingly, the mobile terminal Receive a second start instruction for the fast application.
作为一种方式,该第二启动指令可以是用户针对该快应用的在应用程序中的控件进行触控操作时生成,例如,可以是在检测到作用于快应用的控件上的单指点击操作时生成、可以是在检测到作用于快应用的控件上的按压操作时生成、可以是在检测到作用于快应用的控件上的多指点击操作时生成,也可以是在检测到作用于快应用的控件上的长按操作时生成等,在此不做限定;该第二启动指令可以是在检测到用户在应用程序的搜索框中搜索快应用时生成,例如,当移动终端检测到用户在应用程序的搜索框中搜索“快应用A”时,则生成指示启动“快应用A”的第二启动指令,当移动终端检测到用户在应用程序的搜索框中搜索“快应用B”时,则生成指示启动“快应用B”的第二启动指令;该第二启动指令也可以是在检测到用户在应用程序输入启动应用程序的语音信息时生成,例如,当移动终端检测到用户在应用程序内输入的“启动快应用A”的语音信息时,则生成指示启动“快应用A”的第二启动指令,当移动终端检测到用户在应用程序内输入的“启动快应用B”的语音信息时,则生成指示启动“快应用B”的第二启动指令。As a way, the second start instruction may be generated when the user performs a touch operation on the controls of the quick application in the application, for example, may be a single-finger click operation on the controls of the quick application is detected Time generation, it can be generated when a pressing operation on the control of the quick application is detected, it can be generated when a multi-finger click operation on the control of the quick application is detected, or it can be generated when the It is generated during long-press operation on the control of the application, etc., which are not limited here; the second start instruction may be generated when it is detected that the user searches for the fast application in the search box of the application, for example, when the mobile terminal detects the user When searching for "Quick Application A" in the search box of the application, a second startup instruction instructing to start "Quick Application A" is generated. When the mobile terminal detects that the user searches for "Quick Application B" in the search box of the application , A second start instruction indicating to start "Quick Application B" is generated; the second start instruction can also be generated when it is detected that the user enters the voice information to start the application in the application, for example, when the mobile terminal detects that the user is in When the voice message of "Launch Quick App A" is input in the application, a second start instruction instructing to start "Quick App A" is generated. When the mobile terminal detects that the user enters the "Launch Quick App B" in the application In the case of voice information, a second start instruction instructing to start "Quick Application B" is generated.
进一步地,移动终端响应该第二启动指令从移动终端的本地加载该目标SDK插件,以便快应用通过该目标SDK插件从其对应的厂商服务器获取对应的控制和服务。因此,本申请实施例通过将目标SDK插件的下载和加载分时处理,使得目标SDK插件的下载和加载的处理更加灵活,也更加利于优化,另外,提前将目标SDK插件下载后保存在移动终端本地,也使得在进入快应用时目标SDK插件的加载更快,提升用户体验。Further, the mobile terminal loads the target SDK plug-in locally from the mobile terminal in response to the second start instruction, so that the fast app can obtain corresponding control and services from its corresponding vendor server through the target SDK plug-in. Therefore, in this embodiment of the application, the download and loading of the target SDK plug-in is time-sharing processing, making the processing of downloading and loading the target SDK plug-in more flexible and more conducive to optimization. In addition, the target SDK plug-in is downloaded and saved in the mobile terminal in advance. Locally, it also makes the target SDK plug-in load faster when entering the fast application, improving the user experience.
另外,在本实施例中,该目标SDK插件可以通过移动终端的主进程实现,而目标SDK插件的加载可以通过移动终端的ipc进程或者主线程实现;或者该目标SDK插件可以通过移动终端的主进程实现,而目 标SDK插件的加载可以通过混合方式实现,如同时通过移动终端的主进程和ipc进程实现,或者同时通过移动终端的主进程和主线程实现,例如,由于SDK插件存在主进程的UI,所以这部分值得信任的可以单独加载在主进程中,而其他部分可以通过移动终端的ipc进程或主线程实现,由于技术侧加载是分开的,因此,可以方便后续对SDK插件的优化处理。In addition, in this embodiment, the target SDK plug-in may be implemented through the main process of the mobile terminal, and the loading of the target SDK plug-in may be implemented through the ipc process or main thread of the mobile terminal; or the target SDK plug-in may be implemented through the main process of the mobile terminal. The target SDK plug-in can be loaded in a mixed manner, for example, through the main process and the ipc process of the mobile terminal at the same time, or through the main process and the main thread of the mobile terminal at the same time. For example, because the SDK plug-in has the main process UI, so this part of the trustworthy part can be loaded separately in the main process, while the other parts can be implemented by the ipc process or main thread of the mobile terminal. Since the technical side is loaded separately, it can facilitate subsequent optimization of the SDK plug-in .
本申请一个实施例提供的SDK插件的加载方法,移动终端接收针对该应用程序的第一启动指令,当响应到第一启动指令并满足指定下载条件时,下载与快应用对应的目标SDK插件并保存,当接收到针对快应用的第二启动指令时,响应该第二启动指令从移动终端的本地加载该目标SDK插件,从而通过将SDK插件的下载和加载分离,方便对SDK插件的优化和管理。In the method for loading the SDK plug-in provided by an embodiment of the present application, the mobile terminal receives the first startup instruction for the application, and when it responds to the first startup instruction and meets the specified download conditions, downloads the target SDK plug-in corresponding to the fast application and Save, when receiving the second startup instruction for the quick application, load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction, so as to facilitate the optimization and optimization of the SDK plug-in by separating the download and loading of the SDK plug-in management.
请参阅图6,图6示出了本申请又一个实施例提供的SDK插件的加载方法的流程示意图。所述方法应用于上述移动终端,下面将针对图6所示的流程进行详细的阐述,所述SDK插件的加载方法具体可以包括以下步骤:Please refer to FIG. 6, which shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application. The method is applied to the above-mentioned mobile terminal. The process shown in FIG. 6 will be described in detail below. The method for loading the SDK plug-in may specifically include the following steps:
步骤S210:所述移动终端接收针对所述应用程序的第一启动指令。Step S210: The mobile terminal receives a first start instruction for the application.
其中,步骤S210的具体描述请参阅步骤S110,在此不再赘述。For the specific description of step S210, please refer to step S110, which will not be repeated here.
步骤S220:当响应到所述第一启动指令并满足指定下载条件时,获取所述快应用的参数信息。Step S220: Acquire parameter information of the quick application when the first start instruction is responded to and the specified download condition is satisfied.
在本实施例中,当确定该移动终端满足指定下载条件时,还可以响应该第一启动指令获取该快应用的参数信息,其中,该参数信息可以用于作为移动终端对该快应用对应的目标SDK插件的下载接口的输入参数。In this embodiment, when it is determined that the mobile terminal satisfies the specified download conditions, it can also respond to the first start instruction to obtain the parameter information of the fast application, where the parameter information can be used as the mobile terminal corresponding to the fast application The input parameters of the download interface of the target SDK plug-in.
请参阅图7,图7示出了本申请的图6所示的SDK插件的加载方法的步骤S220的流程示意图。下面将针对图7所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:Please refer to FIG. 7. FIG. 7 shows a schematic flowchart of step S220 of the method for loading the SDK plug-in shown in FIG. 6 of the present application. The process shown in FIG. 7 will be described in detail below, and the method may specifically include the following steps:
步骤S221:获取所述快应用对应的品牌信息。Step S221: Obtain brand information corresponding to the quick application.
作为一种实施方式,移动终端可以获取该快应用对应的品牌信息,其中,移动终端可以从其对应的终端服务器获取该快应用对应的品牌信息,也可以从该快应用对应的厂商服务器获取该快应用对应的品牌信息,在此不做限定。As an implementation manner, the mobile terminal can obtain the brand information corresponding to the quick app, where the mobile terminal can obtain the brand information corresponding to the quick app from its corresponding terminal server, or obtain the brand information from the manufacturer server corresponding to the quick app. Quickly apply the corresponding brand information, which is not limited here.
以移动终端从其对应的终端服务器获取该快应用对应的品牌信息为例,该移动终端可以获取该快应用的标识信息,并将该标识信息发送至终端服务器,终端服务器根据该标识信息查找该标识信息对应的品牌信息,并将该品牌信息返回至该移动终端,作为一种可实施的方式,终端服务器存储有多个标识信息和多个品牌信息之间的映射关系,当移动终端获取到快应用的标识信息A时,可以将标识信息A发送至终端服务器,则终端服务器从保存的映射关系中查找与标识信息A对应的品牌信息,当查找到该标识信息A对应的品牌信息为品牌信息A时,可以将该品牌信息A返回至移动终端。Taking the mobile terminal obtaining the brand information corresponding to the quick application from its corresponding terminal server as an example, the mobile terminal can obtain the identification information of the quick application and send the identification information to the terminal server, and the terminal server searches for the quick application according to the identification information. Identify the brand information corresponding to the identification information and return the brand information to the mobile terminal. As an implementable way, the terminal server stores multiple identification information and the mapping relationship between multiple brand information. When the mobile terminal obtains When the identification information A of the fast application is applied, the identification information A can be sent to the terminal server, and the terminal server searches for the brand information corresponding to the identification information A from the saved mapping relationship, and when it finds that the brand information corresponding to the identification information A is the brand In the case of information A, the brand information A can be returned to the mobile terminal.
步骤S222:获取所述应用程序的第一协议版本号,其中,所述第一协议版本号用于表征所述应用程序支持的协议版本号中的最大版本。Step S222: Obtain a first protocol version number of the application program, where the first protocol version number is used to characterize the largest version among the protocol version numbers supported by the application program.
进一步地,移动终端获取该应用程序的第一协议版本号,其中,该第一协议版本号用于表征该应用程序支持的协议版本号中的最大版本,且该第一协议版本号是硬编码写定的,也就是说,该第一协议版本号是固定的,当然,当应用程序的版本更新时,该第一协议版本号可以保持不变,也可以随之更新后保持不变,在此不做限定。例如,当该应用程序的版本号为“版本号1”时,该第一协议版本号固定为“版本号1”,当该应用程序的版本号更新为“版本号2”时,该第一协议版本号可以保持不变,即继续固定为“版本号1”,也可以更新并固定为“版本号2”,在此不做限定。Further, the mobile terminal obtains the first protocol version number of the application program, where the first protocol version number is used to characterize the largest version among the protocol version numbers supported by the application program, and the first protocol version number is hard-coded It is written, that is, the version number of the first protocol is fixed. Of course, when the version of the application program is updated, the version number of the first protocol can remain unchanged, or it can remain unchanged after the update. This is not limited. For example, when the version number of the application program is "version number 1", the first protocol version number is fixed as "version number 1", and when the version number of the application program is updated to "version number 2", the first protocol version number The protocol version number can remain unchanged, that is, continue to be fixed as "version number 1", or it can be updated and fixed as "version number 2", which is not limited here.
步骤S223:基于所述品牌信息和所述第一协议版本号生成所述快应用的参数信息。Step S223: Generate parameter information of the quick application based on the brand information and the first protocol version number.
在本实施例中,当获取到该快应用对应的品牌信息和该应用程序的第一协议版本号后,可以基于该品牌信息和该第一协议版本号生成该快应用的参数信息,并将该参数信息作为移动终端对该快应用对应的目标SDK插件的下载接口的输入参数。In this embodiment, after acquiring the brand information corresponding to the quick application and the first protocol version number of the application, the parameter information of the quick application can be generated based on the brand information and the first protocol version number, and The parameter information is used as the input parameter of the download interface of the target SDK plug-in corresponding to the fast application by the mobile terminal.
步骤S230:基于所述参数信息下载与所述快应用对应的目标SDK插件并保存。Step S230: Download and save the target SDK plug-in corresponding to the fast application based on the parameter information.
其中,在获取该快应用的参数信息后,可以基于该参数信息进行判断,下载与该快应用对应的目标SDK插件并保存,以提升该目标SDK插件下载的准确性。在本实施例中,可以基于该参数信息下载与快应用对应的最新版本的SDK插件并保存,例如,若协议版本号包括协议版本号1和协议版本号2,且该协议版本号2的协议版本号大于协议版本号1的协议版本号,其中,该协议版本号是定义SDK插件的接口规范jar包的版本号。Among them, after obtaining the parameter information of the quick application, a judgment can be made based on the parameter information, and the target SDK plug-in corresponding to the quick application can be downloaded and saved, so as to improve the accuracy of downloading the target SDK plug-in. In this embodiment, the latest version of the SDK plug-in corresponding to the quick application can be downloaded and saved based on the parameter information. For example, if the protocol version number includes protocol version number 1 and protocol version number 2, and the protocol version number of the protocol is 2 The version number is greater than the protocol version number of the protocol version number 1, where the protocol version number is the version number of the jar package defining the interface specification of the SDK plug-in.
作为第一种方式,如果该第一协议版本号为协议版本号2时,那么,该快应用对应的厂商服务器会优先查找该协议版本号2的SDK插件,如果查找到该协议版本号2包括SDK插件时,再从协议版本号2中查找获取最新版本的SDK插件,并返回该最新版本的SDK插件给移动终端作为所述目标SDK插件;如果没有查找到该协议版本号2的SDK插件时,例如,该移动终端在向服务器请求目标SDK插件时,如果该移动终端请求的协议版本号为协议版本号2,而快应用对应的厂商服务器使用的协议版本号为协议版本号1时,表征该厂商服务器的SDK插件没有协议版本号2的版本(只有协议版本号1的SDK协议版本), 则再查找协议版本号1的SDK插件,如果查找到该协议版本号1包括SDK插件时,再从协议版本号1中查找获取最新版本的SDK插件,并返回该最新版本的SDK插件给移动终端作为目标SDK插件。As the first method, if the first protocol version number is protocol version number 2, then the vendor server corresponding to the fast app will first search for the SDK plug-in of the protocol version number 2. If it finds that the protocol version number 2 includes For SDK plug-in, search for the latest version of SDK plug-in from protocol version number 2, and return the latest version of SDK plug-in to the mobile terminal as the target SDK plug-in; if no SDK plug-in of protocol version number 2 is found For example, when the mobile terminal requests the target SDK plug-in from the server, if the protocol version number requested by the mobile terminal is protocol version number 2, and the protocol version number used by the manufacturer’s server corresponding to the fast app is protocol version number 1, it means If the SDK plug-in of this manufacturer’s server does not have a version of protocol version number 2 (only the SDK protocol version of protocol version number 1), then look for the SDK plug-in of protocol version number 1. If it is found that the protocol version number 1 includes the SDK plug-in, then Find the latest version of the SDK plug-in from the protocol version number 1, and return the latest version of the SDK plug-in to the mobile terminal as the target SDK plug-in.
作为第二种方式,如果该第一协议版本号为协议版本号1时,那么,该快应用对应的厂商服务器只会查找该协议版本号1的SDK插件,如果查找到该协议版本号1包括SDK插件时,再从协议版本号1中查找获取最新版本的SDK插件,并返回该最新版本的SDK插件给移动终端作为目标SDK插件。因此,在本实施例中,该SDK插件向下兼容。As the second way, if the first protocol version number is the protocol version number 1, then the vendor server corresponding to the fast app will only search for the SDK plug-in of the protocol version number 1. If the protocol version number 1 includes When the SDK plug-in is used, the latest version of the SDK plug-in is retrieved from the protocol version number 1, and the latest version of the SDK plug-in is returned to the mobile terminal as the target SDK plug-in. Therefore, in this embodiment, the SDK plug-in is downward compatible.
请参阅图8,图8示出了本申请的图6所示的SDK插件的加载方法的步骤S230的流程示意图。下面将针对图8所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:Please refer to FIG. 8. FIG. 8 shows a schematic flowchart of step S230 of the method for loading the SDK plug-in shown in FIG. 6 of the present application. The process shown in FIG. 8 will be described in detail below, and the method may specifically include the following steps:
步骤S231:基于所述品牌信息,获取所述快应用对应的厂商服务器。Step S231: Obtain a vendor server corresponding to the fast application based on the brand information.
其中,可以基于该参数信息中的品牌信息,获取该快应用对应的厂商服务器。作为一种方式,不同的快应用对应有不同的品牌信息,且不同的品牌信息对应有不同的厂商服务器,因此,可以基于快应用-品牌信息-厂商服务器之间的对应关系,基于该品牌信息获取快应用对应的厂商服务器。Among them, the vendor server corresponding to the fast application can be obtained based on the brand information in the parameter information. As a way, different fast apps correspond to different brand information, and different brand information corresponds to different vendor servers. Therefore, it can be based on the correspondence between fast apps-brand information-vendor servers, and based on the brand information Obtain the vendor server corresponding to the quick app.
例如,如表1所示,表1示出了快应用、品牌信息以及厂商服务器之间的一种对应关系。其中,快应用用K表示,品牌信息用P表示,厂商服务器用C表示。For example, as shown in Table 1, Table 1 shows a correspondence between fast apps, brand information, and vendor servers. Among them, fast application is represented by K, brand information is represented by P, and vendor server is represented by C.
表1Table 1
快应用(K)Quick application (K) 品牌信息(P)Brand Information (P) 厂商服务器(C)Vendor Server (C)
K1K1 P1P1 C1C1
K2K2 P2P2 C2C2
K3K3 P3P3 C3C3
K4K4 P4P4 C4C4
......... ......... .........
若该快应用为K1,那么,基于K1-P1-C1之间的对应关系,可以确定该快应用K1对应的品牌信息为品牌P1,且该快应用K1对应的厂商服务器为厂商服务器C1;若该快应用为K2,那么,基于K2-P2-C2之间的对应关系,可以确定该快应用K2对应的品牌信息为品牌P2,且该快应用K2对应的厂商服务器为厂商服务器C2等,在此不再赘述。If the fast app is K1, then based on the correspondence between K1-P1-C1, it can be determined that the brand information corresponding to the fast app K1 is brand P1, and the manufacturer server corresponding to the fast app K1 is the manufacturer server C1; if The fast application is K2, then, based on the correspondence between K2-P2-C2, it can be determined that the brand information corresponding to the fast application K2 is brand P2, and the manufacturer server corresponding to the fast application K2 is the manufacturer server C2, etc. This will not be repeated here.
步骤S232:基于所述第一协议版本号,在所述厂商服务器中查找所述第一协议版本号下的最新版本的SDK插件并保存。Step S232: Based on the first protocol version number, search for the latest version of the SDK plug-in under the first protocol version number in the vendor server and save it.
进一步地,在基于参数信息中的品牌信息获取该快应用对应的厂商服务器后,可以再基于该参数信息中的第一协议版本号,在厂商服务器中查找该第一协议版本号下的最新版本的SDK插件并保存。例如,若该第一协议版本号为协议版本号2时,则在厂商服务器中查找协议版本号2的最新版本的SDK插件并保存;若该第一协议版本号为协议版本号1时,则在厂商服务器中查找协议版本号1的最新版本的SDK插件并保存。Further, after obtaining the vendor server corresponding to the quick app based on the brand information in the parameter information, the latest version under the first protocol version number can be searched in the vendor server based on the first protocol version number in the parameter information SDK plug-in and save. For example, if the first protocol version number is protocol version number 2, search for the latest version of the SDK plug-in of protocol version number 2 in the manufacturer’s server and save it; if the first protocol version number is protocol version number 1, then Find the latest version of the SDK plug-in with protocol version 1 in the manufacturer's server and save it.
请参阅图9,图9示出了本申请的图8所示的SDK插件的加载方法的步骤S232的流程示意图。下面将针对图9所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:Please refer to FIG. 9. FIG. 9 shows a schematic flowchart of step S232 of the method for loading the SDK plug-in shown in FIG. 8 of the present application. The process shown in FIG. 9 will be described in detail below, and the method may specifically include the following steps:
步骤S2321:判断所述厂商服务器是否包括所述第一协议版本号下的SDK插件。Step S2321: Determine whether the vendor server includes the SDK plug-in under the first protocol version number.
作为一种方式,在确定该快应用对应的厂商服务器后,可以判断该商场服务器是否包括该第一协议版本号下的SDK插件。例如,若该第一协议版本号为协议版本号2时,可以判断该厂商服务器是否包括协议版本号2的SDK插件;若该第一协议版本号为协议版本号1时,可以判断该厂商服务器是否包括协议版本号1的SDK插件。As a way, after determining the vendor server corresponding to the quick application, it can be determined whether the mall server includes the SDK plug-in under the first protocol version number. For example, if the first protocol version number is the protocol version number 2, it can be judged whether the manufacturer’s server includes the SDK plug-in of the protocol version number 2; if the first protocol version number is the protocol version number 1, the manufacturer’s server can be judged Whether to include the SDK plug-in of the protocol version number 1.
步骤S2322:若所述厂商服务器包括所述第一协议版本号下的SDK插件,基于所述第一协议版本号,在所述厂商服务器中查找所述第一协议版本号下的最新版本的SDK插件并保存。Step S2322: If the vendor server includes the SDK plug-in under the first protocol version number, based on the first protocol version number, search the vendor server for the latest version of the SDK under the first protocol version number Plug-in and save.
其中,若判断结果表征该厂商服务器包括该第一协议版本号下的SDK插件时,则可以在该厂商服务器中查找该第一协议版本号下的最新版本的SDK插件并保存。例如,若第一协议版本号为协议版本号2,且该厂商服务器包括协议版本号2下的SDK插件,则可以在厂商服务器中查找该协议版本号2下的所有SDK插件中的最新版本的SDK插件,从而获取该最新版本的SDK插件并保存。Wherein, if the judgment result indicates that the manufacturer's server includes the SDK plug-in under the first protocol version number, the latest version of the SDK plug-in under the first protocol version number can be searched and saved in the manufacturer's server. For example, if the first protocol version number is protocol version number 2, and the manufacturer’s server includes the SDK plug-in under protocol version number 2, then the manufacturer’s server can search for the latest version of all SDK plugins under protocol version number 2. SDK plug-in to obtain the latest version of the SDK plug-in and save it.
步骤S2323:若所述厂商服务器不包括所述第一协议版本号下的SDK插件,获取所述应用程序的第二协议版本号,其中,所述第二协议版本号小于所述第一协议版本号。Step S2323: If the vendor server does not include the SDK plug-in under the first protocol version number, obtain the second protocol version number of the application, where the second protocol version number is smaller than the first protocol version number.
其中,若判断结果表征该厂商服务器不包括该第一协议版本号下的SDK插件时,则可以获取该应用程序的第二协议版本号,其中,该第二协议版本号小于该第一协议版本号,例如,若该第一协议版本号为协议版本号5,且该厂商服务器不包括协议版本号5下的SDK插件时,则可以从协议版本号1、协议版本号2、协议版本号3、协议版本号4等协议版本号小于协议版本号5的协议版本号中选择一第二协议版本号,例如,选择协议版本号4作为该第二协议版本号,选择协议版本号2作为第二协议版本号等。Wherein, if the judgment result indicates that the manufacturer's server does not include the SDK plug-in under the first protocol version number, the second protocol version number of the application can be obtained, where the second protocol version number is smaller than the first protocol version For example, if the first protocol version number is protocol version number 5, and the manufacturer’s server does not include the SDK plug-in under protocol version number 5, you can select from protocol version number 1, protocol version number 2, and protocol version number 3. , Protocol version number 4 and other protocol version numbers less than protocol version number 5, select a second protocol version number, for example, select protocol version number 4 as the second protocol version number, and protocol version number 2 as the second Protocol version number, etc.
作为一种方式,该第二协议版本号仅小于第一协议版本号。例如,若该第一协议版本号为协议版本号5时,那么,该第二协议版本号为协议版本号4;若该第一协议版本号为协议版本号4时,那么,该第二协议版本号为协议版本号3,在此不再赘述。As a way, the second protocol version number is only smaller than the first protocol version number. For example, if the first protocol version number is the protocol version number 5, then the second protocol version number is the protocol version number 4; if the first protocol version number is the protocol version number 4, then the second protocol The version number is the protocol version number 3. It will not be repeated here.
步骤S2324:基于所述第二协议版本号,在所述厂商服务器中查找所述第二协议版本号下的最新版本的SDK插件。Step S2324: Based on the second protocol version number, search for the latest version of the SDK plug-in under the second protocol version number in the vendor server.
进一步地,在确定该第二协议版本号后,可以在厂商服务器中查找该第二协议版本号下的最新版本的SDK插件,以提升移动终端获取到可运行的最新版本的SDK插件的可能性,提升用户体验。Further, after the second protocol version number is determined, the latest version of the SDK plug-in under the second protocol version number can be searched in the manufacturer’s server to improve the possibility that the mobile terminal can obtain the latest version of the SDK plug-in that can be run , Improve user experience.
步骤S240:当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令,从所述移动终端的本地获取所述目标SDK插件。Step S240: When receiving the second startup instruction for the fast application, respond to the second startup instruction to obtain the target SDK plug-in locally from the mobile terminal.
其中,步骤S240的具体描述请参阅步骤S130,在此不再赘述。For the specific description of step S240, please refer to step S130, which will not be repeated here.
步骤S250:从所述目标SDK插件中分离目标文件并加载所述目标SDK插件。Step S250: Separate the target file from the target SDK plugin and load the target SDK plugin.
在本实施例中,从移动终端的本地获取该目标SDK插件后,可以将该SDK插件中的目标文件分离出来,并加载该目标SDK插件,其中,目标文件至少包括配置文件和so文件,从而保证该SDK插件在使用的时候读取文件快速。作为一种方式,在加载的时候,可以是直接动态加载该目标SDK插件,但是目标文件中的so文件还是需要单独加载,其中,so文件可以是使用loadlibrary加载的,配置文件可以在加载的时候在代码里面读取。In this embodiment, after the target SDK plug-in is obtained locally from the mobile terminal, the target file in the SDK plug-in can be separated and the target SDK plug-in can be loaded, where the target file includes at least a configuration file and a so file, thereby Ensure that the SDK plugin reads files quickly when in use. As a way, when loading, the target SDK plug-in can be directly loaded dynamically, but the so file in the target file still needs to be loaded separately. Among them, the so file can be loaded using loadlibrary, and the configuration file can be loaded when loading. Read in the code.
请参阅图10,图10示出了本申请的图6所示的SDK插件的加载方法的步骤S250的流程示意图。下面将针对图10所示的流程进行详细的阐述,所述方法具体可以包括以下步骤:Please refer to FIG. 10, which shows a schematic flowchart of step S250 of the method for loading the SDK plug-in shown in FIG. 6 of the present application. The following will elaborate on the process shown in FIG. 10, and the method may specifically include the following steps:
步骤S251:从所述目标SDK插件中分离所述目标文件,并判断所述目标文件是否完整。Step S251: Separate the target file from the target SDK plug-in, and determine whether the target file is complete.
作为一种实施方式,移动终端从目标SDK插件中分离出目标文件后,可以判断该目标文件是否完整,例如,判断该配置文件和so文件是否完整。As an implementation manner, after the mobile terminal separates the target file from the target SDK plug-in, it can determine whether the target file is complete, for example, whether the configuration file and the so file are complete.
步骤S252:若所述目标文件完整,加载所述目标SDK插件。Step S252: If the target file is complete, load the target SDK plug-in.
作为一种方式,若判断结果表征该目标文件完整,可以直接加载该目标SDK文件。As a way, if the judgment result indicates that the target file is complete, the target SDK file can be loaded directly.
作为另一种方式,若判断结果表征该目标文件不完整,可能会造成文件缺失不能正常使用,而由于配置文件和so文件等目标文件是从SDK插件中分离出来的,因此,可以再次从SDK插件中分离该目标文件,从而保证配置文件或so文件等目标文件由于意外损坏或被删除时,也能够重新进行处理,这样既能保证加载的时候不会出错,保证SDK插件加载的安全性和加载的SDK插件的完整性,同时又保证加载的速度。As another way, if the judgment result indicates that the target file is incomplete, it may cause the file to be missing and cannot be used normally. Since the target file such as the configuration file and the so file is separated from the SDK plug-in, it can be removed from the SDK again The target file is separated from the plug-in, so as to ensure that when the target file such as the configuration file or the so file is accidentally damaged or deleted, it can be processed again. This can ensure that there will be no errors when loading, and ensure the safety and security of the SDK plug-in loading. The integrity of the loaded SDK plug-in, while ensuring the speed of loading.
步骤S260:当所述移动终端下载到与所述快应用对应的待加载SDK插件时,判断所述应用程序是否在加载所述目标SDK插件后被杀掉。Step S260: When the mobile terminal downloads the SDK plug-in corresponding to the quick application to be loaded, it is determined whether the application is killed after the target SDK plug-in is loaded.
进一步地,若移动终端在加载该目标SDK后,再次下载到与该快应用对应的待加载SDK时,可以判断该应用程序是否在加载该目标SDK插件后被杀掉(kill),即可以判断该应用程序是否在加载目标SDK插件后完全退出。Further, if the mobile terminal downloads the SDK to be loaded corresponding to the fast application again after loading the target SDK, it can judge whether the application is killed after loading the target SDK plug-in, that is, it can be judged Whether the application completely exits after loading the target SDK plug-in.
步骤S270:若所述移动终端在加载所述目标SDK插件后没有被杀掉,保存所述待加载SDK插件,并保留所述目标SDK插件继续作为所述快应用的当前SDK插件。Step S270: If the mobile terminal is not killed after loading the target SDK plug-in, save the SDK plug-in to be loaded, and keep the target SDK plug-in as the current SDK plug-in of the fast application.
其中,若判断结果表征移动终端在加载该目标SDK插件后没有被杀掉,作为一种方式,可以保存该待加载SDK插件以作为下次加载的SDK插件,以及保留该目标SDK插件继续作为该快应用的当前SDK插件,也就是说,即使移动终端再次下载到待加载SDK插件,如果该应用程序从加载目标SDK插件到下载到待加载SDK插件的过程中没有被杀掉,则不再重新加载其他SDK插件,如不再重新加载待加载SDK插件。具体地,如果应用程序拉起过快应用然后退出再进入,而上一次快应用没有退出,可以在快应用加载SDK插件,此时加载到的是本地的最新版本的SDK插件,如果应用程序再次下载到了更新版本的待加载SDK插件时,则快应用继续使用之前加载的目标SDK插件,除非该应用程序被杀掉后再重启进入,从而保证不会有多版本的SDK插件一起加载的情况。Among them, if the judgment result indicates that the mobile terminal was not killed after loading the target SDK plug-in, as a way, the SDK plug-in to be loaded can be saved as the SDK plug-in to be loaded next time, and the target SDK plug-in can be kept as the Kuaiapp’s current SDK plug-in, that is, even if the mobile terminal downloads the SDK plug-in to be loaded again, if the application is not killed during the process from loading the target SDK plug-in to downloading to the SDK plug-in to be loaded, it will not be restarted Load other SDK plugins, such as not reloading the SDK plugin to be loaded. Specifically, if the application pulls up the fast application and then exits and then enters, but the fast application did not exit last time, you can load the SDK plugin in the fast application. At this time, the latest version of the local SDK plugin is loaded. When a newer version of the SDK plug-in to be loaded is downloaded, Kuaiapp will continue to use the previously loaded target SDK plug-in, unless the application is killed and then restarted to ensure that multiple versions of the SDK plug-in will not be loaded together.
本申请又一个实施例提供的SDK插件的加载方法,移动终端接收针对应用程序的第一启动指令,当响应到该第一启动指令并满足指定下载条件时,获取快应用的参数信息,基于该参数信息下载与快应用对应的目标SDK插件并保存。当接收到针对快应用的第二启动指令时,响应该第二启动指令,从移动终端的本地获取该目标SDK插件,从目标SDK插件中分离目标文件并加载该目标SDK插件。当移动终端再次下载到与快应用对应的待加载SDK插件时,判断该应用程序是否在加载该目标SDK插件后被杀掉,若移动终端在加载该目标SDK插件后没有被杀掉,则保存该待加载SDK插件,并保留该目标SDK插件继续作为该快应用的当前SDK插件。相较于图5所示的SDK插件的加载方法,本实施例可以基于快应用的参数信息下载SDK插件,以提升SDK插件获取的速度与准确性,另外还可以从目标SDK插件中分离目标文件并加载,以提升目标SDK插件的加载速度和记载的安全性。In the method for loading the SDK plug-in provided by another embodiment of the present application, the mobile terminal receives the first startup instruction for the application, and when it responds to the first startup instruction and satisfies the specified download conditions, obtains the parameter information of the quick application, based on the The parameter information downloads the target SDK plug-in corresponding to the quick application and saves it. When receiving the second startup instruction for the quick application, in response to the second startup instruction, the target SDK plug-in is obtained locally from the mobile terminal, the target file is separated from the target SDK plug-in, and the target SDK plug-in is loaded. When the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application again, judge whether the application is killed after loading the target SDK plug-in, if the mobile terminal is not killed after loading the target SDK plug-in, save The SDK plug-in to be loaded, and the target SDK plug-in is retained as the current SDK plug-in of the fast application. Compared with the method for loading the SDK plug-in shown in FIG. 5, this embodiment can download the SDK plug-in based on the parameter information of the fast application to improve the speed and accuracy of obtaining the SDK plug-in. In addition, the target file can be separated from the target SDK plug-in. And load it to improve the loading speed of the target SDK plug-in and the security of records.
请参阅图11,图11示出了本申请再一个实施例提供的SDK插件的加载方法的流程示意图。 所述方法应用于上述移动终端,下面将针对图11所示的流程进行详细的阐述,所述SDK插件的加载方法具体可以包括以下步骤:Please refer to FIG. 11, which shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application. The method is applied to the above-mentioned mobile terminal. The process shown in FIG. 11 will be described in detail below. The method for loading the SDK plug-in may specifically include the following steps:
步骤S310:所述移动终端接收针对所述应用程序的第一启动指令。Step S310: The mobile terminal receives a first start instruction for the application.
步骤S320:当响应到所述第一启动指令并满足指定下载条件时,获取所述快应用的参数信息。Step S320: Acquire parameter information of the quick application when the first start instruction is responded to and the specified download condition is satisfied.
步骤S330:基于所述参数信息下载与所述快应用对应的目标SDK插件并保存。Step S330: Download and save the target SDK plug-in corresponding to the fast application based on the parameter information.
步骤S340:当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令,从所述移动终端的本地获取所述目标SDK插件。Step S340: When receiving a second startup instruction for the quick application, respond to the second startup instruction to obtain the target SDK plug-in locally from the mobile terminal.
步骤S350:从所述目标SDK插件中分离目标文件并加载所述目标SDK插件。Step S350: Separate the target file from the target SDK plugin and load the target SDK plugin.
其中,步骤S310-步骤S350的具体描述请参阅步骤S210-步骤S250,在此不再赘述。For the specific description of step S310 to step S350, please refer to step S210 to step S250, which will not be repeated here.
步骤S360:当所述移动终端下载到与所述快应用对应的待加载SDK插件时,判断所述目标SDK插件是否被删除。Step S360: When the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application, it is determined whether the target SDK plug-in is deleted.
进一步地,若移动终端在加载该目标SDK插件后,再次下载到与该快应用对应的待加载SDK插件时,可以判断该目标SDK插件是否被删除,也就是说,可以检测该目标SDK插件是否从移动终端的内存中被删除。Further, if after loading the target SDK plug-in, the mobile terminal downloads the SDK plug-in to be loaded corresponding to the fast application again, it can determine whether the target SDK plug-in is deleted, that is, it can detect whether the target SDK plug-in It is deleted from the memory of the mobile terminal.
步骤S370:若所述目标SDK插件没有被删除,保存所述待加载SDK插件,并保留所述目标SDK插件继续作为所述快应用的当前SDK插件。Step S370: If the target SDK plug-in is not deleted, save the SDK plug-in to be loaded, and keep the target SDK plug-in as the current SDK plug-in of the quick application.
其中,若判断结果表征该目标SDK插件没有被删除,作为一种方式,可以保存该待加载SDK插件以作为下次加载的SDK插件,以及保留该目标SDK插件继续作为该快应用的当前SDK插件,也就是说,即使移动终端再次下载到待加载SDK插件,如果该目标SDK插件从加载目标SDK插件到下载到待加载SDK插件的过程中没有从移动终端的内存中删除,则不再重新加载其他SDK插件,如不再重新加载待加载SDK插件,从而保证不会有多版本的SDK插件一起加载的情况。Among them, if the judgment result indicates that the target SDK plug-in has not been deleted, as a way, the SDK plug-in to be loaded can be saved as the SDK plug-in to be loaded next time, and the target SDK plug-in can be kept as the current SDK plug-in of the fast application. That is, even if the mobile terminal downloads the SDK plug-in to be loaded again, if the target SDK plug-in is not deleted from the memory of the mobile terminal from loading the target SDK plug-in to downloading to the SDK plug-in to be loaded, it will not be reloaded Other SDK plug-ins, such as not reloading the SDK plug-in to be loaded, so as to ensure that multiple versions of SDK plug-ins will not be loaded together.
本申请又一个实施例提供的SDK插件的加载方法,移动终端接收针对应用程序的第一启动指令,当响应到该第一启动指令并满足指定下载条件时,获取快应用的参数信息,基于该参数信息下载与快应用对应的目标SDK插件并保存。当接收到针对快应用的第二启动指令时,响应该第二启动指令,从移动终端的本地获取该目标SDK插件,从目标SDK插件中分离目标文件并加载该目标SDK插件。当移动终端再次下载到与快应用对应的待加载SDK插件时,判断该目标SDK插件是否被删除,若该目标SDK插件没有被删除,保存该待加载SDK插件,并保留该目标SDK插件继续作为快应用的当前SDK插件。相较于图5所示的SDK插件的加载方法,本实施例可以基于快应用的参数信息下载SDK插件,以提升SDK插件获取的速度与准确性,另外还可以从目标SDK插件中分离目标文件并加载,以提升目标SDK插件的加载速度和记载的安全性。In the method for loading the SDK plug-in provided by another embodiment of the present application, the mobile terminal receives the first startup instruction for the application, and when it responds to the first startup instruction and satisfies the specified download conditions, obtains the parameter information of the quick application, based on the The parameter information downloads the target SDK plug-in corresponding to the quick application and saves it. When receiving the second startup instruction for the quick application, in response to the second startup instruction, the target SDK plug-in is obtained locally from the mobile terminal, the target file is separated from the target SDK plug-in, and the target SDK plug-in is loaded. When the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick app again, it is judged whether the target SDK plug-in is deleted. If the target SDK plug-in is not deleted, save the SDK plug-in to be loaded, and keep the target SDK plug-in as The current SDK plugin for fast application. Compared with the method for loading the SDK plug-in shown in FIG. 5, this embodiment can download the SDK plug-in based on the parameter information of the fast application to improve the speed and accuracy of obtaining the SDK plug-in. In addition, the target file can be separated from the target SDK plug-in. And load it to improve the loading speed of the target SDK plug-in and the security of records.
请参阅图12,图12示出了本申请另一个实施例提供的SDK插件的加载方法的流程示意图。所述方法应用于上述移动终端,该移动终端安装有应用程序,该应用程序中添加有多个快应用,下面将针对图12所示的流程进行详细的阐述,所述SDK插件的加载方法具体可以包括以下步骤:Please refer to FIG. 12, which shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application. The method is applied to the above-mentioned mobile terminal, the mobile terminal is installed with an application program, and multiple quick applications are added to the application program. The process shown in FIG. 12 will be described in detail below. The loading method of the SDK plug-in is specifically It can include the following steps:
步骤S410:所述移动终端接收针对所述应用程序的第一启动指令。Step S410: The mobile terminal receives a first start instruction for the application.
其中,步骤S410的具体描述请参阅步骤S110,在此不再赘述。For the specific description of step S410, please refer to step S110, which will not be repeated here.
步骤S420:响应所述第一启动指令,启动所述应用程序并显示所述应用程序的首页。Step S420: In response to the first start instruction, start the application and display the home page of the application.
作为一种方式,移动终端在接收到第一启动指令后,可以响应该第一启动指令启动应用程序,并进入该应用程序的首页并显示。As a way, after receiving the first start instruction, the mobile terminal can start the application in response to the first start instruction, and enter and display the home page of the application.
步骤S430:获取所述首页显示的设备信息,并获取所述设备信息对应的目标快应用。Step S430: Obtain the device information displayed on the home page, and obtain the target quick application corresponding to the device information.
进一步地,该应用程序的首页可以显示有多个设备的设备信息,设备信息可以以文字的形式显示,例如,应用程序的首页显示“XX空调”、“XX冰箱”、“XX电视”等,其中,“XX”可以表征品牌;设备信息可以以图片的形式显示,又例如,应用程序的首页显示包括XX空调文字的图片、显示包括XX冰箱文字的图片、显示包括XX电视文字的图片等,再例如,应用程序的首页显示包括XX空调文字的控件、显示包括XX冰箱文字的控件、显示包括XX电视文字的控件等,在此不做限定。作为一种方式,对应用程序的首页的显示内容进行识别,例如,可以对移动终端的首页显示的图片、首页显示的文字、首页显示的控件进行识别,从而获取该应用程序的首页显示的设备信息。Further, the homepage of the application can display device information of multiple devices, and the device information can be displayed in text form. For example, the homepage of the application displays "XX air conditioner", "XX refrigerator", "XX TV", etc. Among them, "XX" can characterize the brand; device information can be displayed in the form of pictures, for example, the home page of the application displays pictures including XX air conditioning text, displays pictures including XX refrigerator text, displays pictures including XX TV text, etc. For another example, the home page display of the application program includes controls for XX air conditioner text, controls for display including XX refrigerator text, and controls for display including XX TV text, which are not limited here. As a way, the display content of the homepage of the application can be recognized. For example, the picture displayed on the homepage of the mobile terminal, the text displayed on the homepage, and the controls displayed on the homepage can be recognized to obtain the device displayed on the homepage of the application. information.
另外,在获取该设备信息后,可以根据该设备信息获取该设备信息对应的目标快应用。作为一种方式,可以建立快应用与设备信息的对应关系,以便根据设备标识确定与设备标识对应的快应用。作为一种方式,快应用与设备信息的对应关系,可以以列表的形式存储于安装应用程序的移动终端内,列表中,每个设备信息均对应有一个快应用,或者多个设备信息对应有一个快应用。In addition, after obtaining the device information, the target quick application corresponding to the device information can be obtained according to the device information. As a way, the corresponding relationship between the quick application and the device information can be established, so as to determine the quick application corresponding to the device identification according to the device identification. As a way, the correspondence between quick apps and device information can be stored in the mobile terminal where the application is installed in the form of a list. In the list, each device information corresponds to one quick app, or multiple device information corresponds to A quick application.
步骤S440:优先下载所述多个快应用中的目标快应用对应的目标SDK插件并保存。Step S440: download and save the target SDK plug-in corresponding to the target quick application among the multiple quick applications first.
进一步地,由于该目标快应用对应的设备信息显示在应用程序的首页,因此,该设备信息对应的控件被用户选择的可能性最大,因此,为了保证用户在选择该设备信息对应的控件时,该设备信息对应的目标 快应用对应的SDK插件已下载完成,提升用户体验,可以优先下载该多个快应用中的目标快应用对应的目标SDK插件并保存。Further, since the device information corresponding to the target fast application is displayed on the home page of the application, the control corresponding to the device information is most likely to be selected by the user. Therefore, in order to ensure that the user selects the control corresponding to the device information, The SDK plug-in corresponding to the target quick application corresponding to the device information has been downloaded to improve user experience, and the target SDK plug-in corresponding to the target quick application among the multiple quick applications can be downloaded first and saved.
作为一种方式,该移动终端可以分别下载与多个快应用中的每个快应用对应的目标SDK插件,并将每个快应用对应的目标SDK插件保存在不同的存储区域,从而实现不同品牌、不同协议版本、不同协议版本号的SDK插件存储的目录是不同的,下载和加载的时候不会互相干扰。As a way, the mobile terminal can separately download the target SDK plug-in corresponding to each of the multiple quick applications, and save the target SDK plug-in corresponding to each quick application in a different storage area, thereby achieving different brands , SDK plug-ins with different protocol versions and different protocol version numbers are stored in different directories, and will not interfere with each other when downloading and loading.
步骤S450:当接收到针对所述目标快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标快应用对应的目标SDK插件,并继续下载所述多个快应用中除所述目标快应用之外的其他快应用对应的目标SDK插件。Step S450: When receiving a second startup instruction for the target flash application, load the target SDK plug-in corresponding to the target flash application from the local of the mobile terminal in response to the second startup instruction, and continue to download the Target SDK plug-ins corresponding to other fast applications in the multiple fast applications except the target fast application.
进一步地,当移动终端响应第二启动指令加载该目标快应用对应的目标SDK插件时,还可以继续下载多个快应用中除该目标快应用之外的其他快应用对应的目标SDK插件,因此,可以实现SDK插件的下载不影响用户的正常使用,提升用户体验。Further, when the mobile terminal loads the target SDK plug-in corresponding to the target fast application in response to the second start instruction, it can also continue to download the target SDK plug-ins corresponding to other fast apps among the multiple fast apps except the target fast application. Therefore, , Can realize that the download of SDK plug-in will not affect the normal use of users, and improve user experience.
本申请另一个实施例提供的SDK插件的加载方法,移动终端接收针对应用程序的第一启动指令,响应该第一启动指令,启动应用程序并显示该应用程序的首页,获取首页显示的设备信息,并获取该设备信息对应的目标快应用,优先下载多个快应用中的目标快应用对应的目标SDK插件并保存,当接收到针对该目标快应用的第二启动指令时,响应该第二启动指令从移动终端的本地加载该目标快应用对应的目标SDK插件,并继续下载多个快应用中除目标快应用之外的其他快应用对应的目标SDK插件。相较于图5所示的SDK插件的加载方法,本实施例还优先记载应用程序显示的设备信息对应的快应用的目标SDK插件,提升用户体验。In the method for loading the SDK plug-in provided by another embodiment of the present application, the mobile terminal receives the first startup instruction for the application, responds to the first startup instruction, starts the application and displays the homepage of the application, and obtains the device information displayed on the homepage , And obtain the target fast application corresponding to the device information, download and save the target SDK plug-in corresponding to the target fast application among multiple fast applications first, and respond to the second start instruction for the target fast application when receiving the second start instruction for the target fast application. The start instruction loads the target SDK plug-in corresponding to the target fast application from the local of the mobile terminal, and continues to download the target SDK plug-ins corresponding to other fast applications in the multiple fast applications except the target fast application. Compared with the method for loading the SDK plug-in shown in FIG. 5, this embodiment also preferentially records the target SDK plug-in of the fast application corresponding to the device information displayed by the application program, thereby improving user experience.
请参阅图13,图13示出了本申请又再一个实施例提供的SDK插件的加载方法的流程示意图。所述方法应用于上述移动终端,该移动终端安装有应用程序,该应用程序中添加有多个快应用,下面将针对图13所示的流程进行详细的阐述,所述SDK插件的加载方法具体可以包括以下步骤:Please refer to FIG. 13, which shows a schematic flowchart of a method for loading an SDK plug-in provided by another embodiment of the present application. The method is applied to the above-mentioned mobile terminal, the mobile terminal is installed with an application program, and multiple quick applications are added to the application program. The process shown in FIG. 13 will be described in detail below. The method for loading the SDK plug-in is specifically It can include the following steps:
步骤S510:所述移动终端接收针对所述应用程序的第一启动指令。Step S510: The mobile terminal receives a first start instruction for the application.
其中,步骤S510的具体描述请参阅步骤S110,在此不再赘述。For the specific description of step S510, please refer to step S110, which will not be repeated here.
步骤S520:响应所述第一启动指令,获取所述快应用的当前SDK插件并识别所述当前SDK插件的当前版本。Step S520: In response to the first startup instruction, obtain the current SDK plug-in of the quick application and identify the current version of the current SDK plug-in.
作为一种方式,移动终端在接收到第一启动指令时,可以响应该第一启动指令获取该快应用的当前SDK插件,并识别该当前SDK插件的当前版本。As a way, when the mobile terminal receives the first startup instruction, it can respond to the first startup instruction to obtain the current SDK plug-in of the fast application, and identify the current version of the current SDK plug-in.
步骤S530:判断所述当前版本是否为最新版本。Step S530: Determine whether the current version is the latest version.
进一步地,在获取该快应用的当前SDK插件的当前版本后,可以判断该当前版本是否为最新版本。作为一种实施方式,可以分别获取该当前版本的版本号和最新版本的版本号,比较当前版本的版本号是否和最新版本的版本号一致,若当前版本的版本号与最新版本的版本号一致,则可以确定该当前版本为最新版本,若当前版本的版本号与最新版本的版本号不一致,则可以确定该当前版本不是最新版本。Further, after obtaining the current version of the current SDK plug-in of the quick application, it can be determined whether the current version is the latest version. As an implementation manner, the version number of the current version and the version number of the latest version can be obtained separately, and whether the version number of the current version is consistent with the version number of the latest version is compared, if the version number of the current version is consistent with the version number of the latest version , It can be determined that the current version is the latest version. If the version number of the current version is inconsistent with the version number of the latest version, it can be determined that the current version is not the latest version.
步骤S540:若所述当前版本不是最新版本,下载与所述快应用对应的最新版本的SDK插件并保存。Step S540: If the current version is not the latest version, download the latest version of the SDK plug-in corresponding to the quick application and save it.
其中,作为一种方式,若判断结果表征当前版本不是最新版本,可以下载与快应用对应的最新版本的SDK插件并保存,以保证该快应用所加载到的SDK插件为最新版本;作为另一种方式,若判断结果表征当前版本是最新版本,则可以不进行SDK插件的下载处理,以降低移动终端的功耗。Among them, as a method, if the judgment result indicates that the current version is not the latest version, the latest version of the SDK plug-in corresponding to the quick app can be downloaded and saved to ensure that the SDK plug-in loaded by the quick app is the latest version; as another In this way, if the judgment result indicates that the current version is the latest version, the download processing of the SDK plug-in may not be performed to reduce the power consumption of the mobile terminal.
步骤S550:响应所述第二启动指令,检测所述移动终端是否配置有与所述快应用对应的原始SDK插件。Step S550: In response to the second start instruction, detect whether the mobile terminal is configured with an original SDK plug-in corresponding to the quick application.
在本实施例中,移动终端在接收到第二启动指令时,可以响应该第二启动指令检测该移动终端是否配置有与快应用对应的原始SDK插件,也就是说,可以响应该第二启动指令检测移动终端是否加载有与该快应用对应的原始SDK插件。In this embodiment, when the mobile terminal receives the second startup instruction, it can respond to the second startup instruction to detect whether the mobile terminal is configured with the original SDK plug-in corresponding to the quick application, that is, it can respond to the second startup The instruction detects whether the mobile terminal is loaded with the original SDK plug-in corresponding to the fast application.
步骤S560:若所述移动终端配置有与所述快应用对应的原始SDK插件,强制将所述原始SDK插件更新为所述目标SDK插件。Step S560: If the mobile terminal is configured with an original SDK plug-in corresponding to the quick application, forcibly update the original SDK plug-in to the target SDK plug-in.
作为一种方式,若检测结果表征该移动终端配置有与快应用对应的原始SDK插件时,可以强制将原始SDK插件更新为目标SDK插件,以保证该移动终端加载的SDK插件的版本为最新版本。As a way, if the detection result indicates that the mobile terminal is equipped with the original SDK plug-in corresponding to the quick app, the original SDK plug-in can be forced to update to the target SDK plug-in to ensure that the version of the SDK plug-in loaded by the mobile terminal is the latest version .
步骤S570:若所述移动终端配置有与所述快应用对应的原始SDK插件,输出提示信息,其中,所述提示信息用户提示用户选择是否将所述原始SDK插件更新为所述目标SDK插件。Step S570: If the mobile terminal is configured with the original SDK plug-in corresponding to the quick application, output a prompt message, wherein the prompt message user prompts the user to choose whether to update the original SDK plug-in to the target SDK plug-in.
作为另一种方式,若检测结果表征该移动终端配置有与快应用对应的原始SDK插件时,可以输出提示信息,故意提示用户选择是否将原始SDK插件更新为目标SDK插件,提升用户体验。As another way, if the detection result indicates that the mobile terminal is configured with the original SDK plug-in corresponding to the quick app, a prompt message can be output to deliberately prompt the user to choose whether to update the original SDK plug-in to the target SDK plug-in, so as to improve user experience.
本申请另一个实施例提供的SDK插件的加载方法,移动终端接收针对应用程序的第一启动指令,响应该第一启动指令,获取快应用的当前SDK插件并识别当前SDK插件的当前版本,判断该当前版本是否为最新版本,若该当前版本不是最新版本,则下载与快应用对应的最新版本的SDK插件并保存,响应该第二启动指令,检测移动终端是否配置有与快应用对应的原始SDK插件,若移动 终端配置有与快应用对应的原始SDK插件,强制将原始SDK插件更新为目标SDK插件,或者若移动终端配置有与快应用对应的原始SDK插件,输出提示信息,该提示信息用于提示用户选择是否将原始SDK插件更新为目标SDK插件。相较于图5所示的SDK插件的加载方法,本实施例在快应用的当前SDK插件版本不是最新版本时再下载目标SDK插件,降低移动终端的功耗,另外,在移动终端配置有快应用对应的原始SDK插件时,强制更新或用户选择更新,提升用户体验。In the method for loading the SDK plug-in provided by another embodiment of the present application, the mobile terminal receives the first startup instruction for the application, responds to the first startup instruction, obtains the current SDK plug-in of the fast application and identifies the current version of the current SDK plug-in, and judges Whether the current version is the latest version, if the current version is not the latest version, download the latest version of the SDK plug-in corresponding to the quick app and save it, respond to the second start instruction, and detect whether the mobile terminal is configured with the original corresponding to the quick app SDK plug-in, if the mobile terminal is configured with the original SDK plug-in corresponding to the quick app, it is mandatory to update the original SDK plug-in to the target SDK plug-in, or if the mobile terminal is configured with the original SDK plug-in corresponding to the quick app, a prompt message is output, the prompt message Used to prompt the user to choose whether to update the original SDK plugin to the target SDK plugin. Compared with the method for loading the SDK plug-in shown in FIG. 5, this embodiment downloads the target SDK plug-in when the current SDK plug-in version of the fast application is not the latest version, reducing the power consumption of the mobile terminal. In addition, the mobile terminal is configured with a fast When applying the corresponding original SDK plug-in, it is mandatory to update or the user chooses to update to improve user experience.
请参阅图14,图14示出了本申请实施例提供的SDK插件的加载装置500的模块框图。该SDK插件的加载装置500应用于上述移动终端,该移动终端安装有应用程序,应用程序中添加有快应用。下面将针对图14所示的框图进行阐述,所述SDK插件的加载装置500包括:指令接收模块510、SDK插件下载模块520以及SDK插件加载模块530,其中:Please refer to FIG. 14, which shows a block diagram of a device 500 for loading an SDK plug-in according to an embodiment of the present application. The loading device 500 of the SDK plug-in is applied to the above-mentioned mobile terminal, the mobile terminal is installed with an application program, and a quick application is added to the application program. The following will elaborate on the block diagram shown in FIG. 14. The SDK plug-in loading device 500 includes: an instruction receiving module 510, an SDK plug-in downloading module 520, and an SDK plug-in loading module 530, where:
指令接收模块510,用于所述移动终端接收针对所述应用程序的第一启动指令。The instruction receiving module 510 is used for the mobile terminal to receive a first start instruction for the application.
SDK插件下载模块520,用于当响应到所述第一启动指令并满足指定下载条件时,下载与所述快应用对应的目标软件开发工具包SDK插件并保存。进一步地,所述SDK插件下载模块520包括:参数信息获取子模块和第一SDK插件下载子模块,其中:The SDK plug-in download module 520 is configured to download and save the target software development kit SDK plug-in corresponding to the fast application when the specified download condition is met in response to the first start instruction. Further, the SDK plug-in download module 520 includes: a parameter information acquisition sub-module and a first SDK plug-in download sub-module, wherein:
参数信息获取子模块,用于获取所述快应用的参数信息。进一步地,所述参数信息获取子模块包括:品牌信息获取单元、第一协议版本号获取单元以及参数信息获取单元,其中:The parameter information acquisition sub-module is used to acquire the parameter information of the fast application. Further, the parameter information obtaining submodule includes: a brand information obtaining unit, a first protocol version number obtaining unit, and a parameter information obtaining unit, wherein:
品牌信息获取单元,用于获取所述快应用对应的品牌信息。The brand information acquiring unit is used to acquire brand information corresponding to the quick application.
第一协议版本号获取单元,用于获取所述应用程序的第一协议版本号,其中,所述第一协议版本号用于表征所述应用程序支持的协议版本号中的最大版本。The first protocol version number obtaining unit is configured to obtain the first protocol version number of the application program, where the first protocol version number is used to characterize the largest version of the protocol version numbers supported by the application program.
参数信息获取单元,用于基于所述品牌信息和所述第一协议版本号生成所述快应用的参数信息。The parameter information acquiring unit is configured to generate parameter information of the quick application based on the brand information and the first protocol version number.
第一SDK插件下载子模块,用于基于所述参数信息下载与所述快应用对应的目标SDK插件并保存。进一步地,所述SDK插件下载子模块包括:厂商服务器获取单元和SDK插件查找单元,其中:The first SDK plug-in download sub-module is configured to download and save the target SDK plug-in corresponding to the fast application based on the parameter information. Further, the SDK plug-in download sub-module includes: a vendor server acquisition unit and an SDK plug-in search unit, wherein:
厂商服务器获取单元,用于基于所述品牌信息,获取所述快应用对应的厂商服务器。The vendor server obtaining unit is configured to obtain the vendor server corresponding to the fast application based on the brand information.
SDK插件查找单元,用于基于所述第一协议版本号,在所述厂商服务器中查找所述第一协议版本号下的最新版本的SDK插件并保存。进一步地,所述SDK插件查找单元包括:判断子单元、第一SDK插件查找子单元、第二协议版本号获取子单元以及第二SDK插件查找子单元,其中:The SDK plug-in search unit is configured to search for and save the latest version of the SDK plug-in under the first protocol version number in the vendor server based on the first protocol version number. Further, the SDK plug-in search unit includes: a judgment subunit, a first SDK plug-in search subunit, a second protocol version number acquisition subunit, and a second SDK plug-in search subunit, wherein:
判断子单元,用于判断所述厂商服务器是否包括所述第一协议版本号下的SDK插件。The judging subunit is used to judge whether the vendor server includes the SDK plug-in under the first protocol version number.
第一SDK插件查找子单元,用于若所述厂商服务器包括所述第一协议版本号下的SDK插件,基于所述第一协议版本号,在所述厂商服务器中查找所述第一协议版本号下的最新版本的SDK插件并保存。The first SDK plug-in search subunit is configured to, if the vendor server includes the SDK plug-in under the first protocol version number, search for the first protocol version in the vendor server based on the first protocol version number Save the latest version of the SDK plug-in under the number.
第二协议版本号获取子单元,用于若所述厂商服务器不包括所述第一协议版本号下的SDK插件,获取所述应用程序的第二协议版本号,其中,所述第二协议版本号小于所述第一协议版本号。The second protocol version number obtaining subunit is configured to obtain the second protocol version number of the application program if the vendor server does not include the SDK plug-in under the first protocol version number, where the second protocol version The number is smaller than the first protocol version number.
第二SDK插件查找子单元,用于基于所述第二协议版本号,在所述厂商服务器中查找所述第二协议版本号下的最新版本的SDK插件。The second SDK plug-in searching subunit is configured to search for the latest version of the SDK plug-in under the second protocol version number in the vendor server based on the second protocol version number.
进一步地,所述应用程序中添加有多个快应用,所述SDK插件下载模块420还包括:第二目标SDK插件下载子模块、目标SDK插件保存子模块、首页显示子模块、目标快应用获取子模块以及优先下载子模块,其中:Further, multiple quick apps are added to the application, and the SDK plug-in download module 420 further includes: a second target SDK plug-in download sub-module, a target SDK plug-in saving sub-module, a home page display sub-module, and a target quick application acquisition Sub-modules and priority download sub-modules, including:
第二目标SDK插件下载子模块,用于分别下载与所述多个快应用中的每个快应用对应的目标SDK插件。The second target SDK plug-in downloading sub-module is used to download the target SDK plug-in corresponding to each of the multiple quick applications.
目标SDK插件保存子模块,用于将所述每个快应用对应的目标SDK插件保存在不同的存储区域。The target SDK plugin saving submodule is used to save the target SDK plugin corresponding to each quick application in a different storage area.
首先显示子模块,用于响应所述第一启动指令,启动所述应用程序并显示所述应用程序的首页。First, a display sub-module is used to respond to the first start instruction to start the application and display the home page of the application.
目标快应用获取子模块,用于获取所述首页显示的设备信息,并获取所述设备信息对应的目标快应用。The target quick app acquisition submodule is used to obtain the device information displayed on the homepage, and obtain the target quick app corresponding to the device information.
优先下载子模块,用于优先下载所述多个快应用中的目标快应用对应的目标SDK插件并保存。The priority downloading sub-module is used to download and save the target SDK plug-in corresponding to the target fast application among the multiple fast applications.
进一步地,所述SDK插件下载模块520还包括:当前版本获取子模块、当前版本判断子模块以及第三目标SDK插件下载子模块,其中:Further, the SDK plug-in download module 520 further includes: a current version acquisition sub-module, a current version judgment sub-module, and a third target SDK plug-in download sub-module, where:
当前版本获取子模块,用于响应所述第一启动指令,获取所述快应用的当前SDK插件并识别所述当前SDK插件的当前版本。The current version obtaining submodule is used to respond to the first start instruction, obtain the current SDK plug-in of the quick application and identify the current version of the current SDK plug-in.
当前版本判断子模块,用于判断所述当前版本是否为最新版本。The current version judgment sub-module is used to judge whether the current version is the latest version.
第三目标SDK插件下载子模块,用于若所述当前版本不是最新版本,下载与所述快应用对应的最新版本的SDK插件并保存。The third target SDK plug-in download sub-module is used to download and save the latest version of the SDK plug-in corresponding to the quick application if the current version is not the latest version.
SDK插件加载模块530,用于当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件。进一步地,所述SDK插件加载模块530包括:SDK插件获取子模块、第一SDK插件加载子模块,其中:The SDK plug-in loading module 530 is configured to load the target SDK plug-in locally in the mobile terminal in response to the second startup instruction when a second startup instruction for the quick application is received. Further, the SDK plug-in loading module 530 includes: an SDK plug-in obtaining sub-module and a first SDK plug-in loading sub-module, wherein:
SDK插件获取子模块,用于响应所述第二启动指令,从所述移动终端的本地获取所述目标SDK插件。The SDK plug-in acquiring sub-module is used to respond to the second start instruction to acquire the target SDK plug-in locally from the mobile terminal.
第一SDK插件加载子模块,用于从所述目标SDK插件中分离目标文件并加载所述目标SDK插件。 进一步地,所述SDK插件加载子模块包括:目标文件分离单元和SDK插件加载单元,其中:The first SDK plug-in loading sub-module is used to separate the target file from the target SDK plug-in and load the target SDK plug-in. Further, the SDK plug-in loading sub-module includes: a target file separation unit and an SDK plug-in loading unit, wherein:
目标文件分离单元,用于从所述目标SDK插件中分离所述目标文件,并判断所述目标文件是否完整。The target file separating unit is used to separate the target file from the target SDK plug-in and determine whether the target file is complete.
SDK插件加载单元,用于若所述目标文件完整,加载所述目标SDK插件。The SDK plug-in loading unit is configured to load the target SDK plug-in if the target file is complete.
进一步地,所述SDK插件加载模块530包括:第二SDK插件加载子模块,其中:Further, the SDK plug-in loading module 530 includes: a second SDK plug-in loading sub-module, wherein:
第二SDK插件加载子模块,用于当接收到针对所述目标快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标快应用对应的目标SDK插件,并继续下载所述多个快应用中除所述目标快应用之外的其他快应用对应的目标SDK插件。The second SDK plug-in loading sub-module is used to load the target SDK corresponding to the target flash application from the local of the mobile terminal in response to the second startup instruction when a second startup instruction for the target flash application is received Plug-ins, and continue to download target SDK plug-ins corresponding to other quick apps among the plurality of quick apps except the target quick app.
进一步地,所述SDK插件加载模块530包括:原始SDK插件检测子模块、强制更新至模块以及提示信息输出子模块,其中:Further, the SDK plug-in loading module 530 includes: an original SDK plug-in detection sub-module, a mandatory update to the module, and a prompt information output sub-module, wherein:
原始SDK插件检测子模块,用于响应所述第二启动指令,检测所述移动终端是否配置有与所述快应用对应的原始SDK插件。The original SDK plug-in detection sub-module is configured to respond to the second start instruction and detect whether the mobile terminal is configured with the original SDK plug-in corresponding to the quick application.
强制更新子模块,用于若所述移动终端配置有与所述快应用对应的原始SDK插件,强制将所述原始SDK插件更新为所述目标SDK插件。The mandatory update sub-module is used to force the original SDK plug-in to be updated to the target SDK plug-in if the mobile terminal is configured with the original SDK plug-in corresponding to the fast application.
提示信息输出子模块,用于若所述移动终端配置有与所述快应用对应的原始SDK插件,输出提示信息,其中,所述提示信息用户提示用户选择是否将所述原始SDK插件更新为所述目标SDK插件。The prompt information output sub-module is configured to output prompt information if the mobile terminal is configured with the original SDK plug-in corresponding to the quick application, wherein the prompt information user prompts the user to choose whether to update the original SDK plug-in to all The target SDK plug-in.
进一步地,所述SDK插件加载的装置500还包括:第一判断模块、第一保留模块、第二判断模块以及第二保留模块,其中:Further, the device 500 for loading the SDK plug-in further includes: a first judgment module, a first reservation module, a second judgment module, and a second reservation module, wherein:
第一判断模块,用于当所述移动终端下载到与所述快应用对应的待加载SDK插件时,判断所述应用程序是否在加载所述目标SDK插件后被杀掉。The first judging module is configured to judge whether the application is killed after loading the target SDK plug-in when the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application.
第一保留模块,用于若所述移动终端在加载所述目标SDK插件后没有被杀掉,保存所述待加载SDK插件,并保留所述目标SDK插件继续作为所述快应用的当前SDK插件。The first retention module is configured to save the SDK plug-in to be loaded if the mobile terminal is not killed after loading the target SDK plug-in, and retain the target SDK plug-in to continue as the current SDK plug-in of the quick application .
第二判断模块,用于当所述移动终端下载到与所述快应用对应的待加载SDK插件时,判断所述目标SDK插件是否被删除。The second judgment module is configured to judge whether the target SDK plug-in is deleted when the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application.
第二保留模块,用于若所述目标SDK插件没有被删除,保存所述待加载SDK插件,并保留所述目标SDK插件继续作为所述快应用的当前SDK插件。The second retention module is configured to save the SDK plug-in to be loaded if the target SDK plug-in is not deleted, and retain the target SDK plug-in to continue as the current SDK plug-in of the quick application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device and module described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
请参阅图15,其示出了本申请实施例提供的一种移动终端100的结构框图。该移动终端100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的移动终端100可以包括一个或多个如下部件:处理器110、存储器120、屏幕130、编解码器140以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 15, which shows a structural block diagram of a mobile terminal 100 provided by an embodiment of the present application. The mobile terminal 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book. The mobile terminal 100 in this application may include one or more of the following components: a processor 110, a memory 120, a screen 130, a codec 140, and one or more application programs, of which one or more application programs may be stored in the memory 120 and configured to be executed by one or more processors 110, and one or more programs are configured to execute the methods described in the foregoing method embodiments.
其中,处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个移动终端100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行移动终端100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可集成中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire mobile terminal 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120. Various functions and processing data of the mobile terminal 100. Optionally, the processor 110 may use at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 110 may be integrated with one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储终端100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following method embodiments, etc. The data storage area can also store data (such as phone book, audio and video data, chat record data) created by the terminal 100 during use.
请参阅图16,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质600中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方 法。Please refer to FIG. 16, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 600 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质600可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质600包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质600具有执行上述方法中的任何方法步骤的程序代码610的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码610可以例如以适当形式进行压缩。The computer-readable storage medium 600 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 600 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 600 has a storage space for the program code 610 for executing any method steps in the above methods. These program codes can be read out from or written into one or more computer program products. The program code 610 may be compressed in a suitable form, for example.
综上所述,本申请实施例提供的SDK插件的加载方法、装置、移动终端以及存储介质,移动终端接收针对该应用程序的第一启动指令,当响应到第一启动指令并满足指定下载条件时,下载与快应用对应的目标SDK插件并保存,当接收到针对快应用的第二启动指令时,响应该第二启动指令从移动终端的本地加载该目标SDK插件,从而通过将SDK插件的下载和加载分离,方便对SDK插件的优化和管理。In summary, the SDK plug-in loading method, device, mobile terminal, and storage medium provided in the embodiments of the present application. The mobile terminal receives the first start instruction for the application, and when it responds to the first start instruction and satisfies the specified download condition Download and save the target SDK plug-in corresponding to the quick application. When receiving the second startup instruction for the quick application, load the target SDK plug-in locally from the mobile terminal in response to the second startup instruction. The separation of downloading and loading facilitates the optimization and management of SDK plug-ins.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the application, not to limit them; although the application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (20)

  1. 一种SDK插件的加载方法,其特征在于,应用于移动终端,所述移动终端安装有应用程序,所述应用程序中添加有快应用,所述方法包括:A method for loading an SDK plug-in, characterized in that it is applied to a mobile terminal, the mobile terminal is installed with an application program, and a quick application is added to the application program, and the method includes:
    所述移动终端接收针对所述应用程序的第一启动指令;Receiving, by the mobile terminal, a first start instruction for the application;
    当响应到所述第一启动指令并满足指定下载条件时,下载与所述快应用对应的目标软件开发工具包SDK插件并保存;When responding to the first start instruction and meeting the specified download conditions, download and save the target software development kit SDK plug-in corresponding to the fast application;
    当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件。When receiving the second start instruction for the fast application, load the target SDK plug-in from the local of the mobile terminal in response to the second start instruction.
  2. 根据权利要求1所述的方法,其特征在于,所述下载与所述快应用对应的目标SDK插件并保存,包括:The method of claim 1, wherein the downloading and saving the target SDK plug-in corresponding to the quick application comprises:
    获取所述快应用的参数信息;Acquiring parameter information of the quick application;
    基于所述参数信息下载与所述快应用对应的目标SDK插件并保存。Download and save the target SDK plug-in corresponding to the fast application based on the parameter information.
  3. 根据权利要求2所述的方法,其特征在于,所述获取所述快应用的参数信息,包括:The method according to claim 2, wherein said acquiring parameter information of said fast application comprises:
    获取所述快应用对应的品牌信息;Acquiring brand information corresponding to the quick application;
    获取所述应用程序的第一协议版本号,其中,所述第一协议版本号用于表征所述应用程序支持的协议版本号中的最大版本;Acquiring a first protocol version number of the application program, where the first protocol version number is used to characterize the largest version of the protocol version numbers supported by the application program;
    基于所述品牌信息和所述第一协议版本号生成所述快应用的参数信息。The parameter information of the quick application is generated based on the brand information and the first protocol version number.
  4. 根据权利要求3所述的方法,其特征在于,所述基于所述参数信息下载与所述快应用对应的目标SDK插件并保存,包括:The method according to claim 3, wherein the downloading and saving the target SDK plug-in corresponding to the fast application based on the parameter information comprises:
    基于所述品牌信息,获取所述快应用对应的厂商服务器;Obtaining a vendor server corresponding to the fast application based on the brand information;
    基于所述第一协议版本号,在所述厂商服务器中查找所述第一协议版本号下的最新版本的SDK插件并保存。Based on the first protocol version number, search for and save the latest version of the SDK plug-in under the first protocol version number in the vendor server.
  5. 根据权利要求4所述的方法,其特征在于,所述基于所述第一协议版本号,在所述厂商服务器中查找所述第一协议版本号下的最新版本的SDK插件并保存,包括:The method according to claim 4, wherein the searching and saving the latest version of the SDK plug-in under the first protocol version number in the vendor server based on the first protocol version number comprises:
    判断所述厂商服务器是否包括所述第一协议版本号下的SDK插件;Judging whether the vendor server includes the SDK plug-in under the first protocol version number;
    若所述厂商服务器包括所述第一协议版本号下的SDK插件,基于所述第一协议版本号,在所述厂商服务器中查找所述第一协议版本号下的最新版本的SDK插件并保存。If the vendor server includes the SDK plug-in under the first protocol version number, based on the first protocol version number, search the vendor server for the latest version of the SDK plug-in under the first protocol version number and save it .
  6. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, wherein the method further comprises:
    若所述厂商服务器不包括所述第一协议版本号下的SDK插件,获取所述应用程序的第二协议版本号,其中,所述第二协议版本号小于所述第一协议版本号;If the manufacturer's server does not include the SDK plug-in under the first protocol version number, obtain the second protocol version number of the application program, where the second protocol version number is smaller than the first protocol version number;
    基于所述第二协议版本号,在所述厂商服务器中查找所述第二协议版本号下的最新版本的SDK插件。Based on the second protocol version number, search for the latest version of the SDK plug-in under the second protocol version number in the vendor server.
  7. 根据权利要求6所述的方法,其特征在于,所述第二协议版本号仅小于所述第一协议版本号。The method according to claim 6, wherein the second protocol version number is only smaller than the first protocol version number.
  8. 根据权利要求1-7任一项所述的方法,其特征在于,所述响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件,包括:The method according to any one of claims 1-7, wherein the loading the target SDK plug-in from a local of the mobile terminal in response to the second start instruction comprises:
    响应所述第二启动指令,从所述移动终端的本地获取所述目标SDK插件;In response to the second start instruction, obtain the target SDK plug-in locally from the mobile terminal;
    从所述目标SDK插件中分离目标文件并加载所述目标SDK插件。Separate the target file from the target SDK plug-in and load the target SDK plug-in.
  9. 根据权利要求8所述的方法,其特征在于,所述从所述目标SDK插件中分离目标文件并加载所述目标SDK插件,包括:The method according to claim 8, wherein the separating the target file from the target SDK plug-in and loading the target SDK plug-in comprises:
    从所述目标SDK插件中分离所述目标文件,并判断所述目标文件是否完整;Separate the target file from the target SDK plug-in, and determine whether the target file is complete;
    若所述目标文件完整,加载所述目标SDK插件。If the target file is complete, load the target SDK plug-in.
  10. 根据权利要求8或9所述的方法,其特征在于,所述目标文件至少包括配置文件和so文件。The method according to claim 8 or 9, wherein the target file includes at least a configuration file and an so file.
  11. 根据权利要求1-10任一项所述的方法,所述响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件之后,还包括:The method according to any one of claims 1-10, after the loading the target SDK plug-in from the local of the mobile terminal in response to the second start instruction, further comprising:
    当所述移动终端下载到与所述快应用对应的待加载SDK插件时,判断所述应用程序是否在加载所述目标SDK插件后被杀掉;When the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application, determining whether the application is killed after loading the target SDK plug-in;
    若所述移动终端在加载所述目标SDK插件后没有被杀掉,保存所述待加载SDK插件,并保留所述目标SDK插件继续作为所述快应用的当前SDK插件。If the mobile terminal is not killed after loading the target SDK plug-in, save the SDK plug-in to be loaded, and keep the target SDK plug-in as the current SDK plug-in of the fast application.
  12. 根据根据权利要求1-10任一项所述的方法,所述响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件之后,还包括:The method according to any one of claims 1-10, after the loading the target SDK plug-in from the local of the mobile terminal in response to the second start instruction, further comprising:
    当所述移动终端下载到与所述快应用对应的待加载SDK插件时,判断所述目标SDK插件是否被删除;When the mobile terminal downloads the SDK plug-in to be loaded corresponding to the quick application, determining whether the target SDK plug-in is deleted;
    若所述目标SDK插件没有被删除,保存所述待加载SDK插件,并保留所述目标SDK插件继续作为所述快应用的当前SDK插件。If the target SDK plugin is not deleted, save the SDK plugin to be loaded, and keep the target SDK plugin as the current SDK plugin of the quick application.
  13. 根据权利要求1-12任一项所述的方法,其特征在于,所述应用程序中添加有多个快应用,所述下载与所述快应用对应的目标SDK插件并保存,包括:The method according to any one of claims 1-12, wherein a plurality of quick applications are added to the application program, and the downloading and saving the target SDK plug-in corresponding to the quick application comprises:
    分别下载与所述多个快应用中的每个快应用对应的目标SDK插件;Separately downloading the target SDK plug-in corresponding to each of the multiple quick applications;
    将所述每个快应用对应的目标SDK插件保存在不同的存储区域。The target SDK plug-in corresponding to each quick application is stored in a different storage area.
  14. 根据权利要求13所述的方法,其特征在于,所述移动终端接收针对所述应用程序的第一启动指令之后,还包括:The method according to claim 13, wherein after the mobile terminal receives the first start instruction for the application, the method further comprises:
    响应所述第一启动指令,启动所述应用程序并显示所述应用程序的首页;In response to the first start instruction, start the application and display the homepage of the application;
    获取所述首页显示的设备信息,并获取所述设备信息对应的目标快应用;Acquiring the device information displayed on the homepage, and acquiring the target quick application corresponding to the device information;
    优先下载所述多个快应用中的目标快应用对应的目标SDK插件并保存。The target SDK plug-in corresponding to the target quick application among the multiple quick applications is downloaded first and saved.
  15. 根据权利要求14所述的方法,其特征在于,所述当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件,包括:The method according to claim 14, wherein when a second startup instruction for the quick application is received, the target SDK plug-in is loaded from a local of the mobile terminal in response to the second startup instruction ,include:
    当接收到针对所述目标快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标快应用对应的目标SDK插件,并继续下载所述多个快应用中除所述目标快应用之外的其他快应用对应的目标SDK插件。When receiving the second start instruction for the target fast application, load the target SDK plug-in corresponding to the target fast application from the local of the mobile terminal in response to the second start instruction, and continue to download the multiple fast apps. Target SDK plug-ins corresponding to other fast applications in the application except the target fast application.
  16. 根据权利要求1-15任一项所述的方法,其特征在于,所述当响应到所述第一启动指令并满足指定下载条件时,下载与所述快应用对应的目标SDK插件并保存,包括:The method according to any one of claims 1-15, wherein the downloading and saving the target SDK plug-in corresponding to the quick application when the first start instruction is responded to and a specified download condition is met, include:
    响应所述第一启动指令,获取所述快应用的当前SDK插件并识别所述当前SDK插件的当前版本;In response to the first start instruction, obtain the current SDK plug-in of the quick application and identify the current version of the current SDK plug-in;
    判断所述当前版本是否为最新版本;Determine whether the current version is the latest version;
    若所述当前版本不是最新版本,下载与所述快应用对应的最新版本的SDK插件并保存。If the current version is not the latest version, download the latest version of the SDK plug-in corresponding to the quick application and save it.
  17. 根据权利要求1-16任一项所述的方法,其特征在于,所述响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件,包括:The method according to any one of claims 1-16, wherein the loading the target SDK plug-in from a local of the mobile terminal in response to the second start instruction comprises:
    响应所述第二启动指令,检测所述移动终端是否配置有与所述快应用对应的原始SDK插件;In response to the second start instruction, detect whether the mobile terminal is configured with an original SDK plug-in corresponding to the quick application;
    若所述移动终端配置有与所述快应用对应的原始SDK插件,强制将所述原始SDK插件更新为所述目标SDK插件;或If the mobile terminal is configured with an original SDK plug-in corresponding to the quick application, forcibly update the original SDK plug-in to the target SDK plug-in; or
    若所述移动终端配置有与所述快应用对应的原始SDK插件,输出提示信息,其中,所述提示信息用户提示用户选择是否将所述原始SDK插件更新为所述目标SDK插件。If the mobile terminal is configured with the original SDK plug-in corresponding to the quick application, a prompt message is output, wherein the prompt message user prompts the user to choose whether to update the original SDK plug-in to the target SDK plug-in.
  18. 一种SDK插件的加载装置,其特征在于,应用于移动终端,所述移动终端安装有应用程序,所述应用程序中添加有快应用,所述装置包括:An SDK plug-in loading device, characterized in that it is applied to a mobile terminal, the mobile terminal is installed with an application program, and a quick application is added to the application program, and the device includes:
    指令接收模块,用于所述移动终端接收针对所述应用程序的第一启动指令;An instruction receiving module, used for the mobile terminal to receive a first start instruction for the application;
    SDK插件下载模块,用于当响应到所述第一启动指令并满足指定下载条件时,下载与所述快应用对应的目标软件开发工具包SDK插件并保存;The SDK plug-in download module is configured to download and save the target software development kit SDK plug-in corresponding to the fast application when the specified download condition is met in response to the first start instruction;
    SDK插件加载模块,用于当接收到针对所述快应用的第二启动指令时,响应所述第二启动指令从所述移动终端的本地加载所述目标SDK插件。The SDK plug-in loading module is configured to load the target SDK plug-in locally in the mobile terminal in response to the second startup instruction when a second startup instruction for the quick application is received.
  19. 一种移动终端,其特征在于,包括存储器和处理器,所述存储器耦接到所述处理器,所述存储器存储指令,当所述指令由所述处理器执行时所述处理器执行如权利要求1-17任一项所述的方法。A mobile terminal, comprising a memory and a processor, the memory is coupled to the processor, the memory stores instructions, and the processor executes the instructions when the instructions are executed by the processor. The method of any one of 1-17 is required.
  20. 一种计算机可读取存储介质,其特征在于,所述计算机可读取存储介质中存储有程序代码,所述程序代码可被处理器调用执行如权利要求1-17任一项所述的方法。A computer-readable storage medium, wherein the computer-readable storage medium stores program code, and the program code can be invoked by a processor to execute the method according to any one of claims 1-17 .
PCT/CN2019/087298 2019-05-16 2019-05-16 Sdk plug-in loading method and apparatus, and mobile terminal and storage medium WO2020228033A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980091635.8A CN113412468A (en) 2019-05-16 2019-05-16 SDK plug-in loading method and device, mobile terminal and storage medium
PCT/CN2019/087298 WO2020228033A1 (en) 2019-05-16 2019-05-16 Sdk plug-in loading method and apparatus, and mobile terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/087298 WO2020228033A1 (en) 2019-05-16 2019-05-16 Sdk plug-in loading method and apparatus, and mobile terminal and storage medium

Publications (1)

Publication Number Publication Date
WO2020228033A1 true WO2020228033A1 (en) 2020-11-19

Family

ID=73289126

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/087298 WO2020228033A1 (en) 2019-05-16 2019-05-16 Sdk plug-in loading method and apparatus, and mobile terminal and storage medium

Country Status (2)

Country Link
CN (1) CN113412468A (en)
WO (1) WO2020228033A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590179A (en) * 2021-08-02 2021-11-02 上海米哈游璃月科技有限公司 Plug-in detection method and device, electronic equipment and storage medium
CN114363990A (en) * 2021-12-28 2022-04-15 上海黑眸智能科技有限责任公司 Equipment end network distribution method and system compatible with multiple APPs, equipment end and APP end

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103560902A (en) * 2013-10-10 2014-02-05 中兴通讯股份有限公司 Server, intelligent terminal and remote management method of intelligent terminal
CN103677877A (en) * 2012-09-12 2014-03-26 腾讯科技(深圳)有限公司 Method and device for updating local advertisement software development kit
CN108563460A (en) * 2018-03-14 2018-09-21 广东能龙教育股份有限公司 Plug-in-based android application new function release method
CN108958074A (en) * 2018-06-20 2018-12-07 维沃移动通信有限公司 A kind of smart machine control method and mobile terminal

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050097133A1 (en) * 2003-10-31 2005-05-05 Quoc Pham Producing software distribution kit (SDK) volumes
US9489819B2 (en) * 2014-10-21 2016-11-08 Anytransactions, Inc. Personal monitor and tracking system
CN107122200A (en) * 2016-02-25 2017-09-01 博雅网络游戏开发(深圳)有限公司 Load plug-in unit SDK method, system and client
US10216509B2 (en) * 2016-03-18 2019-02-26 TUPL, Inc. Continuous and automatic application development and deployment
CN106843978B (en) * 2017-01-23 2020-04-03 北京乐盟互动科技有限公司 SDK access method and system
CN108366127B (en) * 2018-03-07 2021-05-04 北京奇艺世纪科技有限公司 Method and device for acquiring software package
CN109271239A (en) * 2018-08-10 2019-01-25 北京达佳互联信息技术有限公司 Method, apparatus, system, equipment and the medium of data processing
CN109324970A (en) * 2018-09-28 2019-02-12 平安普惠企业管理有限公司 SDK running environment detection method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103677877A (en) * 2012-09-12 2014-03-26 腾讯科技(深圳)有限公司 Method and device for updating local advertisement software development kit
CN103560902A (en) * 2013-10-10 2014-02-05 中兴通讯股份有限公司 Server, intelligent terminal and remote management method of intelligent terminal
CN108563460A (en) * 2018-03-14 2018-09-21 广东能龙教育股份有限公司 Plug-in-based android application new function release method
CN108958074A (en) * 2018-06-20 2018-12-07 维沃移动通信有限公司 A kind of smart machine control method and mobile terminal

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113590179A (en) * 2021-08-02 2021-11-02 上海米哈游璃月科技有限公司 Plug-in detection method and device, electronic equipment and storage medium
CN113590179B (en) * 2021-08-02 2024-03-12 上海米哈游璃月科技有限公司 Plug-in detection method and device, electronic equipment and storage medium
CN114363990A (en) * 2021-12-28 2022-04-15 上海黑眸智能科技有限责任公司 Equipment end network distribution method and system compatible with multiple APPs, equipment end and APP end
CN114363990B (en) * 2021-12-28 2024-01-12 上海黑眸智能科技有限责任公司 Equipment end network distribution method and system compatible with multiple APP, equipment end and APP end

Also Published As

Publication number Publication date
CN113412468A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
WO2020223854A1 (en) Device network configuration method and apparatus, electronic device and storage medium
CN110401583B (en) Method, device, system, mobile terminal and storage medium for replacing equipment
CN108092861B (en) Configuration method for realizing equipment linkage, equipment linkage control method and device
US20200267221A1 (en) Method, system, and device for controlling an internet of things device
RU2617330C2 (en) Method and for scenario mode recommendation device for smart devices
WO2019157894A1 (en) Application page display method and apparatus, storage medium and electronic device
US11782590B2 (en) Scene-operation method, electronic device, and non-transitory computer readable medium
CN107948231B (en) Scene-based service providing method, system and operating system
US20160191267A1 (en) Information Processing Method and Central Control Device
CN113348725B (en) Device operation method, device, gateway, electronic device and computer readable medium
WO2019157860A1 (en) Method and device for launching application interface, storage medium, and electronic apparatus
WO2020168571A1 (en) Device control method, apparatus, system, electronic device and cloud server
CN113330724A (en) Intelligent home scheduling method, device, system, server and storage medium
WO2020168568A1 (en) Data processing method and apparatus, electronic device and readable storage medium
WO2021204098A1 (en) Voice interaction method and electronic device
CN109617963B (en) Equipment control method and device and Internet of things system
WO2022127661A1 (en) Application sharing method, and electronic device and storage medium
WO2020206691A1 (en) Application processing method and apparatus, storage medium, and electronic device
CN112335204A (en) Local control and/or registration of smart devices by an assistant client device
WO2020228040A1 (en) Smart home system control method and apparatus, electronic device and storage medium
CN108289111B (en) Service providing method, device, terminal equipment and operating system
WO2020228013A1 (en) Account association method, device, system, server, and storage medium
CN112751699A (en) OTA upgrade and upgrade management method, device, network and storage medium
WO2020228033A1 (en) Sdk plug-in loading method and apparatus, and mobile terminal and storage medium
CN106027631B (en) Data transmission method and device

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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 260422)

122 Ep: pct application non-entry in european phase

Ref document number: 19928773

Country of ref document: EP

Kind code of ref document: A1