CN104391742B - Optimizing application method and apparatus - Google Patents

Optimizing application method and apparatus Download PDF

Info

Publication number
CN104391742B
CN104391742B CN201410642565.XA CN201410642565A CN104391742B CN 104391742 B CN104391742 B CN 104391742B CN 201410642565 A CN201410642565 A CN 201410642565A CN 104391742 B CN104391742 B CN 104391742B
Authority
CN
China
Prior art keywords
application
optimized
optimization
thread
cores
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
CN201410642565.XA
Other languages
Chinese (zh)
Other versions
CN104391742A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201410642565.XA priority Critical patent/CN104391742B/en
Publication of CN104391742A publication Critical patent/CN104391742A/en
Application granted granted Critical
Publication of CN104391742B publication Critical patent/CN104391742B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The disclosure is directed to a kind of optimizing application method and apparatus.The described method includes: creating N number of optimization thread, N is the natural number more than or equal to 1;It is optimized according to the application message of different applications to be optimized for the corresponding Optimization Progress of each optimization thread creation in N number of optimization thread with application to be optimized corresponding to the application message in the Optimization Progress.By the technical solution of the disclosure, application to be optimized can be optimized parallel, promote the efficiency of optimizing application, and then promote user experience.

Description

Optimizing application method and apparatus
Technical field
This disclosure relates to field of terminal technology more particularly to a kind of optimizing application method and apparatus.
Background technique
With the development of information technology, more and more people are communicated using intelligent terminal, surfed the Internet, entertained.In intelligence In energy terminal, its good system performance of Android (Android) system addresses and expansion become intelligent terminal platform Leader.Android system can upgrade a part of system module in upgrading, thus need first after the completion of system upgrade When secondary booting, to those in the process of running need call upgraded system module application (Application) into Row optimization, so that the application can be used normally.
In the related technology, complete android system upgrading after, need one by one to installed in system it is each apply into Row optimization, efficiency are lower.
Summary of the invention
To overcome the problems in correlation technique, the disclosure provides a kind of optimizing application method and apparatus, to solve phase In the technology of pass after android system upgrading the problem of optimizing application low efficiency.
According to the first aspect of the embodiments of the present disclosure, a kind of optimizing application method is provided, comprising:
N number of optimization thread is created, N is the natural number more than or equal to 1;
According to the application message of different applications to be optimized, for each optimization thread creation in N number of optimization thread Corresponding Optimization Progress is optimized with application to be optimized corresponding to the application message in the Optimization Progress.
Optionally, the N number of optimization thread of creation includes:
Detect the number of cores of CPU;
Judge whether the number of cores is less than or equal to the quantity of the application to be optimized;
If the number of cores is less than or equal to the quantity of the application to be optimized, create identical as the number of cores The optimization thread of quantity.
Optionally, the optimization thread of creation quantity identical as the number of cores includes:
An optimization thread is respectively created corresponding to each kernel.
Optionally, if the number of cores is greater than the quantity of the application to be optimized, creation to be optimized is answered with described The optimization thread of the identical quantity of quantity.
Optionally, the corresponding Optimization Progress of each optimization thread creation in N number of optimization thread includes:
It is described by Java locally call or socket, C layer for it is described it is N number of optimize thread in each optimization thread Create corresponding Optimization Progress.
Optionally, further includes:
Obtain the application information list of application to be optimized.
According to the second aspect of an embodiment of the present disclosure, a kind of optimizing application device is provided, comprising:
Thread creation unit, for creating N number of optimization thread, N is the natural number more than or equal to 1;
Process creation unit is in N number of optimization thread for the application message according to different applications to be optimized The corresponding Optimization Progress of each optimization thread creation to be optimized is answered with corresponding to the application message in the Optimization Progress With optimizing.
Optionally, the thread creation unit includes:
Kernel detection sub-unit, for detecting the number of cores of CPU;
Kernel judgment sub-unit, for judging whether the number of cores is less than or equal to the quantity of the application to be optimized;
First creation subelement, when for being less than or equal to the quantity of the application to be optimized in the number of cores, creation The optimization thread of quantity identical as the number of cores.
Optionally, the first creation subelement includes:
An optimization thread is respectively created for corresponding to each kernel in creation module.
Optionally, the thread creation unit further include:
Second creation subelement, when for being greater than the quantity of the application to be optimized in the number of cores, creation and institute State the optimization thread of the identical quantity of quantity of application to be optimized.
Optionally, the process creation unit includes:
Process creation subelement, for being N number of optimization thread at C layers by the local Java calling or socket In the corresponding Optimization Progress of each optimization thread creation.
Optionally, further includes:
List acquiring unit, for obtaining the application information list of application to be optimized.
According to the third aspect of an embodiment of the present disclosure, a kind of optimizing application device is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
N number of optimization thread is created, N is the natural number more than or equal to 1;
According to the application message of different applications to be optimized, for each optimization thread creation in N number of optimization thread Corresponding Optimization Progress is optimized with application to be optimized corresponding to the application message in the Optimization Progress.
The technical scheme provided by this disclosed embodiment can include the following benefits:
When first time of the disclosure intelligent terminal after android system upgrading is switched on, N number of optimization thread, and root are created It is the corresponding Optimization Progress of each process creation in N number of optimization thread according to the application message of different applications to be optimized, So that the Optimization Progress of creation can parallel optimize application to be optimized, the efficiency of optimizing application, Jin Erti are promoted Rise user experience.
The disclosure can correspond respectively to intelligence when the number of cores of intelligent terminal is less than or equal to the quantity of application to be optimized Each kernel of energy terminal creates an optimization thread, so that each optimization thread uses the resource of different kernels, so as to The treatment effeciency of the optimization thread is improved, and then improves the efficiency of optimizing application.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of flow chart of optimizing application method shown according to an exemplary embodiment.
Fig. 2 is the flow chart of another optimizing application method shown according to an exemplary embodiment.
Fig. 3 is the flow chart of the N number of optimization thread of creation shown according to an exemplary embodiment.
Fig. 4 is a kind of block diagram of optimizing application device shown according to an exemplary embodiment.
Fig. 5 is the block diagram of another optimizing application device shown according to an exemplary embodiment.
Fig. 6 is the block diagram of another optimizing application device shown according to an exemplary embodiment.
Fig. 7 is the block diagram of another optimizing application device shown according to an exemplary embodiment.
Fig. 8 is the block diagram of another optimizing application device shown according to an exemplary embodiment.
Fig. 9 is the block diagram of another optimizing application device shown according to an exemplary embodiment.
Figure 10 is an a kind of structural schematic diagram for optimizing application device shown according to an exemplary embodiment.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
Fig. 1 is a kind of flow chart of optimizing application method shown according to an exemplary embodiment.
As shown in Figure 1, the optimizing application method is in terminal, comprising the following steps:
In step s101, N number of optimization thread is created, N is the natural number more than or equal to 1.
When intelligent terminal is switched on for the first time after android system upgrading, it will usually by system The application information list of PackageManagerService service acquisition application to be optimized.Getting the application message column After table, can the relationship between the number of cores of basis and CPU and the quantity of application to be optimized create N number of optimization thread, such as: It can correspond to each kernel when the number of cores is less than or equal to the quantity of the application to be optimized and create an optimization line Journey can be created in the quantity phase of the application to be optimized when the number of cores is greater than the quantity of the application to be optimized With the optimization thread of quantity.
It in step s 102, is each of described N number of optimization thread according to the application message of different applications to be optimized Optimize the corresponding Optimization Progress of thread creation, in the Optimization Progress it is corresponding to the application message it is to be optimized apply into Row optimization.
It in the present embodiment, can be that each optimization thread is obtained from the application information list of the application to be optimized got The application message of an application to be optimized is taken, is then each optimization thread in C layers of creation one according to the application message got A corresponding Optimization Progress, and application to be optimized corresponding to the application message optimizes in the Optimization Progress.
When being switched on for the first time after android system upgrading by the present embodiment intelligent terminal it can be seen from above description, wound N number of optimization thread is built, and according to the application message of different applications to be optimized, for each process in N number of optimization thread Corresponding Optimization Progress is created, so that the Optimization Progress of creation can parallel optimize application to be optimized, promotion is answered With the efficiency of optimization, and then promote user experience.
Fig. 2 is the flow chart of another optimizing application method shown according to an exemplary embodiment.
As shown in Fig. 2, the optimizing application method is in terminal, comprising the following steps:
In step s 201, the information list of application to be optimized is obtained.
When intelligent terminal is switched on for the first time after android system upgrading, it will usually by system The application information list of PackageManagerService service acquisition application to be optimized.Wherein, described PackageManagerService service is a kind of service of Java layers of android system offer, is mainly responsible for intelligent terminal On application be managed, the application of management includes the included application of system, such as: telephone directory, short message etc. also include The application that user voluntarily loads, such as: microblogging client, wechat client etc..
In the present embodiment, for the various applications in android system, after system upgrade, using having upgraded System module application be application to be optimized, need to optimize the application to be optimized, so that it can be operated normally, The application of system module without the use of having upgraded is not usually required to optimize.In this step, The application message that PackageManagerService services the application to be optimized after upgrading android system summarizes to be formed Application information list.
In step S202, N number of optimization thread is created.
In the present embodiment, referring to FIG. 3, the N number of optimization thread of creation may comprise steps of:
In step S301, the number of cores of CPU is detected.
In this step, the number of cores that intelligent terminal CPU can be detected by Java layers of system service, can also lead to Cross and call on intelligent terminal the Java layer test and evaluation software loaded to detect the number of cores of CPU, the disclosure to this with no restriction.
In step s 302, judge whether the number of cores is less than or equal to the quantity of the application to be optimized, if institute The quantity that number of cores is less than or equal to the application to be optimized is stated, S303 is thened follow the steps.If the number of cores is greater than institute The quantity for stating application to be optimized, thens follow the steps S304.
Based on above mentioned step S3 01, after detecting the number of cores of CPU, judge whether the number of cores is less than or equal to The quantity of the application to be optimized.With the development of information technology, the intelligent terminal that people use at present be mostly double-core CPU, Four core CPU, even eight core CPU.In this step, if the number of cores detected is less than or equal to abovementioned steps S201 In in the information list that gets application to be optimized quantity, then follow the steps S303.
If the number of cores is greater than application to be optimized in the information list got in abovementioned steps S201 Quantity thens follow the steps S304.
In step S303, the optimization thread of quantity identical as the number of cores is created.
Based on the judging result of above mentioned step S3 02, it is less than or equal in the number of cores of intelligent terminal CPU described to be optimized When the quantity of application, in this step in the optimization thread of Java layers of creation quantity identical as the number of cores.For example, Assuming that the number of cores of intelligent terminal CPU is 4, the quantity of the application to be optimized is 8, then judges the kernel through step S302 The quantity that quantity is less than the application to be optimized then in this step creates 4 optimization threads.
In this step, it can correspond to each kernel and an optimization thread be respectively created, so that each optimization thread makes With the resource of different kernels, so as to improve the treatment effeciency of the optimization thread, and then the efficiency of optimizing application is improved.When So, in practical applications, the optimization thread can also be created according to the service condition of current each kernel, such as: according to each The principle of the service condition load balancing of a kernel creates the optimization thread, the disclosure to this with no restriction.
In step s 304, the optimization thread of quantity identical as the quantity of the application to be optimized is created.
Based on the judging result of above mentioned step S3 02, it is greater than the application to be optimized in the number of cores of intelligent terminal CPU Quantity when, in the optimization thread of Java layers of identical as the quantity of the application to be optimized quantity of creation.As an example it is assumed that intelligence The number of cores of energy terminal CPU is 4, and the quantity of the application to be optimized is 3, then in this step, can create 3 optimization lines Journey.
In this step, 3 in the kernel of intelligent terminal 4 can be corresponded to, an optimization thread is respectively created, such as: root According to the service condition of each kernel, 3 relatively small number of kernels of load pressure are selected, and this corresponding 3 kernels are respectively created one A optimization thread.
It is each of described N number of optimization thread according to the application message of different applications to be optimized in step S203 The corresponding Optimization Progress of thread creation is carried out excellent with application to be optimized corresponding to the application message in the Optimization Progress Change.
In the present embodiment, application letter is obtained from the application information list of the application to be optimized got in step S201 Breath, then according to the application message that gets, create for each Java layer of optimization thread at C layers it is corresponding optimize into Journey.The creation of the Optimization Progress can refer to the creation process of aforementioned optimization thread, such as: correspond to each kernel creation one A Optimization Progress, the disclosure to this with no restriction.
As an example it is assumed that have in the application information list of the application to be optimized got in step S201 100 to excellent The application message of change application, application 1 respectively to be optimized to the application message 1 of application 100 to be optimized to application message 100, again Assuming that respectively optimization thread 1 is to optimization thread 4, then in this step in 4 optimization threads of Java layers of creation in step S202 In, it is first to optimize thread 1 to optimization thread 4 in the corresponding Optimization Progress 1 of C layers of creation according to application message 1 to application message 4 To Optimization Progress 4, such as: dexopt process, the dexopt process are mainly used for optimizing application program, and citing comes It says, when may be implemented to be switched on after each system upgrade by the optimization of dexopt process, odex operation is executed, to be promoted The starting speed respectively applied.Wherein, the Optimization Progress 1 optimizes application 1 to be optimized according to the application message 1, institute It states Optimization Progress 2 and application 2 to be optimized is optimized according to the application message 2, and so on.In this step, optimize into Journey 1 parallel optimizes application 1 to be optimized to application 4 to be optimized to Optimization Progress 4, substantially increases the processing of optimizing application Efficiency.
In the above process, the Optimization Progress end or suspend mode after the optimization for completing application to be optimized can be set, The disclosure to this with no restriction.After optimization of the Optimization Progress 1 in completion one application 1 to be optimized, it can believe from the application The application message of an application to be optimized is obtained in breath list again, for example, application message 5, if the Optimization Progress 1 has been tied Beam then creates an Optimization Progress again for the optimization thread 1, such as: Optimization Progress 5, with corresponding in the Optimization Progress 5 It is optimized with the corresponding application 5 to be optimized of information 5, if the Optimization Progress 1 does not terminate, but is in suspend mode shape State can then wake up the Optimization Progress 1, in the Optimization Progress 1 it is corresponding to application message 5 it is to be optimized application 5 into Row optimization, until completing the optimization of all applications to be optimized.
It should be noted that since the optimization thread of creation is at Java layers, and being treated excellent in android system Change the Optimization Progress of application process optimization at C layers.In the present embodiment, the local Java calling or Socket can be passed through Socket carries out Jave layers and C layers of communication, in the C layers of creation Optimization Progress.
It can be seen from above description in the present embodiment, first time of the intelligent terminal after android system upgrading opens When machine, N number of optimization thread is created, and is every in N number of optimization thread according to the application message of different applications to be optimized The corresponding Optimization Progress of a process creation, so that the Optimization Progress of creation can parallel optimize application to be optimized, The efficiency of optimizing application is promoted, and then promotes user experience.
Corresponding with aforementioned applications optimization method embodiment, the disclosure additionally provides the embodiment of optimizing application device.
Fig. 4 is a kind of Advance data quality device block diagram shown according to an exemplary embodiment, and described device can be used for end In end.
As shown in figure 4, the Advance data quality device 400 includes: thread creation unit 401 and process creation unit 402.
Wherein, which is configured as: creating N number of optimization thread, N is the natural number more than or equal to 1.
The process creation unit 402 is configured as: being described N number of excellent according to the application message of different applications to be optimized Change the corresponding Optimization Progress of each optimization thread creation in thread, with corresponding to the application message in the Optimization Progress Application to be optimized optimize.
In above-described embodiment, when first time of the intelligent terminal after android system upgrading is switched on, N number of optimization line is created Journey, and according to the application message of different applications to be optimized, it is corresponding excellent for each process creation in N number of optimization thread Change process promotes the efficiency of optimizing application so that the Optimization Progress of creation can parallel optimize application to be optimized, And then promote user experience.
Fig. 5 is another Advance data quality device block diagram shown according to an exemplary embodiment, and described device can be used for In terminal, for the embodiment on the basis of aforementioned embodiment shown in Fig. 4, the thread creation unit 401 includes: kernel detection Subelement 4011, kernel judgment sub-unit 4012 and the first creation subelement 4013.
Wherein.The kernel detection sub-unit 4011 is configured as: detecting the number of cores of CPU.
The kernel judgment sub-unit 4012 is configured as: judging whether the number of cores is less than or equal to described to be optimized answer Quantity.
The first creation subelement 4013 is configured as: being less than or equal to the number of the application to be optimized in the number of cores When amount, the optimization thread of quantity identical as the number of cores is created.
Fig. 6 is another Advance data quality device block diagram shown according to an exemplary embodiment, and described device can be used for In terminal, on the basis of aforementioned embodiment shown in fig. 5, the first creation subelement 4013 may include: the embodiment Creation module 4013A.
Creation module 4013A is configured as: an optimization thread is respectively created corresponding to each kernel.
In above-described embodiment, when the number of cores of intelligent terminal is less than or equal to the quantity of application to be optimized, it can distinguish Each kernel corresponding to intelligent terminal creates an optimization thread, so that each optimization thread uses the resource of different kernels, So as to improve the treatment effeciency of the optimization thread, and then improve the efficiency of optimizing application.
Fig. 7 is another Advance data quality device block diagram shown according to an exemplary embodiment, and described device can be used for In terminal, for the embodiment on the basis of aforementioned embodiment shown in fig. 5, the thread creation unit 401 can also include: Two creation subelements 4014.
The second creation subelement 4014 is configured as: being greater than the quantity of the application to be optimized in the number of cores When, create the optimization thread of quantity identical as the quantity of the application to be optimized.
Fig. 8 is another Advance data quality device block diagram shown according to an exemplary embodiment, and described device can be used for In terminal, for the embodiment on the basis of aforementioned embodiment shown in Fig. 4, the process creation unit 402 may include: process Create subelement 4021.
The process creation subelement is configured as: being described N number of excellent at C layers by the local Java calling or socket Change the corresponding Optimization Progress of each optimization thread creation in thread.
It, can also be with it should be noted that process creation subelement 4021 described in above-mentioned Installation practice shown in Fig. 8 Included in the Installation practice of earlier figures 5 to Fig. 7, the disclosure to this with no restriction.
Fig. 9 is another Advance data quality device block diagram shown according to an exemplary embodiment, and described device can be used for In terminal, for the embodiment on the basis of aforementioned embodiment shown in Fig. 4, the Advance data quality device 400 can also include: column Table acquiring unit 403.
The list acquiring unit 403 is configured as: obtaining the application information list of application to be optimized.
It should be noted that list acquiring unit 403 described in above-mentioned Installation practice shown in Fig. 9, also can wrap Earlier figures 5 are contained in into the Installation practice of Fig. 8, the disclosure to this with no restriction.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual The purpose for needing to select some or all of the modules therein to realize disclosure scheme.Those of ordinary skill in the art are not paying Out in the case where creative work, it can understand and implement.
Correspondingly, the disclosure also provides a kind of optimizing application device, described device includes: processor;It is handled for storage The memory of device executable instruction;Wherein, the processor is configured to: create N number of optimization thread, N be more than or equal to 1 from So number;It is corresponding for each optimization thread creation in N number of optimization thread according to the application message of different applications to be optimized Optimization Progress, optimized with application to be optimized corresponding to the application message in the Optimization Progress.
Correspondingly, the disclosure also provides a kind of non-transitorycomputer readable storage medium, when in the storage medium It when instruction is executed by the processor of terminal, enables the terminal to execute a kind of optimizing application method, which comprises creation N A optimization thread, N are the natural number more than or equal to 1;It is N number of optimization according to the application message of different applications to be optimized The corresponding Optimization Progress of each optimization thread creation in thread, with corresponding to the application message in the Optimization Progress Application to be optimized optimizes.
Figure 10 is a kind of block diagram for optimizing application device 1000 shown according to an exemplary embodiment.For example, dress Setting 1000 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, doctor Treat equipment, body-building equipment, personal digital assistant etc..
Referring to Fig.1 0, device 1000 may include following one or more components: processing component 1002, memory 1004, Power supply module 1006, multimedia component 1008, audio component 1010, the interface 1012 of input/output (I/O), sensor module 1014 and communication component 1016.
The integrated operation of the usual control device 1000 of processing component 1002, such as with display, telephone call, data communication, Camera operation and record operate associated operation.Processing element 1002 may include one or more processors 1020 to execute Instruction, to perform all or part of the steps of the methods described above.In addition, processing component 1002 may include one or more moulds Block, convenient for the interaction between processing component 1002 and other assemblies.For example, processing component 1002 may include multi-media module, To facilitate the interaction between multimedia component 1008 and processing component 1002.
Memory 1004 is configured as storing various types of data to support the operation in equipment 1000.These data Example includes the instruction of any application or method for operating on device 1000, contact data, telephone book data, Message, picture, video etc..Memory 1004 can by any kind of volatibility or non-volatile memory device or they Combination is realized, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), it is erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory Reservoir, disk or CD.
Electric power assembly 1006 provides electric power for the various assemblies of device 1000.Electric power assembly 1006 may include power management System, one or more power supplys and other with for device 1000 generate, manage, and distribute the associated component of electric power.
Multimedia component 1008 includes the screen of one output interface of offer between described device 1000 and user.? In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, Screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes that one or more touch passes Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding is dynamic The boundary of work, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more Media component 1108 includes a front camera and/or rear camera.When equipment 1100 is in operation mode, as shot mould When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 1010 is configured as output and/or input audio signal.For example, audio component 1010 includes a wheat Gram wind (MIC), when device 1000 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone quilt It is configured to receive external audio signal.The received audio signal can be further stored in memory 1004 or via communication Component 1016 is sent.In some embodiments, audio component 1010 further includes a loudspeaker, is used for output audio signal.
I/O interface 1012 provides interface, above-mentioned peripheral interface module between processing component 1002 and peripheral interface module It can be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and Locking press button.
Sensor module 1014 includes one or more sensors, and the state for providing various aspects for device 1000 is commented Estimate.For example, sensor module 1014 can detecte the state that opens/closes of equipment 1000, the relative positioning of component, such as institute The display and keypad that component is device 1000 are stated, sensor module 1014 can be with detection device 1000 or device 1,000 1 The position change of a component, the existence or non-existence that user contacts with device 1000,1000 orientation of device or acceleration/deceleration and dress Set 1000 temperature change.Sensor module 1014 may include proximity sensor, be configured in not any physics It is detected the presence of nearby objects when contact.Sensor module 1014 can also include optical sensor, as CMOS or ccd image are sensed Device, for being used in imaging applications.In some embodiments, which can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 1016 is configured to facilitate the communication of wired or wireless way between device 1000 and other equipment.Dress The wireless network based on communication standard, such as WiFi can be accessed by setting 1000,2G or 3G or their combination.It is exemplary at one In embodiment, communication component 1016 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel Information.In one exemplary embodiment, the communication component 1016 further includes near-field communication (NFC) module, to promote short distance Communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 1000 can be by one or more application specific integrated circuit
(ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, are used for Execute the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided It such as include the memory 1004 of instruction, above-metioned instruction can be executed by the processor 1020 of device 1000 to complete the above method.Example Such as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, soft Disk and optical data storage devices etc..
Those skilled in the art will readily occur to its of the disclosure after considering specification and practicing disclosure disclosed herein Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (9)

1. a kind of optimizing application method, which is characterized in that applied in the intelligent terminal for being equipped with android system, comprising:
When being switched on for the first time after android system upgrading, pass through android system Java layers of the Package The application information list of Manager Service service acquisition application to be optimized;
According to the relationship between the number of cores of the intelligent terminal CPU and the quantity of the application to be optimized, N number of optimization is created Thread, N are the natural number more than or equal to 1;
According to the application message of application information list record, different application to be optimized, locally called by Java or Person's socket is the corresponding Optimization Progress of each optimization thread creation in N number of optimization thread at C layers, described excellent Application to be optimized corresponding to the application message optimizes in change process.
2. optimizing application method according to claim 1, which is characterized in that
The relationship according between the number of cores of the intelligent terminal CPU and the quantity of the application to be optimized creates N number of Optimizing thread includes:
Detect the number of cores of CPU;
Judge whether the number of cores is less than or equal to the quantity of the application to be optimized;
If the number of cores is less than or equal to the quantity of the application to be optimized, quantity identical as the number of cores is created Optimization thread.
3. optimizing application method according to claim 2, which is characterized in that
The optimization thread of identical as the number of cores quantity of the creation includes:
An optimization thread is respectively created corresponding to each kernel.
4. optimizing application method according to claim 2, which is characterized in that
If the number of cores is greater than the quantity of the application to be optimized, create identical as the quantity of the application to be optimized The optimization thread of quantity.
5. a kind of optimizing application device, which is characterized in that be set in the intelligent terminal for being equipped with android system, comprising:
List acquiring unit passes through the android system when for being switched on for the first time after android system upgrading The application information list of Java layers of Package Manager Service service acquisition application to be optimized;
Thread creation unit, for according between the number of cores of the intelligent terminal CPU and the quantity of the application to be optimized Relationship, create N number of optimization thread, N is the natural number more than or equal to 1;
Process creation unit leads to for the application message of application to be optimized recorded according to the application information list, different Java locally calling or socket are crossed, is the corresponding optimization of each optimization thread creation in N number of optimization thread at C layers Process is optimized with application to be optimized corresponding to the application message in the Optimization Progress.
6. optimization device according to claim 5, which is characterized in that the thread creation unit includes:
Kernel detection sub-unit, for detecting the number of cores of CPU;
Kernel judgment sub-unit, for judging whether the number of cores is less than or equal to the quantity of the application to be optimized;
First creation subelement, when for being less than or equal to the quantity of the application to be optimized in the number of cores, creation and institute State the optimization thread of the identical quantity of number of cores.
7. optimization device according to claim 6, which is characterized in that described first, which creates subelement, includes:
An optimization thread is respectively created for corresponding to each kernel in creation module.
8. optimization device according to claim 6, which is characterized in that the thread creation unit further include:
Second creation subelement, for the number of cores be greater than the application to be optimized quantity when, creation with it is described to Optimize the optimization thread of the identical quantity of quantity of application.
9. a kind of optimizing application device, which is characterized in that be set in the intelligent terminal for being equipped with android system, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
When being switched on for the first time after android system upgrading, pass through android system Java layers of the Package The application information list of Manager Service service acquisition application to be optimized;
According to the relationship between the number of cores of the intelligent terminal CPU and the quantity of the application to be optimized, N number of optimization is created Thread, N are the natural number more than or equal to 1;
According to the application message of application information list record, different application to be optimized, locally called by Java or Person's socket is the corresponding Optimization Progress of each optimization thread creation in N number of optimization thread at C layers, described excellent Application to be optimized corresponding to the application message optimizes in change process.
CN201410642565.XA 2014-11-11 2014-11-11 Optimizing application method and apparatus Active CN104391742B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410642565.XA CN104391742B (en) 2014-11-11 2014-11-11 Optimizing application method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410642565.XA CN104391742B (en) 2014-11-11 2014-11-11 Optimizing application method and apparatus

Publications (2)

Publication Number Publication Date
CN104391742A CN104391742A (en) 2015-03-04
CN104391742B true CN104391742B (en) 2019-03-01

Family

ID=52609650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410642565.XA Active CN104391742B (en) 2014-11-11 2014-11-11 Optimizing application method and apparatus

Country Status (1)

Country Link
CN (1) CN104391742B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110069243B (en) * 2018-10-31 2023-03-03 上海奥陶网络科技有限公司 Java program thread optimization method
CN110109759B (en) * 2019-05-07 2021-11-26 Oppo广东移动通信有限公司 Catton optimization method, server, electronic device and computer-readable storage medium
CN112035172B (en) * 2020-09-03 2022-05-17 腾讯科技(深圳)有限公司 Operating system starting method, device, server and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955401A (en) * 2014-04-29 2014-07-30 南京新模式软件集成有限公司 Method for optimizing on-line preview of electronic document

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1235139C (en) * 2003-09-05 2006-01-04 浙江大学 Parallel compiling apparatus based on J2EE construction unit
CN101996103B (en) * 2009-08-20 2013-03-20 三星电子(中国)研发中心 Parallel application optimizing method for multinuclear cloud computing platform
US8752036B2 (en) * 2011-10-31 2014-06-10 Oracle International Corporation Throughput-aware software pipelining for highly multi-threaded systems
CN103049245B (en) * 2012-10-25 2015-12-02 浪潮电子信息产业股份有限公司 A kind of software performance optimization method based on central processor CPU multi-core platform
CN102981839B (en) * 2012-11-06 2015-08-12 无锡江南计算技术研究所 Merge the Data expansion optimization method performing large-scale parallel thread
CN103713944B (en) * 2013-12-13 2019-08-20 上海华为技术有限公司 A kind of processing method of Kernel-level thread, device and system
CN103744643B (en) * 2014-01-10 2016-09-21 浪潮(北京)电子信息产业有限公司 The method and device of multi-node parallel framework under a kind of multithread programs

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103955401A (en) * 2014-04-29 2014-07-30 南京新模式软件集成有限公司 Method for optimizing on-line preview of electronic document

Also Published As

Publication number Publication date
CN104391742A (en) 2015-03-04

Similar Documents

Publication Publication Date Title
CN104951335B (en) The processing method and processing device of application program installation kit
CN104484200B (en) The method and device upgraded to firmware
CN105955766B (en) Using preloading method and device
EP2945058B1 (en) Processing method and device for application program
CN107370772A (en) Account login method, device and computer-readable recording medium
CN104281478B (en) The method and device of more new application
CN105930213B (en) Using operation method and device
CN105824633A (en) Multi-language resource switching method and device of application program
CN105652671A (en) Intelligent equipment operating mode setting method and device
US20060282658A1 (en) Boot systems and methods and related devices
KR101712762B1 (en) Method and device for loading theme application
CN110515688A (en) Page display method, device, terminal and storage medium
CN111742543A (en) Electronic device and recording method thereof
CN104391742B (en) Optimizing application method and apparatus
CN104063424B (en) Web page picture shows method and demonstration device
CN108848492A (en) Enabling method, apparatus, terminal and the storage medium of subscriber identification card
CN106020893B (en) Using the method and device of installation
CN105183571A (en) Function calling method and device
CN104951184A (en) Application program downloading method and device
CN104052801B (en) A kind of information processing method and electronic equipment
CN109446796A (en) Application control method and device, mobile terminal and storage medium
CN106502740B (en) Using installation method and device
CN105930266B (en) Webpage adjustment method and device
CN104765646A (en) Assembly transferring method and device
CN104537111B (en) The loading method and device of Web page picture

Legal Events

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