Code difference report generation method and device, electronic equipment and medium
Through the automated code difference report generation method and the use of retrieval, comparison and generation modules, the problem of cumbersome and low efficiency in the code comparison process is solved, and efficient and accurate code difference report generation is achieved.
Patent Information
- Application Number
- CN202310907251.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-21
- Publication Date
- 2025-01-21
AI Technical Summary
In the prior art, the code comparison process is cumbersome, inefficient, and human operations are prone to errors due to subjective carelessness.
By providing a code difference report generation method, the retrieval module, comparison module and generation module are used to automatically retrieve and download the target files in the target database record, perform comparison and generate a code difference report.
It realizes the automatic generation of code difference reports, improves the generation efficiency and accuracy, and solves the problem of low manual processing efficiency and high error rate.
Smart Images

Figure CN119336384A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and medium for generating a code difference report. Background Art
[0002] As software functions are iterated, the code often needs to be modified. After making code modifications, each developer will upload the modified file to the database to form a database record for use and viewing.
[0003] In some scenarios, it is necessary to call up the database records of the problem for comparison to clarify the specific content of the modification. The current method is to manually search and download the files that need to be compared, compare them one by one to generate difference files, or manually retrieve the files that need to be compared and download them, and use comparison tools to compare them. The above methods all require manual processing, and the entire code comparison process is cumbersome and inefficient, and manual operations are prone to errors due to subjective carelessness. Summary of the invention
[0004] The present application provides a code difference report generation method, device, electronic device and medium to accurately and efficiently automatically generate a code difference report.
[0005] According to one aspect of the present application, a method for generating a code difference report is provided, the method comprising: retrieving a target library record according to user input information and configuration information, and downloading a target file in the target library record;
[0006] Compare the target files and determine the differences;
[0007] A code difference report is generated according to the difference content.
[0008] According to another aspect of the present application, a device for generating a code difference report is provided, the device comprising:
[0009] A retrieval module is used to retrieve target database records according to user input information and configuration information, and download target files in the target database records;
[0010] A comparison module is used to compare the target files and determine the differences;
[0011] A generating module is used to generate a code difference report according to the difference content.
[0012] According to another aspect of the present application, an electronic device is provided, the device comprising:
[0013] at least one processor; and
[0014] a memory communicatively connected to at least one processor; wherein,
[0015] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the code difference report generation method of any embodiment of the present application.
[0016] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the code difference report generation method of any embodiment of the present application when executed.
[0017] The technical solution of the embodiment of the present application can retrieve the target library record according to the user input information and configuration information, and download the target file in the target library record, and can adaptively retrieve the target library record and download the target file according to the preset information automatically, thereby improving efficiency. The target files are compared to determine the difference content; a code difference report is generated according to the difference content, thereby automatically generating a code difference report, solving the problem of low efficiency and high error rate of manual processing, thereby improving the generation efficiency and accuracy of the code difference report.
[0018] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a flowchart of a method for generating a code difference report according to Embodiment 1 of the present application;
[0021] Figure 2 This is a schematic diagram of an information input interface provided according to Embodiment 1 of the present application;
[0022] Figure 3 This is a schematic diagram of an information configuration interface provided according to Embodiment 1 of the present application;
[0023] Figure 4 is a flowchart of a method for generating a code difference report according to Embodiment 2 of the present application;
[0024] Figure 5 is a schematic diagram of an execution module provided according to Embodiment 2 of the present application;
[0025] Figure 6 is a flowchart of a method for generating a code difference report according to Embodiment 3 of the present application;
[0026] Figure 7 It is a structural schematic diagram of a code difference report generating device provided according to the fourth embodiment of the present application;
[0027] Figure 8 It is a structural schematic diagram of an electronic device provided according to Embodiment 5 of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", "third", "fourth", "actual", "preset", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Embodiment 1
[0031] Figure 1 This is a flowchart of a method for generating a code difference report provided in Example 1 of the present application. This example of the present application can be applied to the case of comparing files in code modification records. Typically, it can be applied to application scenarios where software development is performed based on a version control system, and the version control system can be an SVN system, a GIT system, etc. The method can be executed by a code difference report generating device, and the code difference report generating device can be implemented in the form of hardware and / or software, and the code difference report generating device can be configured in an electronic device. Figure 1 As shown, the method includes:
[0032] S110, searching the target library record according to the user input information and the configuration information, and downloading the target file in the target library record.
[0033] Among them, the user input information can be the information input by the first user through the user interaction interface, the user input information can be the information filled in by the first user, or the information selected and determined by the first user for the information displayed on the user interaction interface. The user input information can include the path for obtaining the upper library record and the target file, the description information of the upper library record, the version number of the upper library record, the generation path of the code difference report, etc. The description information of the upper library record is used to describe the software function, problem, purpose, etc. corresponding to the upper library record, and the version number of the upper library record is used to mark the version of the functional module corresponding to the upper library record. The configuration information can be fixed information or an optional information range pre-set by the second user, and the optional information range can be provided to the first user to select and determine the user input information. The configuration information can include user login information, a set of generation paths for code difference reports, a tool path for use, the format of the target file, a set of retrieval paths for target on-road records, etc. The first user and the second user can be the same user or different users.
[0034] The upload record is a record generated when the developer uploads the modified file to the library after modifying the code. The upload record can be stored in different databases through different paths. The target upload record is retrieved from the upload record according to the user input information and configuration information. The target file is retrieved from the target upload record according to the user input information and configuration information.
[0035] In an embodiment of the present application, user input information and configuration information can be obtained in advance, and the target library record that needs to be compared and analyzed can be found according to the adaptive retrieval of the user input information and configuration information. The target library record can be retrieved according to the path of the library record, the description information of the library record, the version number of the library record, the time of the library record, etc. The target library record may contain multiple files modified at one time, and multiple files can be compared as target files, or the target file that needs to be compared and analyzed can be retrieved from the target library record according to the user input information and configuration information, and the target file can be downloaded. The target file can be screened according to the file format, the type of file processing operation, the download path, etc.
[0036] In the embodiment of the present application, the method further includes: A1-A2:
[0037] A1: Display the information input interface and information configuration interface on the front page;
[0038] A2: generating user input information in response to a user operation on the information input interface, and generating configuration information in response to a user operation on the information configuration interface.
[0039] For example, Figure 2 and Figure 3 As shown, Figure 2 This is a schematic diagram of the information input interface. Figure 3 This is a schematic diagram of an information configuration interface. An information input interface and an information configuration interface can be designed in the front-end page and displayed to the user. The first user inputs information on the information input interface or selects an option displayed in a drop-down box on the information input interface. User input information is generated in response to the first user's operation on the information input interface. For example, Figure 2 As shown, the user can select the library record path in the library record path drop-down box, and the specific content of the library record path will be displayed in the text box on the right. The user can select "Library record description" or "Library record version number" in the drop-down box corresponding to the search condition. If "Library record description" is selected, fill in the library record description text in the text box on the right. If "Library record version number" is selected, fill in the library record version number in the text box on the right. The user can set the code difference report generation path, and can search according to the user input information after the first user clicks confirm, and display the retrieved target library record on the information input interface, and display the difference code amount. The second user can configure information on the information configuration interface, and generate configuration information in response to the second user's operation on the information configuration interface. Exemplary, such as Figure 3 As shown, the login information can be configured. The first user can operate in the information input interface only after entering the login information and passing the verification. The code difference report generation path can be configured, and the storage path can be pre-set. The tool path can be configured to call the tool based on the path. The target format is used to filter files in the target library records. For example, in the front-end development application scenario, the target file format only supports "*.js, *.php, *.html, *.xml" and other formats. In the back-end development application scenario, the target file format only supports "*.c, *.h, *.cxx, *.cpp" and other formats. The commonly used code path can be a pre-set path for retrieving library records as a Figure 2 Optional items in the drop-down box of the middle and upper library record path.
[0040] S120: Compare the target files to determine the differences.
[0041] The comparison process may be layer-by-layer, for example, first comparing the upper directory, then comparing the lower directory, then comparing the lower directory of the lower directory, and so on. In each level of comparison, the difference content is determined.
[0042] In an embodiment of the present application, the comparison process can also be adaptively executed based on user input information and configuration information, such as determining the folder where the target file to be compared is stored, the type of code difference report generated, whether to extract all difference codes or part of the difference codes, etc. The user can input and set it through the user interaction interface of the front end, and perform the comparison process based on the user input information and configuration information generated by the user input and setting operations, so as to realize customized automatic comparison.
[0043] S130: Generate a code difference report according to the difference content.
[0044] In the embodiment of the present application, the difference content is extracted to generate a code difference report, thereby realizing automatic extraction of the difference content and automatic generation of the code difference report, thereby improving the generation efficiency of the code difference report.
[0045] Specifically, only the difference content may be extracted, or the code segment containing the difference content may be extracted, and the extracted content may be placed in the same file for comparison to obtain a code difference report.
[0046] In the embodiment of the present application, a code difference report is generated according to the difference content, including B1-B2:
[0047] B1: Determine the report type and report storage path according to user input information and configuration information;
[0048] B2: extracting folder difference content, file difference content and difference code amount, and generating a code difference report based on the report type according to the folder difference content, file difference content and difference code amount, and storing it based on the report storage path.
[0049] Exemplarily, the user input information and configuration information may include a report type and a report storage path. The report type is used to specify the file type of the generated code difference report. The report storage path is used to specify the path for storing the code difference report. When comparing the target files, the comparison can be done level by level. First, the folder differences are compared to determine the folder difference content, and then the files are compared to determine the file difference content, and then the difference code amount is counted. The content of the code difference report is formed based on the folder difference content, the file difference content and the difference code amount, and a code difference report that conforms to the report type is generated based on the report type. The generated code difference report is stored based on the report storage path. The above scheme can adaptively generate and store code difference reports based on user input information and configuration information, solves the problem of low efficiency and error-prone manual execution, and improves the efficiency of code difference report generation and storage.
[0050] The technical solution of the embodiment of the present application can retrieve the target library record according to the user input information and configuration information, and download the target file in the target library record, and can adaptively retrieve the target library record and download the target file according to the preset information automatically, thereby improving efficiency. The target files are compared to determine the difference content; a code difference report is generated according to the difference content, thereby automatically generating a code difference report, solving the problem of low efficiency and high error rate of manual processing, thereby improving the generation efficiency and accuracy of the code difference report.
[0051] Embodiment 2
[0052] Figure 4 This is a flowchart of a method for generating a code difference report provided in Example 2 of this application. This embodiment of this application is optimized based on the above embodiment. For solutions not described in detail in this embodiment of this application, please refer to the above embodiment. Figure 4 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0053] S210: Determine target identification information, target download path, and target file type according to user input information and configuration information.
[0054] The target identification information may be information used to indicate the uniqueness of the database record, such as the database record description, the problem number of the database record, the database record version number, the database time, etc. The target download path may be a path used to retrieve the database record and download the target file. The target file type is used to filter files according to the file type. For example, in the front-end development application scenario, the target file type may be "*.js, *.php, *.html, *.xml", etc., and in the back-end development application scenario, the target file type may be "*.c, *.h, *.cxx, *.cpp", etc.
[0055] Exemplarily, the target identification information, the target download path and the target file type may be determined according to the user input information and the configuration information, and the uploaded records and files may be customized and screened.
[0056] S220: Retrieve the target library record corresponding to the target identification information based on the target download path.
[0057] Exemplarily, the corresponding target upper library record can be retrieved and determined according to the target identification information, so as to quickly retrieve the upper library record that needs to be compared. For example, if the target identification information includes the upper library record description information, the upper library record description is matched with the description of the upper library record in the target download path, and the upper library record that successfully matches is used as the target upper library record. If the target identification information contains the upper library record version number, the upper library record version number is matched with the version number of the upper library record in the target download path, and the upper library record that successfully matches is used as the target upper library record. And so on.
[0058] S230: Download the target file that meets the target file type from the target library record.
[0059] For example, there may be files in the target library records that are not files that can be used for comparison, or there may be files that are not files that the user needs to compare. Therefore, the files can be filtered according to the target file type, target files that meet the target file type can be found, and the target files can be downloaded for subsequent comparison.
[0060] S240: Compare the target files to determine the differences.
[0061] S250: Generate a code difference report according to the difference content.
[0062] For example, Figure 5 As shown, in the embodiment of the present application, the above process can be performed by the following modules respectively:
[0063] Interaction module: provides UI interface selection, configuration and function triggering entry. The UI interface is as follows Figure 2 and Figure 3 shown.
[0064] Check module: Verify the legitimacy of the information entered by the user on the UI interface and the account and password. After the verification, it will be handed over to the control module for processing. If the verification fails, the task will be terminated and a pop-up window will be displayed to prompt the corresponding error code and reason.
[0065] File generation module: used to retrieve target database records and download target files.
[0066] File comparison module: compares the target files and counts the amount of different codes.
[0067] Configuration module: After the configuration information input by the user received by the interaction module is verified by the inspection module and sent to the control module, it is sent to the configuration module for updating and saving.
[0068] Control module: This module is the core functional module, responsible for scheduling and processing the data input by the user, and generating a code difference report based on the comparison results of the file comparison module.
[0069] The embodiment of the present application provides a method for generating a code difference report, which determines the target identification information, the target download path, and the target file type according to the user input information and configuration information; retrieves the target library record corresponding to the target identification information based on the target download path; and downloads the target file that meets the target file type from the target library record. The above scheme can customize the retrieval of the target library record and download the target file according to the user input information and configuration information, thereby realizing the automatic retrieval and downloading of the target file without the need for manual search and downloading. The target files are compared to generate a code difference report, thereby realizing the customized automatic generation of the code difference report, solving the problem of low efficiency and error-prone manual comparison, and improving the efficiency and accuracy of code difference report generation.
[0070] Embodiment 3
[0071] Figure 6 This is a flowchart of a method for generating a code difference report provided in Example 3 of this application. This embodiment of the application is optimized based on the above embodiment. For solutions not described in detail in the embodiment of this application, please refer to the above embodiment. Figure 6 As shown, the method of the embodiment of the present application specifically includes the following steps:
[0072] S310, retrieving target database records according to user input information and configuration information.
[0073] S320: Obtain the processing operation type and version information corresponding to the target file.
[0074] Exemplarily, the upload record records relevant information corresponding to the file, such as the time when the file was uploaded, the type of processing operation of the file, version information, etc. After downloading the target file, the type of processing operation and version information corresponding to the target file can be found through the upload record.
[0075] S330. Download the target file to a first folder or a second folder according to the processing operation type and version information; wherein the first folder is used to store the target file before the processing operation, and the second folder is used to store the target file after the processing operation.
[0076] For example, the first folder is used to store the target file before the processing operation, which can be named "old", and the second folder is used to store the target file after the processing operation, which can be named "new". The target files before and after the processing operation are stored in different folders, respectively, so as to facilitate the distinction of the target files and the targeted comparison of the target files in the two folders.
[0077] Exemplarily, it can be determined whether the target file should be downloaded to the first folder or the second folder according to the processing operation type and version information corresponding to the target file. The processing operation type may include an add operation, a modify operation, and a delete operation. The add operation is to add the target file, the modify operation is to modify the target file, and the delete operation is to delete the target file.
[0078] In an embodiment of the present application, downloading the target file to the first folder or the second folder according to the processing operation type and the version information includes:
[0079] If the processing operation type is an adding type, downloading the target file to the second folder;
[0080] If the first folder contains a historical file, deleting the historical file in the first folder; wherein the historical file is a file with the same file name as the target file;
[0081] If the processing operation type is a modification type, downloading the target file to the second folder;
[0082] If the first folder does not contain the historical file, determine the previous version of the target file according to the version information, and download the previous version of the file to the first folder;
[0083] If the processing operation type is a deletion type, downloading the target file to the first folder;
[0084] If the second folder contains the historical file, the historical file in the second folder is deleted.
[0085] Exemplary, if the processing operation type of the target file is an add operation, it is determined that there should be no target file before the processing operation, and there should be a target file after the processing operation, and the target file is downloaded to the second folder. However, since different users operate in parallel without affecting each other, there may be other users who have already processed the file and stored the historical file in the first folder. If the first folder contains historical files, in order to more intuitively and accurately represent the processing process, the historical files in the first folder can be deleted to clearly represent the adding process of the target file this time, so as to facilitate the comparison of the first folder with the second folder to determine the difference content. If the processing operation type of the target file is a modify operation, the target file after the modify operation is downloaded to the second folder. If the processing operation type is a modify operation, it is determined that there should be a historical file before the processing operation, and there should be a target file after the processing operation. Find whether the first folder contains historical files. If the first folder does not contain historical files, find the previous version file of the target file from the upper library record according to the version information, and download the previous version file in the first folder to form a comparison with the target file in the second folder. If the processing operation type is a delete type, the target file is downloaded in the first folder. There should be no historical files in the second folder. If the historical file is found in the second folder, the historical file in the second folder is deleted, so that the first folder contains the target file and the second folder does not contain the historical file, indicating that this processing operation is a deletion operation.
[0086] S340: Compare the files in the first folder with the files in the second folder to determine the differences.
[0087] User in Figure 2 Enter the corresponding information in the interface shown and click Confirm to compare the files in the first folder with the files in the second folder to determine the differences.
[0088] Specifically, a layer-by-layer comparison can be performed to gradually identify whether there are differences in each layer of file directories. For example, first compare whether there are differences in folders, then compare whether there are differences in files in the folders, and then identify the number of added, modified, and deleted codes, and count the number of codes.
[0089] S350: Generate a code difference report according to the difference content.
[0090] The embodiment of the present application provides a method for generating a code difference report, which obtains the processing operation type and version information corresponding to the target file; according to the processing operation type and version information, the target library record is retrieved according to the user input information and configuration information, and the target file is downloaded to the first folder or the second folder, so as to distinguish the files before the processing operation and the files after the processing operation, so as to facilitate the subsequent targeted comparison of the two folders to determine the difference content. The files in the first folder and the files in the second folder are compared to determine the difference content; a code difference report is generated according to the difference content. The above scheme can facilitate subsequent targeted comparison by setting two folders to respectively save the files before the processing operation and the files after the processing operation, solves the problem of low efficiency and error-prone manual file downloading, and realizes the customized retrieval of target library records, downloading of target files and automatic generation of code difference reports according to user input information and configuration information, thereby improving the efficiency and accuracy of code difference report generation.
[0091] Embodiment 4
[0092] Figure 7 This is a schematic diagram of the structure of a code difference report generation device provided in the fourth embodiment of the present application. The device can execute the code difference report generation method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. Figure 7 As shown, the device comprises:
[0093] The retrieval module 410 is used to retrieve the target library record according to the user input information and the configuration information, and download the target file in the target library record;
[0094] The comparison module 420 is used to compare the target files and determine the differences;
[0095] The generating module 430 is used to generate a code difference report according to the difference content.
[0096] In the embodiment of the present application, the search module 410 includes:
[0097] An information determination unit, used to determine target identification information, target download path and target file type according to user input information and configuration information;
[0098] A target library record retrieval unit, used to retrieve the target library record corresponding to the target identification information based on the target download path;
[0099] The target file downloading unit is used to download the target file that meets the target file type from the target library record.
[0100] In the embodiment of the present application, the search module 410 includes:
[0101] An acquisition unit, used to acquire a processing operation type and version information corresponding to the target file;
[0102] The download unit is used to download the target file to a first folder or a second folder according to the processing operation type and version information; wherein the first folder is used to store the target file before the processing operation, and the second folder is used to store the target file after the processing operation.
[0103] In the embodiment of the present application, the downloading unit includes:
[0104] An adding file downloading subunit is used to download the target file to the second folder if the processing operation type is an adding type;
[0105] a deleting unit, configured to delete the historical file in the first folder if the first folder contains the historical file; wherein the historical file is a file with the same file name as the target file;
[0106] A modification file downloading subunit, configured to download the target file to the second folder if the processing operation type is a modification type;
[0107] A previous version file downloading subunit is used to determine the previous version file of the target file according to the version information if the first folder does not contain the historical file, and download the previous version file into the first folder;
[0108] A deletion file downloading unit, configured to download the target file to the first folder if the processing operation type is a deletion type;
[0109] The history file deletion subunit is used to delete the history file in the second folder if the second folder contains the history file.
[0110] In the embodiment of the present application, the comparison module 420 includes:
[0111] The difference content determination unit is used to compare the files in the first folder with the files in the second folder to determine the difference content.
[0112] In the embodiment of the present application, the generation module 430 includes:
[0113] An information determination unit, used to determine a report type and a report storage path according to user input information and configuration information;
[0114] The report generation and storage unit is used to extract the folder difference content, file difference content and difference code amount, and generate a code difference report based on the folder difference content, file difference content and difference code amount based on the report type, and store it based on the report storage path.
[0115] In the embodiment of the present application, the device further includes:
[0116] The interface display module is used to display the information input interface and information configuration interface on the front-end page;
[0117] The response module is used to generate user input information in response to the user's operation on the information input interface, and to generate configuration information in response to the user's operation on the information configuration interface.
[0118] A code difference report generating device provided in an embodiment of the present application can execute a code difference report generating method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
[0119] Embodiment 5
[0120] Figure 8 A schematic diagram of an electronic device 10 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0121] like Figure 8 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0122] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0123] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a code difference report generation method.
[0124] In some embodiments, the code difference report generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the code difference report generation method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the code difference report generation method in any other appropriate manner (for example, by means of firmware).
[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable code difference report generating device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0127] In the context of the present application, a computer readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device or equipment. A computer readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer readable storage medium may be a machine readable signal medium. A more specific example of a machine readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0129] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0130] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the information expected by the technical solution of this application can be achieved, and this document is not limited here.
[0132] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for generating a code difference report, characterized in that: The method comprises: Retrieve the target database record according to the user input information and configuration information, and download the target file in the target database record; Compare the target files and determine the differences; A code difference report is generated according to the difference content.
2. The method according to claim 1, characterized in that Retrieve the target database record based on the user input information and configuration information, and download the target file in the target database record, including: Determine target identification information, target download path and target file type according to user input information and configuration information; Retrieving the target database record corresponding to the target identification information based on the target download path; Download the target file that meets the target file type from the target library record.
3. The method according to claim 1, characterized in that Download the target files in the target library record, including: Obtaining the processing operation type and version information corresponding to the target file; According to the processing operation type and version information, the target file is downloaded to a first folder or a second folder; wherein the first folder is used to store the target file before the processing operation, and the second folder is used to store the target file after the processing operation.
4. The method according to claim 3, characterized in that Downloading the target file to the first folder or the second folder according to the processing operation type and the version information includes: If the processing operation type is an adding type, downloading the target file to the second folder; If the first folder contains a historical file, deleting the historical file in the first folder; wherein the historical file is a file with the same file name as the target file; If the processing operation type is a modification type, downloading the target file to the second folder; If the first folder does not contain the historical file, determine the previous version of the target file according to the version information, and download the previous version of the file to the first folder; If the processing operation type is a deletion type, downloading the target file to the first folder; If the second folder contains the historical file, the historical file in the second folder is deleted.
5. The method according to claim 3 or 4, characterized in that: Compare the target files and determine the differences, including: Compare the files in the first folder with the files in the second folder to determine the differences.
6. The method according to claim 1, characterized in that Generate a code difference report based on the difference content, including: Determine the report type and report storage path according to user input information and configuration information; Extract the folder difference content, file difference content and difference code amount, generate a code difference report based on the folder difference content, file difference content and difference code amount based on the report type, and store it based on the report storage path.
7. The method according to claim 1, characterized in that The method further comprises: Display the information input interface and information configuration interface on the front-end page; The user input information is generated in response to the user's operation on the information input interface, and the configuration information is generated in response to the user's operation on the information configuration interface.
8. A code difference report generating device, characterized in that: The device comprises: A retrieval module is used to retrieve target database records according to user input information and configuration information, and download target files in the target database records; A comparison module is used to compare the target files and determine the differences; A generating module is used to generate a code difference report according to the difference content.
9. An electronic device, characterized in that: The device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the code difference report generating method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the code difference report generation method according to any one of claims 1 to 7 when executed.