[go: up one dir, main page]

CN112052044B - Application loading method and device, storage medium and electronic equipment - Google Patents

Application loading method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN112052044B
CN112052044B CN202010819784.6A CN202010819784A CN112052044B CN 112052044 B CN112052044 B CN 112052044B CN 202010819784 A CN202010819784 A CN 202010819784A CN 112052044 B CN112052044 B CN 112052044B
Authority
CN
China
Prior art keywords
class
party
package
loader
target application
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
CN202010819784.6A
Other languages
Chinese (zh)
Other versions
CN112052044A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010819784.6A priority Critical patent/CN112052044B/en
Publication of CN112052044A publication Critical patent/CN112052044A/en
Application granted granted Critical
Publication of CN112052044B publication Critical patent/CN112052044B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

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

Abstract

The application provides an application loading method, an application loading device, a storage medium and electronic equipment, wherein the method comprises the following steps: acquiring at least one third party dependency package on which a target application depends; creating a third party loader corresponding to each third party dependent package; and respectively loading third-party dependent packages corresponding to each third-party loader through the third-party loader. By adopting the embodiment of the application, the error problem of class conflict caused by the fact that different third-party dependent packages depend on different versions of the same class library can be avoided.

Description

Application loading method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to an application loading method, an application loading device, a storage medium, and an electronic device.
Background
With the increasing use of various computer languages in the internet and related fields, a large number of libraries written based on computer languages are presented for selection by various applications. Each application is almost unavoidably dependent on a large number of third party dependent packages. In addition, the content contained in the existing project is more and more complex, the functions are more and more abundant, and the modularized development of multi-team cooperation is required. With the development and popularization of micro services, various framework and middleware technologies are widely used in various large companies. With the development of these technologies, a very urgent problem faced by an application program is that different third party dependency packages may depend on different versions of the same class library, and class conflict errors may occur during running, so that the application program is abnormal and cannot provide services.
Disclosure of Invention
In order to solve the above problems, embodiments of the present application provide an application loading method, an apparatus, a storage medium, and an electronic device, which can avoid an error of class conflict when a program runs. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an application loading method, including the following steps:
Acquiring at least one third party dependency package on which a target application depends;
Creating a third party loader corresponding to each third party dependent package;
and respectively loading third-party dependent packages corresponding to each third-party loader through the third-party loader.
In a second aspect, an embodiment of the present application provides an application loading apparatus, including:
the package acquisition unit is used for acquiring at least one third-party dependency package on which the target application depends;
the loader creation unit is used for creating a third party loader corresponding to each third party dependency package;
And the package loading unit is used for loading the third party dependent packages corresponding to each third party loader through the third party loader respectively.
In a third aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of any of the methods described above.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any one of the methods described above when the program is executed.
Different third party dependent packages may depend on different versions of the same class library, and when a plurality of third party dependent packages are loaded by the same loader, class conflict errors may occur in the running process. In the embodiment of the application, the third party dependency packages are respectively loaded by the third party loader corresponding to each third party dependency package, so that the error problem of class conflict caused by dependency on different versions of the same class library among different third party dependency packages can be avoided.
Drawings
Fig. 1 is a schematic flow chart of an application loading method according to an embodiment of the present application;
FIG. 2 is a flowchart of another application loading method according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of a container startup and class loading according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an application loading device according to an embodiment of the present application;
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The application is further described below with reference to the drawings and examples.
In the following description, the terms "first," "second," and "first," are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The following description provides various embodiments of the application that may be substituted or combined between different embodiments, and thus the application is also to be considered as embracing all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the application should also be seen as embracing one or more of all other possible combinations of one or more of A, B, C, D, although such an embodiment may not be explicitly recited in the following.
The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the application. Various examples may omit, replace, or add various procedures or components as appropriate. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Different third party dependent packages may depend on different versions of the same class library, and class conflict errors may occur during running. To solve the above problem, a centralized dependency management method for the project may be adopted. Each third party dependency package only retains one version in the project, the responsible person defines the version list of the project usage dependency package, and all modules must follow this rule. The main disadvantages of the above solution are: the workload of unified management dependence is very large, and the third party dependence package versions relied on by each module may not be compatible, so that the modules are required to modify own codes because of upgrading the dependence package versions, and the time cost of communicating and unifying each dependence package version is too expensive; when one module is added or updated, the version check work of the third party dependent package needs to be done again, besides the time cost, the quality of the software is difficult to be guaranteed, and the abnormality is likely to occur in the running process.
The problem of class conflict due to referencing multiple third party dependent packages can also be solved as follows. And each third party module uses the packing plug-in to modify the package name of the dependent package and repackage the package. This avoids the appearance of classes and packages of the same name. The main disadvantages of the above solution are: renaming the third party dependent package results in very chaotic dependency management, and modifying the names of some basic third party dependent packages, the packages on which the upper layer relies have to be repackaged, so that the recursive packing operation is very chaotic, and the usability and maintainability are not guaranteed at all.
Based on the analysis, the embodiment of the application provides an application loading scheme which can conveniently realize lightweight class isolation, the project does not need to maintain the same dependency version list, and all application modules use the versions needed by the application modules, are not influenced by each other, and are simple and stable. Referring to fig. 1, fig. 1 is a flowchart of an application loading method according to an embodiment of the present application, where the method includes:
s101, acquiring at least one third-party dependency package on which the target application depends.
The third-party dependency package on which the target application depends is a third-party dependency package that the target application needs to be loaded or invoked during the running process. The third party dependency packages may include code packages, middleware packages, framework packages, and the like that perform particular functions.
The third party dependency package of the target application dependency can be obtained based on the code of the target application, and the third party dependency package of the target application dependency can be obtained based on the code package packaged by the target application. The method for acquiring the third party dependency package on which the target application depends is not limited by the embodiment of the application.
S102, creating a third party loader corresponding to each third party dependent package.
The number of third party loaders is the same as the number of third party dependent packages. The third party loader and the third party dependency package are in one-to-one correspondence.
The loader is used for loading the program and placing the loaded program in the memory to enable the program to start running. The loading procedure includes reading the executable file, writing the content of the executable file into the memory, and completing other needed preparation work. After the loading is completed, the operating system gives control to the loaded program to start the program.
S103, respectively loading third party dependency packages corresponding to the third party loaders through the third party loaders.
And loading the corresponding third-party dependent package by a third-party loader corresponding to each third-party dependent package. By using at least one third party loader, each third party dependent package is loaded in an isolated state, and the problem of class conflict is caused.
Further, S103 may include:
Respectively loading first-class third-party dependent packages corresponding to each third-party loader through the third-party loader, wherein the first-class third-party dependent packages correspond to loaded classes;
And/or respectively loading second-class third-party dependency packages corresponding to each third-party loader through the third-party loader, wherein the second-class third-party dependency packages correspond to classes in a software development kit;
And/or, loading third-party dependency packages of a third type corresponding to each third-party loader through the third-party loader respectively, wherein the third-party dependency packages of the third type correspond to the classes in other third-party dependency packages called by the third-party dependency packages;
and/or, loading fourth-class third-party dependency packages corresponding to each third-party loader through the third-party loader respectively, wherein the fourth-class third-party dependency packages correspond to classes of the third-party dependency packages;
And/or respectively loading fifth-class third-party dependent packages corresponding to each third-party loader through the third-party loader, wherein the fifth-class third-party dependent packages correspond to classes in the language agent module.
The third-party dependency packages may include the first-type third-party dependency packages, the second-type third-party dependency packages, the third-type third-party dependency packages, the fourth-type third-party dependency packages, and the fifth-type third-party dependency packages described above. By separating the third party dependent packages into different classes of code packages, the loading process of the third party dependent packages may be made more efficient.
Further, S103 may include:
And loading the third-party dependent packages corresponding to each third-party loader through the third-party loader according to the orders of the first-class third-party dependent packages, the second-class third-party dependent packages, the third-class third-party dependent packages, the fourth-class third-party dependent packages and the fifth-class third-party dependent packages.
The third-party dependency packages may include the first-type third-party dependency packages, the second-type third-party dependency packages, the third-type third-party dependency packages, the fourth-type third-party dependency packages, and the fifth-type third-party dependency packages described above. By dividing the third-party dependent package into code packages of different categories and loading the code packages in sequence, the running speed of the target application can be improved, and the system resources can be saved.
Further, the method further comprises:
creating an application loader;
And loading the code package of the target application through the application loader.
Some class library may be called in the code of the target application, and the class library called by the target application is different from the version of the class library referenced in the third party dependency package. Or multiple classes may be defined in the code package of the target application, and the names of the classes in the target application may be the same as those of the classes in the multiple third-party dependency packages. Thus, class conflict problems may also arise if the same loader is used to load third party dependent packages and code packages for the target application.
In the embodiment of the application, different loaders are adopted to load the code package and the third-party dependence package of the target application respectively, so that the problem of conflict between the class called or defined in the target application and the class in the third-party dependence package can be solved.
Further, the loading, by the application loader, the code package of the target application includes:
loading a first type of application code package by the application loader, wherein the first type of application code package corresponds to the loaded class;
And/or loading, by the application loader, a second class of application code packages, the second class of application code packages corresponding to classes in a software development kit;
And/or loading, by the application loader, a third class application code package, the third class application code package corresponding to a class in the other third party dependent package;
And/or loading, by the application loader, a fourth class application code package, the fourth class application code package corresponding to a class in the self module;
and/or loading, by the application loader, a fifth class application code package, the fifth class application code package corresponding to a class in the language agent module.
The code packages of the target application may include the first type of application code packages, the second type of application code packages, the third type of application code packages, the fourth type of application code packages, and the fifth type of application code packages. By dividing the code package of the target application into code packages of different categories, the loading process of the code package of the target application can be made more efficient.
Further, the loading, by the application loader, the code package of the target application includes:
And loading the code packages of the target application through the application loader according to the sequence of the first class application code packages, the second class application code packages, the third class application code packages, the fourth class application code packages and the fifth class application code packages.
The code packages of the target application may include the first type of application code packages, the second type of application code packages, the third type of application code packages, the fourth type of application code packages, and the fifth type of application code packages. By dividing the code packets of the target application into code packets of different categories and loading the code packets in sequence, the running speed of the target application can be improved, and the system resources can be saved.
According to the program loading method provided by the embodiment of the application, each third-party dependence package is loaded through the third-party loader corresponding to each third-party dependence package, so that the error problem of class conflict caused by dependence on different versions of the same class library among different third-party dependence packages can be avoided, and smooth execution of target application is ensured.
Referring to fig. 2, fig. 2 is a flowchart of another application loading method according to an embodiment of the present application, where the method includes:
s201, at least one third-party dependency package on which the target application depends is obtained.
The method provided by the embodiment of the application can be applied to an application developer who applies a third party dependent package to develop projects. At least one third party dependency package on which the target application depends is first obtained. The third party dependent package may have a specific format to facilitate the packaging process of the following step S202.
Further, the provider of the third party dependent package may be a middleware developer or a standalone business module developer, or the like. These providers may refer to class isolation container packaging tools in project engineering that package code into packages in a first format during a project packaging stage.
The class isolation container packaging tool is a package that can be used by the provider of the third party dependent package described above to package the relevant code into a first format.
S202, packaging the code of the target application and the at least one third party dependency package into a code package with a preset format.
The developer of the target application may package the code of the target application and the third party dependency package acquired in step S201 into a code package of a predetermined second format.
It should be noted that, the code packet in the first format and the code packet in the second format may have the same format, or may have different formats, so as to achieve the packaging purpose of the embodiment of the present application, and may obtain the third party dependency packet on which the target application depends through the following S203.
Further, a developer of the target application may refer to a class isolation container packaging tool in project engineering, and code of the target application is packaged into a package in a second format in a project packaging stage.
Class isolation container packaging tools may also be used for the developer of the target application described above to package the relevant code into packages in a second format.
S203, acquiring at least one third party dependency package on which the target application depends based on the code package in the preset format.
S204, creating a third party loader corresponding to each third party dependent package.
S205, third party dependency packages corresponding to the third party loaders are loaded through the third party loaders respectively.
In the application loading method provided by the embodiment of the application, a packing method is provided, the target application can be packed into a preset format, so that when the target application runs, different third-party dependent packages on which the target application depends can be loaded by using a plurality of independent loaders through the packages of the preset format, the possibility of class conflict is avoided, and the problem of the class conflict is solved conveniently and efficiently.
The embodiment of the application also provides a packaging method, which comprises the following steps:
And packaging the third party module into a third party dependent package in a first preset format, wherein the third party code package is used for being packaged with codes of a target application into a code package in a second preset format, the code package in the second preset format is used for obtaining at least one third party dependent package on which the target application depends, and each third party loader is respectively loaded through a third party loader corresponding to each third party dependent package.
The packaging method provided by the embodiment of the application can be applied to the provider of the third-party dependent package. The provider of the third party dependent package may be a middleware developer or a separate business module developer, etc. These providers may refer to class isolation container packaging tools in project engineering that package code into third party dependency packages in a first format during a project packaging phase.
Further, the provider of the third party dependent package may be a middleware developer or a standalone business module developer, or the like. These providers may refer to class isolation container packaging tools in project engineering that package code into packages in a first format during a project packaging stage.
A class isolation container packaging tool is a package that may be used to package relevant code into a first format for the provider of the third party dependent package.
The application developer may perform a packaging process based on the third party dependency package having the first format and package into a code package of the second format. In the project operation stage, different third-party dependent packages which are dependent on the target application can be obtained based on the code package in the second format, and a plurality of independent loaders are used for loading, so that the occurrence of the class conflict problem is avoided.
In order to facilitate understanding of the method according to the embodiment of the present application, a specific implementation procedure is explained in java. The solution of the embodiment of the application introduces the concept of a class isolation Container (Container) and provides a modularized development solution based on a loader (Classloader). The method can be widely applied to project development depending on a plurality of modules.
For example, in a micro-service-based architecture, applications often depend on independent modules such as a service framework and database middleware, and a conflict of dependency packages is likely to exist between business self-dependency and each middleware module, so that the problem can be solved conveniently and quickly by using the technology product.
Users of the solution of embodiments of the present application may include module developers and application developers.
A module developer, such as a middleware developer or an independent business module developer, refers to a class isolation container packing tool in project engineering, packs codes into a jar package in a required first format in a project packing stage, and the packing process tool is automatically completed without development workload of a user.
In the development stage, the application developer, such as a business party who completes the developer and other business modules by using middleware, develops a third party dependent jar package in a specific format, introduces a jar package of a class isolation container, and packages codes and dependencies into a jar package in a second format by using a packaging tool provided by the class isolation container.
The application developer can start the process corresponding to the jar package in the second format in an application program starting mode, and if a command of 'java-jar application. Jar' is input, the function of isolating and loading each third-party dependent package in the second format is automatically realized. The implementation of the whole class isolation loading is transparent to the user, and the application developer does not need to modify the code.
FIG. 3 is a flow chart of a container startup and class loading according to an embodiment of the present application. As shown in fig. 3, the detailed flow of operation inside the class isolation container is as follows:
Step 1, after a container is started, firstly scanning all third party dependent packages under a class path, and finding out all third party dependent packages (Plugin) generated by using a specific packaging technology;
Step 2, creating PluginClassLoader for each third party dependent package, using Classloader to load the externally exported class in the third party package, and storing SharedClassLoader;
and step 3, generating BizClassLoader for the service code, and loading the class of the service and other third-party dependent packages of the service call.
The class loading order is: class in the cache of Classloader- > class in JDK class library- > derived class of Plugin- > class in the Plugin package- > JavaAgent class.
The Plugin module is used for exporting classes in a third party dependent package or other third party dependent packages called in the target application. The Biz module is used to export classes in the third party dependency package or in the self module in the target application.
The method provided by the embodiment of the application can enable the service developer to concentrate on service correlation without worrying about class conflict among different modules. The method provided by the embodiment of the application has the beneficial effects of reducing the communication coordination cost of the developer, reducing the possibility of abnormality during operation, reducing the obstacle removal difficulty of the developing operation and maintenance personnel and improving the service stability.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an application loading device according to an embodiment of the present application. As shown in fig. 4, the application loading apparatus includes:
a package obtaining unit 401, configured to obtain at least one third party dependency package on which a target application depends;
a loader creation unit 402, configured to create a third party loader corresponding to each of the third party dependency packages;
and the package loading unit 403 is configured to load, by the third party loader, the third party dependent package corresponding to each third party loader.
Further, the packet loading unit 403 is specifically configured to:
Respectively loading first-class third-party dependent packages corresponding to each third-party loader through the third-party loader, wherein the first-class third-party dependent packages correspond to loaded classes;
And/or respectively loading second-class third-party dependency packages corresponding to each third-party loader through the third-party loader, wherein the second-class third-party dependency packages correspond to classes in a software development kit;
And/or, loading third-party dependency packages of a third type corresponding to each third-party loader through the third-party loader respectively, wherein the third-party dependency packages of the third type correspond to the classes in other third-party dependency packages called by the third-party dependency packages;
and/or, loading fourth-class third-party dependency packages corresponding to each third-party loader through the third-party loader respectively, wherein the fourth-class third-party dependency packages correspond to classes of the third-party dependency packages;
And/or respectively loading fifth-class third-party dependent packages corresponding to each third-party loader through the third-party loader, wherein the fifth-class third-party dependent packages correspond to classes in the language agent module.
Further, the packet loading unit 403 is specifically configured to:
And loading the third-party dependent packages corresponding to each third-party loader through the third-party loader according to the orders of the first-class third-party dependent packages, the second-class third-party dependent packages, the third-class third-party dependent packages, the fourth-class third-party dependent packages and the fifth-class third-party dependent packages.
Further, the apparatus further comprises:
An application loading unit 404 for creating an application loader;
And loading the code package of the target application through the application loader.
Further, the application loading unit 404 is specifically configured to:
loading a first type of application code package by the application loader, wherein the first type of application code package corresponds to the loaded class;
And/or loading, by the application loader, a second class of application code packages, the second class of application code packages corresponding to classes in a software development kit;
And/or loading, by the application loader, a third class application code package, the third class application code package corresponding to a class in the other third party dependent package;
And/or loading, by the application loader, a fourth class application code package, the fourth class application code package corresponding to a class in the self module;
and/or loading, by the application loader, a fifth class application code package, the fifth class application code package corresponding to a class in the language agent module.
Further, the application loading unit 404 is specifically configured to:
And loading the code packages of the target application through the application loader according to the sequence of the first class application code packages, the second class application code packages, the third class application code packages, the fourth class application code packages and the fifth class application code packages.
Further, the apparatus further comprises:
a packaging unit 405, configured to obtain at least one third party dependency package on which the target application depends;
packaging the code of the target application and the at least one third party dependency package into a code package in a preset format;
the packet acquisition unit 401 specifically is configured to:
And acquiring at least one third party dependency package on which the target application depends based on the code package in the preset format.
It will be clear to those skilled in the art that the technical solutions of the embodiments of the present application may be implemented by means of software and/or hardware. "unit" and "module" in this specification refer to software and/or hardware capable of performing a specific function independently or in cooperation with other components, wherein the hardware may be, for example, FPGA (Field-Programmable gate array) GATE ARRAY, IC (INTEGRATED CIRCUIT ) or the like.
The processing units and/or modules of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the steps of the application loading method described above. The computer-readable storage medium may include, among other things, any type of disk including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
Referring to fig. 5, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, where the electronic device may be used to implement the application loading method provided in the foregoing embodiment. Specifically, the present application relates to a method for manufacturing a semiconductor device.
Memory 1020 may be used to store software programs and modules that processor 1080 performs various functional applications and data processing by executing the software programs and modules stored in memory 1020. The memory 1020 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the terminal device, and the like. In addition, memory 1020 may include high-speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state memory device. Accordingly, memory 1020 may also include a memory controller to provide processor 1080 and input unit 1030 with access to memory 1020.
The input unit 1030 may be used for receiving input numeric or character information and generating keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 1030 may include a touch-sensitive surface 1031 (e.g., a touch screen, touchpad, or touch frame). The touch-sensitive surface 1031, also referred to as a touch display screen or touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch-sensitive surface 1031 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection device according to a pre-set program. Alternatively, the touch sensitive surface 1031 may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1080 and can receive commands from the processor 1080 and execute them. In addition, the touch sensitive surface 1031 may be implemented in a variety of types, such as resistive, capacitive, infrared, and surface acoustic waves.
The display unit 1040 may be used to display information input by a user or information provided to the user and various graphic user interfaces of the terminal device, which may be composed of graphics, text, icons, video and any combination thereof. The display unit 1040 may include a display panel 1041, and alternatively, the display panel 1041 may be configured in the form of an LCD (Liquid CRYSTAL DISPLAY), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch sensitive surface 1031 can overlay the display panel 1041, and upon detection of a touch operation thereon or thereabout by the touch sensitive surface 1031, is communicated to the processor 1080 to determine a type of touch event, and the processor 1080 then provides a corresponding visual output on the display panel 1041 based on the type of touch event. Although the touch-sensitive surface 1031 and the display panel 1041 may be implemented as two separate components for input and output functions, in some embodiments the touch-sensitive surface 1031 may be integrated with the display panel 1041 to implement input and output functions.
Processor 1080 is a control center of the terminal device and connects the various parts of the overall terminal device using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in memory 1020 and invoking data stored in memory 1020, thereby performing overall monitoring of the terminal device. Optionally, processor 1080 may include one or more processing cores; processor 1080 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., with a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 1080.
In particular, in this embodiment, the display unit of the terminal device is a touch screen display, and the terminal device further includes a memory, and one or more programs, where the one or more programs are stored in the memory, and configured to be executed by the one or more processors, where the one or more programs include steps for implementing the application loading method described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described embodiment of the apparatus is merely illustrative, and for example, the division of the units is merely a logic function division, and there may be other division manners in actual implementation, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, whether indirectly coupled or communicatively coupled to devices or units, whether electrically, mechanically, or otherwise.
The functional units in the embodiments of the present application may be all integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (5)

1. An application loading method, the method comprising:
Acquiring at least one third party dependency package on which a target application depends; the third party dependency package is determined based on a code package in a second preset format, and the code package in the second preset format is obtained by packaging the code of the target application and the third party dependency package in the first preset format;
Creating a third party loader corresponding to each third party dependent package; wherein the third party loader and the third party dependency package are in one-to-one correspondence; the third party dependency package corresponding to each third party loader comprises: class of the first class, class of the second class, class of the third class, class of the fourth class and class of the fifth class;
Loading third-party dependent packages corresponding to each third-party loader through the third-party loader respectively;
The third party loader is used for loading the third party dependency package corresponding to each third party loader respectively, and the third party dependency package loading method comprises the following steps:
According to the order of the first class, the second class, the third class, the fourth class and the fifth class, respectively loading third-party dependency packages corresponding to each third-party loader through the third-party loader; wherein, the first class corresponds to the loaded class, the second class corresponds to the class in the software development kit, the third class corresponds to the class in the other third-party dependent package called by the third-party dependent package, the fourth class corresponds to the class of the third-party dependent package, and the fifth class corresponds to the class in the language agent module;
creating an application loader;
loading a code packet of the target application through the application loader; wherein the code package of the target application comprises: class of the first class, class of the second class, class of the third class, class of the fourth class and class of the fifth class;
wherein the loading of the code package of the target application by the application loader comprises:
Loading the code package of the target application through the application loader according to the order of the first class in the code package of the target application, the second class in the code package of the target application, the third class in the code package of the target application, the fourth class in the code package of the target application and the fifth class in the code package of the target application; the class of the first class in the code package of the target application corresponds to the class which is loaded, the class of the second class in the code package of the target application corresponds to the class in the software development kit, the class of the third class in the code package of the target application corresponds to the class in other third-party dependency packages, the class of the fourth class in the code package of the target application corresponds to the class in the self module, and the class of the fifth class in the code package of the target application corresponds to the class in the language agent module.
2. The method according to claim 1, wherein the method further comprises:
acquiring at least one third party dependency package in the first preset format on which the target application depends;
And packing the codes of the target application and the at least one third-party dependent package in the first preset format into code packages in the second preset format through a class isolation container packing tool.
3. An application loading apparatus, the apparatus comprising:
The package acquisition unit is used for acquiring at least one third-party dependency package on which the target application depends; the third party dependency package is determined based on a code package in a second preset format, and the code package in the second preset format is obtained by packaging the code of the target application and the third party dependency package in the first preset format;
The loader creation unit is used for creating a third party loader corresponding to each third party dependency package; wherein the third party loader and the third party dependency package are in one-to-one correspondence; the third party dependency package corresponding to each third party loader comprises: class of the first class, class of the second class, class of the third class, class of the fourth class and class of the fifth class;
The package loading unit is used for loading third-party dependent packages corresponding to each third-party loader through the third-party loader respectively;
wherein, the packet loading unit is further configured to: according to the order of the first class, the second class, the third class, the fourth class and the fifth class, respectively loading third-party dependency packages corresponding to each third-party loader through the third-party loader; wherein, the first class corresponds to the loaded class, the second class corresponds to the class in the software development kit, the third class corresponds to the class in the other third-party dependent package called by the third-party dependent package, the fourth class corresponds to the class of the third-party dependent package, and the fifth class corresponds to the class in the language agent module;
An application loading unit for creating an application loader;
the application loading unit is further used for loading a code packet of the target application through the application loader; wherein the code package of the target application comprises: class of the first class, class of the second class, class of the third class, class of the fourth class and class of the fifth class;
Wherein, the application loading unit is further configured to: loading the code package of the target application through the application loader according to the order of the first class in the code package of the target application, the second class in the code package of the target application, the third class in the code package of the target application, the fourth class in the code package of the target application and the fifth class in the code package of the target application; the class of the first class in the code package of the target application corresponds to the class which is loaded, the class of the second class in the code package of the target application corresponds to the class in the software development kit, the class of the third class in the code package of the target application corresponds to the class in other third-party dependency packages, the class of the fourth class in the code package of the target application corresponds to the class in the self module, and the class of the fifth class in the code package of the target application corresponds to the class in the language agent module.
4. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps of the method according to any one of claims 1 and 2.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 and 2 when the program is executed.
CN202010819784.6A 2020-08-14 2020-08-14 Application loading method and device, storage medium and electronic equipment Active CN112052044B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010819784.6A CN112052044B (en) 2020-08-14 2020-08-14 Application loading method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010819784.6A CN112052044B (en) 2020-08-14 2020-08-14 Application loading method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN112052044A CN112052044A (en) 2020-12-08
CN112052044B true CN112052044B (en) 2024-09-17

Family

ID=73599115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010819784.6A Active CN112052044B (en) 2020-08-14 2020-08-14 Application loading method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN112052044B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114139215A (en) * 2021-12-01 2022-03-04 中国建设银行股份有限公司 A kind of dynamic library file loading method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404524A (en) * 2014-09-15 2016-03-16 阿里巴巴集团控股有限公司 Class loading and isolating method and apparatus in Java application
CN108595246A (en) * 2018-03-15 2018-09-28 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment of operation application

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6513158B1 (en) * 1999-11-15 2003-01-28 Espial Group Inc. Method and apparatus for running multiple java applications simultaneously
US8738589B2 (en) * 2009-09-30 2014-05-27 Red Hat, Inc. Classloading technique for an application server that provides dependency enforcement
US9519468B2 (en) * 2015-02-13 2016-12-13 Oracle International Corporation Modular co-versioning in a dynamically linked runtime environment
CN110968340B (en) * 2018-09-29 2024-11-15 京东科技控股股份有限公司 A method and device for realizing multi-version dependency isolation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105404524A (en) * 2014-09-15 2016-03-16 阿里巴巴集团控股有限公司 Class loading and isolating method and apparatus in Java application
CN108595246A (en) * 2018-03-15 2018-09-28 阿里巴巴集团控股有限公司 A kind of method, apparatus and equipment of operation application

Also Published As

Publication number Publication date
CN112052044A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
US9934005B2 (en) Dynamically building locale objects or subsections of locale objects based on historical data
US10019298B2 (en) Middleware interface and middleware interface generator
US20100313182A1 (en) Extensible user interface generation
US10747510B1 (en) Application runtime modification
US11741002B2 (en) Test automation systems and methods using logical identifiers
CN111381920B (en) Display method and device of pop-up window assembly and electronic terminal
US8661356B2 (en) Time application having an intergrated check engine
CN113032273B (en) Application program debugging method and device, computer equipment and storage medium
CN107861742A (en) The operation method and terminal device of a kind of program
CN112685020A (en) Method and device for dynamically creating service interface, electronic equipment and storage medium
CN107133055B (en) Method for realizing customized development based on ClassLoader
US9141353B2 (en) Dynamically building locale objects at run-time
CN112052044B (en) Application loading method and device, storage medium and electronic equipment
CN114579334A (en) Communication method, communication device, electronic equipment and storage medium
CN108228266B (en) Method and device for starting Fragment component between different plug-ins under Android plug-in framework
US8726239B2 (en) Generating type-safe wrappers for dynamic detouring
CN111488286A (en) Method and device for independently developing Android module
CN106775608A (en) The implementation method and device of autonomous system process
CA2543910C (en) Method and system for extending scripting languages
CN115469864A (en) Application development device and method based on atomization packaging command
CN118092886B (en) Mobile application middle layer component calling method, device, equipment and storage medium
US9778917B2 (en) Dynamically building subsections of locale objects at run-time
US20130111504A1 (en) Dialog to service conversion method and system
CN116820414A (en) Front-end customized delivery methods, devices, equipment and storage media
CN118295704A (en) Application management method, device and computing equipment supporting multiple systems

Legal Events

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