CN109697103A - Kind loading method, device, equipment and readable storage medium storing program for executing - Google Patents
Kind loading method, device, equipment and readable storage medium storing program for executing Download PDFInfo
- Publication number
- CN109697103A CN109697103A CN201810952423.1A CN201810952423A CN109697103A CN 109697103 A CN109697103 A CN 109697103A CN 201810952423 A CN201810952423 A CN 201810952423A CN 109697103 A CN109697103 A CN 109697103A
- Authority
- CN
- China
- Prior art keywords
- class
- target
- plug
- unit
- application software
- 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/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a kind of kind loading method, device, equipment and readable storage medium storing program for executing, the kind loading method includes: in the class load instruction for detecting application software, obtain the target universal class name that the class load instructs corresponding class to be loaded, wherein, the application software includes host's application and plug-in unit;Judge that application software corresponds in plug-in unit with the presence or absence of the matched target class file of the target universal class name;When the class, which loads, instructs target class file matched there are the target universal class name in corresponding plug-in unit, target class file described in plug-in unit is loaded onto virtual machine.The technical issues of present invention solves preferential load in the prior art and applies the class file in host rather than the class file in plug-in unit, causes the target class file load time too long, low efficiency.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of kind loading method, device, equipment and readable storage mediums
Matter.
Background technique
Application and the application a certain function corresponding with plug-in unit for after corresponding plug-in unit, being if desired applied to downloading completion are completed in downloading
Can, it needs the function corresponding to class file and is loaded onto virtual machine.
Currently, in class file loading procedure, the class file that usually preferentially host's code is constituted in load host application,
Rather than the class file that plug-in code is constituted in plug-in unit, however, currently, generally will to reduce the space size of application installation package
The realization code or the more fresh code after patching bugs of few crowd's function are placed in plug-in unit, i.e., compared with plug-in code, host
Host's code release of application is older, and size of code is larger, thus preferential load host's code, will lead to the load of target class file
The technical issues of overlong time, low efficiency.
Summary of the invention
The main purpose of the present invention is to provide a kind of kind loading method, device, equipment and readable storage medium storing program for executing, it is intended to solve
Certainly preferential load applies the class file in host rather than the class file in plug-in unit in the prior art, and target class file is caused to load
The technical issues of overlong time, low efficiency.
To achieve the above object, the present invention provides a kind of kind loading method, and the kind loading method includes:
In the class load instruction for detecting application software, the target that the class load instructs corresponding class to be loaded is obtained
Universal class name, wherein the application software includes host's application and plug-in unit;
Judge that the application software corresponds in the plug-in unit with the presence or absence of the matched target class file of the target universal class name;
When the application software corresponds to target class file matched there are the target universal class name in the plug-in unit, by institute
It states target class file described in plug-in unit and is loaded onto the application software and correspond in virtual machine.
Optionally, the judgement application software corresponds in plug-in unit with the presence or absence of the matched target class text of the target universal class name
Include: after part step
When the application software, which corresponds in the plug-in unit, there is no the matched target class file of the target universal class name, from
The application software corresponds in host's application and obtains the matched target class file of the target universal class name;
Target class file described in host application is loaded onto virtual machine.
Optionally, the judgement application software corresponds in the plug-in unit with the presence or absence of the matched target of target universal class name
Class file step includes:
The plug-in unit and the host application of the application software are distinguished based on name feature and memory features;
Based on after differentiation the plug-in unit and the host application, judge that application software corresponds to whether there is in the plug-in unit
The matched target class file of target universal class name.
It is optionally, described that when the application software corresponds in plug-in unit, there are the matched target class files of the target universal class name
When, target class file described in the plug-in unit is loaded onto step in virtual machine includes: later
The mark processing of default mark is carried out, to the target universal class name for the target class file that load is completed to avoid weight
It is added with and carries the target class file.
Optionally, described in the class for detecting application software load instruction, it obtains the class load instruction and corresponds to
Class to be loaded target universal class name step before include:
When detecting the call instruction of the application software function, obtains host's application of the application software and insert
Part;
The host is applied and the plug-in unit is read into memory.
Optionally, the target universal class name includes target packet title and target class name;
The judgement application software corresponds in the plug-in unit with the presence or absence of the matched target class of target universal class name
Files step includes:
Judge that the application software corresponds to total class text in the plug-in unit with the presence or absence of the target packet name-matches
Part;
When the application software corresponds in the plug-in unit there are when total class file of the target packet name-matches, sentence
Break in total class file with the presence or absence of the matched target class file of the target universal class name.
Optionally, the judgement application software corresponds in plug-in unit with the presence or absence of the matched target class text of the target universal class name
Part step includes:
Judging that the application software corresponds to whether there is the matched target class file of the target universal class name in the plug-in unit,
Wherein, the target class file is that people's face identifies class file.
The present invention also provides a type loading device, the class loading device includes:
First obtains module, for obtaining the class load instruction pair in the class load instruction for detecting application software
The target universal class name for the class to be loaded answered, wherein the application software includes host's application and plug-in unit;
Judgment module is matched for judging that the application software corresponds in the plug-in unit with the presence or absence of the target universal class name
Target class file;
First loading module, for there are the target universal class name is matched when the application software corresponds in the plug-in unit
When target class file, target class file described in the plug-in unit is loaded onto the application software and is corresponded in virtual machine.
Optionally, the class loading device further include:
Second obtains module, for there is no the target universal class name matching when the application software corresponds in the plug-in unit
Target class file when, corresponded in host application from the application software and obtain the matched target class of target universal class name
File;
Second loading module, for target class file described in host application to be loaded onto virtual machine.
Optionally, the judgment module includes:
Acquiring unit, for distinguishing the plug-in unit of the application software and described based on name feature and memory features
Host's application;
First judging unit, for based on after differentiation the plug-in unit and host application, judge that application software is corresponding
It whether there is the matched target class file of the target universal class name in the plug-in unit.
Optionally, the class loading device further include:
Representation module, the target universal class name of the target class file for completing to load carry out the mark of default mark
Processing, to avoid repeating to load the target class file.
Optionally, the class loading device further include:
Third obtains module, soft for when detecting the call instruction of the application software function, obtaining the application
The host of part applies and plug-in unit;
Read module, for applying the host and the plug-in unit is read into memory.
Optionally, the target universal class name includes target packet title and target class name;
The judgment module includes:
Second judgment unit, for judging that the application software corresponds in the plug-in unit with the presence or absence of the target packet
Total class file of name-matches;
Third judging unit, for there are the target packet titles when the application software corresponds in the plug-in unit
When the total class file matched, judge in total class file with the presence or absence of the matched target class file of the target universal class name.
Optionally, the judgment module further include:
4th judging unit, for judging that the application software corresponds in the plug-in unit with the presence or absence of the target universal class name
Matched target class file, wherein the target class file is that people's face identifies class file.
In addition, to achieve the above object, the present invention also provides a type loading equipemtn, the class loading equipemtn includes: to deposit
Reservoir, processor, communication bus and the class loading procedure being stored on the memory,
The communication bus is for realizing the communication connection between processor and memory;
The processor is for executing the class loading procedure, to perform the steps of
In the class load instruction for detecting application software, the target that the class load instructs corresponding class to be loaded is obtained
Universal class name, wherein the application software includes host's application and plug-in unit;
Judge that the application software corresponds in the plug-in unit with the presence or absence of the matched target class file of the target universal class name;
When the application software corresponds to target class file matched there are the target universal class name in the plug-in unit, by institute
It states target class file described in plug-in unit and is loaded onto the application software and correspond in virtual machine.
Optionally, the judgement application software corresponds in plug-in unit with the presence or absence of the matched target class text of the target universal class name
Include: after part step
When the application software, which corresponds in the plug-in unit, there is no the matched target class file of the target universal class name, from
The application software corresponds in host's application and obtains the matched target class file of the target universal class name;
Target class file described in host application is loaded onto virtual machine.
Optionally, the judgement application software corresponds in the plug-in unit with the presence or absence of the matched target of target universal class name
Class file step includes:
The plug-in unit and the host application of the application software are distinguished based on name feature and memory features;
Based on after differentiation the plug-in unit and the host application, judge that application software corresponds to whether there is in the plug-in unit
The matched target class file of target universal class name.
It is optionally, described that when the application software corresponds in plug-in unit, there are the matched target class files of the target universal class name
When, target class file described in the plug-in unit is loaded onto step in virtual machine includes: later
The mark processing of default mark is carried out, to the target universal class name for the target class file that load is completed to avoid weight
It is added with and carries the target class file.
Optionally, described in the class for detecting application software load instruction, it obtains the class load instruction and corresponds to
Class to be loaded target universal class name step before include:
When detecting the call instruction of the application software function, obtains host's application of the application software and insert
Part;
The host is applied and the plug-in unit is read into memory.
Optionally, the target universal class name includes target packet title and target class name;
The judgement application software corresponds in the plug-in unit with the presence or absence of the matched target class of target universal class name
Files step includes:
Judge that the application software corresponds to total class text in the plug-in unit with the presence or absence of the target packet name-matches
Part;
When the application software corresponds in the plug-in unit there are when total class file of the target packet name-matches, sentence
Break in total class file with the presence or absence of the matched target class file of the target universal class name.
Optionally, the judgement application software corresponds in plug-in unit with the presence or absence of the matched target class text of the target universal class name
Part step includes:
Judging that the application software corresponds to whether there is the matched target class file of the target universal class name in the plug-in unit,
Wherein, the target class file is that people's face identifies class file.
In addition, to achieve the above object, the present invention also provides a kind of readable storage medium storing program for executing, the readable storage medium storing program for executing storage
Have one perhaps more than one program the one or more programs can be held by one or more than one processor
Row is to be used for:
In the class load instruction for detecting application software, the target that the class load instructs corresponding class to be loaded is obtained
Universal class name, wherein the application software includes host's application and plug-in unit;
Judge that the application software corresponds in the plug-in unit with the presence or absence of the matched target class file of the target universal class name;
When the application software corresponds to target class file matched there are the target universal class name in the plug-in unit, by institute
It states target class file described in plug-in unit and is loaded onto the application software and correspond in virtual machine.
The present invention is by the way that it is corresponding to be added to obtain the class load instruction in the class load instruction for detecting application software
Carry the target universal class name of class, wherein the application software includes host's application and plug-in unit;Judge described in the application software correspondence
It whether there is the matched target class file of the target universal class name in plug-in unit;Exist when the application software corresponds in the plug-in unit
When the matched target class file of the target universal class name, target class file described in the plug-in unit is loaded onto the application software
In corresponding virtual machine.I.e. in this application, it preferentially searches in plug-in unit or preferentially loads the target class file in plug-in unit, due to
In plug-in unit class file it is less or and patching bugs after more fresh code be update class file be placed in plug-in unit, thus, with
Preferentially the class file in load host application compares, preferentially lookup or the preferential target class text loaded in plug-in unit in plug-in unit
Part is conducive to quickly find target class file, with the class file being finally quickly loaded into after patching bugs, thus, it solves existing
There is the target class file load time in technology too long, the technical issues of low efficiency.
Detailed description of the invention
Fig. 1 is the flow diagram of kind loading method first kind embodiment of the present invention;
Fig. 2 is the flow diagram of the second class of kind loading method embodiment of the present invention;
Fig. 3 is the device structure schematic diagram for the hardware running environment that present invention method is related to.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of kind loading method, and in the first kind embodiment of kind loading method of the present invention, the class adds
Support method includes:
It is corresponding to be loaded to obtain the class load instruction in the class load instruction for detecting application software by step S10
The target universal class name of class, wherein the application software includes host's application and plug-in unit;
Step S20 judges that the application software corresponds in the plug-in unit with the presence or absence of the matched mesh of target universal class name
Mark class file;
Step S30, when the application software corresponds in the plug-in unit, there are the matched target class texts of the target universal class name
When part, target class file described in the plug-in unit is loaded onto the application software and is corresponded in virtual machine.
Referring to Fig.1, the specific steps are as follows:
It is corresponding to be loaded to obtain the class load instruction in the class load instruction for detecting application software by step S10
The target universal class name of class, wherein the application software includes host's application and plug-in unit;
It in the present embodiment, is to obtain to need class file to be loaded by the universal class name of class file.
Wherein, described in the class for detecting application software load instruction, it is corresponding to be added to obtain the class load instruction
Include: before carrying the target universal class name step of class
Step S01, when detecting the call instruction of the application software function, the host for obtaining the application software is answered
With and plug-in unit;
When detecting the instruction of application software funcall, the host for obtaining the corresponding application software of the call instruction is answered
With and plug-in unit, wherein plug-in unit refers to the plug-in unit of application software, host application refer to application software in addition to the insert
Program object, the funcall of application software can be the calling of this application software function, be also possible to call this application software
Outer other application software.It is illustrated to specific embodiment, a application software is this application software, and a application software has people
The function of face identification, thus, there are the corresponding each class files of the recognition of face in a application software, need in a application software
When wanting face identification functions, it is loaded directly into the relevant class file of face identification functions in this application software i.e. a application software,
When a application software does not have face identification functions and b application software has face identification functions, a application software can pass through
B application software is called, is each class file or recognition of face class file for calling b application software, finally to realize face
The function of identification.The present embodiment is specifically described for calling the other application software outside this application software.
The host is applied and the plug-in unit is read into memory by step S02.
After obtaining host's application and corresponding plug-in unit, host's application and corresponding plug-in unit are read into memory,
Will the dex file in host application and corresponding plug-in unit all read into memory.
After corresponding host is applied and plug-in unit reads into memory, be just able to achieve need to be implemented it is a certain specific
Then the concrete function is corresponded to class file again and be loaded onto virtual machine by function.
In the class load instruction for detecting application software, the target that the class load instructs corresponding class to be loaded is obtained
Universal class name, wherein the application software includes host's application and plug-in unit, wherein the corresponding class load document of target universal class name
To have read in memory, be the corresponding class load document of target universal class name be read into memory after, Cai Neng
Corresponding function triggering icon or key are shown in respective application, thus, user is clicking function triggering icon or is pressing
After key, it can trigger and generate class load instruction, the target universal class that the class load instructs corresponding class to be loaded could be obtained
Name.
Step S20 judges that the application software corresponds in the plug-in unit with the presence or absence of the matched mesh of target universal class name
Mark class file;
In the present embodiment, after obtaining target universal class name, preferentially judge that application software corresponds in plug-in unit with the presence or absence of institute
The matched target class file of target universal class name is stated, since the target class text in plug-in unit is preferentially searched or preferentially loaded in plug-in unit
Part, and in plug-in unit class file it is less or and patching bugs after the class file of update be placed in plug-in unit, thus, preferentially inserting
The target class file perhaps preferentially loaded in plug-in unit is searched in part to be conducive to quickly find target class file or even if target
Class file is not in plug-in unit, and class file total in plug-in unit is fewer, it is then desired to the time for traversing lookup is also fewer, because
And it finally can be quickly loaded into target class file, and if preferentially searching target class file in host's application, when the target
Class file not host application in when, the time for needing to be traversed for lookup is also long, or even if the target class file in host
When in, but the target class file be not it is newest modification loophole after class file, thus be loaded into target class file when
Between it is long, or cannot be loaded into modification loophole after newest target class file.
The judgement application software corresponds in plug-in unit with the presence or absence of the matched target class Files step of the target universal class name
Include:
Step S21, based on name feature and memory features distinguish the application software the plug-in unit and the host
Using;
After obtaining target universal class name, matched in each class file of plug-in unit first based on the target universal class name,
Before matching target class file in each class file of plug-in unit, needs to distinguish plug-in unit and host applies.
Specifically, (name feature) can be made up of the title that plug-in unit and host apply and shared memory size is not
With (memory features), the plug-in unit of application software and the differentiation of host's application are carried out, wherein memory size shared by plug-in unit is smaller,
Host is more using shared memory size, in addition, plug-in unit and the title composition rule that host applies are also different, plugin name is to take
With plug-in unit identification characteristics, such as there is " plug-in unit " suffix mark in plugin name, and the title of host's application can not carry and appoint
What plug-in unit mark.
Step S22, based on after differentiation the plug-in unit and the host application, judge that application software corresponds in the plug-in unit
With the presence or absence of the matched target class file of the target universal class name.
Based on after differentiation the plug-in unit and host application, judge application software correspond in plug-in unit whether there is the target
The matched target class file of universal class name.Plug-in unit is applied and after plug-in unit, can therefrom be selected distinguishing host, and then judges to apply
Software corresponds in plug-in unit with the presence or absence of the matched target class file of the target universal class name.
Specifically, the target universal class name includes target packet title and target class name;
The judgement application software corresponds in plug-in unit with the presence or absence of the matched target class Files step of the target universal class name
Include:
Step S23 judges that the application software corresponds in the plug-in unit with the presence or absence of the target packet name-matches
Total class file;
In the present embodiment, target universal class name includes target packet title and target class name, first determines whether to apply
Software corresponds to the total class file that whether there is the target packet name-matches in plug-in unit.Wherein, target packet title refers to
Be title or the corresponding title of the corresponding upper file of target class file after the target class file is packaged, on this is corresponding
Grade file includes target class file and other class files other than target class file, is illustrated to specific embodiment,
When needing to call face identification functions, target packet title refers to identification function package name, the other performance data
The corresponding file of packet title is total class file, and face identification functions correspond to class file in the corresponding each class of identification package name
In file.
Step S24, when the application software corresponds in the plug-in unit, there are total classes of the target packet name-matches
When file, judge in total class file with the presence or absence of the matched target class file of the target universal class name.
When application software corresponds in plug-in unit there are when total class file of the target packet name-matches, then judge described
It whether there is the matched target class file of the target universal class name in total class file.It is instructed in corresponding plug-in unit not when the class loads
There are when total class file of the target packet name-matches, do not execute to judge in total class file with the presence or absence of the mesh
Mark the operation of the matched target class file of universal class name.When application software corresponds in plug-in unit, there are the target packet name-matches
Total class file when, then judge in total class file with the presence or absence of the matched target class file of the target universal class name, can
Play the role of saving identification process.
It is illustrated to specific embodiment, when needing to call face identification functions, target packet title is referred to
Identification function package name, the corresponding file of the other performance data packet title is total class file, and face identification functions correspond to class
File is in the corresponding each class file of identification package name.Identification function package name if it does not exist, then not in plug-in unit
It is middle to execute the acquisition operation for searching face identification functions class file.To save the time, to promote user experience.
In the present embodiment, target class file is first searched from plug-in unit, as class loads the class name of the corresponding class to be loaded of instruction
Home class is found from plug-in code, and acquire home then according to class name matching way for home class
The corresponding code of home class is loaded onto virtual machine by Classloader, realizes the home by the corresponding code of class
Class corresponds to the function of code.
The present invention is by the way that it is corresponding to be added to obtain the class load instruction in the class load instruction for detecting application software
Carry the target universal class name of class, wherein the application software includes host's application and plug-in unit;Judge described in the application software correspondence
It whether there is the matched target class file of the target universal class name in plug-in unit;Exist when the application software corresponds in the plug-in unit
When the matched target class file of the target universal class name, target class file described in the plug-in unit is loaded onto the application software
In corresponding virtual machine.I.e. in this application, it preferentially searches in plug-in unit or preferentially loads the target class file in plug-in unit, due to
In plug-in unit class file it is less or and patching bugs after more fresh code be update class file be placed in plug-in unit, thus, with
Preferentially the class file in load host application compares, preferentially lookup or the preferential target class text loaded in plug-in unit in plug-in unit
Part is conducive to quickly find target class file, with the class file being finally quickly loaded into after patching bugs, thus, it solves existing
There is the target class file load time in technology too long, the technical issues of low efficiency.
Further, the present invention provides another embodiment of kind loading method, and in this embodiment, the judgement application is soft
Part corresponds in plug-in unit
There is no the matched target class of target universal class name when the application software corresponds in the plug-in unit in step S40
When file, is corresponded in host's application from the application software and obtain the matched target class file of the target universal class name;
When there is no the matched target class file of the target universal class name in plug-in unit, it is obvious that the target class file exists
In host's application, thus, target class file, which is obtained, from the corresponding host's application of class load instruction specifically passes through target
Universal class name matching way loads from the class and obtains the matched target class text of the target universal class name in the corresponding host's application of instruction
Part.
Target class file described in host application is loaded onto virtual machine by step S50.
By host apply in the target class file be loaded onto virtual machine, to realize the function of the target class file
It can, wherein the target class file can be recognition of face class file.
It is illustrated to specific embodiment, if class loads the entitled home class of class of the corresponding class to be loaded of instruction, leads to
Class name matching way is crossed, then according to class name matching way, home class is found from host's code, and acquire
The corresponding code of home class is loaded onto virtual machine by the corresponding code of home class by Classloader.
In the present embodiment, by there is no the target universal class name matching when the application software corresponds in the plug-in unit
Target class file when, corresponded in host application from the application software and obtain the matched target class of target universal class name
File;Target class file described in host application is loaded onto virtual machine.In the present embodiment, do not exist in plug-in unit
When target class file, accurately the target class file can be loaded onto virtual machine from host's application, realize target class text
The function of part.
Further, the present invention provides another embodiment of kind loading method, in this embodiment, described when the class adds
When carrying target class file matched there are the target universal class name in the corresponding plug-in unit of instruction, target class file described in plug-in unit is added
It is loaded onto virtual machine and includes: after step
Step A1, the mark for carrying out default mark to the target universal class name for the target class file that load is completed are handled.
In the present embodiment, the target universal class name for the target class file completed to load carries out the mark of default mark
Processing, it should be noted that the purpose that target universal class name carries out the mark processing of default mark is to the target class text
Part is identified, and is illustrated to specific embodiment, if being loaded with some class file to be loaded such as A class in plug-in unit
File, the mark for carrying out default mark to target class file, that is, A class file target universal class name that the load is completed are handled, such as A
The entitled home class of the target universal class of class file, the then entitled home class* of target universal class of the A class file after identifying, i.e.,
Default mark * indicates the mark that the A class file has loaded, in addition, the default mark can also be and stamp other Remarkable Label sides
Formula, other Remarkable Labels can be letter or mark etc., other to be loaded to avoid loading in host's code in needs
When class, and repeat the phenomenon that loading A class to be loaded.
In the present embodiment, default mark is carried out by the target universal class name for the target class file completed to load
Mark processing, it is thus possible to it avoids the target universal class name from corresponding to the repetition load of target class file, entanglement is avoided to load, thus
Promote user experience.
Referring to Fig. 3, Fig. 3 is the device structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
Class loading equipemtn of the embodiment of the present invention can be PC, be also possible to smart phone, tablet computer, e-book reading
Device, MP3 (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio
Level 3) player, MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert compression
Standard audio level 3) terminal devices such as player, portable computer.
As shown in figure 3, such loading equipemtn may include: processor 1001, such as CPU, memory 1005, communication bus
1002.Wherein, communication bus 1002 is for realizing the connection communication between processor 1001 and memory 1005.Memory 1005
It can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as magnetic disk storage.
Memory 1005 optionally can also be the storage equipment independently of aforementioned processor 1001.
Optionally, such loading equipemtn can also include user interface, network interface, camera, RF (Radio
Frequency, radio frequency) circuit, sensor, voicefrequency circuit, WiFi module etc..User interface may include display screen
(Display), input unit such as keyboard (Keyboard), optional user interface can also include wireline interface, the nothing of standard
Line interface.Network interface optionally may include standard wireline interface and wireless interface (such as WI-FI interface).
It will be understood by those skilled in the art that class loading equipemtn structure shown in Fig. 3 is not constituted to class loading equipemtn
Restriction, may include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in figure 3, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium
Believe module and class loading procedure.Operating system is to manage and control the program of class loading equipemtn hardware and software resource, is supported
The operation of class loading procedure and other softwares and/or program.Network communication module is for realizing 1005 inside each group of memory
Communication between part, and communicated between other hardware and softwares in class loading equipemtn.
In class loading equipemtn shown in Fig. 3, processor 1001 is used to execute the class load journey stored in memory 1005
Sequence performs the steps of
In the class load instruction for detecting application software, the target that the class load instructs corresponding class to be loaded is obtained
Universal class name, wherein the application software includes host's application and plug-in unit;
Judge that the application software corresponds in the plug-in unit with the presence or absence of the matched target class file of the target universal class name;
When the application software corresponds to target class file matched there are the target universal class name in the plug-in unit, by institute
It states target class file described in plug-in unit and is loaded onto the application software and correspond in virtual machine.
Class loading equipemtn specific embodiment of the present invention and each embodiment of above-mentioned kind loading method are essentially identical, herein no longer
It repeats.
The present invention also provides a type loading device, the class loading device includes:
First obtains module, for obtaining the class load instruction pair in the class load instruction for detecting application software
The target universal class name for the class to be loaded answered, wherein the application software includes host's application and plug-in unit;
Judgment module is matched for judging that the application software corresponds in the plug-in unit with the presence or absence of the target universal class name
Target class file;
First loading module, for there are the target universal class name is matched when the application software corresponds in the plug-in unit
When target class file, target class file described in the plug-in unit is loaded onto the application software and is corresponded in virtual machine.
Readable storage medium storing program for executing specific embodiment of the present invention and each embodiment of above-mentioned kind loading method are essentially identical, herein not
It repeats again.
The present invention provides a kind of readable storage medium storing program for executing, the readable storage medium storing program for executing is stored with one or more than one journey
Sequence, the one or more programs can also be executed by one or more than one processor for realizing above-mentioned
The step of kind loading method described in one.
Readable storage medium storing program for executing specific embodiment of the present invention and each embodiment of above-mentioned kind loading method are essentially identical, herein not
It repeats again.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field similarly includes in patent process range of the invention.
Claims (10)
1. a kind of kind loading method, which is characterized in that the kind loading method includes:
In the class load instruction for detecting application software, the target universal class that the class load instructs corresponding class to be loaded is obtained
Name, wherein the application software includes host's application and plug-in unit;
Judge that the application software corresponds in the plug-in unit with the presence or absence of the matched target class file of the target universal class name;
When the application software corresponds to target class file matched there are the target universal class name in the plug-in unit, inserted described
Target class file described in part is loaded onto the application software and corresponds in virtual machine.
2. kind loading method as described in claim 1, which is characterized in that
The judgement application software corresponds in plug-in unit with the presence or absence of after the matched target class Files step of the target universal class name
Include:
When the application software, which corresponds in the plug-in unit, there is no the matched target class file of the target universal class name, from described
Application software corresponds in host's application and obtains the matched target class file of the target universal class name;
Target class file described in host application is loaded onto virtual machine.
3. kind loading method as described in claim 1, which is characterized in that the judgement application software, which corresponds in the plug-in unit, is
It is no that there are the matched target class Files steps of the target universal class name to include:
The plug-in unit and the host application of the application software are distinguished based on name feature and memory features;
Based on after differentiation the plug-in unit and the host application, judge application software correspond in the plug-in unit whether there is described in
The matched target class file of target universal class name.
4. kind loading method as described in claim 1, which is characterized in that described to exist when the application software corresponds in plug-in unit
When the matched target class file of the target universal class name, target class file described in the plug-in unit is loaded onto step in virtual machine
Include: later
The mark processing of default mark is carried out to the target universal class name for the target class file that load is completed.
5. kind loading method as described in claim 1, which is characterized in that described in the class for detecting application software load instruction
When, include: before obtaining the target universal class name step of the corresponding class to be loaded of the class load instruction
When detecting the call instruction of the application software function, host's application and the plug-in unit of the application software are obtained;
The host is applied and the plug-in unit is read into memory.
6. kind loading method as described in claim 1, which is characterized in that the target universal class name includes target packet title
And target class name;
The judgement application software corresponds in the plug-in unit with the presence or absence of the matched target class file of the target universal class name
Step includes:
Judge that the application software corresponds to the total class file that whether there is the target packet name-matches in the plug-in unit;
When the application software corresponds in the plug-in unit there are when total class file of the target packet name-matches, institute is judged
It states in total class file with the presence or absence of the matched target class file of the target universal class name.
7. kind loading method as claimed in any one of claims 1 to 6, which is characterized in that the judgement application software corresponds to plug-in unit
In with the presence or absence of the matched target class Files step of the target universal class name include:
Judging that the application software corresponds to whether there is the matched target class file of the target universal class name in the plug-in unit,
In, the target class file is that people's face identifies class file.
8. a type loading device, which is characterized in that the class loading device includes:
First obtains module, for it is corresponding to obtain the class load instruction in the class load instruction for detecting application software
The target universal class name of class to be loaded, wherein the application software includes host's application and plug-in unit;
Judgment module, for judging that application software corresponds in plug-in unit with the presence or absence of the matched target class text of the target universal class name
Part;
Loading module, for there are the matched target class files of the target universal class name when class load instructs in corresponding plug-in unit
When, target class file described in plug-in unit is loaded onto virtual machine.
9. a type loading equipemtn, which is characterized in that the class loading equipemtn includes: memory, processor, communication bus and
The class loading procedure being stored on the memory,
The communication bus is for realizing the communication connection between processor and memory;
The processor is for executing the class loading procedure, to realize the class load as described in any one of claims 1 to 7
The step of method.
10. a kind of readable storage medium storing program for executing, which is characterized in that be stored with class loading procedure, the class on the readable storage medium storing program for executing
It realizes when loading procedure is executed by processor such as the step of kind loading method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810952423.1A CN109697103A (en) | 2018-08-21 | 2018-08-21 | Kind loading method, device, equipment and readable storage medium storing program for executing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810952423.1A CN109697103A (en) | 2018-08-21 | 2018-08-21 | Kind loading method, device, equipment and readable storage medium storing program for executing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109697103A true CN109697103A (en) | 2019-04-30 |
Family
ID=66230064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810952423.1A Pending CN109697103A (en) | 2018-08-21 | 2018-08-21 | Kind loading method, device, equipment and readable storage medium storing program for executing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109697103A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014139300A1 (en) * | 2013-03-14 | 2014-09-18 | Tencent Technology (Shenzhen) Company Limited | Method and device for loading a plug-in |
US20150242222A1 (en) * | 2012-09-28 | 2015-08-27 | Beijing Qihoo Technology Company Limited | Method and client for using an embedded ActiveX plug-in in a browser |
CN106933611A (en) * | 2015-12-31 | 2017-07-07 | 北京五八信息技术有限公司 | Kind loading method and Classloader |
CN108089895A (en) * | 2017-12-19 | 2018-05-29 | 珠海市君天电子科技有限公司 | The register method of Activity, device, electronic equipment and storage medium in a kind of plug-in unit |
-
2018
- 2018-08-21 CN CN201810952423.1A patent/CN109697103A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150242222A1 (en) * | 2012-09-28 | 2015-08-27 | Beijing Qihoo Technology Company Limited | Method and client for using an embedded ActiveX plug-in in a browser |
WO2014139300A1 (en) * | 2013-03-14 | 2014-09-18 | Tencent Technology (Shenzhen) Company Limited | Method and device for loading a plug-in |
CN106933611A (en) * | 2015-12-31 | 2017-07-07 | 北京五八信息技术有限公司 | Kind loading method and Classloader |
CN108089895A (en) * | 2017-12-19 | 2018-05-29 | 珠海市君天电子科技有限公司 | The register method of Activity, device, electronic equipment and storage medium in a kind of plug-in unit |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108415739B (en) | Hook method and device for dynamic link library function and storage medium | |
CN107276789B (en) | Log uploading method and device and computer readable storage medium | |
CN110333947B (en) | Method, device, equipment and medium for loading subcontracting resources of game application | |
CN109726067B (en) | Process monitoring method and client device | |
CN108363528B (en) | Application page starting method and device, storage medium and electronic equipment | |
WO2014106410A1 (en) | Method for terminal acceleration, terminal and storage medium | |
CN102523475B (en) | Testing method and device for electronic products, and television set | |
US9588757B2 (en) | Data update method, user terminal, and data update system | |
CN108228230A (en) | Upgrade method, terminal and the computer readable storage medium of UFS firmwares | |
WO2014173211A1 (en) | Code coverage testing method, device and system | |
WO2014161353A1 (en) | Method for starting process of application and computer system | |
US20140304720A1 (en) | Method for starting process of application and computer system | |
EP2869604B1 (en) | Method, apparatus and device for processing a mobile terminal resource | |
CN111078523A (en) | Log obtaining method and device, storage medium and electronic equipment | |
CN110968508A (en) | Method, device, terminal and storage medium for determining loading time of applet | |
CN111078316B (en) | Layout file loading method and device, storage medium and electronic equipment | |
CN108984374B (en) | Method and system for testing database performance | |
CN112286586B (en) | Plug-in configuration method and related equipment | |
CN104035921A (en) | Information processing method and electronic devices | |
CN106919458B (en) | Method and device for Hook target kernel function | |
US9928134B2 (en) | Method and apparatus for repairing dynamic link library file | |
CN106933636A (en) | Start method, device and the terminal device of plug-in services | |
CN110209557A (en) | User's operation records restoring method, device, equipment and readable storage medium storing program for executing | |
CN105278942B (en) | Component management method and device | |
CN107463395B (en) | Component calling method and device |
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 |