Methods, devices, storage media, and electronic devices for determining the scope of program influence.

CN115061938BActive Publication Date: 2026-08-14INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-01
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0005]本申请提供一种程序影响范围的确定方法、装置、存储介质以及电子设备,以解决相关技术中无法准确全面的确定程序的影响范围的问题

Benefits of technology

[0016]通过本申请,采用以下步骤:确定目标业务执行时需要调用的启动程序,并根据目标业务的属性信息生成第一标识;将第一标识添加至启动程序中,并在启动程序调用至少一个关联程序的情况下,将启动程序的程序编号发送至关联程序,并基于启动程序的程序编号生成每个关联程序的第二标识;将关联程序确定为更新后的启动程序,再次执行将第一标识添加至启动程序中,并在启动程序调用至少一个关联程序的情况下,将启动程序的程序编号发送至关联程序,并基于启动程序的程序编号生成每个关联程序的第二标识的步骤,直至目标业务执行完毕;将包含第一标识的程序确定为目标业务的执行程序,得到多个执行程序,根据第二标识确定各个执行程序之间的调用关系,并根据调用关系确定目标业务的程序影响范围。解决了相关技术中无法准确全面的确定程序的影响范围的问题。通过设置第一标识进行相关程序的标识,并根据第二标识进行程序之间的调用关系的确定,从而生成与目标业务相关的全部程序的调用关系网络,进而达到了准确确定与目标业务相关的全部程序,并且准确确定程序之间的调用关系网络的效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115061938B_ABST
    Figure CN115061938B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, storage medium, and electronic device for determining the scope of influence of a program, relating to the fields of fintech or other fields. The method includes: determining the startup program that needs to be invoked when the target service is executed, and generating a first identifier based on the attribute information of the target service; adding the first identifier to the startup program, and when the startup program invokes at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program; identifying the associated program as the updated startup program, and repeating the above steps until the target service is completed; identifying the program containing the first identifier as the execution program of the target service, resulting in multiple execution programs, and determining the scope of influence of the target service based on the second identifier. This application solves the problem in related technologies where the scope of influence of a program cannot be accurately and comprehensively determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology, and more specifically, to a method, apparatus, storage medium, and electronic device for determining the scope of a procedure. Background Technology

[0002] During program testing, program exceptions may occur. When a portion of the program malfunctions and needs modification, it's necessary to determine the scope of the exception and test the affected programs as well. This ensures that after modifying the exception program, the remaining programs can still function normally.

[0003] However, when currently assessing the scope of an abnormal program's impact, we can only identify the programs associated with the abnormal program through the calling relationships between programs. We cannot comprehensively identify all programs that are associated with the abnormal program, which makes it impossible to conduct corresponding checks and tests on all programs affected by the abnormal program. Consequently, we cannot make timely adjustments to all abnormal programs, nor can we clearly determine the relationship and degree of association between the various programs.

[0004] There is currently no effective solution to the problem of not being able to accurately and comprehensively determine the scope of the program's impact in related technologies. Summary of the Invention

[0005] This application provides a method, apparatus, storage medium, and electronic device for determining the scope of influence of a program, in order to solve the problem in related technologies that it is impossible to accurately and comprehensively determine the scope of influence of a program.

[0006] According to one aspect of this application, a method for determining the scope of influence of a program is provided. The method includes: determining the startup program that needs to be invoked when the target service is executed, and generating a first identifier based on the attribute information of the target service; adding the first identifier to the startup program, and when the startup program invokes at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program; identifying the associated program as the updated startup program, and again performing the steps of adding the first identifier to the startup program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program, until the target service is completed; identifying the program containing the first identifier as the execution program of the target service, obtaining multiple execution programs, determining the invocation relationship between the execution programs based on the second identifier, and determining the scope of influence of the target service based on the invocation relationship.

[0007] Optionally, generating the first identifier based on the attribute information of the target business includes: obtaining the business scenario and business content of the target business from the attribute information, and generating a random code based on the business scenario and business content; combining the number of the business scenario, the number of the business content, and the random code to generate the first identifier.

[0008] Optionally, generating a second identifier for each associated program based on the program number of the startup program includes: determining the program number of the associated program; generating an identifier vector for the associated program based on the program number of the startup program, the program number of the associated program, and the calling relationship between the startup program and the associated program; and determining the identifier vector and the program number of the associated program as the second identifier of the associated program.

[0009] Optionally, determining the calling relationship between each executable program based on the second identifier, and determining the program influence scope of the target service based on the calling relationship, includes: obtaining the number vector associated with the program number of each executable program from the second identifier to obtain multiple sets of number vectors; generating a program number vector map of each executable program based on each set of number vectors; establishing a connection relationship between the program number vector map of each executable program and the starting point, taking the initial startup program called when the target service is executed as the starting point, to obtain the target program number vector map of the initial startup program; and determining the program influence scope of the target service through the target program number vector map.

[0010] Optionally, obtaining the number vector associated with the program number of each executable program from the second identifier to obtain multiple sets of number vectors, and generating a program number vector map of the executable program based on each set of number vectors includes: obtaining the number vectors in the second identifier of all executable programs to obtain multiple number vectors; obtaining the number vector containing each program number from the multiple number vectors to obtain multiple sets of number vectors; and combining all the number vectors in each set of number vectors to obtain a program number vector map of each executable program.

[0011] Optionally, after determining the scope of program influence of the target business based on the call relationship, the method further includes: in the case of an abnormal program in the execution program, determining the program number of the abnormal program to obtain the abnormal program number; determining the program number in the program number vector diagram that has a number of calls between it and the abnormal program number that is less than a number threshold to obtain multiple target program numbers, and determining the execution program corresponding to the target program number as the target execution program, wherein the number of calls is the number of execution programs in the time interval between the abnormal program calling the target execution program; testing each target execution program to obtain test results, and determining whether there is an abnormal program among the multiple target execution programs based on the test results.

[0012] Optionally, the program number vector graph can be displayed using at least one of the following structures: multiple vector lists, tree structure graph.

[0013] According to another aspect of this application, an apparatus for determining the scope of influence of a program is provided. The apparatus includes: a generation unit, configured to determine the startup program to be invoked when a target service is executed, and generate a first identifier based on the attribute information of the target service; a sending unit, configured to add the first identifier to the startup program, and, when the startup program invokes at least one associated program, send the program number of the startup program to the associated program, and generate a second identifier for each associated program based on the program number of the startup program; an execution unit, configured to determine the associated program as the updated startup program, and again execute the steps of adding the first identifier to the startup program, and, when the startup program invokes at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program, until the target service is completed; and a first determining unit, configured to determine the program containing the first identifier as the execution program of the target service, obtaining multiple execution programs, determining the invocation relationship between the execution programs based on the second identifier, and determining the scope of influence of the target service based on the invocation relationship.

[0014] According to another aspect of the present invention, a computer storage medium is also provided for storing a program, wherein the program, when running, controls the device where the computer storage medium is located to execute a method for determining the scope of program influence.

[0015] According to another aspect of the present invention, an electronic device is also provided, comprising one or more processors and a memory; the memory stores computer-readable instructions, and the processor is configured to execute the computer-readable instructions, wherein the computer-readable instructions, when executed, perform a method for determining the scope of program influence.

[0016] This application employs the following steps: First, determine the startup program required for the execution of the target service, and generate a first identifier based on the target service's attribute information. Second, add the first identifier to the startup program, and when the startup program calls at least one associated program, send the startup program's program number to the associated program, and generate a second identifier for each associated program based on the startup program's program number. Third, identify the associated program as the updated startup program, and repeat the steps of adding the first identifier to the startup program, sending the startup program's program number to the associated program, and generating a second identifier for each associated program based on the startup program's program number, until the target service is completed. Fourth, identify the program containing the first identifier as the execution program of the target service, resulting in multiple execution programs. Determine the calling relationship between the execution programs based on the second identifier, and determine the program's influence scope of the target service based on the calling relationship. This solves the problem in related technologies where the influence scope of a program cannot be accurately and comprehensively determined. By setting a first identifier to identify relevant programs and determining the calling relationships between programs based on a second identifier, a calling relationship network of all programs related to the target business is generated, thereby achieving the effect of accurately identifying all programs related to the target business and accurately determining the calling relationship network between programs. Attached Figure Description

[0017] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0018] Figure 1 This is a flowchart of a method for determining the scope of influence of a procedure according to an embodiment of this application;

[0019] Figure 2 This is a schematic diagram of the scope of influence of the optional target service provided in the embodiments of this application. Figure 1 ;

[0020] Figure 3 This is a schematic diagram of the scope of influence of the optional target service provided in the embodiments of this application. Figure 2 ;

[0021] Figure 4 This is a schematic diagram of an optional program number vector diagram provided according to an embodiment of this application;

[0022] Figure 5 This is a schematic diagram of the scope of influence of the optional target service provided in the embodiments of this application. Figure 3 ;

[0023] Figure 6This is a schematic diagram of a device for determining the scope of influence of a procedure according to an embodiment of this application;

[0024] Figure 7 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation

[0025] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] It should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are information and data authorized by the user or fully authorized by all parties. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information after receiving consent information from the aforementioned user or organization.

[0029] It should be noted that the methods, apparatus, storage media, and electronic devices for determining the scope of procedural impact as defined in this disclosure can be used in the field of financial technology, or in any field other than financial technology. The application fields of the methods, apparatus, storage media, and electronic devices for determining the scope of procedural impact as defined in this disclosure are not limited.

[0030] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:

[0031] Program impact scope: refers to the range of influence between related programs caused by program changes, with the changed program as the base point and the scope of related programs as the periphery.

[0032] According to an embodiment of this application, a method for determining the scope of influence of a program is provided.

[0033] Figure 1 This is a flowchart of a method for determining the scope of influence of a procedure according to an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps:

[0034] Step S101: Determine the startup program that needs to be called when the target service is executed, and generate a first identifier based on the attribute information of the target service.

[0035] Specifically, the target business can be business content that can be automatically operated through automated scripts. When executing the target business automatically, it is necessary to first obtain the attribute information corresponding to the target business, such as username, password and other attribute information. After the attribute information is entered, the automated script starts to call the startup program to execute the target business, and at the same time generates a first identifier based on the attribute information. The first identifier can be used to determine which programs are related to the target business.

[0036] Step S102: Add the first identifier to the startup program, and when the startup program calls at least one associated program, send the program number of the startup program to the associated program, and generate a second identifier for each associated program based on the program number of the startup program.

[0037] Specifically, when the automated script starts executing, the startup program begins running. At this time, a first identifier is added to the startup program to mark it. When the startup program calls an associated program, the program number of the startup program is sent to the associated program, so that the associated program stores the information of the startup program that calls the associated program. Thus, a second identifier for each associated program can be generated based on the program number of the startup program and the program number of the associated program. The second identifier can represent the association relationship between each program and the corresponding startup program.

[0038] Step S103: The associated program is identified as the updated startup program. The steps of adding the first identifier to the startup program and sending the program number of the startup program to the associated program when the startup program calls at least one associated program, and generating the second identifier of each associated program based on the program number of the startup program, are executed again until the target service is completed.

[0039] Specifically, after the startup program calls the associated program, the associated program can be used as a new startup program, and the operation in S102 can be repeated to add the first identifier to each called program, thereby clearly identifying all programs related to the target business.

[0040] Step S104: The program containing the first identifier is identified as the execution program of the target service, resulting in multiple execution programs. The calling relationship between each execution program is determined according to the second identifier, and the program influence scope of the target service is determined according to the calling relationship.

[0041] Specifically, after the target business is completed, all programs containing the first identifier can be identified as the execution programs corresponding to the target business. Furthermore, through the association between the startup program and associated programs in the second identifier, an execution program relationship network corresponding to the target business is generated. Thus, the scope of program influence of the target business is determined based on the execution program relationship network. In other words, the programs in the execution program relationship network are the programs that will affect the execution of the target business, and the distance between them and the initial startup program represents the degree of influence. The greater the distance, the smaller the degree of influence. Figure 2 This is a schematic diagram of the scope of influence of the optional target service provided in the embodiments of this application. Figure 1 ,like Figure 2 As shown, program 1 calls program 2, program 2 calls program 3 and program 5, program 3 and program 5 then act as startup programs to call program 7, program 6 and program 4, program 7 then acts as a startup program to call program 8, and completes the execution of the target business after calling program 8. Figure 2 This refers to the scope of the program's impact on the target business.

[0042] The method for determining the scope of program influence provided in this application involves: identifying the startup program that needs to be called when the target service is executed; generating a first identifier based on the attribute information of the target service; adding the first identifier to the startup program; and, when the startup program calls at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program; identifying the associated program as the updated startup program; repeating the steps of adding the first identifier to the startup program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program, until the target service is completed; identifying the program containing the first identifier as the execution program of the target service, resulting in multiple execution programs; determining the calling relationship between the execution programs based on the second identifier; and determining the scope of program influence of the target service based on the calling relationship. This solves the problem in related technologies where the scope of program influence cannot be accurately and comprehensively determined. By setting a first identifier to identify relevant programs and determining the calling relationships between programs based on a second identifier, a calling relationship network of all programs related to the target business is generated, thereby achieving the effect of accurately identifying all programs related to the target business and accurately determining the calling relationship network between programs.

[0043] To ensure the uniqueness of the identifier, optionally, in the method for determining the scope of influence of the program provided in the embodiments of this application, generating the first identifier based on the attribute information of the target business includes: obtaining the business scenario and business content of the target business from the attribute information, and generating a random code based on the business scenario and business content; combining the number of the business scenario, the number of the business content, and the random code to generate the first identifier.

[0044] Specifically, the business scenario and content of the target business can be obtained through attribute information, and keywords from the business scenario and content can be extracted. The pinyin or English of these keywords can then be used as the IDs for the business scenario and content. These IDs can then be encrypted using an encryption algorithm, such as a hash algorithm, to obtain a random code corresponding to the business scenario and content. Combining the business scenario ID, the business content ID, and the random code yields a unique first identifier. This embodiment, by generating a unique first identifier, ensures that each business has a unique identifier, thereby achieving the effect of accurately determining the executable program corresponding to the target business.

[0045] To determine the calling relationship between programs, optionally, in the method for determining the scope of influence of a program provided in this application embodiment, generating a second identifier for each associated program based on the program number of the launching program includes: determining the program number of the associated program; generating a number vector of the associated program based on the program number of the launching program and the program number of the associated program, as well as the calling relationship between the launching program and the associated program; and determining the number vector and the program number of the associated program as the second identifier of the associated program.

[0046] Specifically, the second identifier may include the program number of the program to which the second identifier is located, as well as the calling relationship between the program and the startup program that calls the program.

[0047] For example, if the startup program A is numbered 123, and the associated program B called by startup program A is numbered 456, then the second identifier of associated program B is: 456, 123→456.

[0048] Optionally, in the method for determining the scope of program influence provided in this application embodiment, determining the calling relationship between each executable program based on the second identifier and determining the scope of program influence of the target service based on the calling relationship includes: obtaining the number vector associated with the program number of each executable program from the second identifier to obtain multiple sets of number vectors; generating a program number vector map of the executable program based on each set of number vectors; establishing a connection relationship between the program number vector map of each executable program and the starting point, taking the initial startup program called when the target service is executed as the starting point, to obtain the target program number vector map of the initial startup program; and determining the scope of program influence of the target service through the target program number vector map.

[0049] Specifically, after obtaining the execution program corresponding to the target service, the number vector stored in each execution program can be determined according to the second identifier in each execution program, thereby obtaining all the number vectors corresponding to the target service. The number vectors are then grouped according to each program number, so that each number vector in each group carries the program number corresponding to that group, thus obtaining multiple groups of program vectors.

[0050] Furthermore, each group of program vectors is combined according to the program number to obtain the corresponding vector diagram. Then, multiple vector diagrams are combined according to the program vectors in the vector diagram that are associated with the number of the initial startup program to obtain the target program number vector diagram, which is the program influence range of the target business. Figure 3 This is a schematic diagram of the scope of influence of the optional target service provided in the embodiments of this application. Figure 2 ,like Figure 3As shown, Program 5→Program 6, Program 2→Program 3→Program 4, and Program 7→Program 8 are three vector groups. Program 1 to Program 8 are connected according to the program vectors of Program 1→Program 5, Program 1→Program 2, and Program 1→Program 7 to form the program influence range of the target business.

[0051] It should be noted that after obtaining the scope of influence of the target business's program, program coloring technology and data map imaging can be used to form a dynamic profile display. That is, the program vector map is colored, with different colors for programs at different layers, thereby generating a program association network diagram similar to a map, which allows for a direct determination of the scope of influence of the target business's program.

[0052] In order to construct the program number vector graph through multiple structures, optionally, in the method for determining the scope of program influence provided in the embodiments of this application, the program number vector graph is displayed through at least one of the following structures: multiple vector linked lists, tree structure graph.

[0053] Optionally, in the method for determining the scope of program influence provided in this application embodiment, obtaining the number vector associated with the program number of each executable program from the second identifier to obtain multiple sets of number vectors, and generating a program number vector map of the executable program based on each set of number vectors includes: obtaining the number vectors in the second identifier of all executable programs to obtain multiple number vectors; obtaining the number vector containing each program number from the multiple number vectors to obtain multiple sets of number vectors; and combining all the number vectors in each set of number vectors to obtain a program number vector map of each executable program.

[0054] Specifically, after obtaining the executable program corresponding to the target service, the number vector stored in each executable program can be determined based on the second identifier in each executable program, thereby obtaining all number vectors corresponding to the target service. The number vectors are then grouped according to each program number, so that each number vector in each group carries the program number corresponding to that group, resulting in multiple groups of program vectors. Finally, all number vectors in each group are combined to obtain the program number vector diagram for each executable program. This application lays the foundation for subsequent generation of program number vector diagrams by generating the program number vector diagram for each executable program.

[0055] Figure 4 This is a schematic diagram of an optional program number vector diagram provided according to an embodiment of this application, such as... Figure 4 As shown, the numbered vector group corresponding to Program 2 includes three pairs of numbered vectors: Program 1 → Program 2, Program 2 → Program 3, and Program 2 → Program 4. These three numbered vectors can be combined according to Program 2 to obtain the following... Figure 4 The program number vector diagram of program 2 is shown.

[0056] It should be noted that after generating the program number vector map for each program, the program number vector map can be stored and combined in the memory to obtain the program's influence range for the target business, and to prevent the program number vector map from being lost.

[0057] Optionally, in the method for determining the scope of program influence provided in the embodiments of this application, after determining the scope of program influence of the target service based on the calling relationship, the method further includes: in the case of an abnormal program in the program, determining the program number of the abnormal program to obtain an abnormal program number; determining program numbers in the program number vector diagram whose number of calls between them and the abnormal program number is less than a number threshold to obtain multiple target program numbers, and determining the program corresponding to the target program number as the target program, wherein the number of calls is the number of programs in the time interval between the abnormal program calling the target program; testing each target program to obtain test results, and determining whether there is an abnormal program among the multiple target programs based on the test results.

[0058] Specifically, after determining the scope of the program's impact on the target business, if an abnormal program occurs during the execution of the target business, the location of the abnormal program can be determined in the program number vector diagram, and the program numbers whose call counts with the abnormal program number are less than a threshold can be identified. This allows for targeted testing of programs with a high degree of correlation with the abnormal program, thereby determining whether these programs also experience abnormalities.

[0059] Figure 5 This is a schematic diagram of the scope of influence of the optional target service provided in the embodiments of this application. Figure 3 ,like Figure 5 As shown, if program 4 is an abnormal program and the number threshold is 2, then the programs whose number of calls between them and the abnormal program number is less than the number threshold are: program 3 and program 2. Therefore, program 3 and program 2 need to be tested to determine whether program 3 and program 2 are abnormal.

[0060] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0061] This application also provides an apparatus for determining the scope of program influence. It should be noted that this apparatus can be used to execute the method for determining the scope of program influence provided in this application. The apparatus for determining the scope of program influence provided in this application is described below.

[0062] Figure 6 This is a schematic diagram of a device for determining the scope of influence of a procedure according to an embodiment of this application. Figure 6 As shown, the device includes: a generation unit 61, a sending unit 62, an execution unit 63, and a first determination unit 64.

[0063] The generation unit 61 is used to determine the startup program that needs to be called when the target business is executed, and to generate a first identifier based on the attribute information of the target business.

[0064] The sending unit 62 is used to add the first identifier to the startup program, and when the startup program calls at least one associated program, send the program number of the startup program to the associated program, and generate a second identifier for each associated program based on the program number of the startup program.

[0065] The execution unit 63 is used to determine the associated program as the updated startup program, and to re-execute the steps of adding the first identifier to the startup program, and sending the program number of the startup program to the associated program when the startup program calls at least one associated program, and generating the second identifier of each associated program based on the program number of the startup program, until the target business is completed.

[0066] The first determining unit 64 is used to determine the program containing the first identifier as the execution program of the target service, obtain multiple execution programs, determine the calling relationship between each execution program according to the second identifier, and determine the program influence scope of the target service according to the calling relationship.

[0067] The apparatus for determining the scope of program influence provided in this application embodiment determines the startup program that needs to be called when the target service is executed by the generation unit 61, and generates a first identifier based on the attribute information of the target service; the sending unit 62 adds the first identifier to the startup program, and when the startup program calls at least one associated program, sends the program number of the startup program to the associated program, and generates a second identifier for each associated program based on the program number of the startup program; the execution unit 63 determines the associated program as the updated startup program, and repeats the steps of adding the first identifier to the startup program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program, until the target service is completed; the first determining unit 64 determines the program containing the first identifier as the execution program of the target service, obtaining multiple execution programs, determines the calling relationship between the execution programs based on the second identifier, and determines the scope of program influence of the target service based on the calling relationship. This solves the problem in related technologies that it is impossible to accurately and comprehensively determine the scope of program influence. By setting a first identifier to identify relevant programs and determining the calling relationships between programs based on a second identifier, a calling relationship network of all programs related to the target business is generated, thereby achieving the effect of accurately identifying all programs related to the target business and accurately determining the calling relationship network between programs.

[0068] Optionally, in the apparatus for determining the scope of influence of a program provided in this application embodiment, the generation unit 61 includes: a first acquisition module, used to acquire the business scenario and business content of the target business from attribute information, and generate a random code based on the business scenario and business content; and a combination module, used to combine the number of the business scenario, the number of the business content, and the random code to generate a first identifier.

[0069] Optionally, in the program influence scope determination device provided in the embodiments of this application, the sending unit 62 includes: a first determining module, used to determine the program number of the associated program; a generating module, used to generate a number vector of the associated program based on the program number of the startup program and the program number of the associated program, as well as the calling relationship between the startup program and the associated program; and a second determining module, used to determine the number vector and the program number of the associated program as a second identifier of the associated program.

[0070] Optionally, in the program influence scope determination device provided in this application embodiment, the first determination unit 64 includes: a second acquisition module, used to acquire the number vector associated with the program number of each executable program from the second identifier, obtain multiple sets of number vectors, and generate a program number vector map of the executable program according to each set of number vectors; an establishment module, used to establish the connection relationship between the program number vector map of each executable program and the starting point, taking the initial startup program called when the target service is executed as the starting point, to obtain the target program number vector map of the initial startup program; and a third determination module, used to determine the program influence scope of the target service through the target program number vector map.

[0071] Optionally, in the program influence scope determination device provided in the embodiments of this application, the second acquisition module includes: a first acquisition submodule, used to acquire the number vector in the second identifier of all executable programs to obtain multiple number vectors; a second acquisition submodule, used to acquire the number vector containing each program number from the multiple number vectors to obtain multiple sets of number vectors; and a combination submodule, used to combine all number vectors in each set of number vectors to obtain a program number vector diagram for each executable program.

[0072] Optionally, in the program influence range determination device provided in the embodiments of this application, the device further includes: a second determination unit, configured to determine the program number of the abnormal program in the case of an abnormal program in the program being executed, and obtain an abnormal program number; a third determination unit, configured to determine program numbers in the program number vector diagram whose number of calls between them and the abnormal program number is less than a number threshold, obtain multiple target program numbers, and determine the program corresponding to the target program number as the target program, wherein the number of calls is the number of programs in the time interval between the abnormal program calling the target program; and a testing unit, configured to test each target program, obtain test results, and determine whether there is an abnormal program among the multiple target programs based on the test results.

[0073] Optionally, in the program influence scope determination device provided in the embodiments of this application, the program number vector graph is displayed through at least one of the following structures: multiple vector linked lists, tree structure graph.

[0074] The device for determining the scope of influence of the above-mentioned program includes a processor and a memory. The generation unit 61, the sending unit 62, the execution unit 63, the first determining unit 64, etc. are all stored in the memory as program units. The processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.

[0075] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the problem of accurately and comprehensively determining the scope of a program's impact, a problem present in related technologies.

[0076] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0077] This invention provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a method for determining the scope of influence of the program.

[0078] This invention provides a processor for running a program, wherein the program executes a method for determining the scope of influence of the program during runtime.

[0079] like Figure 7 As shown, this embodiment of the invention provides an electronic device 70, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: determining the startup program to be called when the target service is executed, and generating a first identifier based on the attribute information of the target service; adding the first identifier to the startup program, and when the startup program calls at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program; determining the associated program as the updated startup program, and again executing the steps of adding the first identifier to the startup program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program, until the target service is completed; determining the program containing the first identifier as the execution program of the target service, resulting in multiple execution programs; determining the calling relationship between the execution programs based on the second identifier, and determining the program's influence scope of the target service based on the calling relationship. The device in this document can be a server, PC, PAD, mobile phone, etc.

[0080] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: determining the startup program that needs to be called when the target service is executed, and generating a first identifier based on the attribute information of the target service; adding the first identifier to the startup program, and when the startup program calls at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program; determining the associated program as the updated startup program, and again executing the steps of adding the first identifier to the startup program, and when the startup program calls at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program, until the target service is completed; determining the program containing the first identifier as the execution program of the target service, obtaining multiple execution programs, determining the calling relationship between each execution program based on the second identifier, and determining the program influence scope of the target service based on the calling relationship.

[0081] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0082] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0083] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0084] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0085] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0086] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0087] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0088] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0089] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for determining the scope of influence of a program, characterized in that, include: The startup program to be invoked when the target service is executed is determined, and a first identifier is generated based on the attribute information of the target service, wherein the target service is operated automatically by an automation script, and the attribute information includes at least one of the following: username, password; The first identifier is added to the launcher, and when the launcher calls at least one associated program, the program number of the launcher is sent to the associated program, and a second identifier for each associated program is generated based on the program number of the launcher. The associated program is identified as the updated launch program. The steps of adding the first identifier to the launch program and sending the program number of the launch program to the associated program when the launch program calls at least one associated program, and generating a second identifier for each associated program based on the program number of the launch program, are executed again until the target service is completed. The program containing the first identifier is identified as the execution program of the target service, resulting in multiple execution programs. The calling relationship between each execution program is determined according to the second identifier, and the program influence scope of the target service is determined according to the calling relationship. The process of determining the calling relationship between the various executable programs based on the second identifier, and determining the program influence scope of the target service based on the calling relationship, includes: obtaining the number vector associated with the program number of each executable program from the second identifier to obtain multiple sets of number vectors; generating a program number vector map of each executable program based on each set of number vectors; establishing a connection relationship between the program number vector map of each executable program and the starting point, taking the initial startup program called when the target service is executed as the starting point, to obtain the target program number vector map of the initial startup program; and determining the program influence scope of the target service through the target program number vector map.

2. The method according to claim 1, characterized in that, Generating a first identifier based on the attribute information of the target service includes: The business scenario and business content of the target business are obtained from the attribute information, and a random code is generated based on the business scenario and business content; The first identifier is generated by combining the business scenario number, the business content number, and the random code.

3. The method according to claim 1, characterized in that, Generating a second identifier for each associated program based on the program number of the startup program includes: Determine the program number of the associated program; Based on the program ID of the startup program and the program ID of the associated program, as well as the calling relationship between the startup program and the associated program, generate the ID vector of the associated program; The number vector and the program number of the associated program are determined as the second identifier of the associated program.

4. The method according to claim 1, characterized in that, Obtain the number vector associated with the program number of each executable program from the second identifier to obtain multiple sets of number vectors. Generate a program number vector diagram of the executable program based on each set of number vectors, including: Obtain the number vector from the second identifier of all the executors to obtain multiple number vectors; Multiple sets of number vectors are obtained by obtaining the number vector containing each program number from the multiple number vectors; By combining all the number vectors in each group of number vectors, a program number vector diagram for each executable program is obtained.

5. The method according to claim 1, characterized in that, After determining the scope of program influence of the target service based on the call relationship, the method further includes: In the event of an abnormal execution program in the execution program, the program number of the abnormal execution program is determined to obtain the abnormal program number; In the program number vector graph, program numbers whose number of calls to the abnormal program number is less than a threshold are determined to obtain multiple target program numbers, and the executable program corresponding to the target program number is determined as the target executable program, wherein the number of calls is the number of executable programs at which the abnormal program calls the target executable program; Each of the target executable programs is tested to obtain test results, and based on the test results, it is determined whether there are any abnormal executable programs among the multiple target executable programs.

6. The method according to claim 1, characterized in that, The program number vector graph is displayed through at least one of the following structures: multiple vector linked lists, tree structure graph.

7. A device for determining the scope of influence of a program, characterized in that, include: A generation unit is used to determine the startup program that needs to be called when the target service is executed, and to generate a first identifier based on the attribute information of the target service, wherein the target service is operated automatically by an automation script, and the attribute information includes at least one of the following: username, password; The sending unit is configured to add the first identifier to the launcher, and when the launcher calls at least one associated program, send the program number of the launcher to the associated program, and generate a second identifier for each associated program based on the program number of the launcher; An execution unit is configured to determine the associated program as the updated startup program, and then re-execute the steps of adding the first identifier to the startup program, and when the startup program calls at least one associated program, sending the program number of the startup program to the associated program, and generating a second identifier for each associated program based on the program number of the startup program, until the target service is completed. The first determining unit is configured to determine the program containing the first identifier as the execution program of the target service, obtain a plurality of the execution programs, determine the calling relationship between the execution programs according to the second identifier, and determine the program influence scope of the target service according to the calling relationship; The first determining unit includes: a second obtaining module, configured to obtain a number vector associated with the program number of each of the executing programs from the second identifier, to obtain multiple sets of number vectors, and to generate a program number vector map of the executing program based on each set of number vectors; an establishing module, configured to establish a connection relationship between the program number vector map of each executing program and the starting point, taking the initial startup program called when the target service is executed as the starting point, to obtain a target program number vector map of the initial startup program; and a third determining module, configured to determine the program influence range of the target service through the target program number vector map.

8. A computer storage medium, characterized in that, The computer storage medium is used to store a program, wherein when the program runs, it controls the device where the computer storage medium is located to execute the method for determining the scope of influence of the program as described in any one of claims 1 to 6.

9. An electronic device, characterized in that, It includes one or more processors and a memory 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 for determining the scope of program influence as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method, device and equipment for obtaining calling relationship in program code

    CN108021391A

  • Program exception processing method and device, equipment and storage medium

    CN113220535A