CN107193601A - Data load method and device - Google Patents
Data load method and device Download PDFInfo
- Publication number
- CN107193601A CN107193601A CN201710376463.1A CN201710376463A CN107193601A CN 107193601 A CN107193601 A CN 107193601A CN 201710376463 A CN201710376463 A CN 201710376463A CN 107193601 A CN107193601 A CN 107193601A
- Authority
- CN
- China
- Prior art keywords
- information list
- serviced component
- application
- application information
- application program
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
Abstract
The embodiment of the present invention provides a kind of data load method and device, is related to field of terminal technology, data loading efficiency is improved to a certain extent.Data load method provided in an embodiment of the present invention, including:Radio receiver is set in serviced component, start broadcast is monitored using the radio receiver;When the radio receiver listens to the start broadcast, all application programs in the serviced component inquiry current operation system generate the first application information list;The first application information list is stored in the specified location in the serviced component;The specified request that application program is sent is received, the first application information list is provided to the application program.
Description
Technical field
The present invention relates to field of terminal technology, more particularly to a kind of data load method and device.
Background technology
With the development of technology, terminal has been equipped with carrying the ability of operating system, such as android (Android) behaviour
Make the embedded systems such as system.User can voluntarily install and uninstall the application programs such as software, game by operating system, realize
Web search, video is watched, music is listened, checks news etc..
At present, the Booting sequence of operating system in the terminal can include following several basic steps:System electrification, system
Bootstrap, start kernel, create initialize into program, create system operation needed for software library, create system service process, open
Dynamic application etc..Wherein, operating system is generally real-time loading when loading parsing the application list information, by UI
A thread is increased on the basis of (User Interface, user interface) thread newly to carry out current all application informations
Parsing, waits after being parsed, the application list data is sent into UI threads.
Adopting in such a way, when there is substantial amounts of application program in operating system, waiting all application program solutions
The time that analysis completes to need can be very long, it is generally the case that application program is more, and the time of wait is longer, causes operating system to be held
Easily there are the phenomenons such as interim card, deadlock.
The content of the invention
The embodiment of the present invention provides a kind of data load method and device, improves data loading efficiency.
The embodiment of the present invention provides a kind of data load method, including:
Radio receiver is set in serviced component, start broadcast is monitored using the radio receiver;
When the radio receiver listens to the start broadcast, in the serviced component inquiry current operation system
All application programs, generate the first application information list;
The first application information list is stored in the specified location in the serviced component;
The specified request that application program is sent is received, providing first application information to the application program arranges
Table.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, methods described is also
Including:
When the radio receiver listens to application program update broadcast, the first application information row are updated
Table.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, methods described is also
Including:
When the serviced component terminates operation or be out of service, the serviced component is restarted;
All application programs that the serviced component is inquired about in current operation system again, generate the second application information
List.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the reception should
The specified request sent with program, the first application information list is provided to the application program, including:
When the specified request for receiving the application program transmission, and, the first application information list is not sky
When, provide the first application information list to the application program.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, it is described by described in
First application information list is stored in the specified location in the serviced component, including:
The first application information list is stored in the specified location in the serviced component using global variable.
The embodiment of the present invention also provides a kind of data loading device, including:
Setting unit, for setting radio receiver in serviced component, monitors start wide using the radio receiver
Broadcast;
First generation unit, for when the radio receiver listens to the start broadcast, the serviced component to be looked into
All application programs in current operation system are ask, the first application information list is generated;
Storage unit, for the specified location being stored in the application information list in the serviced component;
Receiving unit, the specified request for receiving application program transmission, providing described first to the application program should
Use program information list.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described device is also
Including:
Updating block, for when the radio receiver listens to application program update broadcast, updating described first should
Use program information list.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, described device is also
Including:
Unit is restarted, for when the serviced component terminates operation or be out of service, restarting the service group
Part;
Second generation unit, all application programs inquired about again in current operation system for the serviced component are raw
Into the second application information list.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the reception list
Member, specifically for:
When the specified request for receiving the application program transmission, and, the first application information list is not sky
When, provide the first application information list to the application program.
Aspect as described above and any possible implementation, it is further provided a kind of implementation, the preservation list
Member, specifically for:
The first application information list is stored in the specified location in the serviced component using global variable.
Data load method and device provided in an embodiment of the present invention, by setting a specified location in serviced component
For storing application information list, obtain the process of application information list to monitor start using radio receiver
Broadcast, after start broadcast is listened to, all application programs in current operation system are read in triggering, and generate application program letter
Breath list is stored in specified location, in technical scheme provided in an embodiment of the present invention, and application information list is in start
During generate, and generate once, when application program needs to read all application programs, it is only necessary to read specific bit
The application information list of memory storage is put, the speed for reading data is accelerated, improves data loading efficiency, solve
In the prior art when there is substantial amounts of application program in operating system, increasing a thread newly and current all application programs are believed
The mode parsed is ceased, the parsing time is longer, causes the problem of phenomenons such as interim card, deadlock easily occurs in operating system.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are this hairs
Some bright embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, can be with root
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the flow chart of data load method embodiment provided in an embodiment of the present invention;
Fig. 2 is another flow chart of data load method embodiment provided in an embodiment of the present invention;
Fig. 3 is another flow chart of data load method embodiment provided in an embodiment of the present invention;
Fig. 4 is the structural representation of data loading device embodiment provided in an embodiment of the present invention;
Fig. 5 is another structural representation of data loading device embodiment provided in an embodiment of the present invention;
Fig. 6 is another structural representation of data loading device embodiment provided in an embodiment of the present invention.
Embodiment
To make the purpose, technical scheme and advantage of the embodiment of the present invention clearer, below in conjunction with the embodiment of the present invention
In accompanying drawing, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
A part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art
The every other embodiment obtained under the premise of creative work is not made, belongs to the scope of protection of the invention.
The term used in embodiments of the present invention is the purpose only merely for description specific embodiment, and is not intended to be limiting
The present invention." one kind ", " described " and "the" of singulative used in the embodiment of the present invention and appended claims
It is also intended to including most forms, unless context clearly shows that other implications.
Fig. 1 is the flow chart of data load method embodiment provided in an embodiment of the present invention, as shown in figure 1, the present embodiment
The data load method of offer, is realized using special serviced component, specifically may include steps of:
The 101st, radio receiver is set in serviced component, start broadcast is monitored using radio receiver.
Serviced component (Service) is one of component of Android operation system, is play in each application program
Very important role, is mainly used in some time-consuming logics in background process, or removes to perform some longtime runnings that need
Task.Therefore, in embodiments of the present invention, radio receiver (BroadcastReceiver) is set in serviced component, is used for
Listening broadcast, broadcast can include start broadcast, application program update broadcast etc..
In embodiments of the present invention, the action for all application programs installed in inquiry current operation system, can opened
Carried out while machine, because terminal is in start process, the regular hour is needed from upper electricity to all application programs are loaded, because
This, inquires about all application programs installed in current operation system during start, and the action can only be done once, because
This can be saved after the completion of start, and each application program is required for inquiring about all applications installed in a current operation system
Time spent by program.
102nd, when radio receiver listens to start broadcast, all applications in serviced component inquiry current operation system
Program, generates the first application information list.
When radio receiver listens to start broadcast, the beginning of query actions can be triggered, serviced component inquiry is current
All application programs in operating system, in embodiments of the present invention, all application programs in inquiry current operation system can
To be interpreted as parsing all application programs in current operation system.All application journeys in current operation system
After sequence is parsed, corresponding first application information list is generated.
The 103rd, first application information list is stored in the specified location in serviced component.
In embodiments of the present invention, the first application information list can be preserved by a global variable, is realized
The special serviced component that the embodiment of the present invention is provided can read and write the global variable, and can only read can not for application program
Rewrite, to ensure that global varible internal memory stores up the accuracy of data.
104th, the specified request that application program is sent is received, the first application information list is provided to application program.
Application program, can be by binding serviced component when reading all application informations in current operation system
(bindService) mode obtains the first application information list, further, reads the first application information list
The information of interior carrying, to complete the reading to all application informations.By the side for binding serviced component (bindService)
Formula is come the specific implementation for obtaining the first application information list:Application program can send to specify to serviced component and ask
Ask, specify and ask to include obtaining request, access request etc., wait serviced component response feedback, fed back when receiving serviced component
The first application information list when, application program read the first application information list in information.
In embodiments of the present invention, application program bind serviced component when, may presence service component read
All application informations in current operation system, not yet generate the first application information list, now first apply journey
Sequence information list is sky, in that case, and serviced component will not provide the first application information list to application program.Should
It can continue to send to serviced component with program and specify request, serviced component continues to the specified request of application program transmission, directly
It is not space-time to the first application information list, the first application information list is provided to application program.
It should be noted that terminal involved in the embodiment of the present invention can include but is not limited to personal computer
(Personal Computer, PC), personal digital assistant (Personal Digital Assistant, PDA), wireless handheld
Equipment, tablet personal computer (Tablet Computer), mobile phone, MP3 player, MP4 players etc..
It is understood that using the application program (nativeApp) that can be mounted in terminal, or can also be
One web page program (webApp) of the browser in terminal, the embodiment of the present invention is to this without limiting.
Fig. 2 is another flow chart of data load method embodiment provided in an embodiment of the present invention, as shown in Fig. 2 this hair
The data load method that bright embodiment is provided, on the basis of foregoing teachings, can also comprise the following steps:
105th, when radio receiver listens to application program update broadcast, the first application information list is updated.
When there is addition, deletion, modification, replacement in the application program installed in operating system, application program meeting
Broadcast is sent in system, when radio receiver listens to the broadcast of application program transmission, triggering updates the first application program letter
The action of list is ceased, the content to the first application information list is updated, to ensure the first application information list
The accuracy of information.
In embodiments of the present invention, the mode of renewal can be that the information in the first application information list is repaiied
Change or inquire about again after all application programs installed in current operation system to pacifying in original inquiry current operation system
All application programs of dress carry out overall replacement.
Data load method provided in an embodiment of the present invention is on the basis of foregoing teachings, further, believes with improving
Cease the effect of accuracy.
Fig. 3 is another flow chart of data load method embodiment provided in an embodiment of the present invention, as shown in figure 3, this hair
The data load method that bright embodiment is provided, on the basis of foregoing teachings, can also comprise the following steps:
106th, when serviced component terminates operation or be out of service, serviced component is restarted.
When operation troubles occurs during running status in terminal, serviced component may terminate operation or exit fortune
OK, in order to not influence user normally to use or not influence the using, it is necessary to restart serviced component of other assemblies.
107th, all application programs that serviced component is inquired about in current operation system again, generate the second application information
List.
After serviced component restarting, if in serviced component restarting procedure, the application program in operating system occurs
When addition, deletion, modification, replacement, the information in the first application information list of serviced component memory storage will
Inaccurate, therefore, all application programs that serviced component is inquired about in current operation system again generate the second application information
List.
In embodiments of the present invention, the information in the second application information list of generation both can be with generation first
Application information list information is identical, can also be different.
Data load method provided in an embodiment of the present invention is on the basis of foregoing teachings, further, believes with improving
Cease the effect of real-time.
Fig. 4 is the structural representation of data loading device embodiment provided in an embodiment of the present invention, as shown in figure 4, this hair
The data loading device that bright embodiment is provided, can include:Setting unit 11, the first generation unit 12, storage unit 13 and
Receiving unit 14.
Setting unit 11, for setting radio receiver in serviced component, start broadcast is monitored using radio receiver.
First generation unit 12, for when radio receiver listens to start broadcast, serviced component to inquire about current operation
All application programs in system, generate the first application information list.
Storage unit 13, for the specified location being stored in application information list in serviced component.
Receiving unit 14, the specified request for receiving application program transmission, the first application program is provided to application program
Information list.
Receiving unit 14, specifically for:
When the specified request for receiving application program transmission, and, the first application information list is not space-time, to application
Program provides the first application information list.
During a concrete implementation, storage unit 13, specifically for being applied using global variable by described first
Program information list is stored in the specified location in the serviced component.
The device of the present embodiment, can be used for the technical scheme for performing embodiment of the method shown in Fig. 1, its realization principle and skill
Art effect is similar, and here is omitted.
Fig. 5 is another structural representation of data loading device embodiment provided in an embodiment of the present invention, as shown in figure 5,
Data loading device provided in an embodiment of the present invention, on the basis of foregoing teachings, can also include:Updating block 15.
Updating block 15, for when radio receiver listens to application program update broadcast, updating the first application program
Information list.
The device of the present embodiment, can be used for the technical scheme for performing embodiment of the method shown in Fig. 2, its realization principle and skill
Art effect is similar, and here is omitted.
Fig. 6 is another structural representation of data loading device embodiment provided in an embodiment of the present invention, as shown in fig. 6,
Data loading device provided in an embodiment of the present invention, on the basis of foregoing teachings, can also include:Restart unit 16 and
Two generation units 17.
Unit 16 is restarted, for when serviced component terminates operation or be out of service, restarting serviced component.
Second generation unit 17, all application programs inquired about again for serviced component in current operation system, generation
Second application information list.
The device of the present embodiment, can be used for the technical scheme for performing embodiment of the method shown in Fig. 3, its realization principle and skill
Art effect is similar, and here is omitted.
It is apparent to those skilled in the art that, for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, may be referred to the corresponding process in preceding method embodiment, will not be repeated here.
In several embodiments provided by the present invention, it should be understood that disclosed system, apparatus and method can be with
Realize by another way.For example, device embodiment described above is only schematical, for example, the unit
Divide, only a kind of division of logic function there can be other dividing mode when actually realizing, for example, multiple units or group
Part can combine or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown
Or the coupling each other discussed or direct-coupling or communication connection can be by some interfaces, device or unit it is indirect
Coupling is communicated to connect, and can be electrical, machinery or other forms.
The unit illustrated as separating component can be or may not be it is physically separate, it is aobvious as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list
Member can both be realized in the form of hardware, it would however also be possible to employ hardware adds the form of SFU software functional unit to realize.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in an embodied on computer readable and deposit
In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, including some instructions are to cause a computer
Device (can be personal computer, server, or network equipment etc.) or processor (Processor) perform the present invention each
The part steps of embodiment methods described.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-
Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. it is various
Can be with the medium of store program codes.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention
God is with principle, and any modification, equivalent substitution and improvements done etc. should be included within the scope of protection of the invention.
Claims (10)
1. a kind of data load method, it is characterised in that including:
Radio receiver is set in serviced component, start broadcast is monitored using the radio receiver;
It is all in the serviced component inquiry current operation system when the radio receiver listens to the start broadcast
Application program, generates the first application information list;
The first application information list is stored in the specified location in the serviced component;
The specified request that application program is sent is received, the first application information list is provided to the application program.
2. according to the method described in claim 1, it is characterised in that methods described also includes:
When the radio receiver listens to application program update broadcast, the first application information list is updated.
3. according to the method described in claim 1, it is characterised in that methods described also includes:
When the serviced component terminates operation or be out of service, the serviced component is restarted;
All application programs that the serviced component is inquired about in current operation system again, generation the second application information row
Table.
4. according to the method described in claim 1, it is characterised in that described to receive the specified request that application program is sent, to institute
State application program and the first application information list is provided, including:
When the specified request for receiving the application program transmission, and, the first application information list is not space-time, to
The application program provides the first application information list.
5. according to the method described in claim 1, it is characterised in that described to be stored in the first application information list
Specified location in the serviced component, including:
The first application information list is stored in the specified location in the serviced component using global variable.
6. a kind of data loading device, it is characterised in that including:
Setting unit, for setting radio receiver in serviced component, start broadcast is monitored using the radio receiver;
First generation unit, for when the radio receiver listens to the start broadcast, the serviced component inquiry to be worked as
All application programs in preceding operating system, generate the first application information list;
Storage unit, for the specified location being stored in the application information list in the serviced component;
Receiving unit, the specified request for receiving application program transmission provides described first to the application program and applies journey
Sequence information list.
7. device according to claim 6, it is characterised in that described device also includes:
Updating block, for when the radio receiver listens to application program update broadcast, updating described first and applying journey
Sequence information list.
8. device according to claim 6, it is characterised in that described device also includes:
Unit is restarted, for when the serviced component terminates operation or be out of service, restarting the serviced component;
Second generation unit, all application programs inquired about again in current operation system for the serviced component, generation the
Two application information lists.
9. device according to claim 6, it is characterised in that the receiving unit, specifically for:
When the specified request for receiving the application program transmission, and, the first application information list is not space-time, to
The application program provides the first application information list.
10. device according to claim 6, it is characterised in that the storage unit, specifically for:
The first application information list is stored in the specified location in the serviced component using global variable.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710376463.1A CN107193601A (en) | 2017-05-25 | 2017-05-25 | Data load method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710376463.1A CN107193601A (en) | 2017-05-25 | 2017-05-25 | Data load method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107193601A true CN107193601A (en) | 2017-09-22 |
Family
ID=59874924
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710376463.1A Pending CN107193601A (en) | 2017-05-25 | 2017-05-25 | Data load method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107193601A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102591573A (en) * | 2011-12-22 | 2012-07-18 | Tcl集团股份有限公司 | Prompting application method and device |
CN103488495A (en) * | 2013-08-13 | 2014-01-01 | 广东欧珀移动通信有限公司 | Method for accelerating startup by dynamically adjusting startup preloaded resources |
CN103699403A (en) * | 2013-12-03 | 2014-04-02 | 青岛海尔软件有限公司 | Display method of installed applications for Android platform |
CN105872775A (en) * | 2015-12-09 | 2016-08-17 | 乐视致新电子科技(天津)有限公司 | Silent uninstalling method and device for smart cloud TV application |
CN106295312A (en) * | 2016-08-19 | 2017-01-04 | 硕诺科技(深圳)有限公司 | A kind of mobile terminal limits the method that application program accesses network |
-
2017
- 2017-05-25 CN CN201710376463.1A patent/CN107193601A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102591573A (en) * | 2011-12-22 | 2012-07-18 | Tcl集团股份有限公司 | Prompting application method and device |
CN103488495A (en) * | 2013-08-13 | 2014-01-01 | 广东欧珀移动通信有限公司 | Method for accelerating startup by dynamically adjusting startup preloaded resources |
CN103699403A (en) * | 2013-12-03 | 2014-04-02 | 青岛海尔软件有限公司 | Display method of installed applications for Android platform |
CN105872775A (en) * | 2015-12-09 | 2016-08-17 | 乐视致新电子科技(天津)有限公司 | Silent uninstalling method and device for smart cloud TV application |
CN106295312A (en) * | 2016-08-19 | 2017-01-04 | 硕诺科技(深圳)有限公司 | A kind of mobile terminal limits the method that application program accesses network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10712915B2 (en) | Information presentation using a client on a terminal | |
EP2907099B1 (en) | Testing framework for applications | |
CN103227812B (en) | Smart machine is supported method for down loading and the device of breakpoint transmission | |
US11296940B2 (en) | Centralized configuration data in a distributed file system | |
CN104903857A (en) | Method and terminal for software upgrading | |
CN105763602A (en) | Data request processing method, server and cloud interactive system | |
US20200319911A1 (en) | Configurable virtual machines | |
CN105786839A (en) | Application data acquisition method and apparatus | |
CN103841134A (en) | API-based method for sending and receiving information, API-based apparatus, and API-based system | |
CN104113576A (en) | Method and device for updating client | |
US10404568B2 (en) | Agent manager for distributed transaction monitoring system | |
CN104601683A (en) | File download management method, mobile terminal and communication system | |
CN105847231A (en) | Service publishing method, device and system | |
CN109150608A (en) | Interface service upgrade method and system for voice dialogue platform | |
CN102419753B (en) | Information processing equipment, information processing method and information processing system | |
CN102833272A (en) | Downloading method and device based on user subscription | |
US11146860B2 (en) | Service processing method, device, and intelligent terminal for obtaining and displaying data based on texture data corresponding to a target service | |
CN106131614A (en) | A kind of multimedia file playing processing method, device and server | |
CN105763616A (en) | Resource-downloading method and device | |
CN110381150B (en) | Data processing method and device on block chain, electronic equipment and storage medium | |
CN107102876A (en) | Application pushing method and device | |
CN103685165A (en) | Service processing method and service server | |
CN107193601A (en) | Data load method and device | |
CN116028696A (en) | Resource information acquisition method and device, electronic equipment and storage medium | |
CN105094881A (en) | Terminal and terminal application management method |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170922 |
|
RJ01 | Rejection of invention patent application after publication |