A software update evaluation method, device and electronic device

By building and querying software updates, the problem of the existing technology in which the service nodes affected by code changes cannot be accurately evaluated in software, and the precise display and evaluation of the impact scope is achieved.

CN112540930BActive Publication Date: 2024-12-17BEIJING BAIJIA HULIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011579805.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-28
Publication Date
2024-12-17
Estimated Expiration
2040-12-28

AI Technical Summary

Technical Problem

The prior art cannot accurately evaluate all service nodes in the software affected by code changes, and cannot comprehensively and intuitively display the service nodes affected by code changes, resulting in the inability to accurately evaluate the scope of the code changes in the software.

Method used

By determining the modified code in the target software and its corresponding method name, a link network is built, repeated links are aggregated and merged, link network is generated, stored and queryed to show the scope of influence of code changes.

Benefits of technology

It realizes an accurate assessment of the scope of impacted by code changes in the software, can clearly display the affected service nodes, and solves the problem that the scope of impact cannot be fully displayed in the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112540930B_ABST
    Figure CN112540930B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method, device and electronic device for evaluating software updates, wherein the method includes: determining at least one target modification code in the program code corresponding to the target software; and determining the target method name corresponding to each target modification code to obtain at least one target method name; determining at least one link corresponding to each target method name, wherein each link in the at least one link is used to characterize the execution process of the method function corresponding to the target method name under the corresponding test conditions; constructing a link network based on at least one link corresponding to each target method name, so as to evaluate the impact range of the target software according to the link network. The embodiment of the present disclosure can more clearly display the impact range of the code modification by aggregating at least one link corresponding to the method name corresponding to the modification code to obtain a link network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of software evaluation, and in particular to an evaluation method, device and electronic device for software update. Background Art

[0002] At present, with the continuous development of the software industry, newly developed software is becoming more and more complex and has more and more functions. At the same time, the process of risk assessment of software is becoming more and more cumbersome when the software version is updated. In the existing technical solutions, technicians can only use tools to obtain the upstream and downstream ports affected by the code changes after the software version is updated, so as to determine the service nodes corresponding to the upstream and downstream ports affected by the code changes.

[0003] However, when using existing technical solutions to evaluate software (for example, risk assessment), the solution that can obtain the affected upstream and downstream system interfaces through relevant evaluation tools can only determine the service nodes corresponding to the upstream and downstream ports affected by the code changes, but cannot determine other service nodes affected by the above service nodes. Therefore, the existing technical methods cannot comprehensively and intuitively display all service nodes affected by the code changes, and thus cannot accurately evaluate the service nodes in the software affected by the code changes. Summary of the invention

[0004] The embodiments of the present disclosure at least provide a method, a device, and an electronic device for evaluating software updates.

[0005] In a first aspect, an embodiment of the present disclosure provides an evaluation method for software updates, comprising: determining at least one target change code in a program code corresponding to the target software; and determining a target method name corresponding to each of the target change codes to obtain at least one target method name; determining at least one link corresponding to each of the target method names, wherein each of the at least one link is used to characterize the execution process of the method function corresponding to the target method name under corresponding test conditions; and constructing a link network based on at least one link corresponding to each of the target method names to perform an impact range evaluation on the target software according to the link network.

[0006] In combination with the first aspect, the embodiment of the present disclosure provides a first possible implementation of the first aspect, wherein: determining at least one link corresponding to each of the target method names includes: obtaining at least one test case; running the at least one test case in turn through the method function corresponding to each method name to obtain at least one test result; for each of the test cases, determining the service node used to run the test case in each of the test results, and determining each link corresponding to each of the method names based on the determined service node.

[0007] In combination with the first aspect, or in combination with the first possible implementation of the first aspect, the embodiment of the present disclosure provides a second possible implementation of the first aspect, wherein: the link network is constructed based on at least one link corresponding to each of the target method names, including: determining duplicate links in at least one link corresponding to all the target method names; and merging the duplicate links to obtain at least one link corresponding to all the target method names after the merge; and constructing the link network according to at least one link corresponding to all the target method names after the merge.

[0008] In combination with the first aspect, the embodiment of the present disclosure provides a third possible implementation of the first aspect, wherein determining the target method name corresponding to each target change code includes: determining the number of code lines corresponding to the target change code in the current program code of the target software; determining the target method name corresponding to the target change code according to a preset association relationship, wherein the preset association relationship is used to characterize the association relationship between the number of code lines and its corresponding method name.

[0009] In combination with the first aspect, the embodiment of the present disclosure provides a fourth possible implementation of the first aspect, wherein the determining of at least one target change code in the program code corresponding to the target software includes: detecting a code merging action, wherein the code merging action is an action of merging a personal development branch into a main branch of the program code corresponding to the target software; after detecting the code merging action, performing a difference comparison between the original program code of the target software and the current program code of the target software to determine the target change code.

[0010] In combination with the first aspect, the embodiment of the present disclosure provides a fifth possible implementation of the first aspect, wherein the method further includes: obtaining a database to be stored and determining a data storage format of the database to be stored; and storing the link network in the database to be stored according to the data storage format.

[0011] In combination with the first aspect, the embodiment of the present disclosure provides a sixth possible implementation of the first aspect, wherein the impact scope assessment of the target software based on the link network includes: obtaining a query request sent by a user through a query terminal, wherein the query request includes the modified code requested by the user; in response to the query request, determining at least one target link corresponding to the modified code requested by the user in the link network; and displaying the at least one target link on the display interface of the query terminal according to a preset display mode, so that the user can assess the impact scope of the target software based on the at least one target link.

[0012] In a second aspect, an embodiment of the present disclosure also provides an evaluation device for software updates, comprising: a first determination module, used to determine at least one target change code in the program code corresponding to the target software; and determine the target method name corresponding to each of the target change codes to obtain at least one target method name; a second determination module, used to determine at least one link corresponding to each of the target method names, wherein each link in the at least one link is used to characterize the execution process of the method function corresponding to the target method name under each test condition; a construction module, used to construct a link network based on at least one link corresponding to each of the target method names, so as to perform risk assessment on the target software based on the link network.

[0013] 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 electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.

[0014] 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 possible implementation of the first aspect are executed.

[0015] The disclosed embodiments provide a method, device and system for evaluating software updates. The method obtains a link network of a target modified code and queries the link network on a terminal device, and evaluates the target software for updates based on the query results. Compared with the prior art method of obtaining upstream and downstream ports affected by code changes after a software version update through tools, thereby determining service nodes corresponding to the upstream and downstream ports affected by the code changes, the method solves the problem in the prior art that the scope of software affected by code changes cannot be accurately evaluated.

[0016] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] 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.

[0018] Figure 1 A flowchart of a method for evaluating software updates provided by an embodiment of the present disclosure is shown;

[0019] Figure 2 A flowchart showing a tracking process of the Apm system in a method for evaluating software updates provided by an embodiment of the present disclosure is shown;

[0020] Figure 3 A schematic diagram of a software update evaluation device provided by an embodiment of the present disclosure is shown;

[0021] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0022] 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.

[0023] 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.

[0024] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.

[0025] Research has found that when using existing technical solutions to evaluate software (for example, risk assessment), the solution of obtaining the affected upstream and downstream system interfaces through relevant evaluation tools can only determine the service nodes corresponding to the upstream and downstream ports affected by the code changes, but cannot determine other service nodes affected by the above service nodes. Therefore, the existing technical methods cannot comprehensively and intuitively display all service nodes affected by code changes, and thus cannot accurately evaluate the service nodes affected by code changes in the software.

[0026] Based on the above research, the present disclosure provides a method for evaluating software updates. In an embodiment of the present disclosure, at least one link corresponding to the method name corresponding to the changed code is aggregated to obtain a link network, which can more clearly show the scope of impact of the code change, thereby solving the problem in the existing technical solution that the service nodes affected by the code change in the software cannot be accurately evaluated.

[0027] To facilitate understanding of the present embodiment, a method for evaluating software updates disclosed in the present embodiment is first introduced in detail. The execution subject of the method for evaluating software updates provided in the present embodiment 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 can 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 evaluating software updates can be implemented by a processor calling a computer-readable instruction stored in a memory.

[0028] See also Figure 1 FIG. 1 is a flowchart of a method for evaluating software updates provided by an embodiment of the present disclosure, the method comprising steps S101 to S105, wherein:

[0029] S101: Determine at least one target modification code in a program code corresponding to a target software; and determine a target method name corresponding to each of the target modification codes to obtain at least one target method name.

[0030] In the disclosed embodiment, the modification of the program code corresponding to the target software will affect at least one operation method in the target software. Therefore, in the disclosed embodiment, the method name of each target modification code in the program code corresponding to the target software must first be determined. It should be noted that if the method names corresponding to multiple target modification codes are the same, they are counted as one target method name.

[0031] In the embodiment of the present disclosure, the target modified code can be detected in the version library of the distributed version control system (hereinafter referred to as the Git system), and when the target modified code is in the version library of the Git system, tag information can be added to the target modified code. After that, the line number where the target modified code is located is located and all method names corresponding to the target modified code are tracked, so as to obtain at least one target method name described above.

[0032] It should be noted that, since the target software is always in an updated state, after each update, the program code of each version of the target software can be stored in the version library of the Git system.

[0033] After obtaining at least one target method name, the at least one target method name may be taken as an element and put into a method name collection, where the number of elements in the collection is the number of all methods affected by the code modification.

[0034] S103: Determine at least one link corresponding to each of the target method names, wherein each link in the at least one link is used to represent the execution process of the method function corresponding to the target method name under each test condition.

[0035] In the disclosed embodiment, a plurality of test conditions may be pre-set, and then each test condition is used to test the method function corresponding to each target method name, thereby obtaining a corresponding execution process, and determining at least one link according to the execution process.

[0036] It should be noted that, in the embodiments of the present disclosure, multiple test conditions can be set by setting test cases. One test case represents one test condition, and each method corresponds to at least one test case.

[0037] S105: constructing a link network based on at least one link corresponding to each target method name, so as to perform risk assessment on the target software according to the link network.

[0038] In the disclosed embodiments, at least one link corresponding to the method name corresponding to the modified code is aggregated to obtain a link network, which can more clearly show the scope of impact caused by the code change, thereby solving the problem in the prior art that the service nodes affected by the code change in the software cannot be accurately evaluated.

[0039] It can be seen from the above description that in the embodiment of the present disclosure, at least one target modification code in the program code corresponding to the target software is first determined. This step specifically includes the following steps S1011 and S1012:

[0040] Step S1011: Detecting a code merging action, wherein the code merging action is an action of merging a personal development branch into a main branch of the program code corresponding to the target software.

[0041] It can be seen from the above description that in an optional implementation, the personal development branch can be merged into the main branch of the program code corresponding to the target software by any of the following methods, specifically including:

[0042] Method 1:

[0043] In this embodiment, the personal development branch can be automatically merged into the main branch of the program code corresponding to the target software through the built-in monitoring code.

[0044] In the embodiment of the present disclosure, when there are a large number of personal development branches to be merged, the code merging action can be automatically performed through the above-mentioned monitoring code, thereby avoiding the omission of personal development branches to be merged due to manual triggering behavior, and simplifying the operation steps of merging the branches to be merged one by one when manually triggered.

[0045] Method 2:

[0046] By manually triggering the relevant technical personnel, a single personal development branch is merged into the main branch of the program code corresponding to the target software.

[0047] It should be noted that relevant technical personnel write programs for version update of target software on personal development branches, wherein the personal development branch can perform the following operations on relevant functions of the current version of the target software: modification, deletion, and addition of new functions.

[0048] In the disclosed embodiment, after the personal development branch is merged into the main branch of the program code corresponding to the target software, the code merging action can be detected.

[0049] Step S1012: After the code merging action is detected, the original program code of the target software and the current program code of the target software are compared to determine the target modified code.

[0050] In the disclosed embodiment, a version library can be established in the Git system, and the version library contains the program code of all versions of the target software. When the action of merging into the main branch of the corresponding program code of the target software is detected, the original program code of the target software and the current program code of the target software are automatically compared in the above version library to determine the target modified code. After comparing the target modified code, marking information can also be set for the target modified code obtained after the comparison, for example, highlighting the modified code in red to mark it.

[0051] It can be seen from the above description that in the disclosed embodiment, the personal development branch can be automatically merged into the main branch of the program code corresponding to the target software through the monitoring code. After the code merging action is detected, the automatic difference comparison of the program code of the target software is automatically performed, and after the automatic difference comparison, the modified target modified code is marked in the version library of the Git system. In the case of a large number of branch merging actions, the above processing process can simplify the operation steps, improve the accuracy of the operation, and enhance the accuracy of the evaluation of the scope of influence of the modified code.

[0052] At the same time, in the embodiments of the present disclosure, the code merge action can be manually triggered. After a code merge action, a single personal development branch written subsequently can still be merged into the main branch by manually triggering it, which can meet the operation requirements of relevant technicians under different conditions. In addition, after detecting the code merge action, the method of automatically setting identification information for the target modified code in the version library of the Git system helps to clearly and intuitively understand the modified code of this merge operation.

[0053] In the embodiment of the present disclosure, after determining at least one target modified code in the program code corresponding to the target software in the manner described above, the target method name corresponding to each target modified code can be determined, and the execution of the above steps specifically includes steps S1013 to S1014:

[0054] Step S1013: determining the number of code lines corresponding to the target modified code in the current program code of the target software;

[0055] Step S1014: determining the target method name corresponding to the target modified code according to a preset association relationship, wherein the preset association relationship is used to represent the association relationship between the number of code lines and the corresponding method name.

[0056] According to the steps described above, in an optional implementation, the target method name corresponding to the target modified code may be determined in the following manner, specifically including:

[0057] According to the target modified code in the version library of the above Git system, the built-in program automatically locates the code line number of each target modified code, and automatically queries all method names corresponding to all target modified codes according to the located code line number. After obtaining all the above method names, they are put into a method name collection as parameters.

[0058] It should be noted that in the disclosed embodiment, a data table can be pre-constructed, which contains a preset association relationship between the number of code lines and the corresponding method name. When querying the method name based on the number of code lines, the method name corresponding to the number of code lines of the target modified code can be determined based on the preset association relationship.

[0059] In the disclosed embodiment, the method name corresponding to the target modified code in the version library can be automatically queried, thereby avoiding the situation where incomplete search may be caused by manually tracing the method name corresponding to each modified code when there are a large number of modified codes.

[0060] In another optional implementation, in addition to the above-described method, the target method name corresponding to the target modified code may also be determined by the following method, specifically including:

[0061] The relevant technicians can use the identification information pre-set for the target modified code to search for the target modified code in the version library, for example, the modified code highlighted in red. Then, the method name corresponding to each target modified code is determined until all target method names are obtained. After all the above method names are obtained, they are stored as parameters in the method name collection.

[0062] It can be seen from the disclosed contents of the above steps that in the disclosed embodiment, the method name corresponding to the target modified code in the program code corresponding to the target software can be automatically queried, avoiding the situation where the influence range of the modified code is not fully searched by manually tracing the method name corresponding to each modified code when there are a large number of modified codes. At the same time, in the disclosed embodiment, when it is necessary to focus on tracing the method name corresponding to some target modified codes, the method name corresponding to the target modified code can also be obtained by manual query.

[0063] In an embodiment of the present disclosure, after the target method name corresponding to each target modified code is determined in the manner described above, at least one link corresponding to each of the target method names can be determined, wherein each link in the at least one link is used to characterize the execution process of the method function corresponding to the target method name under each test condition.

[0064] In the disclosed embodiment, at least one link corresponding to each target method name can be determined by integrating a system for analyzing performance problems and understanding system behavior based on different types of computer languages ​​(hereinafter referred to as Apm system). The Apm system integrates tracking systems for different types of computer languages, and loops through a for loop statement for each method name in the method name collection input therein, where the number of loops is the number of method names in the collection, until all methods in the method name collection are traversed.

[0065] It should be noted that the Apm system can integrate one or more tracking systems to perform the above operation process on target software written in different computer languages. For example, the Apm system can integrate the jaeger system (for java) and the skyworking system (for go) so that it can be used for software written in java and go. Figure 2 shown. Figure 2 The agent in the example can be jaeger-agent, which is responsible for processing spans and sending them to collector, where collector is Figure 2 The data collection module in jaeger-agent. jaeger-agent is deployed on the host as a basic component. The purpose of jaeger-agent is to collect data from the client (i.e. Figure 2 The discovery and routing of collectors are abstracted in the client in jaeger-collector. jaeger-collector is used to collect tracking spans and process the tracking data through pipelines to obtain tracking information. The data store is Figure 2 The data storage module is used to store the tracking information). Figure 2 The user interface in jaeger-ui can be understood as the jaeger-query used to display the stored tracking information. Figure 2 The query module in is used to retrieve tracking information from the storage and display it through the UI.

[0066] In an optional implementation, determining at least one link corresponding to each target method name mainly includes the following process:

[0067] Step S1031: Obtain at least one test case.

[0068] In the embodiment of the present disclosure, at least one test case corresponding to each target method name can be determined first. It should be noted that the at least one test case corresponding to different method names can be the same or different. Different test cases are used to characterize different test conditions. The specific content of the test case can be set according to actual needs.

[0069] Step S1032: Run the at least one test case in turn through the method function corresponding to each method name to obtain at least one test result.

[0070] In the disclosed embodiment, each target method name can be called cyclically by a for loop statement, and then at least one test case corresponding to each target method name is run. After the running is completed, each test case obtains a corresponding test result.

[0071] For example, if the method function corresponding to a target method name is the method function corresponding to the user payment operation, two test conditions can be set for the user payment operation, including: the user performs the payment operation on the terminal device but does not pay, and the user performs the payment operation on the terminal device and pays. Then, set corresponding test cases for these two test conditions. The Apm system runs the above two test cases through the method function corresponding to the user payment operation, and obtains the test results under these two test conditions respectively.

[0072] Step S1033: for each of the test cases, determine a service node for running the test case in each of the test results, and determine each link corresponding to each of the method names according to the determined service node.

[0073] It should be noted that in the disclosed embodiment, each test result includes a method function corresponding to the target method name, which is used to execute the service node of the test case when running each test case. Therefore, in the disclosed embodiment, for each test result of the target method name, the service node in the process of running the test case of the target method name can be tracked through the service node included in the test result, and then the determined service node is constructed according to the service order of the service node to obtain a link, thereby obtaining a link of the execution process of the method function of each method name under multiple test conditions.

[0074] In the process of running each test case through the method function corresponding to the target method name, each target method name will perform different operation processes when running different test cases, so the service node corresponding to each test condition may be different, and therefore the obtained link composed of service nodes may also be different.

[0075] It should be noted that, since the service nodes in the above-mentioned collection of methods running under different test conditions are repeated but not completely the same, all the links composed of the service nodes obtained are also repeated but not completely the same.

[0076] It can be seen from the disclosed contents of the above steps that in the embodiment of the present disclosure, a series of operations are performed on at least one target method name inputted therein through an integrated Apm system, and at least one link corresponding to each target method name is finally outputted. The Apm system can integrate one or more tracking systems for different computer languages, for example, Figure 2 The tracking system shown in the figure can be used to evaluate target software written in different computer languages, which can meet the diversified evaluation needs to a certain extent. At the same time, the setting of different test cases can more comprehensively determine the test conditions, so as to obtain a more accurate impact range of the modified code.

[0077] In the embodiment of the present disclosure, after determining at least one link corresponding to each of the target method names in the manner described above, a link network can be constructed based on at least one link corresponding to each of the target method names. The execution of the above steps specifically includes:

[0078] Step S1051: determining a repeated link in at least one link corresponding to all target method names; and merging the repeated links to obtain at least one link corresponding to all target method names after merging.

[0079] In the disclosed embodiment, after the Apm system outputs at least one link for each target method name, it can determine the repeated links in all the links. The repeated links can be completely repeated links or partially repeated links in the entire link. After determining the repeated links, the repeated links can be merged, for example, the repeated parts between multiple links with repeated links are merged to obtain a merged link.

[0080] After aggregating at least one link corresponding to all target method names, the structure of the at least one link after the aggregation processing is more concise. When the user queries the link affected by the target modified code, the search is faster and the data storage space is saved.

[0081] Step S1052: construct the link network according to at least one link corresponding to all the target method names after the merging process.

[0082] In the embodiment of the present disclosure, through the above-mentioned merging operation, all links with repeated links can be merged to finally obtain a link network.

[0083] In the disclosed embodiment, all the links obtained by different test cases for the method names in the target method name collection are not exactly the same. Then, based on the repeated parts of all the above links, all the links containing the repeated parts are aggregated, and a link network that can characterize the scope of the code change is obtained through the above aggregation operation, and the link network is placed in the database. The user can call up the link network through the query operation performed on the terminal device. When the relevant technical personnel evaluate the target software, they can intuitively observe the connection relationship between different methods during execution, and can accurately evaluate the scope of the impact of the code change.

[0084] In the embodiment of the present disclosure, after the link network is constructed in the manner described above, a storage drop operation may be performed on the target link network. The storage drop operation specifically includes:

[0085] Step S11: Acquire a database to be stored, and determine the data storage format of the database to be stored.

[0086] In the disclosed embodiment, when the link network is put into storage, the preset database to be stored is first obtained. In addition, since different databases have different data storage formats, it is necessary to determine the data storage format of the database to be stored.

[0087] It should be noted that the type of the database to be stored can be set independently by relevant technical personnel. For example, the type of the database to be stored can be set to Oracle.

[0088] Step S12: storing the link network into the database to be stored according to the data storage format.

[0089] It can be seen from the disclosed contents of the above steps that in the embodiments of the present disclosure, the link network can be stored in different types of databases according to user needs, thereby meeting the storage needs of different users and, to a certain extent, increasing the scope of application of the method provided in the embodiments of the present disclosure.

[0090] In the embodiment of the present disclosure, after the link network is put into storage in the manner described above, the impact range of the target software can be evaluated according to the link network. The above steps specifically include:

[0091] Step S1053: obtaining a query request sent by the user through the query terminal, wherein the query request includes the modification code requested by the user;

[0092] Step S1054: In response to the query request, determining in the link network at least one target link corresponding to the modified code requested by the user.

[0093] In the disclosed embodiment, when a user wants to view the link corresponding to the target change code, he can send a query request to retrieve the link from the database through the operation interface of the terminal device. After obtaining the query request, in response to the query request, at least one target link corresponding to the change code requested by the user is determined in the link network.

[0094] Step S1055: displaying the at least one target link on the display interface of the query terminal according to a preset display mode, so that the user can evaluate the impact scope of the target software according to the at least one target link.

[0095] In the disclosed embodiment, after finding at least one target link corresponding to the modified code requested by the user, the target link can be displayed on the display interface of the terminal device according to a preset display mode. Afterwards, the user can evaluate the impact scope of the modified code requested by the user based on the target link called out on the display interface, thereby completing the evaluation of the target software update.

[0096] It should be noted that after each query request is obtained and successfully executed, a historical query record can be generated in the database. The user can click on any historical query record on the terminal device to call up the corresponding historical query results, and derive the priority of the impact after the code change based on the comparison results of the historical query records.

[0097] For example, the target modified code affects the method function about payment operation in the target software. The test cases corresponding to this method function are: test case 1 and test case 2. Test case 1 is to perform payment operation without payment, and test case 2 is to perform payment operation and pay. At this time, after the method function runs the above two test cases, two links are obtained, which respectively represent the links of the service nodes used by the method function during the execution process under the test conditions represented by test case 1 and test case 2. The user can query these two links on the terminal device. After the query, two historical query records will be generated. At this time, the two links can be compared in the historical query records to obtain the priority of the above target modified code. In addition, for the deleted code, the historical query records corresponding to the code and the calling relationship between the upstream and downstream service nodes are cleared synchronously.

[0098] It can be seen from the disclosed contents of the above steps that in the disclosed embodiment, by calling the link corresponding to the target code in the operation interface of the terminal device and evaluating the impact range of the target modified code according to the call result, it is helpful to analyze and evaluate the target link and its service nodes separately. At the same time, it is possible to compare at least one link corresponding to each method name according to the historical query record, so that the priority of the impact of the code change result can be more intuitively seen, and it is also possible to clear the historical query record and call relationship for the deleted code to avoid the invalid historical query record from interfering with the search for the target link.

[0099] In summary, in an embodiment of the present invention, by detecting the action of merging a personal development branch into the main branch of the program code corresponding to the software, the original program code of the software and the current program code are compared for difference to determine the changed code, and the number of affected code lines is located according to the changed code, thereby obtaining a collection of methods affected by the change, calling the methods in the collection to obtain the links for their operation, and after merging the repeated parts of the obtained links, outputting a link network that can accurately characterize the scope of the code change impact, and storing the link network in the library. Users can query the link network through terminal devices, and evaluate the target software for updates based on the query results, thereby solving the problem in the prior art that service nodes affected by code changes in the software cannot be accurately evaluated.

[0100] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0101] Based on the same inventive concept, the embodiments of the present disclosure also provide an evaluation device for software updates corresponding to the evaluation method for software updates. Since the principle of solving the problem by the device in the embodiments of the present disclosure is similar to the above-mentioned evaluation method for software updates in the embodiments of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0102] Embodiment 2

[0103] Reference Figure 3 , which is a schematic diagram of an evaluation for software update provided by an embodiment of the present disclosure, the device includes: a first determination module 31, a second determination module 32, and a construction module 33; wherein,

[0104] The first determination module 31 is used to determine at least one target modification code in the program code corresponding to the target software; and determine the target method name corresponding to each of the target modification codes to obtain at least one target method name;

[0105] A second determination module 32 is used to determine at least one link corresponding to each of the target method names, wherein each link in the at least one link is used to represent the execution process of the method function corresponding to the target method name under each test condition;

[0106] The construction module 33 is used to construct a link network based on at least one link corresponding to each target method name, so as to perform risk assessment on the target software according to the link network.

[0107] In the disclosed embodiments, at least one link corresponding to the method name corresponding to the modified code is aggregated to obtain a link network, which can more clearly show the scope of impact caused by the code change, thereby solving the problem in the prior art that the service nodes affected by the code change in the software cannot be accurately evaluated.

[0108] In one possible implementation, the second determination module is further used to: obtain at least one test case; run the at least one test case in turn through the method function corresponding to each method name to obtain at least one test result; for each of the test cases, determine the service node used to run the test case in each of the test results, and determine each link corresponding to each of the method names based on the determined service node.

[0109] In one possible implementation, the construction module is also used to: determine duplicate links in at least one link corresponding to all target method names; merge the duplicate links to obtain at least one link corresponding to all target method names after the merge; and construct the link network based on at least one link corresponding to all target method names after the merge.

[0110] In a possible implementation, the first determination module is further used to: determine the number of code lines corresponding to the target change code in the current program code of the target software; determine the target method name corresponding to the target change code based on a preset association relationship, wherein the preset association relationship is used to characterize the association relationship between the number of code lines and its corresponding method name.

[0111] In one possible implementation, the second determination module is further used to: detect a code merging action, wherein the code merging action is an action of merging a personal development branch into a main branch of the program code corresponding to the target software; after detecting the code merging action, performing a difference comparison between the original program code of the target software and the current program code of the target software to determine the target modified code.

[0112] In a possible implementation manner, the construction module is further used to: obtain a database to be stored, and determine a data storage format of the database to be stored; and store the link network in the database to be stored according to the data storage format.

[0113] In a possible implementation, the construction module is further used to: obtain a query request sent by a user through a query terminal, wherein the query request includes the change code requested by the user; in response to the query request, determine at least one target link corresponding to the change code requested by the user in the link network; and display the at least one target link on the display interface of the query terminal according to a preset display mode, so that the user can evaluate the impact range of the target software according to the at least one target link.

[0114] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0115] Embodiment 3

[0116] Corresponds to Figure 4 A method for evaluating software updates, the present disclosure also provides an electronic device 400, such as Figure 4 FIG. 4 is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present disclosure, including:

[0117] Processor 41, memory 42, and bus 43; memory 42 is used to store execution instructions, including internal memory 421 and external memory 422; the internal memory 421 is also called internal memory, which is used to temporarily store the operation data in the processor 41 and the data exchanged with the external memory 422 such as a hard disk. The processor 41 exchanges data with the external memory 422 through the internal memory 421. When the electronic device 400 is running, the processor 41 communicates with the memory 42 through the bus 43, so that the processor 41 executes the following instructions:

[0118] Determine at least one target modification code in the program code corresponding to the target software; and determine the target method name corresponding to each of the target modification codes to obtain at least one target method name; determine at least one link corresponding to each of the target method names, wherein each link in the at least one link is used to characterize the execution process of the method function corresponding to the target method name under corresponding test conditions; construct a link network based on the at least one link corresponding to each of the target method names to perform an impact range assessment on the target software according to the link network.

[0119] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the software update evaluation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0120] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the evaluation method for software updates described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.

[0121] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0122] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.

[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0124] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0125] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0126] 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 should be based on the protection scope of the claims.

Claims

1. A method for evaluating software updates, characterized in that: include: Determining at least one target modification code in a program code corresponding to the target software; and determining a target method name corresponding to each of the target modified codes to obtain at least one target method name; Get at least one test case; Calling the at least one target method name through a loop statement, and for each of the target method names, running the at least one test case through the method function corresponding to the target method name to obtain at least one test result; each of the target method names performs different operation processes when running different test cases; The test result includes a method function corresponding to the target method name, and a service node for executing the test case when each test case is run; For each of the target method names and each of the test cases, a service node for running the test case is determined in each of the test results, and each link corresponding to each of the method names is determined according to the determined service nodes and the service order of the service nodes, wherein each of the links is used to represent the execution process of the method function corresponding to the target method name under the corresponding test conditions; A link network is constructed based on at least one link corresponding to each target method name, so as to evaluate the impact range of the target software according to the link network.

2. The method according to claim 1, characterized in that The step of building a link network based on at least one link corresponding to each target method name includes: Determine a duplicate link in at least one link corresponding to all target method names; and merge the duplicate links to obtain at least one link corresponding to all target method names after merging; The link network is constructed according to at least one link corresponding to all the target method names after the merging process.

3. The method according to claim 1, characterized in that The determining of the target method name corresponding to each target modified code includes: Determining the number of code lines corresponding to the target modified code in the current program code of the target software; The target method name corresponding to the target modified code is determined according to a preset association relationship, wherein the preset association relationship is used to represent the association relationship between the number of code lines and the corresponding method name.

4. The method according to claim 1, characterized in that: The step of determining at least one target modification code in the program code corresponding to the target software includes: Detecting a code merging action, wherein the code merging action is an action of merging a personal development branch into a main branch of a program code corresponding to the target software; After the code merging action is detected, the original program code of the target software and the current program code of the target software are compared for differences to determine the target modified code.

5. The method according to claim 1, characterized in that The method further comprises: Acquire a database to be stored, and determine a data storage format of the database to be stored; The link network is stored in the database to be stored according to the data storage format.

6. The method according to claim 1, characterized in that The evaluating the impact range of the target software according to the link network includes: Acquire a query request sent by a user through a query terminal, wherein the query request includes a modification code requested by the user; In response to the query request, determining in the link network at least one target link corresponding to the modified code requested by the user; According to a preset display mode, the at least one target link is displayed on the display interface of the query terminal, so that the user can evaluate the impact range of the target software according to the at least one target link.

7. A software update evaluation device, characterized in that: include: A first determination module, used to determine at least one target modification code in a program code corresponding to the target software; and determining a target method name corresponding to each of the target modified codes to obtain at least one target method name; A second determination module is used to obtain at least one test case; Calling the at least one target method name through a loop statement, and for each of the target method names, running the at least one test case through the method function corresponding to the target method name to obtain at least one test result; each of the target method names performs different operation processes when running different test cases; The test result includes a method function corresponding to the target method name, and a service node for executing the test case when each test case is run; For each of the target method names and each of the test cases, a service node for running the test case is determined in each of the test results, and each link corresponding to each of the method names is determined according to the determined service nodes and the service order of the service nodes, wherein each of the links is used to represent the execution process of the method function corresponding to the target method name under each test condition; A construction module is used to construct a link network based on at least one link corresponding to each target method name, so as to perform risk assessment on the target software according to the link network.

8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for evaluating software updates as described in any one of claims 1 to 6 are performed.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for evaluating software updates as claimed in any one of claims 1 to 6.