Method, device, apparatus and computer readable medium for optimizing system

By analyzing and classifying exception logs in the system, the problem of PRD in the existing technology is solved, and the effect of timely discovering business problems and optimizing the system is achieved.

CN113778818BActive Publication Date: 2025-02-21BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011027104.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-09-25
Publication Date
2025-02-21
Estimated Expiration
2040-09-25

AI Technical Summary

Technical Problem

In the prior art, the product demand documents (PRDs) that arrive at R&D personnel have been sorted out many times, which is different from the actual requirements for updating Internet products, making it difficult to discover business problems in a timely manner, and thus fail to optimize the system in a timely manner.

Method used

In the exception logs that generate business exceptions in the system execution application software, the exception logs to be analyzed are queried according to the preset query conditions, and divided into multiple primary categories, and the invalid exception logs are filtered out using the preset valid range in the primary category. , reclassify, and finally divide the exception logs to be analyzed into multiple final categories. Then, statistical analysis reports are generated to optimize the system in the order in which the number of logs in the final category ranges from large to small.

Benefits of technology

Through timely analysis and classification of abnormal logs, business problems can be discovered in a timely manner and statistical analysis reports can be generated. Based on this report, the system can be optimized in a timely manner and the system's response speed and stability can be improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113778818B_ABST
    Figure CN113778818B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and computer-readable medium for optimizing a system, and relates to the field of computer technology. A specific implementation of the method includes: in the abnormal log of a business abnormality generated by the execution of application software by the system, according to a preset query condition, querying to obtain the abnormal log to be analyzed; dividing the abnormal log to be analyzed into a plurality of preliminary selection categories; in the preliminary selection category, using a preset effective range to filter out invalid abnormal logs, reclassifying the invalid abnormal logs, so as to divide the abnormal log to be analyzed into a plurality of final categories; generating a statistical analysis report in order of the number of logs in the final category from large to small to optimize the system. This implementation can timely discover business problems and thus optimize the system in a timely manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and computer-readable medium for optimizing a system. Background Art

[0002] Every update of an Internet product usually starts with the operation team proposing requirements. In their daily work, the operation team usually receives various feedback from customers, which are summarized and refined by the product manager of the operation team to form a business requirement document (BRD).

[0003] BRD is used to communicate with the product manager of the technical team. After review, the product manager will convert BRD into the system's product requirement document (PRD). R&D personnel design and develop according to PRD, and finally complete the update of Internet products by optimizing the system.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: the PRD that reaches the R&D personnel has been sorted out many times, which is different from the actual needs of updating Internet products, making it difficult to discover business problems in a timely manner, which in turn leads to the inability to optimize the system in a timely manner. Summary of the invention

[0005] In view of this, the embodiments of the present invention provide a method, apparatus, device and computer-readable medium for optimizing a system, which can timely discover business problems and thus optimize the system in a timely manner.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for optimizing a system is provided, comprising:

[0007] In the abnormal log of business abnormality generated by the system executing the application software, query according to the preset query conditions to obtain the abnormal log to be analyzed;

[0008] Classifying the abnormal logs to be analyzed into a plurality of preliminary categories;

[0009] In the preliminary selection categories, invalid abnormal logs are screened out using a preset effective range, and the invalid abnormal logs are reclassified to classify the abnormal logs to be analyzed into a plurality of final categories;

[0010] A statistical analysis report is generated according to the order of the number of logs in the final categories from large to small to optimize the system.

[0011] In the preliminary selection categories, invalid abnormal logs are screened out using a preset effective range, and the invalid abnormal logs are reclassified to classify the abnormal logs to be analyzed into a plurality of final categories, including:

[0012] In the preliminary selection category, the abnormal logs outside the preset effective range are regarded as invalid abnormal logs;

[0013] The invalid exception logs are clustered and screened again using the preset valid range until the number of invalid exception logs is less than the preset exception parameter, so as to classify the exception logs to be analyzed into a plurality of final categories.

[0014] In the preliminary selection category, before filtering out invalid exception logs by using a preset valid range and reclassifying the invalid exception logs, the method further includes:

[0015] Based on the manually classified abnormal logs, calculate the effective similarity of each type of abnormal log;

[0016] Based on the effective similarity of each type of abnormal log, the preset effective range is obtained.

[0017] The abnormal logs to be analyzed are divided into a plurality of preliminary categories, including:

[0018] Calculating the sentence vector of the abnormal log to be analyzed;

[0019] The sentence vectors of the abnormal log to be analyzed are aggregated into a plurality of preliminary categories by using a preset clustering algorithm.

[0020] The calculating the sentence vector of the abnormal log to be analyzed includes:

[0021] According to the word vector of each word in the abnormal log to be analyzed and the preset weight corresponding to the word vector, the sentence vector of the abnormal log to be analyzed is calculated.

[0022] The preset clustering algorithm is used to aggregate the sentence vectors of the abnormal log to be analyzed into multiple preliminary categories, including:

[0023] The sentence vectors of the abnormal log to be analyzed are aggregated into a plurality of preliminary categories by using a K-means clustering algorithm, wherein the k value in the K-means clustering algorithm is preset.

[0024] Before obtaining the abnormal log to be analyzed by querying the abnormal log generated by the application software in the system according to the preset query conditions, the method further includes:

[0025] Receive, via the message queue, an exception log of a business exception generated by the system executing the application software.

[0026] According to a second aspect of an embodiment of the present invention, there is provided an apparatus for optimizing a system, including:

[0027] A query module is used to query the abnormal logs to be analyzed in accordance with preset query conditions in the abnormal logs of business abnormalities generated by the execution of application software in the system;

[0028] A preliminary selection module, used for classifying the abnormal logs to be analyzed into a plurality of preliminary selection categories;

[0029] A screening module, used to screen out invalid exception logs in the preliminary selection categories using a preset effective range, and reclassify the invalid exception logs to classify the exception logs to be analyzed into a plurality of final categories;

[0030] The output module is used to generate a statistical analysis report according to the order of the number of logs in the final category from large to small to optimize the system.

[0031] The screening module is specifically used to treat the abnormal logs outside the preset effective range as invalid abnormal logs in the preliminary selection category;

[0032] The invalid exception logs are clustered and screened again using the preset valid range until the number of invalid exception logs is less than the preset exception parameter, so as to classify the exception logs to be analyzed into a plurality of final categories.

[0033] According to a third aspect of an embodiment of the present invention, there is provided an electronic device of an optimization system, comprising:

[0034] one or more processors;

[0035] a storage device for storing one or more programs,

[0036] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.

[0037] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method as described above is implemented.

[0038] One embodiment of the above invention has the following advantages or beneficial effects: in the abnormal log of the business abnormality generated by the execution of application software in the system, according to the preset query conditions, the abnormal log to be analyzed is queried; the abnormal log to be analyzed is divided into multiple preliminary selection categories; in the preliminary selection categories, the invalid abnormal logs are screened out using the preset effective range, and the invalid abnormal logs are reclassified, and the abnormal logs to be analyzed are divided into multiple final categories; according to the order of the number of logs in the final category from large to small, a statistical analysis report is generated to optimize the system. The abnormal log records the business abnormality, and the business problem can be discovered in time through the abnormal log, and a statistical analysis report including the number of logs is generated, and the system can be optimized in time based on the statistical analysis report.

[0039] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0041] Figure 1 is a schematic diagram of the main process of the method for optimizing the system according to an embodiment of the present invention;

[0042] Figure 2 is a transmission schematic diagram of a message queue according to an embodiment of the present invention;

[0043] Figure 3 is a flow chart of classifying abnormal logs to be analyzed into multiple preliminary categories according to an embodiment of the present invention;

[0044] Figure 4 is a schematic diagram of a process of reclassifying invalid exception logs according to an embodiment of the present invention;

[0045] Figure 5 is a schematic diagram of a process of obtaining a preset effective range according to an embodiment of the present invention;

[0046] Figure 6 is a schematic diagram of a preliminary selection category according to an embodiment of the present invention;

[0047] Figure 7 is a schematic diagram of the main structure of an apparatus of an optimization system according to an embodiment of the present invention;

[0048] Figure 8 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0049] Fig. 9 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0051] During the update process of Internet products, communication with the technical team is carried out through BRD. That is, the whole process of Internet product update is promoted from the generation of business problems to the final implementation. Among them, there are two important nodes: one is the summary and refinement of business problems; the other is the understanding and transformation of technical products. It is usually completed by the product manager's thinking and some simple data statistics.

[0052] However, the product update process using BRD, PRD and development and launch has the following problems:

[0053] First, operations staff report system problems found during work, and product managers summarize the problems, conduct some data analysis, and finally extract the BRD. This process requires a very high level of product and business understanding and summarizing and inductive abilities. Otherwise, the demands put forward are likely to consume a lot of R&D resources and ultimately fail to truly solve business pain points, with little effect.

[0054] The second aspect: product requirements are passed on again and again. Due to the different understanding and language expression abilities of each person, the PRD that finally reaches the developer may be very different from the original product requirements after repeated information loss.

[0055] Third aspect: The product demand generated in the above process is often after business problems occur. Business problems may mean that complaints have been received.

[0056] In summary, since the PRD that reaches R&D personnel has been sorted out many times and is different from the actual needs of updating Internet products, it is difficult to discover business problems in a timely manner, which leads to the inability to optimize the system in a timely manner.

[0057] In order to solve the technical problem that it is difficult to discover business problems in time, which leads to the inability to optimize the system in time, the following technical solutions in the embodiments of the present invention can be adopted.

[0058] See also Figure 1 , Figure 1 Schematic diagram of the main process of the method for optimizing the system according to an embodiment of the present invention, starting from the abnormal log of the business abnormality, by classifying the abnormal log into multiple final categories, generating a statistical analysis report to optimize the system. Figure 1As shown, the specific steps include:

[0059] S101. In the abnormal log of business abnormality generated by the execution of application software by the system, according to the preset query conditions, query and obtain the abnormal log to be analyzed.

[0060] In the development and operation process of application software, there are three levels involved, namely, the front-end, the middle-end and the back-end. As an example, the application software may be an application (APP) installed on a mobile terminal.

[0061] The front desk includes servers that serve application software. Each application software server only handles the business of the application software. The middle desk connects to the servers of multiple application software upstream and connects to the database of the back desk downstream. The middle desk is responsible for maintaining the code logic shared by multiple application software. The back desk is responsible for database-related system development and provides underlying data access services, but does not involve the specific business of the application software.

[0062] In the embodiment of the present invention, the system refers to the server corresponding to the application software in the foreground. The above-mentioned server has strong business nature and generates corresponding logs during the business processing of the application software. By executing the abnormal log of the business abnormality generated by the application software through the system, the operation status of the application software can be timely known, and then analyzed to optimize the system.

[0063] It should be noted that Figure 1 The execution subject of each step in the above process can be software set in the system. As an example, the software can be responsible for log analysis.

[0064] In one embodiment of the present invention, when the system generates an abnormal log of a service abnormality when executing application software, the abnormal log of a service abnormality generated when executing application software can be received through a message queue (MQ).

[0065] See also Figure 2 , Figure 2 1 is a transmission diagram of a message queue according to an embodiment of the present invention, wherein MQ is middleware, and its core is composed of three parts: producer, consumer, and MQ system.

[0066] The producer is responsible for producing messages and pushing them to the MQ system. The MQ system is responsible for receiving, storing, and scheduling messages to ensure that the messages can be consumed normally. The consumer is responsible for obtaining the required messages from the MQ system for consumption.

[0067] MQ has the characteristics of decoupling and peak load reduction. Decoupling means that producers do not need to rely on the processing logic of consumers, and can do other things after the message production is completed. Consumers do not need to worry about when, how, or whether the consumption is successful, which effectively improves the system throughput.

[0068] Peak shaving means that in scenarios where real-time requirements are not high, producers generate a large number of messages during peak periods and put them into MQ. Consumers consume according to their own consumption capacity and do not have to require consumption to be completed in a short time, which helps maintain the stability of the consumer system.

[0069] MQ can be implemented using any of the following: Kafka, RocketMQ, RabbitMQ, and ActiveMQ.

[0070] It is understandable that by using a message queue to receive the exception log of business exceptions generated by the system executing application software, the system throughput can be effectively improved.

[0071] In actual applications, error logs recorded due to problems at the specific business level are usually recorded in Chinese for the convenience of troubleshooting. As an example, exception logs include but are not limited to the following: "wrong phone number format", "wrong ID card format", "no permission to view the review page", "no permission to perform the current operation", "timeout when calling the real-name information verification interface", and "abnormal call to the address information query interface".

[0072] In the embodiment of the present invention, after the abnormal log is received through the message queue, it can be saved in the database for query.

[0073] When the system needs to be optimized, the R&D personnel can set the query conditions and query the abnormal logs in the database to obtain the abnormal logs to be analyzed. The abnormal logs to be analyzed are logs used for analysis to optimize the system.

[0074] As an example, the preset query condition includes the exception logs that generate business exceptions from 0:00 on January 1 to 0:00 on January 5, and the query obtains exception log 1 and exception log 2, which are called exception logs to be analyzed.

[0075] S102: Classify the abnormal logs to be analyzed into a plurality of preliminary categories.

[0076] In the embodiment of the present invention, by classifying the abnormal logs to be analyzed into multiple categories, a statistical analysis report can be generated.

[0077] Specifically, the abnormal log classification may include two steps, S102 and S103. S102 is to initially classify the abnormal logs, and S103 is to screen out invalid abnormal logs based on the initial classification to re-determine the classification of the invalid abnormal logs.

[0078] See also Figure 3 , Figure 3 The present invention is a flowchart of classifying abnormal logs to be analyzed into multiple preliminary categories according to an embodiment of the present invention, which specifically includes the following steps:

[0079] S301: Calculate the sentence vector of the abnormal log to be analyzed.

[0080] During the initial classification process, the abnormal log can be converted into a vector. For each abnormal log to be analyzed, a sentence vector needs to be calculated for subsequent clustering.

[0081] In an embodiment of the present invention, a sentence vector of the abnormal log to be analyzed is calculated according to a word vector of each word in the abnormal log to be analyzed and a preset weight corresponding to the word vector.

[0082] First, the abnormal log to be analyzed needs to be segmented. As an example, a Chinese word segmentation tool is used for word segmentation. For example, the abnormal log "user name already exists" has the word segmentation results of "user name", "already", and "exists". The Chinese word segmentation tool is open source software.

[0083] Then, each word in the word segmentation result is input into the model separately, and the model outputs the word vector corresponding to the word. As an example, the model can be a word2vec model.

[0084] For each word, there is a corresponding word vector, and the weight of the word vector can be pre-set. As an example, the weight of the word vector is set according to the part of speech. Considering that nouns and verbs can express the main semantics of the sentence, higher weights are set, and other parts of speech have lower weights. For example, the word vector weight of nouns is set to 0.2, the word vector weight of verbs is set to 0.25, and the word vector weight of other parts of speech is set to 0.1.

[0085] Then, all word vectors are weighted averaged according to the part of speech, and the value obtained after weighted average is the sentence vector of the abnormal log.

[0086] As an example:

[0087] Word vector: VEC 1 =[v 11 , v 12 …v 1n ]Weight: K 1 ;

[0088] Word vector: VEC 2 =[v 21 , v 22 …v 2n ]Weight: K 2 ;…

[0089] Word vector: VEC m =[v m1 , v m2 …v mn ]Weight: K m ;

[0090] Sentence vector:

[0091] In an embodiment of the present invention, the sentence vector can be calculated after the abnormal log to be analyzed is obtained by query, or it can be calculated when the abnormal log is stored in the database. In order to speed up the analysis of the abnormal log, the second method mentioned above can be adopted.

[0092] S302: using a preset clustering algorithm, the sentence vectors of the abnormal log to be analyzed are aggregated into a plurality of preliminary categories.

[0093] Clustering algorithms can be used to aggregate the sentence vectors of the abnormal logs to be analyzed into multiple preliminary categories. The preliminary category is the category to which the abnormal logs first belong, and the category of the abnormal logs may be adjusted in the subsequent process.

[0094] As an example, the clustering algorithm may adopt any one of the following: direct clustering method, shortest distance clustering method, longest distance clustering method and k-means clustering method.

[0095] The following is an exemplary description using the k-means clustering algorithm as an example.

[0096] First, you need to select a k value, that is, how many categories to divide the abnormal logs to be analyzed into. The choice of k value has a great impact on the results. There are usually two selection methods: one is the elbow method, which simply means judging the best k value based on the functional relationship between the clustering results and k; the other is determined according to specific needs. For example, for the clustering of shirt sizes, the k value is 3, which is divided into three categories: L, M, and S. It is understandable that the k value in the K-means clustering algorithm is pre-set.

[0097] Secondly, the initial clustering points need to be selected. As an example, the initial clustering points can be randomly selected, such as taking the mean multiple times to randomly select the initial clustering points, or using the improved algorithm bisecting K-means to randomly select the initial clustering points.

[0098] Then, the distance between the sentence vector of the abnormal log to be analyzed and the cluster point is calculated, and the abnormal log to be analyzed is assigned to the preliminary category to which the nearest cluster point belongs. Finally, the average value of the sentence vector and the cluster point in each preliminary category needs to be calculated, and the point corresponding to the above average value is used as the new cluster point. Repeat the above steps. If the new cluster point is exactly the same as the old cluster point, it is determined that the sentence vector of the abnormal log to be analyzed is aggregated into multiple preliminary categories.

[0099] It should be noted that, for the sentence vector of the abnormal log to be analyzed, the distance between the sentence vector and the cluster point is calculated. The above distance can be understood as the semantic similarity between the two sentence vectors.

[0100] The semantic similarity can be calculated using formula (1). As an example, the cosine distance formula is usually used for semantic similarity calculation:

[0101]

[0102] Among them, VEC S1 is a sentence vector, VEC S2 is another sentence vector. VEC S1i It is VEC S1 The word vector in VEC S2i It is VEC S2 The word vectors in .

[0103] It should be noted that the semantic similarity can also be calculated using formulas such as Euclidean distance, Manhattan distance, and Chebyshev distance.

[0104] The cosine distance is used to calculate the semantic similarity. The larger the cosine distance, the higher the semantic similarity. The Euclidean distance, Manhattan distance or Chebyshev distance is used to calculate the semantic similarity. The larger the distance, the smaller the semantic similarity.

[0105] In the above Figure 3 In the embodiment, the abnormal logs to be analyzed can be divided into multiple preliminary categories using a preset clustering algorithm.

[0106] S103: In the preliminary selection categories, invalid abnormal logs are screened out using a preset effective range, and the invalid abnormal logs are reclassified to classify the abnormal logs to be analyzed into a plurality of final categories.

[0107] After the preliminary categories are determined, the vectors that fall into a certain category cannot be determined to be semantically similar to the cluster point vectors of the preliminary category. It may just be that the similarity with the cluster points of the preliminary category is higher than the similarity with the cluster points of other preliminary categories. Therefore, the preset effective range can be used for screening.

[0108] See also Figure 4 , Figure 4 The flowchart of reclassifying invalid exception logs according to an embodiment of the present invention specifically includes:

[0109] S401. In the preliminary selection category, the abnormal logs outside the preset effective range are regarded as invalid abnormal logs.

[0110] In the embodiment of the present invention, a valid range may be preset. In the primary selection category, the abnormal log outside the preset valid range is regarded as an invalid abnormal log. Accordingly, the abnormal log within the preset valid range is regarded as a valid abnormal log.

[0111] See also Figure 5 , Figure 5 1 is a flow chart of obtaining a preset effective range according to an embodiment of the present invention, which specifically includes the following steps:

[0112] S501. Calculate the effective similarity of each type of abnormal log according to the manually classified abnormal logs.

[0113] In order to filter out invalid exception logs, the preset valid range can be determined by referring to the manually classified exception logs.

[0114] We can select the exception logs of business exceptions generated by the system executing application software within a period of time, and manually divide the exception logs into multiple categories according to semantics. We calculate the sentence vector of each exception log, and for each category of exception logs, we calculate the similarity of each pair according to formula (1), and then calculate the average similarity in the category, which is the effective similarity threshold of the exception logs in this category.

[0115]

[0116] S502: Based on the effective similarity of each type of abnormal log, a preset effective range is obtained.

[0117] Then, the final effective similarity including all categories can be calculated.

[0118]

[0119] Among them, dist i is the effective similarity of anomaly logs of a category, with a total of n categories. For semantic similarity calculated by cosine distance, the radius of the preset effective range is equal to the inverse of the final effective similarity.

[0120] For calculating semantic similarity by Euclidean distance, Manhattan distance or Chebyshev distance, the radius of the preset effective range is equal to the final effective similarity.

[0121] That is to say, the preset effective range is the area covered by the radius of the preset effective range with the cluster point of the primary selected category as the center.

[0122] exist Figure 5 In the embodiment, from the perspective of human semantic cognition, sentences with similar semantics are first found, and the effective similarity of each abnormal log is calculated, and then the preset effective range is obtained.

[0123] S402: cluster the invalid exception logs and screen them again using a preset valid range until the number of invalid exception logs is less than a preset exception parameter, so as to classify the exception logs to be analyzed into a plurality of final categories.

[0124] For valid anomaly logs, the preliminary category is the final category; for invalid anomaly logs, the preliminary category is not the final category, and the invalid anomaly logs need to be clustered further. As an example, clustering is continued according to a preset clustering algorithm.

[0125] After clustering is completed, the preset valid range is used for screening again. With multiple screenings, the number of invalid exception logs becomes smaller and smaller. When the number of invalid exception logs is less than the preset exception parameter, clustering is stopped. Finally, the exception logs to be analyzed are divided into multiple final categories. Among them, the preset exception parameter can be pre-set according to the actual situation.

[0126] See also Figure 6 , Figure 6 is a schematic diagram of preliminary selection categories according to an embodiment of the present invention. Figure 6 After the initial clustering is completed, all vectors are divided into 4 categories, and A, B, C, and D are the cluster points of each category respectively. The preset effective range is obtained with the cluster point as the center and the preset radius. The preset effective range is the area marked by the dotted line.

[0127] The final category of the vectors within the preset effective range is the preliminary category, such as vector 1, vector 3, vector 5, and vector 7. The logs of the vectors outside the preset effective range are invalid exception logs, that is, the logs of vector 2, vector 4, vector 6, and vector 8 are invalid exception logs.

[0128] The invalid exception logs are clustered again and screened using a preset valid range until the number of invalid exception logs is less than a preset exception parameter, so as to classify the exception logs to be analyzed into multiple final categories.

[0129] exist Figure 4 In the embodiment, invalid exception logs are screened out, and the accuracy of classification is improved by clustering the invalid exception logs again.

[0130] S104. Generate a statistical analysis report in descending order of the number of logs in the final category to optimize the system.

[0131] The more logs there are in the final category, the more problems this category generates and the greater the room for optimization.

[0132] It is necessary to generate a statistical analysis report by arranging the final categories from large to small according to the number of logs contained in them. The categories with higher rankings indicate that there are more problems in the online category, and the related functions may have a large room for optimization.

[0133] In this way, the technical product manager can determine the optimization points based on the above statistical analysis report, write the PRD and hand it over to the technical staff to develop and optimize the system.

[0134] In the above embodiment, in the abnormal log of the business abnormality generated by the system executing the application software, according to the preset query conditions, the abnormal log to be analyzed is queried; the abnormal log to be analyzed is divided into a plurality of preliminary selection categories; in the preliminary selection categories, the invalid abnormal logs are screened out using the preset effective range, and the invalid abnormal logs are reclassified, and the abnormal logs to be analyzed are divided into a plurality of final categories; according to the order of the number of logs in the final category from large to small, a statistical analysis report is generated to optimize the system. The abnormal log records the business abnormality, and the business problem can be discovered in time through the abnormal log, and a statistical analysis report including the number of logs is generated, and the system can be optimized in time based on the statistical analysis report.

[0135] See also Figure 7 , Figure 7 is a schematic diagram of the main structure of an apparatus of an optimization system according to an embodiment of the present invention. The apparatus of the optimization system can implement a method of optimizing the system, such as Figure 7 As shown, the device of the optimization system specifically includes:

[0136] The query module 701 is used to query the abnormal logs generated by the system executing the application software to obtain the abnormal logs to be analyzed according to the preset query conditions;

[0137] A preliminary selection module 702, used for classifying the abnormal logs to be analyzed into a plurality of preliminary selection categories;

[0138] A screening module 703 is used to screen out invalid exception logs in the preliminary selection categories using a preset effective range, and reclassify the invalid exception logs to classify the exception logs to be analyzed into a plurality of final categories;

[0139] The output module 704 is used to generate a statistical analysis report according to the order of the number of logs in the final category from large to small to optimize the system.

[0140] In one embodiment of the present invention, the screening module 703 is specifically configured to, in the primary selection category, treat the abnormal logs outside the preset effective range as invalid abnormal logs;

[0141] The invalid exception logs are clustered and screened again using the preset valid range until the number of invalid exception logs is less than the preset exception parameter, so as to classify the exception logs to be analyzed into a plurality of final categories.

[0142] In one embodiment of the present invention, the screening module 703 is further used to calculate the effective similarity of each type of abnormal log according to the manually classified abnormal logs;

[0143] Based on the effective similarity of each type of abnormal log, the preset effective range is obtained.

[0144] In one embodiment of the present invention, the preliminary selection module 702 is specifically used to calculate the sentence vector of the abnormal log to be analyzed;

[0145] The sentence vectors of the abnormal log to be analyzed are aggregated into a plurality of preliminary categories by using a preset clustering algorithm.

[0146] In one embodiment of the present invention, the preliminary selection module 702 is specifically configured to calculate the sentence vector of the abnormal log to be analyzed according to the word vector of each word in the abnormal log to be analyzed and the preset weight corresponding to the word vector.

[0147] In one embodiment of the present invention, the preliminary selection module 702 is specifically used to use the K-means clustering algorithm to aggregate the sentence vectors of the abnormal log to be analyzed into multiple preliminary selection categories, wherein the k value in the K-means clustering algorithm is pre-set.

[0148] In one embodiment of the present invention, the query module 701 is specifically configured to receive, through a message queue, an exception log of a business exception generated when the system executes application software.

[0149] Figure 8 An exemplary system architecture 800 is shown to which the method for optimizing a system or the apparatus for optimizing a system according to an embodiment of the present invention can be applied.

[0150] like Figure 8 As shown, system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. Network 804 is used to provide a medium for communication links between terminal devices 801, 802, 803 and server 805. Network 804 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.

[0151] Users can use terminal devices 801, 802, and 803 to interact with server 805 through network 804 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0152] The terminal devices 801 , 802 , and 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0153] The server 805 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 801, 802, and 803. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0154] It should be noted that the method for optimizing the system provided in the embodiment of the present invention is generally executed by the server 805 , and accordingly, the device for optimizing the system is generally disposed in the server 805 .

[0155] It should be understood that Figure 8 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.

[0156] Reference below Fig. 9 , which shows a schematic diagram of the structure of a computer system 900 of a terminal device suitable for implementing an embodiment of the present invention. Fig. 9 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0157] like Fig. 9 As shown, the computer system 900 includes a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the system 900 are also stored. The CPU 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0158] The following components are connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed, so that a computer program read therefrom is installed into the storage section 908 as needed.

[0159] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909, and / or installed from the removable medium 911. When the computer program is executed by the central processing unit (CPU) 901, the above-mentioned functions defined in the system of the present invention are executed.

[0160] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0161] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0162] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a sending unit, an acquisition unit, a determination unit, and a first processing unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the sending unit may also be described as a "unit that sends a request for obtaining an image to a connected server."

[0163] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0164] In the abnormal log of business abnormality generated by the system executing the application software, query according to the preset query conditions to obtain the abnormal log to be analyzed;

[0165] Classifying the abnormal logs to be analyzed into a plurality of preliminary categories;

[0166] In the preliminary selection categories, invalid abnormal logs are screened out using a preset effective range, and the invalid abnormal logs are reclassified to classify the abnormal logs to be analyzed into a plurality of final categories;

[0167] A statistical analysis report is generated according to the order of the number of logs in the final categories from large to small to optimize the system.

[0168] According to the technical solution of the embodiment of the present invention, in the abnormal log of the business abnormality generated by the execution of the application software in the system, according to the preset query conditions, the abnormal log to be analyzed is queried; the abnormal log to be analyzed is divided into a plurality of preliminary selection categories; in the preliminary selection categories, the invalid abnormal logs are screened out using a preset effective range, and the invalid abnormal logs are reclassified, and the abnormal logs to be analyzed are divided into a plurality of final categories; according to the order of the number of logs in the final category from large to small, a statistical analysis report is generated to optimize the system. The abnormal log records the business abnormality, and the business problem can be discovered in time through the abnormal log, and a statistical analysis report including the number of logs is generated, and the system can be optimized in time based on the statistical analysis report.

[0169] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for optimizing a system, characterized in that: include: In the abnormal log of business abnormality generated by the system executing the application software, query according to the preset query conditions to obtain the abnormal log to be analyzed; Using a preset clustering algorithm, the abnormal logs to be analyzed are divided into a plurality of preliminary categories; In the preliminary selection category, based on the effective similarity of each type of abnormal log, a preset effective range is obtained, abnormal logs outside the preset effective range are regarded as invalid abnormal logs, the invalid abnormal logs are clustered, and the preset effective range is used again for screening until the number of invalid abnormal logs is less than the preset abnormal parameter, so as to classify the abnormal logs to be analyzed into a plurality of final categories; A statistical analysis report is generated according to the order of the number of logs in the final categories from large to small to optimize the system.

2. The method for optimizing a system according to claim 1, characterized in that: In the preliminary selection category, before filtering out invalid exception logs by using a preset valid range and reclassifying the invalid exception logs, the method further includes: Based on the manually classified abnormal logs, calculate the effective similarity of each type of abnormal log; Based on the effective similarity of each type of abnormal log, the preset effective range is obtained.

3. The method for optimizing a system according to claim 1, characterized in that: The abnormal logs to be analyzed are divided into a plurality of preliminary categories, including: Calculating the sentence vector of the abnormal log to be analyzed; The sentence vectors of the abnormal log to be analyzed are aggregated into a plurality of preliminary categories by using a preset clustering algorithm.

4. The method for optimizing a system according to claim 3, characterized in that: The calculating the sentence vector of the abnormal log to be analyzed includes: According to the word vector of each word in the abnormal log to be analyzed and the preset weight corresponding to the word vector, the sentence vector of the abnormal log to be analyzed is calculated.

5. The method for optimizing a system according to claim 3, characterized in that: The preset clustering algorithm is used to aggregate the sentence vectors of the abnormal log to be analyzed into multiple preliminary categories, including: The sentence vectors of the abnormal log to be analyzed are aggregated into a plurality of preliminary categories by using a K-means clustering algorithm, wherein the k value in the K-means clustering algorithm is preset.

6. The method for optimizing a system according to claim 1, characterized in that: Before obtaining the abnormal log to be analyzed by querying the abnormal log generated by the application software in the system according to the preset query conditions, the method further includes: Receive, via the message queue, an exception log of a business exception generated by the system executing the application software.

7. A device for optimizing a system, characterized in that: include: A query module is used to query the abnormal logs to be analyzed in accordance with preset query conditions in the abnormal logs of business abnormalities generated by the execution of application software in the system; A preliminary selection module, used to classify the abnormal logs to be analyzed into multiple preliminary selection categories by using a preset clustering algorithm; A screening module, for obtaining a preset effective range based on the effective similarity of each type of abnormal log in the preliminary selection category, treating the abnormal logs outside the preset effective range as invalid abnormal logs, clustering the invalid abnormal logs, and screening again using the preset effective range until the number of invalid abnormal logs is less than a preset abnormal parameter, so as to classify the abnormal logs to be analyzed into a plurality of final categories; The output module is used to generate a statistical analysis report according to the order of the number of logs in the final category from large to small to optimize the system.

8. An electronic device for optimizing a system, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Abnormal log determination method and device

    CN105183912A

  • Log analysis method and system, terminal and computer-readable storage medium

    CN109634818A