Incremental file updating method and device
Through automatic analysis and replication of incremental files, the problem that cannot be quickly deployed during the code deployment process in the existing technology, simplifying the workload of personnel and improving the processing efficiency.
Patent Information
- Application Number
- CN201910853266.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-10
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2039-09-10
AI Technical Summary
In the existing technology, the manual coverage and full update of compiled code cannot be deployed quickly during the code deployment process, resulting in large workloads and low processing efficiency for R&D and testers.
By obtaining the target incremental file and its file path, analyze the file path to obtain project information, generate the compiled file path according to the project information and preset compilation rules, and copy it to the target storage path.
Simplified the workload of R & D and testers, realized the rapid deployment of the code, and improved the processing efficiency and problem solving speed.
Smart Images

Figure CN112559019B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a method and device for updating incremental files. Background Art
[0002] In the process of software product development, in order to modify program vulnerabilities (bugs) or release new functions, developers need to modify and update the published code, and send the modified or added code to the tester after compilation, so that the tester can update the code in the test environment and perform deployment verification. In the prior art, the deployment of code can be done by manual coverage or full update of compiled code. Manual coverage requires developers to copy the modified and added code to a text text after compilation, and send the text text to the tester. The tester copies the code to the corresponding directory according to the text text record, and then performs test verification. However, the manual coverage method increases the workload of developers and testers; although the full update of compiled code method does not require manual coverage, the full update of compiled code method takes a long time, and if other developers submit code during deployment, it needs to be fully updated again. Therefore, both manual coverage and full update of compiled code methods cannot be deployed quickly, reducing processing efficiency. Summary of the invention
[0003] The embodiment of the present disclosure provides an incremental file update method and device, which can not only simplify the workload of R&D personnel and testers, but also enable rapid deployment and improve processing efficiency. The technical solution is as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a method for updating an incremental file is provided, the method comprising:
[0005] Obtain the target incremental file and the first file path of the target incremental file;
[0006] Parse the first file path to obtain project information of the target project corresponding to the target incremental file;
[0007] According to the project information of the target project, the first file path and the preset compilation rule, a second file path of the target compiled file is obtained, where the target compiled file is the compiled target incremental file;
[0008] Generate a target storage path according to the project information of the target project and the second file path;
[0009] Store the target compiled file in the folder corresponding to the target storage path.
[0010] The disclosed embodiment analyzes incremental files and automatically copies files that need to be incremental according to the project directory structure, thereby simplifying the workload of R&D personnel and testers, and can be quickly deployed in a test environment, thereby improving problem solving speed and processing efficiency.
[0011] In one embodiment, the target compiled file includes at least one; copying the target compiled file to a folder corresponding to the target storage path includes:
[0012] Copy each target compilation file in the at least one target compilation file to a folder corresponding to the target storage path.
[0013] In one embodiment, obtaining the target incremental file includes:
[0014] Receiving a first touch operation from a user;
[0015] The target incremental file is determined according to the user's first touch operation.
[0016] In one embodiment, before obtaining the target incremental file, the method further includes: registering an incremental update component.
[0017] According to a second aspect of an embodiment of the present disclosure, there is provided a device for updating an incremental file, comprising:
[0018] An acquisition module, used to acquire a target incremental file and a first file path of the target incremental file;
[0019] A parsing module, used to parse the first file path to obtain project information of a target project corresponding to the target incremental file;
[0020] A processing module, used to obtain a second file path of a target compiled file according to the project information of the target project, the first file path and a preset compilation rule, where the target compiled file is a compiled target incremental file;
[0021] A generation module, used for generating a target storage path according to the project information of the target project and the second file path;
[0022] The storage module is used to store the target compiled file in the folder corresponding to the target storage path.
[0023] In one embodiment, the target compilation file includes at least one;
[0024] The storage module is used to copy each target compilation file in the at least one target compilation file to a folder corresponding to the target storage path.
[0025] In one embodiment, the acquisition module includes:
[0026] A receiving submodule, used for receiving a first touch operation of a user;
[0027] The determination submodule is used to determine the target incremental file according to the user's first touch operation.
[0028] In one embodiment, the incremental file updating device further includes: a registration module;
[0029] Registration module, used to register incremental update components.
[0030] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0032] Figure 1 is a flow chart of an incremental file updating method provided by an embodiment of the present disclosure;
[0033] Figure 2 It is a structural diagram of an incremental file updating device provided by an embodiment of the present disclosure;
[0034] Figure 3 It is a structural diagram of an incremental file updating device provided by an embodiment of the present disclosure;
[0035] Figure 4 It is a structural diagram of an incremental file updating device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0036] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0037] The present disclosure provides a method for updating an incremental file. Figure 1 As shown, the incremental file updating method includes the following steps:
[0038] 101. Obtain a target incremental file and a first file path of the target incremental file.
[0039] In the disclosed embodiment, before obtaining the target incremental file, an incremental file component is registered. The incremental file component is a component for incremental copying and can be integrated into the right button of a mouse. Obtaining the target incremental file includes: obtaining the user's touch operation, and determining the target incremental file according to the user's touch operation. The user's touch operation includes operations such as clicking, sliding, touching, and scrolling.
[0040] Exemplarily, when the target incremental file is a file, the user selects the target incremental file by clicking the left mouse button, and then right-clicks the mouse. "Incremental File" appears in the right-click menu list. Clicking "Incremental File" points to a specific batch file, and the first file path of the target incremental file is obtained by calling the executable program generated by the Python script. When the target incremental file is a folder, the user selects the target incremental file by clicking the left mouse button, and then right-clicks the mouse. "Incremental Folder" appears in the right-click menu list. Clicking "Incremental Folder" points to a specific batch file, and the first file path of the target incremental file is obtained by calling the executable program generated by the Python script. It should be noted that the target incremental file refers to any incremental file or incremental folder. The present disclosure only takes the target incremental file as an example to illustrate how to update the incremental file or incremental folder. The target does not represent any limitation.
[0041] 102. Parse the first file path to obtain project information of the target project corresponding to the target incremental file.
[0042] The project information of the target project includes the name, logo, development information, etc. of the target project. The purpose of obtaining the project information of the target project is to determine the path of the compiled file according to the project information of the target project.
[0043] 103. Obtain a second file path of a target compiled file according to the project information of the target project, the first file path, and a preset compilation rule.
[0044] The target compiled file is the compiled target incremental file. For example, when the target incremental file is a Java file and contains multiple classes, since each class corresponds to a class file, the compiled target incremental file, i.e., the target compiled file, contains multiple class files. If the first file path of the target incremental file is:
[0045] D:\work\huanjing\fad_license\src\main\java\com\elink\license\impl\LicenseServiceImpl.java, the second file path after compilation is:
[0046] D:\work\huanjing\fad_license\target\fad_license-1.0\WEB-INF\classes\com\elink\license\impl\LicenseServiceImpl.class.
[0047] 104. Generate a target storage path according to the project information of the target project and the second file path.
[0048] In the embodiment of the present disclosure, according to the project information of the target project and the second file path, a target file structure consistent with the test environment or the production environment can be generated to facilitate automatic replication of incremental files. According to the example shown in step 103, the target storage path is:
[0049] C:\xiangMuGengXin\20190523
No need to restart
Problem description
[0050] 105. Copy the target compiled file to the folder corresponding to the target storage path.
[0051] According to the description of steps 103 and 104, when the target compiled file includes at least one, copying the target compiled file to the folder corresponding to the target storage path includes: copying each target compiled file in the at least one target compiled file to the folder corresponding to the target storage path. After the incremental code is copied out in a specific directory, the developer can briefly describe the problem to be solved in the folder and provide it to the tester for coverage deployment. After the tester tests and finds no problem, it is provided to the online personnel for coverage deployment and online release.
[0052] The incremental file updating method provided by the disclosed embodiment obtains the target incremental file and the first file path of the target incremental file; parses the first file path to obtain the project information of the target project corresponding to the target incremental file; obtains the second file path of the target compiled file according to the project information of the target project, the first file path and the preset compilation rule; generates the target storage path according to the project information and the second file path of the target project; and copies the target compiled file to the folder corresponding to the target storage path. The disclosed embodiment automatically copies the files that need to be incremented according to the project directory structure by analyzing the incremental files, thereby simplifying the workload of R&D personnel and testers, and can be quickly deployed in the test environment, improving the problem solving speed and processing efficiency.
[0053] Based on the above Figure 1The incremental file updating method described in the corresponding embodiment is as follows: an embodiment of the device disclosed herein, which can be used to execute the method embodiment of the disclosed embodiment.
[0054] The present disclosure provides a device for updating incremental files. Figure 2 As shown, the incremental file updating device 20 includes: an acquisition module 201, a parsing module 202, a processing module 203, a generation module 204 and a storage module 205;
[0055] An acquisition module 201 is used to acquire a target incremental file and a first file path of the target incremental file;
[0056] A parsing module 202 is used to parse the first file path to obtain project information of a target project corresponding to the target incremental file;
[0057] Processing module 203, used to obtain a second file path of a target compiled file according to the project information of the target project, the first file path and the preset compilation rule, where the target compiled file is a compiled target incremental file;
[0058] A generating module 204, configured to generate a target storage path according to the project information of the target project and the second file path;
[0059] The storage module 205 is used to store the target compiled file in a folder corresponding to the target storage path.
[0060] In one embodiment, the target compilation file includes at least one;
[0061] The storage module 205 is configured to copy each target compiled file in the at least one target compiled file to a folder corresponding to a target storage path.
[0062] In one embodiment, Figure 3 As shown, the acquisition module 201 includes: a receiving submodule 2011 and a determining submodule 2012;
[0063] The receiving submodule 2011 is used to receive a first touch operation of the user;
[0064] The determination submodule 2012 is used to determine the target incremental file according to the user's first touch operation.
[0065] In one embodiment, Figure 4 As shown, the incremental file updating device 20 further includes: a registration module 206;
[0066] The registration module 206 is used to register the incremental update component.
[0067] The incremental file updating device provided by the disclosed embodiment obtains the target incremental file and the first file path of the target incremental file; parses the first file path to obtain the project information of the target project corresponding to the target incremental file; obtains the second file path of the target compiled file according to the project information of the target project, the first file path and the preset compilation rule; generates the target storage path according to the project information and the second file path of the target project; and copies the target compiled file to the folder corresponding to the target storage path. The disclosed embodiment automatically copies the files that need to be incremented according to the project directory structure by analyzing the incremental files, thereby simplifying the workload of R&D personnel and testers, and can be quickly deployed in the test environment, improving the problem solving speed and processing efficiency.
[0068] Based on the above Figure 1 In accordance with the incremental file update method described in the corresponding embodiment, the embodiment of the present disclosure further provides a computer-readable storage medium, for example, a non-temporary computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The storage medium stores computer instructions for executing the above Figure 1 The incremental file updating method described in the corresponding embodiment will not be repeated here.
[0069] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
Claims
1. A method for updating an incremental file, characterized in that: The method comprises: Obtain a target incremental file and a first file path of the target incremental file, wherein the first file path is obtained by calling an executable program; Parse the first file path to obtain project information of the target project corresponding to the target incremental file; According to the project information of the target project, the first file path and the preset compilation rule, a second file path of a target compiled file is obtained, wherein the target compiled file is the compiled target incremental file; Generate a target storage path according to the project information of the target project and the second file path; The target compiled file is stored in a folder corresponding to the target storage path.
2. The method according to claim 1, characterized in that The target compiled file includes at least one; and copying the target compiled file to a folder corresponding to the target storage path includes: Copy each target compiled file in the at least one target compiled file to a folder corresponding to the target storage path.
3. The method according to claim 1, characterized in that The obtaining of the target incremental file comprises: Receiving a first touch operation from a user; The target incremental file is determined according to the user's first touch operation.
4. The method according to claim 1, characterized in that: Before obtaining the target incremental file, the method further includes: registering an incremental update component.
5. An incremental file updating device, characterized in that: include: An acquisition module, used to acquire a target incremental file and a first file path of the target incremental file, wherein the first file path is acquired by calling an executable program; A parsing module, used to parse the first file path to obtain project information of a target project corresponding to the target incremental file; A processing module, configured to obtain a second file path of a target compiled file according to the project information of the target project, the first file path and a preset compilation rule, wherein the target compiled file is the compiled target incremental file; A generating module, configured to generate a target storage path according to the project information of the target project and the second file path; The storage module is used to store the target compiled file in a folder corresponding to the target storage path.
6. The device according to claim 5, characterized in that The target compiled file includes at least one; The storage module is used to copy each target compiled file in the at least one target compiled file to a folder corresponding to the target storage path.
7. The device according to claim 5, characterized in that The acquisition module comprises: A receiving submodule, used for receiving a first touch operation of a user; A determination submodule is used to determine the target incremental file according to the user's first touch operation.
8. The device according to claim 5, characterized in that The incremental file updating device further includes: a registration module; The registration module is used to register the incremental update component.
Citation Information
Patent Citations
Information update method and device, server and system
CN108874409A