CN114328405A - File processing method, file processing device, computer equipment, storage medium and program product - Google Patents
File processing method, file processing device, computer equipment, storage medium and program product Download PDFInfo
- Publication number
- CN114328405A CN114328405A CN202111464730.3A CN202111464730A CN114328405A CN 114328405 A CN114328405 A CN 114328405A CN 202111464730 A CN202111464730 A CN 202111464730A CN 114328405 A CN114328405 A CN 114328405A
- Authority
- CN
- China
- Prior art keywords
- code
- original
- information
- original latest
- version
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 22
- 238000003672 processing method Methods 0.000 title abstract description 17
- 230000006835 compression Effects 0.000 claims abstract description 121
- 238000007906 compression Methods 0.000 claims abstract description 121
- 238000000034 method Methods 0.000 claims abstract description 50
- 238000012360 testing method Methods 0.000 claims description 51
- 238000004590 computer program Methods 0.000 claims description 47
- 230000004048 modification Effects 0.000 claims description 9
- 238000012986 modification Methods 0.000 claims description 9
- 238000013473 artificial intelligence Methods 0.000 abstract description 2
- 230000008569 process Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 9
- 230000000694 effects Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The application relates to a file processing method, a file processing device, computer equipment, a storage medium and a program product, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user; acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and compressing the original latest code and the code information to obtain a code compression packet so as to be downloaded by a user. By adopting the method, the intelligence of acquiring the code information corresponding to the original latest code and acquiring the code compression packet can be improved.
Description
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a file processing method, an apparatus, a computer device, a storage medium, and a program product.
Background
When the device web page needs to be updated to the latest version, a front-end developer of the device web page needs to obtain the latest code corresponding to the device web page from a remote repository, and needs to compress the latest code, version information corresponding to the latest code, and log information together to obtain a code compression package, and provide a user to download and view the code compression package. However, in the prior art, the version information and the log information corresponding to the latest code are manually acquired, and the latest code and the version information and the log information corresponding to the latest code are manually compressed together.
Disclosure of Invention
In view of the above, it is necessary to provide a file processing method, apparatus, computer device, storage medium, and program product for solving the above technical problems.
In a first aspect, the present application provides a file processing method, including: acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user; acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and compressing the original latest code and the code information to obtain a code compression packet so as to be downloaded by a user.
In one embodiment, acquiring code information corresponding to an original latest code includes: if the original latest code is not obtained within a preset time before the current time, reading a plug-in version in the original latest code to generate a plug-in version number, and generating a front-end version number by using the release time of the original latest code; and taking the acquired plug-in version number and the front-end version number as version information.
In one embodiment, the method further comprises: and if the original latest code is acquired within a preset time before the current time, using the plug-in version number and the front-end version number acquired when the original latest code is acquired historically as the version information of the original latest code acquired at the current time.
In one embodiment, acquiring code information corresponding to an original latest code includes: and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as log information.
In one embodiment, after obtaining the code information corresponding to the original latest code, the method further includes: displaying code information corresponding to the original latest code in a target interface; correspondingly, the compressing processing is carried out on the original latest code and the code information to obtain a code compression packet, and the method comprises the following steps: and if a modification instruction aiming at 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 packet.
In one embodiment, compressing the original latest code and the code information to obtain a code compressed packet includes: deleting codes which are not matched with the code types in the original latest codes according to the code types to obtain target codes; and compressing the target code and the code information to obtain a code compression packet.
In one embodiment, compressing the object code and the code information to obtain a code compression packet includes: compressing the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code; and compressing the compressed codes and the code information to obtain a code compressed packet.
In one embodiment, after the original latest code and the code information are compressed to obtain a code compressed packet, the method further includes: acquiring a compression state corresponding to the code compression packet according to the code compression packet; and correspondingly storing the code release time, the user account information, the code type, the version warehouse branch, the compression state of the original latest code and the version information and the log information corresponding to the original latest code into a database for a user to check.
In one embodiment, after obtaining the original updated code from the remote code repository, the method further comprises: and testing the original latest code, wherein the testing comprises local testing and online testing.
In a second aspect, the present application also provides a document processing apparatus, including: the first acquisition module is used for acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user; the second acquisition module is used for acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and the compression module is used for compressing the original latest code and the code information to obtain a code compression packet so as to be downloaded by a user.
In one embodiment, the second obtaining module is specifically configured to: if the original latest code is not obtained within a preset time before the current time, reading a plug-in version in the original latest code to generate a plug-in version number, and generating a front-end version number by using the release time of the original latest code; and taking the acquired plug-in version number and the front-end version number as version information.
In one embodiment, the apparatus further comprises: and the version information determining module is used for taking the plug-in version number and the front-end version number which are acquired when the original latest code is acquired historically as the version information of the original latest code acquired at the current moment if the original latest code is acquired within a preset time length before the current moment.
In one embodiment, the second obtaining module is specifically configured to: and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as log information.
In one embodiment, the apparatus further comprises: the display module is used for displaying code information corresponding to the original latest code in the target interface; the compression module is specifically configured to: and if a modification instruction aiming at 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 packet.
In one embodiment, the compression module is specifically configured to: deleting codes which are not matched with the code types in the original latest codes according to the code types to obtain target codes; and compressing the target code and the code information to obtain a code compression packet.
In one embodiment, the compression module is specifically configured to: compressing the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code; and compressing the compressed codes and the code information to obtain a code compressed packet.
In one embodiment, the apparatus further comprises: the third acquisition module is used for acquiring a compression state corresponding to the code compression packet according to the code compression packet; and the storage module is used for correspondingly storing the code release time, the user account information, the code type, the version warehouse branch and the compression state of the original latest code and the version information and the log information corresponding to the original latest code into a database for a user to check.
In one embodiment, the apparatus further comprises: and the test module is used for testing the original latest code, and the test comprises a local test and an online test.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the method according to any of the first aspect described above when the computer program is executed by the processor.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the first aspects described above.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of the method of any of the first aspects described above.
The beneficial effects brought by the technical scheme provided by the embodiment of the application at least comprise:
in the embodiment of the application, firstly, an original latest code is obtained from a remote code warehouse according to a code type and a version warehouse branch input by a user; secondly, acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and finally, compressing the original latest code and the code information to obtain a code compression packet for a user to download the code compression packet. Therefore, according to the embodiment of the application, the code information corresponding to the original latest code can be automatically acquired according to the acquired original latest code, and the original latest code and the code information can be automatically compressed to obtain the code compression package, so that the intelligence of acquiring the code information corresponding to the original latest code and acquiring the code compression package is improved.
Drawings
FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
fig. 2 is a flowchart of a file processing method according to an embodiment of the present application;
fig. 3 is a flowchart of a technical process for obtaining version information corresponding to an original latest code according to an embodiment of the present application;
fig. 4 is a flowchart of a technical process for obtaining a code compression packet according to an embodiment of the present application;
FIG. 5 is a flowchart of another document processing method provided in an embodiment of the present application;
FIG. 6 is a block diagram of a document processing apparatus according to an embodiment of the present application;
FIG. 7 is a block diagram of another document processing apparatus provided in an embodiment of the present application;
fig. 8 is an internal structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
When the device web page needs to be updated to the latest version, a front-end developer of the device web page needs to obtain the latest code corresponding to the device web page from a remote repository, and needs to compress the latest code, version information corresponding to the latest code, and log information together to obtain a code compression package, and provide a user to download and view the code compression package. However, in the prior art, the version information and the log information corresponding to the latest code are manually acquired, and the latest code and the version information and the log information corresponding to the latest code are manually compressed together.
In view of this, embodiments of the present application provide a file processing method, an apparatus, a computer device, a storage medium, and a program product, by which the intelligence of acquiring code information corresponding to an original latest code and acquiring a code compression package can be improved.
Referring to fig. 1, which is a schematic diagram illustrating an implementation environment related to a file processing method provided in an embodiment of the present application, as shown in fig. 1, the implementation environment may include a server 101 and a terminal 102, where the server 101 and the terminal 102 may communicate with each other, the server 101 is provided with a remote code repository, the remote code repository stores original latest codes, and the terminal 102 is configured to obtain the original latest codes from the remote code repository, and obtain code information and a code compression package corresponding to the original latest codes based on the original latest codes. The terminal 102 may be, but is not limited to, various personal computers, notebook computers, tablet computers, and the like; the server 101 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
Referring to fig. 2, a flowchart of a file processing method provided in an embodiment of the present application is shown, where the file processing method can be applied to the terminal shown in fig. 1. As shown in fig. 2, the file processing method may include the steps of:
Because the device web page is continuously updated, the terminal needs to acquire the original latest code from the remote code repository to update the device web page, wherein the original latest code is the latest code corresponding to the device web page. Optionally, the code type may be a code for shooting and running by a camera, or a code for network connection of the camera, and the code type is not limited in the embodiment of the present application; the version store branch is used to separate from the mainline for additional operations, and the branch does not affect the mainline.
The code information comprises version information and log information corresponding to the original latest code. Optionally, the version information may include information such as a front-end version number and a plug-in version number; the log information may include the release time of the original latest code, user account information, and the like.
And 203, compressing the original latest code and the code information by the terminal to obtain a code compression packet for a user to download the code compression packet.
In order to facilitate the user to view and use the original latest code and the code information, the original latest code and the code information can be compressed to obtain a code compression package, and after the code compression package is obtained, the user can download the code compression package from the terminal at any time.
In the embodiment of the application, firstly, an original latest code is obtained from a remote code warehouse according to a code type and a version warehouse branch input by a user; secondly, acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and finally, compressing the original latest code and the code information to obtain a code compression packet for a user to download the code compression packet. Therefore, according to the embodiment of the application, the code information corresponding to the original latest code can be automatically acquired according to the acquired original latest code, and the original latest code and the code information can be automatically compressed to obtain the code compression package, so that the intelligence of acquiring the code information corresponding to the original latest code and acquiring the code compression package is improved.
The method and the device for obtaining the code information comprise the steps that the code information corresponding to the original latest code comprises version information and log information corresponding to the original latest code, and the technical process for obtaining the version information corresponding to the original latest code and obtaining the log information corresponding to the original latest code is provided in the embodiment of the application. Referring to fig. 3, a technical process for obtaining version information corresponding to an original latest code according to an alternative embodiment of the present application is shown. As shown in fig. 3, the technical process may include the following steps:
And the issuing time of the original latest code is the time when the terminal acquires the original latest code. In an optional embodiment of the present application, in a case that the obtained original latest code is the same, the version information corresponding to the obtained original latest code is also the same, and therefore, if the original latest code is obtained within a preset time before the current time, the version information corresponding to the original latest code does not need to be obtained again; if the original latest code is not acquired within a preset time before the current time, the version information corresponding to the original latest code needs to be acquired. The preset duration can be a fixed value set manually according to actual needs.
In the embodiment of the application, based on the original latest code, the plug-in version number and the front-end version number are obtained and are used as version information corresponding to the original latest code.
In an optional embodiment of the present application, a technical process for obtaining log information corresponding to an original latest code is provided, and optionally, the technical process may be: and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as log information. The log information can be used for a user to check the history record corresponding to the original latest code.
In the embodiment of the application, the original latest code can be acquired through the terminal, and the version information and the log information corresponding to the original latest code can be acquired based on the original latest code, so that the problem that in the prior art, the intelligence for manually acquiring the version information and the log information corresponding to the original latest code is not high is solved, the efficiency for acquiring the version information and the log information corresponding to the original latest code is improved, and the time for business operation is saved.
In an alternative embodiment of the present application, a technical process for obtaining a code compression packet is provided, and the technical process may be implemented by: and if the terminal receives a modification instruction aiming at the code information based on the target interface, compressing the modified code information and the original latest code to obtain a code compression packet. The target interface is a page on which the terminal is used for displaying the code compression package and the code information, and a user can modify the code information through the target interface, for example, the version number of a plug-in can be modified. After the code information is modified, the terminal compresses the modified code information and the original latest code to obtain a code compression packet. Therefore, the embodiment of the application provides conditions for the user to modify the code information, and the code compression packet can be automatically generated after the user modifies the code information, so that the efficiency of service operation is improved.
Referring to fig. 4, another alternative embodiment of the present application is shown to provide another technical process for obtaining a code compression packet. As shown in fig. 4, the technical process may include the following steps:
The original latest code corresponding to the code type is obtained through the code type, but a code which does not match the code type may exist in the original latest code, and in order to improve the efficiency of the subsequent compression processing, optionally, the code which does not match the code type in the original latest code may be deleted to obtain the target code.
And step 402, the terminal compresses the target code and the code information to obtain a code compression packet.
Optionally, the process of compressing the target code and the code information to obtain the code compression packet may be: firstly, compressing a CSS code and a JS code in a target code by using a code compression tool to obtain a compressed code; and secondly, compressing the compressed codes and the code information to obtain a code compressed packet. Optionally, a YUI Compressor code compression tool may be used to compress the CSS code and the JS code in the target code, where the optional compression manner is: deleting the space character and the line feed character in the CSS code and the JS code by a YUI Compressor code compression tool, and replacing the variable name in the CSS code and the JS code with a smaller variable name.
In an optional embodiment of the present application, after the code compression packet is obtained, the compression state of the code compression packet may also be obtained according to the code compression packet, where the compression state mainly includes a state in compression, a state in which compression is successful, a state in which compression is failed, and a state in which compression is waiting. Optionally, the code release time, the user account information, the code type, the version warehouse branch, the compression state of the original latest code, and the version information and the log information corresponding to the original latest code may be correspondingly stored in a database for a user to download and view.
Optionally, the remarks and the version test type may also be stored in the database. The remarks are information which can be input by the user together under the condition that the original latest code is obtained according to the code type and the version warehouse branch input by the user, the content of the remarks is mainly input according to the self requirement of the user, and the content of the remarks is not limited in the embodiment of the application; the version test type is also information which can be input by a user together under the condition that the original latest code is obtained according to the code type input by the user and the version warehouse branch, and the version test type can be divided into a joint debugging test version and a formal extraction test version.
The joint debugging test version is used for joint calling of developers and equipment, the original latest code corresponding to the joint debugging test version and the code information and the code compression package corresponding to the original latest code are only used temporarily, and the original latest code corresponding to all the joint debugging test versions and the code information and the code compression package corresponding to the original latest code need to be automatically deleted at the end of the month; and after the terminal acquires the original latest code corresponding to the formal extracted version, the original latest code needs to be sent to a remote code warehouse and marked, so that a developer can find the corresponding original latest code to develop again.
Referring to fig. 5, a flowchart of a file processing method provided in an embodiment of the present application is shown, where the file processing method can be applied to the terminal shown in fig. 1. As shown in fig. 5, the file processing method may include the steps of:
and step 501, the terminal acquires the original latest code from the remote code warehouse according to the code type and the version warehouse branch input by the user.
And 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 takes the code version log as log information.
And 505, deleting codes which are not matched with the code types in the original latest codes by the terminal according to the code types to obtain target codes.
And step 506, the terminal compresses the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code.
And 507, the terminal compresses the compression codes, the version information and the log information to obtain a code compression packet.
In addition, in an alternative embodiment of the present application, the original latest code may be tested, and the test includes a local test and an online test. The local test is to test the original latest code through the terminal, the user can conveniently check the effect of the original latest code at any time through the test mode of the local test, and optionally, the target code and the effect of the compressed code can be checked through the test mode of the local test. The on-line test is mainly to test the original latest code through the server, optionally, the target code and the compressed code may also be tested through the server, for example, the code to be tested may be read from the terminal by using the path rewriting function of the Nginx server, and the device data corresponding to the code to be tested may be obtained by using the reverse proxy function of the Nginx server, thereby completing the test of the code to be tested. Meanwhile, in order to guarantee the safety of data, the terminal can also distribute the authority to different roles according to the user account information, and irreversible damage to the data caused by misoperation is avoided.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Referring to fig. 6, a block diagram of a document processing apparatus 600 according to an embodiment of the present application is shown, where the document processing apparatus 600 may be configured in the terminal. As shown in fig. 6, the file processing apparatus 600 includes a first obtaining module 601, a second obtaining module 602, and a compressing module 603.
The first obtaining module 601 is configured to obtain an original latest code from a remote code repository according to a code type and a version repository branch input by a user; a second obtaining module 602, configured to obtain, based on an original latest code, code information corresponding to the original latest code, where the code information includes version information and log information corresponding to the original latest code; the compressing module 603 is configured to compress the original latest code and the code information to obtain a code compression packet, so that the user can download the code compression packet.
In an optional embodiment of the present application, the second obtaining module 602 is specifically configured to: if the original latest code is not obtained within a preset time before the current time, reading a plug-in version in the original latest code to generate a plug-in version number, and generating a front-end version number by using the release time of the original latest code; and taking the acquired plug-in version number and the front-end version number as version information.
In an optional embodiment of the present application, the second obtaining module 602 is specifically configured to: and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as log information.
In an optional embodiment of the present application, the compressing module 603 is specifically configured to: deleting codes which are not matched with the code types in the original latest codes according to the code types to obtain target codes; and compressing the target code and the code information to obtain a code compression packet.
In an optional embodiment of the present application, the compressing module 603 is specifically configured to: compressing the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code; compressing the compressed codes and the code information to obtain code compressed packets; it is also specifically used for: and if a modification instruction aiming at 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 packet.
Referring to fig. 7, a block diagram of another document processing apparatus 600 provided in the embodiment of the present application is shown. As shown in fig. 7, the apparatus 700 includes, in addition to the modules of the file processing apparatus 600, a version determining module 604, a display module 605, a third obtaining module 606, a storage module 607, and a test module 608.
The version information determining module 604 is configured to, if the original latest code is obtained within a preset time before the current time, use a plug-in version number and a front-end version number obtained when the original latest code is obtained historically as version information of the original latest code obtained at the current time; a display module 605, configured to display code information corresponding to the original latest code in the target interface; a third obtaining module 606, configured to obtain, according to the code compression packet, a compression state corresponding to the code compression packet; the storage module 607 is configured to correspondingly store the code release time of the original latest code, the user account information, the code type, the version warehouse branch, the compression state, and the version information and the log information corresponding to the original latest code in a database for a user to view; and a test module 608, configured to perform a test on the original latest code, where the test includes a local test and an online test.
The file processing protection device provided by the embodiment of the application can realize the method embodiment, the realization principle and the technical effect are similar, and the details are not repeated herein.
The respective modules in the above-described document processing apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a file processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment of the present application, there is provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the following steps when executing the computer program: acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user; acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and compressing the original latest code and the code information to obtain a code compression packet so as to be downloaded by a user.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: if the original latest code is not obtained within a preset time before the current time, reading a plug-in version in the original latest code to generate a plug-in version number, and generating a front-end version number by using the release time of the original latest code; and taking the acquired plug-in version number and the front-end version number as version information.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: and if the original latest code is acquired within a preset time before the current time, using the plug-in version number and the front-end version number acquired when the original latest code is acquired historically as the version information of the original latest code acquired at the current time.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as log information.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: displaying code information corresponding to the original latest code in a target interface; correspondingly, the compressing processing is carried out on the original latest code and the code information to obtain a code compression packet, and the method comprises the following steps: and if a modification instruction aiming at 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 packet.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: deleting codes which are not matched with the code types in the original latest codes according to the code types to obtain target codes; and compressing the target code and the code information to obtain a code compression packet.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: compressing the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code; and compressing the compressed codes and the code information to obtain a code compressed packet.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: acquiring a compression state corresponding to the code compression packet according to the code compression packet; and correspondingly storing the code release time, the user account information, the code type, the version warehouse branch, the compression state of the original latest code and the version information and the log information corresponding to the original latest code into a database for a user to check.
In one embodiment of the application, the processor when executing the computer program further performs the steps of: and testing the original latest code, wherein the testing comprises local testing and online testing.
The implementation principle and technical effect of the computer device provided by the embodiment of the present application are similar to those of the method embodiment described above, and are not described herein again.
In an embodiment of the application, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of: acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user; acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and compressing the original latest code and the code information to obtain a code compression packet so as to be downloaded by a user.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: if the original latest code is not obtained within a preset time before the current time, reading a plug-in version in the original latest code to generate a plug-in version number, and generating a front-end version number by using the release time of the original latest code; and taking the acquired plug-in version number and the front-end version number as version information.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: and if the original latest code is acquired within a preset time before the current time, using the plug-in version number and the front-end version number acquired when the original latest code is acquired historically as the version information of the original latest code acquired at the current time.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as log information.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: displaying code information corresponding to the original latest code in a target interface; correspondingly, the compressing processing is carried out on the original latest code and the code information to obtain a code compression packet, and the method comprises the following steps: and if a modification instruction aiming at 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 packet.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: deleting codes which are not matched with the code types in the original latest codes according to the code types to obtain target codes; and compressing the target code and the code information to obtain a code compression packet.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: compressing the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code; and compressing the compressed codes and the code information to obtain a code compressed packet.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: acquiring a compression state corresponding to the code compression packet according to the code compression packet; and correspondingly storing the code release time, the user account information, the code type, the version warehouse branch, the compression state of the original latest code and the version information and the log information corresponding to the original latest code into a database for a user to check.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: and testing the original latest code, wherein the testing comprises local testing and online testing.
The implementation principle and technical effect of the computer-readable storage medium provided by this embodiment are similar to those of the above-described method embodiment, and are not described herein again.
In an embodiment of the application, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of: acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user; acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code; and compressing the original latest code and the code information to obtain a code compression packet so as to be downloaded by a user.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: if the original latest code is not obtained within a preset time before the current time, reading a plug-in version in the original latest code to generate a plug-in version number, and generating a front-end version number by using the release time of the original latest code; and taking the acquired plug-in version number and the front-end version number as version information.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: and if the original latest code is acquired within a preset time before the current time, using the plug-in version number and the front-end version number acquired when the original latest code is acquired historically as the version information of the original latest code acquired at the current time.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as log information.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: displaying code information corresponding to the original latest code in a target interface; correspondingly, the compressing processing is carried out on the original latest code and the code information to obtain a code compression packet, and the method comprises the following steps: and if a modification instruction aiming at 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 packet.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: deleting codes which are not matched with the code types in the original latest codes according to the code types to obtain target codes; and compressing the target code and the code information to obtain a code compression packet.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: compressing the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code; and compressing the compressed codes and the code information to obtain a code compressed packet.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: acquiring a compression state corresponding to the code compression packet according to the code compression packet; and correspondingly storing the code release time, the user account information, the code type, the version warehouse branch, the compression state of the original latest code and the version information and the log information corresponding to the original latest code into a database for a user to check.
In one embodiment of the application, the computer program when executed by the processor further performs the steps of: and testing the original latest code, wherein the testing comprises local testing and online testing.
The computer program product provided in this embodiment has similar implementation principles and technical effects to those of the method embodiments described above, and is not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims (13)
1. A method of file processing, the method comprising:
acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user;
acquiring code information corresponding to the original latest code based on the original latest code, wherein the code information comprises version information and log information corresponding to the original latest code;
and compressing the original latest code and the code information to obtain a code compression packet so that a user can download the code compression packet.
2. The method of claim 1, wherein the obtaining code information corresponding to the original latest code comprises:
if the original latest code is not obtained within a preset time before the current time, reading a plug-in version in the original latest code to generate a plug-in version number, and generating a front-end version number by using the release time of the original latest code;
and taking the acquired plug-in version number and the acquired front-end version number as the version information.
3. The method of claim 2, further comprising:
and if the original latest code is acquired within a preset time before the current moment, using the plug-in version number and the front-end version number acquired when the original latest code is acquired historically as the version information of the original latest code acquired at the current moment.
4. The method of claim 1, wherein the obtaining code information corresponding to the original latest code comprises:
and generating a code version log according to the code release time of the original latest code and the user account information, and taking the code version log as the log information.
5. The method according to claim 1, wherein after obtaining the code information corresponding to the original latest code, the method further comprises:
displaying the code information corresponding to the original latest code in a target interface;
correspondingly, the compressing the original latest code and the code information to obtain a code compressed packet includes:
and if a modification instruction aiming at the code information is received based on the target interface, compressing the modified code information and the original latest code to obtain the code compression packet.
6. The method of claim 1, wherein compressing the original latest code and the code information to obtain a code compression packet comprises:
deleting codes which are not matched with the code types in the original latest codes according to the code types to obtain target codes;
and compressing the target code and the code information to obtain the code compression packet.
7. The method of claim 6, wherein the compressing the object code and the code information to obtain the code compression packet comprises:
compressing the CSS code and the JS code in the target code by using a code compression tool to obtain a compressed code;
and compressing the compressed codes and the code information to obtain the code compressed packet.
8. The method of claim 1, wherein after compressing the original latest code and the code information to obtain a code compressed packet, the method further comprises:
acquiring a compression state corresponding to the code compression packet according to the code compression packet;
and correspondingly storing the code release time, the user account information, the code type, the version warehouse branch, the compression state of the original latest code and the version information and the log information corresponding to the original latest code into a database for a user to check.
9. The method of claim 1, wherein after obtaining the original code-update from the remote code repository, the method further comprises:
and testing the original latest code, wherein the testing comprises local testing and online testing.
10. A document processing apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for acquiring an original latest code from a remote code warehouse according to the code type and the version warehouse branch input by a user;
a second obtaining module, configured to obtain, based on the original latest code, code information corresponding to the original latest code, where the code information includes version information and log information corresponding to the original latest code;
and the compression module is used for compressing the original latest code and the code information to obtain a code compression packet so as to be downloaded by a user.
11. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor realizes the steps of the method of any one of claims 1 to 9 when executing the computer program.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 9.
13. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 9 when executed by a processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111464730.3A CN114328405A (en) | 2021-12-02 | 2021-12-02 | File processing method, file processing device, computer equipment, storage medium and program product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111464730.3A CN114328405A (en) | 2021-12-02 | 2021-12-02 | File processing method, file processing device, computer equipment, storage medium and program product |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114328405A true CN114328405A (en) | 2022-04-12 |
Family
ID=81049356
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111464730.3A Pending CN114328405A (en) | 2021-12-02 | 2021-12-02 | File processing method, file processing device, computer equipment, storage medium and program product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114328405A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528071A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Selection method and device for target code |
US20170351511A1 (en) * | 2015-12-22 | 2017-12-07 | Opera Solutions Usa, Llc | System and Method for Code and Data Versioning in Computerized Data Modeling and Analysis |
CN109725909A (en) * | 2018-05-07 | 2019-05-07 | 中国平安人寿保险股份有限公司 | Code file is packaged dispositions method, continuous integrating server and system |
CN112114865A (en) * | 2020-08-27 | 2020-12-22 | 微民保险代理有限公司 | Version data processing method and device, storage medium and electronic device |
-
2021
- 2021-12-02 CN CN202111464730.3A patent/CN114328405A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106528071A (en) * | 2015-09-15 | 2017-03-22 | 阿里巴巴集团控股有限公司 | Selection method and device for target code |
US20170351511A1 (en) * | 2015-12-22 | 2017-12-07 | Opera Solutions Usa, Llc | System and Method for Code and Data Versioning in Computerized Data Modeling and Analysis |
CN109725909A (en) * | 2018-05-07 | 2019-05-07 | 中国平安人寿保险股份有限公司 | Code file is packaged dispositions method, continuous integrating server and system |
CN112114865A (en) * | 2020-08-27 | 2020-12-22 | 微民保险代理有限公司 | Version data processing method and device, storage medium and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109240727A (en) | Application program update method, apparatus, computer equipment and storage medium | |
CN111389014A (en) | Game resource data monitoring method and device, computer equipment and storage medium | |
CN110597552B (en) | Configuration method, device, equipment and storage medium of project continuous integrated pipeline | |
CN109697140B (en) | Data backup method and device, data recovery method and device and storage medium | |
CN112182010B (en) | Dirty page refreshing method and device, storage medium and electronic equipment | |
CN113504918A (en) | Equipment tree configuration optimization method and device, computer equipment and storage medium | |
CN104408178A (en) | Device and method for WEB control loading | |
CN113918437A (en) | User behavior data analysis method and device, computer equipment and storage medium | |
CN113468118A (en) | File increment storage method and device, computer equipment and storage medium | |
CN114328405A (en) | File processing method, file processing device, computer equipment, storage medium and program product | |
CN111090701A (en) | Service request processing method and device, readable storage medium and computer equipment | |
CN114185566A (en) | Containerized deployment method, apparatus, computer device and storage medium | |
CN112835886A (en) | Data table field adding method and device | |
CN115617580B (en) | Incremental backup and recovery method and system based on Shared SST (SST) file | |
CN115687375A (en) | Database updating method and device, computer equipment and storage medium | |
CN115687074A (en) | Business system testing method and device, computer equipment and storage medium | |
CN118276902A (en) | Automatic updating method and device of application program and computer equipment | |
CN117130633A (en) | Application updating method, device, computer equipment and storage medium | |
CN117763247A (en) | Link downloading method, device, computer equipment and storage medium | |
CN114943045A (en) | Terminal webpage loading method and device based on offline cache and computer equipment | |
CN117654055A (en) | Application running method, device, computer equipment and storage medium | |
CN114053719A (en) | Resource storage and reading method and device, computer equipment and storage medium | |
CN117056220A (en) | Batch job testing method and device, computer equipment and storage medium | |
CN116094770A (en) | Data consistency verification method, device, system and computer equipment | |
CN114691635A (en) | Log acquisition method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |