Information processing method and apparatus, electronic device, and computer-readable storage medium

By acquiring software version information and dividing functional modules, and utilizing clustering and association distance analysis, the problem of software analysis consuming a large amount of manpower and time was solved, enabling efficient software improvement and maintenance.

CN114510404BActive Publication Date: 2026-03-24HARBIN ANTIY TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the process of software development and maintenance, existing technologies consume a lot of manpower and time in analyzing software functions, resulting in low efficiency in software improvement.

Method used

By obtaining version information of multiple versions of the target object, the target function for changes between versions is determined, and the target object is divided into multiple target functional modules based on these functions. Clustering and association distance analysis are used to identify closely related modules and generate alarm information to reflect unsafe conditions.

Benefits of technology

It automates software analysis, saves time and manpower costs, improves the efficiency of software improvement and maintenance, and obtains more accurate and reliable evaluation and analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510404B_ABST
    Figure CN114510404B_ABST
Patent Text Reader

Abstract

The application provides an information processing method and device, an electronic device and a computer readable storage medium. The method comprises the following steps: obtaining version information of multiple versions of a target object; for each version except a first version in the multiple versions, determining a target function changed in the target object from a previous adjacent version to the version based on the version information of the version and the version information of the previous adjacent version; and dividing the target object into multiple target function modules based on all target functions of the multiple versions. The technical scheme of the application realizes automation of target object evaluation analysis, saves a large amount of time cost and labor cost, can obtain more accurate and reliable target object evaluation analysis results, and improves development and maintenance efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer software, and particularly relates to an information processing method and device, an electronic device and a computer readable storage medium. BACKGROUND

[0002] At present, software needs to be improved in the process of software development and maintenance. Generally, developers can manually analyze the functions of each part of the software and / or possible defects based on underlying information such as software code. However, this analysis method consumes a large amount of manpower and time cost, resulting in low software improvement efficiency.

[0003] Therefore, how to conveniently and efficiently analyze software functions to improve the efficiency of software improvement has become a technical problem to be solved. SUMMARY

[0004] Embodiments of the present application provide an information processing method and device, an electronic device and a computer readable storage medium, aiming at solving the technical problem of low software improvement efficiency caused by the process of analyzing software functions consuming a large amount of manpower and time cost in the related art.

[0005] In a first aspect, the embodiments of the present application provide an information processing method, comprising: obtaining version information of multiple versions of a target object; for each version except a first version in the multiple versions, determining a target function changed in the target object from a previous adjacent version to the version based on the version information of the version and the version information of the previous adjacent version; and dividing the target object into multiple target function modules based on all target functions of the multiple versions.

[0006] In the above embodiments of the present application, optionally, the step of dividing the target object into multiple target function modules based on all target functions of the multiple versions comprises: clustering all target functions of the multiple versions based on function attributes of each target function to obtain multiple initial function modules; and selecting a target function module with a clustering parameter value greater than a preset clustering threshold value from the multiple initial function modules.

[0007] In the above embodiments of the present application, optionally, the method further comprises: for each of two target function modules in all target function modules, calculating an association distance of the two target function modules based on respective clustering parameter values of the two target function modules; and if the association distance is less than a specified safety distance threshold value, generating alarm information for the two target function modules, the alarm information being used to reflect that the two target function modules are in an unsafe state of excessively close association.

[0008] In the above embodiments of this application, optionally, the version information of each version includes one or more of the following: version identifier of each version, version identifier of the preceding adjacent version of each version, version submitter identifier, version submission date, version submission time, version submission type, set of modification content of each version relative to its preceding adjacent version, and set of file renaming information.

[0009] In the above embodiments of this application, optionally, obtaining version information of multiple versions of the target object includes: obtaining a version information configuration template from the code version management system of the target object; generating a command sequence for obtaining the version information based on the version information configuration template; and executing the command sequence to obtain version information of each version of the target object.

[0010] In the above embodiments of this application, optionally, before executing the command sequence, the method further includes: obtaining a valid access path for the target object for access when executing the command sequence; performing deduplication processing on the version submitter identifier based on a preset version submitter identifier association relationship; and deleting specified files and / or specified directories from the set of modified content.

[0011] In the above embodiments of this application, optionally, obtaining version information of multiple versions of the target object includes: obtaining local version data or remote version data of each version of the target object; and parsing the version information of each version from the local version data or remote version data of each version.

[0012] In the above embodiments of this application, optionally, determining the target function that has changed in the target object when changing from the previous adjacent version to the current version based on the version information of the current version and the version information of the previous adjacent version includes: obtaining a target file within the current version that has changed relative to the previous adjacent version based on the version information of the current version and the version information of the previous adjacent version; if the code format of the target file is a recognizable code format, performing syntax tree analysis on the target file, and determining the function in the analysis result as the target function that has changed in the target object when changing from the previous adjacent version to the current version; if the code format of the target file is an unrecognizable code format, determining the target file as the target function.

[0013] Secondly, embodiments of this application provide an information processing apparatus, including: a version information acquisition unit, configured to acquire version information of multiple versions of a target object; a target function determination unit, configured to, for each version other than the first version among the multiple versions, determine, based on the version information of the version and the version information of the preceding adjacent version, the target function that changes in the target object when it changes from the preceding adjacent version to the version; and a functional module division unit, configured to divide the target object into multiple target functional modules based on all the target functions of the multiple versions.

[0014] In the above embodiments of this application, optionally, the functional module partitioning unit is used to: cluster all target functions of the multiple versions based on the function attributes of each target function to obtain multiple initial functional modules; and select a target functional module whose clustering parameter value is greater than a preset clustering threshold from the multiple initial functional modules.

[0015] Optionally, in the above embodiments of this application, it further includes: an association distance detection unit, configured to calculate the association distance between two target functional modules for every two target functional modules in all the target functional modules, based on the clustering parameter values ​​of the two target functional modules respectively; and an alarm unit, configured to generate alarm information for the two target functional modules if the association distance is less than a specified safe distance threshold, the alarm information being used to reflect that the two target functional modules are in an unsafe state of excessive association.

[0016] In the above embodiments of this application, optionally, the version information of each version includes one or more of the following: version identifier of each version, version identifier of the preceding adjacent version of each version, version submitter identifier, version submission date, version submission time, version submission type, set of modification content of each version relative to its preceding adjacent version, and set of file renaming information.

[0017] In the above embodiments of this application, optionally, the version information acquisition unit is configured to: acquire a version information configuration template from the code version management system of the target object; generate a command sequence for acquiring the version information based on the version information configuration template; and execute the command sequence to obtain version information for each version of the target object.

[0018] Optionally, in the above embodiments of this application, it further includes: a pre-configuration unit, configured to obtain a valid access path of the target object before executing the command sequence, for access during the execution of the command sequence; and to perform deduplication processing on the version submitter identifier based on a preset version submitter identifier association relationship; and to delete specified files and / or specified directories in the modified content set.

[0019] In the above embodiments of this application, optionally, the version information acquisition unit is used to: acquire local version data or remote version data of each version of the target object; and parse the version information of each version from the local version data or remote version data of each version.

[0020] In the above embodiments of this application, optionally, the target function determination unit is configured to: obtain target files within the version that have undergone changes relative to the previous adjacent version based on the version information of the version and the version information of the previous adjacent version; if the code format of the target file is a recognizable code format, perform syntax tree analysis on the target file, and determine the function in the analysis result as the target function that has changed in the target object when it changed from the previous adjacent version to the version; if the code format of the target file is an unrecognizable code format, determine the target file as the target function.

[0021] Thirdly, embodiments of this application provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the method described in any one of the first aspects above.

[0022] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for performing the method flow described in any one of the first aspects above.

[0023] The above technical solution addresses the problem of low software improvement efficiency caused by the high manpower and time costs associated with analyzing software functions. It divides the target object (software or system) into multiple functional modules based on modifications across different versions, and selects the modules that effectively impact the application level of the target object for evaluation and analysis. Compared to manual evaluation and analysis, this automates the evaluation and analysis of the target object, saving significant time and manpower costs, and yields more accurate and reliable results. This facilitates the maintenance and improvement of the target object, enhancing development and maintenance efficiency. [Attached Image Description]

[0024] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 A flowchart of an information processing method according to an embodiment of this application is shown;

[0026] Figure 2 A flowchart of an information processing method according to another embodiment of this application is shown;

[0027] Figure 3 A block diagram of an information processing apparatus according to an embodiment of this application is shown;

[0028] Figure 4 A block diagram of an information processing apparatus according to another embodiment of this application is shown;

[0029] Figure 5 A block diagram of an electronic device according to an embodiment of this application is shown.

Detailed Implementation Methods

[0030] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0031] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0032] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0033] Figure 1 A flowchart of an information processing method according to an embodiment of this application is shown.

[0034] like Figure 1 As shown, an information processing method according to an embodiment of this application includes:

[0035] Step 102: Obtain version information for multiple versions of the target object.

[0036] The target object includes, but is not limited to, the software or system to be analyzed, and can also be any other object that integrates multiple functions and is implemented in code.

[0037] To adapt to real-world application scenarios, developers often update target objects such as software or systems. The original target object can be called the original version, and each updated target object becomes a new version. For any version of the target object, the difference between that version and its preceding adjacent version is the content of the changes relative to the preceding adjacent version. Based on this, the changes between versions can reflect the functional changes of the target object itself to a certain extent. These functional changes are a necessary part of the functional analysis of the target object, effectively reflecting the areas where improvements are needed.

[0038] In other words, the differences between multiple versions of a target object can be effectively used in the analysis of the target object and serve as a valuable basis for software improvement. These differences are precisely reflected in the version information of each version.

[0039] Specifically, the version information for each version includes one or more of the following: the version identifier of each version, the version identifier of the preceding adjacent version of each version, the version committer identifier, the version commit date, the version commit time, the version commit type, the set of modifications relative to the preceding adjacent version of each version, and the set of file renaming information.

[0040] Version commit types include branch merge commits, normal commits, tag commits, and empty commits with no substantial changes; the set of changes in each version relative to its preceding adjacent version includes newly added files, newly added file paths, modified files, modified file paths, deleted files, and deleted file paths.

[0041] In one possible design, step 102 specifically includes: obtaining a version information configuration template from the code version management system of the target object; generating a command sequence for obtaining the version information based on the version information configuration template; and executing the command sequence to obtain version information for each version of the target object.

[0042] The target object's code version control system is used to manage version updates and store related data. To ensure complete and structurally consistent version information, a version information configuration template applicable to the target object can be set within the code version control system. This template defines the various version information types required for functional analysis of the target object, allowing for comprehensive acquisition of version information corresponding to each type. Furthermore, the template can define the data structure for each version information type, ensuring a consistent data structure after retrieving the version information for each type, providing a unified and reasonable foundation for subsequent applications of version information.

[0043] Next, based on the data structure defined by the version information configuration template, a command sequence for obtaining the version information can be generated. This command sequence matches the data structure defined by the version information configuration template. By executing the commands within the command sequence sequentially, the version information corresponding to various version information types of the target object can be obtained according to the defined data structure.

[0044] In another possible design, prior to executing the command sequence, the method further includes obtaining a valid access path for the target object, which can be accessed during the execution of the command sequence.

[0045] Specifically, the valid access path of the target object can be a local path or an HTTP(S) access path of a remote repository. By accessing the valid access path when executing the command sequence, the operations required by the commands in the command sequence to be performed on the target object can be effectively executed.

[0046] In one possible design, the first command in the command sequence can be set as the valid access path identification command, and a Uniform Resource Identifier (URI) can be set for the version information configuration template to describe the valid access path of the target object. In this way, when the first command identifies the URI corresponding to the target object, it can call the version information configuration template corresponding to the URI to obtain and configure version information with a unified data structure.

[0047] In another possible design, step 102 specifically includes: obtaining local version data or remote version data for each version of the target object; and parsing the version information of each version from the local version data or remote version data of each version.

[0048] Version information for each version of a target object is often stored either locally or on a remote device, such as a version control system (SVN). Therefore, the local or remote version data for each version of the target object can be obtained, and the corresponding version information can be derived from this data.

[0049] The above methods allow for the selection of appropriate approaches to obtain version information for multiple versions of the target object, enabling its use in subsequent target object analysis steps and laying a solid foundation for efficient and reliable target object analysis.

[0050] In one possible design, the method further includes: deduplicating the version submitter identifiers based on a preset version submitter identifier association relationship.

[0051] Developers within the same group or during the same version development process may use different committer identifiers when submitting versions. In other words, different committer identifiers may correspond to changes made in the same version. Therefore, committer identifier relationships can be pre-defined to identify which different committer identifiers originate from the same source. Then, committer identifiers from the same source can be merged or replaced to achieve deduplication, thereby simplifying the data complexity caused by arbitrarily naming committer identifiers. This facilitates efficient organization of version information and analysis of target objects based on version information.

[0052] In one possible design, it also includes: deleting specified files and / or specified directories from the set of modifications.

[0053] In version changes, some automatically generated or automatically synchronized invalid content is often produced in specified files and / or specified directories. This content is of no use to the analysis of the target object. Therefore, in order to reduce data redundancy, the specified files and / or specified directories can be directly deleted from the set of modified content, and the modifications involved in the specified files and / or specified directories are not passed on to the future.

[0054] Step 104: For each version other than the first version among the plurality of versions, based on the version information of the version and the version information of the preceding adjacent version of the version, determine the target function that changes in the target object when changing from the preceding adjacent version to the version.

[0055] Since the version information of the version and the version information of the preceding adjacent version can reflect the differences between the two versions, this difference includes at least the set of modifications of the version relative to the preceding adjacent version. In other words, based on this set of modifications, it is possible to determine the content that changes in the target object when changing from the preceding adjacent version to the version, and this content includes the target function that changes during the change.

[0056] Specifically, based on the version information of the stated version and the version information of the preceding adjacent version, target files that have undergone changes relative to the preceding adjacent version within the stated version can be obtained; if the code format of the target file is a recognizable code format, a syntax tree analysis is performed on the target file, and the functions in the analysis results are identified as the target functions that have changed in the target object when the version was changed from the preceding adjacent version to the stated version; if the code format of the target file is an unrecognizable code format, the target file is identified as the target function.

[0057] The target function that changes during the version update of the target object must be located in the target file involved in the version update. Therefore, the target file that has changed relative to the previous adjacent version can be obtained first as the object to search for the target function.

[0058] Next, the code format of the target file can be identified through a predetermined method, which includes, but is not limited to, identification using the file extension of the target file, identification using keywords within the target file, or identification using open-source tools such as libmagic.

[0059] If the target file's code format is a recognizable code format, meaning that the target file's code format can be identified through a predetermined method, it indicates that the target file's structure is of a type existing in a known structure, and that the target file contains target functions of a known type. In this case, syntax tree analysis can be performed on the target file, and the functions in the analysis results can be identified as the target functions that changed in the target object when it was changed from the previous adjacent version to the current version.

[0060] A syntax tree is a tree-like representation of the abstract syntactic structure of source code. Each node in the tree represents a structure in the source code. By analyzing the syntax tree, this structure can be obtained and the target function involved at each node or node can be obtained from it.

[0061] Conversely, if the code format of the target file is an unrecognizable code format, that is, the code format of the target file cannot be recognized by a predetermined method, it indicates that the structure of the target file is not a type that exists in the known structure, and the type of the target function involved in the target file cannot be clearly determined. In this case, the target file can be directly identified as the target function, so as to fully grasp the content involved in the target function and avoid missing information that has an effective impact on the analysis of the target object.

[0062] The specific process of syntax tree analysis includes: processing the target file using a lexical analyzer and a syntax analyzer to obtain its single-rooted tree-structured syntax tree. The syntax tree can be divided into classes, named methods, and statements, with the smallest unit being the statement. Statements belong to named methods, which are the target functions and can belong directly to the root or to a class. Furthermore, if statements that are not functions are ignored, named methods can be located down to a range of line numbers.

[0063] Specifically, for object files of types such as C and C++, their syntax trees can be obtained using open-source tools such as LLVM and GCC; for object files of types such as Python, their syntax trees can be obtained using open-source tools such as CPython; for object files of types such as Golang, their syntax trees can be obtained using the Go open-source compiler; and for object files of types such as Java, their syntax trees can be obtained using open-source tools such as javac.

[0064] Step 106: Based on all the target functions of the multiple versions, divide the target object into multiple target functional modules.

[0065] Since the changes between versions can reflect the functional changes of the target object to a certain extent, and the functional changes of the target object are a necessary part of the functional analysis of the target object, they can effectively reflect the areas that need improvement. Therefore, the objective function that changes during version changes can reflect the distribution of various functions involved in the modification of the target object to a certain extent.

[0066] In other words, all the changed objective functions of the target object can reflect the functional implementation and updates of the target object, and thus reflect the specific interrelated functions of the target object. Therefore, based on all the objective functions of multiple versions of the target object, the target object can be divided into multiple target functional modules, each with a corresponding target function. This is equivalent to integrating the various functions of the target object into corresponding modules, which helps to conveniently and efficiently analyze the target object based on its various functions and reasonably evaluate the use and development of the target object.

[0067] Specifically, based on the function attributes of each objective function, all objective functions of the multiple versions can be clustered to obtain multiple initial functional modules; among the multiple initial functional modules, the target functional module with a clustering parameter value greater than a preset clustering threshold is selected.

[0068] In other words, based on the function attributes of all target functions involved in multiple version changes of the target object, the target object is divided into multiple initial functional modules through clustering. These initial functional modules are an integration of the various functions of the target object. However, since the target object has diverse functions, not all functions are crucial for its actual use. In other words, when analyzing and evaluating the target object, only the functions that effectively contribute to its application level are needed. Therefore, the multiple initial functional modules can be further filtered.

[0069] Specifically, a preset clustering threshold can be set. This threshold represents the clustering parameter value at which the functionality of a target object is insufficient to affect its application level. Therefore, if the clustering parameter value of an initial functional module is greater than the preset threshold, it indicates that it can effectively influence the application level of the target object and can be used as a target functional module for evaluating and analyzing the target object.

[0070] Using the above technical solutions, a target object can be divided into multiple functional modules based on modifications made to software or systems across multiple versions. These modules can then be selected to effectively impact the application level of the target object for evaluation and analysis. Compared to manual evaluation and analysis, this automates the evaluation and analysis of the target object, saving significant time and manpower costs. Furthermore, it yields more accurate and reliable evaluation and analysis results, facilitating the maintenance and improvement of the target object and enhancing development and maintenance efficiency.

[0071] exist Figure 1 Based on the illustrated embodiments, Figure 2 A flowchart of an information processing method according to another embodiment of this application is shown.

[0072] like Figure 2 As shown, another embodiment of the information processing method according to this application includes:

[0073] Step 202: Obtain the target function that has changed in the version update of the target object.

[0074] After obtaining version information for multiple versions of the target object, for each version other than the first version, based on the version information of that version and the version information of its preceding adjacent version, the target function that changes in the target object when it changes from the preceding adjacent version to that version is determined. The specific method for obtaining the target function is similar to... Figure 1 The methods shown in the embodiments are the same and will not be repeated here.

[0075] Step 204: Based on the function attributes of each objective function in multiple dimensions, cluster all objective functions used in the multiple versions to obtain multiple initial functional modules.

[0076] Based on the function attributes of all target functions involved in multiple version changes of the target object, the target object is divided into multiple initial functional modules through clustering. These initial functional modules integrate the various functions of the target object. However, since the target object has diverse functions, not all functions are crucial for its actual use. In other words, when analyzing and evaluating the target object, only the functions that effectively contribute to its application level are needed. Therefore, the multiple initial functional modules can be further filtered.

[0077] In this regard, prior to step 202, the method further includes: obtaining the function attributes of each objective function in multiple dimensions.

[0078] The function attributes of each objective function across the multiple dimensions include at least two of the following: the relative position parameters of the target file containing the current objective function and the other files containing the other objective functions; the difference between the number of traversals from the project root to the target file and the minimum number of traversals from the target file to the other files; the filename similarity between the target file and the other files; the file directory similarity between the target file and the other files; the difference between the starting line number of the current objective function and the starting line number of the other objective functions; and the modification correlation between the current objective function and the other objective functions.

[0079] First, the target file containing the current objective function indicates the storage path of the current objective function, while the other files containing other objective functions indicate the storage paths of those other objective functions. The relative position parameters of the two reflect the difference in their storage locations. Because of their different functions, they are stored in the locations required for the smooth execution of their functions. Therefore, this difference in storage location can reflect the differences and correlations in their functions to a certain extent.

[0080] In one possible design, the relative position parameter is obtained by: if the target file and the other files are the same file, setting the relative position parameter to a first value; otherwise, setting the relative position parameter to a second value, wherein the first value is greater than the second value.

[0081] In one possible design, the first value is greater than the second value, indicating that the functional difference and correlation between the current objective function and other objective functions in the same file are greater than the functional difference and correlation between the current objective function and other objective functions in different files.

[0082] Second, the number of traversals from the project root to the target file represents the minimum number of changes required to move the storage location of the target function from the project root to the current storage location (i.e., the target file). Similarly, the minimum number of traversals from the target file to other files represents the minimum number of changes required to move the storage location of the target function from other files containing other target functions to the current storage location (i.e., the target file). In other words, the difference between the two—the maximum possible number of traversals for the current target function and the number of traversals for moving to other files containing other target functions—can, to some extent, reflect the functional differences and relevance between the current target function and other target functions in other files.

[0083] Third, the filename similarity between the target file and the other files is represented by converting the degree of similarity between the filenames of the target file and the other files into a numerical value. Specifically, the method for obtaining the filename similarity includes: calculating a first modification distance between the filename of the target file and the filenames of the other files based on a preset edit distance algorithm, and setting the first modification distance as the filename similarity.

[0084] The distance-based editing algorithm refers to the minimum number of editing operations required to transform one object into another between two objects. In this technical solution, the two objects are the filename of the target file and the filenames of the other files, respectively. The filename similarity represents the number of changes required to transform the filename of the target file into the filename of the other files. The magnitude of this number of changes is proportional to the functional relevance of the current target function to other files.

[0085] Fourth, the file directory similarity between the target file and the other files is represented by converting the similarity between the target file and the file directories (i.e., storage paths) of the respective files into numerical values. Specifically, the method for obtaining the file directory similarity includes: calculating a second modification distance between the file directory of the target file and the file directories of the other files based on a preset edit distance algorithm, and setting the second modification distance as the file directory similarity.

[0086] The distance-editing algorithm refers to the minimum number of editing operations required to transform one object into another between two objects. In this technical solution, the two objects are the file directory of the target file and the file directories of the other files, respectively. The file directory similarity represents the number of changes required to transform the file directory of the target file into the file directory of the other files. The magnitude of this number of changes is proportional to the functional relevance of the current target function to other files.

[0087] Fifth, the target object is implemented in code. The current target function often occupies multiple lines of description. Therefore, each line of code can be numbered to obtain the starting line numbers of the current target function and other target functions. The starting line numbers of both reflect their starting positions, in other words, they also indicate their storage locations. Therefore, the difference between the starting line number of the current target function and the starting line numbers of the other target functions can, to some extent, reflect the functional differences and correlations between the current target function and the other target functions.

[0088] Sixth, the modification correlation between the current objective function and the other objective functions can be obtained. This modification correlation is visualized as a certain value in each modification across multiple versions, indicating whether the current objective function is modified simultaneously with other objective functions. It should be noted that the higher the modification correlation between the current objective function and the other objective functions, the more times they change simultaneously in a single update, and the closer their functional relationship.

[0089] Specifically, the method for obtaining the modified correlation degree includes: obtaining the initial correlation degree of the current objective function; polling whether the current objective function changes with each of the other objective functions in each version change, wherein whenever the current objective function changes with any of the other objective functions, a third value is added to the initial correlation degree of the current objective function to obtain the modified correlation degree; otherwise, a fourth value is subtracted from the initial correlation degree of the current objective function to obtain the modified correlation degree.

[0090] In one possible design, the initial correlation degree of the current objective function can be set to 0.

[0091] The algorithm iterates through each version update to check if the current objective function changes with every other objective function. If it changes with every other objective function in a single version update, it indicates a high probability that the current objective function is functionally related to other objective functions in that single version update. Therefore, for that other objective function, a third value is added to the initial correlation score of the current objective function. Conversely, if it does not change with any other objective function in a single version update, it indicates a low probability that the current objective function is functionally related to other objective functions in that single version update. Therefore, for that other objective function, a fourth value is deducted from the initial correlation score of the current objective function.

[0092] It should be added that the other objective functions in the context include one or more. When there are multiple other objective functions, for each other objective function, it is necessary to perform... Figure 2 The operations shown in the examples are used to obtain valid data as the basis for clustering.

[0093] After obtaining the functional attributes of each objective function across multiple dimensions, clustering can be performed by specifying a clustering method. This specified clustering method includes, but is not limited to, the shortest distance algorithm, DBSCAN algorithm, BIRCH algorithm, and K-Means algorithm.

[0094] Step 206: Select the target functional module whose clustering parameter value is greater than the preset clustering threshold from the plurality of initial functional modules.

[0095] The initial functional modules integrate the various functions of the target object. However, since the target object has diverse functions, not all functions are crucial for its actual use. In other words, when analyzing and evaluating the target object, only the functions that effectively contribute to its application level are needed. Therefore, the initial functional modules can be further filtered.

[0096] Specifically, a preset clustering threshold can be set. This threshold represents the clustering parameter value at which the functionality of a target object is insufficient to affect its application level. Therefore, if the clustering parameter value of an initial functional module is greater than the preset threshold, it indicates that it can effectively influence the application level of the target object and can be used as a target functional module for evaluating and analyzing the target object.

[0097] Step 208: Based on the modification association between every two target functional modules in all the target functional modules, adjust the clustering parameter value of each target functional module. For every two target functional modules, the difference between the adjusted clustering parameter values ​​is used to reflect the degree of association between them.

[0098] Furthermore, the clustering parameter values ​​of each target functional module can be further adjusted to more accurately reflect the correlation between them, thereby improving the accuracy of evaluation and analysis of the target object. For any two target functional modules, the difference between their adjusted clustering parameter values ​​reflects the degree of correlation between them. The larger the difference, the lower the correlation between the two target functional modules, and the lower the probability of a failure in the correlation. Conversely, if the difference is small, the higher the correlation between the two target functional modules, and the greater the coupling between them. If one of them has a problem or failure, it is very likely that the other target functional module will also have a problem or failure. Therefore, two target functional modules with excessively low differences in their adjusted clustering parameter values ​​need to be rectified.

[0099] The above technical solution can cluster data based on modifications made to a target object such as software or a system across multiple versions, thereby dividing the target object into multiple functional modules. It also effectively adjusts the clustering parameters of each functional module to accurately represent the relationships between them. Compared to manual evaluation and analysis, this automates the evaluation and analysis of the target object, saving significant time and manpower costs. Furthermore, it accurately and reliably evaluates each functional module of the target object through these relationships, providing reliable evaluation results for subsequent analysis and testing steps. This facilitates the maintenance and improvement of the target object and enhances development and maintenance efficiency.

[0100] It should be added that the specific method of adjusting the clustering parameter value of each target functional module in step 208 includes: when the target object changes from the previous adjacent version of each version to each version, if at least two target functional modules among all the target functional modules change at the same time, the clustering parameter value of the at least two target functional modules is increased by a fifth value, and the clustering parameter value of other functional modules other than the at least two target functional modules among all the target functional modules is decreased by a sixth value.

[0101] In other words, in each version update, if both target functional modules change simultaneously, it indicates a strong functional correlation between them, and the clustering parameter value for both is increased by a fifth value. Then, the clustering parameter values ​​for all other target functional modules are decreased by a sixth value. This widens the gap between the clustering parameter values ​​of the two modules and those of the other target functional modules, allowing their clustering parameter values ​​to further reflect their correlation. This adjustment of clustering parameter values ​​can be implemented for every two target functional modules in each version update.

[0102] It should be noted that the first, second, third, fourth, fifth, and sixth values ​​in the context can all be set based on the actual software evaluation requirements and functional relevance level, and no specific restrictions are imposed here.

[0103] Figure 3 A block diagram of an information processing apparatus according to an embodiment of this application is shown.

[0104] like Figure 3 As shown, an information processing apparatus 300 according to an embodiment of this application includes: a version information acquisition unit 302, configured to acquire version information of multiple versions of a target object; a target function determination unit 304, configured to, for each version other than the first version among the multiple versions, determine, based on the version information of the version and the version information of the preceding adjacent version, the target function that changes in the target object when it changes from the preceding adjacent version to the version; and a functional module division unit 306, configured to divide the target object into multiple target functional modules based on all the target functions of the multiple versions.

[0105] In the above embodiments of this application, optionally, the functional module division unit 306 is used to: cluster all target functions of the plurality of versions based on the function attributes of each target function to obtain a plurality of initial functional modules; and select a target functional module whose clustering parameter value is greater than a preset clustering threshold from the plurality of initial functional modules.

[0106] Optionally, in the above embodiments of this application, it further includes: an association distance detection unit, configured to calculate the association distance between two target functional modules for every two target functional modules in all the target functional modules, based on the clustering parameter values ​​of the two target functional modules respectively; and an alarm unit, configured to generate alarm information for the two target functional modules if the association distance is less than a specified safe distance threshold, the alarm information being used to reflect that the two target functional modules are in an unsafe state of excessive association.

[0107] In the above embodiments of this application, optionally, the version information of each version includes one or more of the following: version identifier of each version, version identifier of the preceding adjacent version of each version, version submitter identifier, version submission date, version submission time, version submission type, set of modification content of each version relative to its preceding adjacent version, and set of file renaming information.

[0108] In the above embodiments of this application, optionally, the version information acquisition unit 302 is configured to: acquire a version information configuration template from the code version management system of the target object; generate a command sequence for acquiring the version information based on the version information configuration template; and execute the command sequence to obtain version information for each version of the target object.

[0109] Optionally, in the above embodiments of this application, it further includes: a pre-configuration unit, configured to obtain a valid access path of the target object before executing the command sequence, for access during the execution of the command sequence; and to perform deduplication processing on the version submitter identifier based on a preset version submitter identifier association relationship; and to delete specified files and / or specified directories in the modified content set.

[0110] In the above embodiments of this application, optionally, the version information acquisition unit 302 is used to: acquire local version data or remote version data of each version of the target object; and parse the version information of each version from the local version data or remote version data of each version.

[0111] In the above embodiments of this application, optionally, the target function determination unit 304 is configured to: obtain target files that have changed relative to the previous adjacent version within the version based on the version information of the version and the version information of the previous adjacent version; if the code format of the target file is a recognizable code format, perform syntax tree analysis on the target file, and determine the function in the analysis result as the target function that changed in the target object when it changed from the previous adjacent version to the version; if the code format of the target file is an unrecognizable code format, determine the target file as the target function.

[0112] The information processing device 300 uses the solution described in any one of the above embodiments, and therefore has all the above-mentioned technical effects, which will not be repeated here.

[0113] Figure 4 A block diagram of an information processing apparatus according to another embodiment of this application is shown.

[0114] like Figure 4 As shown, an information processing apparatus 400 according to another embodiment of this application includes: a target function acquisition unit 402, configured to acquire target functions that have changed in version updates of a target object; a functional module partitioning unit 404, configured to cluster all target functions used in the multiple versions based on the function attributes of each target function in multiple dimensions to obtain multiple initial functional modules; a functional module filtering unit 406, configured to select target functional modules whose clustering parameter values ​​are greater than a preset clustering threshold from the multiple initial functional modules; and a clustering parameter value adjustment unit 408, configured to adjust the clustering parameter value of each target functional module based on the modification correlation between every two target functional modules, wherein, for every two target functional modules, the difference between their adjusted clustering parameter values ​​is used to reflect the degree of correlation between them.

[0115] In the above embodiments of this application, optionally, the target function acquisition unit 402 is configured to: for each version other than the first version among multiple versions of the target object, based on the version information of the version and the version information of the preceding adjacent version of the version, acquire the target file that has changed relative to the preceding adjacent version within the version; if the code format of the target file is a recognizable code format, perform syntax tree analysis on the target file, and determine the function in the analysis result as the target function that changed in the target object when it changed from the preceding adjacent version to the version; if the code format of the target file is an unrecognizable code format, determine the target file as the target function.

[0116] Optionally, in the above embodiments of this application, it further includes: a function attribute acquisition unit, configured to acquire function attributes of each target function in multiple dimensions before the functional module division unit 404 clusters all target functions used in the multiple versions to obtain multiple initial functional modules. The function attributes of each target function in the multiple dimensions include at least two of the following: the relative position parameters of the target file containing the current target function and other target functions in other files; the difference between the number of traversals from the project root to the target file and the minimum number of traversals from the target file to the other file; the filename similarity between the target file and the other files; the file directory similarity between the target file and the other files; the difference between the starting line number of the current target function and the starting line number of the other target functions; and the modification correlation between the current target function and the other target functions.

[0117] In the above embodiments of this application, optionally, the function attribute acquisition unit is used to: if the target file and the other files are the same file, set the relative position parameter to a first value; otherwise, set the relative position parameter to a second value, wherein the first value is greater than the second value.

[0118] In the above embodiments of this application, optionally, the function attribute acquisition unit is used to: calculate a first modification distance between the file name of the target file and the file names of other files based on a preset edit distance algorithm, and set the first modification distance as the file name similarity; the function attribute acquisition unit is also used to: calculate a second modification distance between the file directory of the target file and the file directory of other files based on a preset edit distance algorithm, and set the second modification distance as the file directory similarity.

[0119] In the above embodiments of this application, optionally, the function attribute acquisition unit is used to: acquire the initial correlation degree of the current target function; poll whether the current target function has changed with each of the other target functions in each version change, wherein whenever the current target function has changed with any of the other target functions, the initial correlation degree of the current target function is increased by a third value to obtain the modified correlation degree; otherwise, the initial correlation degree of the current target function is decreased by a fourth value to obtain the modified correlation degree.

[0120] In the above embodiments of this application, optionally, the clustering parameter value adjustment unit 408 is used to: when the target object changes from the previous adjacent version of each version to each version, if at least two target functional modules among all the target functional modules change at the same time, increase the clustering parameter value of the at least two target functional modules by a fifth value, and decrease the clustering parameter value of other functional modules other than the at least two target functional modules among all the target functional modules by a sixth value.

[0121] The information processing device 400 uses the solution described in any one of the above embodiments, and therefore has all the above-described technical effects, which will not be repeated here.

[0122] Figure 5 A block diagram of an electronic device according to an embodiment of this application is shown.

[0123] like Figure 5 As shown, an electronic device 500 according to one embodiment of this application includes at least one memory 502; and a processor 504 communicatively connected to the at least one memory 502; wherein the memory stores instructions executable by the at least one processor 504, the instructions being configured to execute the scheme described in any of the above embodiments. Therefore, this electronic device 500 has the same technical effects as any of the above embodiments, and will not be repeated here.

[0124] The electronic devices in this application embodiments exist in various forms, including but not limited to:

[0125] (1) Mobile communication devices: These devices are characterized by their mobile communication capabilities and primarily aim to provide voice and data communication. These terminals include: smartphones (e.g., iPhones), multimedia phones, feature phones, and low-end phones, etc.

[0126] (2) Ultra-mobile personal computer devices: These devices fall under the category of personal computers, possessing computing and processing capabilities, and generally also have mobile internet access features. These terminals include PDAs, MIDs, and UMPCs, such as the iPad.

[0127] (3) Portable entertainment devices: These devices can display and play multimedia content. This category includes audio and video players (such as iPods), handheld game consoles, e-book readers, as well as smart toys and portable car navigation devices.

[0128] (4) Server: A device that provides computing services. The components of a server include a processor, hard disk, memory, system bus, etc. Servers are similar to general computer architectures, but because they need to provide highly reliable services, they have higher requirements in terms of processing power, stability, reliability, security, scalability, and manageability.

[0129] (5) Other electronic devices with data interaction functions.

[0130] In addition, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which are used to execute the method flow described in any of the above embodiments.

[0131] The technical solution of this application has been described in detail above with reference to the accompanying drawings. Through the technical solution of this application, the evaluation and analysis of the target object is automated, saving a lot of time and manpower costs. It can also obtain more accurate and reliable evaluation and analysis results of the target object, which helps to maintain and improve the target object and improves development and maintenance efficiency.

[0132] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0133] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0134] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0135] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0136] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0137] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. An information processing method, characterized in that, include: Retrieve version information for multiple versions of the target object; For each version other than the first version among the plurality of versions, based on the version information of the version and the version information of the preceding adjacent version of the version, determine the target function that changes in the target object when changing from the preceding adjacent version to the version; Based on all the objective functions of the multiple versions, the target object is divided into multiple target functional modules, including: Based on the function attributes of each objective function, all objective functions of the multiple versions are clustered to obtain multiple initial functional modules; Each objective function's function attributes include at least two of the following: the relative position parameter between the target file containing the current objective function and other files containing the other objective functions; the difference between the number of traversals from the project root to the target file and the minimum number of traversals from the target file to the other files; the filename similarity between the target file and the other files; the directory similarity between the target file and the other files; the difference between the starting line number of the current objective function and the starting line number of the other objective functions; and the modification correlation between the current objective function and the other objective functions. Select the target functional module whose clustering parameter value is greater than the preset clustering threshold from the multiple initial functional modules.

2. The information processing method according to claim 1, characterized in that, Also includes: For every two target functional modules in all the target functional modules, the association distance between the two target functional modules is calculated based on the clustering parameter values ​​of the two target functional modules respectively; If the association distance is less than a specified safe distance threshold, an alarm message is generated for the two target functional modules. The alarm message is used to reflect that the two target functional modules are in an unsafe state of being overly closely associated.

3. The information processing method according to any one of claims 1 to 2, characterized in that, The version information for each version includes one or more of the following: version identifier for each version, version identifier of the preceding adjacent version for each version, version committer identifier, version commit date, version commit time, version commit type, set of modifications relative to the preceding adjacent version for each version, and set of file renaming information.

4. The information processing method according to claim 3, characterized in that, The process of obtaining version information for multiple versions of the target object includes: Obtain the version information configuration template from the code version management system of the target object; Based on the version information configuration template, generate a command sequence for obtaining the version information; Execute the command sequence to obtain version information for each version of the target object.

5. The information processing method according to claim 4, characterized in that, Prior to executing the command sequence, the method further includes: Obtain a valid access path for the target object, for use when executing the command sequence; and Based on a preset version committer identifier association relationship, the version committer identifiers are deduplicated; and Delete the specified file and / or the specified directory from the set of modifications.

6. The information processing method according to claim 3, characterized in that, The process of obtaining version information for multiple versions of the target object includes: Obtain local or remote version data for each version of the target object; The version information of each version is obtained by parsing the local version data or the remote version data of each version.

7. The information processing method according to claim 1, characterized in that, The step of determining the target function that changes in the target object when it changes from the previous adjacent version to the current version, based on the version information of the current version and the version information of the previous adjacent version, includes: Based on the version information of the aforementioned version and the version information of the preceding adjacent version, obtain the target file within the aforementioned version that has undergone changes relative to the preceding adjacent version; If the code format of the target file is a recognizable code format, perform syntax tree analysis on the target file, and determine the function in the analysis result as the target function that changed in the target object when it was changed from the previous adjacent version to the version; If the code format of the target file is an unrecognizable code format, the target file is identified as the target function.

8. An information processing device, characterized in that, include: Version information acquisition unit, used to acquire version information of multiple versions of the target object; The objective function determination unit is used to determine, for each version other than the first version among the plurality of versions, the objective function that changes in the target object when changing from the previous adjacent version to the version, based on the version information of the version and the version information of the previous adjacent version of the version; A functional module partitioning unit, used to partition the target object into multiple target functional modules based on all target functions of the multiple versions, including: Based on the function attributes of each objective function, all objective functions of the multiple versions are clustered to obtain multiple initial functional modules; Each objective function's function attributes include at least two of the following: the relative position parameter between the target file containing the current objective function and other files containing the other objective functions; the difference between the number of traversals from the project root to the target file and the minimum number of traversals from the target file to the other files; the filename similarity between the target file and the other files; the directory similarity between the target file and the other files; the difference between the starting line number of the current objective function and the starting line number of the other objective functions; and the modification correlation between the current objective function and the other objective functions. Select the target functional module whose clustering parameter value is greater than the preset clustering threshold from the multiple initial functional modules.

9. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, the instructions being configured to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions for performing the method flow as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Function processing method and device and related equipment

    CN108845843A

  • Code dependence management method and device, computer equipment and storage medium

    CN109918078A