File processing method, device, computer equipment, storage medium and program product

By automatically obtaining and compressing the latest code and version information of the device web page, the problem of low intelligence in the existing technology is solved and a more efficient file processing process is achieved.

CN114328405BActive Publication Date: 2025-03-25LONGSE ELECTRONICS
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111464730.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2025-03-25
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

In the prior art, front-end developers of device web pages need to manually obtain version information and log information corresponding to the latest code and compress it, resulting in low intelligence.

Method used

Provides a file processing method, which obtains the original latest code from the remote code repository through the code type and version repository branch input by the user, and automatically obtains its corresponding version information and log information. Finally, the code and information are compressed to generate a code compression package.

Benefits of technology

It improves the intelligence of obtaining the code information corresponding to the original latest code and obtaining the code compression package, reduces manual intervention and improves efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114328405B_ABST
    Figure CN114328405B_ABST
Patent Text Reader

Abstract

The present application relates to a file processing method, device, computer equipment, storage medium and program product, and belongs to the field of artificial intelligence technology. The method comprises: obtaining the original latest code from a remote code repository according to the code type and version repository branch input by the user; obtaining the code information corresponding to the original latest code based on the original latest code, and the code information includes the version information and log information corresponding to the original latest code; compressing the original latest code and the code information to obtain a code compression package for the user to download the code compression package. The use of this method can improve the intelligence of obtaining the code information corresponding to the original latest code and obtaining the code compression package.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a file processing method, device, computer equipment, storage medium and program product. Background Art

[0002] When the device webpage needs to be updated to the latest version, the front-end developer of the device webpage needs to obtain the latest code corresponding to the device webpage from the remote warehouse, and needs to compress the latest code and the version information and log information corresponding to the latest code together to obtain a code compression package, and provide the user with the code compression package for downloading and viewing. However, in the prior art, the version information and log information corresponding to the latest code are obtained manually, and the latest code and the version information and log information corresponding to the latest code are compressed manually, so the prior art is not very intelligent. Summary of the invention

[0003] Based on this, it is necessary to provide a file processing method, device, computer equipment, storage medium and program product to address the above technical problems.

[0004] In a first aspect, the present application provides a file processing method, the method comprising: obtaining the original latest code from a remote code repository based on the code type and version repository branch input by a user; based on the original latest code, obtaining the code information corresponding to the original latest code, the code information including the version information and log information corresponding to the original latest code; compressing the original latest code and the code information to obtain a code compression package for the user to download the code compression package.

[0005] In one of the embodiments, code information corresponding to the original latest code is obtained, including: if the original latest code has not been obtained within a preset time before the current moment, the plug-in version in the original latest code is read to generate a plug-in version number, and the release time of the original latest code is used to generate a front-end version number; the obtained plug-in version number and front-end version number are used as version information.

[0006] In one embodiment, the method further includes: if the original latest code has been obtained within a preset time period before the current moment, the plug-in version number and the front-end version number obtained when the original latest code was historically obtained are used as the version information of the original latest code obtained at the current moment.

[0007] In one embodiment, obtaining code information corresponding to the original latest code includes: generating a code version log according to the code release time of the original latest code and user account information, and using the code version log as log information.

[0008] In one of the embodiments, after obtaining the code information corresponding to the original latest code, the method also includes: displaying the code information corresponding to the original latest code in the target interface; correspondingly, compressing the original latest code and the code information to obtain a code compression package, including: if a modification instruction for the code information is received based on the target interface, compressing the modified code information and the original latest code to obtain a code compression package.

[0009] In one of the embodiments, the original latest code and code information are compressed to obtain a code compression package, including: deleting the code that does not match the code type in the original latest code according to the code type to obtain the target code; compressing the target code and code information to obtain the code compression package.

[0010] In one of the embodiments, the target code and code information are compressed to obtain a code compression package, including: using a code compression tool to compress the CSS code and JS code in the target code to obtain a compressed code; compressing the compressed code and code information to obtain a code compression package.

[0011] In one of the embodiments, after compressing the original latest code and code information to obtain a code compression package, the method also includes: obtaining a compression status corresponding to the code compression package according to the code compression package; storing the code release time, user account information, code type, version repository branch, compression status and version information and log information corresponding to the original latest code in a database for user viewing.

[0012] In one of the embodiments, after obtaining the original latest code from the remote code repository, the method further includes: testing the original latest code, and the testing includes local testing and online testing.

[0013] In the second aspect, the present application also provides a file processing device, which includes: a first acquisition module, used to obtain the original latest code from a remote code repository according to the code type and version repository branch input by the user; a second acquisition module, used to obtain the code information corresponding to the original latest code based on the original latest code, the code information includes version information and log information corresponding to the original latest code; a compression module, used to compress the original latest code and the code information to obtain a code compression package for the user to download the code compression package.

[0014] In one of the embodiments, the second acquisition module is specifically used to: if the original latest code has not been obtained within a preset time before the current moment, read the plug-in version in the original latest code to generate a plug-in version number, and use the release time of the original latest code to generate a front-end version number; and use the obtained plug-in version number and front-end version number as version information.

[0015] In one of the embodiments, the device also includes: a version information determination module, which is used to use the plug-in version number and front-end version number obtained when the original latest code was historically obtained as the version information of the original latest code obtained at the current moment if the original latest code has been obtained within a preset time period before the current moment.

[0016] In one of the embodiments, the second acquisition module is specifically used to generate a code version log according to the code release time of the original latest code and the user account information, and use the code version log as the log information.

[0017] In one of the embodiments, the device also includes: a display module, used to display the code information corresponding to the original latest code in the target interface; a compression module, specifically used to: if a modification instruction for the code information is received based on the target interface, the modified code information and the original latest code are compressed to obtain a code compression package.

[0018] In one of the embodiments, the compression module is specifically used to: delete the code that does not match the code type in the original latest code according to the code type to obtain the target code; compress the target code and code information to obtain a code compression package.

[0019] In one of the embodiments, the compression module is specifically used to: compress the CSS code and JS code in the target code using a code compression tool to obtain a compressed code; and compress the compressed code and code information to obtain a code compression package.

[0020] In one of the embodiments, the device also includes: a third acquisition module, used to obtain the compression status corresponding to the code compression package based on the code compression package; a storage module, used to store the code release time, user account information, code type, version repository branch, compression status and version information and log information corresponding to the original latest code in a database for user viewing.

[0021] In one of the embodiments, the device further includes: a testing module, used to test the original latest code, and the testing includes local testing and online testing.

[0022] In a third aspect, the present application further provides a computer device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any one of the methods described in the first aspect are implemented.

[0023] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any one of the methods described in the first aspect when executed by a processor.

[0024] In a fifth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of any one of the methods described in the first aspect are implemented.

[0025] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:

[0026] In an embodiment of the present application, first, the original latest code is obtained from the remote code repository according to the code type and version repository branch input by the user; secondly, based on the original latest code, the code information corresponding to the original latest code is obtained, wherein the code information includes the version information and log information corresponding to the original latest code; finally, the original latest code and the code information are compressed to obtain a code compression package for the user to download the code compression package. It can be seen that the embodiment of the present application can automatically obtain the code information corresponding to the original latest code according to the obtained original latest code, and can automatically compress the original latest code and the code information to obtain a code compression package, thereby improving the intelligence of obtaining the code information corresponding to the original latest code and obtaining the code compression package. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present application;

[0028] Figure 2 A flowchart of a file processing method provided in an embodiment of the present application;

[0029] Figure 3 A flowchart of a technical process for obtaining version information corresponding to the original latest code provided in an embodiment of the present application;

[0030] Figure 4 A flowchart of a technical process for obtaining a code compression package provided in an embodiment of the present application;

[0031] Figure 5 A flowchart of another file processing method provided in an embodiment of the present application;

[0032] Figure 6 A block diagram of a file processing device provided in an embodiment of the present application;

[0033] Figure 7 A block diagram of another file processing device provided in an embodiment of the present application;

[0034] Figure 8 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] When the device webpage needs to be updated to the latest version, the front-end developer of the device webpage needs to obtain the latest code corresponding to the device webpage from the remote warehouse, and needs to compress the latest code and the version information and log information corresponding to the latest code together to obtain a code compression package, and provide the user with the code compression package for downloading and viewing. However, in the prior art, the version information and log information corresponding to the latest code are obtained manually, and the latest code and the version information and log information corresponding to the latest code are compressed manually, so the prior art is not very intelligent.

[0037] In view of this, the embodiments of the present application provide a file processing method, apparatus, computer device, storage medium and program product, through which the file processing method can improve the intelligence of obtaining code information corresponding to the original latest code and obtaining the code compression package.

[0038] See also Figure 1 , which shows a schematic diagram of the implementation environment involved in the file processing method provided in the embodiment of the present application, such as Figure 1 As shown, the implementation environment may include a server 101 and a terminal 102, which can communicate with each other. A remote code warehouse is provided in the server 101, and the remote code warehouse stores the original latest code. The terminal 102 is used to obtain the original latest code from the remote warehouse, and obtain the code information and code compression package corresponding to the original latest code based on the original latest code. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, and tablet computers; the server 101 can be implemented by an independent server or a server cluster composed of multiple servers.

[0039] See also Figure 2 , which shows a flowchart of a file processing method provided by an embodiment of the present application, which file processing method can be applied to Figure 1 In the terminal shown. Figure 2 As shown, the file processing method may include the following steps:

[0040] Step 201: The terminal obtains the original latest code from the remote code repository according to the code type and version repository branch input by the user.

[0041] Because the device webpage is constantly updated, the terminal needs to obtain the original latest code from the remote code repository to update the device webpage, where the original latest code is the latest code corresponding to the device webpage. Optionally, the code type can be the code for camera shooting and running, or the code for camera network connection. The embodiment of this application does not limit the code type; the version warehouse branch is used to separate from the main line for other operations, and the branch does not affect the main line.

[0042] Step 202: The terminal obtains code information corresponding to the original latest code based on the original latest code.

[0043] The code information includes the version information and log information corresponding to the original latest code. Optionally, the version information may include information such as the front-end version number and the plug-in version number; the log information may include information such as the release time of the original latest code and user account information.

[0044] Step 203: The terminal compresses the original latest code and the code information to obtain a code compression package for the user to download the code compression package.

[0045] In order to facilitate users to view and use the original latest code and code information, the original latest code and code information can be compressed to obtain a code compression package. After obtaining the code compression package, the user can download the code compression package from the terminal at any time.

[0046] In an embodiment of the present application, first, the original latest code is obtained from the remote code repository according to the code type and version repository branch input by the user; secondly, based on the original latest code, the code information corresponding to the original latest code is obtained, wherein the code information includes the version information and log information corresponding to the original latest code; finally, the original latest code and the code information are compressed to obtain a code compression package for the user to download the code compression package. It can be seen that the embodiment of the present application can automatically obtain the code information corresponding to the original latest code according to the obtained original latest code, and can automatically compress the original latest code and the code information to obtain a code compression package, thereby improving the intelligence of obtaining the code information corresponding to the original latest code and obtaining the code compression package.

[0047] The code information corresponding to the original latest code includes the version information and log information corresponding to the original latest code. The embodiment of the present application provides a technical process for obtaining the version information corresponding to the original latest code and obtaining the log information corresponding to the original latest code. Figure 3 , which shows a technical process for obtaining the version information corresponding to the original latest code provided by an optional embodiment of the present application. Figure 3 As shown, the technical process may include the following steps:

[0048] Step 301: If the original latest code has not been obtained within a preset time before the current moment, the terminal reads the plug-in version in the original latest code to generate a plug-in version number, and generates a front-end version number using the release time of the original latest code.

[0049] The release time of the original latest code is the time when the terminal obtains the original latest code. In an optional embodiment of the present application, when the original latest code obtained is the same, the version information corresponding to the original latest code obtained is also the same. Therefore, if the original latest code has been obtained within the preset time before the current moment, there is no need to re-obtain the version information corresponding to the original latest code; if the original latest code has not been obtained within the preset time before the current moment, it is necessary to obtain the version information corresponding to the original latest code. The preset time can be a fixed value set artificially according to actual needs.

[0050] Step 302: The terminal uses the obtained plug-in version number and front-end version number as version information.

[0051] In an embodiment of the present application, based on the original latest code, the plug-in version number and the front-end version number are obtained, and the plug-in version number and the front-end version number are used as the version information corresponding to the original latest code.

[0052] In an optional embodiment of the present application, a technical process for obtaining log information corresponding to the original latest code is provided. Optionally, the technical process may be: generating a code version log according to the code release time of the original latest code and user account information, and using the code version log as log information. The log information can be used by the user to view the historical records corresponding to the original latest code.

[0053] In an embodiment of the present application, the original latest code can be obtained through the terminal, and the version information and log information corresponding to the original latest code can be obtained based on the original latest code, which solves the problem of low intelligence in manually obtaining the version information and log information corresponding to the original latest code in the prior art, improves the efficiency of obtaining the version information and log information corresponding to the original latest code, and saves time for business operations.

[0054] In an optional embodiment of the present application, a technical process for obtaining a code compression package is provided, and the method of the technical process can be: if the terminal receives a modification instruction for the code information based on the target interface, the modified code information and the original latest code are compressed to obtain a code compression package. Among them, the target interface is a page used by the terminal to display the code compression package and the code information. Through the target interface, the user can modify the code information, for example, the plug-in version number can be modified. After the code information is modified, the terminal will compress the modified code information and the original latest code to obtain a code compression package. Therefore, the embodiment of the present application provides conditions for users to modify code information, and can automatically generate a code compression package after the user modifies the code information, thereby improving the efficiency of business operations.

[0055] See also Figure 4 , which shows that another optional embodiment of the present application provides another technical process for obtaining a code compression package. Figure 4 As shown, the technical process may include the following steps:

[0056] Step 401: The terminal deletes the codes that do not match the code type in the original latest code according to the code type to obtain the target code.

[0057] The original latest code corresponding to the code type is obtained through the code type, but the original latest code may contain code that does not match the code type. In order to improve the efficiency of subsequent compression processing, the code that does not match the code type in the original latest code can be deleted to obtain the target code.

[0058] Step 402: The terminal compresses the target code and the code information to obtain a code compression package.

[0059] Optionally, the process of compressing the target code and code information to obtain a code compression package can be as follows: first, compressing the CSS code and JS code in the target code using a code compression tool to obtain a compressed code; second, compressing the compressed code and code information to obtain a code compression package. Optionally, the CSS code and JS code in the target code can be compressed using a YUI Compressor code compression tool, wherein an optional compression method is to delete spaces and line breaks in the CSS code and JS code using the YUICompressor code compression tool, and replace variable names in the CSS code and JS code with smaller variable names.

[0060] In an optional embodiment of the present application, after obtaining the code compression package, the compression status of the code compression package can also be obtained according to the code compression package, wherein the compression status mainly includes the compression status, the compression success status, the compression failure status and the waiting compression status. Optionally, the code release time, user account information, code type, version repository branch, compression status and the version information and log information corresponding to the original latest code can be stored in the database for users to download and view.

[0061] Optionally, the remarks and version test type can also be stored in the database. The remarks are information that the user can enter together when obtaining the original latest code according to the code type and version warehouse branch entered by the user. The content of the remarks is mainly entered according to the needs of the user himself. The embodiment of the present application does not limit the content of the remarks; the version test type is also information that the user can enter together when obtaining the original latest code according to the code type and version warehouse branch entered by the user. The version test type can be divided into a joint debugging test version and a formal test version.

[0062] Among them, the joint debugging and testing version is used for joint calling by developers and devices. The original latest code corresponding to the joint debugging and testing version and the code information and code compression package corresponding to the original latest code are only for temporary use. It is necessary to automatically delete the original latest code corresponding to all joint debugging and testing versions at the end of the month with the code information and code compression package corresponding to the original latest code; the original latest code corresponding to the formal test version and the code information and code compression package corresponding to the original latest code do not need to be deleted. After obtaining the original latest code corresponding to the formal test version, the terminal needs to send the original latest code to the remote code repository and mark it so that developers can find the corresponding original latest code for re-development.

[0063] See also Figure 5 , which shows a flowchart of a file processing method provided by an embodiment of the present application, which file processing method can be applied to Figure 1 In the terminal shown. Figure 5 As shown, the file processing method may include the following steps:

[0064] Step 501: The terminal obtains the original latest code from the remote code repository according to the code type and version repository branch input by the user.

[0065] Step 502: The terminal reads the plug-in version in the original latest code to generate a plug-in version number, and generates a front-end version number using the release time of the original latest code.

[0066] Step 503: The terminal uses the obtained plug-in version number and front-end version number as version information.

[0067] Step 504: The terminal generates a code version log according to the code release time of the original latest code and the user account information, and uses the code version log as log information.

[0068] Step 505: The terminal deletes the codes that do not match the code type in the original latest code according to the code type to obtain the target code.

[0069] Step 506: The terminal compresses the CSS code and the JS code in the target code using a code compression tool to obtain a compressed code.

[0070] Step 507: The terminal compresses the compressed code, version information and log information to obtain a code compression package.

[0071] In addition, in an optional embodiment of the present application, the original latest code can be tested, and the test includes local testing and online testing. Among them, the local test is to test the original latest code through the above-mentioned terminal. The test method of the local test can facilitate the user to view the original latest code effect at any time. Optionally, the test method of the local test can also view the effect of the target code and the compressed code. The online test mainly tests the original latest code through the server. Optionally, the target code and the compressed code can also be tested through the server. For example, the path rewriting function of the Nginx server can be used to read the code to be tested from the terminal, and the reverse proxy function of the Nginx server can be used to obtain the device data corresponding to the code to be tested, thereby completing the test of the code to be tested. At the same time, in order to ensure the security of the data, the terminal can also allocate permissions to different roles according to the user account information to avoid irreversible damage to the data caused by misoperation.

[0072] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0073] See also Figure 6, which shows a block diagram of a file processing device 600 provided in an embodiment of the present application, and the file processing device 600 can be configured in the above-mentioned terminal. Figure 6 As shown, the file processing device 600 includes a first acquisition module 601 , a second acquisition module 602 and a compression module 603 .

[0074] Among them, the first acquisition module 601 is used to obtain the original latest code from the remote code repository according to the code type and version repository branch input by the user; the second acquisition module 602 is used to obtain the code information corresponding to the original latest code based on the original latest code, and the code information includes the version information and log information corresponding to the original latest code; the compression module 603 is used to compress the original latest code and the code information to obtain a code compression package for the user to download the code compression package.

[0075] In an optional embodiment of the present application, the second acquisition module 602 is specifically used to: if the original latest code has not been obtained within a preset time period before the current moment, read the plug-in version in the original latest code to generate a plug-in version number, and use the release time of the original latest code to generate a front-end version number; and use the obtained plug-in version number and front-end version number as version information.

[0076] In an optional embodiment of the present application, the second acquisition module 602 is specifically used to generate a code version log according to the code release time of the original latest code and the user account information, and use the code version log as log information.

[0077] In an optional embodiment of the present application, the compression module 603 is specifically used to: delete the code that does not match the code type in the original latest code according to the code type to obtain the target code; compress the target code and code information to obtain a code compression package.

[0078] In an optional embodiment of the present application, the compression module 603 is specifically used to: compress the CSS code and JS code in the target code using a code compression tool to obtain a compressed code; compress the compressed code and code information to obtain a code compression package; and is also specifically used to: if a modification instruction for the code information is received based on the target interface, compress the modified code information and the original latest code to obtain a code compression package.

[0079] See also Figure 7 , which shows a block diagram of another file processing device 600 provided in an embodiment of the present application. Figure 7As shown, the device 700 includes, in addition to the modules of the file processing device 600 , further includes a version information determination module 604 , a display module 605 , a third acquisition module 606 , a storage module 607 and a test module 608 .

[0080] Among them, the version information determination module 604 is used to, if the original latest code has been obtained within a preset time before the current moment, use the plug-in version number and the front-end version number obtained when the original latest code is historically obtained as the version information of the original latest code obtained at the current moment; the display module 605 is used to display the code information corresponding to the original latest code in the target interface; the third acquisition module 606 is used to obtain the compression status corresponding to the code compression package according to the code compression package; the storage module 607 is used to store the code release time, user account information, code type, version repository branch, compression status and version information and log information corresponding to the original latest code in the database for user viewing; the test module 608 is used to test the original latest code, and the test includes local testing and online testing.

[0081] The file processing protection device provided in the embodiment of the present application can implement the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0082] Each module in the above-mentioned file processing device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module above.

[0083] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a file processing method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0084] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0085] In one embodiment of the present application, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining the original latest code from a remote code repository according to the code type and version repository branch input by a user; obtaining code information corresponding to the original latest code based on the original latest code, the code information including version information and log information corresponding to the original latest code; compressing the original latest code and the code information to obtain a code compression package for the user to download the code compression package.

[0086] In one embodiment of the present application, the processor also implements the following steps when executing the computer program: if the original latest code has not been obtained within a preset time period before the current moment, read the plug-in version in the original latest code to generate a plug-in version number, and use the release time of the original latest code to generate a front-end version number; use the obtained plug-in version number and front-end version number as version information.

[0087] In one embodiment of the present application, the processor also implements the following steps when executing a computer program: if the original latest code has been obtained within a preset time period before the current moment, the plug-in version number and the front-end version number obtained when the original latest code was historically obtained are used as the version information of the original latest code obtained at the current moment.

[0088] In one embodiment of the present application, the processor further implements the following steps when executing the computer program: generating a code version log according to the code release time of the original latest code and the user account information, and using the code version log as log information.

[0089] In one embodiment of the present application, the processor also implements the following steps when executing the computer program: displaying the code information corresponding to the original latest code in the target interface; correspondingly, compressing the original latest code and the code information to obtain a code compression package, including: if a modification instruction for the code information is received based on the target interface, compressing the modified code information and the original latest code to obtain a code compression package.

[0090] In one embodiment of the present application, the processor further implements the following steps when executing a computer program: according to the code type, the code in the original latest code that does not match the code type is deleted to obtain the target code; and the target code and code information are compressed to obtain a code compression package.

[0091] In one embodiment of the present application, the processor further implements the following steps when executing a computer program: compressing the CSS code and JS code in the target code using a code compression tool to obtain a compressed code; compressing the compressed code and code information to obtain a code compression package.

[0092] In one embodiment of the present application, the processor also implements the following steps when executing the computer program: obtaining the compression status corresponding to the code compression package based on the code compression package; storing the code release time, user account information, code type, version repository branch, compression status and version information and log information corresponding to the original latest code in the database for user viewing.

[0093] In one embodiment of the present application, the processor further implements the following steps when executing the computer program: testing the original latest code, the testing including local testing and online testing.

[0094] The computer device provided in the embodiment of the present application has similar implementation principles and technical effects to those of the above-mentioned method embodiment, and will not be described in detail here.

[0095] In one embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: according to the code type and version repository branch input by a user, the original latest code is obtained from a remote code repository; based on the original latest code, the code information corresponding to the original latest code is obtained, and the code information includes version information and log information corresponding to the original latest code; the original latest code and the code information are compressed to obtain a code compression package for the user to download the code compression package.

[0096] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: if the original latest code has not been obtained within a preset time period before the current moment, the plug-in version in the original latest code is read to generate a plug-in version number, and the front-end version number is generated using the release time of the original latest code; the obtained plug-in version number and front-end version number are used as version information.

[0097] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: if the original latest code has been obtained within a preset time period before the current moment, the plug-in version number and the front-end version number obtained when the original latest code was historically obtained are used as the version information of the original latest code obtained at the current moment.

[0098] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: a code version log is generated according to the code release time of the original latest code and the user account information, and the code version log is used as log information.

[0099] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: the code information corresponding to the original latest code is displayed in the target interface; correspondingly, the original latest code and the code information are compressed to obtain a code compression package, including: if a modification instruction for the code information is received based on the target interface, the modified code information and the original latest code are compressed to obtain a code compression package.

[0100] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: according to the code type, the code in the original latest code that does not match the code type is deleted to obtain the target code; the target code and code information are compressed to obtain a code compression package.

[0101] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: using a code compression tool to compress the CSS code and JS code in the target code to obtain a compressed code; compressing the compressed code and code information to obtain a code compression package.

[0102] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: obtaining the compression status corresponding to the code compression package according to the code compression package; storing the code release time, user account information, code type, version repository branch, compression status and version information and log information corresponding to the original latest code in the database for user viewing.

[0103] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: testing the original latest code, and the testing includes local testing and online testing.

[0104] The computer-readable storage medium provided in this embodiment has similar implementation principles and technical effects to those of the above method embodiments, and will not be described in detail here.

[0105] In one embodiment of the present application, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining the original latest code from a remote code repository based on the code type and version repository branch input by a user; obtaining code information corresponding to the original latest code based on the original latest code, the code information including version information and log information corresponding to the original latest code; compressing the original latest code and the code information to obtain a code compression package for the user to download the code compression package.

[0106] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: if the original latest code has not been obtained within a preset time period before the current moment, the plug-in version in the original latest code is read to generate a plug-in version number, and the front-end version number is generated using the release time of the original latest code; the obtained plug-in version number and front-end version number are used as version information.

[0107] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: if the original latest code has been obtained within a preset time period before the current moment, the plug-in version number and the front-end version number obtained when the original latest code was historically obtained are used as the version information of the original latest code obtained at the current moment.

[0108] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: a code version log is generated according to the code release time of the original latest code and the user account information, and the code version log is used as log information.

[0109] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: the code information corresponding to the original latest code is displayed in the target interface; correspondingly, the original latest code and the code information are compressed to obtain a code compression package, including: if a modification instruction for the code information is received based on the target interface, the modified code information and the original latest code are compressed to obtain a code compression package.

[0110] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: according to the code type, the code in the original latest code that does not match the code type is deleted to obtain the target code; the target code and code information are compressed to obtain a code compression package.

[0111] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: using a code compression tool to compress the CSS code and JS code in the target code to obtain a compressed code; compressing the compressed code and code information to obtain a code compression package.

[0112] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: obtaining the compression status corresponding to the code compression package according to the code compression package; storing the code release time, user account information, code type, version repository branch, compression status and version information and log information corresponding to the original latest code in the database for user viewing.

[0113] In one embodiment of the present application, when the computer program is executed by the processor, the following steps are also implemented: testing the original latest code, and the testing includes local testing and online testing.

[0114] The implementation principle and technical effects of the computer program product provided in this embodiment are similar to those of the above method embodiments, and will not be described in detail here.

[0115] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0116] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0117] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A file processing method, characterized in that: The method comprises: According to the code type and version repository branch input by the user, the original latest code is obtained from the remote code repository, where the original latest code is the latest code corresponding to the device webpage; If the original latest code has not been obtained within a preset time before the current moment, the plug-in version in the original latest code is read to generate a plug-in version number, and the front-end version number is generated using the release time of the original latest code; the plug-in version number and the front-end version number obtained are used as version information corresponding to the original latest code; a code version log is generated according to the code release time of the original latest code and user account information, and the code version log is used as log information corresponding to the original latest code; the version information and the log information are determined as code information corresponding to the original latest code; Compressing the original latest code and the code information to obtain a code compression package, so that the user can download the code compression package, and the code compression package is used to update the device webpage; The method also includes: if the original latest code has been obtained within a preset time before the current moment, the plug-in version number and the front-end version number obtained when the original latest code was historically obtained are used as the version information of the original latest code obtained at the current moment.

2. The method according to claim 1, characterized in that: After obtaining the code information corresponding to the original latest code, the method further includes: Displaying the code information corresponding to the original latest code in the target interface; Correspondingly, the original latest code and the code information are compressed to obtain a code compression package, including: If a modification instruction for the code information is received based on the target interface, the modified code information and the original latest code are compressed to obtain the code compression package.

3. The method according to claim 1, characterized in that The compressing process of the original latest code and the code information to obtain a code compression package includes: According to the code type, delete the code in the original latest code that does not match the code type to obtain the target code; The target code and the code information are compressed to obtain the code compression package.

4. The method according to claim 3, characterized in that The compressing the target code and the code information to obtain the code compression package includes: Using a code compression tool to compress the CSS code and the JS code in the target code to obtain a compressed code; The compressed code and the code information are compressed to obtain the code compression package.

5. The method according to claim 1, characterized in that After compressing the original latest code and the code information to obtain a code compression package, the method further includes: Acquire a compression state corresponding to the code compression package according to the code compression package; The code release time, user account information, the code type, the version repository branch, the compression status, and the version information and log information corresponding to the original latest code are stored in the database for user viewing.

6. The method according to claim 1, characterized in that After obtaining the original latest code from the remote code repository, the method further includes: The original latest code is tested, and the testing includes local testing and online testing.

7. A file processing device, characterized in that: The device comprises: A first acquisition module is used to acquire the original latest code from the remote code repository according to the code type and version repository branch input by the user, where the original latest code is the latest code corresponding to the device webpage; The second acquisition module is used to read the plug-in version in the original latest code to generate a plug-in version number if the original latest code has not been acquired within a preset time before the current moment, and use the release time of the original latest code to generate a front-end version number; use the acquired plug-in version number and the front-end version number as the version information corresponding to the original latest code; generate a code version log according to the code release time of the original latest code and user account information, and use the code version log as the log information corresponding to the original latest code; determine the version information and the log information as the code information corresponding to the original latest code; if the original latest code has been acquired within a preset time before the current moment, use the plug-in version number and the front-end version number acquired when the original latest code is historically acquired as the version information of the original latest code acquired at the current moment; The compression module is used to compress the original latest code and the code information to obtain a code compression package for users to download the code compression package, and the code compression package is used to update the device webpage.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Insert installation method and system

    CN103645923A

  • Selection method and device for target code

    CN106528071A