CN-122019243-A - Software exception report self-adaptive construction method based on deep semantic analysis
Abstract
The invention relates to the technical field of semantic analysis, in particular to a software exception report self-adaptive construction method based on deep semantic analysis, which comprises the steps of acquiring a byte code structure index, a thread frame state sequence and a log buffer construction evidence set when exception triggering, and carrying out hierarchical analysis on the symbol feature layer, the call topology layer and the service logic layer on the abnormal information, and generating a confidence index based on the trusted anchor point. And determining an effective analysis depth boundary by calculating an inter-layer confidence gradient, and performing directional completion on the non-anchor nodes at the boundary layer to form a semantic analysis result data packet. And further generating report structure constraint data, perfecting report content through a semantic increment driven local supplement and negotiation mechanism, automatically resolving cross-unit conflict, and finally outputting a self-adaptive exception report with complete structure, consistent semantics and evidence boundary annotation.
Inventors
- ZHANG FEI
- XING WEI
- XU JIACHENG
- FU RONG
- WANG LEI
- LIU XIANGWEI
- CHENG JIA
Assignees
- 金盾检测技术股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260415
Claims (7)
- 1. The software exception report self-adaptive construction method based on the deep semantic analysis is characterized by comprising the steps of deriving a byte code structure index, a thread frame state sequence and a bounded log buffer when exception triggering is performed to form an evidence set; Based on the evidence set, carrying out progressive analysis on abnormal original information according to a symbol feature layer, a call topology layer and a business logic layer, marking semantic nodes matched with the evidence set as trusted anchor points, marking unmatched nodes as non-anchor nodes, generating an in-layer confidence index according to the coverage degree of the trusted anchor points of each layer, and forming a layered semantic characterization structure; Based on the hierarchical semantic characterization structure, calculating the confidence coefficient variation between adjacent layers to form a gradient sequence, judging the effective analysis depth boundary, executing byte code index directional complement on non-anchor nodes in the boundary layer, and outputting a semantic analysis result data packet; Acquiring the necessity marks, the maximum semantic reference depth and the non-anchor explicit labeling requirements of each report structure unit based on the semantic analysis result data packet to form report structure constraint data; based on the semantic analysis result data packet and report structure constraint data, detecting non-anchor reference nodes, merging according to the evidence deletion type, sending a local supplement request, counting the semantic increment returned each time, resolving the cross-unit conflict nodes based on the conclusion of the coverage degree of the credible anchor points, and outputting a self-adaptive exception report.
- 2. The method for adaptively constructing the software exception report based on the deep semantic parsing as set forth in claim 1, wherein the evidence collection acquisition process comprises the steps of deriving a byte code structure index of a currently loaded class when an exception trigger signal is generated; The method comprises the steps of obtaining a current thread frame state sequence, intercepting log buffer zone content in a preset time window before abnormal trigger time, wherein the current thread frame state sequence comprises a method complete defined name corresponding to each frame, a byte code execution position and local variable type information; the method is characterized in that the method is solidified into an immutable evidence set at the abnormal triggering moment, and no updating operation is performed on the evidence set in the analysis process.
- 3. The method for adaptively constructing the software exception report based on the deep semantic analysis of claim 1, wherein the hierarchical semantic representation structure acquisition process comprises the steps of carrying out matching search on exception class names, method signatures and byte code line numbers in stack frames and type definition records in byte code structure indexes by symbol feature layers, marking symbol nodes with corresponding type definition records in the indexes as trusted anchors, marking symbol nodes without corresponding records as non-anchor nodes, and generating symbol feature layer confidence indexes according to the ratio of the number of the trusted anchors to the number of the non-anchor nodes in the layer; The call topology layer uses stack frames as nodes to construct a directed call graph according to the call sequence, the call relation represented by directed edges searches corresponding method call instruction records in the byte code structure index, nodes at two ends of the searched hit edge are marked as trusted anchors, and the ratio of the number of the trusted anchors to the number of non-anchor nodes in the layer is used for generating a confidence index of the call topology layer; The service logic layer performs co-occurrence matching on the path segments in the directed call graph and the service operation identification sequences in the bounded log buffer, wherein the service operation identification sequences are consistent with the threads where the current abnormality is located, the service operation identifications generated by other threads in the same time window are eliminated, path nodes with the co-occurrence relation with the service operation identifications in the corresponding time window are marked as trusted anchors, and a service logic layer confidence index is generated according to the ratio of the number of the trusted anchors to the number of non-anchor nodes in the layer; The three-layer confidence indexes and the node labeling results of each layer are packaged together to form a layered semantic characterization structure.
- 4. The method for adaptively constructing the software exception report based on the deep semantic analysis is characterized in that the acquisition process of the semantic analysis result data packet comprises the steps of calculating the difference value of confidence indexes between adjacent layers to form a gradient sequence, scanning the gradient sequence by a preset absolute threshold value, determining the interlayer position of the layer with the largest difference value amplitude as an effective analysis depth boundary if the difference value exceeds the absolute threshold value, expanding the effective analysis depth boundary to the deepest layer if all the difference values are lower than the absolute threshold value, and shrinking the effective analysis depth boundary to the first layer if all the difference values exceed the absolute threshold value and the difference value between the maximum value and the minimum value of the difference values is lower than the preset relative threshold value, and generating a context evidence insufficient notification containing evidence missing conditions of all layers; After determining the effective analysis depth boundary, each non-anchor node in the boundary layer executes directional complement query in the byte code structure index, the query scope is the method definition record of the direct caller frame and the direct called frame of the frame corresponding to the non-anchor node, the non-anchor node is upgraded to a trusted anchor point and the confidence index of the layer is updated when the query hits, the unreachable classification record evidence deletion type is defined according to the undefined calling relation, type information deletion or method when the query misses, and the hierarchical position mark of the effective analysis depth boundary, the marking result of each layer of node and the classification record of the evidence deletion type are packaged into a semantic analysis result data packet to be output.
- 5. The method is characterized in that the report structure constraint data acquisition process comprises the steps of extracting the position of an effective analysis depth boundary layer in a semantic analysis result data packet, generating marks for report structure units according to the boundary layer, wherein the marks of the code position positioning unit in the symbol feature layer are the necessary occurrence, the marks of the business influence description unit are the forbidden occurrence, the number of connected components of a directed call graph is extracted when the boundary is in a call topology layer, the number of the connected components is the number of the connected components of a single path root because the positioning unit is the necessary occurrence, the number of the connected components is larger than the number of the connected components of a multi-candidate path contrast unit, the number of the connected components is counted when the boundary is in a business logic layer, the marks of the functional influence diffusion units are the necessary occurrence when the boundary is in a business logic layer, and the maximum semantic layer depth which is allowed to be referenced by the layer where the effective analysis depth boundary is used as all report structure units; mapping various types of missing in the evidence missing type classification record into corresponding non-anchor explicit marking requirements, and packaging the necessity marking set, the maximum semantic layer depth and the non-anchor explicit marking requirement set into report structure constraint data for output.
- 6. The method for adaptively constructing the software exception report based on the deep semantic analysis according to claim 1 is characterized by detecting non-anchor reference nodes, merging according to the evidence deletion type, sending local supplement requests, and counting semantic increment returned each time, and specifically comprises the steps of grouping the local supplement requests according to code modules corresponding to the non-anchor reference nodes of each structural unit, concurrently executing requests pointing to different code modules, and merging the requests pointing to the same code module into a single directional query; After the analysis module returns the differential supplementary data, counting the number of the newly added trusted anchors as semantic increment, namely, updating the content of the corresponding structural unit in a differential mode and re-executing non-anchor reference detection to enter the next round of request flow in the presence of the semantic increment being larger than zero, judging that the structural unit reaches the semantic limit of the current evidence set when the semantic increment is equal to zero, inserting a structured semantic boundary label into the rest non-anchor content position, wherein the label content comprises normalized description of the corresponding evidence deletion type, and the label unit is the negotiation cycle of the completed and terminated unit.
- 7. The method for adaptively constructing the software exception report based on the deep semantic parsing according to claim 1, wherein the process of adaptively outputting the exception report comprises the following steps: After all the structural units complete negotiation, establishing mapping tables from all cross-unit reference semantic node identifiers to analysis conclusions in the report, and detecting conflict situations of different analysis conclusions of the same semantic node identifier in different structural units; comparing the number of the dependable anchors associated with each of the two analysis conclusions to obtain a final analysis conclusion, wherein when the number of the dependable anchors associated with each of the two conflict analysis conclusions is equal, the analysis conclusion from the analysis depth shallow layer is used as the final analysis conclusion; And updating the content of the conflict node in the related structural unit by the final analysis conclusion, executing structural integrity verification on the whole report, and packaging and outputting the self-adaptive report text, the analysis depth limited statement and the conflict resolution record after confirming that the necessity marks of all the structural units are met, thereby forming a complete self-adaptive exception report.
Description
Software exception report self-adaptive construction method based on deep semantic analysis Technical Field The invention relates to the technical field of semantic analysis, in particular to a software exception report self-adaptive construction method based on deep semantic analysis. Background The existing software exception report construction method generally adopts a technical route combining a predefined template and a rule engine, namely, a fixed report structure and a field mapping rule are preset, and when exception triggering occurs, the original data such as stack information, error codes, time stamps and the like are filled into corresponding fields to generate a formatted report. The partial improvement scheme introduces a natural language processing technology, and the abnormal log text is subjected to abstract processing through keyword extraction or shallow semantic matching so as to enrich the description content of the report. However, the above methods all imply a common technical premise assumption that a fixed depth semantic parsing is performed on the anomaly information and structured construction of the report is driven based on the fixed parsing result. The assumption ignores the essential characteristics of the software exception information, namely the exception information is the section projection of the execution state when the program runs, the structural fracture exists between the surface layer semantics and the deep technology semantics, the same surface layer exception characteristics can correspond to a plurality of deep semantics with different essence, and the effective deep semantic boundary is dynamically changed along with the changes of the code context, the service execution path and the system running state. Therefore, the semantic analysis with fixed depth cannot provide an analysis result with sufficient semantics and granularity adaptation for report construction, so that systematic semantic mismatch is generated between the structural organization of the generated report and an actual abnormal scene, and the effective supporting capability of the report on abnormal positioning and repairing decisions is seriously affected. Therefore, a software exception report self-adaptive construction method based on deep semantic analysis is provided. Disclosure of Invention The invention aims to provide a software exception report self-adaptive construction method based on deep semantic analysis, which realizes the credible analysis of exception information and the self-adaptive generation of a report structure by constructing a hierarchical semantic characterization structure, judging the analysis depth boundary, executing directional completion and semantic increment negotiation. In order to achieve the above purpose, the present invention provides the following technical solutions: a software exception report self-adaptive construction method based on deep semantic analysis comprises the following steps: When the exception is triggered, a byte code structure index, a thread frame state sequence and a bounded log buffer are exported to form an evidence set; Based on the evidence set, carrying out progressive analysis on abnormal original information according to a symbol feature layer, a call topology layer and a business logic layer, marking semantic nodes matched with the evidence set as trusted anchor points, marking unmatched nodes as non-anchor nodes, generating an in-layer confidence index according to the coverage degree of the trusted anchor points of each layer, and forming a layered semantic characterization structure; Based on the hierarchical semantic characterization structure, calculating the confidence coefficient variation between adjacent layers to form a gradient sequence, judging the effective analysis depth boundary, executing byte code index directional complement on non-anchor nodes in the boundary layer, and outputting a semantic analysis result data packet; Acquiring the necessity marks, the maximum semantic reference depth and the non-anchor explicit labeling requirements of each report structure unit based on the semantic analysis result data packet to form report structure constraint data; based on the semantic analysis result data packet and report structure constraint data, detecting non-anchor reference nodes, merging according to the evidence deletion type, sending a local supplement request, counting the semantic increment returned each time, resolving the cross-unit conflict nodes based on the conclusion of the coverage degree of the credible anchor points, and outputting a self-adaptive exception report. Preferably, the evidence collection acquisition process comprises the steps of deriving a byte code structure index of a currently loaded class when an abnormal trigger signal is generated, and directly marking associated semantic nodes as non-anchor nodes in analysis and recording evidence deletion types as unreachable method definiti