Fault Handling Method, Device, Computer Equipment and Storage Medium

By constructing a change record table and correlation calculation, we quickly locate the change information of system failures, solving the problem of low fault repair efficiency in large systems, and achieving efficient fault handling.

CN114237952BActive Publication Date: 2025-07-29CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111521759.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-07-29
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

The frequent version changes of the prior art in large systems lead to low fault repair efficiency, making it difficult to determine the change information that causes the fault in a short time, affecting the user experience.

Method used

Build a change record table, obtain system change information at preset times, record change types and timestamps, and when the system fails, extract the most recent change information, calculate the correlation between the fault type and the change type, determine the target change information and process it.

Benefits of technology

By quickly locate fault-related change information, improve system fault repair efficiency and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114237952B_ABST
    Figure CN114237952B_ABST
Patent Text Reader

Abstract

This application belongs to the field of cloud monitoring technology and provides a fault handling method, device, computer device, and storage medium. Among them, the method includes: obtaining the first change information of the current system at preset intervals, recording the first change information in the change record table according to the change type, marking the timestamp of the first change information, when a system fault is detected, traversing the timestamps of the first change information in the change record table, extracting the first change information closest to the current time from the change record table to obtain the target change information, extracting the fault type of the fault, calculating the correlation degree between the fault type and the change type of the target change information, when it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information, thereby improving the repair efficiency of system faults and enhancing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of cloud monitoring. Specifically, this application relates to a fault handling method, apparatus, computer device, and storage medium. Background Art

[0002] With the continuous development of technology, the business requirements of application systems are gradually increasing, and the timeliness of demand realization is also getting higher and higher. As a result, new versions are frequently released in the production environment for version changes, and frequent version changes will increase the probability of system failures.

[0003] For the occurred system failures, generally, every time a system failure occurs, all the change information of the current system is traversed to determine whether there is a change and handle the failure. However, when a system is relatively large and involves many modules, it is difficult to determine the change information that causes the failure in a short time to handle the failure in a timely manner, resulting in a slow repair efficiency of the system failure and affecting the user experience. Summary of the Invention

[0004] The main purpose of this application is to provide a fault handling method, apparatus, computer device, and storage medium to quickly find the change information and process it when the system fails, so as to improve the repair efficiency of system failures.

[0005] To achieve the above invention purpose, this application provides a fault handling method, which includes:

[0006] Construct a change record table, obtain the change information of the current system at preset intervals, preprocess the change information to obtain the first change information;

[0007] Determine the change type of the first change information, record the first change information in the change record table according to the change type, and mark the timestamp when the first change information is recorded in the change record table;

[0008] When it is detected that the system fails, traverse the timestamps of the first change information in the change record table, and extract the first change information closest to the current time from the change record table to obtain the target change information;

[0009] Extract the fault type of the fault, and calculate the correlation degree between the fault type and the change type of the target change information;

[0010] When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information.

[0011] Preferably, the obtaining the change information of the current system at preset intervals includes:

[0012] Detect the requirement change of the current system at preset intervals;

[0013] When a requirement change is detected, obtain the change version information;

[0014] Compare the change version information with the initial version information in the system to obtain the differential version information, and determine the differential version information as the change information.

[0015] Preferably, the processing of the fault based on the target change information includes:

[0016] Receive the alarm prompt generated when the system fails, and determine the alarm location corresponding to the alarm prompt;

[0017] When the alarm location is the modified point corresponding to the target change information, adjust the modified point corresponding to the target change information to handle the fault.

[0018] Preferably, the system includes a main server and multiple slave servers, and the detection of the system failure includes:

[0019] Regularly scan the main server and multiple slave servers;

[0020] When it is monitored that the main server or any one of the slave servers is in a warning state or a failure state, it is determined that the system has failed.

[0021] Preferably, the regular scanning of the main server includes:

[0022] Set a timer for the main server to enable the main server to regularly extract the performance parameters during operation; wherein, the performance parameters include the total CPU utilization rate, the memory utilization rate, and the network bandwidth occupancy rate;

[0023] Receive the performance parameters sent by the main server;

[0024] Judge whether the main server has a fault according to the performance parameters;

[0025] If so, it is monitored that the main server is in a warning state or a failure state.

[0026] Preferably, the calculation of the correlation degree between the fault type and the change type of the target change information includes:

[0027] Extract the keywords characterizing the fault type to obtain the first keyword;

[0028] Extract the keywords characterizing the change type of the target change information to obtain the second keyword;

[0029] Use a preset word vector tool to convert the first keyword and the second keyword into vectors respectively, obtaining a first word vector corresponding to the first keyword and a second word vector corresponding to the second keyword;

[0030] Calculate the cosine distance between the first word vector and the second word vector to obtain the correlation degree between the fault type and the change type of the target change information.

[0031] Further, after calculating the correlation degree between the fault type and the change type of the target change information, it further includes:

[0032] When it is determined that the correlation degree is not greater than a preset correlation degree, query the change information of other systems related to the current system;

[0033] Process the fault based on the change information of other systems.

[0034] This application also provides a fault processing device, which includes:

[0035] A construction module for constructing a change record table, obtaining the change information of the current system every preset time, preprocessing the change information to obtain first change information;

[0036] A determination module for determining the change type of the first change information, recording the first change information in the change record table according to the change type, and marking the timestamp when the first change information is recorded in the change record table;

[0037] A detection module for, when detecting that a system fails, traversing the timestamps of the first change information in the change record table, and extracting the first change information closest to the current time from the change record table to obtain target change information;

[0038] A calculation module for extracting the fault type of the fault and calculating the correlation degree between the fault type and the change type of the target change information;

[0039] A processing module for, when it is determined that the correlation degree is greater than a preset correlation degree, determining that the fault has corresponding target change information, and processing the fault based on the target change information.

[0040] This application also provides a computer device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the method described in any one of the above.

[0041] This application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the method described in any one of the above.

[0042] A fault handling method, device, computer device and storage medium provided by this application. By constructing a change record table, obtaining the change information of the current system at preset intervals, preprocessing the change information to obtain the first change information, determining the change type of the first change information, recording the first change information in the change record table according to the change type, and marking the timestamp when the first change information is recorded in the change record table. When it is detected that a system fault occurs, traverse the timestamps of the first change information in the change record table, extract the first change information closest to the current time from the change record table to obtain the target change information, extract the fault type of the fault, calculate the correlation degree between the fault type and the change type of the target change information. When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has a corresponding target change information, and the fault is processed based on the target change information. Thus, by regularly collecting the change information with the system as the main line, the relevant change information closest to the current time can be quickly obtained when a fault occurs, which is used to determine the recovery plan, improve the repair efficiency of system faults, and enhance the user experience. Brief Description of the Drawings

[0043] Figure 1 It is a schematic flowchart of the fault handling method according to an embodiment of this application;

[0044] Figure 2 It is a schematic block diagram of the structure of the fault handling device according to an embodiment of this application;

[0045] Figure 3 It is a schematic block diagram of the structure of the computer device according to an embodiment of this application.

[0046] The realization, functional characteristics and advantages of the purpose of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments

[0047] In order to make the purpose, technical solutions and advantages of this application clearer, the following further details this application with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0048] A fault handling method proposed by this application takes the system as the execution entity. The system includes multiple servers, and the server can be an independent server or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0049] This fault handling method is used to solve the technical problem that in the existing system, every time a fault occurs, all change information of the current system is traversed to determine whether there is a change and handle the fault. However, when a system is relatively large and involves many modules, it is difficult to determine the change information that causes the fault in a short time to handle the fault in a timely manner, resulting in a slow repair efficiency of the system fault. Refer to Figure 1 , in one embodiment, the fault handling method includes:

[0050] S11. Construct a change record table, obtain the change information of the current system at preset intervals, preprocess the change information to obtain the first change information;

[0051] S12. Determine the change type of the first change information, record the first change information in the change record table according to the change type, and mark the timestamp when the first change information is recorded in the change record table;

[0052] S13. When it is detected that the system has a fault, traverse the timestamps of the first change information in the change record table, and extract the first change information closest to the current time from the change record table to obtain the target change information;

[0053] S14. Extract the fault type of the fault, and calculate the correlation degree between the fault type and the change type of the target change information;

[0054] S15. When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information.

[0055] As described in step S11 above, in this embodiment, a change record table can be constructed. This change record table is used to record the change situation of the system. The system can include multiple servers. Then, at preset intervals, the change information with the system as the main line is collected, and the change information is preprocessed. The preprocessing process can include format conversion of the change information, deletion of meaningless characters, and classification processing, etc. Finally, the first change information is obtained. Among them, the change information can include: requested change information, change information of the application program version, parameters for which the system has changed, production changes initiated by operations, etc. The requests involve changes in middleware, network, host, database, and security, etc., which are the main sources of production changes. The change name will indicate which server the change is related to; the production changes initiated by operations are mainly deployment requests and application configurations proposed by operations, data modifications in the database, and related changes in database batch processing. Such changes will have system and deployment unit information; in addition, there are function switches proposed by development, which will affect batch business functions and will have system-related markings; the version information comes from the version update of the application program of the system.

[0056] Specifically, in this embodiment, the request interfaces of each server can be connected, and change information can be automatically obtained from the request interfaces of each server without manual searching. In addition, if an external data interface is provided, the external data interface is called to obtain change information. At this time, the number of database connections and the reading frequency need to be set to 2 times a day to avoid putting pressure on the system.

[0057] As described in step S12 above, in this embodiment, the change type of the first change information is determined, the first change information is recorded in the change record table according to the change type, and the timestamp when the first change information is recorded in the change record table is marked, such as marked as November 23, 2021. Among them, the change types include changes in application programs, changes in stored data, and so on.

[0058] As described in steps S13 - S15 above, when a system failure is detected, the current time of the system is obtained, and the timestamp of each first change information in the change record table is traversed. According to this timestamp, the first change information closest to the current time is found from the change record table, and the first change information closest to the current time is used as the target change information.

[0059] For example, when a system failure is detected, there are three pieces of first change information A, B, and C recorded in the change record table, and the corresponding timestamps are October 23, 2021, October 29, 2021, and November 20, 2021 respectively. The current time of the system is November 23, 2021. Then the timestamp closest to the current time is November 20, 2021, and the first change information C corresponding to November 20, 2021 is used as the target change information.

[0060] In addition, in this embodiment, the failure type of the failure is extracted. The failure type may include that the CPU usage rate of the system is greater than the preset usage rate, the display interface goes wrong, and so on. Then the correlation degree between the failure type and the change type of the target change information is calculated. This correlation degree is used to characterize the correlation between the failure type and the target change information, and it is determined whether the correlation degree is greater than the preset correlation degree. When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the failure has a corresponding target change information, and the failure is processed based on the target change information, so as to quickly find the target change information that affects the current system failure and process the failure based on the target change information, such as adjusting the target change information to solve the failure, so that when the system fails, the most recent relevant changes to this system are preferentially viewed to improve the efficiency of troubleshooting.

[0061] A fault handling method provided by this application constructs a change record table, obtains the change information of the current system at preset intervals, preprocesses the change information to obtain the first change information, determines the change type of the first change information, records the first change information in the change record table according to the change type, and marks the timestamp when the first change information is recorded in the change record table. When it is detected that the system fails, traverse the timestamps of the first change information in the change record table, extract the first change information closest to the current time from the change record table to obtain the target change information, extract the fault type of the fault, calculate the correlation degree between the fault type and the change type of the target change information. When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has a corresponding target change information, and the fault is processed based on the target change information. Thus, by regularly collecting the change information with the system as the main line, the relevant change information closest to the time of the fault can be quickly obtained when the fault occurs, which is used to determine the recovery plan, improve the repair efficiency of system faults, and enhance the user experience.

[0062] In one embodiment, the obtaining the change information of the current system at preset intervals may specifically include:

[0063] Detect the requirement changes of the current system at preset intervals;

[0064] When a requirement change is detected, obtain the change version information;

[0065] Compare the change version information with the initial version information in the system to obtain the differential version information, and determine the differential version information as the change information.

[0066] In this embodiment, the requirement changes of the current system can be detected at preset intervals. For example, it can be detected every two days whether there are changes in the application program version of the system, whether new functions are added, etc. When a requirement change is detected, the change version information of the requirement is obtained. The change version information is generally the latest version information, which includes the change type, change code, etc. of the requirement. At the same time, the initial version information in the system is obtained, and the change version information is compared with the initial version information in the system to obtain the comparison result. The comparison result contains the differential information between the change version information and the initial version information in the system, that is, the differential version information, and the differential version information is determined as the change information to record the change situation of the current system in real time.

[0067] In one embodiment, the processing the fault based on the target change information may specifically include:

[0068] Receive the alarm prompt generated when the system fails, and determine the alarm location corresponding to the alarm prompt;

[0069] When the alarm location is the modification point corresponding to the target change information, adjust the modification point corresponding to the target change information to handle the fault.

[0070] In this embodiment, when receiving an alarm prompt generated when a system failure occurs, determine the alarm location corresponding to the alarm prompt, such as the server where the failure occurs. When the alarm location is the modification point corresponding to the differential version information, adjust the differential version information to accurately find the modification point where the system failure occurs, so as to quickly handle the fault without rolling back to the original version. Among them, the alarm prompt includes an alarm level and an alarm type, and the alarm level is used to characterize the severity of the fault.

[0071] For example, when it is determined that the alarm location corresponding to the alarm prompt is that a certain database cannot store data, and the modification point corresponding to the differential version information is the relevant code of the storage function in the database, then adjust the relevant code of the storage function in the database to ensure the normal storage of data.

[0072] In one embodiment, the server can obtain the risk type of the modification point, divide the risk level of the modification point according to the risk type of the modification point. When the risk level of the modification point is a preset level, adjust the preset initial risk value according to the preset range impact factor or the preset probability impact factor to obtain the total risk score of the modification point, and generate a modification point detail report including the total risk score, so that the server or developer can adjust the modification point corresponding to the target change information based on the modification point detail report to solve the fault.

[0073] Among them, the risk type of the modification point may include process risk, interface risk, network risk, database risk, etc. The corresponding modification point is the modification of the code related to the process, interface, network or database in the target change information. A mapping table of risk type and risk level is pre-stored in the server, and the risk level corresponding to the risk type can be queried according to the mapping table. After the server determines the risk level, adjust the initial risk value according to the risk level, that is, when the risk level of the modification point is a preset level, such as level one, the probability of the modification point having a risk will not change with time, and the influence area of the modification point is relatively large. Adjust the initial risk value according to the preset range impact factor or the preset probability impact factor to obtain the total risk score of the modification point. For example, after multiplying the preset range impact factor or the preset probability impact factor by the initial risk value, the total risk score of the modification point is obtained. Among them, the preset range impact factor can be flexibly set according to the access quantity, etc., and the preset probability impact factor can be flexibly set according to the business situation, etc.

[0074] For example, the risk type is an interface type risk, the risk level corresponding to the interface type risk is level one. When the total risk score at level one exceeds the preset total risk value and the corresponding adjustment plan is version rollback, the server deletes the modified points corresponding to the target change information and returns to the original version. Another example is that the risk type is a network type risk, the risk level corresponding to the network type risk is level two. When the total risk score at level two exceeds the preset total risk value, the corresponding handling plan is traffic limiting.

[0075] In one embodiment, the system includes a main server and multiple slave servers. The detection of a system failure may specifically include:

[0076] Periodically scan the main server and multiple slave servers;

[0077] When it is monitored that the main server or any one of the slave servers is in a warning state or a failure state, it is determined that the system has failed.

[0078] In this embodiment, the main server and multiple slave servers can be periodically scanned within a thread to obtain the status information of the main server and multiple slave servers. When the main server or the slave servers are running normally, the status information shows a normal state. When the status information received from the main server or any one of the slave servers is a warning state, it is determined that the system has failed, so as to monitor the status of the system in real time and give an alarm in time.

[0079] In one embodiment, the periodic scanning of the main server may specifically include:

[0080] Set a timer for the main server to enable the main server to periodically extract performance parameters during operation; wherein, the performance parameters include the total CPU utilization rate, memory utilization rate, and network bandwidth occupancy rate;

[0081] Receive the performance parameters sent by the main server;

[0082] Judge whether the main server has a failure according to the performance parameters;

[0083] If so, it is monitored that the main server is in a warning state or a failure state.

[0084] In this embodiment, the system can set a timer for the master server. When the timing time of the timer is reached, the master server regularly extracts the performance parameters during operation. The performance parameters include the total CPU utilization rate, memory utilization rate, network bandwidth occupancy rate, etc. of the master server. Then, it receives the performance parameters sent by the master server, compares the performance parameters of the master server with the standard performance parameters one by one to obtain a comparison result, and determines whether the master server has a fault based on the comparison result of the performance parameters. For example, when the memory utilization rate of the master server is greater than the highest memory utilization rate, it is determined that the master server has a fault; or when the temperature of the master server is greater than the highest allowable temperature, it is determined that the master server has a fault. The fault monitoring method of the slave server is the same and will not be elaborated here. When at least one of the multiple slave servers is detected to be in a warning state or a fault state, it is detected that the system has a fault.

[0085] In one embodiment, calculating the correlation degree between the fault type and the change type of the target change information may specifically include:

[0086] Extract keywords characterizing the fault type to obtain the first keyword;

[0087] Extract keywords characterizing the change type of the target change information to obtain the second keyword;

[0088] Use a preset word vector tool to convert the first keyword and the second keyword into vectors respectively, to obtain the first word vector corresponding to the first keyword and the second word vector corresponding to the second keyword;

[0089] Calculate the cosine distance between the first word vector and the second word vector to obtain the correlation degree between the fault type and the change type of the target change information.

[0090] Among them, the first keyword is a word describing the fault type, generally a noun, and the second keyword is a word describing the change type of the target change information, generally also a noun. When both the fault type and the change type are in text form, in this embodiment, keywords can be directly extracted from the fault type to obtain the first keyword; keywords can be directly extracted from the change type of the target change information to obtain the second keyword.

[0091] Among them, the word vector tool includes Distributed representation and word2vec. Distributed representation maps each word into a K-dimensional real number vector (K is generally a hyperparameter in the model) through training, and judges the semantic similarity between them through the distance between words (such as cosine similarity, Euclidean distance, etc.). Word2vec is an efficient tool for representing words as real-valued vectors. Using the idea of deep learning, through training, the processing of text content is simplified to vector operations in a K-dimensional vector space, and the similarity on the vector space can be used to represent the semantic similarity of the text.

[0092] In this embodiment, the word vector tool word2vec can be used to convert the first keyword into a word vector to obtain the first word vector. At the same time, the word vector tool word2vec is used to convert the second keyword into a word vector to obtain the second word vector. Then, the cosine distance between the first word vector and the second word vector is calculated and used as the correlation degree between the fault type and the change type of the target change information.

[0093] Among them, word vectors are a representation of words that enables computers to process them. In natural language processing related tasks, to hand natural language over to algorithms in machine learning for processing, it is usually necessary to first mathematize the language so that the machine can recognize and process it. Vectors are things that people abstract from nature and hand over to machines for processing. Basically, it can be said that vectors are the main way for people to input to machines.

[0094] The word vectors output by Word2vec can be used for many natural language processing related tasks, such as clustering, finding synonyms, part-of-speech analysis, etc. If words are regarded as features, then Word2vec can map the features into a K-dimensional vector space, and can seek a deeper feature representation for text data. Specifically, Word2vec takes the words in the context where a word is located as input, and that word itself as output. That is to say, given a context, it is hoped to roughly guess the word and its meaning. Through training in a large corpus, a weight model from the input layer to the hidden layer is obtained. After training is completed, the weights of each word to each dimension of the hidden layer are obtained, which are the vectors of each word.

[0095] In one embodiment, when there are multiple first keywords representing the fault type, the word vector tool word2vec is used to convert each first keyword into a word vector respectively to obtain multiple target word vectors, and the average value of the multiple target word vectors is calculated and used as the first word vector.

[0096] Similarly, when there are also multiple second keywords representing the change types of the target change information, the word vector tool word2vec is used to convert each second keyword into a word vector respectively, obtaining multiple reference word vectors, calculating the average value of the multiple reference word vectors, and taking the average value as the second word vector.

[0097] In one embodiment, after calculating the correlation degree between the fault type and the change type of the target change information, it may further include:

[0098] When it is determined that the correlation degree is not greater than the preset correlation degree, query the change information of other systems related to the current system;

[0099] Process the fault based on the change information of other systems.

[0100] In this embodiment, when it is determined that the correlation degree between the fault type and the change type of the target change information is not greater than the preset correlation degree, query the change information of other systems related to the current system, obtain the solution corresponding to the change information of other systems, and use the solution to process the fault in order to process the fault in a timely manner.

[0101] Refer to Figure 2 , this application embodiment also provides a fault processing device, including:

[0102] A construction module 11, configured to construct a change record table, obtain the change information of the current system every preset time, preprocess the change information, and obtain first change information;

[0103] A determination module 12, configured to determine the change type of the first change information, record the first change information in the change record table according to the change type, and mark the timestamp when the first change information is recorded in the change record table;

[0104] A detection module 13, configured to, when detecting that a system fails, traverse the timestamps of the first change information in the change record table, extract the first change information closest to the current time from the change record table, and obtain target change information;

[0105] A calculation module 14, configured to extract the fault type of the fault, and calculate the correlation degree between the fault type and the change type of the target change information;

[0106] A processing module 15, configured to, when it is determined that the correlation degree is greater than the preset correlation degree, determine that the fault has corresponding target change information, and process the fault based on the target change information.

[0107] In this embodiment, a change record table can be constructed. This change record table is used to record the change situation of the system. The system can include multiple servers. Then, at preset time intervals, change information with the system as the main line is collected, and the change information is preprocessed. The preprocessing process can include format conversion of the change information, deletion of meaningless characters, classification processing, etc., and finally the first change information is obtained. Among them, the change information can include: requested change information, change information of the application program version, parameters for which the system has changed, production changes initiated by operations, etc. The requests involve changes in middleware, network, host, database, and security, etc., which are the main sources of production changes. The change name will indicate which server the change is related to; the production changes initiated by operations are mainly deployment requests and application configurations proposed by operations, data modification in the database, and related changes in database batch processing. Such changes will have system and deployment unit information; in addition, there are function switches proposed by development, which will affect batch business functions and will have system-related markings; the version information comes from the version update of the application program in the system.

[0108] Specifically, in this embodiment, the request interfaces of each server can be connected, and change information can be automatically obtained from the request interfaces of each server without manual searching. In addition, if an external data interface is provided, the external data interface is called to obtain change information. At this time, the number of database connections and the reading frequency need to be set to 2 times per day to avoid putting pressure on the system.

[0109] This embodiment determines the change type of the first change information, records the first change information in the change record table according to the change type, and marks the timestamp when the first change information is recorded in the change record table, such as marked as November 23, 2021. Among them, the change types include changes in application programs, changes in stored data, etc.

[0110] In addition, when it is detected that the system fails, the current time of the system is obtained, and the timestamps of each first change information in the change record table are traversed. According to this timestamp, the first change information closest to the current time is found from the change record table, and the first change information closest to the current time is used as the target change information.

[0111] For example, when it is detected that the system fails, there are three pieces of first change information A, B, and C recorded in the change record table, and the corresponding timestamps are October 23, 2021, October 29, 2021, and November 20, 2021 respectively. The current time of the system is November 23, 2021. Then the timestamp closest to the current time is November 20, 2021, and the first change information C corresponding to November 20, 2021 is used as the target change information.

[0112] In addition, this embodiment extracts the fault type of the fault. The fault type may include that the CPU usage rate of the system is greater than the preset usage rate, the display interface goes wrong, etc. Then, the correlation degree between the fault type and the change type of the target change information is calculated. This correlation degree is used to characterize the correlation between the fault type and the target change information, and it is determined whether the correlation degree is greater than the preset correlation degree. When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information, so as to quickly find the target change information that affects the current system fault, and process the fault based on the target change information, such as adjusting the target change information to solve the fault, so that when the system fails, the relevant change of the system for the last time is preferentially viewed, and the efficiency of fault elimination is improved.

[0113] As described above, it can be understood that each component of the fault processing device proposed in this application can implement the functions of any one of the above-mentioned fault processing methods, and the specific structure will not be elaborated.

[0114] Refer to Figure 3 , this application embodiment also provides a computer device, whose internal structure can be as Figure 3 shown. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a storage medium and an internal memory. The storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and the computer program in the storage medium. The database of the computer device is used to store the relevant data of the fault processing method. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a fault processing method.

[0115] The above processor executes the above-mentioned fault processing method, including:

[0116] Construct a change record table, obtain the change information of the current system at preset intervals, and preprocess the change information to obtain the first change information;

[0117] Determine the change type of the first change information, record the first change information in the change record table according to the change type, and mark the timestamp when the first change information is recorded in the change record table;

[0118] When it is detected that the system fails, traverse the timestamps of the first change information in the change record table, and extract the first change information closest to the current time from the change record table to obtain the target change information;

[0119] Extract the fault type of the fault, and calculate the correlation degree between the fault type and the change type of the target change information;

[0120] When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information.

[0121] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a fault processing method is implemented, including the steps of:

[0122] Construct a change record table, obtain the change information of the current system at preset intervals, preprocess the change information to obtain the first change information;

[0123] Determine the change type of the first change information, record the first change information in the change record table according to the change type, and mark the timestamp when the first change information is recorded in the change record table;

[0124] When a system fault is detected, traverse the timestamps of the first change information in the change record table, and extract the first change information closest to the current time from the change record table to obtain the target change information;

[0125] Extract the fault type of the fault, and calculate the correlation degree between the fault type and the change type of the target change information;

[0126] When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information.

[0127] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium provided in this application and used in the embodiments can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0128] In summary, the greatest beneficial effect of this application is that:

[0129] A fault handling method, device, computer device, and storage medium provided by this application construct a change record table, obtain the change information of the current system at preset intervals, preprocess the change information to obtain first change information, determine the change type of the first change information, record the first change information in the change record table according to the change type, and mark the timestamp when the first change information is recorded in the change record table. When a system fault is detected, traverse the timestamps of the first change information in the change record table, extract the first change information closest to the current time from the change record table to obtain target change information, extract the fault type of the fault, calculate the correlation degree between the fault type and the change type of the target change information. When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information. Thus, by regularly collecting change information with the system as the main line, the most recent relevant change information can be quickly obtained when a fault occurs, which is used to determine the recovery plan, improve the repair efficiency of system faults, and enhance the user experience.

[0130] It should be noted that in this text, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, apparatus, article or method including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, apparatus, article or method. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, apparatus, article or method including the element.

[0131] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. A fault handling method, characterized in that, Including: Construct a change record table, obtain the change information of the current system at preset intervals, preprocess the change information to obtain the first change information; Determine the change type of the first change information, record the first change information in the change record table according to the change type, and mark the timestamp when the first change information is recorded in the change record table; When it is detected that the system fails, traverse the timestamps of the first change information in the change record table, extract the first change information closest to the current time from the change record table to obtain the target change information; Extract the fault type of the fault, and calculate the correlation degree between the fault type and the change type of the target change information; When it is determined that the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and the fault is processed based on the target change information; The calculating the correlation degree between the fault type and the change type of the target change information includes: Extract the keywords characterizing the fault type to obtain the first keywords; Extract the keywords characterizing the change type of the target change information to obtain the second keywords; Use a preset word vector tool to convert the first keyword and the second keyword into vectors respectively, to obtain the first word vector corresponding to the first keyword and the second word vector corresponding to the second keyword; Calculate the cosine distance between the first word vector and the second word vector to obtain the correlation degree between the fault type and the change type of the target change information; Wherein, when there are multiple first keywords characterizing the fault type, use the word vector tool to convert each first keyword into a word vector respectively to obtain multiple target word vectors, calculate the average value of the multiple target word vectors, and use this average value as the first word vector; When there are also multiple second keywords characterizing the change type of the target change information, use the word vector tool to convert each second keyword into a word vector respectively to obtain multiple reference word vectors, calculate the average value of the multiple reference word vectors, and use this average value as the second word vector.

2. The method according to claim 1, wherein The obtaining the change information of the current system at preset intervals includes: Detect the requirement changes of the current system at preset intervals; When a requirement change is detected, obtain the change version information; Compare the change version information with the initial version information in the system to obtain the differential version information, and determine the differential version information as the change information.

3. The method according to claim 1, characterized in that, The processing the fault based on the target change information includes: Receive the alarm prompt generated when the system fails, and determine the alarm location corresponding to the alarm prompt; When the alarm location is the modification point corresponding to the target change information, adjust the modification point corresponding to the target change information to handle the fault.

4. The method according to claim 1, wherein The system includes a main server and multiple slave servers, and the detecting that the system fails includes: Regularly scan the main server and multiple slave servers; When it is monitored that the main server or any one of the slave servers is in a warning state or a fault state, it is determined that the system fails.

5. The method according to claim 4, wherein The regularly scanning the main server includes: Set a timer for the master server to enable the master server to periodically extract performance parameters during runtime; wherein, the performance parameters include the total CPU utilization rate, memory utilization rate, and network bandwidth occupancy rate; Receive the performance parameters sent by the master server; Judge whether the master server has a fault according to the performance parameters; If so, it is detected that the master server is in a warning state or a fault state.

6. The method according to claim 1, characterized in that After calculating the correlation degree between the fault type and the change type of the target change information, it further includes: When it is determined that the correlation degree is not greater than the preset correlation degree, query the change information of other systems related to the current system; Process the fault based on the change information of other systems.

7. A fault handling device, characterized in that, It includes: A construction module for constructing a change record table, obtaining the change information of the current system every preset time, preprocessing the change information to obtain the first change information; A determination module for determining the change type of the first change information, recording the first change information in the change record table according to the change type, and marking the timestamp when the first change information is recorded in the change record table; A detection module for traversing the timestamps of the first change information in the change record table when detecting that a system fault occurs, and extracting the first change information closest to the current time from the change record table to obtain the target change information; A calculation module for extracting the fault type of the fault and calculating the correlation degree between the fault type and the change type of the target change information; Calculating the correlation degree between the fault type and the change type of the target change information includes: Extracting keywords characterizing the fault type to obtain the first keywords; Extracting keywords characterizing the change type of the target change information to obtain the second keywords; Using a preset word vector tool to convert the first keyword and the second keyword into vectors respectively, obtaining the first word vector corresponding to the first keyword and the second word vector corresponding to the second keyword; Calculating the cosine distance between the first word vector and the second word vector to obtain the correlation degree between the fault type and the change type of the target change information; Wherein, when there are multiple first keywords characterizing the fault type, use the word vector tool to convert each first keyword into a word vector respectively to obtain multiple target word vectors, calculate the average value of the multiple target word vectors, and use this average value as the first word vector; When there are also multiple second keywords characterizing the change type of the target change information, use the word vector tool to convert each second keyword into a word vector respectively to obtain multiple reference word vectors, calculate the average value of the multiple reference word vectors, and use this average value as the second word vector; A processing module for determining that when the correlation degree is greater than the preset correlation degree, it is determined that the fault has corresponding target change information, and processing the fault based on the target change information.

8. A computer device, characterized in that, It includes: A processor; A memory; Wherein, the memory stores a computer program, and when the processor executes the computer program, it implements the fault processing method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the fault handling method according to any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Data monitoring method and apparatus, computer device and storage medium

    CN108874644A

  • Configuration information processing method and device of application system

    CN112114993A