Log management method, system and equipment and storage medium

By filtering and vectorizing the exception logs in the simulation log file and dividing them into groups with high similarity, the problem of low processing efficiency of simulation log file in chip design is solved, and the work efficiency of verification engineers is improved.

CN119025495APending Publication Date: 2024-11-26SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411251699.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2024-11-26

AI Technical Summary

Technical Problem

During the digital front-end verification process of chip design, simulation log file processing is inefficient, resulting in verification engineers spending a lot of time reading and analyzing abnormal information, resulting in duplicate workload and inefficient efficiency.

Method used

By filtering out the exception logs in the simulation log file, using vectorization processing to divide them into groups with high similarity, reducing duplicate analysis and improving analysis efficiency. The specific steps include filtering keywords, converting them into vectors in the form of word frequency-inverse text frequency exponential, grouping based on vector similarity, and grouping through iterative center point updates.

Benefits of technology

It effectively improves the processing efficiency of simulation log files, reduces the workload of verification engineers, reduces the possibility of repeated analysis, and makes the verification process more efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119025495A_ABST
    Figure CN119025495A_ABST
Patent Text Reader

Abstract

The invention discloses a log management method, system and device and a storage medium, and is applied to the technical field of front-end verification, and the method comprises the steps: obtaining a simulation log file after a to-be-tested chip is subjected to a simulation test; screening out each log representing exception in the simulation log file to serve as an obtained screened log set; dividing logs in the screened log set into K groups according to a grouping principle that similar logs are divided into the same group; wherein K is a preset positive integer not less than 2. By applying the scheme of the invention, the processing efficiency of the simulation log file can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of front-end verification, and in particular to a log management method, system, device and storage medium. Background Art

[0002] When designing a chip, in order to ensure that the actual design implementation is consistent with the original design intent, engineers need to verify the digital front end to discover potential errors made by designers. The current mainstream verification process mainly includes reading chip specifications, formulating verification strategies and plans, decomposing verification plans, simulating based on verification platforms, and outputting verification reports.

[0003] Among them, simulation based on the verification platform occupies most of the time in the digital front-end verification process. The common method in the industry is to build a verification environment based on UVM (Universal Verification Methodology), add verification cases to the environment for compilation and simulation, and check the output simulation log file after the simulation to determine the simulation results.

[0004] With the evolution of technology and the increase in diversity and complexity of chip requirements, the scale of chip design has increased. For large-scale, ultra-large-scale and even extra-large-scale integrated circuits, verification engineers need to plan a large number of test cases to cover the entire verification plan. In the regression testing phase, in order to enhance the completeness of the test stimulus for a single case, each case needs to perform multiple simulations. As a result, the simulation tool will generate a large amount of log information and present it to the verification engineer. Especially in the early stages of verification, because the quality of the design or verification code is not high, a large amount of abnormal information is often reported in the simulation log file, which needs to be read one by one and the cause of the abnormal problem is analyzed, which is a huge time burden for the verification engineer.

[0005] In summary, how to effectively improve the processing efficiency of simulation log files is a technical problem that technicians in this field urgently need to solve. Summary of the invention

[0006] The purpose of the present invention is to provide a log management method, system, device and storage medium to effectively improve the processing efficiency of simulation log files.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In a first aspect, the present invention provides a log management method, comprising:

[0009] After the chip under test is simulated and tested, a simulation log file is obtained;

[0010] Filter out each log indicating anomalies in the simulation log file as a filtered log set;

[0011] According to the grouping principle that similar logs are grouped into the same group, the logs in the filtered log set are divided into K groups; wherein K is a preset positive integer not less than 2.

[0012] On the other hand, each log indicating an abnormality in the simulation log file is screened out as a screened log set, including:

[0013] Determine N keywords indicating anomalies, wherein N is a preset positive integer;

[0014] In the simulation log file, each log that does not carry any of the keywords is filtered out, and the remaining logs after filtering out are used as the obtained filtered log set.

[0015] On the other hand, according to the grouping principle of grouping similar logs into the same group, the logs in the filtered log set are divided into K groups, including:

[0016] Convert each log in the filtered log set into a vector;

[0017] Based on the similarity between the vectors, the logs in the filtered log set are divided into K groups.

[0018] On the other hand, each log in the filtered log set is converted into a vector, including:

[0019] Establishing a data structure of string type and array form, and storing the logs in the filtered log set one by one into the array;

[0020] The character strings in the array are converted into numerical form to obtain vectors in the form of word frequency-inverse text frequency index.

[0021] On the other hand, based on the similarity between the vectors, the logs in the filtered log set are divided into K groups, including:

[0022] Select K vectors from the vector group as the current K center points;

[0023] The vector group represents a vector set obtained after each log in the filtered log set is converted into a vector;

[0024] For each vector in the vector group, determine the center point that is closest to the vector among the current K center points, and assign the vector to the center point;

[0025] The vectors assigned to the same center point are grouped together, and a total of K groups are obtained;

[0026] For each group in the K groups, the average value of each vector in the group is used as the new center point of the group;

[0027] Determine whether the iteration termination condition is met;

[0028] If it is established, then based on the vectors in the currently obtained K groups, the logs corresponding to the respective vectors are determined to obtain K groups divided from the filtered log set;

[0029] If not, the operation returns to executing, for each vector in the vector group, determining the center point closest to the vector among the current K center points, and assigning the vector to the center point.

[0030] On the other hand, after filtering out each log indicating anomaly in the simulation log file as the obtained filtered log set, the method further includes:

[0031] Sorting the logs in the filtered log set according to the log names;

[0032] Select K vectors from the vector group as the current K center points, including:

[0033] From the vector group, K vectors are selected on average according to the vector positions as the current K center points.

[0034] On the other hand, for each vector in the vector group, determining the center point closest to the vector among the current K center points includes:

[0035] For each vector in the vector group, the distance between each of the current K center points and the vector is determined according to the cosine similarity or Jaccard distance between the vectors, and based on each distance, the center point closest to the vector among the current K center points is determined.

[0036] In a second aspect, the present invention provides a log management system, comprising:

[0037] A simulation log file acquisition module is used to obtain a simulation log file after the chip under test is simulated and tested;

[0038] A screening module, used for screening out each log indicating anomalies in the simulation log file as a screening log set;

[0039] The log grouping module is used to divide the logs in the filtered log set into K groups according to the grouping principle of grouping similar logs into the same group; wherein K is a preset positive integer not less than 2

[0040] In a third aspect, the present invention provides a log management device, comprising:

[0041] Memory for storing computer programs;

[0042] The processor is used to execute the computer program to implement the steps of the log management method as described above.

[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the log management method as described above are implemented.

[0044] This application takes into account that for the abnormal information in the simulation log file, some abnormal information is very similar to each other, and is often caused by the same problem. Therefore, from the perspective of locating the cause of the problem, if the cause of the abnormal problem is read and analyzed one by one, there may be a situation of repeated workload, that is, a lot of the same information is analyzed in the whole process, but it actually corresponds to a design problem. In this regard, if similar abnormal information is divided into the same group, it can effectively assist the work of the verification engineer, so that the verification engineer can analyze the log according to the category, instead of analyzing the abnormal information one by one from front to back, which can greatly improve the analysis efficiency.

[0045] In this regard, the technical solution provided by the embodiment of the present invention is applied. After the chip under test is simulated and tested, a simulation log file is obtained. The logs indicating abnormalities in the simulation log file are first screened out as the obtained filtered log set. Afterwards, the logs in the filtered log set are divided into K groups according to the grouping principle of grouping similar logs into the same group, so that the verification engineer can analyze these logs indicating abnormalities based on these K groups.

[0046] In summary, the present application solution can effectively improve the processing efficiency of simulation log files. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0048] Figure 1 An implementation flow chart of a log management method provided by a specific implementation mode of the present invention;

[0049] Figure 2 A schematic diagram of the structure of a log management system provided by a specific implementation mode of the present invention;

[0050] Figure 3 A structural diagram of a log management device provided by a specific implementation mode of the present invention;

[0051] Figure 4 The present invention is a schematic diagram of the structure of a computer-readable storage medium. DETAILED DESCRIPTION

[0052] The core of the present invention is to provide a log management method, system, device and storage medium, which can effectively improve the processing efficiency of simulation log files.

[0053] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0054] Please refer to Figure 1 , Figure 1 The following is a flow chart of a log management method according to a specific embodiment of the present invention. The log management method may include the following steps:

[0055] Step S101: After performing simulation test on the chip to be tested, a simulation log file is obtained.

[0056] When the chip under test is simulated, there may be multiple simulation test methods used, such as simulation test based on UVM implementation, to obtain simulation log files. The obtained simulation log files contain a large number of logs, which may include logs indicating abnormalities and logs that do not indicate abnormalities.

[0057] It should also be noted that the present application does not limit the number of logs contained in the simulation log file. Therefore, in some implementations, if there are multiple simulation log files, the logs in these simulation log files can be placed in the same simulation log file for subsequent processing.

[0058] Step S102: Filter out the logs indicating abnormalities in the simulation log file as a filtered log set.

[0059] The obtained simulation log file will contain a large number of logs. If a log does not indicate an abnormality, it means that there is no problem with the corresponding test item. On the contrary, when there is a problem with the chip to be tested, there will be more or less logs indicating abnormalities in the simulation log file. In the present application scheme, it is necessary to filter out the logs indicating abnormalities in the simulation log file as the obtained filtered log set.

[0060] There are many specific implementation methods for filtering out the logs indicating abnormalities. For example, filtering can usually be performed by keywords, which is easy to implement. That is, in a specific implementation of the present invention, step S102 may specifically include:

[0061] Determine N keywords indicating anomalies, wherein N is a preset positive integer;

[0062] In the simulation log file, all logs that do not carry any keyword are filtered out, and the remaining logs after filtering are used as the obtained filtered log set.

[0063] In this implementation, it is necessary to first determine N keywords representing the exception. For example, in some implementations, if a log is used to represent an exception, then the log usually contains "UVM_ERROR" or "UVM_FATAL". Therefore, UVM_ERROR and UVM_FATAL can be used as two keywords representing the exception. In practical applications, UVM_ERROR is usually used to represent an error-type exception, and UVM_FATAL is usually used to represent a more serious fatal exception.

[0064] After determining the N keywords indicating anomalies, for logs in the simulation log file, if a log does not carry the keyword UVM_ERROR or the keyword UVM_FATAL, it will be filtered out, which means that the log is not a log indicating anomalies. On the contrary, if a log carries at least one of the two keywords UVM_ERROR and UVM_FATAL, it means that the log is a log indicating anomalies and will be retained.

[0065] After the above filtering, the remaining logs are the logs used to indicate abnormalities, and these logs are taken as the obtained filtered log set.

[0066] In actual applications, for ease of operation, you can usually open the simulation log file through an editor, then enter the command mode, and enter the command "g! / UVM_ERROR\|UVM_FATAL / d" in this mode to delete the lines without UVM_ERROR or UVM_FATAL, that is, filter out all normal logs. In addition, it should be noted that in actual applications, 1 line in the simulation log file is 1 log, so in this example, deleting in units of lines is equivalent to deleting in units of logs.

[0067] Step S103: According to the grouping principle of grouping similar logs into the same group, the logs in the filtered log set are divided into K groups; wherein K is a preset positive integer not less than 2.

[0068] In order to assist the work of verification engineers, so that verification engineers can analyze logs by category instead of analyzing them one by one from front to back, thereby improving analysis efficiency, in this application scheme, it is necessary to divide the logs in the filtered log set into K groups according to the grouping principle of dividing similar logs into the same group.

[0069] It is understandable that the specific operation method for implementing grouping can be set according to actual needs, as long as similar logs can be divided into the same group. For example, a related model can be used to divide the logs based on the similarity of the characters between the logs. That is, the higher the similarity of the characters between different logs, the more likely they are to be placed in the same group.

[0070] In a specific implementation of the present invention, step S103 may specifically include:

[0071] Step 1: Convert each log in the filtered log set into a vector;

[0072] Step 2: Based on the similarity between vectors, the logs in the filtered log set are divided into K groups.

[0073] This implementation takes into account that a log is composed of several characters, that is, it can be regarded as a string. When comparing the similarity between two logs, if the comparison is directly based on the similarity of the two strings, it will be more complicated and difficult to directly use some clustering algorithms to achieve grouping. Therefore, this implementation takes into account that an easy-to-operate method is to first convert each log in the filtered log set into a vector, that is, first perform string formatting processing to obtain a numerical result (vector), and then based on the similarity between the vectors, the logs in the filtered log set can be conveniently divided into K groups.

[0074] In a specific implementation of the present invention, the above step 1 of converting each log in the filtered log set into a vector may specifically include:

[0075] Create a data structure of string type and array form, and store the logs in the filtered log set one by one into the array;

[0076] Convert the strings in the array into numerical form and obtain vectors in the form of word frequency-inverse text frequency index.

[0077] This implementation method takes into account that the present application solution needs to convert each log in the filtered log set into a vector. It can be understood that one available conversion method is to process each log in the filtered log set one by one. For example, if there are 1,000 logs in the filtered log set, they are processed one by one. After executing 1,000 times, the vectors converted from each of the 1,000 logs can be obtained. However, this implementation method takes into account that if the 1,000 logs in the filtered log set are treated as an array and processed once, the vectors corresponding to each element in the array can be obtained. It can be seen that the latter execution efficiency will be higher.

[0078] Since a log is a string composed of several characters, that is, a log can be regarded as a string, therefore, this implementation method establishes a string type and an array data structure, and the logs in the filtered log set need to be stored in the array one by one. It can be understood that the number of elements in the array is the number of logs in the filtered log set. For example, in the above example, there are 1000 logs in the filtered log set. After the array is established, the first element filled in the array is a string, which corresponds to one of the 1000 logs. By analogy, the 1000 logs need to be filled in the array one by one.

[0079] After filling in, the strings in the array can be converted into numerical form to obtain vectors in the form of word frequency-inverse text frequency index.

[0080] In practical applications, we can usually use the library methods provided by Python to format the string form of the array and obtain the result in numerical form. This formatting operation specifically involves a class called TfidfVectorizer in Python, which is used to convert the original text into numerical form. And this operation can be divided into two parts, as follows:

[0081] The first part is to create an instance of the TfidfVectorizer class. Assuming it is named vectorizer, the code is: vectorizer = TfidfVectorizer().

[0082] The second part is to vectorize the character feature information in the string by converting it into a TF-IDF (term frequency–inverse document frequency) vector. TF-IDF vector is a weighted technology used for information retrieval and data mining. The code call for the second part can be, for example: vectors = vectorizer.fit_transform(sentences).toarray(). Among them, sentences represents the string to be converted, fit_transform is a function that converts the string into a standard form, and toarray is used to generate TF-IDF vectors and store them as vectors. This vector data vectors is an ordered list of values, which will be used for subsequent grouping operations. That is, the vectors in this example are the vector groups obtained after each log in the filtered log set is converted into a vector.

[0083] In a specific embodiment of the present invention, the above step 2 may include:

[0084] Select K vectors from the vector group as the current K center points;

[0085] The vector group refers to the vector set obtained after each log in the filtered log set is converted into a vector;

[0086] For each vector in the vector group, determine the center point that is closest to the vector among the current K center points, and assign the vector to the center point;

[0087] The vectors assigned to the same center point are grouped together, and a total of K groups are obtained;

[0088] For each group in the K groups, the average value of each vector in the group is used as the new center point of the group;

[0089] Determine whether the iteration termination condition is met;

[0090] If it is established, then based on the vectors in the currently obtained K groups, the logs corresponding to each vector are determined, and K groups divided from the filtered log set are obtained;

[0091] If not, the operation returns to executing, for each vector in the vector group, determining the center point closest to the vector among the current K center points, and assigning the vector to the center point.

[0092] After each log in the filtered log set is converted into a vector, the grouping is achieved based on the similarity between the vectors, that is, the grouping of the logs in the filtered log set is achieved. When grouping is achieved based on the similarity between the vectors, this implementation method takes into account that the grouping can be achieved specifically through the idea of ​​clustering, and through multiple rounds of iterations, vectors with high similarity can be effectively divided into the same group.

[0093] Specifically, in order to achieve clustering, it is first necessary to select K vectors from the vector group as the current K center points, for example, K vectors can be randomly selected as the current K center points. The vector group described here is the vector set obtained by the operation of step 1 above.

[0094] After that, for each vector in the vector group, take vector A as an example, and for example, K=10, that is, there are 10 center points in total, then it is necessary to determine the center point closest to vector A among the current 10 center points. For example, center point 2 is closest to vector A, so vector A can be assigned to center point 2. Here, vector A is taken as an example, and the principle is the same for each vector in the vector group.

[0095] The vectors assigned to the same center point are grouped together. Since there are K center points in total, K groups can be obtained in total.

[0096] In addition, it should be noted that if for a certain vector, there are 2 or more center points, which have the same distance from the vector and are the closest distances, then one center point can be randomly selected and the vector can be assigned to the center point.

[0097] After K groups are obtained, there will be at least one vector in each group. After that, the center point of each group needs to be updated. The updating method is that for each group, the average value of each vector in the group is used as the new center point of the group.

[0098] After the center point is updated, if the iteration termination condition is met, the log classification is terminated, that is, according to the currently obtained K groups, the logs in the filtered log set can be divided to obtain the divided K groups. Of course, it is understandable that when it is determined that the iteration termination condition is met, for the currently obtained K groups, each group contains some vectors, so it is necessary to determine the logs corresponding to each vector, so as to obtain the K groups divided from the filtered log set.

[0099] In addition, it can be understood that in the present application scheme, there is a one-to-one correspondence between vectors and logs. In order to facilitate the determination of the logs corresponding to each vector, an index number can usually be added in advance to each log in the filtered log set, and for any log, when it is converted into a corresponding vector, the vector can also carry the same index number to indicate the correspondence between the vector and the log.

[0100] If the iteration termination condition is not met, it is necessary to continue the iteration, that is, to regroup the vectors based on the updated center point.

[0101] The specific rules of the iteration termination condition can be set according to actual needs. For example, in a simple implementation, the iteration termination condition is that the iteration round reaches the set round threshold. Of course, the specific value of the set round threshold can also be set according to actual needs. For example, a reasonable round threshold can be preset based on comprehensive considerations such as the computer's hardware configuration, the complexity of the test stimulus, and the acceptable waiting time for the verification engineer.

[0102] For another example, in one implementation, the determination can be made based on the magnitude of the movement of the K center points before and after each round of iteration. That is, for each of the K groups, after taking the average value of each vector in the group as the new center point of the group, the distances between each new center point and the corresponding old center point are calculated and summed. If the sum result is higher than the set moving threshold, it means that the movement of the K center points is large, then it is determined that the iteration termination condition is not met and it is necessary to continue iterating. On the contrary, if the sum result is not higher than the set moving threshold, it means that the movement of the K center points is small and has approached convergence. Therefore, it can be determined that the iteration termination condition is met and it is not necessary to continue iterating. Compared with the aforementioned solution of determining whether the iteration is terminated according to the round threshold, such an implementation is more complicated, but it can end the iteration more reasonably.

[0103] In a specific implementation of the present invention, after filtering out each log indicating anomalies in the simulation log file as the obtained filtered log set, the following further includes:

[0104] Sort the logs in the filtered log set by log name;

[0105] Select K vectors from the vector group as the current K center points, including:

[0106] From the vector group, K vectors are selected on average according to the vector positions as the current K center points.

[0107] In this implementation, after step S102, the logs in the filtered log set will be sorted according to the log names, that is, for each line of logs in the filtered log set, the lines can be sorted from top to bottom according to the order of the character table. Accordingly, when K center points are selected for the first time, K vectors are selected from the vector group on average according to the vector positions as the current K center points. This is because, through sorting, the positions of logs with similar contents can be close to each other to a certain extent, while the positions of logs with dissimilar contents are far away from each other. In this way, by taking K vectors from the entire vector group on average according to the positions as the initial center points, the proximity or overlap of the center points can be effectively avoided, and the quality of the initial K center points is improved, which is beneficial to reduce the number of rounds of the subsequent iterative process and improve the iteration quality.

[0108] In the above implementation, it is necessary to determine the distance between the vectors. In this regard, in a specific implementation of the present invention, for each vector in the vector group, determining the center point that is closest to the vector among the current K center points may specifically include:

[0109] For each vector in the vector group, the distance between each of the current K center points and the vector is determined according to the cosine similarity or Jaccard distance between the vectors, and based on each distance, the center point closest to the vector among the current K center points is determined.

[0110] This implementation method takes into account that for each vector in the vector group, the distance between each of the current K center points and the vector can be determined according to the cosine similarity or Jaccard distance between the vectors, which is convenient to implement. Then, based on each distance, the center point closest to the vector among the current K center points can be determined.

[0111] The cosine similarity between vectors is the cosine similarity between two vectors obtained by dividing the dot product of the two vectors by the product of the modulus lengths of the two vectors. The Jaccard distance is used to describe the dissimilarity between vectors. The larger the Jaccard distance, the lower the similarity.

[0112] In addition, it should be noted that according to the solution of the present application, after the logs in the filtered log set are divided into K groups, when the verification engineer performs analysis and processing, it is usually sufficient to select one log from each group for analysis and processing, and then re-perform the simulation test. This is because the solution of the present application effectively groups the logs in the filtered log set, and the abnormal conditions reflected by the logs in the same group are often caused by the same reason. Therefore, from the perspective of locating the cause of the problem, selecting one log from each group for analysis and processing effectively improves the analysis and processing efficiency and reduces a large amount of repetitive work.

[0113] It should also be noted that the value of K can be freely specified by the verification engineer (of course, if K is set to 1, no grouping will be performed at this time). In actual applications, in the early stages of verification, there are many problems with the design or verification itself, resulting in many types of errors or causes of problems in the simulation log file. Usually, the value of K can be set to a larger value. In the middle and late stages of verification, as problems are gradually resolved, the value of K can be set to a smaller value.

[0114] This application takes into account that for the abnormal information in the simulation log file, some abnormal information is very similar to each other, and is often caused by the same problem. Therefore, from the perspective of locating the cause of the problem, if the cause of the abnormal problem is read and analyzed one by one, there may be a situation of repeated workload, that is, a lot of the same information is analyzed in the whole process, but it actually corresponds to a design problem. In this regard, if similar abnormal information is divided into the same group, it can effectively assist the work of the verification engineer, so that the verification engineer can analyze the log according to the category, instead of analyzing the abnormal information one by one from front to back, which can greatly improve the analysis efficiency.

[0115] In this regard, the technical solution provided by the embodiment of the present invention is applied. After the chip under test is simulated and tested, a simulation log file is obtained. The logs indicating abnormalities in the simulation log file are first screened out as the obtained filtered log set. Afterwards, the logs in the filtered log set are divided into K groups according to the grouping principle of grouping similar logs into the same group, so that the verification engineer can analyze these logs indicating abnormalities based on these K groups.

[0116] In summary, the present application solution can effectively improve the processing efficiency of simulation log files.

[0117] Corresponding to the above method embodiment, the embodiment of the present invention further provides a log management system, which can be referred to in correspondence with the above.

[0118] See also Figure 2 FIG. 1 is a schematic diagram of a log management system in the present invention, comprising:

[0119] The simulation log file acquisition module 201 is used to obtain the simulation log file after the simulation test is performed on the chip to be tested;

[0120] A screening module 202, used to screen out the logs indicating abnormalities in the simulation log file as a screened log set;

[0121] The log grouping module 203 is used to divide the logs in the filtered log set into K groups according to the grouping principle of grouping similar logs into the same group; wherein K is a preset positive integer not less than 2.

[0122] In a specific embodiment of the present invention, the screening module 202 includes:

[0123] A keyword determination unit, used to determine N keywords representing anomalies; wherein N is a preset positive integer;

[0124] The screening execution unit is used to filter out all logs that do not carry any of the keywords in the simulation log file, and use the remaining logs after filtering as the obtained screened log set.

[0125] In a specific implementation of the present invention, the log grouping module 203 includes:

[0126] A vectorization submodule, used for converting each log in the filtered log set into a vector;

[0127] The grouping submodule is used to divide the logs in the filtered log set into K groups based on the similarity between the vectors.

[0128] In a specific implementation of the present invention, the vectorization submodule is specifically used for:

[0129] Establishing a data structure of string type and array form, and storing the logs in the filtered log set one by one into the array;

[0130] The character strings in the array are converted into numerical form to obtain vectors in the form of word frequency-inverse text frequency index.

[0131] In a specific embodiment of the present invention, the grouping submodule includes:

[0132] An initial center point selection unit is used to select K vectors from the vector group as the current K center points;

[0133] The vector group represents a vector set obtained after each log in the filtered log set is converted into a vector;

[0134] A vector allocation unit, configured to determine, for each vector in the vector group, a center point that is closest to the vector among the current K center points, and allocate the vector to the center point;

[0135] A grouping updating unit, used for treating each vector assigned to the same center point as the same group, and obtaining K groups in total;

[0136] A center point updating unit, used for taking, for each group in the K groups, an average value of each vector in the group as a new center point of the group;

[0137] An iteration termination condition judgment unit, used to judge whether the iteration termination condition is met;

[0138] If so, a group determination unit is triggered to determine the logs corresponding to the vectors in the currently obtained K groups, and obtain K groups divided from the filtered log set;

[0139] If not, the trigger vector allocation unit is returned.

[0140] In a specific embodiment of the present invention, a sorting module is further included, which is used to: after filtering out the logs indicating abnormalities in the simulation log file in the filtering module 202 as the obtained filtered log set, sort the logs in the filtered log set according to the log names;

[0141] Correspondingly, the initial center point selection unit is specifically used for:

[0142] From the vector group, K vectors are selected on average according to the vector positions as the current K center points.

[0143] In a specific implementation of the present invention, the vector allocation unit is specifically used for:

[0144] For each vector in the vector group, the distance between each of the current K center points and the vector is determined according to the cosine similarity or Jaccard distance between the vectors, and based on each distance, the center point closest to the vector among the current K center points is determined, and the vector is assigned to the center point.

[0145] Corresponding to the above method and system embodiments, embodiments of the present invention further provide a log management device, a computer-readable storage medium, and a computer program product, which can be referred to in correspondence with the above.

[0146] See also Figure 3 As shown, the device may include:

[0147] Memory 301, used for storing computer programs;

[0148] The processor 302 is used to execute a computer program to implement the steps of the log management method in any of the above embodiments.

[0149] The computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the log management method in any of the above embodiments are implemented.

[0150] See also Figure 4 The computer readable storage medium 40 stores a computer program 41, and when the computer program 41 is executed by the processor, the steps of the log management method in any of the above embodiments are implemented. The computer readable storage medium 40 mentioned here includes RAM (Random Access Memory), memory, ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), register, hard disk, removable disk, or any other form of storage medium known in the technical field.

[0151] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0152] Professionals may further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention, and the description of the above embodiments is only used to help understand the technical solution and its core idea of ​​the present invention. It should be pointed out that for ordinary technicians in the technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in a number of ways, and these improvements and modifications also fall within the scope of protection of the present invention.

Claims

1. A log management method, characterized in that: include: After the chip under test is simulated and tested, a simulation log file is obtained; Filter out each log indicating anomalies in the simulation log file as a filtered log set; According to the grouping principle that similar logs are grouped into the same group, the logs in the filtered log set are divided into K groups; wherein K is a preset positive integer not less than 2.

2. The log management method according to claim 1, characterized in that: Filter out each log indicating anomalies in the simulation log file, as the obtained filtered log set, including: Determine N keywords indicating anomalies, wherein N is a preset positive integer; In the simulation log file, each log that does not carry any of the keywords is filtered out, and the remaining logs after filtering out are used as the obtained filtered log set.

3. The log management method according to claim 1 or 2, characterized in that: According to the grouping principle of grouping similar logs into the same group, the logs in the filtered log set are divided into K groups, including: Convert each log in the filtered log set into a vector; Based on the similarity between the vectors, the logs in the filtered log set are divided into K groups.

4. The log management method according to claim 3, characterized in that: Each log in the filtered log set is converted into a vector, including: Establishing a data structure of string type and array form, and storing the logs in the filtered log set one by one into the array; The character strings in the array are converted into numerical form to obtain vectors in the form of word frequency-inverse text frequency index.

5. The log management method according to claim 3, characterized in that: Based on the similarity between the vectors, the logs in the filtered log set are divided into K groups, including: Select K vectors from the vector group as the current K center points; The vector group represents a vector set obtained after each log in the filtered log set is converted into a vector; For each vector in the vector group, determine the center point that is closest to the vector among the current K center points, and assign the vector to the center point; The vectors assigned to the same center point are grouped together, and a total of K groups are obtained; For each group in the K groups, the average value of each vector in the group is used as the new center point of the group; Determine whether the iteration termination condition is met; If it is established, then based on the vectors in the currently obtained K groups, the logs corresponding to the respective vectors are determined to obtain K groups divided from the filtered log set; If not, the operation returns to executing, for each vector in the vector group, determining the center point closest to the vector among the current K center points, and assigning the vector to the center point.

6. The log management method according to claim 5, characterized in that: After filtering out the logs indicating abnormalities in the simulation log file as the obtained filtered log set, the following further includes: Sorting the logs in the filtered log set according to the log names; Select K vectors from the vector group as the current K center points, including: From the vector group, K vectors are selected on average according to the vector positions as the current K center points.

7. The log management method according to claim 5, characterized in that: For each vector in the vector group, determining a center point that is closest to the vector among the current K center points includes: For each vector in the vector group, the distance between each of the current K center points and the vector is determined according to the cosine similarity or Jaccard distance between the vectors, and based on the respective distances, the center point closest to the vector among the current K center points is determined.

8. A log management system, characterized in that: include: A simulation log file acquisition module is used to obtain a simulation log file after the chip under test is simulated and tested; A screening module, used for screening out each log indicating anomalies in the simulation log file as a screening log set; The log grouping module is used to divide the logs in the filtered log set into K groups according to the grouping principle of dividing similar logs into the same group; wherein K is a preset positive integer not less than 2.

9. A log management device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the log management method according to any one of claims 1 to 7.

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

Citation Information

Patent Citations

  • Log clustering classification technology based on text similarity

    CN111274385A

  • Method and equipment for classifying simulation errors of logic system design

    CN114548324A

  • Simulation log processing method and device

    CN116595943A

  • Data screening method, terminal equipment and computer readable storage medium

    CN117675623A

  • Distributed log data pattern recognition method and system and electronic device

    CN117724925A