Movatterモバイル変換


[0]ホーム

URL:


CN113435177A - Target code file package comparison method, device, equipment, medium and system - Google Patents

Target code file package comparison method, device, equipment, medium and system
Download PDF

Info

Publication number
CN113435177A
CN113435177ACN202110795160.XACN202110795160ACN113435177ACN 113435177 ACN113435177 ACN 113435177ACN 202110795160 ACN202110795160 ACN 202110795160ACN 113435177 ACN113435177 ACN 113435177A
Authority
CN
China
Prior art keywords
file
comparison
code file
object code
target code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110795160.XA
Other languages
Chinese (zh)
Inventor
袁佳峰
张国栋
陈俊
程烨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co LtdfiledCriticalShanghai Pudong Development Bank Co Ltd
Priority to CN202110795160.XApriorityCriticalpatent/CN113435177A/en
Publication of CN113435177ApublicationCriticalpatent/CN113435177A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

The embodiment of the invention discloses a method, a device, equipment, a medium and a system for comparing a target code file package. The method comprises the steps of comparing a first target code file packet and a second target code file packet to be compared to determine a target code file pair with changed contents, so that the file-level comparison of the two target code file packets is realized, and the target code file pair which needs to be further compared with the file contents is obtained; and then, decompiling the target code files in the determined target code file pair, comparing the contents of the source code files obtained based on decompiled files, and visually displaying a comparison report generated according to a comparison result, so that the difference identification of the file contents of the target code file pair is realized, and the difference of the two target code files is visually displayed, so that a user can conveniently perform subsequent difference analysis work.

Description

Target code file package comparison method, device, equipment, medium and system
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment, a medium and a system for comparing a target code file package.
Background
In the prior art, the object code file package, i.e., the product, is generally managed centrally by a product management tool, and the product management tool generally has a function of generating a HASH value (for example, MD5, SHA-256, etc.) for the object code file package, so as to ensure uniqueness of the product and prevent tampering. For two object code file packages which look the same, the product management tool can only identify the difference of the file level through the HASH value generally, and cannot identify the difference of the file content.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment, a medium and a system for comparing a target code file packet, so as to realize the difference identification of the file contents of two code files.
In a first aspect, an embodiment of the present invention provides a method for comparing a target code file package, where the method includes:
receiving comparison task information, and acquiring a first target code file packet and a second target code file packet to be compared according to the comparison task information;
comparing the first target code file packet with the second target code file packet, and determining a target code file pair with changed content according to a comparison result;
decompiling the object code files in the object code file pair to obtain source code files corresponding to the object code files in the object code file pair;
and comparing the content of the source code file, generating a comparison report according to a comparison result, and visually displaying the content in the comparison report.
In a second aspect, an embodiment of the present invention further provides a device for comparing a target code file package, where the device includes:
the file package acquisition module is used for receiving the comparison task information and acquiring a first target code file package and a second target code file package to be compared according to the comparison task information;
the file pair determining module is used for comparing the first target code file packet with the second target code file packet and determining a target code file pair with changed content according to a comparison result;
the source code determining module is used for performing decompiling on the object code file in the object code file pair to obtain a source code file corresponding to the object code file in the object code file pair;
and the content comparison module is used for comparing the file content of the source code file, generating a comparison report according to a comparison result and visually displaying the content in the comparison report.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for comparing the object code portfolio as provided in any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for comparing object code packages according to any embodiment of the present invention.
In a fifth aspect, an embodiment of the present invention further provides a system for comparing a target code file package, where the system includes a management platform and a comparison service execution machine; wherein,
the comparison service execution machine is used for generating a comparison report based on the comparison method of the target code file package provided by any embodiment of the invention, and uploading the comparison report to the management platform;
the management platform is used for determining comparison task information, sending the comparison task information to the comparison service execution machine, and visually displaying the contents in the comparison report uploaded by the comparison service execution machine.
The embodiment of the invention has the following advantages or beneficial effects:
the method comprises the steps that a first target code file package and a second target code file package to be compared are subjected to file comparison, a target code file pair with changed contents is determined, the file-level comparison of the two target code file packages is realized, and a target code file pair which needs to be subjected to further file content comparison is obtained; and then, decompiling the target code files in the determined target code file pair, comparing the contents of the source code files obtained based on decompiled files, and visually displaying a comparison report generated according to a comparison result, so that the difference identification of the file contents of the target code file pair is realized, and the difference of the two target code files is visually displayed, so that a user can conveniently perform subsequent difference analysis work. The method can be applied to comparing the software version planned to be put into production with the software version passing the test, realizes content difference identification before the production, is beneficial to the evaluation of the production risk of the user, and can assist the user to evaluate the production risk more efficiently.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1A is a schematic flowchart of a comparison method for a target code file package according to an embodiment of the present invention;
fig. 1B is a schematic flowchart of a management method for comparison reports according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a comparison method for a target code file package according to a second embodiment of the present invention;
fig. 3A is a schematic flowchart of a comparison method for a target code file package according to a third embodiment of the present invention;
fig. 3B is a schematic flowchart of an optional comparison method for a target code document package according to a third embodiment of the present invention;
fig. 4A is a schematic structural diagram of a comparison system of a target code file package according to a fourth embodiment of the present invention;
fig. 4B is a schematic structural diagram of another comparison system for a target code file package according to a fourth embodiment of the present invention;
fig. 4C is a schematic diagram of a physical architecture of a comparison system of a target code file package according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a comparison apparatus for a target code file package according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before describing the comparison method of the object code file package provided by the present application in detail, an application scenario of the comparison method of the object code file package provided by the present application is exemplarily described. Illustratively, before the information system is put into production, various testing works, such as system testing, performance testing, security testing and the like, can be carried out, the tests are usually carried out in different test environments in sequence, developers can still carry out development work in an iterative way in the test process, because the defect repair progress and the test progress are different, the application versions deployed in different test environments are different, after each test is completed, the developer will still change the source code during the preparation of the production version due to the reasons of requirement change, code optimization, parameter configuration adjustment, etc., these modifications may be put into production directly without complete testing, thereby incurring a production risk and, therefore, the comparison method of the target code file package can be applied to comparison of software versions planned to be put into production and software versions passed through testing, and difference identification before software put into production is achieved. Or, the method can also be applied to comparing the software after test modification with the software before test modification, and quickly inquiring the modification content of the software; or, the method is applied to comparing software changed under different test environments, determining changed contents under different test environments, and the like. The above application scenarios are only examples, and the application scenarios of the comparison method for the object code file package are not limited in the present application.
Example one
Fig. 1A is a schematic flow chart of a comparison method for object code packages according to an embodiment of the present invention, where this embodiment is applicable to a case where file content difference identification is performed on two object code packages, and the method may be executed by a comparison device for object code packages, where the comparison device may be implemented by hardware and/or software, and the method specifically includes the following steps:
s110, receiving the comparison task information, and acquiring a first target code file packet and a second target code file packet to be compared according to the comparison task information.
The comparison task information may be specific information of a task for comparing the two object code file packages. For example, the comparison task information may include a package identifier of a first target code package and a package identifier of a second target package to be compared; and acquiring the first target code file package and the second target code file package according to the file package identification of the first target code file package and the file package identification of the second target file package in the comparison task information.
Illustratively, the first object code package is a software version scheduled for production and the second object code package is a software version that passes testing. Or the first object code file package is a software version passing the test, and the second object code file package is a software version planned to be put into production.
Optionally, the first object code file package and the second object code file package to be compared may be acquired from a third-party system by calling a service. For example, the software version of the planned production to be compared is acquired from the production version delivery management system by calling the service, and the software version passing the test to be compared is acquired from the test version management system.
And S120, comparing the first target code file package with the second target code file package, and determining the target code file pair with changed content according to the comparison result.
The file comparison is performed on the first target code file package and the second target code file package, all target code files of the first target code file package and all target code files of the second target code file package can be determined, the target code files with the same name and the same path are determined as comparison objects, and the comparison objects are compared. For example, if the name and path of the file a1 of the first object code package and the file b1 of the second object code package are the same, then a1 and b1 are the objects of comparison.
Alternatively, all files in the first object code portfolio and the second object code portfolio may be determined by a recursive algorithm. Illustratively, the first object code portfolio or the second object code portfolio is at a nested directory level, such as a nested WAR portfolio in a ZIP portfolio, a nested JAR portfolio in a WAR portfolio, etc., and files at all directory levels of the first object code portfolio and the second object code portfolio can be traversed by recursion from a parent directory to a last directory of the first object code portfolio and the second object code portfolio through a recursion algorithm, so as to resolve the first object code portfolio and the second object code portfolio into files with minimum granularity, thereby performing file comparison on the files.
Specifically, in this embodiment, the file comparison is performed on the first object code file package and the second object code file package, and the object code file pair with changed content is determined according to the comparison result, which may be: determining a comparison object in the first target code file package and the second target code file package, and calculating hash values of two target code files in the comparison object; and if the hash values of the two target code files in the comparison object are different, determining the comparison object as a target code file pair with changed content. For example, the Hash value may be an MD5(Message-Digest Algorithm) value, or SHA (Secure Hash Algorithm) value, etc.; if the hash values of the two target code files in the comparison object are different, the file contents of the two target code files can be determined to be different, and the two target code files are target code file pairs with changed contents.
That is, the object code file pair with changed content in this embodiment may include two object code files with the same name, the same path, and different hash values, and the two object code files are respectively derived from the first object code file package and the second object code file package. Of course, the number of the target code file pairs determined in this embodiment may be one, or may be multiple.
In another optional implementation, the file comparison between the first object code file package and the second object code file package may further be: decompressing the first object code file packet and the second object code file packet, determining a comparison object in a decompressed file, performing hash value calculation on the comparison object, continuing decompressing aiming at the comparison object with different hash values, repeatedly executing the steps of determining the comparison object in the decompressed file and performing hash value calculation until reaching a final-stage directory, and determining the comparison object with different hash values as an object code file pair.
For example, when the first object code file package is decompressed for the first time to obtain 50 compressed files, and the second object code file package is decompressed for the first time to obtain 50 compressed files, the MD5 values of the first decompressed compressed files are compared, wherein the compressed files with the same MD5 value do not need to be decompressed, and the compressed files with different MD5 values are decompressed. Therefore, for a target code file package with a large code amount, the method provided by this embodiment can also complete comparison of the target code file package in a short time, and perform file comparison layer by layer without decompressing all files of the target code file package at one time, and perform file comparison for all files, and do not need to decompress for compressed files with the same hash value, thereby implementing fast file comparison of the target code file package.
The purpose of performing file comparison on the first object code file package and the second object code file package in this embodiment is as follows: and comparing the file levels of the first target code file package and the second target code file package, and further determining a target code file pair with changed file contents in the first target code file package and the second target code file package, so as to further compare the file contents of the target code file pair with changed contents, and determine the difference of the file contents. That is, in this embodiment, it is not necessary to compare file contents of all the object code files in the first object code file package and the second object code file package, so that the comparison efficiency of the object code file package is improved.
S130, performing decompiling on the object code files in the object code file pair to obtain source code files corresponding to the object code files in the object code file pair.
In this embodiment, the object code file may be a compiled file. For example, the object code file may be a JAR, WAR, DLL file, or the like. The source code file resulting from decompilation may include the source code of the object code file. For example, the source code file may be a JPG/JPEG, XML, JSON, TXT, PNG file, or the like. Through decompiling processing, the compiled object code file can be restored into a source code file before compiling.
In this embodiment, the object code file in the object code file pair is decompiled for the purpose of: and obtaining source code information of the target code files in the target code file pair, and comparing file contents based on the source code information.
In some scenarios, because security reinforcement and code obfuscation processing are performed on executable files in some object code file packages in advance, after decompiling object code files in the object code file packages of this type, the quality of obtained source code files is reduced, and the file content comparison result of the source code files is further influenced. For such a target code file package, the embodiment may also perform only the file comparison of the target code file package.
S140, comparing the file contents of the source code file, generating a comparison report according to a comparison result, and visually displaying the contents in the comparison report.
Specifically, the content of the source code file corresponding to the target code file may be compared, and a comparison report may be generated based on a comparison result of the content comparison of the files. Optionally, the comparison method for the target code file package provided by this embodiment may support comparison of source code files in multiple development languages, and support comparison of common file types in versions. Development languages such as Java,. Net, C/C + +, Python, JavaScript, SQL Script, HTML, and the like; JPG/JPEG, XML, JSON, TXT, PNG and other file formats. Aiming at the object code file written by languages such as C/C + +, the content with certain readability (accurate to function level) should be restored as far as possible.
In this embodiment, the comparison report may include at least one of information of the object code file whose content is changed, location information of the content which is changed, and changed content information. Wherein, the changed content information can be understood as difference point information. The disparity point information may include disparity point details and disparity point types. The comparison report may further include a display effect of the difference point information. For example, the display effects include, but are not limited to, display color, display brightness, display font, display area. For example, the comparison report may display the difference point information in a split screen and highlighted form. That is, the contents that can be displayed in the alignment report include: which files have changed in content, which content in the files has changed, where the change occurred, what kind of change occurred, and the like.
The embodiment can visually display the contents in the comparison report on the user interaction interface, so that the user can quickly know the difference information of the target code file package, and the subsequent analysis of the difference information by the user is facilitated.
Optionally, after generating the comparison report, the comparison method for the target code file package provided in this embodiment further includes: and carrying out statistical analysis on the report content in each generated comparison report, and generating an analysis report according to the statistical analysis result.
The statistical analysis of the report content in each generated comparison report may include at least one of the following: counting the number of times of the change of the file content of the target code file; counting the number of times of the change of the file content of the target code file packet; and counting the change times of various different point types. Illustratively, the statistical analysis results include statistical information of the number of times that the software version of the planned commissioning of each project has changed compared to the content of the software version passing the test.
Specifically, after the statistical analysis result is determined, an analysis report may be generated based on the statistical analysis result, and the analysis report may be displayed in a graphical manner, such as a pie chart, a bar chart, and the like.
In the optional implementation manner, the report content in each generated comparison report is subjected to statistical analysis, and an analysis report is generated according to the statistical analysis result, so that quantitative difference information is provided for the user, the user is further helped to quickly know the difference information of the target code file package, and the user is helped to quickly analyze the difference information.
Optionally, after generating the comparison report, the comparison method for the target code file package provided in this embodiment further includes the following steps:
s1, when the circulation triggering operation of the version administrator is detected, sending a comparison report to a communication account corresponding to the project personnel; acquiring explanation contents fed back by the project personnel, and storing the explanation contents; wherein the explanation content comprises at least one of the reasons of file change, the influence range and the related function points in the software version planned to be delivered;
s2, when the test evaluation triggering operation of the project personnel is detected, transmitting explanation content to the communication account corresponding to the test personnel; acquiring and storing opinion information whether a test is required or not, which is fed back by a tester; if the test is needed, obtaining test result information input by a tester, and storing the test result information;
s3, visually displaying the stored content, so that a version manager can evaluate the displayed content; if the evaluation is passed, performing step S5, and if the evaluation is not passed, performing step S4;
s4, acquiring judgment result information whether retesting the software version planned to be put into production and input by the version manager; if the retest is not needed, returning to the step S2; if the retest is needed, the retest is informed to retest the software version planned to be put into production, and a new test report fed back by the tester is obtained and stored.
And S5, recording the auditing result of the evaluation passing of the software version planned to be delivered.
Specifically, the comparison report is sent to the communication account corresponding to the project staff, and may be sent to a third-party system by calling a service, such as a mail system. The explanation content fed back by the project personnel can be the explanation content input by the project personnel on the user interaction interface; the opinion information of the test fed back by the tester may be opinion information entered by the tester on the user interaction interface. The version manager can check and evaluate the saved explanation content and the test opinion information, and when the evaluation is passed, the version manager records the approved result of the evaluation of the software version planned to be delivered, and the software version can be used for the formal delivery of the production environment.
The management process of the alignment report after the alignment report is generated is described with reference to fig. 1B. As shown in fig. 1B, a flowchart of a management method for a comparison report is shown, and a post-processing procedure of the comparison report includes the following steps: the version manager prereviews the comparison report, namely, the report content is subjected to primary review, so that the accuracy and the completeness of the report are ensured; issuing a comparison report to a project manager, namely, transferring the comparison report to the project manager by a version manager, and explaining the difference content by the project manager; the project manager explains the difference points, namely, the project manager analyzes and registers the reason, the influence range and the related function points of the difference according to the comparison report; the test manager verifies and evaluates the explanation, namely, the test managers participating in the project verify and evaluate the difference points, evaluate the production risk, retest necessity and the like according to the feedback of the project manager; whether the evaluation is passed or not is judged, if the evaluation of the version manager is passed, the version manager carries out auditing and passing processing on the version, and if the evaluation is not passed, whether retesting needs to be carried out on the production version is further judged; and if the retest is not needed, the project manager explains the difference points again until the test manager passes the evaluation, if the retest is needed, the test is carried out again, a new test report is generated for the production version and is recorded on a case, and the version manager passes the examination and verification of the version, so that the version can be used for the formal production of the production environment.
In the optional embodiment, by describing the complete process of interpretation, evaluation, retest and audit of the comparison report after the comparison report is generated, the management of the comparison report is realized, and thus, the user can be helped to evaluate the production risk more efficiently.
According to the technical scheme, the first target code file packet and the second target code file packet to be compared are subjected to file comparison, the target code file pair with changed contents is determined, the file-level comparison of the two target code file packets is realized, and the target code file pair which needs to be subjected to further file content comparison is obtained; and then, decompiling the target code files in the determined target code file pair, comparing the contents of the source code files obtained based on decompiled files, and visually displaying a comparison report generated according to a comparison result, so that the difference identification of the file contents of the target code file pair is realized, and the difference of the two target code files is visually displayed, so that a user can conveniently perform subsequent difference analysis work. The method can be applied to comparing the software version planned to be put into production with the software version passing the test, realizes the identification of the content level difference before the production, is beneficial to the evaluation of the production risk of the user, and can assist the user to evaluate the production risk more efficiently.
It should be noted that, in another optional implementation manner, determining the target code file pair with changed content according to the comparison result further includes: determining target code files newly added to the first target code file package relative to the second target code file package and target code files lacking in the first target code file package relative to the second target code file package according to the comparison result; correspondingly, the contents in the alignment report include: at least one of information of an object code file newly added to the first object code package relative to the second object code package, information of an object code file missing from the first object code package relative to the second object code package, information of an object code file with changed content, position information with changed content, and changed content information.
That is, in this optional embodiment, when determining the target file pair with changed content according to the comparison result, the target code file newly added to the first target code file package relative to the second target code file package and the target code file lacking in the first target code file package relative to the second target code file package are also determined according to the comparison result. At this time, the content in the comparison report may include information of the determined additional object code file or information of the determined missing object code file. By determining the newly added or lacked target code files, the file level difference of the target code file package can be determined during file comparison, and the file level difference is displayed in a comparison report, so that a user can conveniently analyze the file level difference. Through a visual interface, the file level difference between the object code file packages can be visually shown, including the addition of files, the reduction of files and the change of file contents.
Example two
Fig. 2 is a schematic flow chart of a comparison method for a target code file package according to a second embodiment of the present invention, where this embodiment optionally performs file comparison on a first target code file package and a second target code file package on the basis of the above embodiments, and determines a target code file pair with changed content according to a comparison result, where the method includes: acquiring preset comparison rule information; determining a first file set and a second file set based on the comparison rule information; the first file set comprises object code files participating in comparison in a first object code file package, and the second file set comprises object code files participating in comparison in a second object code file package; comparing files based on the first file set and the second file set, and determining a target code file pair according to a comparison result; the object code file pair comprises a first file and a second file, the first file is an object code file in the first file set, the second file is an object code file in the second file set, the file name of the first file is the same as that of the second file, the file path of the first file is the same as that of the second file, and the file content of the first file is different from that of the second file.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 2, the method for comparing the object code file package provided by this embodiment includes the following steps:
s210, receiving the comparison task information, and acquiring a first target code file packet and a second target code file packet to be compared according to the comparison task information.
S220, acquiring preset comparison rule information, and determining a first file set and a second file set based on the comparison rule information.
The first file set comprises object code files participating in comparison in the first object code file package, and the second file set comprises object code files participating in comparison in the second object code file package.
In this embodiment, the comparison rule information may be that the files marked in advance in the first target code file package and the second target code file package are not compared; or, the comparison rule information may be only the files marked in advance in the first object code file package and the second object code file package. The comparison rule information of this embodiment may be set according to actual comparison requirements, which is not limited in this application.
Exemplary alignment rule information includes: at least one white list of a specific file name white list, a directory white list and a file suffix name white list; the specific file name white list comprises file names of files which do not participate in comparison; the directory white list comprises directory paths of files which do not participate in comparison; the file suffix name white list contains the suffix names of the files which do not participate in the comparison. For example, the file not involved in the comparison may be a file with a data amount greater than a preset data amount, or a file with a file format of a preset format, and the like.
Specifically, when the comparison rule information includes the specific file name white list, the comparison of the files in the first target code file packet and the second target code file packet, which are consistent with the file names included in the specific file name white list, may not be performed; when the comparison rule information comprises the directory white list, the files in the first target code file packet and the files in the second target code file packet under the directory path of the target white list are not compared; when the comparison rule information includes the file suffix name white list, the comparison of the files in the first target code file packet and the second target code file packet, which are consistent with the suffix name in the file suffix name white list, may not be performed. Of course, the comparison rule information may further include at least one of a file name, a directory path, and a suffix name of the files participating in the comparison.
Or, the comparison rule information may further include an absolute directory; the absolute directory contains a directory that participates in the comparison, or contains a directory that does not participate in the comparison. Illustratively, the absolute directory includes a first object code file package in which the config participates, and a second object code file package in which the config does not participate.
In this optional embodiment, the comparison rule information includes at least one white list, so that only files except for the white list are compared, and a technical effect of increasing the comparison speed of the target file package is achieved.
In this embodiment, according to the comparison rule information, the first file set and the second file set participating in the comparison can be determined. The object code files in the first file set are from a first object code file package, and the object code files in the second file set are from a second object code file package.
In one embodiment, determining the first set of files and the second set of files based on the comparison rule information includes: traversing target code files participating in comparison from the directory of the first target code file packet based on comparison rule information and a file comparison recursive algorithm of multi-directory structure nesting, and generating a first file set based on the traversed target code files; and traversing target code files participating in comparison from the directory of the second target code file packet based on the comparison rule information and a file comparison recursive algorithm nested in a multi-directory structure, and generating a second file set based on the traversed target code files.
The file comparison recursive algorithm of the multi-directory structure nesting can only traverse the files participating in comparison by combining the comparison rule information based on the traversal algorithm of the directory tree structure. Namely, the optional implementation method can traverse the target code files participating in comparison through the file comparison recursive algorithm and the comparison rule information nested in the multi-directory structure, so that the files participating in comparison are determined recursively, and the comparison efficiency of the target code file package is improved.
And S230, comparing files based on the first file set and the second file set, and determining a target code file pair according to a comparison result.
The object code file pair comprises a first file and a second file, the first file is an object code file in the first file set, the second file is an object code file in the second file set, the file name of the first file is the same as that of the second file, the file path of the first file is the same as that of the second file, and the file content of the first file is different from that of the second file. Specifically, the method for determining the target code file pair according to the comparison result can be referred to the description in the above embodiment.
S240, performing decompiling on the object code files in the object code file pair to obtain source code files corresponding to the object code files in the object code file pair.
And S250, comparing the file contents of the source code file, generating a comparison report according to a comparison result, and visually displaying the contents in the comparison report.
According to the technical scheme, the comparison of the files which are only referred to in the target code file package and compared is achieved through the preset comparison rule information, the difference identification of the file contents of the target code file pair is achieved, the difference of the two target code files is visually displayed, the user can conveniently conduct follow-up difference analysis work, and meanwhile the comparison efficiency of the target code file package is improved.
EXAMPLE III
Fig. 3A is a schematic flow chart of a comparison method for a target code file package according to a third embodiment of the present invention, where this embodiment is based on the foregoing embodiments, optionally, before performing file comparison on a first target code file package and a second target code file package, the comparison method for a target code file package further includes: determining a directory structure of the first object code file package and a directory structure of the second object code file package; if the directory structure of the first object code file package is different from the directory structure of the second object code file package, calculating the similarity between the directory structure of the first object code file package and the directory structure of the second object code file package; and if the similarity is higher than the set threshold, triggering and executing the operation of comparing the first target code file package and the second target code file package.
Wherein explanations of the same or corresponding terms as those of the above embodiments are omitted. Referring to fig. 3A, the method for comparing the object code file package provided in this embodiment includes the following steps:
s310, receiving the comparison task information, and acquiring a first target code file packet and a second target code file packet to be compared according to the comparison task information.
S320, determining a directory structure of the first object code file package and a directory structure of the second object code file package, and if the directory structure of the first object code file package is different from the directory structure of the second object code file package, calculating the similarity between the directory structure of the first object code file package and the directory structure of the second object code file package.
The directory structure of the first object code file package and the second object code file package can be represented by character strings. For example, a \ b, c \ d, e, f. Specifically, the existing system command may be used to obtain the character string representing the directory structure of the first object code file package and the character string representing the directory structure of the second object code file package.
In this embodiment, if the directory structure of the first object code file package is different from the directory structure of the second object code file package, the similarity between the directory structure of the first object code file package and the directory structure of the second object code file package may be calculated as follows: and if the character string representing the directory structure of the first target code file package is different from the character string representing the directory structure of the second target code file package, calculating the similarity between the character string representing the directory structure of the first target code file package and the character string representing the directory structure of the second target code file package.
S330, if the similarity is higher than the set threshold, performing file comparison on the first target code file packet and the second target code file packet, and determining the target code file pair with changed content according to the comparison result.
The set threshold may be a preset similarity threshold value for comparing files. Specifically, in this embodiment, only when the similarity between the directory structure of the first object code file package and the directory structure of the second object code file package is higher than the set threshold, the file comparison and the file content comparison operations are performed on the first object code file package and the second object code file package. Aiming at the target code file packet with the target structure similarity lower than the set threshold, the comparison can be carried out in a manual judgment mode without carrying out the subsequent file comparison and file content comparison operations.
S340, performing decompiling on the object code files in the object code file pair to obtain source code files corresponding to the object code files in the object code file pair.
And S350, comparing the file contents of the source code file, generating a comparison report according to a comparison result, and visually displaying the contents in the comparison report.
In the technical solution of this embodiment, a situation that the change content of the object code file package is too large is considered, for example, two object code file packages are not file packages corresponding to the same software, or the difference between the previous versions of the two object code file packages is too large and not adjacent versions. According to the embodiment, before the target code file package is compared with the files, the similarity calculation is performed on the directory structure of the target code file package, so that the preprocessing of the file comparison is realized, the file comparison only aiming at the target code file package with the directory structure similarity higher than the set threshold value is realized, the comparison of the file packages with overlarge differences is avoided, and the comparison efficiency of the target code file package is improved.
Optionally, this embodiment further provides a comparison method for an optional target code file package, and as shown in fig. 3B, a flow diagram of the comparison method for an optional target code file package is shown, where the comparison method for an optional target code file package provided in this embodiment includes the following steps:
step 1: calling an API (application program interface) service of target code management work according to the comparison task information to obtain a first target code file package and a second target code file package;
step 2: automatically preprocessing the first object code file packet and the second object code file packet, judging whether the automatic preprocessing is successful, if so, executing the step 3, and if not, finishing the comparison; the automatic preprocessing can be to list the directory structure of the first target code file package and the target structure of the second target code file package by adopting a preset command, calculate the similarity between the directory structure of the first target code file package and the target structure of the second target code file package by adopting a text comparison technology, if the similarity is higher than a set threshold, the automatic preprocessing is successful, and if the similarity is lower than the set threshold, the automatic preprocessing is failed, and a manual preprocessing mode can be adopted;
step 3, reading preset comparison rule information;
step 4, comparing the first target code file packet with the second target code file packet according to comparison rule information, and determining a target code file pair according to a comparison result; the first file set of the first target code file package and the second file set of the second target code file package can be determined according to the comparison rule information, and file comparison is conducted on the first file set and the second file set.
Step 5, performing decompiling on the object code file in the object code file pair;
step 6, comparing the file contents of the source code file obtained after decompiling;
step 7, generating a comparison report according to the comparison result, and displaying the content of the comparison report; wherein, the content that shows includes: the new file, the missing file, the content of the file with changed content, the position of the content change and the change information.
The optional comparison method for the target code file package realizes the difference identification of the file contents of the target code file pair, and facilitates the subsequent difference analysis work of a user by visually showing the difference of the two target code files. And moreover, the target code file package is automatically preprocessed before the files are compared, so that the files are compared only for the target code file package with the directory structure similarity higher than a set threshold value, the files with overlarge differences are prevented from being compared, and the comparison efficiency of the target code file package is improved.
Example four
Fig. 4A is a schematic structural diagram of an alignment system for object code packages according to a fourth embodiment of the present invention, where the system includes a management platform 41 and an alignmentservice execution machine 42; the comparisonservice execution machine 42 is configured to generate a comparison report by using the comparison method of the target code file package provided in any one of the embodiments, and upload the comparison report to the management platform 41; and the management platform 41 is configured to determine the comparison task information, send the comparison task information to the comparisonservice execution machine 42, and perform visual display on contents in the comparison report uploaded by theservice execution machine 42 by comparison.
The management platform 41 may interact with the comparisonservice execution machine 42 by calling a system interface service. For example, the management platform 41 may send the comparison task information to the comparisonservice execution machine 42 by calling the system interface service, and receive the comparison report uploaded by the comparisonservice execution machine 42.
Specifically, the management platform 41 may provide a user interaction interface, and a version administrator may select two sets of object code packages through the user interaction interface provided by the management platform 41 to initiate a comparison task. The management platform 41 determines the comparison task information according to the comparison task initiated by the user, and sends the comparison task information to the comparisonservice execution machine 42 through the system interface service. The comparisonservice execution machine 42 generates a comparison report by using the comparison method of the object code file package provided in any of the above embodiments, and feeds the comparison report back to the management platform 41, and the management platform 41 can perform visual display on the content in the report by comparison on the user interaction interface.
The management platform 41 may also call a system interface service to interact with a third-party system. For example, the system interface service is called to transmit a mail sending request to the mail system, or the system interface service is called to send a software version obtaining request scheduled to be delivered to the delivery version management platform, or the system interface service is called to send a software version obtaining request passing the test to the test version management platform.
It should be noted that the number of comparison service execution machines in the comparison system of the object code file package in this embodiment may be one or more. The management platform 41 may issue a plurality of comparison tasks to different comparison service execution machines, for example, the management platform 41 implements scheduling assignment of the comparison tasks according to task execution states or resource usage states of the respective comparison service execution machines, and issues the respective comparison tasks to the respective comparison service execution machines.
For example, the present embodiment further provides another comparison system for a target code package, and as shown in fig. 4B, a schematic structural diagram of the another comparison system for a target code package provided in the present embodiment is shown. The system for comparing the object code file package comprises a management platform and a comparison service execution machine, wherein the management platform comprises a system management module, a permission management module, a rule management module, a task management module, a problem management module, a log management module, a report management module and system interface service. The management platform may provide user interactive interfaces for version managers, project managers, test managers, and system administrators. Specifically, in the comparison system of the object code file package of fig. 4B:
the system management module is used for managing various resolvers, jar packages, various operating parameters of the management platform, service addresses, user names, passwords and the like of the third-party system; the parser parses target code file packages in different languages, and the parser can call a JAR package to parse the target code file packages; the operation parameters comprise a cleaning parameter of the comparison service execution machine for the version file, an information synchronization parameter of the comparison service execution machine and the third-party system and the like;
the authority management module is used for managing users, user groups and authorities;
the rule management module is used for carrying out global, grouping and explicit management on the comparison rule; wherein, the global comparison rule can be a comparison rule common to all system software, the explicit refinement can be different comparison rules used by different systems, and the grouping can be a combination of the global and/or explicit refinement comparison rules;
the task management module is used for realizing the functions of scheduling assignment, progress inquiry, execution parameter management, task report form display and the like of tasks by comparison; the execution parameters include but are not limited to timing execution of the comparison task, waiting execution parameters, timeout time of errors in the execution process and retry times;
the problem management module is used for issuing a comparison report, explaining and filing the difference points, evaluating the difference points, comparing and filing the report, and the like, and is also used for executing the following steps:
s1, when the circulation triggering operation of the version administrator is detected, sending the comparison report to the communication account corresponding to the project personnel; acquiring explanation contents fed back by the project personnel, and storing the explanation contents; wherein the interpretation content comprises at least one of reasons, influence ranges and involved function points of changes of files in the software version planned to be delivered;
s2, when the test evaluation triggering operation of the project personnel is detected, sending the explanation content to the communication account corresponding to the test personnel; acquiring and storing opinion information whether the test is needed or not, which is fed back by the tester; if the test is needed, obtaining test result information input by the tester, and storing the test result information;
s3, visually displaying the stored content, so that a version manager can evaluate the displayed content; if the evaluation is passed, performing step S5, and if the evaluation is not passed, performing step S4;
s4, acquiring judgment result information whether retesting is carried out on the software version planned to be put into production or not, which is input by a version manager; if the retest is not needed, returning to the step S2; if the retest is needed, notifying a tester to retest the software version planned to be put into production, and acquiring and storing a new test report fed back by the tester;
s5, recording the auditing result of the evaluation passing of the software version planned to be delivered;
the log management module is used for managing a system running log, a user operation log and a version comparison log;
the report management module is used for carrying out statistical analysis on the comparison report, generating a comparison report and displaying each comparison result in a parameter configuration and graphical mode of the comparison report; the comparison report comprises the statistical analysis content of the comparison report, such as the number of times of content change and the like;
a system interface service for message/data communication with the comparison service execution machine and the third party system;
the comparison service executive machine is used for executing the comparison task according to the comparison task information issued by the management platform and uploading a comparison report; the comparison task comprises target code file packet preprocessing, file comparison, file content comparison and the like.
The comparison system of the object code file package realizes automatic identification of the difference of the file contents of the object code file pair, and facilitates subsequent difference analysis work of a user by visually displaying the difference of the two object code files. The method can be applied to comparing the software version planned for production with the software version passing the test, realizes content level difference identification before production, is beneficial to the evaluation of the production risk of the user, and can assist the user to evaluate the production risk more efficiently.
It should be noted that, this embodiment also provides a physical architecture of the comparison system of the object code package, as shown in fig. 4C, a physical architecture schematic diagram of the comparison system of the object code package is shown, where the physical architecture includes an application layer, a service layer, and a data layer, where:
an application layer: the system provides a man-machine interaction layer, and business personnel access the system according to different roles of the business personnel; the application layer is mainly oriented to four types of personnel, including a version manager, a project manager, a test manager and a system manager, wherein the version manager: the method comprises the following steps of realizing version comparison rule maintenance, version comparison task starting and tracking, comparison result collection and feedback and the like based on a system; and (4) project manager: checking a comparison result, confirming and feeding back the difference points of the identification, identifying an influence range and the like; a test manager: checking the comparison result, identifying and marking the difference points, tracking the problems of the difference points, evaluating the problems based on the feedback result and the like; a system administrator: maintaining system basic information, authorizing third-party system interface access, inquiring and maintaining logs and the like;
and (3) a service layer: providing service support for a system application layer, specifically comprising the following services: task scheduling service: according to the configuration of the comparison task and the running state of the execution machine, task scheduling between the comparison task and the execution machine is realized; and (3) comparison execution service: the method is used for controlling the execution and the state monitoring of a specific comparison task. The method comprises the following steps: comparing the message generation and state maintenance of the task, controlling and tracking the execution steps of the execution machine, and the like; report service: comparing the comparison details generated by the tasks, summarizing and analyzing the comparison details, and generating a summary and detail report of the comparison result; message queue service: providing message queue service for comparison execution; security/logging service: the system is used for realizing the authority management of the system and providing uniform log service for the system, wherein the log service comprises an operation log, an interface access log and the like; data access service: providing data access and file system access services for the system; platform interface service: the platform provides interface service to the outside in an API mode, and after the third-party system is authorized, the third-party system can be integrated with the system based on the interface;
and (3) a data layer: the system is used for storing various data and information of the system, wherein the database is used for storing various data information of the system and comprises the following components: basic configuration information, comparison rule information, comparison task information, comparison reports and detailed information, problem information, feedback information and the like; the file system is used for storing preprocessed package files, storing comparison report files and the like.
In addition, the third party system in fig. 4C may be an LDAP (Lightweight directory access Protocol) system, which provides a domain service, and implements personnel information synchronization, single sign-on, authority authentication, and the like by interacting with the LDAP system; or the third-party system can also be a mail system, provides mail service, and realizes mail reminding, difference point identification and feedback mail notification of the comparison result by interacting with the mail system; or, the third-party system can also be an object code file management system, and the object code file package for comparison is pulled from the object code file management system through interaction with the object code file management system.
In the comparison system of the object code file package, the expansibility and the operating efficiency of the system are improved by adopting a mode of separately deploying the WEB application and the comparison service executive machine.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a comparison apparatus for object code packages according to a fifth embodiment of the present invention, which is applicable to a situation of performing difference identification of file contents on two object code packages, and specifically includes: a filepackage obtaining module 510, a filepair determining module 520, a sourcecode determining module 530, and acontent comparing module 540.
The filepackage obtaining module 510 is configured to receive comparison task information, and obtain a first target code file package and a second target code file package to be compared according to the comparison task information;
a filepair determining module 520, configured to perform file comparison on the first target code file package and the second target code file package, and determine a target code file pair with changed content according to a comparison result;
a sourcecode determining module 530, configured to perform decompiling on the object code file in the object code file pair to obtain a source code file corresponding to the object code file in the object code file pair;
and thecontent comparison module 540 is configured to compare file contents of the source code file, generate a comparison report according to a comparison result, and visually display contents in the comparison report.
Optionally, the filepair determining module 520 includes a rule obtaining unit, a rule comparing unit, and a file comparing unit, where:
the rule obtaining unit is used for obtaining preset comparison rule information;
the rule comparison unit is used for determining a first file set and a second file set based on the comparison rule information; the first file set comprises object code files participating in comparison in the first object code file package, and the second file set comprises object code files participating in comparison in the second object code file package;
the file comparison unit is used for carrying out file comparison based on the first file set and the second file set and determining a target code file pair according to a comparison result; the object code file pair comprises a first file and a second file, the first file is an object code file in the first file set, the second file is an object code file in the second file set, the file name of the first file is the same as that of the second file, the file path of the first file is the same as that of the second file, and the file content of the first file is different from that of the second file.
Optionally, the device for comparing the object code file package further includes a preprocessing module, configured to determine a directory structure of the first object code file package and a directory structure of the second object code file package before performing file comparison on the first object code file package and the second object code file package; if the directory structure of the first object code file package is different from the directory structure of the second object code file package, calculating the similarity between the directory structure of the first object code file package and the directory structure of the second object code file package; and if the similarity is higher than a set threshold, triggering and executing the operation of comparing the first target code file package and the second target code file package.
Optionally, the filepair determining module 520 includes an added-missing file determining unit, configured to determine, according to the comparison result, a target code file pair with changed content, and determine, according to the comparison result, a target code file newly added to the first target code file package relative to the second target code file package, and a target code file lacking from the first target code file package relative to the second target code file package; correspondingly, the contents in the alignment report include: at least one of information of a newly added object code file of the first object code portfolio relative to the second object code portfolio, information of an object code file lacking of the first object code portfolio relative to the second object code portfolio, information of an object code file with changed content, position information with changed content, and changed content information.
Optionally, the rule comparing unit is specifically configured to traverse target code files participating in comparison from directories of the first target code file package based on the comparison rule information and a file comparison recursive algorithm for multi-directory structure nesting, and generate a first file set based on the traversed target code files; and traversing target code files participating in comparison from the directory of the second target code file packet based on the comparison rule information and a file comparison recursive algorithm nested in a multi-directory structure, and generating a second file set based on the traversed target code files.
Optionally, the comparison rule information includes: at least one white list of a specific file name white list, a directory white list and a file suffix name white list; wherein, the specific file name white list comprises file names of files which do not participate in comparison; the directory white list comprises directory paths of files which do not participate in comparison; the file suffix name white list comprises suffix names of files which do not participate in comparison.
Optionally, the content comparison module is further configured to perform statistical analysis on report contents in each generated comparison report after the comparison report is generated, and generate an analysis report according to a result of the statistical analysis.
Optionally, the first object code file package is a software version planned to be put into production, and the second object code file package is a software version passing the test.
Optionally, the comparison device for the target code file package further includes a comparison result management module, configured to execute the following steps:
s1, when the circulation triggering operation of the version administrator is detected, sending the comparison report to the communication account corresponding to the project personnel; acquiring explanation contents fed back by the project personnel, and storing the explanation contents; wherein the interpretation content comprises at least one of reasons, influence ranges and involved function points of changes of files in the software version planned to be delivered;
s2, when the test evaluation triggering operation of the project personnel is detected, sending the explanation content to the communication account corresponding to the test personnel; acquiring and storing opinion information whether the test is needed or not, which is fed back by the tester; if the test is needed, obtaining test result information input by the tester, and storing the test result information;
s3, visually displaying the stored content, so that a version manager can evaluate the displayed content; if the evaluation is passed, performing step S5, and if the evaluation is not passed, performing step S4;
s4, acquiring judgment result information whether retesting is carried out on the software version planned to be put into production or not, which is input by a version manager; if the retest is not needed, returning to the step S2; if the retest is needed, notifying a tester to retest the software version planned to be put into production, and acquiring and storing a new test report fed back by the tester;
and S5, recording the auditing result of the evaluation passing of the software version planned to be delivered.
In this embodiment, the file pair determination module performs file comparison on a first target code file package and a second target code file package to be compared to determine a target code file pair with changed contents, so that file-level comparison of the two target code file packages is realized, and a target code file pair which needs to be further subjected to file content comparison is obtained; and then, decompiling the target code files in the determined target code file pairs through a source code determining module, comparing the contents of the source code files obtained after decompiling through a content comparison module, and visually displaying a comparison report generated according to a comparison result, so that the difference identification of the file contents of the target code file pairs is realized, and the difference of the two target code files is visually displayed, so that a user can conveniently perform subsequent difference analysis work. The method can be applied to comparing the software version planned to be put into production with the software version passing the test, realizes the identification of the content level difference before the production, is beneficial to the evaluation of the production risk of the user, and can assist the user to evaluate the production risk more efficiently.
The comparison device of the target code file package provided by the embodiment of the invention can execute the comparison method of the target code file package provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the system are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE six
Fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplaryelectronic device 12 suitable for use in implementing embodiments of the present invention. Theelectronic device 12 shown in fig. 6 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention. Thedevice 12 is typically an electronic device that undertakes the package matching functionality.
As shown in FIG. 6,electronic device 12 is embodied in the form of a general purpose computing device. The components ofelectronic device 12 may include, but are not limited to: one or more processors orprocessing units 16, amemory 28, and abus 18 that couples the various components (including thememory 28 and the processing unit 16).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer-readable media. Such media may be any available media that is accessible byelectronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer device readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/orcache Memory 32. Theelectronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, thestorage device 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected tobus 18 by one or more data media interfaces.Memory 28 may include at least oneprogram product 40, withprogram product 40 having a set ofprogram modules 42 configured to carry out the functions of embodiments of the invention.Program product 40 may be stored, for example, inmemory 28, andsuch program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment.Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact withelectronic device 12, and/or any devices (e.g., network card, modem, etc.) that enableelectronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O)interface 22. Also, theelectronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the internet) via theNetwork adapter 20. As shown, thenetwork adapter 20 communicates with other modules of theelectronic device 12 via thebus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction withelectronic device 12, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) devices, tape drives, and data backup storage devices, to name a few.
Theprocessor 16 executes the program stored in thememory 28 to execute various functional applications and data processing, for example, implementing the comparison method for the object code file package provided by the above embodiment of the present invention, including:
receiving comparison task information, and acquiring a first target code file packet and a second target code file packet to be compared according to the comparison task information;
comparing the first target code file packet with the second target code file packet, and determining a target code file pair with changed content according to a comparison result;
decompiling the object code files in the object code file pair to obtain source code files corresponding to the object code files in the object code file pair;
and comparing the content of the source code file, generating a comparison report according to a comparison result, and visually displaying the content in the comparison report.
Of course, those skilled in the art can understand that the processor can also implement the technical solution of the comparison method for the object code file package provided in any embodiment of the present invention.
EXAMPLE seven
An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for comparing the object code file package provided in any embodiment of the present invention, and the method includes:
receiving comparison task information, and acquiring a first target code file packet and a second target code file packet to be compared according to the comparison task information;
comparing the first target code file packet with the second target code file packet, and determining a target code file pair with changed content according to a comparison result;
decompiling the object code files in the object code file pair to obtain source code files corresponding to the object code files in the object code file pair;
and comparing the content of the source code file, generating a comparison report according to a comparison result, and visually displaying the content in the comparison report.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (13)

CN202110795160.XA2021-07-142021-07-14Target code file package comparison method, device, equipment, medium and systemPendingCN113435177A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202110795160.XACN113435177A (en)2021-07-142021-07-14Target code file package comparison method, device, equipment, medium and system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202110795160.XACN113435177A (en)2021-07-142021-07-14Target code file package comparison method, device, equipment, medium and system

Publications (1)

Publication NumberPublication Date
CN113435177Atrue CN113435177A (en)2021-09-24

Family

ID=77760435

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202110795160.XAPendingCN113435177A (en)2021-07-142021-07-14Target code file package comparison method, device, equipment, medium and system

Country Status (1)

CountryLink
CN (1)CN113435177A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113986235A (en)*2021-09-292022-01-28武汉众邦银行股份有限公司Method and device for monitoring code difference between production application package and actual test package
CN114416662A (en)*2022-01-252022-04-29中国农业银行股份有限公司File comparison method and device, electronic equipment and storage medium
CN114756239A (en)*2022-03-222022-07-15深圳壹账通创配科技有限公司 Code deployment method, apparatus, computer equipment and storage medium
CN115421764A (en)*2022-08-312022-12-02济南浪潮数据技术有限公司 A module identification method, device, equipment and storage medium to be upgraded
CN115906764A (en)*2022-12-132023-04-04合众新能源汽车股份有限公司File marking method, electronic device and medium
CN116483781A (en)*2023-03-142023-07-25中国工商银行股份有限公司 File comparison method based on traversal algorithm, its device, and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106250726A (en)*2016-08-102016-12-21深圳金澜汉源科技有限公司Software version state management-control method
CN106557695A (en)*2015-09-252017-04-05卓望数码技术(深圳)有限公司A kind of malicious application detection method and system
CN109271313A (en)*2018-08-132019-01-25中国平安财产保险股份有限公司Code test method, device and computer readable storage medium
CN109710519A (en)*2018-12-132019-05-03平安普惠企业管理有限公司Project variance reports generation method, device, computer equipment and storage medium
CN110045981A (en)*2018-01-142019-07-23北京关键科技股份有限公司A method of analytical technology is compared based on source code and establishes demand tracking relationship
CN110750252A (en)*2019-09-302020-02-04上海紫金信息技术有限公司Software development control method, software development equipment and storage medium
CN110826068A (en)*2019-11-012020-02-21海南车智易通信息技术有限公司Safety detection method and safety detection system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106557695A (en)*2015-09-252017-04-05卓望数码技术(深圳)有限公司A kind of malicious application detection method and system
CN106250726A (en)*2016-08-102016-12-21深圳金澜汉源科技有限公司Software version state management-control method
CN110045981A (en)*2018-01-142019-07-23北京关键科技股份有限公司A method of analytical technology is compared based on source code and establishes demand tracking relationship
CN109271313A (en)*2018-08-132019-01-25中国平安财产保险股份有限公司Code test method, device and computer readable storage medium
CN109710519A (en)*2018-12-132019-05-03平安普惠企业管理有限公司Project variance reports generation method, device, computer equipment and storage medium
CN110750252A (en)*2019-09-302020-02-04上海紫金信息技术有限公司Software development control method, software development equipment and storage medium
CN110826068A (en)*2019-11-012020-02-21海南车智易通信息技术有限公司Safety detection method and safety detection system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN113986235A (en)*2021-09-292022-01-28武汉众邦银行股份有限公司Method and device for monitoring code difference between production application package and actual test package
CN114416662A (en)*2022-01-252022-04-29中国农业银行股份有限公司File comparison method and device, electronic equipment and storage medium
CN114756239A (en)*2022-03-222022-07-15深圳壹账通创配科技有限公司 Code deployment method, apparatus, computer equipment and storage medium
CN115421764A (en)*2022-08-312022-12-02济南浪潮数据技术有限公司 A module identification method, device, equipment and storage medium to be upgraded
CN115906764A (en)*2022-12-132023-04-04合众新能源汽车股份有限公司File marking method, electronic device and medium
CN116483781A (en)*2023-03-142023-07-25中国工商银行股份有限公司 File comparison method based on traversal algorithm, its device, and electronic equipment

Similar Documents

PublicationPublication DateTitle
CN113435177A (en)Target code file package comparison method, device, equipment, medium and system
US10769228B2 (en)Systems and methods for web analytics testing and web development
US20190163919A1 (en)Amalgamating Code Vulnerabilities Across Projects
US20140279835A1 (en)Self-analyzing data processing job to determine data quality issues
US10379984B2 (en)Compliance testing through sandbox environments
CN106445485A (en)Software version consistency detection system and detection method thereof
CN108537042A (en)Self-defined plug-in unit generation method, device, equipment and storage medium
CN113114680B (en)Detection method and detection device for file uploading vulnerability
CN112199277A (en)Browser-based defect reproduction method, device, equipment and storage medium
US9348721B2 (en)Diagnosing entities associated with software components
US11119763B2 (en)Cognitive selection of software developer for software engineering task
CN114416537A (en)Unit testing method, server, client and storage medium
CN113918525A (en) Data exchange scheduling method, system, electronic device, medium and program product
US20170177635A1 (en)Automatic comparison of enterprise profile analytics
CN115080375A (en)Fault reason determination method, device and equipment
CN119474235B (en) Logging method, device, equipment and medium for data synchronization between systems
US20250298594A1 (en)Automated dependency management for application deployment
CN108021508A (en)A kind of computer software product quality control management system
US20240126927A1 (en)Ui/ux development system applied with blockchain for preventing forgery/falsification and forgery/falsification verification method using the same
CN119356709A (en) System change method, device, equipment, medium and program product
CN118797657A (en) Open source component scanning method, system, electronic device and storage medium
CN118606176A (en) Detection method, device, electronic device, medium and program product
CN118312695A (en)Page display method and device
CN119760697A (en) Target business verification method, electronic device and computer-readable storage medium
CN120596121A (en)Client API changing method, device, equipment and storage medium based on large model

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20210924


[8]ページ先頭

©2009-2025 Movatter.jp