Link node processing method and related device

Through automated link node processing methods, we respond to link node abnormal signals, obtain error information and generate repair scripts, solving the problem that link node abnormalities in Devops links require manual repair, and implementing an efficient and automatic repair process.

CN120066838APending Publication Date: 2025-05-30HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510287195.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

In the Devops link, when the link node is abnormal, it requires manual analysis and repair, resulting in high labor costs and low repair efficiency.

Method used

By responding to the link node exception signal, obtaining error information, generating error reports, extracting repair script templates from the script library, generating node repair scripts, and automatically executing repair scripts to repair exceptions.

Benefits of technology

Automatic repair of link nodes is realized, labor costs are reduced, and repair efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120066838A_ABST
    Figure CN120066838A_ABST
Patent Text Reader

Abstract

The invention discloses a link node processing method and a related device, relates to the field of software management, and can obtain error information of an abnormal link node in response to a link node abnormal signal when the link node is abnormal. And generating an error report of the abnormal link node according to parameters contained in the error information. And extracting at least one repair script template associated with the error report from a script library according to the node information of the abnormal link node and the error report. And generating at least one node repair script of the abnormal link node according to the request parameter of the abnormal link node and the at least one repair script template. And finally, executing at least one node repair script to repair the error information, and restarting the execution of the abnormal link node after successful repair. After the link node is abnormal, the whole process from error information acquisition to repair script generation is completed, automatic repair of the abnormal link node is realized, and the repair efficiency is improved while the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of software management, and particularly to a method for processing link nodes and related devices. Background Art

[0002] Devops is a concept that combines Development and Operations in the software life cycle. It mainly makes software construction, testing, and release faster, more frequent, and more reliable through automated processes, making the software delivery process more efficient. It mainly includes automated processes such as continuous integration (CI), continuous delivery (CD), container orchestration, monitoring, and log analysis.

[0003] Although its degree of automation is very high, since the application program needs to go through multiple different nodes during the complete link execution process, some unknown problems may occur at each node, resulting in node exceptions. For the abnormal nodes that occur, currently, technical personnel are required to participate in the analysis, adjustment, and repair of the nodes. This manual repair method not only requires more manpower input but also reduces the repair efficiency. Summary of the Invention

[0004] In view of the above problems, this application provides a method for processing link nodes and related devices to achieve the purpose of reducing labor costs and improving repair efficiency. The specific solutions are as follows:

[0005] The first aspect of this application provides a method for processing link nodes, including:

[0006] In response to a link node exception signal, obtain the error information of the abnormal link node;

[0007] Generate an error report for the abnormal link node according to the parameters included in the error information;

[0008] According to the node information of the abnormal link node and the error report, extract at least one repair script template associated with the error report from the script library;

[0009] Generate at least one node repair script for the abnormal link node according to the request parameters of the abnormal link node and the at least one repair script template;

[0010] Execute the at least one node repair script to repair the error information, and restart the abnormal link node for execution after successful repair.

[0011] In a possible implementation, when the number of the at least one node repair script is not less than two, repairing the error information by executing the at least one node repair script, and after successful repair, restarting the execution of the abnormal link node, includes:

[0012] S1. Execute the Nth node repair script, where N is a positive integer;

[0013] S2. Determine whether the Nth node repair script is executed successfully and whether the restart of the abnormal link node is successful;

[0014] S3. If the repair of the Nth node repair script fails or the restart of the abnormal link node fails, let N = N + 1, and repeat the above steps S1 and S2 until N is equal to the number of the at least one node repair script.

[0015] In a possible implementation, the obtaining the error information of the abnormal link node in response to the link node abnormal signal includes:

[0016] Determine the abnormal link node from the abnormal application according to the abnormal node identifier in the link node abnormal signal;

[0017] Extract the error information of the abnormal link node from the log file of the application.

[0018] In a possible implementation, the generating the error report of the abnormal link node according to the parameters included in the error information includes:

[0019] Extract target parameters from the parameters included in the error information according to the request parameters of the abnormal link node;

[0020] Replace the target parameters in the error information with corresponding placeholders to obtain the error report.

[0021] In a possible implementation, the extracting at least one repair script template associated with the error report from the script library according to the node information of the abnormal link node and the error report includes:

[0022] Use the node identifier of the abnormal link node and the error report as a composite primary key to extract the at least one repair script template from the script library.

[0023] In a possible implementation, the using the node identifier of the abnormal link node and the error report as a composite primary key to extract the at least one repair script template from the script library includes:

[0024] Determine all error reports of the abnormal link node according to the node identifier;

[0025] Use the repair script template associated with the target error report in the script library as the at least one repair script template, where the target error report is the error report with the same content as the error report among all the error reports.

[0026] In a possible implementation, the generating, according to the request parameter of the exception link node and the at least one repair script template, at least one node repair script for the exception link node includes:

[0027] Replace the placeholder in the at least one repair script template with the request parameter to obtain the at least one node repair script.

[0028] A second aspect of the present application provides a link node processing device, including:

[0029] An error information acquisition module, configured to acquire error information of an exception link node in response to a link node exception signal;

[0030] An error report generation module, configured to generate an error report of the exception link node according to the parameters included in the error information;

[0031] A script template determination module, configured to extract at least one repair script template associated with the error report from a script library according to the node information of the exception link node and the error report;

[0032] A repair script generation module, configured to generate at least one node repair script for the exception link node according to the request parameter of the exception link node and the at least one repair script template; and,

[0033] A repair script execution module, configured to execute the at least one node repair script to repair the error information, and restart the exception link node for execution after the repair is successful.

[0034] A third aspect of the present application provides a computer program product, including computer-readable instructions, which, when running on an electronic device, cause the electronic device to implement the link node processing method in the first aspect or any implementation manner of the first aspect.

[0035] A fourth aspect of the present application provides an electronic device, including at least one processor and a memory connected to the processor, where:

[0036] The memory is used to store a computer program;

[0037] The processor is used to execute the computer program so that the electronic device can implement the link node processing method in the first aspect or any implementation manner of the first aspect as described above.

[0038] A fifth aspect of the present application provides a computer storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the link node processing method in the first aspect or any implementation manner of the first aspect as described above.

[0039] By means of the above technical solutions, the link node processing method provided by the present application can, when a link node has an abnormality, in response to a link node abnormality signal, obtain error information of the abnormal link node. According to the parameters included in the error information, generate an error report of the abnormal link node. According to the node information and the error report of the abnormal link node, extract at least one repair script template associated with the error report from a script library. Then, according to the request parameters of the abnormal link node and the at least one repair script template, generate at least one node repair script for the abnormal link node. Finally, execute the at least one node repair script to repair the error information, and restart the abnormal link node for execution after the repair is successful. By automatically completing the entire process from error information acquisition to repair script generation after a link node has an abnormality, automatic repair of the abnormal link node is achieved, reducing labor costs while improving the repair efficiency of the abnormal link node. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the original elements and elements are not necessarily drawn to scale.

[0041] Figure 1 It is an architecture diagram of a link node processing system provided by the present application;

[0042] Figure 2 It is an architecture diagram of a terminal provided by the present application;

[0043] Figure 3 It is an architecture diagram of a server provided by the present application;

[0044] Figure 4 It is a flowchart of a link node processing method provided by the present application;

[0045] Figure 5 It is an execution flowchart of a link node provided by the present application;

[0046] Figure 6The corresponding relationship diagram among the link node, error report, and repair script template provided by this application;

[0047] Figure 7 The execution flowchart of the node repair script provided by this application;

[0048] Figure 8 The structure diagram of a link node processing device provided by this application;

[0049] Figure 9 The structure diagram of the electronic device provided by this application. Detailed implementation manners

[0050] The embodiments of this application will be described below with reference to the accompanying drawings in the embodiments of this application. The terms used in the embodiments of this application are only used to explain the specific embodiments of this application, rather than intended to limit this application.

[0051] The embodiments of this application will be described below with reference to the accompanying drawings. Those of ordinary skill in the art will know that with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0052] The terms "first", "second", etc. in the specification, claims, and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances, which is only a way of distinction used when describing objects with the same attributes in the embodiments of this application. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, so that a process, method, system, product, or device including a series of units does not necessarily have to be limited to those units, but may include other units that are not clearly listed or are inherent to these processes, methods, products, or devices.

[0053] See Figure 1 , Figure 1 shows an architecture schematic diagram of a link node processing system. The system may include a terminal 100 and a server 200. Among them, the server 200 may include one or more servers ( Figure 1 illustrated by taking one server as an example), and the server 200 may provide the link node processing method provided by the embodiments of this application for one or more terminals.

[0054] Among them, an application for monitoring link nodes may be installed on the terminal 100, and the corresponding monitoring information may be sent to the server 200. The server 200 may obtain a processing result based on the received monitoring information and return the processing result to the terminal 100.

[0055] It should be understood that in some alternative implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself, without the cooperation of the server, and the embodiments of the present application do not limit this.

[0056] Next, the product form of the terminal 100 will be described. Figure 1 in the present application.

[0057] The terminal 100 in the embodiments of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiments of the present application do not impose any restrictions on this.

[0058] Figure 2 FIG. shows an alternative hardware structure diagram of the terminal 100.

[0059] Referring to Figure 2 as shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), a headphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190, and other components. Those skilled in the art can understand that Figure 2 This is merely an example of a terminal or a multifunctional device, and does not constitute a limitation on the terminal or the multifunctional device. It may include more or fewer components than those shown in the figure, or combine some components, or different components.

[0060] The input unit 130 can be used to receive input digital or character information and generate key signal inputs related to the user settings and function controls of the portable multifunctional device. Specifically, the input unit 130 can include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect touch operations of the user thereon or nearby (such as operations of the user using any suitable object such as a finger, a joint, a stylus, etc. on or near the touch screen), and drive corresponding connection devices according to a preset program. The touch screen can detect the touch actions of the user on the touch screen, convert the touch actions into touch signals and send them to the processor 170, and can receive and execute commands sent by the processor 170; the touch signals at least include contact coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, various types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch screen. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, the other input devices 132 can include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.

[0061] Among them, the input device 132 can receive input data, etc.

[0062] The display unit 140 can be used to display information input by the user or information provided to the user, various menus of the terminal 100, an interactive interface, file display, and / or the playback of any multimedia file. In the embodiment of the present application, the display unit 140 can be used to display an interface for monitoring link nodes, processing results, etc.

[0063] The memory 120 can be used to store instructions and data. The memory 120 mainly includes a storage instruction area and a storage data area. The storage data area can store various data, such as multimedia files, texts, etc.; the storage instruction area can store software units such as an operating system, applications, instructions required for at least one function, or their subsets or extended sets. It can also include a non-volatile random access memory; it provides the processor 170 with management of hardware, software, and data resources in the computing processing device, supports control software and applications. It is also used for the storage of multimedia files and the storage of running programs and applications.

[0064] The processor 170 is the control center of the terminal 100, connecting various parts of the entire terminal 100 through various interfaces and circuits. By running or executing instructions stored in the memory 120 and invoking data stored in the memory 120, it performs various functions of the terminal 100 and processes data, thereby exercising overall control over the terminal device. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 170 either. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be separately implemented on independent chips. The processor 170 can also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process the data and programs in the memory 120, so that each functional module therein executes corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0065] Among them, the memory 120 can be used to store software codes related to the link node processing method. The processor 170 can execute the steps of the link node processing method and can also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to implement corresponding functions.

[0066] The radio frequency unit 110 (optional) can be used for receiving and transmitting information or signals during a call. For example, after receiving the downlink information from the base station, it is sent to the processor 170 for processing. Additionally, it sends the designed uplink data to the base station. Generally, the RF circuit includes but is not limited to antennas, at least one amplifier, transceiver, coupler, low noise amplifier (LNA), duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices via wireless communication. This wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0067] Among them, in the embodiment of this application, the radio frequency unit 110 can send the monitoring information data of the link node to the server 200 and receive the processing result of the node repair script sent by the server 200.

[0068] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0069] The terminal 100 also includes a power supply 190 (such as a battery) for powering each component. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system.

[0070] The terminal 100 also includes an external interface 180. This external interface can be a standard Micro USB interface or a multi-pin connector, which can be used to connect the terminal 100 to other devices for communication and can also be used to connect a charger to charge the terminal 100.

[0071] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which will not be elaborated here. Some or all of the methods described below can be applied to the terminal 100 as Figure 2 shown.

[0072] Next, the product form of server 200 will be described. Figure 1 in the server 200;

[0073] Figure 3 A schematic structural diagram of a server 200 is provided, as Figure 3 shown. The server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other through the bus 201.

[0074] The bus 201 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 3 only a thick line is used in the figure to represent it, but it does not mean that there is only one bus or one type of bus.

[0075] The processor 202 can be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP), etc.

[0076] The memory 204 can include a volatile memory, such as a random access memory (RAM). The memory 204 can also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0077] Among them, the memory 204 can be used to store software codes related to the link node processing method. The processor 202 can execute the steps of the link node processing method of the chip, or can also schedule other units to implement the corresponding functions.

[0078] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with the function of executing instructions, such as CPU, DSP, etc., or a hardware system without the function of executing instructions, such as ASIC, FPGA, etc., or a combination of the above-mentioned hardware system without the function of executing instructions and the hardware system with the function of executing instructions.

[0079] The Devops link of the application program is manually formulated by technicians, and the links are strung together based on existing tools. For example, the application program triggers the generation of a deliverable (code package) by submitting a code version, and then based on the application program deliverable, uses a specified operating system base image to build an application program version image. After that, various processes such as gray release, canary analysis, and full release are performed on the version image to achieve the safe online of the new version of the code. Each of these processes contains one or more link nodes, and each link node is generally strung together by means of program calls. For example, after the application program code is tagged (version number and other information), it will automatically trigger processes such as the construction of deliverables by Jenkins (continuous integration tool) through the Webhook (webhook) method on Gitlab (code repository). For different application programs, the same link nodes will also be used in the Devops link. For example, they all need to build deliverables through Jenkins and use the deliverables to build application version images.

[0080] Through the entire set of automated processes of the Devops link, the application program can quickly and stably deliver the upgraded code to the online, thereby improving the management efficiency of the application program.

[0081] However, even in such a highly automated process, there may still be some unknown problems at each stage of Devops. Since the application needs to go through multiple different nodes during the execution of the complete link, each node may have exceptions. In the prior art, for each exception that occurs at each node of each application, technicians need to participate, analyze, and adjust, and ensure the smoothness of the link by fixing the nodes. Moreover, there will be a situation of manual repeated repair for common problems under certain nodes of different applications, which not only causes waste of manpower but also reduces the repair efficiency.

[0082] To solve the above problems, the embodiments of the present application provide a method for processing link nodes. The method for processing link nodes in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0083] Refer to Figure 4 , Figure 4 which is a flowchart of a method for processing link nodes provided by an embodiment of the present application. As Figure 4 shown, a method for processing link nodes provided by an embodiment of the present application may include steps 401 to 405, and these steps will be described in detail below.

[0084] 401. In response to a link node exception signal, obtain the error information of the exception link node.

[0085] In one embodiment, during the operation of the Devops link of an application, information such as the operation data and operation status of each running node will be generated at each running node, and these data can be obtained through real-time monitoring. For example, for the complete release process of a new version of an application, from the submission of the code to the full-scale online of the code package, each node will generate monitoring data, and the obtained monitoring data mainly includes: application information, the identifier of the current node, the execution status of the current node, etc. For example, refer to Figure 5 shown. Taking link A formed by application A as an example, when the execution reaches node NodeN and this node is monitored, the obtained monitoring data may include: how long the execution time of the current node is, and whether the execution result of the current node is successful or failed. If the current node NodeN of the current application A has a timeout or returns a failure, it means that the current node has an exception, and then corresponding error information will be generated. These error information are the error information generated during the execution process of the current link node and cannot be executed completely, and generally can be the information in the log of this link node or the Http response error information.

[0086] It can be understood that those skilled in the art can also adopt other monitoring methods to obtain the error information of the link nodes, which will not be elaborated here.

[0087] 402. Generate an error report for the abnormal link node according to the parameters included in the error message.

[0088] In a specific embodiment, complete request parameters can be obtained on the abnormal link node. This parameter is the information that needs to be passed in when the application executes this link node. For example, the function of the current link node is to bind the cloud instance ECS-001 to the load balancer LB-001 on the cloud for traffic gray-scale operation. When an exception occurs in this link node, the parameters included in the error message of this node are the cloud instance ID and the load balancer ID, and the identifier (name) of this node is "gray-scale binding of cloud instance to load balancer".

[0089] The generation of this error report can be achieved by replacing the parameters in the error message using the placeholder replacement method to obtain the error report of this abnormal link node. For example, the specific error message is: Failed to bind cloudinstance ECS-001 to load balancing LB-001. The current number of cloudinstances bound to load balancing LB-001 has exceeded the limit (Load balancing LB-001 failed to bind cloud instance ECS-001, and the current number of cloud instances bound to load balancing LB-001 has exceeded the limit).

[0090] After replacing the placeholders of the parameters, the obtained error report is: Failed to bind cloudinstance {ECS} to load balancing {LB}. The current number of cloud instancesbound to load balancing {LB} has exceeded the limit. Among them, ECS and LB are the placeholders for the two parameters respectively.

[0091] It can be understood that those skilled in the art can also use other replacement methods to generate error reports, which are not limited here.

[0092] 403. Extract at least one repair script template associated with the error report from the script library according to the node information and error report of the abnormal link node.

[0093] The script library stores repair script templates for adaptive processing of error reports, and maintains the mapping relationship between link nodes, error reports, and repair script templates. Generally, refer to Figure 6As shown, a link node may have multiple error reports, and one link node and one error report correspond to one or more adaptive scripts (i.e., repair script templates), which is a one-to-many-to-many (1:N:N) mapping relationship.

[0094] In the script library, the node identifier of the link node and the error report serve as a composite primary key, which is unique when combined. When retrieving the repair script template, the error reports that have been stored can be first extracted from the script library based on the node identifier, and then the obtained current error report is fully matched with multiple error reports in the error report list in the script library. If the error report is matched, the corresponding repair script template of the error report is retrieved.

[0095] 404. Generate at least one node repair script for the abnormal link node according to the request parameters of the abnormal link node and at least one repair script template.

[0096] Based on the obtained repair script template, the parameters extracted from the abnormal link node are filled into the repair script template according to the positions of the placeholders, thereby obtaining the node repair script. For example, filling the parameters ECS-001 and LB-001 corresponding to the above error report into each repair script template can obtain the node repair script. The effect after executing this node repair script is to increase the ECS binding limit of LB-001 on the cloud platform, which may be increased from 10 to 20. The specific function of the script is determined by the technical personnel when writing the script.

[0097] 405. Execute at least one node repair script to repair the error information, and restart the abnormal link node after successful repair.

[0098] Based on the above-obtained node repair script, after executing the node repair script, the corresponding execution object will return a response result, either the operation is successful or the operation fails. If the operation is successful, the retry of the application program abnormal node can be controlled for the abnormal link node to make the link continue to run.

[0099] Compared with the current technical solution that requires technical personnel to participate, manually analyze the error information, and then perform repair actions step by step for this exception, the link node processing method of this application can automatically complete the entire process from error information acquisition to repair script generation after the link node appears abnormal, realizing the automatic repair of the abnormal link node, reducing the labor cost while improving the repair efficiency of the abnormal link node.

[0100] In a specific embodiment, to achieve the final repair of the abnormal link node and enable the link to return to normal in a timely manner. When the number of at least one node repair script is not less than two, then step 405, executing at least one node repair script to repair the error information, and after successful repair, restarting the process of the abnormal link node can specifically include:

[0101] S1. Execute the Nth node repair script, where N is a positive integer.

[0102] S2. Determine whether the Nth node repair script is executed successfully and whether the abnormal link node is restarted successfully.

[0103] S3. If the repair of the Nth node repair script fails or the restart of the abnormal link node fails, then set N = N + 1, and repeat the above steps S1 and S2 until N is equal to the number of at least one node repair script.

[0104] Specifically, after each execution of a node repair script, a response result will be returned, either the operation is successful or the operation fails. If the operation is successful, initiate a retry of the application program abnormal node to let the Devops link continue. If the abnormal node executes normally, it means that this node repair script has completed the repair of the current abnormality. If the abnormal node executes fails, or the response result of the above node repair script is an operation failure, then use the next matched node repair script to execute again until the abnormality is repaired.

[0105] For example, as shown in Figure 7 This process includes three link nodes: Node1, Node2, and Node3. Node1 represents the node that executed normally in the previous step, Node2 represents the node whose execution is abnormal and causes the link to be interrupted, and Node3 represents the node that needs to be executed next after Node2 returns to normal.

[0106] A link interruption occurs in Node2. At this time, an error message is generated. After processing the error message in combination with the application parameters, an error report Error1 is obtained. At this time, Node2 and Error1 are retrieved into the script library, and node repair script one and node repair script two are obtained.

[0107] Fill the application parameter A of this node into node repair script one, execute the script, and judge the script execution result. If the execution is successful, retry node Node2. At this time, Node2 returns to normal, and after the execution is completed, it enters Node3.

[0108] If the execution result of node repair script one is a failure, or the retry result of Node2 is a failure, then continue to match node repair script two in the node repair script library, replace it with script two, and re - execute the above process.

[0109] If this result is still a failure, it means that there is no script in the current adaptive script library that can solve the problems of Node2 and Error1. At this time, technical personnel intervene and participate in writing the node repair script three. After re-executing the script, ensure that the retry result of Node2 is successful. The technical personnel judge the failure reasons of the node repair scripts one and two. If the script has expired or other problems cause the script to be unusable, then remove this script from the adaptive script library. When other subsequent application programs enter the Devops link node Node2, they will follow this process and continue to use the node repair script three to quickly solve the abnormal problems of the Node node. The whole process consists of multiple Devops links, multiple link nodes, multiple error reports, and multiple node repair scripts. During the execution of the link, the abnormal nodes can be self-healed stably in this way, and finally the technical effects of adaptive self-healing and efficient execution can be achieved.

[0110] When the technical personnel intervene in the processing, they can first store the error report in the database. Then, for this error report, the technical personnel participate in writing the corresponding node repair script. After executing it with the abnormal node parameters, the repair of the current abnormal node is completed. At this time, the adaptive script is stored in the database, and a new mapping relationship from the node to the error report and then to the node repair script is formed. When this error report appears again in the application program, the node repair script can be directly used.

[0111] In a specific embodiment, the process of obtaining the error information of the abnormal link node in response to the link node abnormal signal may include:

[0112] Determine the abnormal link node from the abnormal application according to the abnormal node identifier in the link node abnormal signal.

[0113] Extract the error information of the abnormal link node from the log file of the application program.

[0114] Specifically, after obtaining the abnormal node information, the application program where the abnormal node appears can be located according to the position management of the link node in the application program. Then, the abnormal node of the application program can be locked through the unique identifier of the abnormal node, and the corresponding error information can be obtained from the log file. For the generation of the corresponding error report, the target parameter can be extracted from the parameters included in the error information according to the request parameters of the abnormal link node. Then, the target parameter in the error information is replaced with the corresponding placeholder to obtain the error report.

[0115] The parameters in the error information here can be the parameters for implementing a certain function in the link of the application program. For example, as shown in Figure 5 The Devops link has multiple stages, each stage includes multiple nodes, and each node performs an operation.

[0116] Devops links of different applications may have the same or different link nodes at the same stage. During execution, the link node uses the application parameters, or the result parameters generated by the previous link node based on the application parameters, as the request parameters of the next link node (for example, the request parameters of Node1 in the figure are parameter A and parameter B. When executing to Node4, the request parameters may be parameter A, parameter B, or the execution result of Node3. Similarly, the parameters of Node2 may also be the execution result of Node1. In short, they cannot be separated from the original parameters A and parameter B).

[0117] As a specific application of the above embodiment, taking the case where application A has updated its code and needs to be released online, the complete DevOps link of the application is: version number the code → gitlab executes pipeline → uses Maven to package and build → generates code deliverables and submits them to the delivery warehouse → applies the basic image to obtain the latest version deliverable → builds a new version image of the application → the application is released in grayscale →…

[0118] During the execution of the current link, it was suddenly discovered that the link node "Use Maven for packaging and building" (node ​​identification) had an exception, and the Maven central warehouse could not be connected during the packaging process. (The Maven public network warehouse is on the external network, and it could be connected normally during packaging in the past. After strengthening the network protection, the application could not connect to the Maven public network warehouse, and the link node would be abnormal at this time).

[0119] In this case, detailed error information was obtained, and the error report was "from / to central(https: / / repo.maven.apache.org / maven2): Connect to repo.maven.apache.org:443".

[0120] Use the abnormal node "Use Maven for packaging and building" and the corresponding error report to enter the adaptive script library for script retrieval, and no corresponding node repair script is found (this means that this type of problem occurs for the first time in the current link, or there is no corresponding script at present).

[0121] At this time, technicians can intervene to provide Node Repair Script 1. The specific script content can be to change the Maven repository pointed to in the application code to the Alibaba Cloud mirror repository, or to change the default mirror repository address on the build server to solve the current problem. After executing the script, retry the abnormal link node. After the current abnormal node is repaired and the link is repaired, Application A continues with the next Devops link node.

[0122] For subsequent applications, such as when Application B enters "packaging and building using Maven", it also encounters this problem and generates this error report. At this time, based on the abnormal node and the error report, the corresponding node repair script is retrieved and the script is automatically executed to repair this abnormal node, and the Devops link node of Application B completes self-healing.

[0123] Each node in the Devops link has the ability of self-healing, improving the execution efficiency and reducing the technical cost.

[0124] The above introduces a link node processing method provided by an embodiment of the present application. Next, an apparatus for executing the above link node processing method will be introduced.

[0125] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of a link node processing apparatus provided by an embodiment of the present application. As Figure 8 shown, the link node processing apparatus includes:

[0126] An error information acquisition module 801, configured to acquire error information of an abnormal link node in response to a link node exception signal.

[0127] An error report generation module 802, configured to generate an error report of the abnormal link node according to parameters included in the error information.

[0128] A script template determination module 803, configured to extract at least one repair script template associated with the error report from a script library according to node information and the error report of the abnormal link node.

[0129] A repair script generation module 804, configured to generate at least one node repair script for the abnormal link node according to request parameters of the abnormal link node and at least one repair script template. And,

[0130] A repair script execution module 805, configured to execute at least one node repair script to repair the error information, and restart the execution of the abnormal link node after successful repair.

[0131] In a possible implementation, when the number of at least one node repair script is not less than two, the repair script execution module 805 executes at least one node repair script to repair the error information, and after the repair is successful, restarts the process executed by the abnormal link node, including:

[0132] S1. Execute the Nth node repair script, where N is a positive integer;

[0133] S2. Determine whether the Nth node repair script is executed successfully and whether the abnormal link node is restarted successfully;

[0134] S3. If the repair of the Nth node repair script fails or the restart of the abnormal link node fails, let N = N + 1, and repeat the above steps S1 and S2 until N is equal to the number of at least one node repair script.

[0135] In a possible implementation, the process of the error information acquisition module 801 obtaining the error information of the abnormal link node in response to the link node abnormal signal includes:

[0136] Determine the abnormal link node from the abnormal application according to the abnormal node identifier in the link node abnormal signal;

[0137] Extract the error information of the abnormal link node from the log file of the application.

[0138] In a possible implementation, the process of the error report generation module 802 generating an error report for the abnormal link node according to the parameters included in the error information includes:

[0139] Extract the target parameter from the parameters included in the error information according to the request parameter of the abnormal link node;

[0140] Replace the target parameter in the error information with the corresponding placeholder to obtain the error report.

[0141] In a possible implementation, the process of the script template determination module 803 extracting at least one repair script template associated with the error report from the script library according to the node information and error report of the abnormal link node includes:

[0142] Use the node identifier and error report of the abnormal link node as the composite primary key to extract at least one repair script template from the script library.

[0143] In a possible implementation, the process of the script template determination module 803 using the node identifier and error report of the abnormal link node as the composite primary key to extract at least one repair script template from the script library includes:

[0144] Determine all the error reports of the abnormal link node according to the node identifier;

[0145] Use the repair script template associated with the target error report in the script library as at least one repair script template, where the target error report is the error report with the same content as the error report among all error reports.

[0146] In a possible implementation, the process by which the script template determination module 803 generates at least one node repair script for the abnormal link node according to the request parameters of the abnormal link node and at least one repair script template includes:

[0147] Replace the placeholders in at least one repair script template with the request parameters to obtain at least one node repair script.

[0148] An embodiment of the present application also provides an electronic device. Refer to Figure 9 As shown, it shows a schematic structural diagram of an electronic device suitable for implementing the electronic device in the embodiments of the present application. The electronic device in the embodiments of the present application may include, but is not limited to, fixed terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), desktop computers, and so on. Figure 9 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0149] As Figure 9 shown, the electronic device may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage device 908 into the random access memory (RAM) 903. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 903. The processing device 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904. The input / output (I / O) interface 905 is also connected to the bus 904.

[0150] Generally, the following devices may be connected to the I / O interface 905: an input device 906 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 908 including, for example, a memory card, a hard disk, etc.; and a communication device 909. The communication device 909 may allow the electronic device to communicate with other devices wirelessly or wiredly to exchange data. Although Figure 9 the electronic device with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.

[0151] An embodiment of the present application also provides a computer program product, including computer-readable instructions. When the computer-readable instructions run on an electronic device, the electronic device is enabled to implement any one of the link node processing methods provided by the embodiments of the present application.

[0152] An embodiment of the present application also provides a computer-readable storage medium. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device is enabled to implement any one of the link node processing methods provided by the embodiments of the present application.

[0153] In addition, it should be noted that the device embodiments described above are merely illustrative. 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 to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines.

[0154] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by dedicated hardware, including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. Generally, functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structures for implementing the same function can also be various, such as analog circuits, digital circuits or dedicated circuits. However, for the present application, in more cases, software program implementation is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a readable storage medium, such as a floppy disk, a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disc of a computer, including several instructions for enabling a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0155] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product.

[0156] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website, a computer, a training device, or a data center to another website, a computer, a training device, or a data center by wired means (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless means (such as infrared, wireless, microwave, etc.). The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or a data center that includes one or more integrated available media. The available medium may be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

Claims

1. A link node processing method, characterized in that: include: In response to the link node abnormality signal, acquiring error information of the abnormal link node; Generating an error report of the abnormal link node according to the parameters included in the error information; Extracting at least one repair script template associated with the error report from a script library according to the node information of the abnormal link node and the error report; Generate at least one node repair script for the abnormal link node according to the request parameters of the abnormal link node and the at least one repair script template; Execute the at least one node repair script to repair the error information, and restart the abnormal link node for execution after the repair is successful.

2. The link node processing method according to claim 1, characterized in that: When the number of the at least one node repair script is not less than two, executing the at least one node repair script to repair the error information, and restarting the abnormal link node for execution after the repair is successful, includes: S1. Execute the Nth node repair script, where N is a positive integer; S2. Determine whether the Nth node repair script is executed successfully and whether the abnormal link node is restarted successfully; S3. If the Nth node repair script fails to repair or restart the abnormal link node, set N=N+1 and repeat the above steps S1 and S2 until N is equal to the number of at least one node repair script.

3. The link node processing method according to claim 1, characterized in that: The step of obtaining error information of an abnormal link node in response to an abnormal link node signal includes: Determine the abnormal link node from the abnormal application program according to the abnormal node identifier in the link node abnormal signal; The error information of the abnormal link node is extracted from the log file of the application.

4. The link node processing method according to claim 1, characterized in that: The generating an error report of the abnormal link node according to the parameters included in the error information includes: extracting target parameters from parameters included in the error information according to the request parameters of the abnormal link node; The target parameter in the error information is replaced with a corresponding placeholder to obtain the error report.

5. The link node processing method according to any one of claims 1 to 4, characterized in that: The step of extracting at least one repair script template associated with the error report from a script library according to the node information of the abnormal link node and the error report comprises: The node identifier of the abnormal link node and the error report are used as a joint primary key to extract the at least one repair script template from the script library.

6. The link node processing method according to claim 5, characterized in that: The step of using the node identifier of the abnormal link node and the error report as a joint primary key to extract the at least one repair script template from the script library includes: Determine all error reports of the abnormal link node according to the node identifier; A repair script template associated with a target error report in the script library is used as the at least one repair script template, and the target error report is an error report with the same content as the error report in all the error reports.

7. The link node processing method according to claim 4, characterized in that: The step of generating at least one node repair script for the abnormal link node according to the request parameter of the abnormal link node and the at least one repair script template comprises: The placeholder in the at least one repair script template is replaced with the request parameter to obtain the at least one node repair script.

8. A link node processing device, characterized in that: include: An error information acquisition module, used for acquiring error information of an abnormal link node in response to an abnormal link node signal; An error report generating module, used for generating an error report of the abnormal link node according to the parameters contained in the error information; A script template determination module, configured to extract at least one repair script template associated with the error report from a script library according to the node information of the abnormal link node and the error report; A repair script generation module, used to generate at least one node repair script of the abnormal link node according to the request parameters of the abnormal link node and the at least one repair script template; as well as, The repair script execution module is used to execute the at least one node repair script to repair the error information, and restart the abnormal link node for execution after the repair is successful.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the link node processing method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the link node processing method as described in any one of claims 1 to 7.