Application production method, device, computer equipment and storage medium
By acquiring and analyzing the dependencies between applications, establishing the order of production and judging the cycle, the automated production of banking products is achieved, solving the problem of inefficient production caused by manual intervention, and improving production efficiency.
Patent Information
- Application Number
- CN202110484637.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-30
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2041-04-30
AI Technical Summary
In the development of banking products, due to the dependence between multiple applications, the order of production requires manual intervention and automation cannot be achieved, which seriously affects the production efficiency of product applications.
By obtaining the target nodes and their dependencies for applications to be put into production, establishing the order of production, and determining whether there is a production cycle, and achieving automated production.
It has improved the degree of automation of multi-application production, reduced the work pressure of operation and maintenance personnel, avoided product failures caused by the production cycle, and improved production efficiency.
Smart Images

Figure CN113052707B_ABST
Abstract
Description
Technical Field
[0001] The present invention can be used in the field of financial technology, and in particular, is an application production method, device, computer equipment and storage medium. Background Art
[0002] In order to meet the ever-changing business needs, the speed of product development and release in the banking industry is getting faster and faster. The functional realization of products often requires multiple applications to work together to provide services. Sometimes there are dependencies between these applications. For example, if application A depends on application B, changes to application B may cause changes to application A, and the normal operation of application A depends on application B. However, since the development of each application is relatively independent during the development stage, developers often only develop the applications they are responsible for independently, and do not know the details of the production of other applications that they are not responsible for. In addition, the same product may involve more than a dozen or even dozens of applications, and it is difficult for the same developer to integrate and connect the production process of the entire product line. In this case, the production sequence between multiple applications often requires manual intervention by operation and maintenance personnel, and true automated production cannot be achieved. Therefore, the production efficiency of product applications is seriously affected.
[0003] In view of this, this article aims to provide an application production method, apparatus, computer device and storage medium to solve the problem of low application publishing efficiency in the prior art. Summary of the invention
[0004] In view of the above problems in the prior art, the purpose of this article is to provide an application production method, device, computer equipment and storage medium to solve the problem of low efficiency caused by the inability to automate application production in the prior art.
[0005] In order to solve the above technical problems, the specific technical solutions of this article are as follows:
[0006] In one aspect, this document provides an application production method, comprising:
[0007] Get the target nodes of multiple applications to be put into production;
[0008] Obtaining the dependency relationship between any two target nodes;
[0009] According to the dependency relationship, establishing a production sequence between the target nodes of each application;
[0010] Each of the applications is put into production according to the production sequence.
[0011] Specifically, before putting each of the applications into production according to the production sequence, the method further includes:
[0012] It is determined whether there is a production cycle in the production sequence to determine whether the production sequence is correct.
[0013] Specifically, determining whether there is a production cycle in the production sequence includes:
[0014] Calculating the number of dependent nodes of each target node in the production sequence;
[0015] A target node with zero dependent nodes is obtained as the current node, and the current node is written into the traversed node set; other target nodes except the current node in the production sequence constitute the untraversed node set;
[0016] According to a preset update rule, the number of dependent nodes of the target node in the untraversed node set is updated;
[0017] The target node whose number of dependent nodes after update is zero is used as the new current node until the number of dependent nodes of all target nodes in the untraversed node set is not zero;
[0018] If the untraversed node set is not empty, then there is a production cycle in the production sequence;
[0019] If the untraversed node set is empty, then there is no production cycle in the production sequence.
[0020] Furthermore, the number of dependent nodes of the target node in the untraversed node set is updated according to the preset update rule, as follows:
[0021] Obtaining a target node in the untraversed node set that has a dependency relationship with the current node as a node to be updated;
[0022] The number of dependent nodes of the node to be updated is reduced by one.
[0023] Preferably, the determining whether there is a production cycle in the production sequence further includes:
[0024] When it is determined that there is a production cycle in the production sequence, a production sequence error reminder is sent.
[0025] Further, the putting into production each of the applications according to the production sequence includes:
[0026] Query the commissioning record of each target node in the commissioning sequence, wherein the commissioning record includes the startup basis and commissioning status of each target node;
[0027] The target node whose production status is completed is regarded as the produced node;
[0028] According to the startup basis, the target node located after the already-produced node in the production sequence is put into production.
[0029] Preferably, the production record also includes a production time limit, and the method further includes:
[0030] Get the production start time and production end time of each target node;
[0031] Determine whether a production failure of the target node occurs according to the production start time, the production end time and the production time limit;
[0032] If a failure occurs during the commissioning of the target node, a commissioning failure alarm message is sent.
[0033] On the other hand, this article also provides an application production device, including:
[0034] A first acquisition module is used to acquire target nodes of multiple applications to be put into production;
[0035] A second acquisition module is used to acquire the dependency relationship between any two target nodes;
[0036] A production sequence establishment module, used to establish the production sequence of the target nodes of each application according to the dependency relationship;
[0037] A production module is used to put each of the applications into production according to the production sequence.
[0038] On the other hand, this document also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method steps provided in the above technical solution are implemented.
[0039] On the other hand, this document also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method steps provided by the above technical solution.
[0040] By adopting the above technical scheme, an application commissioning method, device, computer equipment and storage medium described in this article can string the target nodes of each application into the commissioning sequence according to the dependency relationship between the target nodes, execute the application commissioning in the commissioning sequence between the nodes, realize the associated automatic commissioning of multiple applications, and improve the commissioning efficiency.
[0041] In order to make the above and other purposes, features and advantages of this article more obvious and easy to understand, the following specifically cites preferred embodiments and describes them in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of this article or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of this article. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0043] Figure 1 A schematic diagram of the steps of an application production method provided in an embodiment of this invention is shown;
[0044] Figure 2 A schematic diagram of the steps of determining whether there is a production cycle in the production sequence in the embodiment of this article is shown;
[0045] Figure 3 A schematic diagram of the steps of updating the number of dependent nodes of a target node in an untraversed node in an embodiment of this document is shown;
[0046] Figure 4 A schematic diagram of the steps of putting each application into production according to the production sequence in the embodiment of this article is shown;
[0047] Figure 5 A schematic diagram of the structure of an application production device provided in an embodiment of this invention is shown;
[0048] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of this invention is shown.
[0049] Description of the accompanying symbols:
[0050] 10. A first acquisition module;
[0051] 20. Second acquisition module;
[0052] 30. Production sequence establishment module;
[0053] 40. Production module;
[0054] 602. Computer equipment;
[0055] 604, processor;
[0056] 606. Memory;
[0057] 608, driving mechanism;
[0058] 610, input / output module;
[0059] 612. Input devices;
[0060] 614. Output devices;
[0061] 616. Presentation equipment;
[0062] 618. Graphical user interface;
[0063] 620, network interface;
[0064] 622, communication link;
[0065] 624. Communication bus. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of this article to clearly and completely describe the technical solutions in the embodiments of this article. Obviously, the described embodiments are only part of the embodiments of this article, not all of the embodiments. Based on the embodiments of this article, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this article.
[0067] It should be noted that the terms "first", "second", etc. in the specification and claims of this article and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of this article described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product or equipment that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0068] In order to meet the ever-changing business needs, the development and upgrade of product applications in the financial industry are becoming more and more frequent. Quickly completing the update, release and production of products is also one of the important challenges for development and operation personnel. In practice, the functions of a product often rely on the cooperation of multiple applications, and there are often dependencies between these multiple applications. In order to improve product development efficiency and shorten product development cycles, these applications are usually assigned to multiple development teams for collaborative development, and then the applications are connected in series according to the dependencies between the applications for production. However, since a development team only knows the applications it is responsible for developing, it does not know the production details of the applications responsible for other development teams. Therefore, the production sequence between multiple applications requires manual intervention by operation and maintenance personnel, and true automatic production cannot be achieved, which reduces the efficiency of product production. In addition, once the production sequence between multiple applications is wrong, the production sequence of two or more applications will be in an endless loop, which may cause product production failure in serious cases. Therefore, operation and maintenance personnel are required to carefully check the production sequence between applications, which increases the work pressure of operation and maintenance personnel.
[0069] In order to solve the above problems, the embodiments of this article provide an application production method, device, computer equipment and storage medium, which can realize automatic production of products and improve the production efficiency of products. The application production method and device provided in the embodiments of this article can be used in the financial field, and can also be used in any field other than the financial field. Figure 1 This is a schematic diagram of the steps of an application production method provided in the embodiments of this article. This specification provides the method operation steps described in the embodiments or flowcharts, but based on conventional or non-creative labor, more or fewer operation steps may be included. The order of steps listed in the embodiments is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or device product is executed, it can be executed in the order of the methods shown in the embodiments or drawings or in parallel. Specifically, Figure 1 As shown, the method may include:
[0070] S110: Obtain target nodes of multiple applications to be put into production;
[0071] In the embodiments of the present specification, the target node of the application may include a shutdown node and / or a startup node, and a first installation node and / or a second installation node.
[0072] The downtime node can be the time when the previous version of the application stopped running. Financial products are frequently upgraded and iterated. For a product to be put into production, an application may be developed for the first time and there is no previous version. In this case, the application may not have a downtime node. In contrast, the start-up node is the start-up time of the later version of an application. If an application is abandoned after the product is updated, the application may not have a start-up node. If an application is updated when it is put into production here, there are both previous and later versions, and there are both downtime nodes for the previous version and start-up nodes for the later version.
[0073] The first installation node is used to install the batch version of the application, and the second installation node is used to install the online version of the application; the batch version is used to meet the bank's processing needs for batch business, such as the end-of-day batch business, which is the bank's batch processing of all the business of the day at night, recording all the business of the day and changing the account information, etc.; the online version is opposite to the batch version, and is used to meet the bank system's processing needs for business that needs to be processed immediately, such as depositors' deposit and withdrawal business. For some applications, their target node may only have one of the first installation node and the second installation node; it may also include both the first installation node and the second installation node.
[0074] S120: Obtaining the dependency relationship between any two target nodes;
[0075] In the embodiments of this specification, obtaining the dependency relationship between any two target nodes may be obtaining the dependency relationship between target nodes belonging to the same application, or may be the dependency relationship between two target nodes across applications. The dependency relationship between target nodes in the same application is generally: the first installation node and / or the second installation node depends on the shutdown node; the startup node depends on the first installation node and / or the second installation node. The first installation node and the second installation node may be in a serial commissioning relationship (i.e., when both installation nodes exist, one depends on the other), or in a parallel commissioning relationship, i.e., the two installation nodes have no dependency relationship with each other.
[0076] It should be noted that in the embodiments of this specification, the dependency relationship refers to the "coupling" (or close association) relationship between two target nodes. When the target node A1 of application A depends on the target node B2 of application B, the normal operation of the target node A1 of application A depends on the normal operation of the target node B2 of application B. Due to the inherent complexity of business systems, "dependency" between applications is inevitable. The dependency between applications often refers to the calling relationship between applications. Its fundamental manifestation is in the code. For example, if application A depends on application B, then application A can call the API (Application Program Interface) exposed by application B, while application B cannot call the API of application A.
[0077] S130: establishing a production sequence between the target nodes of each of the applications according to the dependency relationship;
[0078] That is, the production sequence is established according to the dependency relationship between all target nodes contained in each application to be put into production: when the target node A1 of application A depends on the target node B2 of application B, the target node B2 must be put into production first and then the target node A1.
[0079] S140: Put the applications into production according to the production sequence.
[0080] Therefore, the application production method provided in the embodiment of this specification sorts out the production order between applications according to the dependency relationship between the target nodes of multiple applications, and then executes the production of applications based on the dependency relationship, without manual intervention, to achieve automation of product production, which is conducive to improving product production efficiency. In addition, in the embodiment of this specification, the application production order is managed based on the dependency relationship between nodes, which has finer granularity and higher management accuracy.
[0081] Preferably, the naming of each target node is standardized in the embodiments of this specification, and the naming rule of the target node is specified as: application name + node name + version number. For example, the name of the shutdown node of application A is Astop20120201, where the version number can be the start time of the target node, and the start time of the shutdown node of application A is February 1, 2012. The name corresponding to the shutdown node is stop; the name corresponding to the startup node is start; the name corresponding to the first installation node is batch; and the name corresponding to the second installation node is online.
[0082] This can avoid the situation where multiple target nodes have the same name, and avoid confusion in the dependency relationship when obtaining the dependency relationship between any two target nodes; it can also reduce the time spent on repeated confirmation between the two parties in the dependency relationship when obtaining the dependency relationship between the target nodes, which is conducive to improving the efficiency of dependency acquisition; under the premise of unified naming rules for target nodes, it is also convenient to establish the production sequence.
[0083] It should be noted that the dependency relationship described in the embodiments of this specification should be a one-way dependency relationship, that is, when target node A1 depends on target node B2, target node B2 should be put into production first and then target node A1; if there is a dependency relationship that target node B2 depends on target node A1 at this time, then the production order at this time is to put target node A1 into production first and then target node B2 into production, that is, the new production order will contradict the previous production order, that is, there will be a production cycle in the production order, which will cause the product production process to be unable to continue. When there is a production cycle in the production order between two or more target nodes, it will cause product production failure in serious cases.
[0084] Since the "dependency" relationship between applications usually refers to the calling relationship between applications, the "dependency" between applications can be bidirectional. For example, application A can call application B, and application B can also call application A in turn.
[0085] In order to solve the problem that the production sequence has an infinite loop and causes the product production failure, in the embodiment of this specification, preferably, before step S140: producing each of the applications according to the production sequence, the method further includes:
[0086] It is determined whether there is a production cycle in the production sequence to determine whether the production sequence is correct.
[0087] like Figure 2 As shown, judging whether there is a production cycle in the production sequence may further include the following steps:
[0088] S210: Calculate the number of dependent nodes of each target node in the production sequence;
[0089] S220: Acquire a target node with zero dependent nodes as the current node, and write the current node into the traversed node set; other target nodes in the production sequence except the current node constitute the untraversed node set;
[0090] The traversed node set may be a storage structure with data storage function such as a queue or a data stack.
[0091] S230: updating the number of dependent nodes of the target node in the untraversed node set according to a preset update rule;
[0092] S240: taking the target node whose number of dependent nodes after update is zero as the new current node, until the number of dependent nodes of all target nodes in the untraversed node set is not zero;
[0093] S250: If the untraversed node set is not empty, then there is a production cycle in the production sequence;
[0094] S260: If the untraversed node set is empty, then there is no production cycle in the production sequence.
[0095] Furthermore, if Figure 3 As shown, step S230: updating the number of dependent nodes of the target node in the untraversed node set according to the preset update rule may include the following steps:
[0096] S310: Acquire a target node in the untraversed node set that has a dependency relationship with the current node as a node to be updated;
[0097] S320: Subtract one from the number of dependent nodes of the node to be updated.
[0098] For example, there is the following production sequence: a→b→c→d;
[0099] That is, target nodes a, b, c, and d are executed sequentially. According to the above explanation of the production order, the dependency relationship between the target nodes is: target node b depends on target node a, target node c depends on target node d, and target node d depends on target node c.
[0100] Then, the number of dependent nodes of each target node in the calculation dependency order is: the number of dependent nodes of target node a is 0; the number of dependent nodes of target nodes b, c and d are all 1.
[0101] Then, a target node (ie, target node a) with zero dependent nodes is obtained as the current node, and the current node is written into the traversed node set; other target nodes (ie, target nodes b, c, and d) constitute the untraversed node set.
[0102] Furthermore, when the number of dependent nodes of the target nodes in the untraversed node set is updated, since only target node b has a dependency relationship with target node a, the number of dependent nodes of target node b is reduced by one, while the number of dependent nodes of other target nodes remains unchanged. After the update, the number of dependent nodes of each target node in the untraversed node set is: the number of dependent nodes of target node b is 0; the number of dependent nodes of target nodes c and d are both 1.
[0103] Perform the next round of traversal: set the target node b as the new current node and write the target node b into the traversed node set; the remaining target nodes c and d constitute the untraversed node set.
[0104] Since the target node c has a dependency relationship with the target node b, the number of dependent nodes of the target node c is reduced by one, while the number of dependent nodes of the target node d remains unchanged; after the update, the number of dependent nodes of the target node c is 0, while the number of dependent nodes of the target node d is still 1.
[0105] Repeat the above traversal process, store the target node c into the traversed node set, and update the number of dependent nodes of the target node d to make its value 0;
[0106] Store the target node d into the traversed node set.
[0107] So far, the number of dependent nodes of all target nodes in the untraversed node set is not 0, and the untraversed node set is empty. Therefore, it can be judged that there is no production cycle in the above production sequence a→b→c→d, and the production sequence is correct, and production can be carried out in this production sequence.
[0108] In the production sequence, the same target node can have dependencies on multiple target nodes. For example, the production sequence is as follows:
[0109]
[0110] That is, the target node n depends on both the target node l and the target node m;
[0111] By calculating the number of dependent nodes of each target node in the above production sequence, we can know that the number of dependent nodes of target nodes j and m is both 0; the number of dependent nodes of target nodes k and l is both 1; and the number of dependent nodes of target node n is 2.
[0112] Therefore, the target nodes j and m are stored in the traversed node set (here, there is no restriction on the order in which the target nodes j and the target nodes m are stored in the traversed node set); the number of dependent nodes of the remaining target nodes is updated, and it is obtained that: the number of dependent nodes of the target node k is 0, the number of dependent nodes of the target node l is 1; the number of dependent nodes of the target node n is 2-1=1.
[0113] Then, the target node k is put into the traversed node set, and the number of dependent nodes of the remaining target nodes is updated again, and the result is: the number of dependent nodes of target node l is 0; the number of dependent nodes of target node n is 1.
[0114] Then put the target node l into the traversed node set, update the number of dependent nodes of the target node n, after the update, the number of dependent nodes of the target node n is 0, and store the target node n into the traversed node set.
[0115] So far, there is no target node whose dependent node is zero in the untraversed node set, and all nodes in the above production sequence have been traversed, which means that the above production sequence has no circular dependency.
[0116] In the embodiments of this specification, it is supported to judge the production order between different target nodes in the same application, and it is also supported to judge the correctness of the production order between multiple target nodes across applications. And it should be noted that when the above production order is judged:
[0117]
[0118] It is correct, and when the production of each application is executed in this production order, since the number of dependent nodes of target node j and target node k is 0, target nodes j and l can be put into production in parallel. Therefore, compared with the existing technology that only puts one target node into production at a time, when the number of target nodes is large, multiple target nodes can be put into production in parallel. In summary, the application production method provided in this application can ensure that the production is carried out in the correct production order while greatly improving the production efficiency.
[0119] In the embodiment of this specification, when step S250: if the untraversed node set is not empty, the production sequence has a production cycle; it also includes:
[0120] Send production sequence error reminder.
[0121] For example, there is the following production sequence: e→f→g→h→f;
[0122] The number of dependent nodes of each target node in the above production sequence is calculated as follows: the number of dependent nodes of target node e is 0; the number of dependent nodes of target node f is 2; the number of dependent nodes of target nodes g and h are both 1.
[0123] Select target node e as the current node, and update the number of dependent nodes of the remaining target nodes. After the update, the number of dependent nodes of each target node in the untraversed node set is as follows: the number of dependent nodes of target nodes f, g and h are all 1.
[0124] At this time, the number of dependent nodes of all target nodes in the untraversed node set is not zero, indicating that the traversal of each target node in the production sequence has been completed.
[0125] However, if the untraversed node set is not empty (the untraversed node set still contains target nodes f, g, and h), then the production sequence has a production cycle. The production sequence e→f→g→h→f is incorrect. At this time, a production sequence error reminder is sent to the developer to remind the developer to check the dependency relationship between the target nodes.
[0126] like Figure 4 As shown, in some feasible embodiments, step S140: putting each of the applications into production according to the production sequence is further:
[0127] S410: querying the commissioning record of each target node in the commissioning sequence, wherein the commissioning record includes the startup basis and commissioning status of each target node;
[0128] The production record is pre-written into a parameter table (or other storage structure) in a standardized editing format. The production record also includes the name of each target node, for example: Astop20120201.
[0129] S420: The target node whose commissioning status is completed is regarded as a commissioned node; and according to the startup basis, the target node located after the commissioned node in the commissioning sequence is commissioned.
[0130] That is, the production sequence is as follows: a→b→c→d; if the production status of the target node is completed, the production steps of target node b are executed according to the start-up basis of target node b. The production of each target node is carried out in sequence.
[0131] The startup basis includes scheduled startup and automatic startup. The scheduled startup can be the absolute scheduled startup time of the target node. For example, the absolute scheduled startup time of target node b is 4:00 on February 1, 2021; when the production status of target node a is completed, no matter when target node a is completed, the production of target node b will be started at 4:00 on February 1, 2021.
[0132] The scheduled start can also be the relative scheduled start time of the target node. For example, the relative scheduled start time of target node b is x minutes (or hours) after the target node a is completed and put into production. When the production status of target node a is completed, the target node b will be started and put into production x minutes (or hours) after its completion.
[0133] When the relative scheduled start time of the target node b is 0 minutes after the target node a is put into production, the start basis of the target node is automatic start.
[0134] In order to monitor the commissioning status of each target node, in the embodiment of this specification, preferably, the commissioning record may also include a commissioning time limit, and the method may further include:
[0135] S510: Obtaining the production start time and production end time of each target node;
[0136] When the startup basis of the subsequent target node is automatic startup, it can be considered that the production start time of the subsequent target node is the production end time of the preceding target node, and the subsequent target node depends on the preceding target node.
[0137] S520: Determine whether a production failure of the target node occurs according to the production start time, the production end time, and the production time limit;
[0138] The production deadline can be the estimated time required for the target node to complete production. The actual production time of the target node can be calculated based on the production end time and the production start time. The actual production time is compared with the production deadline to determine whether the target node has timed out.
[0139] S530: If a failure occurs during the production of the target node, a production failure alarm message is sent.
[0140] In some feasible embodiments, it is also possible to determine whether the commissioning of the target node fails based on the startup basis of the target node. For example, in the commissioning sequence a→b→c→d, the commissioning basis of target node b is the scheduled startup at 4:00 on February 1, 2021; if target node b is still not started at the target time, it may be that the commissioning of the target node a on which it depends has failed, or it may be that its own commissioning has failed, so a commissioning failure alarm message is sent to remind the development and operation personnel to check the target nodes a and b.
[0141] When the target node has been put into production, the method provided in the embodiment of this specification further includes: updating the production status of the target node from unfinished to completed, so as to determine whether the application has been released according to the completion status of each target node.
[0142] In summary, the application commissioning method provided in the embodiments of this specification can string the target nodes of the application into the commissioning sequence according to the dependency relationship, execute the application commissioning in the commissioning sequence between the nodes, realize the associated automatic commissioning of multiple applications, and improve the commissioning efficiency; and can also check whether the commissioning sequence is correct, so as to remind the operation and maintenance personnel to make timely adjustments and improvements to the dependency relationships of the target nodes with errors in the commissioning sequence, so as to avoid the situation where multiple application commissioning cycles are stuck.
[0143] like Figure 5As shown, in the embodiment of this specification, an application production device is also provided, including:
[0144] A first acquisition module 10 is used to acquire target nodes of multiple applications to be put into production;
[0145] A second acquisition module 20, used to acquire a dependency relationship between any two target nodes;
[0146] A production sequence establishing module 30, used to establish the production sequence of the target nodes of each application according to the dependency relationship;
[0147] The production module 40 is used to produce each of the applications according to the production sequence.
[0148] The beneficial effects obtained by the device provided in the embodiments of this specification are consistent with the beneficial effects obtained by the above method and will not be repeated here.
[0149] like Figure 6 As shown, a computer device provided in an embodiment of the present invention, the computer device 602 may include one or more processors 604, such as one or more central processing units (CPUs), each of which may implement one or more hardware threads. The computer device 602 may also include any memory 606, which is used to store any kind of information such as code, settings, data, etc. Non-restrictive, for example, the memory 606 may include any one or more combinations of the following: any type of RAM, any type of ROM, flash memory device, hard disk, optical disk, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent a fixed or removable component of the computer device 602. In one case, when the processor 604 executes an associated instruction stored in any memory or a combination of memories, the computer device 602 may perform any operation of the associated instruction. The computer device 602 also includes one or more drive mechanisms 608 for interacting with any memory, such as a hard disk drive mechanism, an optical disk drive mechanism, etc.
[0150] The computer device 602 may also include an input / output module 610 (I / O) for receiving various inputs (via input devices 612) and for providing various outputs (via output devices 614). A specific output mechanism may include a presentation device 616 and an associated graphical user interface (GUI) 618. In other embodiments, the input / output module 610 (I / O), the input device 612, and the output device 614 may not be included, and the computer device 602 may be used as a computer device in a network. The computer device 602 may also include one or more network interfaces 620 for exchanging data with other devices via one or more communication links 622. One or more communication buses 624 couple the components described above together.
[0151] The communication link 622 may be implemented in any manner, for example, through a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 622 may include any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc. governed by any protocol or combination of protocols.
[0152] Corresponds to Figure 1-Figure 4 The method in this article also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are executed.
[0153] The embodiment of the present invention also provides a computer readable instruction, wherein when the processor executes the instruction, the program therein causes the processor to execute the following Figures 1 to 4 The method shown.
[0154] It should be understood that in the various embodiments of this document, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this document.
[0155] It should also be understood that in the embodiments of this document, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects before and after are in an "or" relationship.
[0156] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this article.
[0157] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0158] In the several embodiments provided herein, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or can be electrical, mechanical or other forms of connection.
[0159] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of this article.
[0160] In addition, each functional unit in each embodiment of this invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
[0161] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this article is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of this article. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0162] Specific embodiments are used in this article to illustrate the principles and implementation methods of this article. The description of the above embodiments is only used to help understand the methods and core ideas of this article. At the same time, for general technicians in this field, according to the ideas of this article, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on this article.
Claims
1. An application production method, characterized in that: include: Acquire target nodes of multiple applications to be put into production, wherein the target nodes include shutdown nodes and / or startup nodes, and first installation nodes for installing batch versions of applications and / or second installation nodes for installing online versions of applications; Obtaining the dependency relationship between any two target nodes; According to the dependency relationship, establishing a production sequence between the target nodes of each application; Determine whether there is a production cycle in the production sequence to determine whether the production sequence is correct: calculate the number of dependent nodes of each target node in the production sequence; Obtain a target node with zero dependent nodes as the current node, and write the current node into the traversed node set; The other target nodes except the current node in the production sequence constitute an untraversed node set; according to a preset update rule, the number of dependent nodes of the target node in the untraversed node set is updated; the target node whose number of dependent nodes after the update is zero is used as the new current node, until the number of dependent nodes of all target nodes in the untraversed node set is not zero; If the untraversed node set is not empty, then the production sequence has a production cycle; if the untraversed node set is empty, then the production sequence does not have a production cycle; Each of the applications is put into production according to the production sequence.
2. The method according to claim 1, characterized in that The updating of the number of dependent nodes of the target node in the untraversed node set according to the preset updating rule is further as follows: Obtaining a target node in the untraversed node set that has a dependency relationship with the current node as a node to be updated; The number of dependent nodes of the node to be updated is reduced by one.
3. The method according to claim 2, characterized in that The determining whether there is a production cycle in the production sequence further includes: When it is determined that there is a production cycle in the production sequence, a production sequence error reminder is sent.
4. The method according to claim 1, characterized in that: The putting into production each of the applications according to the production sequence is further: Query the commissioning record of each target node in the commissioning sequence, wherein the commissioning record includes the startup basis and commissioning status of each target node; The target node whose production status is completed is regarded as the produced node; According to the startup basis, the target node located after the already-produced node in the production sequence is put into production.
5. The method according to claim 4, characterized in that The production record also includes a production time limit, and the method further includes: Get the production start time and production end time of each target node; Determine whether a production failure of the target node occurs according to the production start time, the production end time and the production time limit; If a failure occurs during the commissioning of the target node, a commissioning failure alarm message is sent.
6. An application production device, characterized in that: include: A first acquisition module is used to acquire target nodes of multiple applications to be put into production, wherein the target nodes include shutdown nodes and / or startup nodes, and first installation nodes for installing batch versions of applications and / or second installation nodes for installing online versions of applications; A second acquisition module is used to acquire the dependency relationship between any two target nodes; A production sequence establishment module, used to establish the production sequence of the target nodes of each application according to the dependency relationship; A judgment module is used to judge whether there is a production cycle in the production sequence, so as to judge whether the production sequence is correct: calculating the number of dependent nodes of each target node in the production sequence; Obtain a target node with zero dependent nodes as the current node, and write the current node into the traversed node set; The other target nodes except the current node in the production sequence constitute an untraversed node set; according to a preset update rule, the number of dependent nodes of the target node in the untraversed node set is updated; the target node whose number of dependent nodes after the update is zero is used as the new current node, until the number of dependent nodes of all target nodes in the untraversed node set is not zero; If the untraversed node set is not empty, then the production sequence has a production cycle; if the untraversed node set is empty, then the production sequence does not have a production cycle; A production module is used to put each of the applications into production according to the production sequence.
7. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
