An insurance company API change warning method and system

Through the combination of PageRank algorithm and abstract syntax tree, the changes in API data structures are detected in real time and early warnings are generated, which solves the problems of API change detection delay and missed reports in the existing technology, and improves the real-time and accuracy of API change monitoring.

CN119398944BActive Publication Date: 2025-04-01BAO DAFANG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411976732.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-01
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

Existing API change detection technology relies on static log analysis and cannot detect changes in API data structures in real time, resulting in delays in change warnings or missed reports.

Method used

By obtaining the interface call data of the insurance company's target API, using the PageRank algorithm to generate a dependency diagram, combining the abstract syntax tree for interface analysis, judging the data structure changes, and determining the parameter change information through clustering analysis to generate change warning information.

Benefits of technology

Real-time monitoring and efficient detection of API changes have been achieved, which significantly improves the API changes monitoring and response capabilities of insurance companies in complex systems, reduces system risks, and ensures business continuity and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398944B_ABST
    Figure CN119398944B_ABST
Patent Text Reader

Abstract

The present invention provides an insurance company API change warning method and system, including: based on the interface call data of the insurance company's target API, using the PageRank algorithm to output the dependency graph of the target API; according to the dependency graph, using an abstract syntax tree to perform interface parsing on the target API to obtain an interface parsing result, and according to the interface parsing result, judging whether a parameter change occurs in the data structure of the target API; if a parameter change occurs in the data structure of the target API, determining the data structure parameter change information of the target API by clustering analysis on the interface parsing result; generating change warning information according to the data structure parameter change information of the target API; the present application outputs an API dependency graph by using the PageRank algorithm, so as to clarify the dependency relationship between each node in the target API; using an abstract syntax tree to perform in-depth analysis on the API interface, so as to accurately identify changes in data results, and once changes in key data structures are detected, a warning can be quickly generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing and analysis, and in particular to an insurance company API change early warning method and system. Background Art

[0002] Currently, in modern software development practices, especially with the prevalence of service-oriented and microservice architectures, the use of application programming interfaces (APIs) has become particularly common. APIs allow different software systems to communicate with each other and support the interaction of data and functions. With the rapid changes in business needs and the continuous development of technology, APIs often need to be updated and changed to adapt to new business logic and improved system architecture.

[0003] With the digital transformation of modern insurance business, insurance companies rely on APIs to exchange data and automate processes with different business systems, partners and customer platforms. The stability and reliability of APIs are critical to ensuring the continuous operation of the business and user experience. However, due to the complexity and rapid changes in the insurance business, API changes have become a major challenge in the daily management of insurance companies.

[0004] Existing API change detection technologies have the following deficiencies:

[0005] Traditional API change management methods: Most insurance companies rely on manual or semi-automatic API change management methods. This method usually requires manual intervention, such as regular inspection of interface documents and manual testing. The manual process is not only inefficient, but also prone to omissions, resulting in failure to detect changes in a timely manner, affecting business continuity;

[0006] Lack of real-time data analysis: Existing API change detection systems often rely on static rules or simple log analysis and cannot dynamically adapt to changing data patterns. Therefore, these systems usually have difficulty providing high-accuracy early warnings when faced with sudden changes or complex call chains.

[0007] The early warning mechanism is not smart enough: Many existing API monitoring systems lack intelligent learning and adaptive capabilities and cannot automatically adjust detection parameters based on historical data and user behavior, resulting in frequent false positives and false negatives.

[0008] In summary, existing insurance companies mainly rely on static log analysis when performing API change detection. They check the records of API calls and rely on preset rules to identify potential problems and changes. This method cannot meet the needs of rapid response in many cases. Once the data structure of the API changes, these tools may not be able to effectively identify new change patterns, resulting in delays or omissions in change warnings. Summary of the invention

[0009] In order to solve the problem that the existing API change detection relies on simple static log analysis and cannot provide real-time change warning once the API data structure changes, the present invention proposes an insurance company API change warning method, including:

[0010] Based on the obtained interface call data of the target API of the insurance company, a dependency graph of the target API is outputted using a PageRank algorithm;

[0011] According to the dependency graph, using an abstract syntax tree to perform interface parsing on the target API to obtain an interface parsing result, and according to the interface parsing result, determining whether a parameter change occurs in a data structure of the target API;

[0012] If the data structure of the target API has parameter changes, determine the parameter change information of the data structure of the target API by performing cluster analysis on the interface parsing result;

[0013] Generate change warning information based on the data structure parameter change information of the target API.

[0014] Optionally, the step of outputting a dependency graph of the target API using a PageRank algorithm based on the acquired interface call data of the target API of the insurance company includes:

[0015] According to the obtained interface call data of the target API of the insurance company, a call relationship of the target API is obtained by using a context-sensitive algorithm;

[0016] According to the calling relationship of the target API, the target API is evaluated by using the PageRank algorithm to obtain the link structure between different nodes in the target API;

[0017] The link structure between different nodes in the target API is visualized through a force-directed graph to obtain a dependency graph of the target API.

[0018] Optionally, performing interface parsing on the target API using an abstract syntax tree according to the dependency graph to obtain an interface parsing result includes:

[0019] According to the dependency graph, extracting structural information of the target API through a graph mining algorithm to obtain data structure information corresponding to the target API;

[0020] Using an abstract syntax tree, performing interface parsing on the data structure information corresponding to the target API to obtain parsed structure information of the target API;

[0021] Performing differential analysis on the data structure information and the parsed structure information through a decision tree classifier to obtain difference change information between the data structure information and the parsed structure information, and using the difference change information as an interface parsing result;

[0022] The data structure information includes one or more of the following: interface definition information, method signature, upstream and downstream interface information, parameter list and return type.

[0023] Optionally, judging, according to the interface parsing result, whether a parameter change occurs in the data structure of the target API, includes:

[0024] Performing a text description on the interface parsing result to obtain attribute description information corresponding to the difference change information;

[0025] Verify the correctness of the attribute description information through smart contracts;

[0026] When the attribute description information passes the correctness verification of the smart contract, the attribute description information is used as the data structure parameter change information of the target API.

[0027] Optionally, generating change warning information according to the data structure parameter change information of the target API includes:

[0028] Using natural language processing, extracting keywords and semantic information of the data structure parameter change information of the target API;

[0029] Determining a parameter change type of the data structure parameter change information according to keywords and semantic information of the data structure parameter change information;

[0030] Generate change warning information of the target API according to the parameter change type.

[0031] Optionally, generating change warning information of the target API according to the parameter change type includes:

[0032] According to the parameter change type, a rule engine is used to perform a priority evaluation on the data structure parameter change information to obtain a priority corresponding to the data structure parameter change information;

[0033] According to the priority corresponding to the data structure parameter change information, the template generation technology is used to create customized change warning information of the target API.

[0034] Optionally, the interface call data includes one or more of the following: API caller information, call time, input and output data, and call frequency.

[0035] Based on the same inventive concept, the present invention also provides an insurance company API change warning system, including:

[0036] A relationship graph construction module, used to output a dependency graph of the target API using a PageRank algorithm based on the interface call data of the target API of the insurance company obtained;

[0037] An interface parsing module, used to perform interface parsing on the target API using an abstract syntax tree according to the dependency graph, obtain an interface parsing result, and determine whether a parameter change occurs in the data structure of the target API according to the interface parsing result;

[0038] An information comparison module, used for determining the parameter change information of the data structure of the target API by performing cluster analysis on the interface parsing result when the parameter change occurs in the data structure of the target API;

[0039] The change warning module is used to generate change warning information according to the data structure parameter change information of the target API.

[0040] Optionally, the relationship graph construction module includes:

[0041] A relation calling submodule, for obtaining the calling relation of the target API by using a context sensitive algorithm according to the interface calling data of the target API of the insurance company obtained;

[0042] A node evaluation submodule is used to evaluate the nodes of the target API using the PageRank algorithm according to the calling relationship of the target API, and obtain the link structure between different nodes in the target API;

[0043] The relationship graph generation submodule is used to visualize the link structure between different nodes in the target API through a force-directed graph to obtain a dependency graph of the target API.

[0044] Optionally, the interface parsing module includes:

[0045] An information extraction submodule, configured to extract structural information of the target API through a graph mining algorithm according to the dependency graph, and obtain data structure information corresponding to the target API;

[0046] The structure parsing submodule is used to perform interface parsing on the data structure information corresponding to the target API using an abstract syntax tree to obtain the parsed structure information of the target API;

[0047] A difference analysis submodule, used to perform a difference analysis on the data structure information and the parsed structure information through a decision tree classifier, obtain difference change information between the data structure information and the parsed structure information, and use the difference change information as an interface parsing result;

[0048] The data structure information includes one or more of the following: interface definition information, method signature, upstream and downstream interface information, parameter list and return type.

[0049] Optionally, the interface parsing module further includes:

[0050] A text description submodule, used to perform a text description on the interface analysis result to obtain attribute description information corresponding to the difference change information;

[0051] A correctness verification submodule, used to verify the correctness of the attribute description information through a smart contract;

[0052] The change information confirmation submodule is used to use the attribute description information as the data structure parameter change information of the target API when the attribute description information passes the correctness verification of the smart contract.

[0053] Optionally, the change warning module includes:

[0054] A key information extraction submodule, for extracting keywords and semantic information of the data structure parameter change information of the target API by using natural language processing;

[0055] A change type determination submodule, used to determine the parameter change type of the data structure parameter change information according to the keywords and semantic information of the data structure parameter change information;

[0056] The warning generation submodule is used to generate change warning information of the target API according to the parameter change type.

[0057] Optionally, the warning generation submodule includes:

[0058] A priority evaluation unit, configured to perform a priority evaluation on the data structure parameter change information through a rule engine according to the parameter change type, and obtain a priority corresponding to the data structure parameter change information;

[0059] The customized warning unit is used to create customized change warning information of the target API based on the priority corresponding to the data structure parameter change information using template generation technology.

[0060] In another aspect, the present invention further provides an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;

[0061] The memory is used to store one or more programs;

[0062] When the one or more programs are executed by the at least one processor, the insurance company API change warning method as described above is implemented.

[0063] On the other hand, the present invention further provides a computer-readable storage medium having an execution program stored thereon, which, when executed, implements the insurance company API change warning method as described above.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] The present invention provides an insurance company API change warning method and system, comprising: based on the interface call data of the target API of the insurance company obtained, using the PageRank algorithm to output the dependency graph of the target API; according to the dependency graph, using an abstract syntax tree to perform interface parsing on the target API to obtain an interface parsing result, and judging whether the data structure of the target API has parameter changes according to the interface parsing result; if the data structure of the target API has parameter changes, determining the data structure parameter change information of the target API by clustering analysis on the interface parsing result; generating change warning information according to the data structure parameter change information of the target API; the application outputs the API dependency graph by using the PageRank algorithm, so as to clarify the dependency relationship between each node in the target API; using the abstract syntax tree to perform in-depth analysis on the API interface is conducive to accurately identifying the change of data results, and once the change of the key data structure is detected, a warning can be quickly generated; therefore, the method of the present invention can significantly improve the monitoring and response capabilities of insurance companies to API changes in complex systems, not only can accurately capture the change of data structure, but also can effectively reduce the system risk caused by API change, and ensure the continuity and stability of business. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 A flowchart of an API change warning method for an insurance company provided by the present invention;

[0067] Figure 2 A schematic diagram of a dependency graph generation framework in an insurance company API change warning method provided by the present invention;

[0068] Figure 3A schematic diagram of a framework for generating change warning information in an insurance company API change warning method provided by the present invention;

[0069] Figure 4 A schematic diagram of the structure of an API change warning system for an insurance company provided by the present invention;

[0070] Figure 5 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION

[0071] The present invention proposes an insurance company API change warning method, system, device and medium. The specific implementation methods of the present invention are further described in detail below with reference to the accompanying drawings.

[0072] Embodiment 1:

[0073] The present invention provides an insurance company API change warning method, the flow chart is as follows Figure 1 As shown, including:

[0074] Step 1: Based on the obtained interface call data of the target API of the insurance company, use the PageRank algorithm to output the dependency graph of the target API;

[0075] Step 2: According to the dependency graph, use the Abstract Syntax Tree (AST) to parse the target API interface to obtain the interface parsing result, and determine whether the data structure of the target API has parameter changes based on the interface parsing result;

[0076] Step 3: If the parameters of the target API data structure change, cluster analysis is performed on the interface parsing results to determine the target API data structure parameter change information;

[0077] Step 4: Generate change warning information based on the data structure parameter change information of the target API.

[0078] Although the API monitoring tools currently on the market (such as traditional API gateways or log analysis software) provide basic API call detection functions, these tools mainly rely on static rules and lack intelligent and automated features. They cannot dynamically learn based on actual usage data and historical records, making it difficult to achieve true change warnings and rapid responses. In addition, in terms of real-time and accuracy, existing tools are difficult to meet the needs of complex and changing business scenarios, and cannot detect API changes in real time and efficiently. In current API change management, there are still the following key challenges:

[0079] Complexity of multi-dimensional data: API call data in insurance business involves multiple dimensions such as time series data, error logs, business data, etc. It is difficult for traditional systems to associate and analyze this data in a short period of time, resulting in limited accuracy of change detection.

[0080] Comprehensive assessment of the impact of changes: Assessing the impact of API changes on the entire system requires a comprehensive understanding of the dependencies between APIs and the potential impact of changes on upstream and downstream interfaces. However, the lack of advanced technical support makes this assessment process difficult to achieve.

[0081] Insufficient smart notifications and personalized responses: Existing technologies make it difficult to ensure the timeliness and adaptability of notifications after API changes occur. Users usually receive warning messages with single content and lack of priority distinction, resulting in slow response to problems.

[0082] Lack of automated verification and assessment tools: Existing methods lack automated verification and change impact assessment methods. Even if API changes are detected, the system can rarely automatically generate test sets or simulate actual business scenarios to verify the potential impact of the changes. Insurance companies have to invest a lot of time and resources in manual testing and risk assessment, which not only increases operating costs but also increases the risk of business interruption.

[0083] Based on the above shortcomings and technical challenges, insurance companies urgently need an intelligent, automated and adaptive API change warning method. Such a method can not only monitor and efficiently detect API changes in real time, but also effectively evaluate the impact of changes, generate personalized notification response mechanisms, and automatically verify the impact of changes on the system, thereby ensuring the stable operation of the business and the continuity of user experience. And because insurance companies are in complex business systems, APIs are usually highly dependent, and a change in an API may affect the stability and performance of multiple related modules. In order to achieve intelligent, automated and adaptive API change warning in such a complex environment, accurately obtaining and analyzing the dependencies of the target API is a key step. The generation of the dependency graph of the target API depends on interface call data, which provides a detailed record of the calling behavior between APIs, which can not only reveal the frequency and order of calls, but also reflect the logical dependencies between APIs. Interface call data forms the basis of dependency analysis by describing the relationship between callers and callees.

[0084] For example, the above-mentioned interface call data may include one or more of the following: API caller information, call time, input and output data, and call frequency.

[0085] Interface call data is not only the core foundation for target API dependency analysis, but also the key resource for subsequent construction of dependency graphs and intelligent early warning. This data can not only reflect the frequency, sequence, and context of API calls, but also help the system establish an accurate call relationship model through rich information. By analyzing this data, the system can extract the logical associations between target APIs and provide support for dynamic modeling of dependencies. Specifically:

[0086] In one implementation, Figure 2 As shown, the process of outputting the dependency graph of the target API using the PageRank algorithm based on the interface call data of the target API of the insurance company may include:

[0087] According to the interface call data of the target API of the insurance company obtained, the call relationship of the target API is obtained by using a context-sensitive algorithm;

[0088] According to the calling relationship of the target API, the PageRank algorithm is used to evaluate the nodes of the target API to obtain the link structure between different nodes in the target API;

[0089] The link structure between different nodes in the target API is visualized through the force-directed graph to obtain the dependency graph of the target API;

[0090] In this implementation, knowledge graph and semantic web technology are used as the core, and the interface call data of the insurance company's target API is deeply analyzed and processed to solve the limitations of traditional methods in complex API dependencies. In addition, data can be extracted and standardized from API call logs, interface documents, and business process documents through the ETL (Extract-Transform-Load) process, providing high-quality input data for subsequent dependency modeling, which not only improves the integrity and accuracy of the data, but also ensures the credibility of the data analysis results. The call relationship of the target API is identified through a context-sensitive algorithm. This solution fully considers the dynamic interaction and call conditions between APIs, and can capture complex call scenarios that are difficult to handle with traditional static analysis. Furthermore, the PageRank algorithm is used to evaluate the importance of the nodes of the target API. By quantitatively analyzing the importance of different nodes in the call relationship, the system can identify key API nodes, thereby optimizing resource allocation and reducing system risks. This process structures the complex API dependency network and generates an intuitive and easy-to-understand dependency graph. In addition, by visually expressing the link structure between different nodes through force-directed graphs, the solution presents abstract dependencies intuitively, allowing technicians to quickly understand the interrelationships and key dependencies of APIs in the system. Overall, this implementation method effectively improves the accuracy and efficiency of API dependency analysis, provides a reliable foundation for subsequent dynamic semantic analysis and change warnings, and ultimately helps insurance companies achieve intelligent monitoring and response to API changes in complex systems, ensuring business continuity and system operation stability.

[0091] Through the above implementation, the generated target API dependency graph not only intuitively displays the calling relationship between APIs, but also reveals the importance of different API nodes and the upstream and downstream dependency structure. This dependency graph provides a key foundation for subsequent interface analysis. Especially in complex systems, by analyzing the dependency graph, the core nodes of the target API and their associated data structure information can be more accurately locked. Based on these analysis results, the abstract syntax tree can be further used to perform in-depth interface analysis on the target API to capture specific data structure information and its change details. Specifically:

[0092] In one implementation, the above process of performing interface parsing on the target API using an abstract syntax tree according to the dependency graph to obtain the interface parsing result may include:

[0093] According to the dependency graph, the structural information of the target API is extracted through a graph mining algorithm to obtain the data structure information corresponding to the target API; wherein the data structure information may include one or more of the following: interface definition information, method signature, upstream and downstream interface information, parameter list and return type.

[0094] Use the abstract syntax tree to perform interface parsing on the data structure information corresponding to the target API to obtain the parsed structure information of the target API;

[0095] Through the decision tree classifier, the data structure information and the parsing structure information are differentially analyzed to obtain the difference change information between the data structure information and the parsing structure information, and the difference change information is used as the interface parsing result;

[0096] In this implementation, through the coordinated application of technologies such as dependency graph, abstract syntax tree and decision tree classifier, efficient parsing and change analysis of the target API interface is achieved, thereby generating accurate interface parsing results, and extracting the structural information of the target API from the dependency graph through graph mining algorithm, such as method signature, parameter list and upstream and downstream interface information. This process lays the data foundation and provides high-quality input for subsequent structured parsing and change analysis. In addition, using the abstract syntax tree to parse the interface code can further refine the hierarchical relationship and parameter changes of the data structure, ensuring that the change information of each node is clearly captured; by combining the decision tree classifier to perform differential analysis on the extracted structural information and AST parsing results, the data structure and interface can be accurately annotated. At the same time, the introduction of dynamic semantic analysis technology further improves the depth and intelligence of the analysis. In this process, in addition to identifying API parameter changes through AST, the semantic model can also be combined to calculate the similarity and impact range of interface changes to ensure that the change information is not only accurate but also contextually relevant. The core effect of this technical solution is that it can comprehensively improve the accuracy and real-time performance of API change analysis. On the one hand, the combination of dependency graph and abstract syntax tree solves the problem of difficult to capture interface changes in complex systems; on the other hand, the application of semantic analysis and decision tree classifier enhances the accuracy and operability of difference change information, and provides a reliable foundation for automatically generating adapter code and generating subsequent warning information.

[0097] In addition, in this implementation, in addition to differential analysis of data structure information and parsing structure information through decision tree classifiers to obtain interface parsing results, the bidirectional encoder model (BERT model) can also be used to calculate the semantic similarity of the target API before and after the change, mark the change points, and automatically generate adapter code with annotations for use in subsequent steps; the output change detection results and code are passed to the early warning decision engine. Using the BERT model for semantic similarity calculation can more accurately capture subtle changes in the API from a contextual perspective, such as adjustments to parameter names, types, and orders, or the business meaning of newly added fields. Compared with traditional rule-based or static logic-based change detection methods, this semantic-driven approach is more intelligent and can identify implicit associations and logic. Through the semantic understanding ability of the BERT model, the system can automatically mark the specific location where changes occur in the target API, such as type modifications to a field, adjustments to method signatures, etc. This automated change marking reduces manual intervention and improves the speed and accuracy of interface change analysis. The system can also automatically generate adapter code to handle compatibility issues between new and old versions. This not only reduces the workload of manual development, but also significantly reduces the risk of errors that may be introduced by manual adaptation. In addition, since the generated code comes with detailed comments, it provides developers with clear guidance, further improving the maintainability and transparency of the code.

[0098] Through the above implementation, the present invention extracts the structural information of the target API from the dependency graph, and generates an interface parsing result through abstract syntax tree parsing and differential analysis. The interface parsing result not only contains the data structure information and change points of the target API, but also accurately marks the context of the change, laying the foundation for further judging whether the data structure of the target API has parameter changes. Based on the above interface parsing results, the attribute information of the difference change is generated through text description, and combined with the correctness verification of the smart contract, the data structure parameter change information of the target API is finally determined, specifically:

[0099] In one implementation, the process of determining whether a parameter change occurs in the data structure of the target API according to the interface parsing result may include:

[0100] Provide a text description of the interface analysis results to obtain the attribute description information corresponding to the difference change information;

[0101] Verify the correctness of attribute description information through smart contracts;

[0102] When the attribute description information passes the correctness verification of the smart contract, the attribute description information is used as the data structure parameter change information of the target API;

[0103] In this implementation, by describing the interface parsing results in text and generating attribute description information of the difference changes, the data structure changes of the API can be accurately captured and recorded, thereby supporting more fine-grained and readable change management. This textual description is not only convenient for human understanding and review, but also conducive to further automated processing; secondly, by using smart contract technology to verify the correctness of these attribute description information, the reliability and accuracy of the data structure change information is ensured. Smart contracts can automatically execute predefined rules, thereby reducing human intervention and improving the efficiency and security of the verification process. This is extremely important in a rapidly changing and multi-interface integrated environment because it can effectively avoid system errors or inconsistencies caused by parameter changes. When the verification is successful, the attribute description information is used as the data structure parameter change information of the API, which means that the entire process is automated and truly adaptive, which not only greatly reduces the need for human participation and the probability of error, but also enhances the system's responsiveness and robustness in the face of external changes. In summary, this implementation method achieves accurate recording and efficient verification of API data structure parameter changes by integrating text description and smart contract verification, thereby improving the system's automation, reliability and security, and optimizing the API maintenance and version management process.

[0104] By verifying the correctness of the attribute description information through smart contracts, the system can ensure the reliability and accuracy of the target API's data structure parameter change information. The verified attribute description information not only clarifies the specific content of the change, but also provides a high-quality data basis for subsequent warning generation. In the process of generating change warning information, the system further uses natural language processing (NLP) technology to perform keyword and semantic analysis on these change information to extract deeper change types and business impacts, and finally realize intelligent warning of API changes. Specifically:

[0105] In one implementation, Figure 3 As shown, the above process of generating change warning information according to the data structure parameter change information of the target API may include:

[0106] Use natural language processing to extract keywords and semantic information about the target API’s data structure parameter changes;

[0107] Determine the parameter change type of the data structure parameter change information according to the keywords and semantic information of the data structure parameter change information;

[0108] According to the parameter change type, the change warning information of the target API is generated; in this implementation, the keyword and semantic extraction of the data structure parameter change information of the target API is carried out through natural language processing technology, and the change warning information is generated in combination with the determination of the change type, thereby realizing the intelligent and precise management of API changes; natural language processing is used to deeply mine the semantic features of the change information, so that the system can accurately understand the nature of the parameter change and its business impact, and provide data support for the generation of targeted warning information; and through the automatic classification of the change type, the severity and scope of the change can be quickly distinguished, ensuring that the generated warning information is not only specific in content but also highly readable and practical.

[0109] In this implementation, the process of generating the target API change warning information according to the parameter change type may include:

[0110] According to the parameter change type, the data structure parameter change information is evaluated for priority through the rule engine to obtain the priority corresponding to the data structure parameter change information;

[0111] According to the priority corresponding to the data structure parameter change information, the template generation technology is used to create customized target API change warning information; this implementation method uses the rule engine to evaluate the priority of the data structure parameter change information. The system can automatically calculate the impact of each change on the system according to the preset business rules and historical change data. This priority evaluation mechanism effectively screens out key changes, can focus on high-priority issues, avoid resource waste and omission of important risks. Compared with the traditional equal warning method, this priority evaluation makes the warning system more intelligent and efficient. Secondly, combined with template generation technology, customized warning information is automatically generated according to different priorities, so that the warning content is more in line with the actual scenario of the specific change. The template generation technology can insert relevant contextual information according to the parameter change type and priority, such as the affected modules, recommended repair measures, etc. This customized warning information not only improves the efficiency of the technical team's understanding of the problem, but also provides targeted guidance for different roles (such as developers, operation and maintenance teams, business managers), thereby accelerating the resolution of the problem. In addition, this solution optimizes the readability and timeliness of warning information through the combination of priority and template technology. High-priority changes can be quickly pushed through instant notification channels (such as SMS, system pop-up windows), while low-priority information can be pushed in a delayed manner or archived to avoid redundant information from interfering with the technical team. This dynamically adaptive warning mechanism significantly improves the system's change management capabilities and user experience in complex environments.

[0112] In this implementation, NLP is used to extract keywords and semantic information from change information, which not only enhances the ability to understand the change content, but also enables the system to identify the context and potential meaning of parameter changes at a higher level. This semantic-level analysis can accurately capture the specific attributes and impact range of the change, laying the foundation for the subsequent change type judgment. Compared with the traditional static rule-based change detection method, this solution shows higher flexibility and accuracy in processing complex and unstructured data. Secondly, through the analysis of keywords and semantic information, the system can automatically classify parameter change types, such as addition, deletion, modification and other operation types. The determination of parameter change types not only improves the efficiency of change analysis, but also provides a structured and clear basis for the subsequent generation of warning information. This automated classification mechanism reduces the need for manual participation, reduces the error rate, and significantly improves the real-time nature of change processing. Finally, the process of generating change warning information based on parameter change types makes the content of warning information more specific, accurate and targeted. This implementation method can provide customized warning information based on the change type, including a detailed description of potential risks, business modules that may be affected, and recommended processing measures. This personalized warning information greatly improves the technical team's response speed and coping ability to API changes, ensuring the stability and continuity of the business system. In this implementation method, after extracting keywords and semantic information, it can also be combined with k-Means Cluster analysis of user behavior logs can be used to identify the sensitivity of different user groups to API usage. This method helps understand which user groups may have higher or lower sensitivity to API changes. Then, based on the extracted keywords and semantic information, the information type of API data structure parameter changes is determined. This method not only allows the change information to be semantically clearly classified, but also can be mapped to the sensitivity of specific user groups through behavioral analysis results. In addition, based on the above implementation method, the Drools engine can also be applied. The engine automatically generates corresponding notification strategies and response suggestions by merging API change detection results and user group behavior data. Such strategies and suggestions are personalized warnings for different user groups and can be dynamically adjusted to meet the actual needs of users. Finally, the generated early warning strategy is not only simply passed to the user, but also input into a simulation modeling module for further verification and analysis.Finally, this implementation can also use simulation modeling to foresee the potential impact of API changes on the system and users in advance, and optimize strategies to improve the accuracy and effectiveness of responses. Combining the above-mentioned technical solutions can achieve a full-link automated processing from data changes to user notifications. This method not only effectively manages API changes and related user impacts, but also provides users with dynamic and personalized notification strategies through cluster analysis of logs, combined with NLP and rule engines. Simulation modeling is used for in-depth analysis to improve the reliability and predictability of strategies. In addition, the participation of the Drools engine provides reasoning-based automated strategy generation, which improves response speed and accuracy, so that user notifications are no longer one-size-fits-all, but are pushed accurately based on the specific impact of different user groups. ;

[0113] In this implementation, after applying the Drools engine to analyze the combination of API changes and user group behavior data, a personalized and dynamically adjusted notification strategy is generated and verified in the simulation modeling module. At this point, through further in-depth analysis of the simulation modeling module, the next processing stage can be entered. At this stage, a digital twin model of API calls can be built in the simulation environment. The digital twin technology can accurately simulate the propagation path of API changes in the system in a realistic virtual environment. Such modeling not only helps to accurately evaluate the impact of changes, but also can fully understand the potential system response mode; in order to have a deeper understanding of the system behavior in various possible situations, the present invention can apply the Monte Carlo simulation method to predict the behavior changes of the system in different scenarios. Monte Carlo simulation is a probabilistic simulation technology that can describe and evaluate the potential risks and uncertainties of changes through random sampling and a large number of simulation runs, so that the system can be prepared for the most unfavorable scenarios. Finally, after simulation and evaluation, the output impact prediction reports will be passed to the self-healing system. These reports contain the expected impact and its probability, providing strong data support for the system's automatic repair decisions. The self-healing system can intelligently determine the best repair path based on these predictions to minimize the negative impact of API changes on users and the system, thereby dynamically maintaining the stability and efficiency of the entire system. Therefore, the above technical solution combines simulation modeling, probability assessment and automated repair to make the entire system more intelligent, adaptive and risk-resistant. Such a closed-loop system effectively improves the response capability and system robustness in a rapidly changing application environment, ensuring the stability of the API and the optimization of user experience.

[0114] In complex distributed systems or microservice architectures, API changes may trigger chain reactions, affecting system stability and business continuity. To meet this challenge, this implementation builds an efficient and intelligent closed-loop management system through multi-level design, from automatic repair to data protection to user notification. When the API change is detected and the impact scope is clarified through simulation reports, the self-healing system and the automatic repair mechanism respond quickly, using Python scripts to implement automated deployment of the repair process, and combining Diff tools to accurately compare the code differences before and after the repair to ensure the integrity and consistency of the repair. The generation of the repair status report not only provides key input for subsequent security modules, but also lays the foundation for system maintenance and problem tracing. Based on the repair status report, the diversified data security protection module dynamically adjusts data access permissions, applies dynamic data masking strategies to protect data integrity, and uses homomorphic encryption technology to ensure the security of sensitive data during transmission and processing. This module uses refined data protection strategies to expand API change management from functional repair to security assurance, comprehensively improving the system's adaptability to changes and the level of data privacy protection. In the final stage of change management, the multi-channel notification and user interaction interface accurately pushes change information to relevant users through Slack API, emails, pop-ups and other methods. In addition, the interactive interface developed based on Vue.js not only provides clear notification display, but also supports real-time collection of user feedback. These feedback information are passed back to the knowledge graph, further optimizing the system's early warning strategy and response mechanism, so that the entire management process forms a closed loop; through the full process linkage from change repair to security protection to user notification, the technical solution of the present invention significantly improves the intelligence and automation level of the system, while ensuring business continuity, data security and user experience, it provides strong technical support and innovative solutions for API management.

[0115] In summary, the present invention aims at the problem that the existing API change detection relies on simple static log analysis. Once the data structure of the API changes, it will lead to the problem that the change warning cannot be carried out in real time. By integrating the PageRank algorithm, abstract syntax tree parsing and cluster analysis, an efficient API change detection and response is realized. First, the PageRank algorithm provides a step-by-step method for the analysis of API dependencies, which helps to clarify the status and influence of key APIs; through the in-depth analysis achieved by AST, the solution can provide accurate data structure status to ensure the accuracy and comprehensiveness of change detection; cluster analysis reveals meaningful patterns or trends in complex and diverse data changes, which helps to respond and adapt quickly; therefore, the method of the invention significantly improves the intelligence and automation level of API management, reduces manual errors and reaction time, and improves the transparency and maintainability of the system; at the same time, timely and accurate change warning information enables stakeholders to quickly take corresponding measures to reduce potential service interruptions or inconsistencies, and ultimately provide substantial support for the stable operation of the system and the optimization of user experience. Through the above-mentioned method, insurance companies can more effectively monitor API changes, conduct multi-dimensional analysis, automatically verify the impact of changes, and promptly notify users to respond, filling the gaps and deficiencies of existing technologies.

[0116] Embodiment 2:

[0117] Based on the same inventive concept, the present invention also provides an insurance company API change warning system, the structural composition diagram is as follows: Figure 4 As shown, including:

[0118] A relationship graph building module is used to output a dependency graph of the target API using a PageRank algorithm based on the interface call data of the target API of the insurance company obtained;

[0119] The interface parsing module is used to parse the target API using the abstract syntax tree according to the dependency graph, obtain the interface parsing result, and determine whether the data structure of the target API has parameter changes according to the interface parsing result;

[0120] The information comparison module is used to determine the parameter change information of the target API data structure by clustering the interface parsing results when the parameter change occurs in the target API data structure;

[0121] The change warning module is used to generate change warning information based on the data structure parameter change information of the target API.

[0122] For example, the above-mentioned interface call data may include one or more of the following: API caller information, call time, input and output data, and call frequency.

[0123] In one implementation, the above relationship graph construction module may include:

[0124] The relation calling submodule is used to obtain the calling relation of the target API by using a context sensitive algorithm according to the interface calling data of the target API of the insurance company obtained;

[0125] The node evaluation submodule is used to evaluate the nodes of the target API using the PageRank algorithm according to the calling relationship of the target API, and obtain the link structure between different nodes in the target API;

[0126] The relationship graph generation submodule is used to visualize the link structure between different nodes in the target API through a force-directed graph to obtain the dependency graph of the target API.

[0127] In one implementation, the above-mentioned interface parsing module may include:

[0128] The information extraction submodule is used to extract the structural information of the target API based on the dependency graph through the graph mining algorithm to obtain the data structure information corresponding to the target API;

[0129] The structure parsing submodule is used to perform interface parsing on the data structure information corresponding to the target API using the abstract syntax tree to obtain the parsed structure information of the target API;

[0130] The difference analysis submodule is used to perform a difference analysis on the data structure information and the parsing structure information through a decision tree classifier, obtain the difference change information between the data structure information and the parsing structure information, and use the difference change information as the interface parsing result;

[0131] The data structure information includes one or more of the following: interface definition information, method signature, upstream and downstream interface information, parameter list and return type.

[0132] In one implementation, the above interface parsing module may further include:

[0133] The text description submodule is used to provide a text description of the interface analysis results to obtain the attribute description information corresponding to the difference change information;

[0134] The correctness verification submodule is used to verify the correctness of the attribute description information through the smart contract;

[0135] The change information confirmation submodule is used to use the attribute description information as the data structure parameter change information of the target API when the attribute description information passes the correctness verification of the smart contract.

[0136] In one implementation, the above-mentioned change warning module may include:

[0137] The key information extraction submodule is used to extract keywords and semantic information of the target API's data structure parameter change information using natural language processing;

[0138] A change type determination submodule, used to determine the parameter change type of the data structure parameter change information according to the keywords and semantic information of the data structure parameter change information;

[0139] The warning generation submodule is used to generate change warning information of the target API according to the parameter change type.

[0140] In this implementation, the above-mentioned warning generation submodule may include:

[0141] A priority evaluation unit, used to perform a priority evaluation on the data structure parameter change information through a rule engine according to the parameter change type, and obtain the priority corresponding to the data structure parameter change information;

[0142] The customized warning unit is used to create customized target API change warning information based on the priority corresponding to the data structure parameter change information using template generation technology.

[0143] Embodiment 3:

[0144] like Figure 5 As shown, the present invention also provides an electronic device, which may be a computer device, a single-chip device, an intelligent mobile device, etc. The electronic device in this embodiment may include a processor, a memory, a transceiver component, etc. The memory, the processor, and the transceiver component are connected via a bus; the memory may be used to store an execution program, and an exemplary execution program may include instructions; the processor is used to execute the instructions stored in the memory. The memory may also be used to store data, which may be called and / or modified when the instructions are executed.

[0145] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement corresponding method flows or corresponding functions, so as to implement the steps of an insurance company API change warning method in the above-mentioned embodiment.

[0146] Embodiment 4:

[0147] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in electronic devices and extended storage media supported by electronic devices. The storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by a processor are also stored in the storage space, and these instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor loads and executes one or more instructions stored in the storage medium, which can implement the steps of an insurance company API change warning method in the above embodiment.

[0148] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0150] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0152] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit its protection scope. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art can still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the protection scope of the claims to be approved.

Claims

1. An insurance company API change warning method, characterized in that: include: Based on the obtained interface call data of the target API of the insurance company, a dependency graph of the target API is outputted using a PageRank algorithm; According to the dependency graph, using an abstract syntax tree to perform interface parsing on the target API to obtain an interface parsing result, and according to the interface parsing result, determining whether a parameter change occurs in a data structure of the target API; If a parameter change occurs in the data structure of the target API, determine the parameter change information of the data structure of the target API by performing cluster analysis on the interface parsing result; Generate change warning information according to the data structure parameter change information of the target API; The method of outputting a dependency graph of the target API based on the obtained interface call data of the target API of the insurance company using the PageRank algorithm includes: According to the obtained interface call data of the target API of the insurance company, a call relationship of the target API is obtained by using a context-sensitive algorithm; According to the calling relationship of the target API, the target API is evaluated by using the PageRank algorithm to obtain the link structure between different nodes in the target API; The link structure between different nodes in the target API is visualized through a force-directed graph to obtain a dependency graph of the target API.

2. The method according to claim 1, characterized in that The step of performing interface parsing on the target API using an abstract syntax tree according to the dependency graph to obtain an interface parsing result includes: According to the dependency graph, extracting structural information of the target API through a graph mining algorithm to obtain data structure information corresponding to the target API; Using an abstract syntax tree, performing interface parsing on the data structure information corresponding to the target API to obtain parsed structure information of the target API; Performing differential analysis on the data structure information and the parsed structure information through a decision tree classifier to obtain difference change information between the data structure information and the parsed structure information, and using the difference change information as an interface parsing result; The data structure information includes one or more of the following: interface definition information, method signature, upstream and downstream interface information, parameter list and return type.

3. The method according to claim 2, characterized in that The determining, according to the interface parsing result, whether a parameter change occurs in the data structure of the target API, includes: Performing a text description on the interface parsing result to obtain attribute description information corresponding to the difference change information; Verify the correctness of the attribute description information through smart contracts; When the attribute description information passes the correctness verification of the smart contract, the attribute description information is used as the data structure parameter change information of the target API.

4. The method according to claim 1 or 3, characterized in that The generating change warning information according to the data structure parameter change information of the target API includes: Using natural language processing, extracting keywords and semantic information of the data structure parameter change information of the target API; Determining a parameter change type of the data structure parameter change information according to keywords and semantic information of the data structure parameter change information; Generate change warning information of the target API according to the parameter change type.

5. The method according to claim 4, characterized in that The generating, according to the parameter change type, change warning information of the target API includes: According to the parameter change type, a rule engine is used to perform a priority evaluation on the data structure parameter change information to obtain a priority corresponding to the data structure parameter change information; According to the priority corresponding to the data structure parameter change information, the template generation technology is used to create customized change warning information of the target API.

6. The method according to claim 1, characterized in that The interface call data includes one or more of the following: API caller information, call time, input and output data, and call frequency.

7. An insurance company API change warning system, characterized in that: include: A relationship graph construction module, used to output a dependency graph of the target API using a PageRank algorithm based on the interface call data of the target API of the insurance company obtained; An interface parsing module, used to perform interface parsing on the target API using an abstract syntax tree according to the dependency graph, obtain an interface parsing result, and determine whether a parameter change occurs in the data structure of the target API according to the interface parsing result; An information comparison module, used for determining the parameter change information of the data structure of the target API by performing cluster analysis on the interface parsing result when the parameter change occurs in the data structure of the target API; A change warning module, used to generate change warning information according to the data structure parameter change information of the target API; The relationship diagram construction module includes: A relation calling submodule, for obtaining the calling relation of the target API by using a context sensitive algorithm according to the interface calling data of the target API of the insurance company obtained; A node evaluation submodule is used to evaluate the nodes of the target API using the PageRank algorithm according to the calling relationship of the target API, and obtain the link structure between different nodes in the target API; The relationship graph generation submodule is used to visualize the link structure between different nodes in the target API through a force-directed graph to obtain a dependency graph of the target API.

8. The system according to claim 7, characterized in that The interface parsing module comprises: An information extraction submodule, configured to extract structural information of the target API through a graph mining algorithm according to the dependency graph, and obtain data structure information corresponding to the target API; The structure parsing submodule is used to perform interface parsing on the data structure information corresponding to the target API using an abstract syntax tree to obtain the parsed structure information of the target API; A difference analysis submodule, used to perform a difference analysis on the data structure information and the parsed structure information through a decision tree classifier, obtain difference change information between the data structure information and the parsed structure information, and use the difference change information as an interface parsing result; The data structure information includes one or more of the following: interface definition information, method signature, upstream and downstream interface information, parameter list and return type.

Citation Information

Patent Citations

  • API misuse detection method based on decision tree algorithm

    CN114153721A

  • API change detection and notification method and device, equipment and medium

    CN116048616A