CN108182088B - Startup acceleration method and device, storage medium and mobile terminal - Google Patents

Startup acceleration method and device, storage medium and mobile terminal Download PDF

Info

Publication number
CN108182088B
CN108182088B CN201711174140.0A CN201711174140A CN108182088B CN 108182088 B CN108182088 B CN 108182088B CN 201711174140 A CN201711174140 A CN 201711174140A CN 108182088 B CN108182088 B CN 108182088B
Authority
CN
China
Prior art keywords
mobile terminal
ovp chip
bit information
ovp
chip
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
CN201711174140.0A
Other languages
Chinese (zh)
Other versions
CN108182088A (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.)
Oneplus Technology Shenzhen Co Ltd
Original Assignee
Oneplus Technology Shenzhen 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 Oneplus Technology Shenzhen Co Ltd filed Critical Oneplus Technology Shenzhen Co Ltd
Priority to CN201711174140.0A priority Critical patent/CN108182088B/en
Publication of CN108182088A publication Critical patent/CN108182088A/en
Application granted granted Critical
Publication of CN108182088B publication Critical patent/CN108182088B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The invention relates to a startup acceleration method, a startup acceleration device, a storage medium and a mobile terminal. The method comprises the steps of obtaining a mobile terminal starting instruction, inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, and recording different OVP chip driving programs and zone bit information corresponding to the driving programs in the mobile terminal in the preset data table. And acquiring a driving program corresponding to the first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal, and initializing the OVP chip through the driving program corresponding to the first value zone bit information. And querying a preset data table according to the mobile terminal starting instruction, thereby quickly acquiring an OVP chip driving program matched with the mobile terminal from a plurality of OVP chip driving programs through the zone bit information.

Description

Startup acceleration method and device, storage medium and mobile terminal
Technical Field
The invention relates to the technical field of internet, in particular to a starting acceleration method, a starting acceleration device, a storage medium and a mobile terminal.
Background
When the mobile terminal is started, one of the items is to initialize the OVP chip through an OVP chip driving program. An OVP (over voltage protection) chip is generally an OVP over voltage protection chip added between an input voltage VIN pin of a USB port or a TYPE C interface of a mobile terminal and an input voltage of a PMIC. OVP chips mainly used by current mobile terminals are generally from different suppliers. The drivers used by OVP chips provided by different vendors are different. The mobile terminal is pre-installed with a plurality of drivers, so that in the conventional method, the OVP chip is initialized by the plurality of drivers in sequence each time the mobile terminal is started, so that the problem that a plurality of drivers are not matched with the current OVP chip can be caused, the unmatched drivers can cause the initialization failure of the OVP chip and occupy certain starting time, and the starting speed is reduced.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a boot acceleration method, device, storage medium and mobile terminal.
A startup acceleration method is suitable for a mobile terminal, and comprises the following steps:
acquiring a starting instruction of the mobile terminal;
inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs in the mobile terminal and zone bit information corresponding to the driving programs are recorded in the preset data table;
acquiring a driving program corresponding to first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal;
and initializing the OVP chip through a driving program corresponding to the first value flag bit information.
In one embodiment, before the obtaining of the mobile terminal power-on instruction, the method includes:
and establishing a preset data table, wherein different OVP chip driving programs and zone bit information corresponding to the driving programs are recorded in the preset data table, and the zone bit information is used for marking the driving programs matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
In one embodiment, after querying a preset data table on the mobile terminal according to the mobile terminal power-on instruction, the method further includes:
when a driving program corresponding to the first value zone bit information is not acquired, sequentially reading driving programs of the OVP chip and recording the reading times, and initializing the OVP chip through the driving programs;
and if the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program into first value zone bit information.
In one embodiment, after initializing the OVP chip through the driver, the method includes:
if the initialization of the OVP chip fails, judging whether the read times are greater than a preset maximum value, wherein the preset maximum value is the number of different OVP chip driving programs pre-installed in the mobile terminal and recorded in the preset data table;
if the read times are less than or equal to the preset maximum value, continuing to sequentially read an OVP chip driver and record the read times, initializing the OVP chip through the driver until the OVP chip is initialized successfully, and updating the zone bit information corresponding to the driver used when the OVP chip is initialized successfully into first value zone bit information;
and if the reading times are larger than the preset maximum value, ending reading the OVP chip driving program and prompting error information.
In one embodiment, the initializing the OVP chip through the driver includes:
and calling a corresponding initialization entry function through the driver so that the initialization entry function initializes the OVP chip by utilizing a bus interface.
In one embodiment, the method further comprises:
and if the OVP chip is successfully initialized, acquiring the information of the OVP chip in the mobile terminal and informing the application layer service of the information of the OVP chip.
A boot-up acceleration apparatus, the apparatus comprising:
the starting instruction acquisition module is used for acquiring a starting instruction of the mobile terminal;
the preset data table query module is used for querying a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs in the mobile terminal and zone bit information corresponding to the driving programs are recorded in the preset data table;
a driver acquiring module, configured to acquire a driver corresponding to first value flag bit information, where the driver corresponding to the first value flag bit information is a driver matched with the OVP chip of the mobile terminal;
and the OVP chip initialization module is used for initializing the OVP chip through a driving program corresponding to the first value flag bit information.
In one embodiment, the apparatus further comprises:
the device comprises a preset data table establishing module, a flag bit information and a flag bit setting module, wherein the preset data table is used for establishing a preset data table, different OVP chip driving programs and the flag bit information corresponding to the driving programs are recorded in the preset data table, and the flag bit information is used for marking the driving programs matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a starting instruction of the mobile terminal;
inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs in the mobile terminal and zone bit information corresponding to the driving programs are recorded in the preset data table;
acquiring a driving program corresponding to first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal;
and initializing the OVP chip through a driving program corresponding to the first value flag bit information.
A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor when executing the computer program implementing the steps of:
acquiring a starting instruction of the mobile terminal;
inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs in the mobile terminal and zone bit information corresponding to the driving programs are recorded in the preset data table;
acquiring a driving program corresponding to first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal;
and initializing the OVP chip through a driving program corresponding to the first value flag bit information.
According to the boot acceleration method, the boot acceleration device, the storage medium and the mobile terminal, the boot instruction of the mobile terminal is firstly obtained, and the flag bit information is set for each different OVP chip driver in the preset data table on the mobile terminal. And acquiring a driving program corresponding to the first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal, and initializing the OVP chip through the driving program corresponding to the first value zone bit information. And querying a preset data table according to the mobile terminal starting instruction, so that the driving program matched with the mobile terminal OVP chip is quickly acquired from a plurality of OVP chip driving programs through the zone bit information. And initializing the OVP chip by the driving program to achieve the effect of accelerating the startup.
Drawings
FIG. 1 is a diagram illustrating an internal structure of a mobile terminal according to an embodiment;
FIG. 2 is a flow diagram of a boot acceleration method in one embodiment;
FIG. 3 is a flowchart of a boot acceleration method according to another embodiment;
FIG. 4 is a flowchart of a processing method when a driver corresponding to the first value flag bit information is not acquired;
FIG. 5 is a flow chart of a method of processing after an OVP chip initialization failure;
FIG. 6 is a flowchart illustrating a boot acceleration method according to another embodiment;
FIG. 7 is a diagram illustrating an exemplary boot acceleration device;
FIG. 8 is a diagram illustrating an exemplary boot acceleration device;
FIG. 9 is a block diagram of a boot acceleration apparatus according to an embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein, but rather should be construed as broadly as the present invention is capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
In one embodiment, as shown in fig. 1, there is also provided a mobile terminal including a processor, a non-volatile storage medium, an internal memory, a network interface, etc., connected through a system bus. The non-volatile storage medium of the mobile terminal stores an operating system and also stores a computer program, and when the computer program is executed by the processor, the processor can execute a boot acceleration method. The processor of the mobile terminal is used for improving the calculation and control capacity and supporting the operation of the whole mobile terminal. The internal memory of the mobile terminal may store a computer program, and when the computer program is executed by a processor, the processor may execute a boot acceleration method. The network interface is used for performing network communication with the mobile terminal, and receiving or transmitting data, for example, transmitting or receiving data when the mobile terminal establishes communication with the base station. Those skilled in the art will appreciate that the architecture shown in fig. 1 is only a block diagram of a portion of the architecture associated with the subject application and does not constitute a limitation on the mobile terminal to which the subject application applies, and that a particular mobile terminal may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, as shown in fig. 2, a boot acceleration method is provided, which is described by taking the application of the method to the mobile terminal in fig. 1 as an example, and includes:
step 202, obtaining a mobile terminal starting instruction.
The mobile terminal obtains a power-on instruction, which is generally started by a user.
And 204, inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs in the mobile terminal and zone bit information corresponding to the driving programs are recorded in the preset data table.
The preset data table is stored in the mobile terminal, and different OVP chip drivers and flag bit information corresponding to the drivers are recorded in the preset data table. The zone bit information is used for marking an OVP chip driver matched with the mobile terminal when the mobile terminal is started for the first time. And when the preset data table is not changed, the flag bit information of the OVP chip driver recorded by the preset data table is second value flag bit information. And when the mobile terminal is started for the first time, updating the zone bit information corresponding to the OVP chip driving program matched with the mobile terminal in a preset data table to be the first value zone bit information. The first value zone bit information is different from the second value zone bit information, so that an OVP chip driver matched with the mobile terminal can be found through the zone bit information when the mobile terminal inquires a preset data table.
After the mobile terminal obtains the starting-up instruction, the preset data table is inquired, and the zone bit information in the preset data table is inquired.
And step 206, acquiring a driver corresponding to the first value zone bit information, wherein the driver corresponding to the first value zone bit information is a driver matched with the OVP chip of the mobile terminal.
When the flag bit information in the preset data table is inquired, and when the first value flag bit information is inquired, the driving program corresponding to the first value flag bit information is obtained. And the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal. . Namely, the driver can be used for initializing the OVP chip of the mobile terminal to realize startup.
And step 208, initializing the OVP chip through a driver corresponding to the first value flag bit information.
After the driver corresponding to the first value zone bit information is obtained, the bus interface is called through the driver to initialize the OVP chip, and starting is achieved.
In the above embodiment, the mobile terminal power-on instruction is obtained first, because flag bit information is set for each OVP chip driver in the preset data table on the mobile terminal. And the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal. And querying a preset data table according to the mobile terminal starting instruction, thereby quickly acquiring a driving program matched with the mobile terminal OVP chip from a plurality of OVP chip driving programs through the zone bit information. And initializing the OVP chip by the driving program to achieve the effect of accelerating the startup. In the conventional method, it is assumed that N types of OVP chip drivers are installed in the mobile terminal, and only one type of OVP chip driver is matched with the OVP chip in the mobile terminal. Because each driver needs to be tested in turn each time the OVP chip is turned on, it takes N-1 times for the OVP chip to fail in initialization. These times are wasted and wasted in vain. In this embodiment, the OVP chip driver matched with the mobile terminal is directly obtained according to the flag bit information in the preset relationship table stored after the mobile terminal is turned on. And initializing the OVP chip by the driving program to achieve the effect of accelerating the startup.
In one embodiment, as shown in fig. 3, before obtaining the power-on instruction of the mobile terminal, the method includes:
step 201, establishing a preset data table, where different OVP chip drivers and flag bit information corresponding to the drivers are recorded in the preset data table, and the flag bit information is used to mark the driver matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
The preset data table is stored in the mobile terminal, and different OVP chip drivers and flag bit information corresponding to the drivers are recorded in the preset data table. The zone bit information is used for marking an OVP chip driver matched with the mobile terminal when the mobile terminal is started for the first time. When the preset data table is not changed, the flag bit information of the OVP chip driver recorded in the preset data table is second value flag bit information, and the second value flag bit information is generally assigned with a boolean value false, that is, 0. The preset data table is used for uniformly managing all OVP chip drivers installed on the mobile terminal.
When the mobile terminal is started for the first time, the OVP chip driving program is read in sequence, and the OVP chip is initialized through the driving program. If the OVP chip is initialized successfully, the flag bit information corresponding to the driver used when the OVP chip is initialized successfully is updated to the first value flag bit information, and the first value flag bit information is generally assigned to a boolean value true, that is, 1. And if the initialization of the OVP chip fails, not changing. The first value zone bit information is different from the second value zone bit information, so that when the mobile terminal is started next time, the OVP chip driving program matched with the mobile terminal can be found through the zone bit information only by inquiring a preset data table. And the OVP chip is initialized through the driver without repeatedly and sequentially reading the driver of the OVP chip again. The problem that initialization of the OVP chip fails due to the fact that a plurality of driving programs on the mobile terminal are not matched with the current OVP chip, and further certain starting time is occupied, and therefore starting speed is reduced is solved.
In one embodiment, as shown in fig. 4, after querying a preset data table on the mobile terminal according to the mobile terminal power-on instruction, the method further includes:
and step 402, when the driver corresponding to the first value flag bit information is not obtained, sequentially reading the driver of the OVP chip and recording the number of times of reading, and initializing the OVP chip through the driver.
In step 404, if the OVP chip is initialized successfully, the flag bit information corresponding to the driver is updated to the first value flag bit information.
And after the mobile terminal acquires the starting-up instruction, inquiring the zone bit information in the preset data table. After one query pass, no first value flag information is found. It indicates that the mobile terminal may be powered on for the first time, and then the OVP chip drivers need to be read in sequence, and the OVP chips are initialized through the drivers. And simultaneously recording the times of reading the OVP chip driver program. If the OVP chip is initialized successfully, it is indicated that the OVP chip driver read this time is a driver matched with the OVP chip in the mobile terminal. And updating the zone bit information corresponding to the driving program into first value zone bit information in a preset data table.
In the above embodiment, if the flag bit information of the first value is not found in the preset data table, the drivers of the OVP chips need to be sequentially read, and the OVP chips need to be initialized by the drivers. Therefore, the flag bit information corresponding to each driver in the preset data table is updated according to the result of whether the OVP chip initialization is successful or not. Therefore, when the mobile terminal is started next time, the OVP chip driving program matched with the mobile terminal can be found through the zone bit information only by inquiring the preset data table, the OVP chip driving program does not need to be read repeatedly and sequentially again, the starting time is saved, and the starting is accelerated.
In one embodiment, as shown in fig. 5, after the OVP chip is initialized by the driver, the method includes:
step 502, if the initialization of the OVP chip fails, determining whether the number of times of reading is greater than a preset maximum value, where the preset maximum value is the number of different OVP chip drivers pre-installed in the mobile terminal recorded in a preset data table.
And after the mobile terminal acquires the starting-up instruction, inquiring the zone bit information in the preset data table. After one query pass, no first value flag information is found. And then sequentially reading the OVP chip drivers, and initializing the OVP chip through the drivers. If the initialization of the OVP chip fails at the moment, whether the reading times are larger than a preset maximum value or not is judged. The preset maximum value is the number of different OVP chip drivers pre-installed in the mobile terminal recorded in the preset data table. For example, if OVP chip drivers of 3 different operators are pre-installed in the mobile terminal, the preset maximum value is 3. It is determined whether the number of reads is greater than 3.
And step 504, if the number of times of reading is less than or equal to the preset maximum value, continuing to sequentially read the driver of the OVP chip and record the number of times of reading, initializing the OVP chip by the driver until the OVP chip is initialized successfully, and updating the zone bit information corresponding to the driver used when the OVP chip is initialized successfully into the zone bit information of the first value.
If the determination result is that the number of times of reading is less than or equal to the preset maximum value, for example, the determination result is that the number of times of reading is less than or equal to 3. And then, continuing to sequentially read the OVP chip driver, recording the reading times, and initializing the OVP chip through the driver. And if the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program used when the OVP chip is successfully initialized to a first value. And if the initialization of the OVP chip fails, judging whether the reading times are greater than a preset maximum value. And if the reading times are smaller than the preset maximum value, continuing to sequentially read the driver of the OVP chip and record the reading times, initializing the OVP chip by the driver until the OVP chip is successfully initialized, and updating the zone bit information corresponding to the driver used when the OVP chip is successfully initialized into the first value zone bit information.
In step 506, if the number of reading times is greater than the preset maximum value, the reading of the OVP chip driver is ended and an error message is prompted.
If the judgment result is that the reading times are greater than the preset maximum value, the sequential tests are performed on all OVP chip driving programs stored in the mobile terminal, and the results are all reported as failure. Therefore, after the test of the round is finished, the test is not required to be repeated, and the operation of reading the OVP chip driving program is finished and error information is prompted. The error information may include that none of OVP chip drivers stored on the mobile terminal supports the OVP chip installed on the mobile terminal, or that the OVP chip installed on the mobile terminal is damaged. And the tester can perform subsequent processing on the mobile terminal according to the error information.
In this embodiment, the OVP chip is initialized by cyclically executing the steps of sequentially reading the OVP chip driver and recording the number of times of reading this time. And until the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program used when the OVP chip is successfully initialized to the first value zone bit information, or finishing reading the driving program of the OVP chip and prompting error information when the reading times reach a preset maximum value. Therefore, a matched OVP chip driver is found for the mobile terminal, or the mobile terminal is reported. Therefore, when the computer is started next time, the OVP chip driving program can be directly obtained through the zone bit information recorded in the preset relation table, and the OVP chip is initialized through the OVP chip driving program, so that the startup is accelerated.
In one embodiment, initializing the OVP chip through a driver includes: and calling the corresponding initialization entry function through the driver so that the initialization entry function initializes the OVP chip by using the bus interface.
The preset data table also stores the corresponding relationship between different OVP chip drivers and the initialization entry function interface. After a matching OVP chip driver is found for the mobile terminal, the corresponding initialization entry function OVP _ local _ init () is called by the OVP chip driver. The bus interface is specifically an I2C interface, and the initialization entry function OVP _ local _ init () is responsible for initializing the OVP chip by using the I2C interface, so as to realize startup.
In one embodiment, the method further comprises: and if the OVP chip is successfully initialized, acquiring the information of the OVP chip in the mobile terminal and informing the application layer service of the information of the OVP chip.
The application layer service of the mobile terminal also needs to match corresponding software according to the type of the underlying OVP chip driver. Therefore, after the OVP chip is successfully initialized by the driver of a certain vendor, the mobile terminal acquires information of the corresponding OVP chip vendor, specifically which vendor, the model ID information of the OVP chip, and the like, according to the driver which is successfully initialized. And reporting the acquired information related to the OVP chip to inform an application layer service. So that the application layer service sets the parameter information according to the information related to the OVP chip.
In one embodiment, a boot acceleration method is provided and is illustrated as applied to the flowchart shown in FIG. 6.
First, step 601, a preset data table is established, in which different OVP chip drivers and flag bit information corresponding to the drivers are recorded, and corresponding relationships between the different OVP chip drivers and the initialization entry function are also stored.
Step 602, obtaining a mobile terminal power-on instruction, and querying a preset data table on the mobile terminal. And judging whether the preset data table has first value zone bit information, namely an OVP chip driver with the numerical value of the zone bit being 1.
If yes, entering step 603, preferentially calling a corresponding OVP chip driver, acquiring a corresponding function initialization interface, establishing communication with the OVP chip by using the I2C interface, and performing related initialization setting; such as setting and reading of registers, application and allocation of memory, and creation of node paths.
And acquiring corresponding OVP chip manufacturer information and model ID information, and creating corresponding node path information. The node path information includes OVP chip manufacturer information or model ID information.
And step 604, the application layer service reads the node information, judges the type of the OVP chip, acquires corresponding reported data, and updates the functions of the OVP chip, such as an algorithm and the like, in the application layer service according to the reported data.
After determining whether the first value flag information, that is, the OVP chip driver with the flag value of 1, exists in the preset data table in step 602, if not, step 605 is performed, in which the OVP chip driver is sequentially read and the number of times of reading is recorded, and the OVP chip is initialized by the driver.
If the OVP chip is initialized successfully, step 606 is entered, and the flag bit information corresponding to the driver is updated to the first value flag bit information.
If the initialization of the OVP chip fails, step 607 is entered to determine whether the number of times of reading is greater than a preset maximum value, where the preset maximum value is the number of different OVP chip drivers pre-installed in the mobile terminal recorded in the preset data table.
If the number of reading times is greater than the preset maximum value, step 608 is entered, and reading of the OVP chip driver is ended and an error message is prompted.
If the number of times of reading is less than or equal to the preset maximum value, step 605 is entered, the OVP chip driver is sequentially read and the number of times of reading is recorded, and the OVP chip is initialized by the driver. And repeating the steps until the OVP chip is initialized successfully, and updating the zone bit information corresponding to the driving program used when the OVP chip is initialized successfully into the first value zone bit information.
In one embodiment, as shown in fig. 7, there is provided a boot acceleration apparatus 700, the apparatus comprising: a power-on instruction obtaining module 702, a preset data table query module 704, a driver obtaining module 706, and an OVP chip initialization module 708. Wherein the content of the first and second substances,
a power-on instruction obtaining module 702, configured to obtain a power-on instruction of the mobile terminal.
The preset data table query module 704 is configured to query a preset data table on the mobile terminal according to the mobile terminal power-on instruction, where the preset data table records different OVP chip drivers in the mobile terminal and flag bit information corresponding to the drivers.
A driver obtaining module 706, configured to obtain a driver corresponding to the first value flag information, where the driver corresponding to the first value flag information is a driver matched with an OVP chip of the mobile terminal.
The OVP chip initialization module 708 is configured to initialize the OVP chip through a driver corresponding to the first value flag bit information.
In one embodiment, as shown in fig. 8, there is further provided a boot acceleration apparatus 700, further comprising:
a preset data table establishing module 701, configured to establish a preset data table, where the preset data table records different OVP chip drivers and flag bit information corresponding to the drivers, and the flag bit information is used to mark the driver matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
In an embodiment, a startup acceleration device is further provided, where the startup acceleration device is further configured to, when a driver corresponding to the first value flag bit information is not acquired, sequentially read the driver of the OVP chip and record the number of times of this reading, and initialize the OVP chip through the driver; and if the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program into the first value zone bit information.
In an embodiment, a boot acceleration apparatus is further provided, where the boot acceleration apparatus is further configured to determine whether the number of times of reading is greater than a preset maximum value if the initialization of the OVP chip fails, where the preset maximum value is the number of different OVP chip drivers pre-installed in the mobile terminal and recorded in a preset data table; if the reading times are less than or equal to the preset maximum value, continuing to sequentially read an OVP chip driver and record the reading times, initializing the OVP chip through the driver until the OVP chip is initialized successfully, and updating the zone bit information corresponding to the driver used when the OVP chip is initialized successfully into first value zone bit information; and if the reading times are larger than the preset maximum value, ending reading the OVP chip driving program and prompting error information.
In one embodiment, the OVP chip initialization module 708 is further configured to call a corresponding initialization entry function through the driver, so that the initialization entry function establishes communication between the mobile terminal and the OVP chip by using the bus interface.
In an embodiment, as shown in fig. 9, there is further provided a boot acceleration apparatus 700, where the apparatus further includes a notification module 709, where the notification module 709 is configured to, if the initialization of the OVP chip is successful, obtain information of the OVP chip in the mobile terminal, and notify the application layer service of the information of the OVP chip.
In one embodiment, there is also provided a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of: acquiring a starting instruction of the mobile terminal; inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs and zone bit information corresponding to the driving programs in the mobile terminal are recorded in the preset data table; acquiring a driving program corresponding to the first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with an OVP chip of the mobile terminal; and initializing the OVP chip by a driving program corresponding to the first value flag bit information.
In one embodiment, the program further implements the following steps when executed by the processor: and establishing a preset data table, wherein different OVP chip drivers and zone bit information corresponding to the drivers are recorded in the preset data table, and the zone bit information is used for marking the drivers matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
In one embodiment, the program further implements the following steps when executed by the processor: when the driver corresponding to the first value zone bit information is not acquired, sequentially reading the driver of the OVP chip, recording the reading times, and initializing the OVP chip through the driver; and if the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program into the first value zone bit information.
In one embodiment, the program further implements the following steps when executed by the processor: if the initialization of the OVP chip fails, judging whether the read times are greater than a preset maximum value, wherein the preset maximum value is the number of different OVP chip drivers which are pre-installed in the mobile terminal and recorded in a preset data table; if the reading times are less than or equal to the preset maximum value, continuing to sequentially read an OVP chip driver and record the reading times, initializing the OVP chip through the driver until the OVP chip is initialized successfully, and updating the zone bit information corresponding to the driver used when the OVP chip is initialized successfully into first value zone bit information; and if the reading times are larger than the preset maximum value, ending reading the OVP chip driving program and prompting error information.
In one embodiment, the program further implements the following steps when executed by the processor: and calling the corresponding initialization entry function through the driver so that the initialization entry function establishes communication between the mobile terminal and the OVP chip by using the bus interface.
In one embodiment, the program further implements the following steps when executed by the processor: and if the OVP chip is successfully initialized, acquiring the information of the OVP chip in the mobile terminal and informing the application layer service of the information of the OVP chip.
In one embodiment, there is also provided a mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: acquiring a starting instruction of the mobile terminal; inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs and zone bit information corresponding to the driving programs in the mobile terminal are recorded in the preset data table; acquiring a driving program corresponding to the first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with an OVP chip of the mobile terminal; and initializing the OVP chip by a driving program corresponding to the first value flag bit information.
In one embodiment, the processor further implements the following steps when executing the computer program: and establishing a preset data table, wherein different OVP chip drivers and zone bit information corresponding to the drivers are recorded in the preset data table, and the zone bit information is used for marking the drivers matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
In one embodiment, the processor further implements the following steps when executing the computer program: when the driver corresponding to the first value zone bit information is not acquired, sequentially reading the driver of the OVP chip, recording the reading times, and initializing the OVP chip through the driver; and if the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program into the first value zone bit information.
In one embodiment, the processor further implements the following steps when executing the computer program: if the initialization of the OVP chip fails, judging whether the read times are greater than a preset maximum value, wherein the preset maximum value is the number of different OVP chip drivers which are pre-installed in the mobile terminal and recorded in a preset data table; if the reading times are less than or equal to the preset maximum value, continuing to sequentially read an OVP chip driver and record the reading times, initializing the OVP chip through the driver until the OVP chip is initialized successfully, and updating the zone bit information corresponding to the driver used when the OVP chip is initialized successfully into first value zone bit information; and if the reading times are larger than the preset maximum value, ending reading the OVP chip driving program and prompting error information.
In one embodiment, the processor further implements the following steps when executing the computer program: and calling the corresponding initialization entry function through the driver so that the initialization entry function establishes communication between the mobile terminal and the OVP chip by using the bus interface.
In one embodiment, the processor further implements the following steps when executing the computer program: and if the OVP chip is successfully initialized, acquiring the information of the OVP chip in the mobile terminal and informing the application layer service of the information of the OVP chip.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when executed. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but not to be construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present invention should be subject to the appended claims.

Claims (10)

1. A startup acceleration method is suitable for a mobile terminal, and comprises the following steps:
acquiring a starting instruction of the mobile terminal;
inquiring a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs in the mobile terminal and zone bit information corresponding to the driving programs are recorded in the preset data table;
acquiring a driving program corresponding to first value zone bit information, wherein the driving program corresponding to the first value zone bit information is a driving program matched with the OVP chip of the mobile terminal;
when a driving program corresponding to the first value zone bit information is not acquired, sequentially reading driving programs of the OVP chip and recording the reading times, and initializing the OVP chip through the driving programs;
if the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program into first value zone bit information;
and initializing the OVP chip through a driving program corresponding to the first value flag bit information.
2. The method according to claim 1, wherein before said obtaining the mobile terminal power-on command, comprising:
and establishing a preset data table, wherein different OVP chip driving programs and zone bit information corresponding to the driving programs are recorded in the preset data table, and the zone bit information is used for marking the driving programs matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
3. The method of claim 1, after initializing the OVP chip through the driver, further comprising:
if the initialization of the OVP chip fails, judging whether the read times are greater than a preset maximum value, wherein the preset maximum value is the number of different OVP chip driving programs pre-installed in the mobile terminal and recorded in the preset data table;
if the read times are less than or equal to the preset maximum value, continuing to sequentially read an OVP chip driver and record the read times, initializing the OVP chip through the driver until the OVP chip is initialized successfully, and updating the zone bit information corresponding to the driver used when the OVP chip is initialized successfully into first value zone bit information;
and if the reading times are larger than the preset maximum value, ending reading the OVP chip driving program and prompting error information.
4. The method according to claim 3, wherein the initializing the OVP chip by the driver comprises:
and calling a corresponding initialization entry function through the driver so that the initialization entry function initializes the OVP chip by utilizing a bus interface.
5. The method of claim 1, further comprising:
and if the OVP chip is successfully initialized, acquiring the information of the OVP chip in the mobile terminal and informing the application layer service of the information of the OVP chip.
6. A boot-up acceleration apparatus, comprising:
the starting instruction acquisition module is used for acquiring a starting instruction of the mobile terminal;
the preset data table query module is used for querying a preset data table on the mobile terminal according to the mobile terminal starting instruction, wherein different OVP chip driving programs in the mobile terminal and zone bit information corresponding to the driving programs are recorded in the preset data table;
a driver acquiring module, configured to acquire a driver corresponding to first value flag bit information, where the driver corresponding to the first value flag bit information is a driver matched with the OVP chip of the mobile terminal; when a driving program corresponding to the first value zone bit information is not acquired, sequentially reading driving programs of the OVP chip and recording the reading times, and initializing the OVP chip through the driving programs; if the OVP chip is successfully initialized, updating the zone bit information corresponding to the driving program into first value zone bit information;
and the OVP chip initialization module is used for initializing the OVP chip through a driving program corresponding to the first value flag bit information.
7. The apparatus of claim 6, further comprising:
the device comprises a preset data table establishing module, a flag bit information and a flag bit setting module, wherein the preset data table is used for establishing a preset data table, different OVP chip driving programs and the flag bit information corresponding to the driving programs are recorded in the preset data table, and the flag bit information is used for marking the driving programs matched with the OVP chip of the mobile terminal when the mobile terminal is started for the first time.
8. The apparatus of claim 6, further comprising:
and the notification module is used for acquiring the information of the OVP chip in the mobile terminal and notifying the information of the OVP chip to the application layer service if the OVP chip is successfully initialized.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out a boot-up acceleration method according to any one of claims 1 to 5.
10. A mobile terminal comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the boot acceleration method according to any of claims 1 to 5 when executing the computer program.
CN201711174140.0A 2017-11-22 2017-11-22 Startup acceleration method and device, storage medium and mobile terminal Active CN108182088B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711174140.0A CN108182088B (en) 2017-11-22 2017-11-22 Startup acceleration method and device, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711174140.0A CN108182088B (en) 2017-11-22 2017-11-22 Startup acceleration method and device, storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN108182088A CN108182088A (en) 2018-06-19
CN108182088B true CN108182088B (en) 2021-02-09

Family

ID=62545197

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711174140.0A Active CN108182088B (en) 2017-11-22 2017-11-22 Startup acceleration method and device, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN108182088B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279816A (en) * 2011-06-02 2011-12-14 北京百纳威尔科技有限公司 LCD (liquid crystal display) automatic identification method and device
CN203504153U (en) * 2013-09-12 2014-03-26 国家电网公司 Capacitor harmonic resonance overvoltage protector
CN103942078A (en) * 2014-04-30 2014-07-23 华为技术有限公司 Method for loading driver and embedded device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279816A (en) * 2011-06-02 2011-12-14 北京百纳威尔科技有限公司 LCD (liquid crystal display) automatic identification method and device
CN203504153U (en) * 2013-09-12 2014-03-26 国家电网公司 Capacitor harmonic resonance overvoltage protector
CN103942078A (en) * 2014-04-30 2014-07-23 华为技术有限公司 Method for loading driver and embedded device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
【原创】驱动枚举之EnumServicesStatusEx;cposture;《https://www.cnblogs.com/cposture/p/4720685.html》;博客园;20150811;第1-5页 *

Also Published As

Publication number Publication date
CN108182088A (en) 2018-06-19

Similar Documents

Publication Publication Date Title
CN110297766B (en) Software testing method and software testing system based on distributed test node cluster
CN109947482B (en) Loading method of USB (universal serial bus) equipment, storage medium and smart television
CN110134446B (en) Method for starting PCIE equipment scanning
CN106648685B (en) Intelligent terminal system application processing method and device and intelligent terminal
CN107368343B (en) Terminal starting method based on android system, terminal and storage medium
CN106843947B (en) Method and device for processing code defects
CN113485754A (en) Chip starting method and device and electronic equipment
CN111290773B (en) System upgrade method, device and readable storage medium
CN113849272A (en) Method and device for adding GPU (graphics processing Unit) resources in virtual machine
CN112162794B (en) Single board starting method, device, single board and network equipment
CN108182088B (en) Startup acceleration method and device, storage medium and mobile terminal
US6708229B2 (en) Configuring computer components
CN116886524A (en) Configuration method, device and server for pre-starting execution environment function
CN115495161B (en) BIOS option modification validation method and device and storage medium
CN113992515B (en) System configuration method, device, equipment and storage medium
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system
CN111125771B (en) Method and device for protecting equipment privacy, electronic equipment and storage medium
CN113472611A (en) Method and device for acquiring WiFi signal strength and readable storage medium
CN114579499A (en) Control method, device, equipment and storage medium of processor communication interface
CN104298522B (en) A kind of information processing method and the first electronic equipment
CN109688578A (en) A kind of method and apparatus that SIM card is adapted to mobile terminal device
CN106502863B (en) software version prompting method and device
CN115220978B (en) Chip starting method and device including online debugging mode, chip and equipment
CN115562466B (en) Unmanned aerial vehicle hardware reset control method and device and electronic equipment
CN113408845B (en) Processing method and device of production flow, computer equipment 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