A method, device and terminal for detecting system stability

By screening and analyzing the log data of large software systems, the system module call order is determined, which solves the problem of difficulty in system stability detection and difficult to detect potential risks, and improves system stability detection and easy operation and maintenance.

CN113626296BActive Publication Date: 2025-02-14SHENZHEN INTELLIFUSION TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010390296.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-09
Publication Date
2025-02-14
Estimated Expiration
2040-05-09

AI Technical Summary

Technical Problem

Due to its huge complexity, large software systems are difficult to observe the operating status between their operating logic and internal modules, which makes it difficult to detect system stability and potential risks difficult to detect in a timely manner.

Method used

By obtaining the log data of each module of each node of the system, filtering according to the preset log keywords and determining based on the timestamp that the system meets or does not meet the calling sequence of the preset module, statistical analysis is performed to obtain the index data of system stability.

Benefits of technology

The system stability detection is achieved, potential risks are discovered in a timely manner, and the system is easy to operate and maintain, without the need to modify the system, which is highly adaptable and non-invasive.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113626296B_ABST
    Figure CN113626296B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of computer technology, and in particular, relates to a method, device and terminal for detecting system stability, wherein the method comprises: obtaining log data of each module of each node of the system; filtering the log data according to preset log keywords, and determining the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the filtering result and the timestamp of each log data; performing statistical analysis on the calling process to obtain indicator data for characterizing the stability of the system; after obtaining these indicator data, operation and maintenance personnel can know whether the stability of the system can meet the requirements, thereby realizing the detection of system stability, and by obtaining the above-mentioned calling process, it can also assist the operation and maintenance personnel in obtaining log data related to system failures, which is conducive to timely discovering potential risks of the system and improving the ease of operation and maintainability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a method, device and terminal for detecting system stability. Background Art

[0002] As the software industry matures, large-scale software systems are common. However, when a software system becomes large and complex, it is often difficult to observe its operating logic, and it is impossible to fully understand the operating status of each module within it, which makes it difficult to detect system stability and potential risks in the system are difficult to detect in a timely manner. Summary of the invention

[0003] The embodiments of the present application provide a method, device and terminal for detecting system stability, which can realize the detection of system stability and help to timely discover potential risks of the system and improve the ease of operation and maintainability of the system.

[0004] A first aspect of an embodiment of the present application provides a method for detecting system stability, comprising:

[0005] Get the log data of each module of each node in the system;

[0006] The log data is screened according to preset log keywords, and the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence are determined according to the screening result and the timestamp of each log data;

[0007] The calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence are statistically analyzed to obtain index data for characterizing system stability.

[0008] Based on the first aspect, a method for detecting system stability is provided as a first implementation of the present application. The method of screening the log data according to the preset log keyword and determining the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the screening result and the timestamp of each log data may specifically include:

[0009] Matching the log data with the preset log keyword to obtain target log data that successfully matches the log keyword and a target module corresponding to the target log data;

[0010] The target modules are sorted according to the timestamps of the target log data and the preset module calling sequence, so as to obtain the calling processes of the system that comply with the preset module calling sequence and the calling processes that do not comply with the preset module calling sequence.

[0011] Based on the first aspect above, a method for detecting system stability is provided. As a second implementation of the present application, before performing statistical analysis on the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence to obtain the index data for characterizing the system stability, the method may include:

[0012] Correcting the time of each node of the system to obtain the time error of each node;

[0013] Error correction is performed on the timestamp of the log data according to the time errors of the various nodes.

[0014] Based on the first aspect, a method for detecting system stability is provided. As a third implementation of the present application, the statistical analysis of the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence is performed to obtain index data for characterizing system stability, which may include:

[0015] Calculate the time consumed by each calling process of the system that complies with the preset module calling sequence according to the timestamp of the log data after error correction;

[0016] According to the time consumed by each calling process of the system that complies with the preset module calling sequence, the average time consumed, the median time consumed, and one or more indicator data among the 95 lines for characterizing the stability of the system are calculated.

[0017] Based on the first aspect, a method for detecting system stability is provided as a fourth implementation of the present application. After calculating the time consumed by each calling process of the system that complies with the preset module calling sequence according to the timestamp of the log data after error correction, the method may include:

[0018] Determine, according to the time consumed by each calling process of the system that complies with the preset module calling sequence, a calling process in which the time consumed by the calling process of the system that complies with the preset module calling sequence is greater than a time threshold;

[0019] A calling process in which the time consumed in the calling process of the system that complies with the preset module calling sequence is greater than the time threshold is marked as an abnormal calling process.

[0020] Based on the first aspect, a method for detecting system stability is provided. As a fifth implementation of the present application, the method of performing statistical analysis on the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence to obtain index data for characterizing system stability may also include:

[0021] The number of calling processes of the system that conform to the preset module calling order and the number of calling processes that do not conform to the preset module calling order are obtained, and the ratio of the number of calling processes of the system that conform to the preset module calling order to the total number of calling processes is obtained.

[0022] A second aspect of an embodiment of the present application provides a system stability detection device, including:

[0023] An acquisition unit, used to acquire log data of each module of each node of the system;

[0024] a determination unit, configured to filter the log data according to preset log keywords, and determine the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the filtering result and the timestamp of each log data;

[0025] The analysis unit is used to perform statistical analysis on the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence to obtain indicator data for characterizing system stability.

[0026] Based on the second aspect, a system stability detection device is provided. As a first implementation of the present application, the determination unit is further specifically used for:

[0027] Matching the log data with the preset log keyword to obtain target log data that successfully matches the log keyword and a target module corresponding to the target log data;

[0028] The target modules are sorted according to the timestamps of the target log data and the preset module calling sequence, so as to obtain the calling processes of the system that comply with the preset module calling sequence and the calling processes that do not comply with the preset module calling sequence.

[0029] Based on the above second aspect, a system stability detection device is provided. As a second implementation of the present application, the detection device may further include: a correction unit; the correction unit is used to:

[0030] Correcting the time of each node of the system to obtain the time error of each node;

[0031] Error correction is performed on the timestamp of the log data according to the time errors of the various nodes.

[0032] Based on the second aspect, a system stability detection device is provided. As a third implementation of the present application, the analysis unit may be specifically used for:

[0033] Calculate the time consumed by each calling process of the system that complies with the preset module calling sequence according to the timestamp of the log data after error correction;

[0034] According to the time consumed by each calling process of the system that complies with the preset module calling sequence, the average time consumed, the median time consumed, and one or more indicator data among the 95 lines for characterizing the stability of the system are calculated.

[0035] Based on the second aspect, a system stability detection device is provided. As a fourth implementation of the present application, the analysis unit may be specifically used for:

[0036] After calculating the time consumed by each calling process of the system that complies with the preset module calling sequence according to the timestamp of the log data after error correction, determine the calling process in which the time consumed by each calling process of the system that complies with the preset module calling sequence is greater than the time threshold according to the time consumed by each calling process of the system that complies with the preset module calling sequence; and mark the calling process in which the time consumed by the system in which the time consumed by the calling process of the system that complies with the preset module calling sequence is greater than the time threshold as an abnormal calling process.

[0037] Based on the second aspect, a system stability detection device is provided. As a fifth implementation of the present application, the analysis unit may be specifically used for:

[0038] The number of calling processes of the system that conform to the preset module calling order and the number of calling processes that do not conform to the preset module calling order are obtained, and the ratio of the number of calling processes of the system that conform to the preset module calling order to the total number of calling processes is obtained.

[0039] A third aspect of an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned detection methods when executing the computer program.

[0040] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned detection methods are implemented.

[0041] In an embodiment of the present application, log data of each module of each node of the system is obtained, and then the log data is filtered according to preset log keywords, and the calling process of the system that complies with the preset module calling order and the calling process that does not comply with the preset module calling order are determined according to the filtering result and the timestamp of each log data; thereby, indicator data for characterizing the stability of the system are obtained by further statistically analyzing the calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order, so that after obtaining these indicator data, the operation and maintenance personnel can know whether the stability of the system can meet the requirements, thereby realizing the detection of system stability, and by obtaining the above-mentioned calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order, it can also assist the operation and maintenance personnel in obtaining log data related to system failures, which is conducive to timely discovering potential risks of the system and improving the ease of operation and maintainability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 It is a schematic diagram of the implementation flow of a method for detecting system stability provided in an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of a system node structure provided by an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of the calling sequence between various modules of the system node provided in the embodiment of the present application;

[0046] Figure 4 This is a schematic diagram of a specific implementation flow of step 102 of a method for detecting system stability provided in an embodiment of the present application;

[0047] Figure 5 It is a schematic diagram of a specific implementation process of correcting the timestamp of log data provided in an embodiment of the present application;

[0048] Figure 6 This is a schematic diagram of a specific implementation flow of step 103 of a method for detecting system stability provided in an embodiment of the present application;

[0049] Figure 7 is a schematic diagram of the structure of a detection device for system stability provided in an embodiment of the present application;

[0050] Figure 8 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0053] It should also be understood that the terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.

[0054] As the software industry matures, large-scale software systems are common. However, when a software system becomes large and complex, it is often difficult to observe its operating logic and to fully understand the operating status of its internal modules, making it difficult to detect potential risks in the system in a timely manner.

[0055] In view of this situation, conventional technologies generally require system tracking to discover the operating status of various modules and track the calls between various modules in the system to discover potential risks in the system. This method easily increases the burden of system modification and has the disadvantages of poor adaptability and strong invasiveness.

[0056] Based on this, the embodiments of the present application provide a method, device and terminal for detecting system stability. Compared with conventional technologies, they are highly adaptable and non-invasive. They can outline the operating status of various modules of the system at a relatively low cost without modifying the system, which is conducive to timely discovering potential risks of the system and improving the ease of operation and maintainability of the system.

[0057] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.

[0058] like Figure 1The present invention provides a schematic diagram of the implementation process of a method for detecting system stability provided by an embodiment of the present invention. The method is applied to a terminal and can be executed by a system stability detection device configured on the terminal. The method is suitable for situations where potential risks of the system need to be discovered in a timely manner to improve the ease of operation and maintainability of the system. The terminal can be a computer, server or other intelligent terminal. The method for detecting system stability can include steps 101 to 103.

[0059] Step 101, obtaining log data of each module of each node of the system.

[0060] Since the method for detecting the stability of the system in the present application is based on the log data of each module of each node of the system, it is necessary to obtain the log data of each module of each node of the system.

[0061] In the embodiment of the present application, the above system can be a centralized business system or a distributed business system.

[0062] like Figure 2 As shown, the system may include multiple nodes, wherein node A includes module A, module B and module C, and node B also includes module A, module B and module C.

[0063] Specifically, when obtaining the log data of each module of each node of the system, you can collect or monitor by module, and mark the monitored log data to obtain the log data of each module of each node of the system. For example, "log Ab" is used to represent the log of module A from node b.

[0064] Step 102, filtering the log data according to preset log keywords, and determining the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the filtering result and the timestamp of each log data.

[0065] Specifically, before filtering the log data according to the preset log keywords, and determining the calling process of the system that complies with the preset module calling order and the calling process that does not comply with the preset module calling order based on the filtering results and the timestamp of each log data, it is necessary to first obtain the preset module calling order between the modules of the system and the preset log keywords.

[0066] For example, the calling sequence between the modules of the system input by the user may be obtained, and the calling sequence may be used as the preset module calling sequence.

[0067] In the embodiment of the present application, the above-mentioned preset module calling sequence may be a calling sequence between various modules of various nodes of the system pre-set by the user. Figure 3The diagram is a schematic diagram of the calling sequence between modules provided by the embodiment of the present application. In the diagram, the calling sequence between the modules is: module B first calls module A, then module A calls module B, then module C calls module A, and finally, module C is called by other modules. It should be noted that Figure 3 The modules shown may be individual modules within the same node or modules within different nodes.

[0068] In addition, the above-mentioned preset log keywords are log keywords pre-set by the user for filtering the log data of the system. For example, the log keywords may be keywords such as "user enters user name", "user enters password", "user clicks to log in", etc.

[0069] In the embodiments of the present application, Figure 4 As shown, the above-mentioned filtering of the log data according to the preset log keywords, and determining the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the filtering result and the timestamp of each log data, can specifically include: step 401 to step 402.

[0070] Step 401 : Match the log data with the preset log keyword to obtain target log data that successfully matches the log keyword and a target module corresponding to the target log data.

[0071] In the embodiment of the present application, the above-mentioned matching of log data with the preset log keyword refers to filtering out the log data containing the preset log keyword to obtain target log data, and the module that generates the target log data is the target module corresponding to the target log data.

[0072] Step 402, sorting the target modules according to the timestamp of the target log data and the preset module calling sequence, obtaining the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence.

[0073] The timestamp of the above-mentioned target log data refers to the generation time of the target log data. In the process of sorting the target modules according to the timestamp of the target log data and the preset module calling order, the target log data can be sorted according to the timestamp of the target log data first, and then the target modules corresponding to the sorted target log data can be sorted according to the preset module calling order to obtain the calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order.

[0074] Among them, the above-mentioned calling process that complies with the preset module calling order refers to the calling process in which the calling order of each module is the same as the preset module calling order, and the above-mentioned calling process that does not comply with the preset module calling order refers to the calling process in which the calling order of each module is different from the preset module calling order.

[0075] For example, the default module calling order is as follows Figure 3 The calling sequence shown is: module B calls module A first, then module A calls module B, then module C calls module A, and finally, module C is called by other modules. The calling process that complies with this calling sequence is the calling process that complies with the preset module calling sequence, otherwise, it is the calling process that does not comply with the preset module calling sequence.

[0076] Step 103 , statistically analyzing the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence, to obtain index data for characterizing system stability.

[0077] In an embodiment of the present application, after obtaining the above-mentioned calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order, statistical analysis can be performed on the calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order to obtain indicator data for characterizing system stability.

[0078] Among them, the indicator data may include the average time consumption, median time consumption, one or more indicator data in the 95 lines for characterizing the stability of the system, and the ratio of the number of calling processes between modules that meet the preset module calling sequence to the total number of calling processes; after obtaining these indicator data, the operation and maintenance personnel can know whether the stability of the system can meet the requirements. Therefore, the present application realizes the detection of system stability, and by obtaining the above-mentioned calling processes that meet the preset module calling sequence and the calling processes that do not meet the preset module calling sequence, the present application can also assist the operation and maintenance personnel in obtaining log data related to system failures, which is conducive to timely discovering potential risks of the system and improving the ease of operation and maintenance of the system.

[0079] Since for distributed business systems and time-insensitive systems whose business execution does not depend on real time, the time of each node in the system may be different, thus affecting the authenticity of the above indicator data. Therefore, in some embodiments of the present application, such as Figure 5 As shown, before performing statistical analysis on the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence to obtain indicator data for characterizing system stability, it can include: step 501 to step 502.

[0080] Step 501, correcting the time of each node of the system to obtain the time error of each node.

[0081] Step 502: perform error correction on the timestamp of the log data according to the time error of each node.

[0082] In some embodiments of the present application, when correcting the time of each node of the system, the time of a certain node a can be used as a reference to calculate the time error of other nodes relative to the time of node a, and then obtain the time error of each node.

[0083] For example, if the time of node a is 2020 / 1 / 1, 10:01:02, and the time of node b is 2020 / 1 / 1, 10:01:05, then it can be determined that the time error of node b is 3s. When performing error correction on the timestamp of the log data generated by node b, it is only necessary to subtract 3s from the timestamp of the log data generated by node b to complete the error correction on the timestamp of the log data of node b, so that the time of node b is synchronized with the time of node a.

[0084] Based on the above Figure 5 In some embodiments of the present application, as shown in Figure 6 As shown, in the above step 103, statistical analysis is performed on the calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order to obtain indicator data for characterizing system stability, which may include: steps 601 to 602.

[0085] Step 601, calculating the time consumed by each calling process of the system in accordance with a preset module calling sequence according to the timestamp of the error-corrected log data.

[0086] Step 602, based on the time consumed by each calling process of the system that complies with the preset module calling sequence, calculate the average time consumed, the median time consumed, and one or more indicator data among the 95 lines for characterizing the stability of the system.

[0087] In actual applications, there may be multiple calling processes that comply with the preset module calling sequence. For example, if the function of the calling process is the system login function, it is possible that multiple users may perform system login operations at the same time in the same time period. In this case, the system will have multiple calling processes that are all system login operations. Therefore, when detecting the stability of the system login function, it is necessary to calculate the time consumed by each calling process that complies with the preset module calling sequence corresponding to the system login function based on the timestamp of the log data after error correction. Then, based on the time consumed by each calling process that complies with the preset module calling sequence of the system, the average time consumed, the median time consumed, and one or more of the 95 lines of the calling process that complies with the preset module calling sequence of the system login function are calculated to obtain indicator data for the stability of the system login function.

[0088] For example, the calling process that conforms to the preset module calling order corresponding to the system login function is: module B first calls module A, then module A calls module B, and then module C calls module A; the time consumed to complete the entire process of module B calling module A, then module A calling module B, and then module C calling module A is the time consumed for a calling process that conforms to the preset module calling order corresponding to the system login function.

[0089] If the preset log keywords corresponding to the log data generated by the calling process that conforms to the preset module calling order corresponding to the system login function and the arrangement order of each preset log keyword are a1, b1, c1, d1, then after obtaining the log data of each module of each node of the system, the target log data containing the above-mentioned preset log keywords a1, b1, c1, d1 are filtered out from the log data, and the filtered target log data are sorted in chronological order according to the timestamp of the target log data. The calling process that conforms to the preset module calling order and the calling process that does not conform to the preset module calling order can be listed from the sorted target log data in the order of a1, b1, c1, d1.

[0090] For example, when the filtered target log data are sorted in chronological order to obtain target log data containing a1(1), a1(2), b1(1), c1(1), a1(3), b1(2), c1(2), b1(3), d1(1), d1(2), c1(3), d1(3), d1(4), three groups of target log data containing preset log keywords a1, b1, c1, d1, and one group of target log data containing only the preset log keyword d1 can be listed from the sorted target log data in the order of a1, b1, c1, d1, that is, three calling processes P1, P2, P3 that comply with the preset module calling order, and one calling process P4 that does not comply with the preset module calling order are obtained.

[0091] The target log data corresponding to the three calling processes P1, P2, and P3 that comply with the preset module calling sequence are target log data containing the preset log keywords "a1(1), b1(1), c1(1), and d1(1)", target log data containing the preset log keywords "a1(2), b1(2), c1(2), and d1(2)", and target log data containing the preset log keywords "a1(3), b1(3), c1(3), and d1(3)". The target log data corresponding to the calling process P4 that does not comply with the preset module calling sequence is target log data containing the preset log keyword d1(4).

[0092] By calculating the time interval between the timestamp after error correction of the target log data containing the preset log keyword a1(1) and the timestamp after error correction of the target log data containing the preset log keyword c1(1), the time T1 consumed by the calling process P1 can be obtained; by calculating the time interval between the timestamp after error correction of the target log data containing the preset log keyword a1(2) and the timestamp after error correction of the target log data containing the preset log keyword c1(2), the time T2 consumed by the calling process P2 can be obtained; by calculating the time interval between the timestamp after error correction of the target log data containing the preset log keyword a1(3) and the timestamp after error correction of the target log data containing the preset log keyword c1(3), the time T3 consumed by the calling process P3 can be obtained.

[0093] After obtaining the time T1, T2, T3 consumed by the calling processes P1, P2, P3 that conform to the preset module calling order, the average time consumed by the calling processes of the system that conform to the preset module calling order (T1+T2+T3) / 3, the median time consumed, and one or more of the 95 lines can be calculated to obtain indicator data used to characterize the stability of the system.

[0094] Optionally, in some embodiments of the present application, after the above step 601, it is also possible to determine the calling process in which the time consumed by the calling process of the system in accordance with the preset module calling sequence is greater than the time threshold based on the time consumed by each calling process in which the system complies with the preset module calling sequence, and mark the calling process in which the time consumed by the calling process of the system in accordance with the preset module calling sequence is greater than the time threshold as an abnormal calling process, so that operation and maintenance personnel can promptly discover potential risks of the system.

[0095] Optionally, in some embodiments of the present application, the above-mentioned statistical analysis of the calling processes that comply with the preset module calling order and the calling processes that do not comply with the preset module calling order to obtain indicator data for characterizing system stability may also include: obtaining the number of calling processes of the system that comply with the preset module calling order and the number of calling processes that do not comply with the preset module calling order, and obtaining the ratio of the number of calling processes of the system that comply with the preset module calling order to the total number of calling processes.

[0096] The total number of calling processes mentioned above refers to the sum of the number of calling processes that comply with the preset module calling sequence and the number of calling processes that do not comply with the preset module calling sequence.

[0097] In the embodiment of the present application, the log data of each module of each node of the system is obtained, and then the log data is screened according to the preset log keywords, and the calling process of the system that meets the preset module calling sequence and the calling process that does not meet the preset module calling sequence are determined according to the screening results and the timestamp of each log data; thereby further statistically analyzing the calling process, the average time consumption, the median time consumption, one or more index data of the 95 lines for characterizing the stability of the system are obtained, and the ratio of the number of calling processes that meet the preset module calling sequence to the total number of calling processes of the system, so that the operation and maintenance personnel can know whether the stability of the system can meet the requirements after obtaining these index data, and realize the detection of system stability, and by obtaining the above-mentioned calling process, it can also assist the operation and maintenance personnel to obtain log data related to system failures, which is conducive to timely discovering the potential risks of the system and improving the ease of operation and maintenance of the system. Compared with conventional technologies, the detection method of system stability provided by the present application has the characteristics of strong adaptability and non-invasiveness, and can outline the operating status between the various modules of the system at a relatively low cost without modifying the system.

[0098] It should be noted that, for the sake of simplicity of description, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps may be performed in other orders.

[0099] Figure 7 A schematic structural diagram of a system stability detection device 700 provided in an embodiment of the present application is shown, which includes an acquisition unit 701, a determination unit 702 and an analysis unit 703.

[0100] The acquisition unit 701 is used to acquire the log data of each module of each node of the system.

[0101] Since the method for detecting the stability of the system in the present application is based on the log data of each module of each node of the system, it is necessary to obtain the log data of each module of each node of the system.

[0102] In the embodiment of the present application, the above system can be a centralized business system or a distributed business system.

[0103] like Figure 2 As shown, the system may include multiple nodes, wherein node A includes module A, module B and module C, and node B also includes module A, module B and module C.

[0104] Specifically, when obtaining the log data of each module of each node of the system, you can collect or monitor by module, and mark the monitored log data to obtain the log data of each module of each node of the system. For example, "log Ab" is used to represent the log of module A from node b.

[0105] The determination unit 702 is used to filter the log data according to preset log keywords, and determine the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the filtering result and the timestamp of each log data.

[0106] Specifically, before filtering the log data according to the preset log keywords, and determining the calling process of the system that complies with the preset module calling order and the calling process that does not comply with the preset module calling order based on the filtering results and the timestamp of each log data, it is necessary to first obtain the preset module calling order between the modules of the system and the preset log keywords.

[0107] For example, the calling sequence between the modules of the system input by the user may be obtained, and the calling sequence may be used as the preset module calling sequence.

[0108] In the embodiment of the present application, the above-mentioned preset module calling sequence may be a calling sequence between various modules of various nodes of the system pre-set by the user. Figure 3 The diagram is a schematic diagram of the calling sequence between modules provided by the embodiment of the present application. In the diagram, the calling sequence between the modules is: module B first calls module A, then module A calls module B, then module C calls module A, and finally, module C is called by other modules. It should be noted that Figure 3 The modules shown may be individual modules within the same node or modules within different nodes.

[0109] In addition, the above-mentioned preset log keywords are log keywords pre-set by the user for filtering the log data of the system. For example, the log keywords may be keywords such as "user enters user name", "user enters password", "user clicks to log in", etc.

[0110] The analysis unit 703 is used to perform statistical analysis on the calling process to obtain index data for characterizing system stability.

[0111] In an embodiment of the present application, after obtaining the above-mentioned calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order, statistical analysis can be performed on the calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order to obtain indicator data for characterizing system stability.

[0112] Among them, the indicator data may include the average time consumption, median time consumption, one or more indicator data in the 95 lines for characterizing the stability of the system, and the ratio of the number of calling processes between modules that meet the preset module calling sequence to the total number of calling processes; after obtaining these indicator data, the operation and maintenance personnel can know whether the stability of the system can meet the requirements. Therefore, the present application realizes the detection of system stability, and by obtaining the above-mentioned calling processes that meet the preset module calling sequence and the calling processes that do not meet the preset module calling sequence, the present application can also assist the operation and maintenance personnel in obtaining log data related to system failures, which is conducive to timely discovering potential risks of the system and improving the ease of operation and maintenance of the system.

[0113] In some embodiments of the present application, the above-mentioned determination unit 702 is also specifically used to: match the log data with the preset log keyword to obtain target log data that successfully matches the log keyword, and a target module corresponding to the target log data; sort the target modules according to the timestamp of the target log data and the preset module calling order to obtain the calling process of the system that complies with the preset module calling order, and the calling process that does not comply with the preset module calling order.

[0114] The matching of the log data with the preset log keyword refers to filtering out the log data containing the preset log keyword to obtain target log data, and the module generating the target log data is the target module corresponding to the target log data.

[0115] The timestamp of the above-mentioned target log data refers to the generation time of the target log data. In the process of sorting the target modules according to the timestamp of the target log data and the preset module calling order, the target log data can be sorted according to the timestamp of the target log data first, and then the target modules corresponding to the sorted target log data can be sorted according to the preset module calling order to obtain the calling process that complies with the preset module calling order and the calling process that does not comply with the preset module calling order.

[0116] Among them, the above-mentioned calling process that complies with the preset module calling order refers to the calling process in which the calling order of each module is the same as the preset module calling order, and the above-mentioned calling process that does not comply with the preset module calling order refers to the calling process in which the calling order of each module is different from the preset module calling order.

[0117] For example, the default module calling order is as follows Figure 3 The calling sequence shown is: module B calls module A first, then module A calls module B, then module C calls module A, and finally, module C is called by other modules. The calling process that complies with this calling sequence is the calling process that complies with the preset module calling sequence, otherwise, it is the calling process that does not comply with the preset module calling sequence.

[0118] In some embodiments of the present application, the above-mentioned system stability detection device may further include: a correction unit; the correction unit is used to correct the time of each node of the system before performing statistical analysis on the calling process to obtain indicator data for characterizing the stability of the system, so as to obtain the time error of each node; and perform error correction on the timestamp of the log data according to the time error of each node to improve the authenticity of the above-mentioned indicator data.

[0119] In some embodiments of the present application, the above-mentioned analysis unit 703 is also specifically used to: calculate the time consumed by each calling process of the system that complies with the preset module calling order based on the timestamp of the log data after error correction; calculate the time consumed by each calling process of the system that complies with the preset module calling order to obtain the average time consumed, the median time consumed, and one or more of the 95 lines of the calling process of the system that complies with the preset module calling order, which are used to characterize the indicator data of system stability.

[0120] In actual applications, there may be multiple calling processes that comply with the preset module calling sequence. For example, if the function of the calling process is the system login function, it is possible that multiple users may perform system login operations at the same time in the same time period. In this case, the system will have multiple calling processes that are all system login operations. Therefore, when detecting the stability of the system login function, it is necessary to calculate the time consumed by each calling process that complies with the preset module calling sequence corresponding to the system login function based on the timestamp of the log data after error correction. Then, based on the time consumed by each calling process that complies with the preset module calling sequence of the system, the average time consumed, the median time consumed, and one or more of the 95 lines of the calling process that complies with the preset module calling sequence of the system login function are calculated to obtain indicator data for the stability of the system login function.

[0121] For example, the calling process that conforms to the preset module calling order corresponding to the system login function is: module B first calls module A, then module A calls module B, and then module C calls module A; the time consumed to complete the entire process of module B calling module A, then module A calling module B, and then module C calling module A is the time consumed for a calling process that conforms to the preset module calling order corresponding to the system login function.

[0122] If the preset log keywords corresponding to the log data generated by the calling process that conforms to the preset module calling order corresponding to the system login function and the arrangement order of each preset log keyword are a1, b1, c1, d1, then after obtaining the log data of each module of each node of the system, the target log data containing the above-mentioned preset log keywords a1, b1, c1, d1 are filtered out from the log data, and the filtered target log data are sorted in chronological order according to the timestamp of the target log data. The calling process that conforms to the preset module calling order and the calling process that does not conform to the preset module calling order can be listed from the sorted target log data in the order of a1, b1, c1, d1.

[0123] For example, when the filtered target log data are sorted in chronological order to obtain target log data containing a1(1), a1(2), b1(1), c1(1), a1(3), b1(2), c1(2), b1(3), d1(1), d1(2), c1(3), d1(3), d1(4), three groups of target log data containing preset log keywords a1, b1, c1, d1, and one group of target log data containing only the preset log keyword d1 can be listed from the sorted target log data in the order of a1, b1, c1, d1, that is, three calling processes P1, P2, P3 that comply with the preset module calling order, and one calling process P4 that does not comply with the preset module calling order are obtained.

[0124] The target log data corresponding to the three calling processes P1, P2, and P3 that comply with the preset module calling sequence are target log data containing the preset log keywords "a1(1), b1(1), c1(1), and d1(1)", target log data containing the preset log keywords "a1(2), b1(2), c1(2), and d1(2)", and target log data containing the preset log keywords "a1(3), b1(3), c1(3), and d1(3)". The target log data corresponding to the calling process P4 that does not comply with the preset module calling sequence is target log data containing the preset log keyword d1(4).

[0125] By calculating the time interval between the timestamp after error correction of the target log data containing the preset log keyword a1(1) and the timestamp after error correction of the target log data containing the preset log keyword c1(1), the time T1 consumed by the calling process P1 can be obtained; by calculating the time interval between the timestamp after error correction of the target log data containing the preset log keyword a1(2) and the timestamp after error correction of the target log data containing the preset log keyword c1(2), the time T2 consumed by the calling process P2 can be obtained; by calculating the time interval between the timestamp after error correction of the target log data containing the preset log keyword a1(3) and the timestamp after error correction of the target log data containing the preset log keyword c1(3), the time T3 consumed by the calling process P3 can be obtained.

[0126] After obtaining the time T1, T2, T3 consumed by the calling processes P1, P2, P3 that conform to the preset module calling order, the average time consumed by the calling processes of the system that conform to the preset module calling order (T1+T2+T3) / 3, the median time consumed, and one or more of the 95 lines can be calculated to obtain indicator data used to characterize the stability of the system.

[0127] In some embodiments of the present application, the above-mentioned analysis unit 703 is also specifically used to: after calculating the time consumed by each calling process of the system that complies with the preset module calling order according to the timestamp of the log data after error correction, determine the calling process in which the time consumed by the calling process of the system that complies with the preset module calling order is greater than the time threshold according to the time consumed by each calling process of the system that complies with the preset module calling order; and mark the calling process in which the time consumed by the calling process of the system that complies with the preset module calling order is greater than the time threshold as an abnormal calling process, so that operation and maintenance personnel can promptly discover potential risks of the system.

[0128] In some embodiments of the present application, the above-mentioned analysis unit 703 is also specifically used to: obtain the number of calling processes of the system that comply with the preset module calling order, and the number of calling processes that do not comply with the preset module calling order, and obtain the ratio of the number of calling processes of the system that comply with the preset module calling order to the total number of calling processes.

[0129] The total number of calling processes mentioned above refers to the sum of the number of calling processes that comply with the preset module calling sequence and the number of calling processes that do not comply with the preset module calling sequence.

[0130] In some embodiments of the present application, the above-mentioned determination unit 702 is also specifically used to: before filtering the log data according to the preset log keywords, and determining the calling process of the system that complies with the preset module calling order and the calling process that does not comply with the preset module calling order according to the filtering results and the timestamp of each log data, obtain the preset module calling order between the modules of the system, and the preset log keywords.

[0131] It should be noted that, for the convenience and simplicity of description, the specific working process of the above-described system stability detection device 700 can refer to the above-mentioned Figures 1 to 6 The corresponding process of the method described in will not be repeated here.

[0132] like Figure 8 As shown, the present application provides a terminal for implementing the above-mentioned system stability detection method, and the terminal 8 may include: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80, such as a system stability detection program. When the processor 80 executes the computer program 82, the steps in the above-mentioned system stability detection method embodiments are implemented, for example, Figure 1 Alternatively, when the processor 80 executes the computer program 82, the functions of each module / unit in the above device embodiments are realized, for example, Figure 7 The functions of units 701 to 703 are shown.

[0133] The computer program may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program in the terminal. For example, the computer program may be divided into an acquisition unit, a determination unit, and an analysis unit, and the specific functions of each unit are as follows:

[0134] An acquisition unit, used to acquire log data of each module of each node of the system;

[0135] a determination unit, configured to filter the log data according to preset log keywords, and determine the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the filtering result and the timestamp of each log data;

[0136] The analysis unit is used to perform statistical analysis on the calling process to obtain index data for characterizing system stability.

[0137] The terminal may be a computing device such as a computer or a server. The terminal may include, but is not limited to, a processor 80 and a memory 81. Those skilled in the art will appreciate that Figure 8 It is only an example of a terminal and does not constitute a limitation on the terminal. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal may also include input and output devices, network access devices, buses, etc.

[0138] The processor 80 may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0139] The memory 81 may be an internal storage unit of the terminal, such as a hard disk or memory of the terminal. The memory 81 may also be an external storage device of the terminal, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal. Further, the memory 81 may also include both an internal storage unit of the terminal and an external storage device. The memory 81 is used to store the computer program and other programs and data required by the terminal. The memory 81 may also be used to temporarily store data that has been output or is to be output.

[0140] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0141] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0142] 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, or a combination of computer software and electronic hardware. 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 to be beyond the scope of this application.

[0143] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. 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. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0144] 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 solution of this embodiment.

[0145] In addition, each functional unit in each embodiment of the present application 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-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0146] If the integrated module / 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 present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0147] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A method for detecting system stability, characterized in that: include: Get the log data of each module of each node in the system; The log data is screened according to preset log keywords, and the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence are determined according to the screening result and the timestamp of each log data; Performing statistical analysis on the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence to obtain index data for characterizing system stability; The indicator data include the average time consumption, the median time consumption, one or more indicator data in the 95 lines for characterizing the stability of the system, and the ratio of the number of calling processes between modules that conform to the preset module calling order to the total number of calling processes.

2. The method for detecting system stability according to claim 1, characterized in that: The step of screening the log data according to the preset log keywords, and determining the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the screening result and the timestamp of each log data, includes: Matching the log data with the preset log keyword to obtain target log data that successfully matches the log keyword and a target module corresponding to the target log data; The target modules are sorted according to the timestamps of the target log data and the preset module calling sequence, so as to obtain the calling processes of the system that comply with the preset module calling sequence and the calling processes that do not comply with the preset module calling sequence.

3. The method for detecting system stability according to claim 1, characterized in that: Before performing statistical analysis on the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence to obtain index data for characterizing system stability, the method includes: Correcting the time of each node of the system to obtain the time error of each node; Error correction is performed on the timestamp of the log data according to the time errors of the various nodes.

4. The method for detecting system stability according to claim 3, characterized in that: The statistical analysis of the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence is performed to obtain index data for characterizing system stability, including: Calculate the time consumed by each calling process of the system that complies with the preset module calling sequence according to the timestamp of the log data after error correction; According to the time consumed by each calling process of the system that complies with the preset module calling sequence, the average time consumed, the median time consumed, and one or more indicator data among the 95 lines for characterizing the stability of the system are calculated.

5. The method for detecting system stability according to claim 4, characterized in that: After calculating the time consumed by each calling process of the system that complies with the preset module calling sequence according to the timestamp of the log data after error correction, the method includes: Determine, according to the time consumed by each calling process of the system that complies with the preset module calling sequence, a calling process in which the time consumed by the calling process of the system that complies with the preset module calling sequence is greater than a time threshold; A calling process in which the time consumed in the calling process of the system that complies with the preset module calling sequence is greater than the time threshold is marked as an abnormal calling process.

6. The method for detecting system stability according to claim 1, characterized in that: The statistical analysis of the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence to obtain index data for characterizing system stability also includes: The number of calling processes of the system that conform to the preset module calling order and the number of calling processes that do not conform to the preset module calling order are obtained, and the ratio of the number of calling processes of the system that conform to the preset module calling order to the total number of calling processes is obtained.

7. The method for detecting system stability according to claim 1, characterized in that: Before the log data is screened according to the preset log keywords, and the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence are determined according to the screening result and the timestamp of each log data, the method includes: Get the preset module calling sequence and preset log keywords between various modules of the system.

8. A system stability detection device, characterized in that: include: An acquisition unit, used to acquire log data of each module of each node of the system; a determination unit, configured to filter the log data according to preset log keywords, and determine the calling process of the system that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence according to the filtering result and the timestamp of each log data; An analysis unit, used for performing statistical analysis on the calling process that complies with the preset module calling sequence and the calling process that does not comply with the preset module calling sequence, to obtain index data for characterizing system stability; The indicator data include the average time consumption, the median time consumption, one or more indicator data in the 95 lines for characterizing the stability of the system, and the ratio of the number of calling processes between modules that conform to the preset module calling order to the total number of calling processes.

9. A terminal 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 steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Process call exception identification method and device

    CN110489263A

  • Link anomaly identification method, server and computer readable storage medium

    CN110737592A