File upgrading method, device, equipment and medium

By converting patch files into intermediate files and generating upgrade functions, the problem of code upgrades when there is no network connection is solved, enabling cross-system file upgrades and improving versatility and applicability.

CN115390878BActive Publication Date: 2026-08-04BEIJING TOPSEC NETWORK SECURITY TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING TOPSEC NETWORK SECURITY TECH
Filing Date
2022-09-13
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In existing technologies, code upgrade methods cannot be performed without an internet connection, and have low versatility, making them unsuitable for various systems.

Method used

The patch file is converted into an intermediate file, and an upgrade function is generated based on the file structure of the patch file. The file upgrade is achieved through data interaction between the upgrade management end and the target end, reducing the network requirements.

Benefits of technology

This enables the upgrading of defective code files on the target device without an internet connection, improving the system's applicability and versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115390878B_ABST
    Figure CN115390878B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a file upgrading method, device, equipment and medium, wherein the method comprises: in response to a conversion trigger operation, converting at least one preset patch file into at least one intermediate file; wherein the patch file is used for defect repair on a defect code file in an original code file of an application program, and the patch file corresponds to the defect code file one by one; adding file structure information of each patch file to an initial upgrading function to obtain a target upgrading function; and sending the at least one intermediate file and the target upgrading function to a target end, so that the target end respectively upgrades corresponding defect code files based on the target upgrading function and each intermediate file. Embodiments of the present disclosure are suitable for various systems, and can realize file upgrading without networking, thereby reducing the demand for network and improving the versatility from two dimensions of system environment and networking demand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a file upgrade method, apparatus, device, and medium. Background Technology

[0002] During program development, the completed code may have some defects, which can be resolved by upgrading the code.

[0003] In related technologies, developers can write improved code files to address defective parts of the code files, and the changes in the improved code files compared to the existing code files are identified as patch files. Then, an update command (patch) is used to update the defective parts of the code files based on the patch files, thus achieving file upgrades. However, in practical applications, this update command cannot be installed without an internet connection, and it is typically applicable to a single, fixed system, resulting in low versatility. Summary of the Invention

[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, this disclosure provides a file upgrade method, apparatus, device and medium.

[0005] This disclosure provides a file upgrade method, applied to an upgrade management terminal, the method comprising:

[0006] In response to a conversion trigger operation, at least one preset patch file is converted into at least one intermediate file; wherein the patch file is used to fix defects in defective code files in the original code files of the application, and the patch file corresponds one-to-one with the defective code file;

[0007] The file structure information of each patch file is added to the initial upgrade function to obtain the target upgrade function;

[0008] The at least one intermediate file and the target upgrade function are sent to the target end, so that the target end upgrades the corresponding defect code file based on the target upgrade function and each of the intermediate files.

[0009] This disclosure also provides a file upgrade device, configured in an upgrade management terminal, the device comprising:

[0010] A conversion module is used to convert at least one preset patch file into at least one intermediate file in response to a conversion trigger operation; wherein the patch file is used to fix defects in defective code files in the original code files of the application, and the patch file corresponds one-to-one with the defective code file;

[0011] The generation module is used to add the file structure information of each patch file to the initial upgrade function to obtain the target upgrade function;

[0012] The first sending module is used to send the at least one intermediate file and the target upgrade function to the target end, so that the target end can upgrade the corresponding defect code file based on the target upgrade function and each of the intermediate files.

[0013] This disclosure also provides an electronic device, the electronic device comprising: a processor; a memory for storing executable instructions of the processor; the processor being configured to read the executable instructions from the memory and execute the instructions to implement the file upgrade method provided in this disclosure.

[0014] This disclosure also provides a computer-readable storage medium storing a computer program for performing a file upgrade method as provided in this disclosure.

[0015] Compared with the prior art, the technical solution provided in this disclosure has the following advantages: The file upgrade scheme provided in this disclosure, in response to a conversion trigger operation, converts at least one preset patch file into at least one intermediate file; wherein, the patch file is used to repair defective code files in the original code file of the application, and the patch file corresponds one-to-one with the defective code file; the file structure information of each patch file is added to the initial upgrade function to obtain the target upgrade function; at least one intermediate file and the target upgrade function are sent to the target end, so that the target end upgrades the corresponding defective code files based on the target upgrade function and each intermediate file. Using the above technical solution, the patch file is converted into an intermediate file, and the upgrade function is determined based on the file structure of the patch file. Based on the upgrade function and the intermediate file, the defective code file of the target end can be upgraded. The upgrade function is generated based on the file structure of the patch file itself. This upgrade function has low system dependence, is applicable to multiple systems, and file upgrades are achieved based on data interaction between the upgrade management end and the target end. File upgrades can also be achieved without a network connection, reducing network requirements and improving versatility from both system environment and network requirements perspectives. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A schematic flowchart illustrating a file upgrade method provided in an embodiment of this disclosure;

[0019] Figure 2 A flowchart illustrating another file upgrade method provided in this embodiment of the disclosure;

[0020] Figure 3 This is a schematic diagram of the structure of a file upgrade device provided in an embodiment of the present disclosure;

[0021] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0022] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0023] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0024] To address the aforementioned problems, this disclosure provides a file upgrade method, which will be described below with reference to specific embodiments.

[0025] Figure 1 This is a flowchart illustrating a file upgrade method provided in an embodiment of the present disclosure. The method can be executed by a file upgrade device, which can be implemented in software and / or hardware, and is generally integrated into an electronic device. Figure 1 As shown, this method is applied to the upgrade management terminal and includes:

[0026] Step 101: In response to the conversion trigger operation, at least one preset patch file is converted into at least one intermediate file; wherein, the patch file is used to fix defects in the defective code files in the original code files of the application, and the patch file corresponds one-to-one with the defective code file.

[0027] In this embodiment, the upgrade management terminal can be a device that manages file upgrades, and the target terminal can be a device that specifically performs the file upgrade operation. After the upgrade management terminal generates the target upgrade function and intermediate file, it sends the target upgrade function and intermediate file to the target terminal. The target terminal can then upgrade the defective code file based on the target upgrade function and intermediate file, thereby fixing the defect.

[0028] In this embodiment, the conversion trigger operation can be an operation that instructs the file conversion. Specifically, this conversion trigger operation can include touch operations (such as click, long press, double click, etc.), voice control operations, or keyboard control operations, etc. The original code file can be the complete code file of the application before the file upgrade. This original code file can run on the device, but it has problems during operation. These problems are caused by defective code files within the original code file. These defective code files can be files with code errors. This embodiment does not limit the process of determining these defective code files. For example, the defective code file can be a file determined by developers debugging the original code file, or it can be a file determined by automatic debugging software to locate defects in the original code file. Taking the determination of defective code files through automatic debugging software as an example, the upgrade management terminal can mark the defective code files determined by the automatic debugging software. Developers modify the problematic code in the defective code files, resulting in patch files that correspond one-to-one with the defective code files. These patch files still have corresponding marks, and their filenames are the same as the corresponding defective code file names. After debugging all defective code files, the marked files in the original code file are identified as the modified patch files. Intermediate files can be obtained by changing the filename of the patch file. Based on this intermediate file, the patch file can be prevented from directly overwriting the defect code file on the target side, thereby avoiding the loss of the defect code file on the target side.

[0029] In this embodiment, in response to the user's conversion trigger operation, the filename of the patch file can be processed to obtain a defect code file that corresponds one-to-one with the patch file. This embodiment does not limit the filename processing method. For example, a preset character can be added before the filename of each patch file, or a preset character can be added after the filename of each patch file.

[0030] In some embodiments, converting at least one preset patch file into at least one intermediate file includes: determining a version number suffix based on a preset version number; and adding a version number suffix to the filename of each patch file to obtain the corresponding intermediate file.

[0031] The preset version number can be a serial number that identifies the version of the patch file, and the version number suffix can be composed of the preset version number and the backup suffix.

[0032] In this embodiment, a configuration file can be pre-set, specifying the current path of the patch file, the save path of the intermediate file, and a preset version number. The upgrade management terminal can read this configuration file, obtain the preset version number, and append a backup suffix to the preset version number to generate a version number suffix. Further, the upgrade management terminal reads the configuration file, determines the current path of the patch file, and reads the patch file from that path. A version number suffix is ​​added to the filename of the read patch file to obtain the corresponding intermediate file. Further still, the upgrade management terminal reads the configuration file, determines the save path of the intermediate file, and saves the generated intermediate file to that path, thus converting the patch file into an intermediate file and saving the intermediate file to the specified path.

[0033] For example, if the current path of the patch file in the configuration file is "F:\d\e", the intermediate file save path is "F:\d\newe", and the default version number is 1, then the upgrade management terminal can determine the version number suffix as .1.bak based on the default version number in the configuration file, read the patch file from F:\d\e, add .1.bak to the end of each patch file to obtain the intermediate file that corresponds one-to-one with the patch file, and save the generated intermediate file to the F:\d\newe folder.

[0034] Step 102: Add the file structure information of each patch file to the initial upgrade function to obtain the target upgrade function.

[0035] The file structure information can be information characterizing the file's storage features. Optionally, the patch file's file structure information includes the patch file's file path and filename. The file path can be the save path of each patch file, and the filename can be the patch file's name. This file structure information can be understood as an identifier that corresponds one-to-one with each patch file. The initial upgrade function can be a function whose logic for upgrading the file is already determined, but the specific file to be upgraded is not yet determined. The target upgrade function can be a function that performs upgrade processing on the defective code file. The logic for upgrading the file in the target upgrade function can be the same as that in the initial upgrade function, and the specific file to be upgraded is determined in the target upgrade function.

[0036] In this embodiment, developers can pre-write the logic for upgrading defective code files based on intermediate files as an initial upgrade function, and package this initial upgrade function to obtain a corresponding package file. After configuring the current path of the patch file in the configuration file, the upgrade management terminal can run this package file. By running the package file, the current path of the patch file in the configuration file is read, and the patch file is obtained according to the current path of the patch file. The patch file is then traversed using the File class in the Java Development Kit (JDK) to determine the file structure information of the patch file. This file structure information is added to the initial upgrade function to obtain the target upgrade function.

[0037] In some embodiments, adding the file structure information of each patch file to the initial upgrade function to obtain the target upgrade function includes: adding the file path information and file name of each patch file as specific variable values ​​to the initial upgrade function to obtain the target upgrade function.

[0038] In this embodiment, the initial upgrade function sets corresponding file path information variables and filename variables for each patch file. The values ​​of these file path information variables and filename variables in the initial upgrade function can be empty or preset values. After obtaining the file structure information of the patch files, the upgrade management terminal can assign the file path information of each patch file in the file structure information to the file path information variable in the initial upgrade function, and assign the filename of each patch file in the file structure information to the filename variable in the initial upgrade function. The initial upgrade function that completes the assignment of the file path information variables and filename variables is used as the target upgrade function.

[0039] Step 103: Send at least one intermediate file and the target upgrade function to the target end, so that the target end can upgrade the corresponding defect code file based on the target upgrade function and each intermediate file.

[0040] In this embodiment, after converting the patch file into an intermediate file, the upgrade management terminal can send the intermediate file and the target upgrade function to the target terminal. Upon receiving the intermediate file and the target upgrade function, the target terminal can identify the corresponding defective code file for each intermediate file. Further, the target upgrade function is run on the target terminal to restore the intermediate file to a patch file, and this patch file replaces the defective code file. It should be noted that during the process of replacing the defective code file with the patch file, the defective code file can be backed up in the file path where it is located.

[0041] In some embodiments, at least one intermediate file and a target upgrade function are sent to the target end, so that the target end upgrades the corresponding defective code file based on the target upgrade function and each intermediate file, including:

[0042] Send at least one intermediate file and the target upgrade function to the target end, so that the target end can locate the defect code file based on the specific value of the variable through the target upgrade function. Then, delete the version number suffix of each intermediate file to obtain the corresponding upgrade code file, and replace the defect code file corresponding to the intermediate file with each upgrade code file.

[0043] The upgrade code file can be the final file obtained by upgrading the defective code file. The content of the upgrade code file can be the same as the content of the patch file, and the file name of the upgrade code file can be the same as the file name of the patch file.

[0044] In this embodiment, after the upgrade management terminal sends at least one intermediate file and a target upgrade function to the target terminal, the target terminal can determine the file path of the defective code file through the specific value of the file path information variable in the target upgrade function, and determine the file name of the defective code file through the specific value of the file name variable in the target upgrade function, thereby locating each defective code file. The target terminal can determine the correspondence between the intermediate file and the defective code file based on the correspondence between the patch file and the intermediate file, and the correspondence between the patch file and the defective code file. The intermediate file is copied to the file path where the corresponding defective code file is located. A backup suffix is ​​added to the file name of the defective code file using the target upgrade function to obtain a backup file, which is then saved in the file path where the defective code file is located. Understandably, because the suffix has changed, this backup file cannot run on the device. Further, the version number suffix of the intermediate file is removed to obtain the upgrade code file corresponding to the intermediate file. Understandably, this upgrade code file can run on the device. For each defective code file located through the specific value of the variable in the target upgrade function, the defective code file is upgraded to an upgrade code file.

[0045] The file upgrade method provided in this disclosure, applied to an upgrade management terminal, includes: in response to a conversion trigger operation, converting at least one preset patch file into at least one intermediate file; wherein the patch file is used to repair defective code files in the original code files of the application, and there is a one-to-one correspondence between the patch file and the defective code file; adding the file structure information of each patch file to an initial upgrade function to obtain a target upgrade function; and sending at least one intermediate file and the target upgrade function to the target terminal, so that the target terminal upgrades the corresponding defective code files based on the target upgrade function and each intermediate file. By adopting the above technical solution, patch files are converted into intermediate files, and an upgrade function is determined based on the file structure of the patch file. Based on this upgrade function and the intermediate file, the defective code files on the target terminal can be upgraded. The upgrade function is generated based on the file structure of the patch file itself. This upgrade function has low system dependence, is applicable to various systems, and file upgrades are achieved based on data interaction between the upgrade management terminal and the target terminal. File upgrades can also be achieved without a network connection, reducing network requirements and improving versatility from both system environment and network requirements perspectives.

[0046] In some embodiments of this disclosure, the file upgrade method further includes sending the target deletion function and / or the target restore function to the target end.

[0047] The target deletion function can be a function that performs deletion operations on defective code files backed up at the file path where the defective code file is located. The target upgrade function can be obtained based on the initial upgrade function, which is a function where the logic for deleting the backed-up defective code files is determined, but the specific files to be deleted are not yet determined. In this embodiment, the specific values ​​of the variables in the initial restore function can be determined based on the file path information and filename of the patch files to obtain the target upgrade function. Specifically, after obtaining the file structure information of the patch files, the upgrade management terminal can assign the file path information of each patch file in the file structure information to the file path information variable in the initial deletion function, and determine the specific value of the filename variable in the initial deletion function based on the filename of each patch file in the file structure information. The initial deletion function that has completed the assignment of the file path information variable and the filename variable is used as the target deletion function.

[0048] The target restoration function can be a function that restores the upgrade code file to the corresponding defective code file. This target restoration function can be obtained based on the initial restoration function, which is a function where the logic for restoring the file has been determined, but the specific file to be restored has not yet been determined. In this embodiment, the specific values ​​of the variables in the initial restoration function can be determined based on the file path information and filename of the patch file to obtain the target restoration function. Specifically, after obtaining the file structure information of the patch file, the upgrade management terminal can assign the file path information of each patch file in the file structure information to the file path information variable in the initial restoration function, and determine the specific value of the filename variable in the initial restoration function based on the filename of each patch file in the file structure information. The initial restoration function that has completed the assignment of the file path information variable and the filename variable is used as the target restoration function.

[0049] In some embodiments, the target deletion function is used to delete backup files on the target end. Specifically, the target deletion function can be run on the target end, determining the file path of the backup file through the specific value of the file path information variable in the target deletion function, and determining the file name of the backup file through the specific value of the file name variable in the target deletion function, thereby locating each backup file. Furthermore, the target deletion function deletes each backup file. Thus, even when the upgrade code file obtained from upgrading the defective code file runs without errors, the backup of the defective code file can be deleted, improving the effective utilization of data storage space and avoiding waste of data storage space.

[0050] The target restoration function is used to remove the backup suffix from the filenames of backup files to obtain the defective code file when there are anomalies in the defective code file after the upgrade on the target side, and then replace the corresponding upgraded defective code file with the defective code file; where the backup file is the file obtained by adding the backup suffix to the filename of the defective code file.

[0051] Specifically, after upgrading the defective code file to an upgraded code file on the target end, the upgraded code file may have defects during operation. If the defects in the upgraded code file are more severe than those in the permission code file, the upgraded code file can be restored to the defective code file on the target end. In this embodiment, the restoration of the upgraded code file can be achieved through a target restoration function. Specifically, the target end can determine the file path of the upgraded code file based on the specific value of the file path information in the target restoration function, and determine the file name of the upgraded code file based on the specific value of the file name variable in the target restoration function, thereby achieving the location of each upgraded code file. The target restoration function adds a version suffix to the file name of the upgraded code file and removes the backup suffix from the backup file to obtain the defective code file. Thus, in the case of an anomaly in the upgraded code file, the upgraded code file can be restored. Since the defective code file backup is in the same folder as the upgraded code file, the loss of the defective code file due to backup in a different path is avoided. Furthermore, since the files for restoration and backup operations are in the same folder, data transfer operations during backup are avoided, improving the efficiency of backup processing.

[0052] The file upgrade method in this embodiment will be further illustrated by a specific example below. Figure 2 A flowchart illustrating yet another file upgrade method provided in this disclosure embodiment is shown below. Figure 2 As shown, the file upgrade method includes:

[0053] Step 201: Obtain the patch file and convert it into an intermediate file.

[0054] Step 202: Package the edited initial upgrade function, initial deletion function, and initial restore function into a single package file.

[0055] Step 203: Configure the configuration file. This configuration file includes: the path to save patch files, the path to save intermediate files, and the default version number.

[0056] Step 204: Verify if the configuration file is valid. If it is, proceed to step 205; otherwise, proceed to step 203.

[0057] Step 205: Launch the command-line tool (Windows PowerShell), run the package file, and obtain the target upgrade function, target deletion function, and target restore function. For example, if the functions are written in Java and the packaged file is named patch_making.jar, you can run the package file using the command `java -jar patch_making.jar`. During the execution of the package file, the file structure of the patch file is traversed using file classes from the Java Development Kit to obtain file structure information. This file structure information is added to the initial upgrade function to obtain the target upgrade function (run()); the file structure information is added to the initial deletion function to obtain the target deletion function (reset()); and the file structure information is added to the initial deletion function to obtain the target deletion function (delete()).

[0058] Step 206: Upload intermediate files to the target end so that the target end can upgrade the defective code file to an upgrade code file using the target upgrade function, delete the backup file obtained by backing up the defective code file using the target delete function, and restore the upgrade code file to the defective code file using the target restore function.

[0059] In the above solution, functions written in Java are used to generate target upgrade, target deletion, and target restore functions that support cross-platform applications and achieve a lightweight design. It can implement three functions: file upgrade, upgrade restore, and deletion backup, and the operation is quick. Users can adjust the configuration file and expand the script content to achieve richer functions and strong extensibility. It avoids anomalies caused by manual patch upgrades.

[0060] Figure 3 This disclosure provides a schematic diagram of a file upgrade device, which can be implemented by software and / or hardware and is generally integrated into an electronic device. For example... Figure 3 As shown, the device, located at the upgrade management terminal, includes:

[0061] The conversion module 301 is used to convert at least one preset patch file into at least one intermediate file in response to a conversion trigger operation; wherein the patch file is used to fix defects in defective code files in the original code file of the application, and the patch file corresponds one-to-one with the defective code file;

[0062] The generation module 302 is used to add the file structure information of each patch file to the initial upgrade function to obtain the target upgrade function;

[0063] The first sending module 303 is used to send the at least one intermediate file and the target upgrade function to the target end, so that the target end upgrades the corresponding defect code file based on the target upgrade function and each of the intermediate files.

[0064] Optionally, the conversion module 301 is used for:

[0065] The version number suffix is ​​determined based on the preset version number;

[0066] The version number suffix is ​​added to the filename of each patch file to obtain the corresponding intermediate file.

[0067] Optionally, the file structure information of the patch file includes the file path information and file name of the patch file.

[0068] Optionally, the generation module 302 is used to:

[0069] The file path information and file name of each patch file are added as variable values ​​to the initial upgrade function to obtain the target upgrade function.

[0070] Optionally, the first transmitting module 303 is used for:

[0071] The at least one intermediate file and the target upgrade function are sent to the target end, so that the target end can locate the defect code file based on the specific value of the variable through the target upgrade function, delete the version number suffix of each intermediate file to obtain the corresponding upgrade code file, and replace the defect code file corresponding to the intermediate file with each upgrade code file.

[0072] Optionally, the device further includes:

[0073] The second sending module is used to send the target deletion function and / or the target restoration function to the target terminal.

[0074] Optionally, the target deletion function is used to delete backup files on the target end; the target restore function is used to, in the event that the upgraded defect code file on the target end is abnormal, remove the backup suffix from the filename of each backup file to obtain a defect code file, and use the defect code file to replace the corresponding upgraded defect code file; wherein, the backup file is a file obtained by adding the backup suffix to the filename of the defect code file.

[0075] The file upgrade apparatus provided in this disclosure can execute the file upgrade method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of the method execution.

[0076] Figure 4This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 4 As shown, the electronic device 400 includes one or more processors 401 and memory 402.

[0077] The processor 401 may be a central processing unit (CPU) or other form of processing unit with file upgrade capability and / or instruction execution capability, and may control other components in the electronic device 400 to perform the desired function.

[0078] The memory 402 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 401 may execute the program instructions to implement the file upgrade method of the embodiments of this disclosure described above and / or other desired functions. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.

[0079] In one example, the electronic device 400 may also include an input device 403 and an output device 404, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0080] In addition, the input device 403 may also include, for example, a keyboard, a mouse, etc.

[0081] The output device 404 can output various information to the outside, including determined distance information, direction information, etc. The output device 404 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0082] Of course, for the sake of simplicity, Figure 4 Only some of the components of the electronic device 400 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 400 may include any other suitable components depending on the specific application.

[0083] In addition to the methods and devices described above, embodiments of this disclosure may also be computer program products, including computer program instructions that, when executed by a processor, cause the processor to perform the file upgrade method provided in embodiments of this disclosure.

[0084] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0085] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the file upgrade method provided in embodiments of this disclosure.

[0086] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0087] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0088] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A file upgrade method, characterized in that, Applications include upgrade management systems, including: In response to a conversion trigger operation, at least one preset patch file is converted into at least one intermediate file; wherein, the patch file is used to fix defects in defective code files in the original code files of the application, the patch file corresponds one-to-one with the defective code file, and the file structure information of the patch file includes the file path information and file name of the patch file; The file structure information of each patch file is added to the initial upgrade function to obtain the target upgrade function; Send the at least one intermediate file and the target upgrade function to the target end, so that the target end upgrades the corresponding defect code file based on the target upgrade function and each of the intermediate files respectively; The step of converting at least one preset patch file into at least one intermediate file includes: determining a version number suffix based on a preset version number; and adding the version number suffix to the filename of each patch file to obtain the corresponding intermediate file. The step of adding the file structure information of each patch file to the initial upgrade function to obtain the target upgrade function includes: adding the file path information and file name of each patch file as specific variable values ​​to the initial upgrade function to obtain the target upgrade function; The step of sending the at least one intermediate file and the target upgrade function to the target end, so that the target end can upgrade the corresponding defect code file based on the target upgrade function and each of the intermediate files, includes: sending the at least one intermediate file and the target upgrade function to the target end, so that after the target end locates the defect code file based on the specific value of the variable through the target upgrade function, it deletes the version number suffix of each of the intermediate files to obtain the corresponding upgrade code file, and replaces the defect code file corresponding to the intermediate file with each of the upgrade code files.

2. The method according to claim 1, characterized in that, Also includes: Send the target deletion function and / or target restoration function to the target end.

3. The method according to claim 2, characterized in that, The target deletion function is used to delete the backup file on the target end; The target restoration function is used to, in the event that the upgraded defect code file in the target terminal has an anomaly, remove the backup suffix from the filename of each backup file to obtain the defect code file, and use the defect code file to replace the corresponding upgraded defect code file; wherein, the backup file is a file obtained by adding the backup suffix to the filename of the defect code file.

4. A file upgrade device, characterized in that, Settings are configured on the upgrade management terminal, including: A conversion module is used to convert at least one preset patch file into at least one intermediate file in response to a conversion trigger operation; wherein, the patch file is used to fix defects in defective code files in the original code files of the application, the patch file corresponds one-to-one with the defective code file, and the file structure information of the patch file includes the file path information and file name of the patch file; The generation module is used to add the file structure information of each patch file to the initial upgrade function to obtain the target upgrade function; The first sending module is configured to send the at least one intermediate file and the target upgrade function to the target end, so that the target end upgrades the corresponding defect code file based on the target upgrade function and each of the intermediate files respectively; The step of converting at least one preset patch file into at least one intermediate file includes: determining a version number suffix based on a preset version number; and adding the version number suffix to the filename of each patch file to obtain the corresponding intermediate file. The step of adding the file structure information of each patch file to the initial upgrade function to obtain the target upgrade function includes: adding the file path information and file name of each patch file as specific variable values ​​to the initial upgrade function to obtain the target upgrade function; The step of sending the at least one intermediate file and the target upgrade function to the target end, so that the target end can upgrade the corresponding defect code file based on the target upgrade function and each of the intermediate files, includes: sending the at least one intermediate file and the target upgrade function to the target end, so that after the target end locates the defect code file based on the specific value of the variable through the target upgrade function, it deletes the version number suffix of each of the intermediate files to obtain the corresponding upgrade code file, and replaces the defect code file corresponding to the intermediate file with each of the upgrade code files.

5. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the file upgrade method according to any one of claims 1-3.

6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing the file upgrade method according to any one of claims 1-3.