Data risk level determination method, apparatus, device, medium, and program product
By constructing a fault association knowledge graph and using differential analysis, the blind spots in traditional risk assessment techniques are solved, enabling accurate risk assessment of updated data for changed components and improving the reliability and accuracy of risk level determination.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2025-08-29
- Publication Date
- 2026-06-02
Smart Images

Figure CN122132266A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data technology, specifically to the field of artificial intelligence technology, and in particular to a method, apparatus, device, medium, and program product for determining data risk levels. Background Technology
[0002] With the advancement of computer technology, enterprises, including banks, have increasingly higher demands for software updates. After updating the original software components, it is necessary to update the data of modified components deployed in other regions. These modified components in other regions are generated by modifying the data of the original components according to the business strategies of those regions. Correspondingly, when updating the modified components in other regions using the update data of the original components, it is necessary to modify the update data of the original components to generate the update data of the modified components in those regions. At this point, a risk assessment needs to be conducted on these updated component data to ensure the security and stability of the system.
[0003] Traditional risk assessment techniques rely on rule matching to determine the risk level of updated data for changed components. This approach struggles to uncover hidden risks with cascading effects, creating blind spots in risk assessment. Consequently, the generated risk level assessment results are inaccurate and unreliable, impacting subsequent production and potentially leading to losses. Summary of the Invention
[0004] In view of the above problems, this application provides a method, apparatus, device, medium and program product for determining data risk level.
[0005] According to a first aspect of this application, a method for determining data risk level is provided. The method includes: acquiring original component update data and n modified component update data, wherein the n modified component update data are generated by modifying the original component update data with code based on each of the n preset business strategies, where n is an integer and greater than 1; acquiring historical fault data of the n modified components, constructing a knowledge graph based on the n preset business strategies and the historical fault data of the n modified components, and generating a fault association knowledge graph of the n modified components; performing a differential analysis on the original component update data and each modified component update data to generate difference data between each modified component update data and the original component update data; inputting the difference data between each modified component update data and the original component update data and the fault association knowledge graph into a pre-trained risk model, and outputting a risk score for each modified component update data; and determining the risk level of each modified component update data based on the risk score of each modified component update data.
[0006] According to an embodiment of this application, a knowledge graph is constructed based on the n preset business strategies and the historical fault data of the n changed components to generate a fault association knowledge graph of the n changed components. This includes: analyzing the n preset business strategies to generate the association relationship of the n preset business strategies; and constructing the fault association knowledge graph of the n changed components with the n changed components as nodes, the association relationship of the n preset business strategies as edges, and the historical fault data of the n changed components as node attributes.
[0007] According to an embodiment of this application, differential analysis is performed on the original component update data and the update data of each modified component to generate differential data between the update data of each modified component and the original component update data. This includes: obtaining the source code of the original component update data as a first source code; obtaining the source code of n modified component update data as n second source codes; performing lexical analysis and syntactic analysis on the first source code and the n second source codes to generate a first structural syntax tree of the first source code and a second structural syntax tree of the n second source codes; and performing differential analysis on the first structural syntax tree and the n second structural syntax trees to generate differential data between the update data of each modified component and the original component update data.
[0008] According to an embodiment of this application, differential analysis is performed on the first structural syntax tree and n second structural syntax trees to generate difference data between the updated data of each modified component and the updated data of the original component. This includes: performing node matching on the first structural syntax tree and each second structural syntax tree using a hash algorithm to generate multiple pairs of matching nodes between each second structural syntax tree and the first structural syntax tree; calculating the similarity between the multiple pairs of matching nodes between each second structural syntax tree and the first structural syntax tree using an edit distance algorithm; obtaining nodes with similarity lower than a preset threshold among the multiple pairs of matching nodes between each second structural syntax tree and the first structural syntax tree to generate difference nodes among the multiple pairs of matching nodes between each second structural syntax tree and the first structural syntax tree; and obtaining the data in the difference nodes among the multiple pairs of matching nodes between each second structural syntax tree and the first structural syntax tree to generate difference data between the updated data of each modified component and the updated data of the original component.
[0009] According to an embodiment of this application, the difference data between the updated data of each modified component and the original component update data, along with the fault association knowledge graph, are input into a pre-trained risk model to output a risk score for each updated data of the modified component. This includes: obtaining a preset business strategy corresponding to each updated data of the modified component among the n preset business strategies; fine-tuning the parameters of the pre-trained risk model based on the preset business strategy corresponding to each updated data of the modified component to generate a parameter-fine-tuned risk model corresponding to each updated data of the modified component; and inputting the difference data between the updated data of each modified component and the original component update data, along with the fault association knowledge graph, into the parameter-fine-tuned risk model corresponding to each updated data of the modified component to output a risk score for each updated data of the modified component.
[0010] According to an embodiment of this application, determining the risk level of each changed component update data based on the risk score of each changed component update data includes: presetting a risk score range for each changed component update data according to a preset business strategy corresponding to each changed component update data, and determining the risk level of each changed component update data based on the risk score range of each changed component update data.
[0011] According to an embodiment of this application, the method further includes: presetting an execution strategy corresponding to the risk level based on the risk level of the data updated by each changed component.
[0012] According to a second aspect of this application, a data risk level determination apparatus is provided. The apparatus includes: a first acquisition module, configured to acquire original component update data and n modified component update data, wherein the n modified component update data are generated by modifying the original component update data with code based on each of the n preset business strategies, where n is an integer and greater than 1; a first generation module, configured to acquire historical fault data of the n modified components, and construct a knowledge graph based on the n preset business strategies and the historical fault data of the n modified components to generate a fault association knowledge graph of the n modified components; a second generation module, configured to perform differential analysis on the original component update data and each modified component update data to generate difference data between each modified component update data and the original component update data; a third generation module, configured to input the difference data between each modified component update data and the original component update data and the fault association knowledge graph into a pre-trained risk model, and output a risk score for each modified component update data; and a first determination module, configured to determine the risk level of each modified component update data based on the risk score of each modified component update data.
[0013] According to a third aspect of this application, an electronic device is provided, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the method described above.
[0014] A fourth aspect of this application also provides a computer-readable storage medium having a computer program or instructions stored thereon, which, when executed by a processor, implement the steps of the above-described method.
[0015] The fifth aspect of this application also provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described method.
[0016] This application employs a technical approach that constructs a fault association knowledge graph based on preset business strategies and generates differential data as input to a risk model. It then performs risk assessments on the updated data of each changed component to determine its risk level. This approach comprehensively analyzes and correlates preset business strategies, historical fault data, and differential data, automating and intelligently determining the risk level of each changed component's updated data. It achieves precise detection of risk blind spots in the updated data of each changed component, significantly improving the reliability and accuracy of risk level determination, thus preventing problems and losses during subsequent production deployment. This application also addresses the technical problem of traditional technologies that rely on rule matching to determine the risk level of changed component updated data. Traditional methods using rule matching suffer from isolation, difficulty in discovering hidden, cascading risks, and risk assessment blind spots, resulting in poor accuracy and reliability in risk level assessments, impacting subsequent production deployment, and potentially causing losses. Attached Figure Description
[0017] The above-mentioned contents, other objects, features and advantages of this application will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0018] Figure 1 The illustration shows an application scenario of the data risk level determination method, apparatus, device, medium, and program product according to embodiments of this application;
[0019] Figure 2 A flowchart illustrating a data risk level determination method according to an embodiment of this application is shown schematically.
[0020] Figure 3 This illustration schematically shows a flowchart of constructing a fault association knowledge graph in a data risk level determination method according to an embodiment of this application;
[0021] Figure 4This illustration schematically shows a flowchart of the data risk level determination method according to an embodiment of the present application, in which the difference data between the updated data of each changed component and the original component update data is generated;
[0022] Figure 5 This illustration schematically shows a flowchart of the data risk level determination method according to an embodiment of the present application, in which the difference data between the updated data of each changed component and the original component update data is generated by comparing the syntax tree;
[0023] Figure 6 This illustration schematically shows a flowchart of the risk model parameter fine-tuning process in the data risk level determination method according to an embodiment of this application;
[0024] Figure 7 This schematic diagram illustrates the structural block diagram of a data risk level determination device according to an embodiment of this application;
[0025] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a data risk level determination method according to an embodiment of this application. Detailed Implementation
[0026] The embodiments of this application will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of this application. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of this application for ease of explanation. However, it will be apparent that one or more embodiments may be implemented without these specific details. Furthermore, descriptions of well-known structures and technologies are omitted in the following description to avoid unnecessarily obscuring the concepts of this application.
[0027] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0028] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0029] When using expressions such as "at least one of A, B and C", they should generally be interpreted in accordance with the meaning that is commonly understood by those skilled in the art (e.g., "a system having at least one of A, B and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B and C, etc.).
[0030] The accompanying drawings show some block diagrams and / or flowcharts. It should be understood that some blocks or combinations thereof in the block diagrams and / or flowcharts 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, or other programmable control device, so that when executed by the processor, these instructions can create means for implementing the functions / operations described in these block diagrams and / or flowcharts.
[0031] First, the technical terms used in this article are explained as follows:
[0032] Edit distance is an algorithm that measures the similarity between two strings. Specifically, it records the minimum number of single-character edits required to transform one string into another.
[0033] This application provides a method for determining data risk levels. The method includes: acquiring original component update data and n modified component update data, wherein the n modified component update data are generated by modifying the original component update data with code based on each of the n preset business strategies, where n is an integer and greater than 1; acquiring historical fault data of the n modified components; constructing a knowledge graph based on the n preset business strategies and the historical fault data of the n modified components to generate a fault association knowledge graph of the n modified components; performing a differential analysis on the original component update data and each modified component update data to generate difference data between each modified component update data and the original component update data; inputting the difference data between each modified component update data and the original component update data and the fault association knowledge graph into a pre-trained risk model to output a risk score for each modified component update data; and determining the risk level of each modified component update data based on its risk score.
[0034] According to the embodiments of this application, a technical means is used to construct a fault association knowledge graph based on a preset business strategy and generate differential data as input to a risk model. This allows for a comprehensive and detailed analysis and correlation of preset business strategies, historical fault data, and differential data, automating and intelligently determining the risk level of each changed component's update data. This achieves precise detection of risk blind spots in each changed component's update data, significantly improving the reliability and accuracy of risk level determination, and preventing problems and losses during subsequent production deployment. It also solves the technical problem of traditional technologies that rely on rule matching to determine the risk level of changed component update data. Traditional methods, due to the isolation of rule matching in risk assessment and the difficulty in discovering hidden, cascading risks, create risk assessment blind spots, resulting in poor accuracy and reliability in risk level assessment, impacting subsequent production deployment and easily causing losses.
[0035] Figure 1 The illustration schematically depicts an application scenario of the data risk level determination method, apparatus, device, medium, and program product according to embodiments of this application. It should be noted that... Figure 1 The examples shown are merely examples of scenarios in which the embodiments of this application can be applied, to help those skilled in the art understand the technical content of this application, but do not mean that the embodiments of this application cannot be used in other devices, systems, environments or scenarios.
[0036] like Figure 1 As shown, application scenario 100 according to this embodiment may include application scenarios where data risk levels are determined. Network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.
[0037] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).
[0038] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, laptops, and desktop computers.
[0039] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (this is just an example). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.
[0040] It should be noted that the data risk level determination method provided in this application embodiment can generally be executed by server 105. Correspondingly, the data risk level determination device provided in this application embodiment can generally be located in server 105. The data risk level determination method provided in this application embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105. Correspondingly, the data risk level determination device provided in this application embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0042] The following will be based on Figure 1 The described scene, through Figures 2-6 The data risk level determination method of the disclosed embodiments is described in detail. It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this application, and the implementation methods of this application are not limited in any way. On the contrary, the implementation methods of this application can be applied to any applicable scenario.
[0043] Figure 2 A flowchart illustrating a data risk level determination method according to an embodiment of this application is shown.
[0044] like Figure 2 As shown, the method 200 includes steps S201 to S205.
[0045] Step S201: Obtain the original component update data and n modified component update data, wherein the n modified component update data are generated by modifying the code of the original component update data based on each of the n preset business strategies, and n is an integer and n is greater than 1.
[0046] For example, preset business strategies may include: preset regional strategies, business strategies, and guiding strategies.
[0047] Step S202: Obtain historical fault data of n changed components, construct a knowledge graph based on the n preset business strategies and the historical fault data of the n changed components, and generate a fault association knowledge graph of the n changed components.
[0048] For example, historical fault data for n changed components can include the cumulative number of historical faults, the frequency of historical fault occurrence, the specific cause of the fault, and patch information for fixing historical faults.
[0049] Figure 3 The flowchart illustrating the process of constructing a fault association knowledge graph in the data risk level determination method according to an embodiment of this application is shown.
[0050] like Figure 3 As shown, the method 300 includes steps S301 to S302.
[0051] Step S301: Analyze the n preset business strategies and generate the association relationship between the n preset business strategies.
[0052] For example, it is possible to analyze the regional strategies in n preset business strategies and generate the relationship between the n regional strategies.
[0053] Step S302: Using the n change components as nodes, the association relationships of the n preset business strategies as edges, and the historical fault data of the n change components as node attributes, construct a fault association knowledge graph of the n change components.
[0054] By constructing a fault association knowledge graph of n changed components, the fault data of n changed components, n preset business strategies, and n changed components can be deeply integrated in multiple dimensions. This improves the comprehensiveness of risk detection data, detects indirectly transmitted risks, and greatly enhances the quality and reliability of risk detection.
[0055] Return to reference Figure 2 In step S203, a differential analysis is performed on the original component update data and the update data of each changed component to generate difference data between the update data of each changed component and the original component update data.
[0056] Figure 4 The flowchart illustrating the generation of difference data between the updated data of each changed component and the original updated data of the component in the data risk level determination method according to an embodiment of this application is shown.
[0057] like Figure 4As shown, the method 400 includes steps S401 to S304.
[0058] Step S401: Obtain the source code of the original component update data as the first source code.
[0059] Step S402: Obtain the source code of the update data of n modified components, and use it as n second source codes.
[0060] Step S403: Perform lexical analysis and syntax analysis on the first source code and n second source codes to generate a first structure syntax tree for the first source code and a second structure syntax tree for the n second source codes.
[0061] Step S404: Perform differential analysis on the first structural syntax tree and n second structural syntax trees to generate difference data between the updated data of each changed component and the original component update data.
[0062] Figure 5 The illustration shows a flowchart of the data risk level determination method according to an embodiment of this application, in which the difference data between the updated data of each changed component and the original component update data is generated by comparing the syntax tree.
[0063] like Figure 5 As shown, the method 500 includes steps S501 to S504.
[0064] Step S501: Perform node matching on the first structure syntax tree and each second structure syntax tree using a hash algorithm to generate multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree.
[0065] Step S502: Calculate the similarity between each second structure syntax tree and multiple pairs of matching nodes of the first structure syntax tree using the edit distance algorithm.
[0066] Step S503: Obtain nodes with similarity below a preset threshold among the multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree, and generate the difference nodes among the multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree.
[0067] Step S504: Obtain the data in the difference nodes among the multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree, and generate the difference data between the update data of each changed component and the update data of the original component.
[0068] By using a hash algorithm to determine matching nodes, and then calculating the edit distance of the matching nodes, the similarity of the matching nodes can be accurately calculated. Then, by using a similarity threshold to determine the difference data, the reliability of the generated difference data can be further improved through accurate calculation.
[0069] By generating a syntax tree for comparison and producing difference data, interference caused by irrelevant logical modifications such as code formatting and variable renaming can be avoided, accurately capturing real logical changes and improving the accuracy and precision of the generated difference data.
[0070] Return to reference Figure 2 In step S204, the difference data between the updated data of each changed component and the original component update data, and the fault association knowledge graph are input into the pre-trained risk model, and the risk score of the updated data of each changed component is output.
[0071] Figure 6 The flowchart illustrating the process of fine-tuning risk model parameters in the data risk level determination method according to an embodiment of this application is shown in the illustration.
[0072] like Figure 6 As shown, the method 600 includes steps S601 to S603.
[0073] Step S601: Obtain the preset business strategy corresponding to the update data of each changed component in the n preset business strategies.
[0074] Step S602: Based on the preset business strategy corresponding to the update data of each changed component, fine-tune the parameters of the pre-trained risk model to generate a risk model with fine-tuned parameters corresponding to the update data of each changed component.
[0075] Step S603: Input the difference data between the updated data of each changed component and the original component update data and the fault association knowledge graph into the risk model with parameters fine-tuned corresponding to the updated data of each changed component, and output the risk score of the updated data of each changed component.
[0076] By fine-tuning the parameters of the model that updates the data input for each changed component corresponding to the preset business strategy, the stability and reliability of the risk model in predicting risks based on the updated data of the corresponding changed components can be improved, and the accuracy of the risk score output by the model can be greatly enhanced.
[0077] In addition to outputting a risk score for each changed component's updated data, the risk model also generates a risk report for each changed component's updated data. The risk report may include: the risk type of the changed component and suspected risk classes or risk functions, etc.
[0078] Return to reference Figure 2 In step S205, the risk level of the update data of each changed component is determined based on the risk score of the update data of each changed component.
[0079] For example, a risk score range for each changed component's update data can be preset according to a preset business strategy corresponding to that data. The risk level of each changed component's update data can then be determined based on this risk score range. Specifically, a risk score range greater than or equal to 0 and less than 0.3 can be defined as a low-risk level, a risk score range greater than or equal to 0.3 and less than 0.6 as a medium-risk level, and a risk score range greater than 0.6 and less than or equal to 1 as a high-risk level.
[0080] By updating the data of each changed component and determining the corresponding preset business strategy classification risk score range, the reliability of risk level determination and the fit of business strategy can be improved.
[0081] The system can also preset execution strategies corresponding to the risk levels of the updated data for each changed component. If the risk level is determined to be low, the risk report is saved and the process proceeds directly to the next step. If the risk level is determined to be medium, the data is sent to staff for review; only after review and confirmation can the process proceed to the next step. If the risk level is determined to be high, the updated data is isolated and saved for manual processing.
[0082] By developing and implementing corresponding strategies based on the risk level of each changed component's updated data, we can monitor and optimize the updated data of changed components, thereby improving the user experience.
[0083] In addition, to visually demonstrate the risk levels of the updated data of n modified components, a risk heatmap can be generated by the risk levels of the updated data of n modified components and the corresponding execution strategies, and then saved and sent.
[0084] According to embodiments of this application, by extracting predictions and mitigating high-risk data changes, online incidents and failures caused by deploying and updating data are directly reduced, improving system stability and reliability, and ensuring business continuity.
[0085] Figure 7 A schematic block diagram of a data risk level determination device according to an embodiment of this application is shown.
[0086] like Figure 7 As shown, the device 700 includes: a first acquisition module 701, a first generation module 702, a second generation module 703, a third generation module 704, and a first determination module 705.
[0087] The first acquisition module 701 is used to acquire original component update data and n modified component update data, wherein the n modified component update data are generated by modifying the code of the original component update data based on each of the n preset business strategies, where n is an integer and n is greater than 1. In one embodiment, the first acquisition module 701 can be used to execute step S201 described above, which will not be repeated here.
[0088] The first generation module 702 is used to acquire historical fault data of n changed components, construct a knowledge graph based on the n preset business strategies and the historical fault data of the n changed components, and generate a fault association knowledge graph of the n changed components. In one embodiment, the first generation module 702 can be used to execute step S202 described above.
[0089] The first generation module 702 includes: a fourth generation module and a fifth generation module.
[0090] The fourth generation module is used to analyze the n preset business strategies and generate the association relationship between the n preset business strategies. In one embodiment, the fourth generation module can be used to execute step S301 described above, which will not be repeated here.
[0091] The fifth generation module is used to construct a fault association knowledge graph of the n changed components, using the n changed components as nodes, the association relationships of the n preset business strategies as edges, and the historical fault data of the n changed components as node attributes. In one embodiment, the fifth generation module can be used to execute step S302 described above, which will not be repeated here.
[0092] The second generation module 703 is used to perform differential analysis on the original component update data and the update data of each changed component, and generate difference data between the update data of each changed component and the original component update data. In one embodiment, the second generation module 703 can be used to perform step S203 described above.
[0093] The second generation module 703 includes a second acquisition module, a third acquisition module, a sixth generation module, and a seventh generation module.
[0094] The second acquisition module is used to acquire the source code of the original component update data, as the first source code. In one embodiment, the second acquisition module can be used to execute step S401 described above, which will not be repeated here.
[0095] The third acquisition module is used to acquire the source code of the update data of n modified components, as n second source codes. In one embodiment, the third acquisition module can be used to execute step S402 described above, which will not be repeated here.
[0096] The sixth generation module is used to perform lexical analysis and syntax analysis on the first source code and n second source codes to generate a first structure syntax tree for the first source code and a second structure syntax tree for the n second source codes. In one embodiment, the sixth generation module can be used to execute step S403 described above, which will not be repeated here.
[0097] The seventh generation module is used to perform differential analysis on the first structural syntax tree and n second structural syntax trees to generate difference data between the updated data of each changed component and the original component update data. In one embodiment, the seventh generation module can be used to perform step S404 described above.
[0098] The seventh generation module includes: the first calculation module, the second calculation module, the fourth acquisition module, and the fifth acquisition module.
[0099] The first calculation module is used to perform node matching on the first structured syntax tree and each second structured syntax tree using a hash algorithm, generating multiple pairs of matching nodes between each second structured syntax tree and the first structured syntax tree. In one embodiment, the first calculation module can be used to execute step S501 described above, which will not be repeated here.
[0100] The second calculation module is used to calculate the similarity between each second structure syntax tree and multiple pairs of matching nodes of the first structure syntax tree using an edit distance algorithm. In one embodiment, the second calculation module can be used to perform step S502 described above, which will not be repeated here.
[0101] The fourth acquisition module is used to acquire nodes whose similarity to multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree is lower than a preset threshold, and to generate the difference nodes among the multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree. In one embodiment, the fourth acquisition module can be used to execute step S503 described above, which will not be repeated here.
[0102] The fifth acquisition module is used to acquire data from the difference nodes in multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree, and generate difference data between the updated data of each changed component and the updated data of the original component. In one embodiment, the fifth acquisition module can be used to execute step S504 described above, which will not be repeated here.
[0103] The third generation module 704 is used to input the difference data between the updated data of each changed component and the original component update data, and the fault association knowledge graph into a pre-trained risk model, and output a risk score for the updated data of each changed component. In one embodiment, the third generation module 704 can be used to perform step S204 described above.
[0104] The third generation module 704 includes: the sixth acquisition module, the eighth generation module, and the ninth generation module.
[0105] The sixth acquisition module is used to acquire the preset business strategy corresponding to the update data of each changed component among the n preset business strategies. In one embodiment, the sixth acquisition module can be used to execute step S601 described above, which will not be repeated here.
[0106] The eighth generation module is used to fine-tune the parameters of the pre-trained risk model based on the preset business strategy corresponding to the update data of each changed component, and generate a risk model with fine-tuned parameters corresponding to the update data of each changed component. In one embodiment, the eighth generation module can be used to execute step S602 described above, which will not be repeated here.
[0107] The ninth generation module is used to input the difference data between the updated data of each changed component and the original component update data, and the fault association knowledge graph into the risk model with parameters fine-tuned corresponding to the updated data of each changed component, and output the risk score of the updated data of each changed component. In one embodiment, the ninth generation module can be used to perform step S603 described above, which will not be repeated here.
[0108] The first determining module 705 is used to determine the risk level of the update data of each changed component based on the risk score of the update data of each changed component. In one embodiment, the first determining module 705 can be used to perform step S205 described above.
[0109] The first determining module 705 includes: a first preset module, used to preset a risk score range for each change component update data according to a preset business strategy corresponding to each change component update data, and to determine the risk level of each change component update data according to the risk score range of each change component update data.
[0110] The device also includes a second preset module, used to preset an execution strategy corresponding to the risk level based on the risk level of the updated data of each changed component.
[0111] According to embodiments of this application, any multiple modules of the first acquisition module 701, first generation module 702, second generation module 703, third generation module 704, and first determination module 705 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functions of one or more of these modules can be combined with at least some of the functions of other modules and implemented in one module. According to embodiments of this application, at least one of the first acquisition module 701, first generation module 702, second generation module 703, third generation module 704, and first determination module 705 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the first acquisition module 701, the first generation module 702, the second generation module 703, the third generation module 704, and the first determination module 705 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0112] Figure 8 A block diagram schematically illustrates an electronic device suitable for implementing a data risk level determination method according to an embodiment of this application.
[0113] like Figure 8 As shown, an electronic device 800 according to an embodiment of this application includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage portion 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of this application.
[0114] RAM 803 stores various programs and data required for the operation of electronic device 800. Processor 801, ROM 802, and RAM 803 are interconnected via bus 804. Processor 801 executes various operations of the method flow according to embodiments of this application by executing programs in ROM 802 and / or RAM 803. It should be noted that the programs may also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 may also execute various operations of the method flow according to embodiments of this application by executing programs stored in said one or more memories.
[0115] According to embodiments of this application, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to a bus 804. The electronic device 800 may also include one or more of the following components connected to the input / output (I / O) interface 805: an input section 806 including a keyboard, mouse, etc.; an output section 807 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the input / output (I / O) interface 805 as needed. A removable medium 811, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 810 as needed so that computer programs read from it can be installed into the storage section 808 as needed.
[0116] This application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of this application.
[0117] According to embodiments of this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this application, the computer-readable storage medium may include ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803 described above.
[0118] Embodiments of this application also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the data risk level determination method provided in the embodiments of this application.
[0119] When the computer program is executed by the processor 801, it performs the functions defined in the system / apparatus of this application embodiment. According to the embodiments of this application, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0120] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 809, and / or installed from a removable medium 811. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.
[0121] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, it performs the functions defined in the system of this application embodiment. According to the embodiments of this application, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.
[0122] According to embodiments of this application, program code for executing the computer programs provided in the embodiments of this application can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, Python, "C", or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0124] Those skilled in the art will understand that the features described in the various embodiments of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application.
Claims
1. A method for determining data risk level, characterized in that, The method includes: Obtain original component update data and n modified component update data, wherein the n modified component update data are generated by modifying the code of the original component update data based on each of the n preset business strategies, where n is an integer and n is greater than 1; Obtain historical fault data for n changed components, construct a knowledge graph based on the n preset business strategies and the historical fault data of the n changed components, and generate a fault association knowledge graph for the n changed components; Perform a differential analysis on the original component update data and the update data of each changed component to generate difference data between the update data of each changed component and the original component update data; The difference between the updated data of each modified component and the original component update data, along with the fault association knowledge graph, are input into a pre-trained risk model, which outputs a risk score for each modified component update data. The risk level of the update data for each changed component is determined based on the risk score of the update data for each changed component.
2. The method according to claim 1, characterized in that, Based on the n preset business strategies and the historical fault data of the n changed components, a knowledge graph is constructed to generate a fault association knowledge graph of the n changed components, including: Analyze the n preset business strategies to generate the relationships between them; and Using the n change components as nodes, the association relationships of the n preset business strategies as edges, and the historical fault data of the n change components as node attributes, a fault association knowledge graph of the n change components is constructed.
3. The method according to claim 1, characterized in that, A differential analysis is performed on the original component update data and the update data of each changed component to generate difference data between the update data of each changed component and the original component update data, including: Obtain the source code of the original component update data, and use it as the first source code; Obtain the source code of n modified components' update data, and use them as n second source codes; Lexical and syntactic analysis are performed on the first source code and n second source codes to generate a first structure syntax tree for the first source code and a second structure syntax tree for the n second source codes; and Perform differential analysis on the first structural syntax tree and n second structural syntax trees to generate difference data between the updated data of each changed component and the original component update data.
4. The method according to claim 3, characterized in that, Perform differential analysis on the first structural syntax tree and n second structural syntax trees to generate difference data between the updated data of each changed component and the original component update data, including: The first structure syntax tree and each second structure syntax tree are matched using a hash algorithm to generate multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree. The similarity between each second structure syntax tree and multiple pairs of matching nodes of the first structure syntax tree is calculated using the edit distance algorithm; Obtain nodes with similarity below a preset threshold from the multiple pairs of matching nodes between each second-structured syntax tree and the first-structured syntax tree; and generate the difference nodes from the multiple pairs of matching nodes between each second-structured syntax tree and the first-structured syntax tree; and Data from the difference nodes in multiple pairs of matching nodes between each second structure syntax tree and the first structure syntax tree are obtained to generate difference data between the update data of each changed component and the update data of the original component.
5. The method according to claim 1, characterized in that, The difference between the updated data of each modified component and the original component update data, along with the fault association knowledge graph, are input into a pre-trained risk model to output a risk score for each modified component update data, including: Obtain the preset business strategy corresponding to the update data of each changed component in the n preset business strategies; Based on the preset business strategy corresponding to the update data of each changed component, the parameters of the pre-trained risk model are fine-tuned to generate a fine-tuned risk model corresponding to the update data of each changed component; and The difference between the updated data of each changed component and the original component update data, along with the fault association knowledge graph, are input into the risk model with parameters fine-tuned according to the updated data of each changed component, and the risk score of each updated data of the changed component is output.
6. The method according to any one of claims 1 to 5, characterized in that, The risk level of the update data for each changed component is determined based on the risk score of the update data for each changed component, including: Based on the preset business strategy corresponding to the update data of each changed component, a risk score range for the update data of each changed component is preset, and the risk level of the update data of each changed component is determined based on the risk score range of the update data of each changed component.
7. The method according to claim 6, characterized in that, The method also includes: The execution strategy corresponding to the risk level of the data update for each changed component is preset.
8. A data risk level determination device, characterized in that, The device includes: The first acquisition module is used to acquire original component update data and n modified component update data, wherein the n modified component update data are generated by modifying the code of the original component update data based on each of the n preset business strategies, and n is an integer and n is greater than 1; The first generation module is used to obtain historical fault data of n changed components, construct a knowledge graph based on the n preset business strategies and the historical fault data of the n changed components, and generate a fault association knowledge graph of the n changed components. The second generation module is used to perform differential analysis on the original component update data and the update data of each changed component, and generate difference data between the update data of each changed component and the original component update data. The third generation module is used to input the difference data between the updated data of each changed component and the original component update data, and the fault association knowledge graph into a pre-trained risk model, and output a risk score for the updated data of each changed component; and The first determining module is used to determine the risk level of the update data of each changed component based on the risk score of the update data of each changed component.
9. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the method according to any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.