Online risk checking method and device
By determining the scope of change impact and risk indicators of the change code, risk inspection is carried out based on the risk specification prompt library, the problem of insufficient applicability and universality of online change content inspection in the existing technology is solved, and the personality of online change content is realized The risk inspection has improved the accuracy and stability of online inspections.
Patent Information
- Application Number
- CN202410937229.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-29
AI Technical Summary
The existing technology lacks the ability to personalize the inspection of the content of the online change when the software is launched, resulting in insufficient applicability and universality of the online risk inspection.
By determining the change impact scope of the change code of the application to be launched, and determining the risk indicator items corresponding to the change code based on the predetermined risk specification prompt library, the change code is subject to risk inspection based on the change impact scope and risk indicator items, and improving the risk inspection of the change code Applicability and versatility of online inspections.
It realizes personalized risk inspection of online changes, improves the accuracy and stability of online inspection, and ensures the stability and efficiency of application delivery process.
Smart Images

Figure CN119046130A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an online risk checking method and device. Background Art
[0002] In the field of software development, software launch is a critical moment, marking the transfer of software or new functions from the development environment to the production environment and their official availability to users. In the existing technology, there are some platforms that can realize automated launch inspection, which can precipitate the universal launch best practice steps into standardized nodes, connect the nodes in series to form a complete inspection process, improve the automation level of launch inspection, and greatly improve R&D efficiency.
[0003] However, this method has poor compatibility with the personalized online changes, lacks the ability to understand the code, and is unable to perform personalized checks on the online content. It lacks both versatility and applicability. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure at least provide a method, device, electronic device and storage medium for checking online risks, which can improve the versatility and adaptability of the application online process and ensure a more stable and efficient application delivery process.
[0005] In a first aspect, an embodiment of the present disclosure provides an online risk checking method, comprising:
[0006] Determine the scope of the change in the code of the application to be launched;
[0007] Determine the risk indicator item corresponding to the change code according to a predetermined risk standard prompt library; the risk standard prompt library is determined based on historical online fault reports;
[0008] Based on the change impact scope and risk indicator items, a risk check is performed on the change code.
[0009] Optionally, based on historical online failure reports, determine a risk specification prompt library, including:
[0010] Obtain historical online failure reports and identify multiple risk indicator items;
[0011] A risk specification prompt library is created according to the risk indicator items; wherein the risk specification prompt library includes risk specification prompt statements corresponding to each risk indicator item; each risk specification prompt statement includes keywords and risk code examples associated with the corresponding risk indicator item.
[0012] Optionally, the method further comprises:
[0013] Based on the risk specification prompt library, extract risk indicator items corresponding to multiple test reports and their corresponding risk indicator information;
[0014] The extracted risk indicator items and risk indicator information are compared with the real risk indicator items and real risk indicator information corresponding to the plurality of test reports. If they are inconsistent, the risk specification prompt library is adjusted.
[0015] Optionally, determine the change impact scope corresponding to the change code, including:
[0016] Based on the change code, determining a top-level encapsulation unit corresponding to the change code;
[0017] Based on the full code, determining the calling relationship between each of the top-level encapsulation units;
[0018] The change impact scope is determined according to the top-level encapsulation unit corresponding to the changed code and the calling relationship.
[0019] Optionally, based on the change impact scope and the risk indicator items, before performing a risk check on the change code, the method further includes:
[0020] Determining a changed business function associated with the change code according to the change code and the change impact scope;
[0021] Determine whether the original online test set meets the coverage requirements of the changed business functions and the risk indicator items shown;
[0022] If not, the original online test set is supplemented to obtain a target online test set for risk checking of the changed code.
[0023] Optionally, after determining the risk standard prompt library, it also includes:
[0024] The code language of the change code is adjusted according to the risk specification prompt library.
[0025] Optionally, after performing risk check on the changed code, the method further includes:
[0026] Generate a risk check report; the risk check report indicates the risk check results
[0027] In a second aspect, an embodiment of the present disclosure provides an online risk checking device, including:
[0028] A scope determination module is used to determine the scope of impact of the change code of the application to be launched;
[0029] A risk determination module, used to determine the risk indicator item corresponding to the change code according to a predetermined risk standard prompt library; the risk standard prompt library is determined based on historical online fault reports;
[0030] The checking module is used to perform a risk check on the changed code based on the change impact scope and risk indicator items.
[0031] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps in the above-mentioned first aspect, or any optional implementation of the first aspect are performed.
[0032] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any optional implementation of the first aspect are executed.
[0033] Any one of the above aspects or any implementation method of any one of the aspects, by determining the change impact scope of the change code of the application to be launched; determining the risk indicator items corresponding to the change code according to a predetermined risk specification prompt library; the risk specification prompt library is determined based on historical online fault reports; based on the change impact scope and risk indicator items, the change code is risk checked. In this way, the technical middleware changes designed for each online change and the risk indicator items of each changed technical middleware can be determined, and the change impact scope of the online change code can be determined, and then the change code can be checked using the risk indicator items and the change impact scope, which can improve the applicability and versatility of the online inspection process.
[0034] In a further embodiment of the present disclosure, multiple risk indicator items are determined by obtaining historical online fault reports; a risk specification prompt library is created based on the risk indicator items; wherein the risk specification prompt library includes risk specification prompt statements corresponding to each of the risk indicator items; each of the risk specification prompt statements includes keywords and risk code examples associated with the corresponding risk indicator items. In this way, the risk specification prompt library can be used to specifically extract the risk indicator items existing in the change code, and combined with the corresponding keywords and risk code examples, it is convenient for relevant personnel to determine the risk considerations in the corresponding scenarios, avoiding the problem of binary state of standardized nodes in the prior art, and realizing risk inspection for fuzzy scenarios.
[0035] In a further embodiment of the present disclosure, the changed business function associated with the changed code is determined according to the changed code and the change impact scope; it is determined whether the original online test set meets the coverage requirements of the changed business function and the risk indicator items shown; if not, the original online test set is supplemented to obtain a target online test set for risk inspection of the changed code. In this way, the comprehensiveness of the test set used for online inspection can be ensured, thereby improving the accuracy of online risk inspection.
[0036] The effects of the above-mentioned online risk checking device, electronic device and storage medium refer to the description of the above-mentioned online risk checking method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0038] Figure 1 A flow chart of an online risk checking method provided by an embodiment of the present disclosure is shown;
[0039] Figure 2 A schematic diagram of a process for determining a change impact scope in an online risk inspection method provided by an embodiment of the present disclosure is shown;
[0040] Figure 3 A schematic diagram of a process for determining a risk specification prompt library in an online risk checking method provided by an embodiment of the present disclosure is shown;
[0041] Figure 4 A schematic diagram of a process of performing risk check on a changed code in an online risk check method provided by an embodiment of the present disclosure is shown;
[0042] Figure 5 A schematic diagram of a process for detecting the coverage of an online test set in an online risk inspection method provided by an embodiment of the present disclosure is shown;
[0043] Figure 6 A schematic diagram of an online risk checking device provided by an embodiment of the present disclosure is shown;
[0044] Figure 7 An exemplary system architecture is shown in which embodiments of the present disclosure may be applied;
[0045] Figure 8 A schematic diagram of the structure of a computer system of a terminal device or a server used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0047] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0048] Research has found that with the continuous evolution of software development, the changes brought about by each launch may involve multiple aspects such as functions, performance, and security, and these changes have an impact on many aspects such as user experience, system stability, and data security. Therefore, it is very important to conduct risk checks on the changes made online.
[0049] However, existing technologies usually rely on standardized node processes when conducting online inspections, lack the ability to individually understand the online content, and are unable to conduct targeted inspections on specific changes. This reduces the applicability and versatility of online risk inspections.
[0050] Based on the above research, the disclosed embodiment provides a method for checking online risks, which determines the change impact scope of the change code of the application to be launched; determines the risk indicator items corresponding to the change code according to a predetermined risk specification prompt library; the risk specification prompt library is determined based on historical online fault reports; and performs a risk check on the change code based on the change impact scope and risk indicator items. In this way, the technical middleware changes designed for each online change and the risk indicator items of each changed technical middleware can be determined, and the change impact scope of the online change code can be determined, and then the change code can be checked using the risk indicator items and the change impact scope, which can improve the applicability and versatility of the online inspection process.
[0051] In addition, by obtaining historical online fault reports, multiple risk indicators are determined; a risk specification prompt library is created based on the risk indicator items; wherein the risk specification prompt library includes risk specification prompt statements corresponding to each risk indicator item; each risk specification prompt statement includes keywords and risk code examples associated with the corresponding risk indicator item. In this way, the risk specification prompt library can be used to extract the risk indicator items existing in the change code in a targeted manner, and combined with the corresponding keywords and risk code examples, it is convenient for relevant personnel to determine the risks in the corresponding scenarios, avoiding the problem of binary state of standardized nodes in the prior art, and realizing risk inspection for fuzzy scenarios.
[0052] In addition, the changed business function associated with the changed code is determined according to the changed code and the change impact scope; it is judged whether the original online test set meets the coverage requirements of the changed business function and the risk indicator items shown; if not, the original online test set is supplemented to obtain the target online test set for risk inspection of the changed code. In this way, the comprehensiveness of the test set used for online inspection can be ensured, thereby improving the accuracy of online risk inspection.
[0053] The raising of the above problems and the solutions are the results obtained by the inventor after practice and careful research. The discovery process of the above problems and the solutions proposed for the above problems should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0054] The technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0055] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0056] To facilitate understanding of this embodiment, a method for checking online risks disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the method for checking online risks provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the method for checking online risks may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0057] See also Figure 1 FIG. 1 is a flowchart of a method for checking online risk provided by an embodiment of the present disclosure, the method comprising S101 to S103, wherein:
[0058] S101: Determine the impact scope of the change code of the application to be launched.
[0059] In the disclosed embodiment, when performing an online check on the changed code of the application to be launched, the impact scope of the changed code can be determined first, which helps to locate the upper-level unit associated with the changed code and facilitates determining whether the business function corresponding to the changed code is normal.
[0060] In a feasible implementation, determining the change impact scope corresponding to the changed code includes: based on the changed code, determining the top-level encapsulation unit corresponding to the changed code; based on the full code, determining the calling relationship between each of the top-level encapsulation units; and determining the change impact scope according to the top-level encapsulation unit corresponding to the changed code and the calling relationship.
[0061] Specifically, Figure 2 A flowchart of determining the impact scope of a code change in a method for checking online risks provided for implementation of the present disclosure. Figure 2 As shown, we can start from the perspective of online changes, parse the changed code, and retrieve all the top-level encapsulation units of this change through dimensional retrieval of code segments (from code segments to methods and then to encapsulation units). It should be noted that the top-level encapsulation units here are based on the definitions of different code languages. Then we can start from the perspective of engineering applications, parse the full amount of code for each business entry service, and generate the service call relationship. The granularity of the call relationship here can be set based on the top-level encapsulation unit, which is consistent with the online change retrieval results, and helps to get the scope of code change impact more accurately and efficiently. It should be noted that the business entry service here can refer to the outermost service definition of the application.
[0062] like Figure 2 As shown, by determining the top-level encapsulation unit corresponding to the changed code and the calling relationship between each top-level encapsulation unit, the change impact scope corresponding to the changed code can be determined.
[0063] In another possible implementation, the changed code can also be tested by unit testing and integration testing to test whether the changed code can still run normally locally and after being put online in the project. And during the test process, the scope of impact of the change corresponding to the changed code is determined. It should be noted that the method for determining the scope of impact of the changed code is not specifically limited in the embodiment of the present disclosure, and it shall be based on the ability to achieve its purpose.
[0064] In the disclosed embodiment, the risk level of the business function corresponding to each top-level encapsulation unit can also be determined in advance. For example, the risk level related to functions such as transactions and user authentication can be set to high risk, while the risk level for problems such as UI (User Interface) display abnormalities can be set to low risk. By predetermining the risk level corresponding to the business function corresponding to each top-level encapsulation unit, after determining the impact scope of the changed code, the risk level corresponding to the change point involved in the changed impact scope can be further determined. This helps relevant personnel pay attention to high-risk change points, and then ensure the stability of the application to be launched. It should be noted that the above steps can be completed through a pre-trained large model. Through the training of the large model, it can be equipped with the ability to analyze the change code and determine the impact scope and risk level. The specific training steps of the large model will not be repeated here.
[0065] S102: Determine the risk indicator item corresponding to the change code according to a predetermined risk standard prompt library; the risk standard prompt library is determined based on historical online fault reports.
[0066] In this step, after determining the impact scope of the change code, the risk indicator items corresponding to the change code can be determined according to a predetermined risk specification prompt library.
[0067] In an embodiment of the present disclosure, a risk specification prompt library is determined based on historical online failure reports, including: obtaining historical online failure reports to determine multiple risk indicator items; creating a risk specification prompt library based on the risk indicator items; wherein the risk specification prompt library includes risk specification prompt statements corresponding to each of the risk indicator items; each of the risk specification prompt statements includes keywords and risk code examples associated with the corresponding risk indicator items.
[0068] In software engineering implementation, online failure reports are valuable learning resources. They record in detail the causes, impacts, handling procedures and preventive measures of the failures, which are crucial for preventing online failures. Therefore, the embodiments of the present disclosure can use historical online failure reports to determine a risk specification prompt library to determine the risk indicator items introduced by the current code change.
[0069] In the disclosed embodiment, Figure 3 A schematic diagram of a process for determining a risk specification prompt library in an online risk inspection method provided by an embodiment of the present disclosure. Figure 3 As shown, the big model can be used to first parse the historical online fault reports, extract the fault cases, impact scope, root causes and solutions contained in the fault reports, and then the extracted data can be standardized to facilitate subsequent processing.
[0070] For example, the instruction to extract data from fault reports using a big model and standardize them can be: "Define a standard template to ensure that each historical online fault report follows the same structure. For example: 1. Overview: a brief description of the fault; 2. Detailed timeline: the specific time points of fault occurrence, detection, response, and resolution; 3. Impact assessment: the impact of the fault on the business and users; 4. Root cause analysis: the detailed cause of the fault; 5. Resolution steps: the measures taken to resolve the fault; 6. Preventive measures: measures taken to prevent similar faults from occurring in the future; 7. Action items: specific follow-up action plans and responsibility allocation..."
[0071] In the disclosed embodiment, after extracting the data of historical online fault reports, a fine-grained risk system division can be established according to the cause and type of the fault, so that the large model can more effectively identify and classify risk indicators, such as functional risks, performance risks, security risks, user experience risks, etc. It should be noted that the fine-grained division of various risk indicators in the risk system here should be based on actual needs in practical applications. For example, performance risks can also include increased response time risks, reduced throughput risks, etc., and the disclosed embodiment does not specifically limit this.
[0072] In the embodiment of the present disclosure, after the risk classification system is established, multiple risk indicators corresponding to it can be determined based on the risk classification system. Then, for each risk indicator item, a corresponding risk specification prompt statement can be created, that is, each risk specification prompt statement is for a specific type of risk item, which can contain keywords and risk code examples for triggering the identification of the risk indicator item. Exemplarily, a risk specification prompt statement can be "The code Connection connection = new MySQLConnection() will introduce risks related to database access. Please help confirm whether the code launched this time will introduce such risks", where "database access" is the keyword of the risk specification prompt statement, and "Connection connection = new MySQLConnection()" is the corresponding risk code example. Then, based on the prompt statement and combined with the change code, it can be determined whether the change code will introduce the risk indicator item. It should be noted that since the risk code examples that can be referenced by each risk specification prompt statement are limited, multiple risk specification prompt statements can be designed for the same risk indicator item to ensure the comprehensiveness of identifying the risk indicator item. In addition, the weight between the identification keyword and the identification problem code example can be set to avoid the problem of inaccurate identification due to the coverage of the code example.
[0073] In the disclosed embodiment, after obtaining multiple risk code prompt statements, they can be summarized into a risk specification prompt library to check the new change code. In the specific implementation, after obtaining the risk specification prompt library, it can also be optimized and iterated. Specifically, the method also includes: based on the risk specification prompt library, extracting risk indicator items and their corresponding risk indicator information corresponding to multiple test reports; comparing the extracted risk indicator items and risk indicator information with the actual risk indicator items and actual risk indicator information corresponding to the multiple test reports, and if they are inconsistent, adjusting the risk specification prompt library.
[0074] In the specific implementation, based on the current risk specification prompt library, the risk indicator items and corresponding risk indicator information of the test report can be extracted, and then the extracted results can be compared with the risk indicator items and risk indicator information actually corresponding to the test report, so as to determine whether the risk specification prompt library needs to be adjusted and optimized. If inconsistencies are found, the standardized templates or the structure of the prompt statements themselves can be adjusted during the previous training to optimize. In addition, while using the risk specification prompt library, it can also be continuously supplemented or refined to make the final extracted risk indicator items and risk indicator information more accurate, thereby making the online inspection results more accurate.
[0075] In the disclosed embodiment, after determining the risk specification prompt library, it also includes: adjusting the code language of the change code according to the risk specification prompt library. Specifically, if you want to check whether there is a risk in the change code, you must know in advance which features represent possible risks, and the risk specification prompt library is the basis for judging whether there is a risk in the change code and what risks exist. The quality of the risk specification prompt library also represents the accuracy of risk identification. Therefore, in order to make the risk specification prompt library more effective, after determining the final risk specification prompt library, the change code can be adjusted based on the standard statements given by the risk specification prompt library to achieve better risk indicator item extraction effect. In the specific implementation, the code needs to meet the grammatical requirements of the code language when adjusting, and not all keywords can be directly reflected, so keywords can be introduced through the code language.
[0076] S103: Based on the change impact scope and risk indicator items, a risk check is performed on the change code.
[0077] In this step, after determining the change impact scope corresponding to the change code and determining the risk indicator items that may be introduced by the change code based on the risk specification prompt library, the change code can be checked for risks based on these two items.
[0078] like Figure 4As shown, before the changed code is deployed online, two steps, testing and checking, are required. In the disclosed embodiment, these two steps can be collectively referred to as risk checking.
[0079] In the disclosed embodiment, before the changed code is tested in the risk check, the coverage of the test set can be checked first. Specifically, based on the change impact scope and the risk indicator items, before the change code is risk checked, it also includes: determining the changed business function associated with the changed code according to the change code and the change impact scope; judging whether the original online test set meets the coverage requirements of the changed business function and the risk indicator items shown; if not, supplementing the original online test set to obtain the target online test set for risk checking the changed code.
[0080] In the specific implementation, Figure 5 As shown, before using the online test set to detect the changed code, the coverage of the online test set can be detected, which may include functional coverage analysis and risk coverage analysis. When performing functional coverage analysis, the business functions corresponding to the change can be determined based on the changed code and the scope of change impact, and then it can be determined whether the test set completely covers these business functions, that is, whether these changed business functions can be fully tested based on the test set. If not, the test set record is supplemented according to the missing functional coverage items until the test set can completely cover the changed business functions. Then, a risk coverage analysis can be performed. Specifically, the risk indicator items determined by the risk specification prompt library can be compared with the risk points covered by the test set. If the test cannot cover the risk indicator items that may be introduced by the changed code, the test set can be supplemented. It should be noted that there is no order of precedence between the above-mentioned verification function coverage and risk coverage, and the specific requirements for coverage can be set according to actual conditions, and the embodiments of the present disclosure do not make specific restrictions on this.
[0081] Furthermore, if Figure 5 As shown in the figure, when both the functional coverage and risk coverage meet the requirements, the test set can be used to perform a risk check on the changed code. After the check is completed, a corresponding risk analysis report can be generated to facilitate relevant personnel to analyze, adjust or review.
[0082] In the disclosed embodiment, the change code can also be risk checked based on the change impact scope, change risk level, and risk indicator items that may be introduced by the change. After the check is completed, the corresponding risk analysis results can also be generated to facilitate analysis, adjustment, or review by relevant personnel.
[0083] According to a second aspect of the embodiment of the present disclosure, Figure 6As shown, an online risk inspection device 600 is provided, comprising:
[0084] A scope determination module 601 is used to determine the change impact scope of the changed code of the application to be launched;
[0085] The risk determination module 602 is used to determine the risk indicator item corresponding to the change code according to a predetermined risk standard prompt library; the risk standard prompt library is determined based on historical online fault reports;
[0086] The checking module 603 is used to perform a risk check on the changed code based on the change impact scope and risk indicator items.
[0087] Optionally, the risk determination module 602 is specifically configured to:
[0088] Obtain historical online failure reports and identify multiple risk indicator items;
[0089] A risk specification prompt library is created according to the risk indicator items; wherein the risk specification prompt library includes risk specification prompt statements corresponding to each risk indicator item; each risk specification prompt statement includes keywords and risk code examples associated with the corresponding risk indicator item.
[0090] Optionally, the risk determination module 602 is further configured to:
[0091] Based on the risk specification prompt library, extract risk indicator items corresponding to multiple test reports and their corresponding risk indicator information;
[0092] The extracted risk indicator items and risk indicator information are compared with the actual risk indicator items and actual risk indicator information corresponding to the plurality of test reports. If they are inconsistent, the risk specification prompt library is adjusted.
[0093] Optionally, the range determination module 601 is specifically used for:
[0094] Based on the change code, determining a top-level encapsulation unit corresponding to the change code;
[0095] Based on the full code, determining the calling relationship between each of the top-level encapsulation units;
[0096] The change impact scope is determined according to the top-level encapsulation unit corresponding to the changed code and the calling relationship.
[0097] Optionally, the checking module 603 is specifically used for:
[0098] Determining a changed business function associated with the change code according to the change code and the change impact scope;
[0099] Determine whether the original online test set meets the coverage requirements of the changed business functions and the risk indicator items shown;
[0100] If not, the original online test set is supplemented to obtain a target online test set for risk checking of the changed code.
[0101] Optionally, the risk determination module 602 is further configured to:
[0102] The code language of the change code is adjusted according to the risk specification prompt library.
[0103] Optionally, the checking module 603 is further used for:
[0104] Generate a risk check report; the risk check report indicates the risk check results
[0105] According to the third aspect of an embodiment of the present disclosure, there is provided an electronic device for online risk checking, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present disclosure.
[0106] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present disclosure is implemented.
[0107] Figure 7 An exemplary system architecture 700 is shown to which the online risk checking method or online risk checking device implemented by the present disclosure can be applied.
[0108] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0109] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0110] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0111] The server 705 may be a server that provides various services, such as a backend management server (for example only) that provides support for shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may process the received online risk check request and feed back the processing result (for example only) to the terminal device.
[0112] It should be noted that the online risk checking method provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the online risk checking device is generally set in the server 705. The online risk checking method provided in the embodiment of the present invention can also be executed by the terminal devices 701, 702, and 703, and accordingly, the online risk checking device can be set in the terminal devices 701, 702, and 703.
[0113] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0114] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0115] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 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 part 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0116] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a 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, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0117] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.
[0118] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0120] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, a processor includes a scope determination module, a risk determination module, and a check module, wherein the names of these modules do not constitute limitations on the modules themselves in certain circumstances. For example, the scope determination module may also be described as a "module for determining the scope of impact of changes to the code of the application to be launched".
[0121] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method:
[0122] Determine the scope of the change in the code of the application to be launched;
[0123] Determine the risk indicator item corresponding to the change code according to a predetermined risk standard prompt library; the risk standard prompt library is determined based on historical online fault reports;
[0124] Based on the change impact scope and risk indicator items, a risk check is performed on the change code.
[0125] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. An online risk inspection method, characterized in that: include: Determine the scope of the change in the code of the application to be launched; Determine the risk indicator item corresponding to the change code according to a predetermined risk standard prompt library; the risk standard prompt library is determined based on historical online fault reports; Based on the change impact scope and risk indicator items, a risk check is performed on the change code.
2. The method according to claim 1, characterized in that Based on historical online failure reports, determine the risk specification prompt library, including: Obtain historical online failure reports and identify multiple risk indicators; A risk specification prompt library is created according to the risk indicator items; wherein the risk specification prompt library includes risk specification prompt statements corresponding to each risk indicator item; each risk specification prompt statement includes keywords and risk code examples associated with the corresponding risk indicator item.
3. The method according to claim 1, characterized in that The method further comprises: Based on the risk specification prompt library, extract risk indicator items corresponding to multiple test reports and their corresponding risk indicator information; The extracted risk indicator items and risk indicator information are compared with the real risk indicator items and real risk indicator information corresponding to the plurality of test reports. If they are inconsistent, the risk specification prompt library is adjusted.
4. The method according to claim 1, characterized in that: Determine the scope of the change corresponding to the change code, including: Based on the change code, determining a top-level encapsulation unit corresponding to the change code; Based on the full code, determining the calling relationship between each of the top-level encapsulation units; The change impact scope is determined according to the top-level encapsulation unit corresponding to the changed code and the calling relationship.
5. The method according to claim 1, characterized in that Based on the change impact scope and risk indicator items, before performing a risk check on the change code, the following steps are also included: Determining a changed business function associated with the change code according to the change code and the change impact scope; Determine whether the original online test set meets the coverage requirements of the changed business functions and the risk indicator items shown; If not, the original online test set is supplemented to obtain a target online test set for risk checking of the changed code.
6. The method according to claim 1, characterized in that After determining the risk standard prompt library, it also includes: The code language of the change code is adjusted according to the risk specification prompt library.
7. The method according to claim 1, characterized in that After the risk check of the changed code, it also includes: A risk check report is generated; the risk check report indicates the risk check result.
8. An online risk inspection device, characterized in that: include: A scope determination module is used to determine the scope of impact of the change code of the application to be launched; A risk determination module, used to determine the risk indicator item corresponding to the change code according to a predetermined risk standard prompt library; the risk standard prompt library is determined based on historical online fault reports; The checking module is used to perform a risk check on the changed code based on the change impact scope and risk indicator items.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
