CN108205452B - Software execution control method and device - Google Patents

Software execution control method and device Download PDF

Info

Publication number
CN108205452B
CN108205452B CN201611166524.3A CN201611166524A CN108205452B CN 108205452 B CN108205452 B CN 108205452B CN 201611166524 A CN201611166524 A CN 201611166524A CN 108205452 B CN108205452 B CN 108205452B
Authority
CN
China
Prior art keywords
provider
global variable
software
value
condition
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201611166524.3A
Other languages
Chinese (zh)
Other versions
CN108205452A (en
Inventor
纪传舜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201611166524.3A priority Critical patent/CN108205452B/en
Publication of CN108205452A publication Critical patent/CN108205452A/en
Application granted granted Critical
Publication of CN108205452B publication Critical patent/CN108205452B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The disclosure relates to a software execution control method and device. The method comprises the following steps: determining, by an intermediate layer of the software, a value of a provider global variable corresponding to the software; loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null; and under the condition that the bottom layer service corresponding to the first provider is loaded successfully, giving the value of the global variable corresponding to the first provider to the provider global variable, wherein the first provider is any one provider in the provider list. The method and the device can support multiple providers and realize dynamic compatibility of the bottom layer services provided by the multiple providers.

Description

Software execution control method and device
Technical Field
The present disclosure relates to the field of software technologies, and in particular, to a method and an apparatus for controlling software execution.
Background
In the native android system, the software architecture is mainly divided into three layers: an application layer, a middle layer and a bottom layer. Taking the fingerprint software architecture as an example, the application layer may be an unlocking program or various payment tools, etc. The application layer does not need to care about the specific implementation details of the fingerprint, and only needs to call the input interface and the identification interface provided by the middle layer. The main function of the middle layer is to abstract the underlying implementation details. Taking the fingerprint software architecture as an example, the middle layer is used for providing the standard functions of the fingerprint to the application layer. The bottom layer is directly communicated with the fingerprint sensor and is a place for realizing various functions of the fingerprint. Since each supplier has its implementation scheme due to different technologies used by each supplier, the underlying services are different from one another, and different suppliers have different modules.
In the related art, only one provider can be configured in a software architecture of one piece of software, in other words, only one piece of software can support the underlying service provided by one provider. In actual engineering projects, cell phone manufacturers often need to introduce two, three or more suppliers. The software architecture in the related art cannot meet the support of multiple suppliers, and cannot realize dynamic compatibility of the bottom layer services provided by multiple suppliers.
Disclosure of Invention
In order to overcome the problems in the related art, the present disclosure provides a method and an apparatus for controlling execution of software.
According to a first aspect of the embodiments of the present disclosure, there is provided a software execution control method including:
determining, by an intermediate layer of the software, a value of a provider global variable corresponding to the software;
loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null;
and under the condition that the bottom layer service corresponding to the first provider is loaded successfully, giving the value of the global variable corresponding to the first provider to the provider global variable, wherein the first provider is any one provider in the provider list.
For the above method, in a possible implementation manner, after determining, by the middle layer of the software, a value of a provider global variable corresponding to the software, the method further includes:
and loading the bottom layer service corresponding to the value of the provider global variable under the condition that the value of the provider global variable is not null.
For the above method, in a possible implementation manner, after loading the underlying service corresponding to the value of the provider global variable, the method further includes:
loading the bottom layer service corresponding to each provider in the provider list under the condition that the bottom layer service corresponding to the value of the provider global variable fails to be loaded;
and under the condition that the bottom layer service corresponding to a second provider is loaded successfully, giving the value of the global variable corresponding to the second provider to the provider global variable, wherein the second provider is any one provider in the provider list.
For the above method, in one possible implementation, the method further includes:
and adding the newly added provider into the provider list under the condition that the provider for providing the bottom layer service needs to be newly added to the software.
For the above method, in a possible implementation manner, determining, by the middle layer of the software, a value of a provider global variable corresponding to the software includes:
and when the software is initialized, determining the value of the provider global variable corresponding to the software through a middle layer of the software.
For the above method, in one possible implementation, the underlying service includes at least one of:
fingerprint identification services, touch sensing services, and camera services.
According to a second aspect of the embodiments of the present disclosure, there is provided an execution control apparatus of software, including:
the global variable determining module is used for determining the value of the provider global variable corresponding to the software through the middle layer of the software;
the first bottom layer service loading module is used for loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null;
the first global variable assignment module is configured to assign a value of a global variable corresponding to a first provider to the provider global variable when a bottom layer service corresponding to the first provider is successfully loaded, where the first provider is any one provider in the provider list.
For the above apparatus, in one possible implementation manner, the apparatus further includes:
and the second bottom layer service loading module is used for loading the bottom layer service corresponding to the value of the provider global variable under the condition that the value of the provider global variable is not empty.
For the above apparatus, in one possible implementation manner, the apparatus further includes:
a third bottom service loading module, configured to load a bottom service corresponding to each provider in the provider list when the bottom service corresponding to the value of the provider global variable fails to be loaded;
and the second global variable assignment module is configured to assign a value of a global variable corresponding to a second provider to the provider global variable under the condition that the bottom-layer service corresponding to the second provider is loaded successfully, where the second provider is any one provider in the provider list.
For the above apparatus, in one possible implementation manner, the apparatus further includes:
and the provider adding module is used for adding the newly added provider into the provider list under the condition that the provider for providing the bottom layer service is required to be newly added to the software.
For the apparatus described above, in one possible implementation, the global variable determining module is configured to:
and when the software is initialized, determining the value of the provider global variable corresponding to the software through a middle layer of the software.
For the above apparatus, in one possible implementation, the underlying service includes at least one of:
fingerprint identification services, touch sensing services, and camera services.
According to a third aspect of the embodiments of the present disclosure, there is provided an execution control apparatus of software, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
determining, by an intermediate layer of the software, a value of a provider global variable corresponding to the software;
loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null;
and under the condition that the bottom layer service corresponding to the first provider is loaded successfully, giving the value of the global variable corresponding to the first provider to the provider global variable, wherein the first provider is any one provider in the provider list.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the method comprises the steps that the value of a provider global variable corresponding to the software is determined through a middle layer of the software, the bottom layer service corresponding to each provider in a provider list maintained by the middle layer is loaded under the condition that the value of the provider global variable is empty, and the value of the global variable corresponding to a first provider is given to the provider global variable under the condition that the bottom layer service corresponding to the first provider is loaded successfully, so that a plurality of providers can be supported, and dynamic compatibility of the bottom layer services provided by the providers is achieved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating an execution control method of software according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating a software architecture in an execution control method of software according to an exemplary embodiment.
Fig. 3 is a flowchart illustrating an execution control method of software according to an example of an exemplary embodiment.
Fig. 4 is a block diagram illustrating an execution control apparatus of software according to an exemplary embodiment.
Fig. 5 is a block diagram of an execution control apparatus of a software according to an example of an exemplary embodiment.
Fig. 6 is a block diagram illustrating an apparatus 800 for execution control of software according to an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating an execution control method of software according to an exemplary embodiment. The method can be applied to terminals such as mobile phones or tablet computers. As shown in fig. 1, the method includes the following steps.
In step S11, the value of the provider global variable corresponding to the software is determined by the middle layer of the software.
In this embodiment, the value of the provider Global variable (e.g., Global _ variable) may be read by the middle layer of software. Wherein a provider may refer to a provider of an underlying service. Taking the underlying service as the fingerprint identification service as an example, the provider may be a provider of the fingerprint identification service. The value of the provider global variable may correspond to the provider that provides the underlying service.
As an example of the present embodiment, when the provider Global variable is initially set, the value of the provider Global variable is set to NULL (e.g., Global _ variable ═ NULL).
In one possible implementation manner, determining, by the middle layer of the software, a value of a provider global variable corresponding to the software includes: when the software is initialized, the middle layer of the software determines the value of the provider global variable corresponding to the software. In this implementation, the value of the provider global variable corresponding to the software may be determined by a middle layer of the software at the time of initialization of the software, for example, at the time of startup of the software.
In another possible implementation manner, the value of the provider global variable corresponding to the software may be determined by a middle layer of the software in a case where the bottom layer service corresponding to the provider global variable needs to be called. Taking fingerprint software (such as unlocking software, payment software, and the like) as an example, the value of the provider global variable corresponding to the fingerprint software can be determined through the middle layer of the fingerprint software when the fingerprint identification service needs to be invoked.
In step S12, if the value of the provider global variable is null, the underlying service corresponding to each provider in the provider list maintained by the middle tier is loaded.
In this embodiment, a provider list is maintained at a middle tier of software, which may include information for multiple providers.
By loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null, the dynamic detection of the provider of the bottom layer service can be realized.
Fig. 2 is a schematic diagram illustrating a software architecture in an execution control method of software according to an exemplary embodiment. As an example of this embodiment, the software architecture of the software includes an application layer, a middle layer, and a bottom layer. The middle layer maintains a provider list, which may record values of global variables corresponding to the providers, for example, the values of the global variables corresponding to the providers include A, B, C, D. In this example, in a case where the value of the provider Global variable is NULL (for example, Global _ variable ═ NULL), the underlying services corresponding to the respective providers in the provider list maintained by the middle layer may be sequentially loaded until the underlying service corresponding to a certain provider is successfully loaded. For example, the values of the global variables corresponding to the providers recorded in the provider list include A, B, C, D, etc., and the loading may be started from the bottom layer service corresponding to a in the order from a to D until the loading of the bottom layer service corresponding to a certain provider is successful.
In one possible implementation, the underlying services include at least one of: fingerprint identification services, touch sensing services, and camera services. The fingerprint identification service can be an underlying service related to fingerprint identification provided by a provider; the touch sensing service can be a bottom layer service related to touch screen sensing provided by a provider; the camera service may be an underlying service provided by a provider that is related to the camera application. It should be noted that the underlying services may also include underlying services related to various sensors of the terminal, and are not limited herein.
In step S13, when the underlying service corresponding to the first provider is successfully loaded, the provider global variable is assigned with a value of the global variable corresponding to the first provider, where the first provider is any one provider in the provider list.
For example, in a case that the loading of the underlying service corresponding to the first provider is successful, for example, the value of the Global variable corresponding to the first provider is B, the provider Global variable is assigned to B (for example, Global _ variable is set to B).
By giving the value of the global variable corresponding to the first provider to the provider global variable when the loading of the underlying service corresponding to the first provider is successful, the underlying service (for example, the underlying service corresponding to B) corresponding to the value of the provider global variable can be directly loaded after the software is restarted or the terminal is restarted without repeatedly performing dynamic detection on the provider, so that the starting speed of the software and/or the reaction speed of the underlying service can be increased.
The embodiment can support a plurality of providers and realize dynamic compatibility of the bottom layer services provided by the plurality of providers.
In one possible implementation, after determining, by the middle layer of the software, a value of a provider global variable corresponding to the software, the method further includes: and loading the bottom layer service corresponding to the value of the global variable of the provider under the condition that the value of the global variable of the provider is not null. In the implementation mode, under the condition that the value of the global variable of the provider is not null, the bottom layer service corresponding to the value of the global variable of the provider is directly loaded without repeatedly carrying out dynamic detection on the provider providing the bottom layer service, so that the starting speed of software and/or the reaction speed of the bottom layer service can be improved.
Fig. 3 is a flowchart illustrating an execution control method of software according to an example of an exemplary embodiment. As shown in fig. 3, the method includes:
in step S31, the value of the provider global variable corresponding to the software is determined by the middle layer of the software.
Step S31 is entered into the above description of step S11.
In step S32, if the value of the provider global variable is null, the underlying service corresponding to each provider in the provider list maintained by the middle tier is loaded.
Step S32 is entered into the above description of step S12.
In step S33, when the underlying service corresponding to the first provider is successfully loaded, the provider global variable is assigned with a value of the global variable corresponding to the first provider, where the first provider is any one provider in the provider list.
Step S33 is entered into the above description of step S13.
In step S34, if the value of the provider global variable is not empty, the underlying service corresponding to the value of the provider global variable is loaded.
For example, in the case that the value of the provider global variable is B, the underlying service corresponding to B is loaded.
In step S35, if the underlying service corresponding to the value of the provider global variable fails to be loaded, the underlying service corresponding to each provider in the provider list is loaded.
In this example, when the loading of the underlying service corresponding to the value of the provider global variable fails, the underlying service corresponding to each provider in the provider list is loaded, so that the provider can be dynamically detected again. For example, after-sale service can automatically identify and reload the underlying service corresponding to A if the original B fingerprint sensor is replaced by the A fingerprint sensor.
In step S36, when the underlying service corresponding to the second provider is successfully loaded, the value of the global variable corresponding to the second provider is assigned to the provider global variable, where the second provider is any one provider in the provider list.
Under the condition that the bottom layer service corresponding to the second provider is loaded successfully, the value of the global variable corresponding to the second provider is given to the provider global variable, so that the bottom layer service corresponding to the value of the provider global variable can be directly loaded without repeated dynamic detection after the software is restarted or the terminal is restarted, and the starting speed of the software and/or the reaction speed of the bottom layer service can be increased.
In one possible implementation, the method further includes: and adding the newly added provider into the provider list under the condition that the provider providing the bottom layer service needs to be newly added for the software. In the implementation manner, when a provider providing the underlying service needs to be added to the software, only one item needs to be added to the provider list to implement dynamic support.
Fig. 4 is a block diagram illustrating an execution control apparatus of software according to an exemplary embodiment. Referring to fig. 4, the apparatus includes a global variable determination module 41, a first underlying service loading module 42, and a first global variable assignment module 43. The global variable determination module 41 is configured to determine, by the middle layer of the software, a value of a provider global variable corresponding to the software. The first underlying service loading module 42 is configured to load the underlying service corresponding to each provider in the provider list maintained by the middle layer, when the value of the provider global variable is null. The first global variable assigning module 43 is configured to assign a value of a global variable corresponding to a first provider to the provider global variable when the underlying service corresponding to the first provider is loaded successfully, where the first provider is any one provider in the provider list.
Fig. 5 is a block diagram of an execution control apparatus of a software according to an example of an exemplary embodiment. Referring to fig. 5:
in one possible implementation, the apparatus further includes a second underlying service loading module 44. The second underlying service loading module 44 is configured to load the underlying service corresponding to the value of the provider global variable if the value of the provider global variable is not empty.
In a possible implementation manner, the apparatus further includes a third underlying service loading module 45 and a second global variable assigning module 46. The third underlying service loading module 45 is configured to load the underlying service corresponding to each provider in the provider list in the case that the underlying service corresponding to the value of the provider global variable fails to be loaded. The second global variable assignment module 46 is configured to assign a value of a global variable corresponding to a second provider to the provider global variable when the bottom layer service corresponding to the second provider is loaded successfully, where the second provider is any one provider in the provider list.
In one possible implementation, the apparatus further includes a provider add module 47. The provider addition module 47 is configured to add the added provider to the provider list in the event that a new provider providing the underlying service needs to be added to the software.
In one possible implementation, the global variable determination module 41 is configured to determine, through a middle layer of the software, a value of a provider global variable corresponding to the software when the software is initialized.
In one possible implementation, the underlying services include at least one of: fingerprint identification services, touch sensing services, and camera services.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
The embodiment can support a plurality of providers, realize dynamic compatibility of bottom layer services provided by the plurality of providers and realize dynamic detection of the providers. By giving the value of the global variable corresponding to the first provider to the provider global variable under the condition that the loading of the underlying service corresponding to the first provider is successful, the underlying service corresponding to the value of the provider global variable can be directly loaded after the software is restarted or the terminal is restarted without repeatedly performing dynamic detection on the provider, so that the starting speed of the software and/or the reaction speed of the underlying service can be increased. Under the condition that a new provider providing bottom-layer service is required to be added to the software, only one new item needs to be added to a provider list to realize dynamic support.
Fig. 6 is a block diagram illustrating an apparatus 800 for execution control of software according to an example embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 6, the apparatus 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power components 806 provide power to the various components of device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (9)

1. An execution control method of software, comprising:
determining, by an intermediate layer of the software, a value of a provider global variable corresponding to the software;
loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null;
under the condition that the bottom layer service corresponding to a first provider is loaded successfully, giving a value of a global variable corresponding to the first provider to the provider global variable, wherein the first provider is any one provider in the provider list;
wherein after determining, by the middle layer of the software, a value of a provider global variable corresponding to the software, the method further comprises:
loading a bottom layer service corresponding to the value of the provider global variable under the condition that the value of the provider global variable is not empty;
loading the bottom layer service corresponding to each provider in the provider list under the condition that the bottom layer service corresponding to the value of the provider global variable fails to be loaded;
and under the condition that the bottom layer service corresponding to a second provider is loaded successfully, giving the value of the global variable corresponding to the second provider to the provider global variable, wherein the second provider is any one provider in the provider list.
2. The method of controlling execution of software according to claim 1, further comprising:
and adding the newly added provider into the provider list under the condition that the provider for providing the bottom layer service needs to be newly added to the software.
3. The method for controlling execution of software according to claim 1, wherein determining, by the middle layer of software, a value of a provider global variable corresponding to the software comprises:
and when the software is initialized, determining the value of the provider global variable corresponding to the software through a middle layer of the software.
4. The method according to any one of claims 1 to 3, wherein the underlying service includes at least one of:
fingerprint identification services, touch sensing services, and camera services.
5. An execution control device for software, comprising:
the global variable determining module is used for determining the value of the provider global variable corresponding to the software through the middle layer of the software;
the first bottom layer service loading module is used for loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null;
the first global variable assignment module is configured to assign a value of a global variable corresponding to a first provider to the provider global variable when a bottom-layer service corresponding to the first provider is successfully loaded, where the first provider is any one provider in the provider list;
the second bottom-layer service loading module is used for loading the bottom-layer service corresponding to the value of the provider global variable under the condition that the value of the provider global variable is not empty;
a third bottom service loading module, configured to load a bottom service corresponding to each provider in the provider list when the bottom service corresponding to the value of the provider global variable fails to be loaded;
and the second global variable assignment module is configured to assign a value of a global variable corresponding to a second provider to the provider global variable under the condition that the bottom-layer service corresponding to the second provider is loaded successfully, where the second provider is any one provider in the provider list.
6. The apparatus for controlling execution of software according to claim 5, further comprising:
and the provider adding module is used for adding the newly added provider into the provider list under the condition that the provider for providing the bottom layer service is required to be newly added to the software.
7. The software execution control apparatus of claim 5, wherein the global variable determination module is configured to:
and when the software is initialized, determining the value of the provider global variable corresponding to the software through a middle layer of the software.
8. The apparatus according to any one of claims 5 to 7, wherein the underlying service includes at least one of:
fingerprint identification services, touch sensing services, and camera services.
9. An execution control device for software, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
determining, by an intermediate layer of the software, a value of a provider global variable corresponding to the software;
loading the bottom layer service corresponding to each provider in the provider list maintained by the middle layer under the condition that the value of the provider global variable is null;
under the condition that the bottom layer service corresponding to a first provider is loaded successfully, giving a value of a global variable corresponding to the first provider to the provider global variable, wherein the first provider is any one provider in the provider list;
wherein, after determining, by the middle layer of the software, a value of a provider global variable corresponding to the software,
loading a bottom layer service corresponding to the value of the provider global variable under the condition that the value of the provider global variable is not empty;
loading the bottom layer service corresponding to each provider in the provider list under the condition that the bottom layer service corresponding to the value of the provider global variable fails to be loaded;
and under the condition that the bottom layer service corresponding to a second provider is loaded successfully, giving the value of the global variable corresponding to the second provider to the provider global variable, wherein the second provider is any one provider in the provider list.
CN201611166524.3A 2016-12-16 2016-12-16 Software execution control method and device Active CN108205452B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611166524.3A CN108205452B (en) 2016-12-16 2016-12-16 Software execution control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611166524.3A CN108205452B (en) 2016-12-16 2016-12-16 Software execution control method and device

Publications (2)

Publication Number Publication Date
CN108205452A CN108205452A (en) 2018-06-26
CN108205452B true CN108205452B (en) 2021-05-18

Family

ID=62602064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611166524.3A Active CN108205452B (en) 2016-12-16 2016-12-16 Software execution control method and device

Country Status (1)

Country Link
CN (1) CN108205452B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584452B1 (en) * 2004-09-29 2009-09-01 The Math Works, Inc. System and method for controlling the visibility and use of data in a programming environment
CN101819526B (en) * 2009-09-18 2013-08-28 华为技术有限公司 Method and device for calling bottom software and embedded system
CN102520918A (en) * 2011-09-27 2012-06-27 深圳市五巨科技有限公司 Method and device for increasing list refreshing frequency
CN103150162B (en) * 2013-02-22 2016-02-10 烽火通信科技股份有限公司 Improve the method for embedded software code degree of share

Also Published As

Publication number Publication date
CN108205452A (en) 2018-06-26

Similar Documents

Publication Publication Date Title
EP3418885B1 (en) Method and device for calling software development kit
US9667774B2 (en) Methods and devices for sending virtual information card
CN107370772B (en) account login method and device and computer readable storage medium
US10229165B2 (en) Method and device for presenting tasks
CN111427449A (en) Interface display method, device and storage medium
CN108446226B (en) Application exception processing method
CN106447747B (en) Image processing method and device
CN109522286B (en) Processing method and device of file system
CN107885464B (en) Data storage method, device and computer readable storage medium
CN107885571B (en) Display page control method and device
CN107357643B (en) Application calling method and device and computer readable storage medium
CN113778687B (en) Memory allocation information processing method and device, electronic equipment and storage medium
US10558973B2 (en) Method and apparatus for card activation
CN108205452B (en) Software execution control method and device
CN112631695A (en) Data verification method and device, electronic equipment and storage medium
CN106709285B (en) Display method and device of application lock interface
CN106791200B (en) Information display method and device
CN116126320B (en) Data processing method and device, electronic equipment and storage medium
CN107463414B (en) Application installation method and device
CN107885553B (en) Animation loading method and device and electronic equipment
CN112887590B (en) Image processing method, device and storage medium
CN114745495B (en) Image generation method, device and storage medium
CN107291394B (en) Storage space reservation method and device
CN114416218B (en) Data processing method and device, electronic equipment and storage medium
CN112783636B (en) Resource allocation method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant