Disclosure of Invention
In view of the above, it is necessary to provide a component loading method, apparatus, computer device and storage medium capable of improving efficiency of development and upgrade of components.
A method of component loading, the method comprising:
receiving a starting instruction, and triggering the starting operation of the application according to the starting instruction;
detecting whether the application comprises a component to be loaded;
when the application comprises a component to be loaded, intercepting a starting operation of the application and positioning a target position of the component to be loaded in the application;
identifying the component type according to the target position, and acquiring a component to be loaded corresponding to the component type from a preset storage address;
and loading the component to be loaded to the target position, and continuing the starting operation of the application.
In an embodiment, the obtaining the component to be loaded corresponding to the component type from the preset storage address includes:
acquiring a component sample corresponding to the component type from a preset storage address, wherein the component sample comprises a component configuration item;
identifying the component configuration items in the component sample, and acquiring parameters corresponding to the component configuration items from an established parameter library;
and configuring the acquired parameters into corresponding component configuration items to obtain the component to be loaded.
In an embodiment, after acquiring the parameter corresponding to the component configuration item from the established parameter library, the method further includes:
when the parameter corresponding to the component configuration item is not included in the parameter library, generating a new parameter request;
and sending the new parameter adding request to a server, so that the server adds the parameters corresponding to the component configuration items in the parameter library.
In one embodiment, before identifying the component configuration item in the component sample, the method further includes:
injecting the component configuration item in the component sample according to a preset injection rule;
the identifying component configuration items in the component sample comprises:
and identifying the injected component configuration items according to a preset identification rule corresponding to the preset injection rule.
In one embodiment, the injecting the component configuration item in the component sample according to a preset injection rule includes:
acquiring a configuration item to be injected and acquiring a configuration prefix corresponding to the configuration item to be injected;
injecting the configuration prefix in the component sample;
the identifying the injected component configuration item according to the preset identification rule corresponding to the preset injection rule includes:
identifying component configuration items in the component sample according to the configuration prefix.
In one embodiment, after the resuming the starting operation of the application, the method further includes:
receiving a component update notification, wherein the component update notification comprises information of a component to be updated;
and when a hot updating instruction is received, updating the corresponding component according to the information to be updated.
In one embodiment, after detecting whether the application includes a component to be loaded, the method further includes:
and when the application comprises the component to be loaded, continuing the starting operation of the application.
A component loading apparatus, the apparatus comprising:
the starting instruction receiving module is used for receiving a starting instruction and triggering the starting operation of the application according to the starting instruction;
the detection module is used for detecting whether the application comprises a component to be loaded;
the intercepting module is used for intercepting the starting operation of the application and positioning the target position of the component to be loaded in the application when the component to be loaded is included in the application;
the component obtaining module is used for identifying the component type according to the target position and obtaining a component to be loaded corresponding to the component type from a preset storage address;
and the component loading module is used for loading the component to be loaded to the target position and continuing the starting operation of the application.
A computer device comprising a memory storing a computer program and a processor implementing the steps of any of the methods described above when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above.
According to the component loading method, the component loading device, the computer equipment and the storage medium, when the terminal starts the application, the step of component loading is automatically triggered, whether the application contains the component to be loaded or not is detected, if yes, the operation of application starting is intercepted, the component to be loaded meeting the loading requirement at this time is automatically generated according to the set acquisition logic of the component to be loaded, the component to be loaded is loaded to the target position, and the component loading operation in the application is completed. According to the method, through a set of complete component loading logic, the terminal can automatically load the components meeting the loading requirements when the terminal starts the application, and when the components are upgraded, the terminal can also automatically load the upgraded components without analyzing, changing, upgrading and other operations of codes of each component by technicians to realize the loading operation of the components, so that the development and upgrading efficiency of the components can be effectively improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The component loading method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The server 104 may issue a component sample and parameters of the component to be loaded for the terminal to realize automatic loading of the component, and when the terminal 102 starts a certain application including the component to be loaded, the server 104 acquires the component sample and the parameters of the component to be loaded to generate the component to be loaded for this component loading. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a component loading method is provided, which is described by taking the method as an example applied to the terminal 102 in fig. 1, and includes the following steps:
s202, receiving a starting instruction, and triggering the starting operation of the application according to the starting instruction.
The starting instruction is an instruction triggered by a user to start the frame application, and may be an instruction input by the user through an input device of a terminal such as a mobile phone or a computer, or may be other business.
Specifically, when the terminal receives a start instruction for starting an application, the application is started to run on the terminal.
S204, detecting whether the application contains the component to be loaded.
When an application runs on a terminal according to a starting instruction, whether the application contains a component to be loaded is detected. It may be set that before the application is started, whether the application includes the embedded point of the component to be loaded is traversed, and if the embedded point of the component to be loaded is found, the application includes the component to be loaded.
S206, when the application comprises the component to be loaded, intercepting the starting operation of the application and positioning the target position of the component to be loaded in the application.
And when the application comprises the component to be loaded, the terminal intercepts the starting operation of the application and suspends the starting of the application. During the running of the java Web framework application, a Tomcat (a Web application server with an open source code) is usually called, a starting mechanism of the Tomcat includes a self-check mechanism, that is, a lufaxservet container initializer (container interception interface) is loaded, the interface performs some initialization work for providing a third-party component with opportunities, for example, registering servlets or files, and the step of intercepting the starting of the application can be realized by using the container interception interface.
The component to be loaded is a component which needs to be inserted in the application, the target position is a position where the component to be loaded needs to be loaded in the framework application, when the framework application is generated, a buried point can be inserted at the target position of the component to be loaded in the framework application, and when the application is started, the corresponding component is loaded at the buried point. The target position of the component of the corresponding type can be identified through the component scanning interface for identifying different component types; for example, when a java web framework is developed, a target position of a component to be loaded in a Servlet type is identified through a ServletProvider interface; and identifying the target position of the component to be loaded of the Filter type to be loaded through a Filter provider interface.
And S208, identifying the component type according to the target position, and acquiring the component to be loaded corresponding to the component type from the preset storage address.
The component type is a type obtained by classifying components, and the programming of the JAVA web mainly comprises three components: servlet, filter and Lister,
the manner of identifying the type of the component to be loaded may include: the method I comprises the following steps: when setting the burial point of the component to be loaded, different burial points can be set according to the type of the component to be loaded. The second method comprises the following steps: when traversing the framework, analyzing the position of the buried point in the framework program to determine the type of the component to be loaded, for example, in a partition of the framework application, a Servlet component in the application is deployed in a certain partition, and when the terminal is located to a target position including the component to be loaded in the partition, the component to be loaded corresponding to the target position is the Servlet type.
After the target position of the component to be loaded and the component type of the component to be loaded are identified, the terminal needs to acquire the component to be loaded, a plurality of components can be constructed firstly during component development, the components can be stored in a preset storage address, and when the component to be loaded in the application is loaded at the terminal, the corresponding component can be acquired from the preset storage address for loading.
S210, loading the component to be loaded to the target position, and continuing the starting operation of the application.
Specifically, after the terminal acquires the component to be loaded, the component to be loaded is loaded into the target position, the loading process of the component is realized, and the application is continuously started and run on the terminal.
According to the component loading method, when the terminal starts the application, the step of component loading is automatically triggered, whether the application contains the component to be loaded is detected, if yes, the operation of application starting is intercepted, the component to be loaded meeting the loading requirement is automatically generated according to the set acquisition logic of the component to be loaded, and the component to be loaded is loaded to the target position, so that the component loading operation in the application is completed. According to the method, through a set of complete component loading logic, the terminal can automatically load the components meeting the loading requirement when starting the application, and can also automatically load the upgraded components when the components are upgraded, so that the loading operation of the components is realized without the need of analyzing, changing, upgrading and the like of codes of each component by technical personnel, and the development and upgrading efficiency of the components can be effectively improved.
In an embodiment, referring to fig. 3, the obtaining of the component to be loaded corresponding to the component type from the preset storage address in step S208 in the component loading method may specifically include the following steps:
s302, obtaining a component sample corresponding to the component type from a preset storage address, wherein the component sample comprises a component configuration item.
The acquisition mode of the component to be loaded is that the terminal acquires a corresponding component sample from the component type issued by the server terminal, and configures the personalized parameter corresponding to the component type to be loaded with the component sample to obtain the component to be loaded. The server side can establish a component sample library management component sample in a preset storage position, for example, a Servlet instance and a Filter instance can be established as the component sample, personalized parameter items in the component sample are null, and the component sample can be stored in the component sample library in a jar packet mode.
The classification may be performed according to the three major components, and a corresponding component sample with a characteristic parameter being null may be set for each classification, for example, a Servlet component sample is set for a Servlet class component, and a Filter component sample is set for a Filter class component. And the realization of the functions of the component samples in different applications can be adjusted by configuring the parameters corresponding to the component configuration items in the component samples.
Optionally, identifying a component configuration item in the obtained component sample by using the parameter discovery interface terminal; such as the listener interface in the spring framework (a software development framework), etc. The component configuration items are parameter items required to be configured individually in the component sample, such as component names, interfaces for component calls and the like.
S304, identifying the component configuration items in the component sample, and acquiring the parameters corresponding to the component configuration items from the established parameter library.
The parameters corresponding to the component to be loaded are component parameters which are pre-configured by the server and are used for the terminal to obtain and configure the component sample, and the parameters can comprise parameters of component names, interface parameters called in the component and the like; when the server pre-configures the parameters corresponding to the component to be loaded, the server may set a correspondence between the parameters and identifiers, such as a function type of the terminal, a framework application installed on the terminal, and the like, a relationship between the parameters and the component sample, and the like, for the terminal to obtain the parameters corresponding to the component to be loaded from the server.
Specifically, the server may establish a parameter library to store all preconfigured parameters, the parameter library may adopt a key-value database, the terminal may access the parameter library, and obtain corresponding parameters from the parameter library according to a component configuration item in the component sample as a key for querying the database.
In addition, the terminal can initialize parameters which do not need to be configured individually, for example, xml contextClass parameters can be directly defined as LufaxXmlWeb applicationContext according to initialization setting.
S306, configuring the acquired parameters to the corresponding component configuration items to obtain the components to be loaded.
Specifically, the terminal adds the acquired parameters to the corresponding position of the component sample to obtain the component to be loaded which needs to be loaded to the target position at this time.
In the above-mentioned example of the spring framework, the configuration of the component configuration item may be implemented by a defined contextclass () function, that is, the parameter corresponding to the parameter in the parentheses is obtained from the parameter library by the contextclass () function, and the corresponding parameter is returned by the function, so as to complete the parameter configuration.
In the above embodiment, after the terminal obtains the component sample, the personalized configuration may be performed on the component configuration item to be configured in the component sample according to the above method.
In an embodiment, after acquiring the parameters corresponding to the component configuration items from the established parameter library in step S304 in the component loading method, the method may further include: when the parameter library does not comprise parameters corresponding to the component configuration items, generating a newly added parameter request; and sending the new parameter adding request to the server, so that the server adds the parameters corresponding to the component configuration items in the parameter library.
The new parameter request is a request which is sent to the server by the terminal and enables the server to increase parameters in the parameter library; the new parameter request can comprise information used for identifying the parameter to be added by the server; for example, the parameters correspond to component samples, component configuration items, framework applications running on the terminal, and the like.
Specifically, when the terminal obtains the parameters corresponding to the component configuration items from the parameter library of the server, if the parameter library does not store the parameters meeting the configuration requirement, the terminal may generate a new parameter request for enabling the server to add corresponding parameters to the parameter library, and after receiving the new configuration request, the server may add the parameters corresponding to the new configuration request to the parameter library after auditing the request.
In the above embodiment, for the parameters not covered in the parameter library, the terminal may trigger the server to add the corresponding parameters in the parameter library through a new parameter adding request, so as to implement the online feedback from the terminal to the server.
In an embodiment, before identifying the component configuration item in the component sample in step S304 in the above component loading method, the method may further include: injecting component configuration items in the component sample according to preset injection rules; step S304 identifies component configuration items in the component sample, which may include: and identifying the injected component configuration items according to a preset identification rule corresponding to the preset injection rule.
The preset injection rule is a new rule for component configuration which can be discovered by a parameter interface and is injected into the component sample when the server generates the component sample; when the server generates the component sample, the server needs to inject the component configuration item which can be identified by the terminal into the component sample through the preset injection rule. For example, the preset injection rules in the spring framework may include: configuration placeholder injection rules, SPEl (Spring Expression Language) injection rules, and configuration prefix injection rules. When the terminal identifies the injected component configuration item through the parameter discovery interface, the identification rule can be set according to the programming logic corresponding to the preset injection rule, namely the preset identification rule.
For example, configuration placeholder injection rules: defining in the component sample < property name = "maxIdle" Value = "$ { MAX _ IDLE }"/>, or @ Value ("$ { MAX _ IDLE }"); the terminal acquires specific parameter values of the maxidles from a parameter library to configure the component samples.
SPEl (Spring Expression Language) injection rule: propertyname = "maxIdle" Value = "# { MAX _ IDLE }" or @ Value ("# { MAX _ IDLE }"); likewise, MAX _ IDLE is a component configuration item.
Configuring a prefix injection rule: defining a configuration prefix through a config-prefix XML attribute; the configuration prefix + component property name form a component configuration item. And intercepting Spring to create a Bean process corresponding to the configuration prefix injection rule, wherein the injected component configuration item is Bean PropertyName, the Bean is a configuration prefix, the PropertyName is a component attribute name, and if the configuration item of the prefix plus the component attribute name is detected, the component attribute name is a component configuration item.
In the above embodiment, the component configuration item is injected into the component sample according to the preset injection rule, and the terminal identifies the component configuration item according to the preset identification rule corresponding to the preset injection rule.
In an embodiment, the injecting the component configuration item in the component sample according to the preset injection rule in the component loading method may include: acquiring a configuration item to be injected and acquiring a configuration prefix corresponding to the configuration item to be injected; a configuration prefix is injected in the component sample. The step of identifying the injected component configuration item according to a preset identification rule corresponding to the preset injection rule may include: component configuration items in the component sample are identified according to the configuration prefix.
Where the configuration prefix is a prefix used for parameter discovery interface identification, such as a Bean in the example above.
Specifically, when the server injects the component configuration item into the component sample, it preferably injects the component configuration item according to the prefix of the configuration item, that is, the component configuration item is formed in the form of configuration prefix + component attribute name. The terminal may be enabled to directly scan component property names in the component sample to identify component configuration items.
In the above embodiment, a prefix injection manner is adopted, and developers do not need to understand the number and the types of the component configuration items, and only need to understand the prefixes, so that automatic configuration management can be realized, the requirements on the developers are low, and the configuration of operation and maintenance personnel is more reliable.
In an embodiment, after the starting operation of the application in step S210 in the component loading method, the method may further include: receiving a component updating notice, wherein the component updating notice comprises information to be updated; and when a hot updating instruction is received, updating the corresponding component according to the information to be updated.
The component update notification is a message that a configuration item or a component sample and the like in a component are updated after a terminal starts an application; the component update notification is a message which is triggered on the server when a version update occurs to a component sample stored in the server or a parameter in the parameter library is changed, and is used for updating the configured component on the terminal. The component update notification should include information to be updated of the component to be updated, such as the component to be updated and the content of the component update.
The hot update instruction is an instruction for performing a component update operation during the application start process, and may be sent by the server to the terminal, or may be an instruction input by the user and received by the terminal.
Specifically, if the version of the component sample stored in the server is updated or the parameters in the parameter library are changed, the server is triggered to generate a component update notification, the server sends the component update notification to the terminal loaded with the current update component, and after the terminal receives the component update notification, if a user issues a hot update instruction to the terminal, or the server sends the hot update instruction to the terminal, the terminal starts the current component update operation. In addition, if the terminal does not receive the hot update instruction, the update operation of the component can be performed when the terminal starts the application next time.
In the above embodiment, if the server side updates the configuration or version of the component, it may determine whether to trigger the terminal to perform a hot update on the corresponding component according to the priority of the update content or an instruction of the terminal user.
In an embodiment, after the step S204 detects whether the application includes the component to be loaded, the method may further include: and when the application contains the component to be loaded, continuing the starting operation of the application.
Specifically, if it is detected in step S204 that the application does not include a component to be loaded, the application is directly started without intercepting the start of the application.
In this embodiment, an application that does not include a component to be loaded is directly started.
It should be understood that although the various steps in the flow charts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided a component loading apparatus including: the system comprises a starting instruction receiving module 100, a detecting module 200, an intercepting module 200, a component obtaining module 300 and a component loading module 500, wherein:
the starting instruction receiving module 100 is configured to receive a starting instruction and trigger a starting operation of an application according to the starting instruction.
The detecting module 200 is configured to detect whether an application includes a component to be loaded.
The intercepting module 300 is configured to intercept a starting operation of the application when the application includes a component to be loaded, and locate a target position of the component to be loaded in the application.
The component obtaining module 400 is configured to identify a component type according to the target location, and obtain a component to be loaded corresponding to the component type from a preset storage address.
And the component loading module 500 is configured to load the component to be loaded to the target location, and continue the start operation of the application.
In an embodiment, the component obtaining module 400 in the component loading apparatus may include:
and the component sample acquisition unit is used for acquiring a component sample corresponding to the component type from a preset storage address, wherein the component sample comprises a component configuration item.
And the parameter acquisition unit is used for identifying the component configuration items in the component sample and acquiring the parameters corresponding to the component configuration items from the established parameter library.
And the component configuration unit is used for configuring the acquired parameters into the corresponding component configuration items to obtain the components to be loaded.
In one embodiment, the component loading apparatus may further include:
and the newly added request module is used for generating a newly added parameter request when the parameter corresponding to the component configuration item is not included in the parameter library.
And the parameter adding module is used for sending the parameter adding request to the server so as to enable the server to add the parameters corresponding to the component configuration items in the parameter library.
In one embodiment, the component loading apparatus may further include:
and the configuration item injection module is used for injecting the component configuration items into the component sample according to a preset injection rule.
The parameter obtaining unit may be further configured to: and identifying the injected component configuration items according to a preset identification rule corresponding to the preset injection rule.
In one embodiment, the configuration item injection module may include:
and the prefix acquisition unit is used for acquiring the configuration item to be injected and acquiring the configuration prefix corresponding to the configuration item to be injected.
And the prefix injection unit is used for injecting the configuration prefix in the component sample.
The parameter obtaining unit may be further configured to: component configuration items in the component sample are identified according to the configuration prefix.
In an embodiment, the component loading apparatus may further include:
and the updating notification receiving module is used for receiving the component updating notification, and the component updating notification comprises the information of the component to be updated.
And the updating module is used for updating the corresponding component according to the information to be updated when the hot updating instruction is received.
In one embodiment, the component loading apparatus may further include:
and the direct starting module is used for continuing the starting operation of the application when the application comprises the component to be loaded.
For specific limitations of the component loading device, reference may be made to the above limitations of the component loading method, which are not described herein again. The modules in the component loading apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run on the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a component loading method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a starting instruction, and triggering the starting operation of the application according to the starting instruction; detecting whether an application comprises a component to be loaded; when the application comprises a component to be loaded, intercepting the starting operation of the application and positioning the target position of the component to be loaded in the application; identifying the component type according to the target position, and acquiring a component to be loaded corresponding to the component type from a preset storage address; and loading the component to be loaded to the target position, and continuing the starting operation of the application.
In one embodiment, the obtaining of the component to be loaded corresponding to the component type from the preset storage address when the processor executes the computer program includes: acquiring a component sample corresponding to the component type from a preset storage address, wherein the component sample comprises a component configuration item; identifying the component configuration items in the component sample, and acquiring parameters corresponding to the component configuration items from the established parameter library; and configuring the acquired parameters into corresponding component configuration items to obtain the component to be loaded.
In one embodiment, after the processor obtains the parameters corresponding to the component configuration items from the established parameter library when executing the computer program, the method further includes: when the parameter library does not comprise parameters corresponding to the component configuration items, generating a newly added parameter request; and sending the new parameter adding request to the server, so that the server adds the parameters corresponding to the component configuration items in the parameter library.
In one embodiment, the identifying component configuration items in the component sample, as implemented by the processor when executing the computer program, further comprises: injecting component configuration items in the component sample according to preset injection rules; identifying component configuration items in a sample of components implemented by a processor executing a computer program, comprising: and identifying the injected component configuration items according to a preset identification rule corresponding to the preset injection rule.
In one embodiment, the injecting, by a processor when executing a computer program, a component configuration item in a component sample according to a preset injection rule includes: acquiring a configuration item to be injected and acquiring a configuration prefix corresponding to the configuration item to be injected; injecting a configuration prefix in the component sample; identifying the injected component configuration item according to a preset identification rule corresponding to a preset injection rule, which is implemented when the processor executes the computer program, includes: component configuration items in the component sample are identified according to the configuration prefix.
In one embodiment, after the starting operation of the continuation application implemented when the processor executes the computer program, the method further includes: receiving a component updating notice, wherein the component updating notice comprises information of a component to be updated; and when a hot updating instruction is received, updating the corresponding component according to the information to be updated.
In one embodiment, after the processor detects whether the application includes the component to be loaded when executing the computer program, the method further includes: and when the application contains the component to be loaded, continuing the starting operation of the application.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a starting instruction, and triggering the starting operation of the application according to the starting instruction; detecting whether an application comprises a component to be loaded; when the application comprises a component to be loaded, intercepting the starting operation of the application and positioning the target position of the component to be loaded in the application; identifying the component type according to the target position, and acquiring a component to be loaded corresponding to the component type from a preset storage address; and loading the component to be loaded to the target position, and continuing the starting operation of the application.
In one embodiment, the obtaining of a component to be loaded corresponding to a component type from a preset storage address, which is implemented when a computer program is executed by a processor, includes: acquiring a component sample corresponding to the component type from a preset storage address, wherein the component sample comprises a component configuration item; identifying the component configuration items in the component sample, and acquiring parameters corresponding to the component configuration items from the established parameter library; and configuring the acquired parameters into corresponding component configuration items to obtain the component to be loaded.
In one embodiment, after the computer program is executed by a processor to obtain parameters corresponding to component configuration items from an established parameter library, the method further includes: when the parameter corresponding to the component configuration item is not included in the parameter library, generating a new parameter request; and sending the new parameter adding request to the server, so that the server adds the parameters corresponding to the component configuration items in the parameter library.
In one embodiment, the computer program, when executed by the processor, further comprises, prior to identifying the component configuration item in the component sample: injecting component configuration items in the component sample according to preset injection rules; identifying component configurations in a sample of components implemented by a processor executing a computer program, comprising: and identifying the injected component configuration items according to a preset identification rule corresponding to the preset injection rule.
In one embodiment, the computer program, when executed by a processor, implements injecting component configuration items in a component sample according to preset injection rules, comprising: acquiring a configuration item to be injected and acquiring a configuration prefix corresponding to the configuration item to be injected; injecting a configuration prefix in the component sample; the computer program, when executed by a processor, implements identifying the injected component configuration items according to a preset identification rule corresponding to a preset injection rule, comprising: component configuration items in the component sample are identified according to the configuration prefix.
In one embodiment, the computer program, after being executed by the processor to perform the operation of continuing the launching of the application, further comprises: receiving a component updating notice, wherein the component updating notice comprises information of a component to be updated; and when a hot updating instruction is received, updating the corresponding component according to the information to be updated.
In one embodiment, after the computer program is executed by a processor to detect whether a component to be loaded is included in an application, the method further includes: and when the application contains the component to be loaded, continuing the starting operation of the application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.