CN110162345B - Application program access method and device and storage medium - Google Patents

Application program access method and device and storage medium Download PDF

Info

Publication number
CN110162345B
CN110162345B CN201910369221.9A CN201910369221A CN110162345B CN 110162345 B CN110162345 B CN 110162345B CN 201910369221 A CN201910369221 A CN 201910369221A CN 110162345 B CN110162345 B CN 110162345B
Authority
CN
China
Prior art keywords
plug
host process
loading
management module
module
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.)
Expired - Fee Related
Application number
CN201910369221.9A
Other languages
Chinese (zh)
Other versions
CN110162345A (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.)
Wangsu Science and Technology Co Ltd
Original Assignee
Wangsu Science and 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 Wangsu Science and Technology Co Ltd filed Critical Wangsu Science and Technology Co Ltd
Priority to CN201910369221.9A priority Critical patent/CN110162345B/en
Publication of CN110162345A publication Critical patent/CN110162345A/en
Application granted granted Critical
Publication of CN110162345B publication Critical patent/CN110162345B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • 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
    • G06F9/44526Plug-ins; Add-ons
    • 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/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

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 an application program access method, a device and a storage medium, wherein service functions are structurally stripped from an original host process, relatively independent service function logics are packaged into different plug-ins for the host process to call, so that the influence of service function logic modification and the like on the host process is reduced, and the running stability of the host process is improved. In the application program access method, different service function logics are packaged into different plug-ins for being called by a host process; reading a plug-in configuration file when a host process is started, wherein the plug-in configuration file comprises loading configuration information of the plug-in; if the host process is started for the first time, sequentially loading the plug-ins from the corresponding paths according to the loading configuration information; if the plug-in needs to be updated, deploying a new plug-in, unloading the old plug-in, loading the new plug-in, and realizing a hot updating process; and in the running process of the host process, the data interaction between the plug-in and the host process is realized by dynamically loading the function address through the plug-in handle through a predefined access interface.

Description

Application program access method and device and storage medium
Technical Field
The present invention relates to the field of software architecture technologies, and in particular, to a method, an apparatus, and a storage medium for accessing an application.
Background
A CDN (Content Delivery Network) is a one-layer intelligent virtual Network based on the existing internet, which is formed by placing node servers at various places in the Network, and the CDN system can reschedule a request of a user to a service node closest to the user in real time according to Network traffic, connection of each node, a load condition, a distance to the user, response time, and other comprehensive information. The method aims to enable the user to obtain the required content nearby, solve the network congestion condition and improve the response speed of the user for accessing the website.
Currently, a CDN scheduling system mostly adopts a design architecture based on a single process and multiple processes, and functions of modules in each process are mixed together, so that the modules are tightly coupled with each other. In the design architecture, when any module needs to be changed, other modules are affected accordingly, and the service stability of the CDN scheduling system is affected.
Disclosure of Invention
The embodiment of the invention provides an application program access method, which separates service functions and the like from a host process, and encapsulates different functional logics into different plug-ins for the host process to call, so as to reduce the influence of service functional logic modification and the like on the host process and improve the running performance and service stability of a system.
The first aspect provides an application program access method, which encapsulates different business function logics into different plug-ins for being called by a host process; and
the method comprises the following steps:
reading an plugin configuration file when the host process is started, wherein the plugin configuration file comprises loading configuration information of the plugins, and the loading configuration information at least comprises a plugin loading list and loading paths of the plugins;
if the host process is judged to be started for the first time, sequentially loading the plug-ins from the corresponding loading paths according to each plug-in included in the plug-in loading list;
and calling each functional interface realized in the plug-in through a predefined access interface in the running process of the host process.
In one embodiment, after loading the insert, the method further comprises:
recording a plug-in handle corresponding to the plug-in a container of a plug-in management module; and
in the running process of the host process, calling each functional interface realized in the plug-in through a predefined access interface, specifically comprising:
in the running process of the host process, accessing the container of the plug-in management module through the access interface;
and calling each function interface realized in the plug-in according to the plug-in handle corresponding to the plug-in recorded in the container of the plug-in management module.
In one embodiment, in the process of starting the host process, if it is determined that the host process is not started for the first time, the method includes:
judging whether the loaded plug-in needs to be upgraded or not; and
and if the loaded plug-in is judged to be required to be upgraded, unloading the old plug-in first and then loading the new plug-in.
In one embodiment, the plug-in configuration file and the container of the plug-in management module further record the version number of the plug-in; and
judging whether the loaded plug-in needs to be upgraded or not, and specifically comprising the following steps:
comparing the version number in the plug-in configuration file with the version number recorded in the plug-in management module, if the version number in the plug-in configuration file is greater than the version number in the plug-in management module, determining that the loaded plug-in needs to be upgraded, otherwise, determining that the loaded plug-in does not need to be upgraded; and
loading a new plug-in, specifically comprising:
and reloading the plug-in from the corresponding path according to the new plug-in loading path configured in the plug-in configuration file.
In one embodiment, whether the host process is started for the first time is determined according to the following procedure:
judging whether a plug-in handle corresponding to each plug-in included in the plug-in loading list is recorded in the plug-in management module;
if so, determining that the host process is not started for the first time;
if not, determining that the host process is started for the first time.
In a second aspect, an application access device is provided, which encapsulates different service function logics into different plug-ins for being called by a host process; and
the apparatus, comprising:
the plug-in configuration module is used for reading a plug-in configuration file when the host process is started, wherein the plug-in configuration file comprises loading configuration information of the plug-in, and the loading configuration information at least comprises a plug-in loading list and a plug-in loading path;
the plug-in loading module is used for sequentially loading the plug-ins from the corresponding loading path information according to each plug-in included in the plug-in loading list if the host process is judged to be started for the first time;
and the plug-in calling module is used for calling each functional interface realized in the plug-in through a predefined access interface in the running process of the host process.
In an embodiment, the application access apparatus provided in the embodiment of the present invention further includes a plug-in management module, where:
the plug-in management module is used for recording a plug-in handle corresponding to the plug-in a container;
the plug-in calling module is specifically used for accessing the plug-in management module through the access interface in the running process of the host process; and calling each functional interface realized in the plug-in according to the plug-in handle corresponding to the plug-in recorded in the container of the plug-in management module.
In one embodiment, the apparatus further comprises:
the first judgment module is used for further judging whether the loaded plug-in needs to be upgraded or not if the host process is judged to be not started for the first time in the host process starting process;
and the plug-in version checking module is used for unloading the old plug-in first and then loading the new plug-in if the first judging module judges that the loaded plug-in needs to be upgraded.
In one embodiment, the plug-in configuration file and the plug-in management module further record a version number of the plug-in; and
the plug-in version checking module is specifically configured to, in the host process starting process, compare the version number in the plug-in configuration file with the version number recorded in the plug-in management module if it is determined that the host process is not started for the first time, determine that the loaded plug-in needs to be upgraded if the version number in the plug-in configuration file is greater than the version number in the plug-in management module, and otherwise determine that the loaded plug-in does not need to be upgraded; and reloading the plug-ins from the corresponding paths according to the new plug-in loading paths configured in the plug-in configuration file.
In one embodiment, the apparatus further comprises:
the second judging module is used for judging whether a container of the plug-in management module records a plug-in handle corresponding to each plug-in contained in the plug-in loading list;
the determining module is used for determining that the host process is not started for the first time when the judgment result of the second judging module is yes; and when the judgment result of the second judgment module is negative, determining that the host process is started for the first time.
In a third aspect, a computing device is provided, comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of any of the above application access methods.
In a fourth aspect, there is provided a computer readable medium storing a computer program executable by a computing device, the program, when run on the computing device, causing the computing device to perform the steps of any of the application access methods described above.
In the application program access method, the application program access device and the storage medium provided by the embodiment of the invention, different functional logics are packaged into independent plug-ins for the host process to call, so that when any plug-in needs to be changed, the operation of the host process and other plug-ins is not influenced, the operation performance of the host process is improved, and the stability of the host process for providing services is ensured.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
FIG. 1 is a schematic flow chart illustrating an implementation of an application access method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating a plug-in upgrade flow according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a CDN scheduling system architecture according to an embodiment of the present invention;
fig. 4 is a schematic diagram of data interaction between a host process and a service plug-in the CDN scheduling system according to the embodiment of the present invention;
FIG. 5 is a diagram illustrating an apparatus for accessing an application according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computing device according to an embodiment of the invention.
Detailed Description
The embodiment of the invention provides an application program access method, which is used for improving the running stability of a host process and ensuring the reliability of host process service.
It should be noted that the terms "first", "second", and the like in the description and the claims of the embodiments of the present invention and in the drawings described above are used for distinguishing similar objects and not necessarily for describing a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein.
Reference herein to "a plurality or a number" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the existing CDN scheduling system, a plurality of functional logics are realized in the same process, and the service functions can be mutually independent, because the modules are not sufficiently decoupled, the functional modules are influenced with each other, when any functional module needs to be changed or upgraded, other functional modules are inevitably influenced, on the other hand, because all the functional modules are tightly coupled, when any functional module is upgraded, the whole system can only be upgraded, the whole scheduling system needs to be stopped to run during upgrading, the service cannot be provided, and the running performance of the CDN scheduling system and the stability of providing the service are reduced.
In view of this, in the embodiment of the present invention, a plurality of functional logics included in the CDN scheduling system are stripped from the host process and are respectively encapsulated into different plug-ins, and the host process may provide a plug-in management module for managing the plug-ins in the CDN scheduling system, so that if the functional logic of a certain plug-in needs to be modified or upgraded, only the functional logic of the plug-in needs to be modified, and the operation of the host process and other functional modules is not affected, thereby improving the operation performance of the CDN scheduling system and ensuring the service reliability of the CDN system.
The preferred embodiments of the present invention will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention, and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present invention may be combined with each other without conflict.
As shown in fig. 1, which is a schematic diagram of an implementation flow of an application program access method provided by an embodiment of the present invention, the implementation flow includes the following steps:
and S11, reading the plug-in configuration file when the host process is started.
The plug-in configuration file comprises a plug-in loading list, a loading path, a version number and the like of each plug-in, and all the plug-ins to be loaded are recorded in the plug-in loading list.
S12, judging whether the host process is started for the first time, if so, executing the step S13, and if not, executing the step S14.
In specific implementation, the host process provides a plug-in management module for controlling and managing the plug-ins, for the loaded plug-ins, the host process records plug-in handles of the plug-ins in a container of the plug-in management module, the plug-in handles call various function interfaces realized in the corresponding plug-ins in a dynamic loading library function address mode, an access interface is predefined in the host process, and the host process accesses the plug-in handles in the container of the plug-in management module through the access interface.
Therefore, in specific implementation, the host process may determine, during startup, whether a plug-in handle of each plug-in included in the plug-in list that needs to be loaded is recorded in the plug-in management module container, and if so, may determine that the startup is not the first startup, and if not, determine that the startup is the first startup.
In addition, in specific implementation, in order to control upgrading of a loaded plug-in, the host process also needs to record the version number of the plug-in the plug-in management module, and the version number is generally represented by a version number with a certain growth rule, that is, the version number is usually designed into an incremental format convenient for comparison.
S13, according to each plug-in contained in the plug-in loading list in the plug-in configuration file, loading the plug-in from the corresponding path, and executing the step S16.
And if the host process judges that the starting is the first starting, sequentially loading the plug-ins from the corresponding loading paths according to each plug-in included in the plug-in loading list included in the plug-in configuration file. After the plug-in is loaded, the host process records the plug-in handle of the loaded plug-in and the version number of the current plug-in the plug-in management module.
And S14, judging whether the loaded plug-in needs to be upgraded, if so, executing the step S15, otherwise, executing the step S16.
And S15, upgrading the loaded plug-in.
Specifically, the host process unloads the old plug-in first, and reloads the new plug-in.
And S16, calling each function interface realized in the plug-in through the predefined access interface in the running process of the host process.
During specific implementation, the host process accesses the plug-in management module through a predefined access interface in the running process, and calls a plug-in internal to realize a good functional interface according to a plug-in handle recorded in a plug-in management module container and corresponding to the plug-in.
In step S15, if the plugin has a new version, the new plugin may be deployed to the specified path, and the loading path and the version number corresponding to the plugin in the plugin configuration file are updated according to the path deployed by the new version plugin.
Thus, for any loaded plugin, if in step S14, it may be determined whether an installed plugin needs to be upgraded by comparing the version number in the plugin configuration file with the version number recorded in the plugin management module, if the version number in the plugin configuration file is greater than the version number in the plugin management module, it is determined that a new version exists, the plugin needs to be upgraded, otherwise, it is determined that the loaded plugin does not need to be upgraded. And if the loaded plug-in is determined to be required to be upgraded, the host process unloads the loaded plug-in, and loads the plug-in from the corresponding loading path according to the new plug-in loading path configured in the plug-in configuration file, so as to realize the upgrade management of the plug-in.
The following describes in detail an upgrade procedure of a plug-in the embodiment of the present invention with reference to the procedure shown in fig. 2, where for convenience of description, in the embodiment of the present invention, a procedure in which a host process is not started for the first time is taken as an example, as shown in fig. 2, the upgrade procedure of a plug-in the embodiment of the present invention may include the following steps:
and S21, reading the plug-in configuration file when the host process is started.
The plug-in configuration file comprises the version number of the loaded plug-in.
S22, the host process analyzes the version number of the loaded plug-in contained in the plug-in configuration file.
S23, comparing whether the version number in the plug-in configuration file is larger than the version number recorded in the plug-in management module container, if yes, executing step S24, otherwise executing step S25.
When the method is implemented specifically, the host process judges whether the new version of the plug-in exists according to whether the version number in the plug-in configuration file is consistent with the version number recorded in the plug-in management module container, if the version number in the plug-in configuration file is consistent with the version number recorded in the plug-in management module container, the new version does not exist, if the version number in the plug-in configuration file is inconsistent with the version number recorded in the plug-in management module container, the version size is compared, and if the version number in the plug-in configuration file is consistent with the version number recorded in the plug-in management module container, the new version exists.
And S24, calling each functional interface in the plug-in through the predefined access interface in the running process of the host process, and ending the process.
And S25, unloading the plug-in, and reloading the plug-in from the corresponding address according to the loading path configured in the plug-in configuration file.
In the process, only the plug-in needing to be upgraded is upgraded, and the process does not influence the operation of the host process and other plug-ins, so that incremental upgrading and hot updating are realized.
The application access method provided by the embodiment of the present invention may be applied to, but is not limited to, a CDN scheduling system, and the following describes an implementation process of the embodiment of the present invention with application to the CDN scheduling system as an example. As shown in fig. 3, it is a schematic diagram of a CDN scheduling system architecture provided in an embodiment of the present invention, and includes a host process and plug-ins, where the plug-ins related in an embodiment of the present invention may include service plug-ins, such as an alarm scheduling plug-in, a run-high scheduling plug-in, an average traffic plug-in, a health value scheduling plug-in, an overseas burst scheduling plug-in, and the like, the service plug-ins use data provided by a dynamic library loading scheduling data integration module to execute a service process, and the plug-ins related in an embodiment of the present invention may also include a base plug-in, such as a real-time data pull plug-in, a deployment plug-in, and the like, the function of the base plug-in is relatively single, and it may be implemented by an independent process and used in cooperation with the host process (a decision process), and the plug-ins related in an embodiment of the present invention may also include a common plug-in, such as a scheduling data integration module, which is implemented in the host process (may also be peeled off into an independent plug-in use), scheduling data abstracted by the CDN system through data modeling is integrated into a specific form through a data structure and provided for each business plug-in unit to use. And the service plug-in and the scheduling data integration module are called to interact in a mode of dynamically loading the library function address. In specific implementation, a host process provides a plug-in management module for controlling and managing the plug-ins, an access interface is predefined in the host process, the plug-in management module can be accessed through the access interface, a container of the plug-in management module contains a plug-in handle with the plug-ins loaded, and a function interface realized inside each service plug-in is called in a mode of dynamically loading a library function address through the plug-in handle, so that service scheduling is realized.
When the plug-in architecture and the application access method provided by the embodiment of the invention are applied to a CDN scheduling system, a host process can be understood as a scheduling module, which mainly comprises the following functions:
1. loading scheduling data: loading scheduling data in a database;
2. data format integration: integrating data represented by a database table in a database into data with a specific format for calling by a service plug-in;
3. loading plug-in configuration: reading a plug-in configuration file, and acquiring configuration parameters of the plug-in from the plug-in configuration file;
4. and pulling real-time data: acquiring real-time data for scheduling decision calculation scheduling results, wherein the data comprises bandwidths, health values and the like of all dimensions pushed by a monitoring subsystem;
5. outputting a scheduling result: and obtaining a scheduling result according to the analysis and calculation result of the real-time data, outputting the scheduling result to the deployment process, and executing the deployment task by the deployment process.
Fig. 4 is a schematic diagram of data interaction between a host process and a service plug-in the CDN scheduling system according to the embodiment of the present invention.
In this embodiment, with the method provided in the embodiment of the present invention, the data integration function logic is directly encapsulated in the host process to be implemented, and in the specific implementation, the data integration function logic may also be encapsulated as an independent plug-in for deployment, which is not limited in the embodiment of the present invention.
In the application program access method provided by the embodiment of the invention, a plurality of functional logics contained in the CDN scheduling system are stripped from the host process and respectively packaged into different plug-ins, and the host process can provide a plug-in management module for managing the plug-ins in the CDN scheduling system, so that if a certain functional logic needs to be modified or upgraded, only the functional logic needs to be modified, and the operation of the host process and other functional modules cannot be influenced, thereby improving the operation performance of the CDN scheduling system and ensuring the service reliability of the CDN system.
Based on the same inventive concept, the embodiment of the present invention further provides an application program access apparatus, and as the principle of the apparatus for solving the problem is similar to the application program access method, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not repeated.
As shown in fig. 5, which is a schematic diagram of an application accessing apparatus according to an embodiment of the present invention, including:
a plug-in configuration module 51, configured to read a plug-in configuration file when the host process is started, where the plug-in configuration file includes loading configuration information of the plug-in, and the loading configuration information at least includes a plug-in loading list and a plug-in loading path;
a plug-in loading module 52, configured to load the plug-ins sequentially from the corresponding loading path information according to each plug-in included in the plug-in loading list if it is determined that the host process is started for the first time;
and the plug-in calling module 53 is configured to call, through a predefined access interface, each functional interface implemented in the plug-in during the running process of the host process.
In an embodiment, the application access apparatus provided in the embodiment of the present invention further includes a plug-in management module, where:
the plug-in management module 54 is configured to record a plug-in handle corresponding to the plug-in a container;
the plug-in calling module is specifically used for accessing the plug-in management module through the access interface in the running process of the host process; and calling each functional interface realized in the plug-in according to the plug-in handle corresponding to the plug-in recorded in the container of the plug-in management module.
In one embodiment, the apparatus further comprises:
the first judgment module is used for further judging whether the loaded plug-in needs to be upgraded or not if the host process is judged to be not started for the first time in the host process starting process;
and the plug-in version checking module 55 is configured to, if the first determining module determines that the loaded plug-in needs to be upgraded, unload the old plug-in first and then load the new plug-in.
In one embodiment, the plug-in configuration file and the plug-in management module further record a version number of the plug-in; and
the plug-in version checking module is specifically configured to, in the host process starting process, compare the version number in the plug-in configuration file with the version number recorded in the plug-in management module if it is determined that the host process is not started for the first time, determine that the loaded plug-in needs to be upgraded if the version number in the plug-in configuration file is greater than the version number in the plug-in management module, and otherwise determine that the loaded plug-in does not need to be upgraded; and reloading the plug-ins from the corresponding paths according to the new plug-in loading paths configured in the plug-in configuration file.
In one embodiment, the apparatus further comprises:
the second judging module is used for judging whether a container of the plug-in management module records a plug-in handle corresponding to each plug-in contained in the plug-in loading list;
the determining module is used for determining that the host process is not started for the first time when the judgment result of the second judging module is yes; and when the judgment result of the second judgment module is negative, determining that the host process is started for the first time.
For convenience of description, the above parts are separately described as modules (or units) according to functional division. Of course, the functionality of the various modules (or units) may be implemented in the same or in multiple pieces of software or hardware in practicing the invention.
Having described the application access method and apparatus of an exemplary embodiment of the present invention, a computing apparatus according to another exemplary embodiment of the present invention is next described.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
In some possible embodiments, a computing device according to the present invention may include at least one processor, and at least one memory. Wherein the memory stores program code which, when executed by the processor, causes the processor to perform the steps of the application access method according to various exemplary embodiments of the present invention described above in this specification. For example, the processor may perform step S11 shown in fig. 1, read the plug-in configuration file when the hosting process is started, and step S12, determine whether the hosting process is started for the first time, if so, perform step S13, and if not, perform step S14; step S13, according to each plug-in contained in the plug-in loading list in the plug-in configuration file, loading the plug-in from the corresponding path, and executing step S16; step S14, judging whether the loaded plug-in needs to be upgraded, if so, executing step S15, otherwise, executing step S16; step S15, upgrading the loaded plug-in; and step S16, calling each function interface realized in the plug-in through the predefined access interface in the running process of the host process.
The computing device 60 according to this embodiment of the invention is described below with reference to fig. 6. The computing device 60 shown in fig. 6 is only an example and should not impose any limitations on the functionality or scope of use of embodiments of the present invention.
As shown in fig. 6, the computing apparatus 60 is in the form of a general purpose computing device. Components of computing device 60 may include, but are not limited to: the at least one processor 61, the at least one memory 62, and a bus 63 connecting the various system components (including the memory 62 and the processor 61).
Bus 63 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
The memory 62 may include readable media in the form of volatile memory, such as Random Access Memory (RAM)621 and/or cache memory 622, and may further include Read Only Memory (ROM) 623.
The memory 62 may also include a program/utility 625 having a set (at least one) of program modules 624, such program modules 624 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Computing device 60 may also communicate with one or more external devices 64 (e.g., keyboard, pointing device, etc.), with one or more devices that enable a user to interact with computing device 60, and/or with any devices (e.g., router, modem, etc.) that enable computing device 60 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 65. Also, computing device 60 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) through network adapter 66. As shown, network adapter 66 communicates with other modules for computing device 60 over bus 63. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with computing device 60, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In some possible embodiments, the various aspects of the application program access method provided by the present invention may also be implemented in the form of a program product including program code for causing a computer device to perform the steps of the application program access method according to various exemplary embodiments of the present invention described above in this specification when the program product is run on the computer device, for example, the computer device may perform step S11 shown in fig. 1, read a plug-in configuration file when the host process is started, and step S12, determine whether the host process is started for the first time, if so, perform step S13, and if not, perform step S14; step S13, according to each plug-in contained in the plug-in loading list in the plug-in configuration file, loading the plug-in from the corresponding path, and executing step S16; step S14, judging whether the recorded plug-in needs to be upgraded, if so, executing step S15, otherwise, executing step S16; step S15, upgrading the loaded plug-in; and step S16, calling each function interface realized in the plug-in through the predefined access interface in the running process of the host process.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The program product for process access control of embodiments of the present invention may employ a portable compact disk read only memory (CD-ROM) and include program code, and may be run on a computing device. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device over any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., over the internet using an internet service provider).
It should be noted that although several units or sub-units of the apparatus are mentioned in the above detailed description, such division is merely exemplary and not mandatory. Indeed, the features and functions of two or more of the units described above may be embodied in one unit, according to embodiments of the invention. Conversely, the features and functions of one unit described above may be further divided into embodiments by a plurality of units.
Moreover, while the operations of the method of the invention are depicted in the drawings in a particular order, this does not require or imply that the operations must be performed in this particular order, or that all of the illustrated operations must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. An application program access method is characterized in that different service function logics are packaged into different plug-ins for being called by a host process; and
the method comprises the following steps:
reading an plugin configuration file when the host process is started, wherein the plugin configuration file comprises loading configuration information of the plugins, and the loading configuration information at least comprises a plugin loading list and loading paths of the plugins;
if the host process is judged to be started for the first time, sequentially loading the plug-ins from the corresponding loading paths according to each plug-in included in the plug-in loading list;
if the host process is judged to be not started for the first time, judging whether the loaded plug-in needs to be upgraded or not;
if the loaded plug-in is judged to be required to be upgraded, unloading the old plug-in first and then loading the new plug-in;
and calling each functional interface realized in the plug-in through a predefined access interface in the running process of the host process.
2. The method of claim 1, after loading the insert, further comprising:
recording a plug-in handle corresponding to the plug-in a container of a plug-in management module; and
in the running process of the host process, calling each functional interface realized in the plug-in through a predefined access interface, specifically comprising:
in the running process of the host process, accessing the plug-in management module through the access interface;
and calling each functional interface realized in the plug-in according to the plug-in handle corresponding to the plug-in recorded in the plug-in management module.
3. The method of claim 2, wherein the plug-in configuration file and the plug-in management module further record a version number of the plug-in; and
judging whether the loaded plug-in needs to be upgraded or not, and specifically comprising the following steps:
comparing the version number in the plug-in configuration file with the version number recorded in the plug-in management module, if the version number in the plug-in configuration file is greater than the version number in the plug-in management module, determining that the loaded plug-in needs to be upgraded, otherwise, determining that the loaded plug-in does not need to be upgraded; and
loading a new plug-in, specifically comprising:
and reloading the plug-in from the corresponding path according to the new plug-in loading path configured in the plug-in configuration file.
4. A method as claimed in claim 1, 2 or 3, wherein the determination of whether the host process is first started is made according to the following procedure:
judging whether a plug-in handle corresponding to each plug-in included in the plug-in loading list is recorded in the plug-in management module;
if so, determining that the host process is not started for the first time;
if not, determining that the host process is started for the first time.
5. An application program access device is characterized in that different service function logics are packaged into different plug-ins for being called by a host process; and
the apparatus, comprising:
the plug-in configuration module is used for reading a plug-in configuration file when the host process is started, wherein the plug-in configuration file comprises loading configuration information of the plug-in, and the loading configuration information at least comprises a plug-in loading list and a plug-in loading path;
the plug-in loading module is used for sequentially loading the plug-ins from the corresponding loading path information according to each plug-in included in the plug-in loading list if the host process is judged to be started for the first time;
the plug-in calling module is used for calling each functional interface realized in the plug-in through a predefined access interface in the running process of the host process;
the device, still include:
the first judgment module is used for further judging whether the loaded plug-in needs to be upgraded or not if the host process is judged to be not started for the first time;
and the plug-in version checking module is used for unloading the old plug-in first and then loading the new plug-in if the first judging module judges that the loaded plug-in needs to be upgraded.
6. The apparatus of claim 5, further comprising a plug-in management module, wherein:
the plug-in management module is used for recording a plug-in handle corresponding to the plug-in a container;
the plug-in calling module is specifically used for accessing the plug-in management module through the access interface in the running process of the host process; and calling each functional interface realized in the plug-in according to the plug-in handle corresponding to the plug-in recorded in the container of the plug-in management module.
7. The apparatus of claim 6, wherein the plug-in configuration file and the plug-in management module further record a version number of the plug-in; and
the plug-in version checking module is specifically configured to, in the host process starting process, compare the version number in the plug-in configuration file with the version number recorded in the plug-in management module if it is determined that the host process is not started for the first time, determine that the loaded plug-in needs to be upgraded if the version number in the plug-in configuration file is greater than the version number in the plug-in management module, and otherwise determine that the loaded plug-in does not need to be upgraded; and reloading the plug-ins from the corresponding paths according to the new plug-in loading paths configured in the plug-in configuration file.
8. The apparatus of claim 5, 6 or 7, further comprising:
the second judging module is used for judging whether a container of the plug-in management module records a plug-in handle corresponding to each plug-in contained in the plug-in loading list;
the determining module is used for determining that the host process is not started for the first time when the judgment result of the second judging module is yes; and when the judgment result of the second judgment module is negative, determining that the host process is started for the first time.
9. A computing device comprising at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1 to 4.
10. A computer-readable medium, in which a computer program is stored which is executable by a computing device, the program, when run on the computing device, causing the computing device to perform the steps of the method of any one of claims 1 to 4.
CN201910369221.9A 2019-05-05 2019-05-05 Application program access method and device and storage medium Expired - Fee Related CN110162345B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910369221.9A CN110162345B (en) 2019-05-05 2019-05-05 Application program access method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910369221.9A CN110162345B (en) 2019-05-05 2019-05-05 Application program access method and device and storage medium

Publications (2)

Publication Number Publication Date
CN110162345A CN110162345A (en) 2019-08-23
CN110162345B true CN110162345B (en) 2022-02-18

Family

ID=67633686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910369221.9A Expired - Fee Related CN110162345B (en) 2019-05-05 2019-05-05 Application program access method and device and storage medium

Country Status (1)

Country Link
CN (1) CN110162345B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764836B (en) * 2019-09-18 2024-02-09 华为技术有限公司 Plug-in implementation method and plug-in implementation system
CN110888690A (en) * 2019-12-12 2020-03-17 北京爱奇艺科技有限公司 Application starting method and device, electronic equipment and storage medium
CN111176663B (en) * 2019-12-20 2024-02-02 抖音视界有限公司 Data processing method, device, equipment and storage medium of application program
CN111857929B (en) * 2020-07-23 2023-05-30 杭州海康威视数字技术股份有限公司 Method and device for displaying application program interface and computer equipment
CN112148332B (en) * 2020-09-30 2023-09-05 亮风台(上海)信息科技有限公司 Tool system, updating method thereof, terminal device and storage medium
CN112839239B (en) * 2020-12-30 2023-03-21 广州虎牙科技有限公司 Audio and video processing method and device and server
CN114443159A (en) * 2021-12-31 2022-05-06 智器云南京信息科技有限公司 Plug-in processing device and method, computer equipment and storage medium
CN114564280A (en) * 2022-02-08 2022-05-31 北京时代正邦科技股份有限公司 Method and system for realizing software package by dynamically loading interface during running
CN114546508B (en) * 2022-02-28 2024-04-12 广联达科技股份有限公司 Cloud access method and device for tool type application software
CN114942796A (en) * 2022-05-05 2022-08-26 北京达佳互联信息技术有限公司 Plug-in compiling and calling method, device, equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639787A (en) * 2009-09-07 2010-02-03 中兴通讯股份有限公司 Method and device for starting application program
CN103324508A (en) * 2013-06-26 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method and device for application starting
WO2014039858A1 (en) * 2012-09-07 2014-03-13 Oracle International Corporation System and method for service definition packages for use with a cloud computing environment
CN104239102A (en) * 2014-09-15 2014-12-24 腾讯科技(深圳)有限公司 Operation method and device of application program
CN104750555A (en) * 2015-03-31 2015-07-01 北京奇虎科技有限公司 Management method and device for progresses in Android program
CN105373396A (en) * 2015-08-14 2016-03-02 腾讯科技(深圳)有限公司 Method and device for updating plug-in in plug-in platform
CN106844033A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 One kind application quick start method and terminal
CN109144595A (en) * 2017-06-15 2019-01-04 阿里巴巴集团控股有限公司 Method and device based on card cage starting component

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101639787A (en) * 2009-09-07 2010-02-03 中兴通讯股份有限公司 Method and device for starting application program
WO2014039858A1 (en) * 2012-09-07 2014-03-13 Oracle International Corporation System and method for service definition packages for use with a cloud computing environment
CN103324508A (en) * 2013-06-26 2013-09-25 宇龙计算机通信科技(深圳)有限公司 Method and device for application starting
CN104239102A (en) * 2014-09-15 2014-12-24 腾讯科技(深圳)有限公司 Operation method and device of application program
CN104750555A (en) * 2015-03-31 2015-07-01 北京奇虎科技有限公司 Management method and device for progresses in Android program
CN105373396A (en) * 2015-08-14 2016-03-02 腾讯科技(深圳)有限公司 Method and device for updating plug-in in plug-in platform
CN106844033A (en) * 2017-01-23 2017-06-13 努比亚技术有限公司 One kind application quick start method and terminal
CN109144595A (en) * 2017-06-15 2019-01-04 阿里巴巴集团控股有限公司 Method and device based on card cage starting component

Also Published As

Publication number Publication date
CN110162345A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
CN110162345B (en) Application program access method and device and storage medium
CN110865888B (en) Resource loading method and device, server and storage medium
US9038059B2 (en) Automatically targeting application modules to individual machines and application framework runtimes instances
US10025630B2 (en) Operating programs on a computer cluster
CN109788068B (en) Heartbeat state information reporting method, device and equipment and computer storage medium
US11144437B2 (en) Pre-populating continuous delivery test cases
CN110750291A (en) Edge device algorithm updating method, system, device and storage medium
CN109951553B (en) Data processing method, system, electronic device and computer readable storage medium
CN110427258A (en) Scheduling of resource control method and device based on cloud platform
CN111562929A (en) Method, device and equipment for generating patch file and storage medium
CN111427943A (en) Task management method and device in ET L system
CN114489954A (en) Tenant creation method based on virtualization platform, tenant access method and equipment
US20230359450A1 (en) Cloud application engine deployment method for shielding web framework from users and apparatus, device and storage medium thereof
CN115048187A (en) Operator-based pvc file importing method, device and storage medium
US8990817B1 (en) Predicting outcome of operations of multi-tier applications
CN115291928A (en) Task automatic integration method and device of multiple technology stacks and electronic equipment
CN114090514A (en) Log retrieval method and device for distributed system
CN108694046B (en) Container assembly method and apparatus
WO2019157891A1 (en) Application installation method and application installer generating method
US20130081007A1 (en) Providing continuous application availability during application update
CN109324951A (en) The acquisition methods and device of hard disk information in server
CN113704228B (en) Method, device, electronic equipment and storage medium for field self-addition
KR101834530B1 (en) Dynamic collaboration service platform and Method for providing an application service at the same platform
CN116661905B (en) Method and system for realizing automatic adaptation of equipment based on dynamic library loading
US11334898B2 (en) Method and apparatus for microservice architecture for locally based applications

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220218