CN112783568B - Initialization method, device, equipment and storage medium of application program - Google Patents

Initialization method, device, equipment and storage medium of application program Download PDF

Info

Publication number
CN112783568B
CN112783568B CN202110036870.4A CN202110036870A CN112783568B CN 112783568 B CN112783568 B CN 112783568B CN 202110036870 A CN202110036870 A CN 202110036870A CN 112783568 B CN112783568 B CN 112783568B
Authority
CN
China
Prior art keywords
initialization
dependency
dependency graph
target
graph
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110036870.4A
Other languages
Chinese (zh)
Other versions
CN112783568A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110036870.4A priority Critical patent/CN112783568B/en
Publication of CN112783568A publication Critical patent/CN112783568A/en
Application granted granted Critical
Publication of CN112783568B publication Critical patent/CN112783568B/en
Active 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

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 embodiment of the application provides an initialization method, device, equipment and storage medium of an application program. The method comprises the following steps: determining a first dependency graph according to the dependency of at least one service module in the application program, wherein the first dependency graph comprises first initialization objects corresponding to the service modules; generating a second initialization object corresponding to the initialization constraint condition of the target business module; the target business module is a business module which needs to meet the initialization constraint condition when being initialized in at least one business module; and according to the dependency relationship, adding a second initialization object in the first dependency relationship graph to obtain a second dependency relationship graph, and operating the second dependency relationship graph. According to the embodiment of the application, the constraint condition is converted into the initialized object in the dependency relationship graph and the dependency relationship is readjusted, so that business logic interaction can be realized when the application program is initialized, the clear business dependency structure can be ensured, the maintenance cost of the initialized logic is greatly reduced, and the robustness of the program is improved.

Description

Initialization method, device, equipment and storage medium of application program
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an application program initialization method, device, equipment and storage medium.
Background
In a complex application, functional modules inside the application usually have dependency relationships with each other, and initialization work is usually performed when the application is started.
In the related art, the dependency relationship in the application program is regarded as a graph, for example, modules a, B, C, D, and E have dependency relationships in sequence, modules B depend on a, C depend on B, D depend on C, and E depend on D, and are initialized according to the sequence of a, B, C, D, and E, and the precondition for determining whether a certain module is initialized is whether the dependent front-end module is initialized.
When the dependency relationship between modules needs to be further determined by considering the constraint of the business logic, the constraint condition needs to be written in the corresponding task for initializing the module, for example, as shown in fig. 1, the constraint condition a needs to be satisfied when initializing C, but a task D subsequently dependent on the task C continues initialization regardless of the result of the constraint condition, and the initialization process cannot be interrupted, and if the constraint condition a is not satisfied, C is not initialized, and the initialization of D is also performed, which may cause a program running error.
Disclosure of Invention
The embodiment of the application provides an initialization method, device, equipment and storage medium of an application program, so as to realize initialization of the application program and improve robustness of the application program.
In a first aspect, an embodiment of the present application provides an initialization method for an application program, including:
determining a first dependency graph according to the dependency of at least one service module in the application program, wherein the first dependency graph comprises first initialization objects corresponding to the service modules;
generating a second initialization object corresponding to the initialization constraint condition of the target business module; the target business module is a business module which needs to meet the initialization constraint condition when the business module is initialized;
and according to the dependency relationship, adding the second initialization object in the first dependency relationship diagram to obtain a second dependency relationship diagram, and operating the second dependency relationship diagram.
In a second aspect, an embodiment of the present application provides an apparatus for initializing an application program, including:
the determining module is used for determining a first dependency graph according to the dependency of at least one service module in the application program, wherein the first dependency graph comprises first initialization objects corresponding to the service modules;
the generating module is used for generating a second initialization object corresponding to the initialization constraint condition of the target business module; the target business module is a business module which needs to meet the initialization constraint condition when the business module is initialized;
and the processing module is used for adding the second initialization object in the first dependency graph according to the dependency relationship to obtain a second dependency graph and operating the second dependency graph.
In a third aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method of any one of the first aspect.
In a fourth aspect, an embodiment of the present application provides an electronic device, including:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of the first aspects via execution of the executable instructions.
In a fifth aspect, the present application provides a computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of the first aspect.
According to the initialization method, the initialization device, the initialization equipment and the storage medium of the application program, a first dependency graph is determined according to the dependency of at least one service module in the application program, and the first dependency graph comprises first initialization objects corresponding to the service modules; generating a second initialization object corresponding to the initialization constraint condition of the target business module, namely converting the constraint condition with business logic interaction into an initialization object in a dependency graph; the target business module is a business module which needs to meet the initialization constraint condition when being initialized in at least one business module; further, according to the dependency relationship, a second initialization object is added to the first dependency relationship diagram to obtain a second dependency relationship diagram, namely, the dependency relationship in the original first dependency relationship diagram is readjusted, the second dependency relationship diagram is operated to realize initialization of the application program, service logic interaction can be realized when the application program is initialized, the definition of a service dependency structure can be ensured, and the robustness of the program is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a first schematic diagram of an initialization principle provided in the related art;
FIG. 2 is a schematic diagram of a system architecture according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a second initialization principle provided in the related art;
FIG. 4 is a flowchart illustrating an embodiment of an initialization method for an application program provided in the present application;
FIG. 5 is a dependency graph of an embodiment of a method provided herein;
FIG. 6 is a dependency graph of another embodiment of a method provided by the present application;
FIG. 7 is a schematic structural diagram of an embodiment of an apparatus for initializing an application provided in the present application;
fig. 8 is a schematic structural diagram of an embodiment of an electronic device provided in the present application.
With the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terms "comprising" and "having," and any variations thereof, in the description and claims of this application and the drawings described herein are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
First, a part of words and application scenarios related to the embodiments of the present application will be described.
Fig. 2 is a schematic diagram of a system architecture according to an embodiment of the present application. As shown in fig. 2, the system architecture of an embodiment of the present application may include, but is not limited to: electronic device 11 and server 12. The electronic apparatus 11 includes, for example: user equipment such as cell-phone, panel computer, personal computer.
The electronic device 11 and the server 12 may be connected via a network.
The method provided by the embodiment of the application can be realized by an electronic device such as a processor executing corresponding software codes, and can also be realized by an electronic device performing data interaction with a server while executing the corresponding software codes.
In the related art, the dependency relationship in the application program is regarded as a graph, for example, modules a, B, C, D, and E have dependency relationships in sequence, modules B depend on a, C depend on B, D depend on C, and E depend on D, and are initialized according to the sequence of a, B, C, D, and E, and the precondition for determining whether a certain module is initialized is whether the dependent front-end module is initialized.
When the dependency relationship between modules needs to be further determined by considering the constraint of the business logic, the constraint condition needs to be written in the corresponding task for initializing the module, for example, as shown in fig. 1, the constraint condition a needs to be satisfied when initializing C, but a task D subsequently dependent on the task C continues initialization regardless of the result of the constraint condition, and the initialization process cannot be interrupted, and if the constraint condition a is not satisfied, C is not initialized, and the initialization of D is also performed, which may cause a program running error.
For example, as shown in fig. 3, it is determined by if/else logic whether the current module satisfies that the dependent front module has completed initialization before ABCDE initialization. When the dependency relationship between modules needs to be further determined by considering the constraint of service logic, the service logic is added in the if/else for comprehensive judgment, and if a plurality of services need to modify the judgment logic in the original code at a plurality of places, the constraint conditions are more and more, the structure is unclear, and the maintenance cost is higher.
According to the method, the constraint conditions are converted into the initialized objects in the dependency relationship graph and the dependency relationship is readjusted, so that business logic interaction can be achieved when the application program is initialized, the business dependency structure can be clear, the maintenance cost of the initialized logic is greatly reduced, and the robustness of the program is improved.
The technical solution of the present application will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 4 is a flowchart illustrating an embodiment of an initialization method of an application program provided in the present application. As shown in fig. 4, the method provided in this embodiment includes:
step 101, determining a first dependency graph according to a dependency of at least one service module in an application program, wherein the first dependency graph comprises first initialization objects corresponding to the service modules.
Specifically, the dependency relationship of the plurality of service modules may be represented by a first dependency relationship diagram, where each first initialization object in the first dependency relationship diagram corresponds to a service module.
For example, as shown in fig. 5, each node in the graph represents a first initialization object corresponding to a service module; the arrows connecting between nodes represent dependencies. The first initialization object B depends on the first initialization object A, the first initialization object C depends on the first initialization object B, the first initialization object D depends on the first initialization object C, the first initialization object E depends on the first initialization object D, the first initialization object F depends on the first initialization object C, and the first initialization object G depends on the first initialization objects D and F.
102, generating a second initialization object corresponding to the initialization constraint condition of the target business module; the target business module is a business module which needs to meet the initialization constraint condition when in initialization in at least one business module.
Specifically, in order to make the initialization constraint condition capable of constraining the start of the first initialization object rather than constraining the first initialization object to perform initialization, any initialization constraint condition formed through business interaction may be converted into a second initialization object and a suitable position is found to be inserted into the first dependency graph, so as to obtain the second dependency graph. For example, the initialization object B depends on the initialization object a, and the constraint S limits the initialization of B, as shown in fig. 6, the constraint S is inserted between the initialization objects a and B as an initialization object, and becomes the initialization object B depends on the initialization object S, while the initialization object S depends on a.
And 103, adding a second initialization object in the first dependency graph according to the dependency relationship to obtain a second dependency graph, and operating the second dependency graph.
Specifically, when adding the second initialization object corresponding to the initialization constraint condition to the first dependency graph, the original dependency relationship needs to be considered, that is, the first initialization object having a dependency relationship with the second initialization object in the first dependency graph is determined, and finally, the dependency relationship in the original first dependency graph is adjusted before inserting the second initialization object into the first initialization object of the target service module corresponding to the initialization constraint condition in the first dependency graph, so as to obtain the second dependency graph.
And running the second dependency graph, namely running each initialization object in the second dependency graph, executing the initialization of the first initialization object, and/or determining whether the initialization constraint condition corresponding to the second initialization object is met, so as to realize the initialization of each first initialization object in the second dependency graph, namely realize the initialization of the application program.
The execution of the initialization object subsequent to the second initialization object depends on the execution result of the second initialization object, i.e. the subsequent behavior is determined according to the execution result of the second initialization object. For example, when the constraint condition is satisfied, the initialization object S is normally ended, and the initialization object B is operated. When the constraint condition is not satisfied, the initialization object S may choose to wait or throw an exception to interrupt the execution of subsequent initializations in the second dependency graph.
The method of this embodiment determines a first dependency graph according to a dependency relationship of at least one service module in an application program, where the first dependency graph includes first initialization objects corresponding to the service modules; generating a second initialization object corresponding to the initialization constraint condition of the target business module, namely converting the constraint condition with business logic interaction into an initialization object in a dependency graph; the target business module is a business module which needs to meet the initialization constraint condition when in initialization in at least one business module; further, according to the dependency relationship, a second initialization object is added to the first dependency relationship diagram to obtain a second dependency relationship diagram, namely, the dependency relationship in the original first dependency relationship diagram is readjusted, the second dependency relationship diagram is operated to realize initialization of the application program, service logic interaction can be realized when the application program is initialized, the definition of a service dependency structure can be ensured, and the robustness of the program is improved.
In an embodiment, the content of the second initialization object is to determine whether the initialization constraint condition of the target business module is satisfied, and the first prefix object on which the second initialization object depends is: a second pre-object, on which a first initialization object corresponding to a target service module in the first dependency graph depends, is, where the first post-object that depends on the second initialization object is: and the first initialization object corresponds to the target business module in the first dependency graph.
In an embodiment, a Node may be defined for describing an initialization object in a dependency graph, where the Node includes at least one attribute information, one is a front Node set frontNodes, which indicates a Node set on which the Node depends, and a back Node set afterNodes, which indicates a Node set on which the Node depends. The node corresponds to two behaviors, where one start indicates that the node starts, i.e., starts executing the contents of the node, and another run indicates that the contents of the node are executed, e.g., initialized.
The initialization object can be defined by a Java class and is used for describing the property and the behavior of the initialization object.
Specifically, the dependency relationship between the initialization objects can be controlled by the front object (i.e. front node set front nodes) and the back object (i.e. back node set aft nodes) of each initialization object. Initializing property information of the object, including at least one of: identification ID, pre-object information, post-object information.
In order for the constraints to be able to constrain the initiation of a node rather than the execution of a constraint node, any constraints formed by business interactions can be translated into a node and find a suitable location insertion. For example, node B depends on node a, and constraint S limits the initialization of B, we insert constraint S as a node between nodes a and B, becoming node B dependent on node S, and node S dependent on a. And after the S node is executed, determining subsequent behaviors according to an execution result. For example, when the constraint condition is satisfied, the S node ends normally and the B node operates. When the constraint condition is not satisfied, the S node can choose to wait or throw the running state of the abnormal interrupt dependency graph.
For example, as shown in fig. 6, the second initialization object is a constraint S, the first pre-object that the second initialization object S depends on is an initialization object a, and the first post-object that depends on the second initialization object S is an initialization object B, that is, an initialization object corresponding to the constraint.
In an embodiment, the second initialization object may be generated through an addRestrictions (Node) whose first parameter is a Node ID that needs to add a constraint condition, that is, an ID of the first initialization object corresponding to the target service module, such as an ID of a Node B, and the second parameter is a content body runnable that needs to be executed after the constraint condition is converted into a Node, and invoking a run method of runnable can execute the content defined by the content body, that is, determine whether the constraint condition is satisfied. The front Node set frontNodes and/or back Node set afterNodes data of the Node can be reconstructed through the execution of the function.
In an embodiment, the following operations may be further performed after the second initialization object is added:
respectively updating attribute information of a first preposed object which is depended by the second initialized object and attribute information of a first postpositional object which is depended by the second initialized object; the attribute information includes: pre-object information and/or post-object information.
Optionally, the update may be performed as follows:
updating a second post object dependent on the first pre object to the second initialization object;
and updating a second preposed object which is depended by the first postposed object into the second initialized object.
Specifically, as shown in fig. 6, the first pre-object in the original first dependency graph, that is, the second post-object that depends on the initialization object a, is updated to be the second initialization object S.
And updating a first post-positioned object in the original first dependency relationship graph, namely a second pre-positioned object on which the initialization object B depends, into a second initialization object S.
In the above embodiment, the constraint condition is converted into the initialized object in the dependency graph and the dependency is readjusted, so that the service logic interaction can be realized when the application program is initialized, the clear service dependency structure can be ensured, and the robustness of the program is improved.
In an embodiment, the "running the second dependency graph" in step 103 may be specifically implemented by:
determining whether the second dependency graph is a directed acyclic graph;
and if not, running the second dependency graph.
In an embodiment, the dependency graph may be executed through a function start (node), whether the dependency graph is a directed acyclic graph is detected, if yes, a first node in the dependency graph starts to be started, and each initialized object is executed according to a dependency relationship of each initialized object in the second dependency graph.
The dependency relationship of the internal nodes of the dependency relationship graph can be simple or complicated, but as long as no cyclic dependency exists among the internal nodes, the graph is considered to be a directed acyclic graph, and the dependency relationship graph has feasibility of execution.
In an embodiment, for any target initialization object in the second dependency graph, the feasibility of execution may be determined as follows:
determining whether an initialization object before the target initialization object is included in the post-objects of the target initialization object;
if not, determining whether the initialization object behind the target initialization object is included in the preposed object of the target initialization object;
if not, determining that the second dependency graph is a directed acyclic sequence.
Specifically, for example, when node C depends on node B, node B depends on node a, and node B also depends on node C, then after a starts and finishes executing, it is found that B depends on node B, but the front node of B has a and C, but C can only start until B finishes executing, so that it falls into a dead loop and never starts B. Therefore, the judgment of whether the dependency graph is constructed into a directed acyclic graph is to judge the execution feasibility of the dependency graph.
The target initialization object is any one of the first initialization object and the second initialization object in the second dependency graph.
Detecting whether the dependency graph is a directed acyclic graph or not, wherein the method comprises the steps of traversing the afterNodes of each node from the root node to each layer, and if the afterNodes of the nodes at the lower layer contain the nodes at the upper layer, the dependency graph has problems and is not the directed acyclic graph; and traversing the front nodes of each node upwards from the leaf node, if the front nodes of the upper node comprise the lower node, the dependency graph is problematic and is not a directed acyclic graph.
In the above embodiment, the service module with the dependency relationship in the application program is converted into the directed acyclic graph, so that the execution feasibility of the dependency relationship graph can be ensured, and the robustness of the program is improved.
On the basis of the above embodiment, for any target initialization object in the second dependency graph, the "running the second dependency graph" in step 103 may specifically be implemented in the following manner:
running the target initialization object;
updating a front object of a rear object of the target initialization object to obtain the front object after the rear object is updated;
and if the number of the front objects after the update of the rear objects is zero, operating the rear objects of the target initialization object.
Specifically, the target initialization object is run, and if initialization is performed or whether constraint conditions are met is determined, the target initialization object traverses the post object afterNodes of the target initialization object after execution is completed, removes the corresponding current target initialization object in the front object set frontNodes of the post object, and determines whether the front object set frontNodes of the post object is empty, and if the front object set frontNodes of the post object is empty, the post object is started.
In an embodiment, if the operation condition of the second initialization object is not satisfied, the operation of the post object of the second initialization object is stopped.
Specifically, executing the second initialization object may output an execution result, for example, the execution result is output through a constraint Terminator, and the constraint Terminator may output the following results:
a) And the continue indication is used for representing a continuous execution dependency graph and can be used for identifying the execution ending opportunity of the constraint condition.
b) The constraint indication is used for indicating that the dependency graph is interrupted, for example, a Java runtime exception indication may be thrown, and may also be used for identifying a constraint execution termination opportunity.
c) wait indication, which indicates that execution may be relatively long and further waiting is needed.
According to the method, the business module with the dependency relationship in the application program is converted into the directed acyclic graph, the constraint condition is further converted into the initialized object in the dependency relationship graph, and the dependency relationship is readjusted, so that business logic interaction can be achieved when the application program is initialized, the business dependency structure can be clear, the maintenance cost of the initialized logic is greatly reduced, and the robustness of the program is improved.
Fig. 7 is a structural diagram of an embodiment of an initialization apparatus for an application program provided in the present application, and as shown in fig. 7, the initialization apparatus for an application program of the present embodiment includes:
the determining module is used for determining a first dependency graph according to the dependency of at least one service module in the application program, wherein the first dependency graph comprises first initialization objects corresponding to the service modules;
the generating module is used for generating a second initialization object corresponding to the initialization constraint condition of the target business module; the target business module is a business module which needs to meet the initialization constraint condition when the business module is initialized;
and the processing module is used for adding the second initialization object in the first dependency graph according to the dependency relationship to obtain a second dependency graph and operating the second dependency graph.
The apparatus of this embodiment may be configured to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of an embodiment of an electronic device provided in the present application, and as shown in fig. 8, the electronic device includes:
a processor 120, and a memory 121 for storing executable instructions for the processor 120.
The above components may communicate over one or more buses.
The processor 121 is configured to execute the corresponding method in the foregoing method embodiment by executing the executable instruction, and the specific implementation process thereof may refer to the foregoing method embodiment, which is not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method in the foregoing method embodiment is implemented.
An embodiment of the present application further provides a computer program product, including a computer program, where the computer program is executed by a processor to implement the method according to any one of the foregoing method embodiments, and specific implementation processes thereof may refer to the foregoing method embodiments, which implement similar principles and technical effects, and are not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. An initialization method of an application program, comprising:
determining a first dependency graph according to the dependency of at least one service module in the application program, wherein the first dependency graph comprises first initialization objects corresponding to the service modules;
generating a second initialization object corresponding to the initialization constraint condition of the target service module; the target business module is a business module which needs to meet the initialization constraint condition during initialization in the at least one business module;
and according to the dependency relationship, adding the second initialization object in the first dependency relationship diagram to obtain a second dependency relationship diagram, and operating the second dependency relationship diagram.
2. The method of claim 1,
the content of the second initialization object is to determine whether the initialization constraint condition of the target service module is satisfied, the first front object on which the second initialization object depends is the second front object on which the first initialization object corresponding to the target service module in the first dependency graph depends, and the first rear object on which the second initialization object depends is the first initialization object corresponding to the target service module in the first dependency graph.
3. The method according to claim 1 or 2, wherein after adding the second initialization object to the first dependency graph according to the dependency relationship to obtain a second dependency graph, the method further comprises:
respectively updating attribute information of a first preposed object which is depended by the second initialization object and attribute information of a first postpositional object which is depended by the second initialization object; the attribute information includes: pre-object information and/or post-object information.
4. The method according to claim 3, wherein the updating the attribute information of the first pre-object that the second initialization object depends on and the attribute information of the first post-object that the second initialization object depends on respectively comprises:
updating a second post object which depends on the first pre object to be the second initialization object;
and updating a second front object which the first rear object depends on as the second initialization object.
5. The method of claim 1 or 2, wherein executing the second dependency graph for any target initialization object in the second dependency graph comprises:
running the target initialization object;
updating a front object of a rear object of the target initialization object to obtain the front object after the rear object is updated;
and if the number of the front objects after the update of the rear objects is zero, operating the rear objects of the target initialization object.
6. The method of claim 1 or 2, wherein the executing the second dependency graph comprises:
determining whether the second dependency graph is a directed acyclic graph;
and if so, operating the second dependency graph.
7. The method of claim 6, wherein determining whether the second dependency graph is a directed acyclic graph for any target initialization object in the second dependency graph comprises:
determining whether an initialization object before the target initialization object is included in the post-objects of the target initialization object;
if not, determining whether the initialization object behind the target initialization object is included in the preposed object of the target initialization object;
if not, determining that the second dependency graph is a directed acyclic graph.
8. The method of claim 1 or 2, further comprising:
and if the running condition of the second initialization object is not met, stopping starting the running of the post object of the second initialization object.
9. An apparatus for initializing an application program, comprising:
the determining module is used for determining a first dependency graph according to the dependency of at least one service module in the application program, wherein the first dependency graph comprises first initialization objects corresponding to the service modules;
the generating module is used for generating a second initialization object corresponding to the initialization constraint condition of the target business module; the target business module is a business module which needs to meet the initialization constraint condition when the business module is initialized;
and the processing module is used for adding the second initialization object in the first dependency graph according to the dependency relationship to obtain a second dependency graph and operating the second dependency graph.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 8.
11. A terminal device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-8 via execution of the executable instructions.
CN202110036870.4A 2021-01-12 2021-01-12 Initialization method, device, equipment and storage medium of application program Active CN112783568B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110036870.4A CN112783568B (en) 2021-01-12 2021-01-12 Initialization method, device, equipment and storage medium of application program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110036870.4A CN112783568B (en) 2021-01-12 2021-01-12 Initialization method, device, equipment and storage medium of application program

Publications (2)

Publication Number Publication Date
CN112783568A CN112783568A (en) 2021-05-11
CN112783568B true CN112783568B (en) 2022-12-06

Family

ID=75755363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110036870.4A Active CN112783568B (en) 2021-01-12 2021-01-12 Initialization method, device, equipment and storage medium of application program

Country Status (1)

Country Link
CN (1) CN112783568B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113076129B (en) * 2021-03-23 2023-11-28 成都安恒信息技术有限公司 Automatic checking and processing method for complex configuration dependency relationship
CN114546520B (en) * 2022-01-27 2023-06-09 浪潮通用软件有限公司 Initializing method, device and medium based on SaaS application
CN114564254A (en) * 2022-04-26 2022-05-31 广州世炬网络科技有限公司 Module initialization sequence generation method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442396A (en) * 2019-07-31 2019-11-12 网易(杭州)网络有限公司 Application program launching method and device, storage medium and electronic equipment
CN110554909A (en) * 2019-09-06 2019-12-10 腾讯科技(深圳)有限公司 task scheduling processing method and device and computer equipment
CN110704050A (en) * 2019-10-10 2020-01-17 北京无限光场科技有限公司 Module initialization method, device, electronic equipment and computer readable storage medium
CN111258740A (en) * 2020-02-03 2020-06-09 北京无限光场科技有限公司 Method and device for starting application program and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7181746B2 (en) * 2001-06-29 2007-02-20 Intel Corporation Initialization, reconfiguration, and shut down of a module function
US20060288336A1 (en) * 2005-06-21 2006-12-21 Microsoft Corporation Module initialization
CN111209052A (en) * 2018-11-20 2020-05-29 北京京东尚科信息技术有限公司 Application starting method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110442396A (en) * 2019-07-31 2019-11-12 网易(杭州)网络有限公司 Application program launching method and device, storage medium and electronic equipment
CN110554909A (en) * 2019-09-06 2019-12-10 腾讯科技(深圳)有限公司 task scheduling processing method and device and computer equipment
CN110704050A (en) * 2019-10-10 2020-01-17 北京无限光场科技有限公司 Module initialization method, device, electronic equipment and computer readable storage medium
CN111258740A (en) * 2020-02-03 2020-06-09 北京无限光场科技有限公司 Method and device for starting application program and electronic equipment

Also Published As

Publication number Publication date
CN112783568A (en) 2021-05-11

Similar Documents

Publication Publication Date Title
CN112783568B (en) Initialization method, device, equipment and storage medium of application program
US20190324772A1 (en) Method and device for processing smart contracts
US11797283B2 (en) Application program development and deployment method and apparatus, and computer-readable medium
EP1582985A2 (en) Test case inheritance controlled via attributes
CN110765746B (en) Form automatic generation method and system based on event agent
CN110609755A (en) Message processing method, device, equipment and medium for cross-block chain node
CN111343181A (en) Message processing method and system, data pool and computer readable storage medium
CN111679852B (en) Detection method and device for conflict dependency library
CN112882732A (en) Method and device for updating function codes in Software Development Kit (SDK)
CN114895935A (en) Method and device for flashing vehicle ECU, electronic equipment and storage medium
US20110047526A1 (en) Method and a system for transforming an object model
CN113468212A (en) Event execution method and device and electronic equipment
CN109032612B (en) Interface calling method and device of hybrid application and computer readable storage medium
CN110780863A (en) Cross-platform development method, device, equipment and medium of storage system
CN111625225A (en) Program specified data output method and device
CN109684192B (en) Local test method, device, storage medium and apparatus based on data processing
CN105912468B (en) The method and open platform system of open platform Run Script
CN113791809B (en) Application exception handling method and device and computer readable storage medium
US11537372B2 (en) Generating compilable machine code programs from dynamic language code
CN112579156A (en) Processing system, processing method, processing device and processing equipment of business event
CN111273897A (en) Block chain resource consumption method and device, storage medium and electronic equipment
CN114371852B (en) Compiling method and device
CN113792247B (en) Method, apparatus, device and medium for generating functional flow chart based on code characteristics
CN111176648B (en) Method and device for processing conversion of installation-free program, electronic equipment and storage medium
CN113608841A (en) Cross-platform automatic test script generation method and device

Legal Events

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