File backup method and device, electronic equipment and program product

By distinguishing file types during the resource transfer process for backup processing, the resource consumption problem caused by the inability to respond to file backups in real time in existing technologies is solved, and an efficient and secure file backup process is achieved.

CN121722611APending Publication Date: 2026-03-24CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-19
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies cannot respond to file backups in real time, causing resource consumption and blocking of other processing flows when backing up a large number of files on a scheduled basis.

Method used

During resource transfer operations, the system responds to file backup requests carrying identification information, differentiates processing flows based on file type, processes resource transfer files in real time, and processes external system files in batches, ensuring security and efficiency through encrypted transmission and preset conditions.

Benefits of technology

It enables real-time response to resource transfer and related file backup, avoiding resource contention and improving processing efficiency and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121722611A_ABST
    Figure CN121722611A_ABST
Patent Text Reader

Abstract

The invention discloses a file backup method and device, electronic equipment and a program product, and the method comprises the steps: responding to a file backup request carrying identification information in a process of executing a resource transfer service; determining a file type of the to-be-backed-up file based on the identification information, and analyzing the file backup request to determine a first access path when the file type of the to-be-backed-up file is a resource transfer file type; synchronizing the encrypted file to be backed up to a server based on the first access path; under the condition that the file type of the to-be-backed-up file is a peripheral system file type, analyzing at least one file backup request acquired from a peripheral file data set, and determining a second access path of each to-be-backed-up file; and synchronizing each file to be backed up to the server based on the second access path. Therefore, file backup related to resource transfer can be responded in time, resource scrambling caused by simultaneous backup of a large number of files can be avoided, and processing efficiency and safety are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a file backup method, apparatus, electronic device, and program product. Background Technology

[0002] Data backup is essential to ensure the normal operation of the data center in the event of unforeseen circumstances, such as human error, misconfiguration, power outages, network interruptions, and disk failures. With the increasing number of electronic resource objects and the growing volume of uploaded files, it is crucial to ensure the security of resource transfer operations and prevent data loss of related files due to unforeseen events.

[0003] In existing technologies, file backups are performed periodically after the main process of resource transfer is completed. This process cannot respond to file backups in real time, and the simultaneous backup of a large number of files at regular intervals consumes a lot of resources and blocks other processing flows. Summary of the Invention

[0004] This invention provides a file backup method, apparatus, electronic device, and program product to solve the problem in the prior art that it cannot respond to file backup in real time and that the simultaneous backup of a large number of files at regular intervals can block other processing flows.

[0005] In a first aspect, embodiments of this application provide a file backup method, the method comprising: During the execution of resource transfer operations, respond to file backup requests carrying identification information; Based on the identification information carried in the file backup request, the file type of the file to be backed up is determined, wherein the file type includes resource transfer file type and peripheral system file type; If the file type of the file to be backed up is a resource transfer file type, the file backup request is parsed to determine the first access path of the file to be backed up; the file to be backed up is obtained based on the first access path, and the encrypted file to be backed up is synchronized to the server. If the file type of the file to be backed up is an external system file type, the file backup request is stored in the external file dataset. If the preset processing conditions are met, at least one file backup request obtained from the external file dataset is parsed, and a second access path for each file to be backed up is determined based on the path correspondence. Based on the second access path, each file to be backed up is synchronized to the server.

[0006] In one possible implementation, parsing the file backup request to determine the first access path of the file to be backed up includes: The file backup request is deserialized and parsed to obtain the path information segment, file information segment, resource transfer number, and absolute path of the file to be backed up; If the absolute path is valid, the absolute path shall be used as the first access path. If the absolute path is invalid, the path information segment is formatted, and based on a preset concatenation rule, the formatted path information segment, the file information segment, and the resource transfer number are concatenated to obtain the first access path.

[0007] In one possible implementation, synchronizing the encrypted backup file to the server includes: After generating a session key based on the encryption protocol, the file to be backed up is encrypted based on the session key to generate an encrypted file to be backed up. After establishing an encrypted transmission path with the server based on the encryption protocol and the session key, the encrypted file to be backed up is transmitted to the server through the encrypted transmission path.

[0008] In one possible implementation, the file information segment includes a first file size and a first information check value of the file to be backed up; After synchronizing the encrypted backup file to the server, the process also includes: At preset time intervals, obtain the second file size and second information verification value of the synchronized file corresponding to the file to be backed up in the server; If the size of the first file is the same as the size of the second file, and the first information verification value is the same as the second information verification value, then the verification is deemed successful. If the size of the first file is inconsistent with the size of the second file, and / or the first information verification value is inconsistent with the second information verification value, the verification is determined to be unsuccessful, and an alarm signal is sent.

[0009] In one possible implementation, the preset processing conditions include at least one of the following: The number of file backup requests in the peripheral file dataset has reached a preset threshold; The current time has reached the preset time node for batch processing of the centralized file backup requests of the peripheral file dataset.

[0010] In one possible implementation, parsing at least one file backup request obtained from the peripheral file dataset and determining a second access path for each file to be backed up based on path correspondence includes: Parse at least one file backup request obtained from the peripheral file dataset to obtain a business attribute identifier corresponding to each file to be backed up; Based on the pre-stored path correspondence between business attribute identifiers and second access paths, the second access path for each file to be backed up is determined.

[0011] In one possible implementation, synchronizing each file to be backed up to the server based on the second access path includes: Based on the business attribute identifier of each file to be backed up, the priority score of each file to be backed up is calculated according to the business importance, data update frequency, business interruption impact and preset weight coefficient set. Based on the priority score of each file to be backed up, each file to be backed up is sequentially obtained through the second access path corresponding to each file and sent to the server.

[0012] Secondly, embodiments of this application provide a file backup device, the device comprising: The response module is used to respond to file backup requests carrying identification information during the execution of resource transfer services; based on the identification information carried in the file backup request, it determines the file type of the file to be backed up, wherein the file type includes resource transfer file type and peripheral system file type; The backup module is configured to: 1) parse the file backup request to determine a first access path for the file to be backed up when the file type of the file to be backed up is a resource transfer file; 2) obtain the file to be backed up based on the first access path and synchronize the encrypted file to the server; 3) store the file backup request in an external file dataset when the file type of the file to be backed up is an external system file; 4) parse at least one file backup request obtained from the external file dataset under preset processing conditions, determine a second access path for each file to be backed up based on path correspondence; and 5) synchronize each file to be backed up to the server based on the second access path.

[0013] Thirdly, embodiments of this application provide an electronic device, including: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps included in any one of the above file backup methods according to the obtained program instructions.

[0014] Fourthly, embodiments of this application provide a computer program product, the computer program product comprising: computer program code, which, when run on a computer, causes the computer to execute any one of the above-described file backup methods.

[0015] The beneficial effects of this invention are as follows: This application provides a file backup method, apparatus, electronic device, and program product. The method, during the execution of a resource transfer service, responds to a file backup request carrying identification information; based on the identification information carried in the file backup request, it determines the file type of the file to be backed up, wherein the file type includes resource transfer file type and peripheral system file type; if the file type of the file to be backed up is a resource transfer file type, it parses the file backup request to determine a first access path for the file to be backed up; it obtains the file to be backed up based on the first access path and synchronizes the encrypted file to the server; if the file type of the file to be backed up is a peripheral system file type, it stores the file backup request in a peripheral file dataset; if preset processing conditions are met, it parses at least one file backup request obtained from the peripheral file dataset and determines a second access path for each file to be backed up based on path correspondence; and it synchronizes each file to be backed up to the server based on the second access path. Therefore, when the file type to be backed up is a resource transfer file, the file to be backed up is processed in real time; when the file type to be backed up is an external system file, batch processing is performed if the preset processing conditions are met. This enables timely response to file backups related to resource transfer and avoids resource contention caused by backing up a large number of files at the same time, thereby improving processing efficiency and security. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram illustrating an application scenario of a file backup method provided in an embodiment of this application; Figure 2 A flowchart illustrating a file backup method provided in an embodiment of this application; Figure 3 A flowchart illustrating another file backup method provided in this application embodiment; Figure 4 A flowchart illustrating another file backup method provided in this application embodiment; Figure 5 A flowchart illustrating another file backup method provided in this application embodiment; Figure 6 A flowchart illustrating another file backup method provided in this application embodiment; Figure 7 This is a schematic diagram of the structure of a file backup device provided in an embodiment of this application; Figure 8 This application also provides a schematic diagram of the structure of an electronic device. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0019] The terms "first" and "second" in the specification, claims, and accompanying drawings are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more, and is not limited by the embodiments described in this application.

[0020] The following description, in conjunction with the accompanying drawings, illustrates exemplary embodiments of this application, including various details to aid understanding. These embodiments should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that in the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solutions of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0021] The acquisition, transmission, storage, and use of data in this application all comply with the requirements of relevant national laws and regulations.

[0022] Before introducing the resource transfer method provided in the embodiments of this application, for ease of understanding, the technical background of the embodiments of this application will be described in detail below.

[0023] Data backup is essential to ensure the normal operation of the data center in the event of unforeseen circumstances, such as human error, misconfiguration, power outages, network interruptions, and disk failures. With the increasing number of electronic resource objects and the growing volume of uploaded files, it is crucial to ensure the security of resource transfer operations and prevent data loss of related files due to unforeseen events.

[0024] In existing technologies, file backups are performed periodically after the main process of resource transfer is completed. This process cannot respond to file backups in real time, and the simultaneous backup of a large number of files at regular intervals consumes a lot of resources and blocks other processing flows.

[0025] In view of this, embodiments of this application provide a file backup method, apparatus, electronic device, and program product. The method, during the execution of a resource transfer service, responds to a file backup request carrying identification information; based on the identification information carried in the file backup request, determines the file type of the file to be backed up, wherein the file type includes resource transfer file type and peripheral system file type; if the file type of the file to be backed up is a resource transfer file type, parses the file backup request to determine a first access path for the file to be backed up; obtains the file to be backed up based on the first access path and synchronizes the encrypted file to be backed up to the server; if the file type of the file to be backed up is a peripheral system file type, stores the file backup request in a peripheral file dataset; if preset processing conditions are met, parses at least one file backup request obtained from the peripheral file dataset, determines a second access path for each file to be backed up based on path correspondence; and synchronizes each file to be backed up to the server based on the second access path. Therefore, when the file type to be backed up is a resource transfer file, the file to be backed up is processed in real time; when the file type to be backed up is an external system file, batch processing is performed if the preset processing conditions are met. This enables timely response to file backups related to resource transfer and avoids resource contention caused by backing up a large number of files at the same time, thereby improving processing efficiency and security.

[0026] The following is a brief introduction to the application scenarios to which the technical solutions of the embodiments of this application are applicable. It should be noted that the application scenarios described below are only for illustrating the embodiments of this application and are not intended to limit the scope. In specific implementation, the technical solutions provided by the embodiments of this application can be flexibly applied according to actual needs.

[0027] like Figure 1The diagram illustrates an application scenario of a file backup method provided in this application. The application scenario diagram includes a terminal device 110 and a server 120.

[0028] It should be noted that the file backup method in this embodiment can be executed by an electronic device, which can be a server 120 or a terminal device 110. That is, the method can be executed by the server 120 or the terminal device 110 alone, or by both the server 120 and the terminal device 110. For example, when executed by both the server 120 and the terminal device 110, the terminal device 110 performs a resource transfer service, which can be input by the user or triggered by a staff member. During the execution of the resource transfer service, the terminal device 110 sends a file backup request to the server 120. The server 120 responds to the file backup request carrying identification information, determines the file type of the file to be backed up based on the identification information carried in the file backup request, and if the file type of the file to be backed up is a resource transfer file type, parses the file backup request to determine a first access path; obtains the file to be backed up based on the first access path, and synchronizes the encrypted file to be backed up to the server. The server parses at least one file backup request obtained from the peripheral file dataset when the file type to be backed up is a peripheral system file type, and determines a second access path for each file to be backed up. Based on the second access path, each file to be backed up is synchronized to the server. Thus, when the file type to be backed up is a resource transfer file type, the file to be backed up is processed in real time. When the file type to be backed up is a peripheral system file type, batch processing is performed under preset processing conditions. This enables timely response to file backups related to resource transfer and avoids resource contention caused by backing up a large number of files simultaneously, improving processing efficiency and security.

[0029] In one alternative implementation, the terminal device 110 and the server 120 can communicate via a communication network.

[0030] In one alternative implementation, the communication network is a wired network or a wireless network.

[0031] It should be noted that, Figure 1 The examples shown are merely illustrative; in reality, the number of terminal devices and servers is unlimited and is not specifically limited in the embodiments of this application.

[0032] The message distribution method provided by the exemplary embodiments of this application will be described below with reference to the accompanying drawings and the application scenarios described above. It should be noted that the application scenarios described above are only shown to facilitate understanding of the spirit and principles of this application, and the embodiments of this application are not limited in any way in this respect.

[0033] Figure 2 This document illustrates a flowchart of a file backup method provided in an embodiment of this application. Figure 2 As shown, the method may include the following steps: S201. During the execution of resource transfer operations, respond to file backup requests carrying identification information; S202. Based on the identification information carried in the file backup request, determine the file type of the file to be backed up, where the file type includes resource transfer file type and peripheral system file type; In a specific embodiment, during the execution of resource transfer, resource transfer files and peripheral system files can be generated. The resource transfer files are files associated with the resource transfer service and may include the resource transferor, resource recipient, and resource transfer values. The peripheral system files are files generated by the peripheral system itself that are related to the resource transfer service and may include log files, configuration files, report files, etc. generated based on the resource transfer service.

[0034] S203. If the file type of the file to be backed up is a resource transfer file type, parse the file backup request and determine the first access path of the file to be backed up; obtain the file to be backed up based on the first access path and synchronize the encrypted file to be backed up to the server. In a specific embodiment, the identification information carried in the file backup request is compared with preset identification information to determine the file type of the file to be backed up. Two separate processes are performed for file types classified as resource transfer files and peripheral system files, allowing for real-time processing of resource transfer files and batch processing of peripheral system files at intervals, avoiding resource contention and process blockage caused by unified processing.

[0035] In one possible implementation, such as Figure 3 The diagram shown is a flowchart of another file backup method provided in this application embodiment. The specific steps for determining the first access path are as follows: S301. Deserialize and parse the file backup request to obtain the path information segment, file information segment, resource transfer number and absolute path of the file to be backed up. In a specific embodiment, the received file backup request is a serialized file backup request information. By deserializing the file backup request information, the serialized file backup request information can be converted into a readable structure, thereby facilitating information extraction.

[0036] The path information segment contains path-related information for storing files, such as the directory and subdirectories of the files to be backed up; the file information segment contains information such as the file name and file size; the resource transfer order number is associated with the resource transfer business and is used to ensure the uniqueness of the file; the absolute path is a normalized raw path that does not contain any additional URL parameters or query strings.

[0037] S302. If the absolute path is valid, the absolute path shall be used as the first access path. S303. In the case of an invalid absolute path, the path information segment is formatted. Based on the preset concatenation rules, the formatted path information segment, file information segment, and resource transfer number are concatenated to obtain the first access path.

[0038] In a specific embodiment, if an absolute path exists, it is determined that the absolute path is valid and used as the first access path, thereby obtaining the file to be backed up based on the first access path.

[0039] If the absolute path does not exist, it is determined to be invalid. The path information segment is then formatted, and invalid segments are deleted. The formatted path information segment, file information segment, and resource transfer number are then concatenated according to a preset concatenation rule to obtain the first access path. The preset concatenation rule is pre-defined.

[0040] For example, let's take a path information segment of " / data / 890 / file / ", a file information segment of "payment_record.pdf", and a resource transfer order number of "T-20250406-079" as an example.

[0041] The path segment " / data / 890 / file / " is formatted by removing spaces and extra " / ", resulting in the formatted path segment " / data / 890 / file". Following the preset concatenation rule of path segment + " / " + file segment + "_" + "resource transfer number", the first access path is obtained. According to the preset concatenation rule, the first access path can be " / data / 890 / file / payment_record.pdf_T-20250406-079", thus allowing the file to be backed up to be retrieved based on this first access path.

[0042] In one possible implementation, such as Figure 4 The diagram shown is a flowchart of another file backup method provided in this application embodiment. After determining the first access path, the steps for synchronizing the encrypted file to be backed up to the server are as follows: S401. After generating a session key based on the encryption protocol, encrypt the file to be backed up based on the session key to generate the encrypted file to be backed up. In specific embodiments, the encryption protocol can be SSL (Secure Sockets Layer), TLS (Transport Layer Security), AES (Advanced Encryption Standard), etc. The session key is generated based on the encryption protocol and is used to encrypt the file to be backed up during data transmission and to decrypt the encrypted file to be backed up after transmission is completed.

[0043] The generated session key can be used for symmetric encryption, meaning the same session key is used for both encryption and decryption; or it can be used for asymmetric encryption, where a public and private key are generated using an encryption protocol, the public key is used to encrypt the file to be encrypted, and the private key is used to decrypt the encrypted file to be backed up. This ensures the security of file transfer and prevents files from being intercepted and deciphered.

[0044] S402. After establishing an encrypted transmission path with the server based on the encryption protocol and session key, the encrypted file to be backed up is transmitted to the server through the encrypted transmission path.

[0045] During file transfer, an encrypted transmission path is established between the local server and the backup server based on an encryption protocol and session key. The encrypted file to be backed up is then transmitted to the server through the encrypted transmission path, preventing data from being stolen or tampered with during transmission and improving the security of data transmission.

[0046] It is understood that the server to be backed up can be a disaster recovery server, which can be a local server or a cloud server; this application does not limit this.

[0047] In one possible implementation, the file information segment includes a first file size and a first information verification value of the file to be backed up; after synchronizing the encrypted file to be backed up to the server, the method further includes: obtaining the second file size and the second information verification value of the synchronized file corresponding to the file to be backed up in the server at preset time intervals; if the first file size and the second file size are the same, and the first information verification value and the second information verification value are the same, the verification is determined to be successful; if the first file size and the second file size are inconsistent, and / or the first information verification value and the second information verification value are inconsistent, the verification is determined to be unsuccessful, and an alarm signal is sent.

[0048] In a specific embodiment, after the file to be backed up is synchronized to the server, it is also necessary to verify the synchronized file on the server. If the second file size and the second information verification value of the synchronized file are consistent with the first file size and the first information verification value of the file to be backed up, the verification is determined to be successful and the file saved on the server is confirmed to be correct. Otherwise, if the verification fails, it is determined that the file is saved incorrectly, and an alarm signal is sent to notify the user to re-upload or repair the file.

[0049] Understandably, the first and second information check values ​​are usually values ​​generated by a hash algorithm to verify the integrity of the file. If the hash values ​​match, it indicates that the contents of the two files are the same; otherwise, it means that the file may have been modified or corrupted.

[0050] S204. If the file type of the file to be backed up is an external system file type, store the file backup request in the external file dataset; if the preset processing conditions are met, parse at least one file backup request obtained from the external file dataset, determine the second access path for each file to be backed up based on the path correspondence; synchronize each file to be backed up to the server based on the second access path.

[0051] In this embodiment, since the peripheral system files are files generated by the peripheral system itself and related to the resource transfer business, the backup files of the peripheral system file type can be processed in batches at intervals to avoid process blockage caused by processing backup files of the resource transfer file type at the same time, thereby improving processing efficiency and security.

[0052] For example, the preset processing conditions include at least one of the following: the number of file backup requests in the peripheral file dataset reaches a preset threshold; the current time reaches a preset time node for batch processing of file backup requests in the peripheral file dataset.

[0053] In a specific embodiment, multiple received file backup requests can be stored in an external file dataset until the number of file backup requests in the external file dataset reaches a preset threshold, and then each file backup request information in the external file dataset is processed.

[0054] Multiple received file backup requests can be stored in an external file dataset until the current time reaches the preset time node for batch processing of file backup requests in the external file dataset. Multiple file backup requests received within this preset time period are then processed.

[0055] In one possible implementation, such as Figure 5The diagram shown illustrates another file backup method provided in this application embodiment. The steps for confirming the second access path are as follows: S501. Parse at least one file backup request obtained from the peripheral file dataset to obtain the business attribute identifier corresponding to each file to be backed up; S502. Based on the path correspondence between the pre-stored business attribute identifier and the second access path, determine the second access path for each file to be backed up.

[0056] In a specific embodiment, when batch processing multiple file backup requests, each file backup request is parsed to obtain a business attribute identifier corresponding to the file backup request. Then, based on the path correspondence between the business attribute identifier and the second access path, the second access path corresponding to each file request information is determined, thereby determining the second access path for each file to be backed up. The file to be backed up can then be obtained through its second access path.

[0057] In one possible implementation, such as Figure 6 The diagram shown is a flowchart of another file backup method provided in this application embodiment. The specific steps for synchronizing each file to be backed up to the server based on the second access path are as follows: S601. Based on the business attribute identifier of each file to be backed up, the business importance, data update frequency, business interruption impact and preset weight coefficient set, calculate the priority score of each file to be backed up. In a specific embodiment, the preset set of weight coefficients includes a first weight coefficient, a second weight coefficient, and a third weight coefficient that correspond one-to-one with the importance of the business, the frequency of data updates, and the degree of impact of business interruption. For each file to be backed up, the first product of the importance of the business and the first weight coefficient, the second product of the frequency of data updates and the second weight coefficient, and the third product of the degree of impact of business interruption and the third weight coefficient are calculated. The sum of the first product, the second product, and the third product is used as the priority score of the file to be backed up.

[0058] S602. Based on the priority score of each file to be backed up, each file to be backed up is obtained sequentially through the second access path corresponding to each file to be backed up and sent to the server.

[0059] In a specific embodiment, based on the priority score of each file to be backed up, the files are sequentially obtained through the second access path corresponding to each file and sent to the server in descending order of priority score, thereby achieving batch processing and improving file backup efficiency.

[0060] This application provides a file backup method. During the execution of a resource transfer service, the method responds to a file backup request carrying identification information. Based on the identification information carried in the file backup request, it determines the file type of the file to be backed up, where the file type includes resource transfer file type and peripheral system file type. If the file type of the file to be backed up is a resource transfer file type, the method parses the file backup request to determine a first access path for the file to be backed up. Based on the first access path, the method obtains the file to be backed up and synchronizes the encrypted file to the server. If the file type of the file to be backed up is a peripheral system file type, the method stores the file backup request in a peripheral file dataset. Under preset processing conditions, it parses at least one file backup request obtained from the peripheral file dataset and determines a second access path for each file to be backed up based on path correspondence. Based on the second access path, it synchronizes each file to be backed up to the server. Therefore, when the file type to be backed up is a resource transfer file, the file to be backed up is processed in real time; when the file type to be backed up is an external system file, batch processing is performed if the preset processing conditions are met. This enables timely response to file backups related to resource transfer and avoids resource contention caused by backing up a large number of files at the same time, thereby improving processing efficiency and security.

[0061] Based on the same inventive concept, this application also provides a file backup device, which is similar in principle to the above-described file backup method, and the repeated parts will not be described again. Figure 7 As shown, it includes: The response module 701 is used to respond to file backup requests carrying identification information during the execution of resource transfer services; based on the identification information carried in the file backup request, it determines the file type of the file to be backed up, wherein the file type includes resource transfer file type and peripheral system file type; The backup module 702 is configured to: 1) parse the file backup request to determine a first access path for the file to be backed up when the file type of the file to be backed up is a resource transfer file type; 2) obtain the file to be backed up based on the first access path and synchronize the encrypted file to the server; 3) store the file backup request in an external file dataset when the file type of the file to be backed up is an external system file type; 4) parse at least one file backup request obtained from the external file dataset under preset processing conditions, determine a second access path for each file to be backed up based on path correspondence; and 5) synchronize each file to be backed up to the server based on the second access path.

[0062] In some optional implementations, the backup module 702 is specifically used for: The file backup request is deserialized and parsed to obtain the path information segment, file information segment, resource transfer number, and absolute path of the file to be backed up; If the absolute path is valid, the absolute path shall be used as the first access path. If the absolute path is invalid, the path information segment is formatted, and based on a preset concatenation rule, the formatted path information segment, the file information segment, and the resource transfer number are concatenated to obtain the first access path.

[0063] In some optional implementations, the backup module 702 is specifically used for: After generating a session key based on the encryption protocol, the file to be backed up is encrypted based on the session key to generate an encrypted file to be backed up. After establishing an encrypted transmission path with the server based on the encryption protocol and the session key, the encrypted file to be backed up is transmitted to the server through the encrypted transmission path.

[0064] In some optional implementations, the file information segment includes a first file size and a first information verification value of the file to be backed up; the device further includes a verification module 703, which is used for: At preset time intervals, obtain the second file size and second information verification value of the synchronized file corresponding to the file to be backed up in the server; If the size of the first file is the same as the size of the second file, and the first information verification value is the same as the second information verification value, then the verification is deemed successful. If the size of the first file is inconsistent with the size of the second file, and / or the first information verification value is inconsistent with the second information verification value, the verification is determined to be unsuccessful, and an alarm signal is sent.

[0065] In some optional implementations, the preset processing conditions include at least one of the following: The number of file backup requests in the peripheral file dataset has reached a preset threshold; The current time has reached the preset time node for batch processing of the centralized file backup requests of the peripheral file dataset.

[0066] In some optional implementations, the backup module 702 is specifically used for: Parse at least one file backup request obtained from the peripheral file dataset to obtain a business attribute identifier corresponding to each file to be backed up; Based on the pre-stored path correspondence between business attribute identifiers and second access paths, the second access path for each file to be backed up is determined.

[0067] In some optional implementations, the backup module 702 is specifically used for: Based on the business attribute identifier of each file to be backed up, the priority score of each file to be backed up is calculated according to the business importance, data update frequency, business interruption impact and preset weight coefficient set. Based on the priority score of each file to be backed up, each file to be backed up is sequentially obtained through the second access path corresponding to each file and sent to the server.

[0068] This application provides a file backup method and apparatus. During the execution of a resource transfer service, it responds to a file backup request carrying identification information. Based on the identification information carried in the file backup request, it determines the file type of the file to be backed up, wherein the file type includes resource transfer file type and peripheral system file type. If the file type of the file to be backed up is a resource transfer file type, it parses the file backup request to determine a first access path for the file to be backed up. Based on the first access path, it obtains the file to be backed up and synchronizes the encrypted file to the server. If the file type of the file to be backed up is a peripheral system file type, it stores the file backup request in a peripheral file dataset. Under preset processing conditions, it parses at least one file backup request obtained from the peripheral file dataset and determines a second access path for each file to be backed up based on path correspondence. Based on the second access path, it synchronizes each file to be backed up to the server. Therefore, when the file type to be backed up is a resource transfer file, the file to be backed up is processed in real time; when the file type to be backed up is an external system file, batch processing is performed if the preset processing conditions are met. This enables timely response to file backups related to resource transfer and avoids resource contention caused by backing up a large number of files at the same time, thereby improving processing efficiency and security.

[0069] Based on the same inventive concept, this application also provides an electronic device, which is similar in principle to the above-described file backup method, and the repeated parts will not be described again.

[0070] In one embodiment, the electronic device may be Figure 1 The terminal device 110 is shown. In this embodiment, the electronic device can be structured as follows: Figure 8 As shown, it includes a memory 801, a communication module 803, and one or more processors 802.

[0071] The memory 801 is used to store program instructions executed by the processor 802. The memory 801 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.

[0072] Memory 801 may be volatile memory, such as random-access memory (RAM); memory 801 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 801 may be any other medium capable of carrying or storing a desired computer program having the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 801 may be a combination of the above-described memories.

[0073] Processor 802 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 802 is used to implement the above-described message dispatch method when calling program instructions stored in memory 801.

[0074] The communication module 803 is used to communicate with terminal devices and other servers.

[0075] This application embodiment does not limit the specific connection medium between the memory 801, communication module 803, and processor 802 described above. This application embodiment... Figure 8 The memory 801 and the processor 802 are connected via a bus 804, and the bus 804 is in Figure 8 The diagram uses thick lines to describe the connections between other components; these are for illustrative purposes only and should not be considered limiting. The 804 bus can be divided into address bus, data bus, control bus, etc. For ease of description, Figure 8 It is described using only a thick line, but does not indicate that there is only one bus or one type of bus.

[0076] Based on the same inventive concept, this application provides a computer program product that stores computer program code. When the computer program code is run on a computer, it causes the computer to execute any of the file backup methods discussed above. Since the principle by which the computer-readable storage medium solves the problem is similar to that of the file backup method, the implementation of the computer program product can be referred to the implementation of the method, and repeated details will not be described again.

[0077] This application provides a file backup method, apparatus, electronic device, and program product. The method, during the execution of a resource transfer service, responds to a file backup request carrying identification information; based on the identification information carried in the file backup request, it determines the file type of the file to be backed up, wherein the file type includes resource transfer file type and peripheral system file type; if the file type of the file to be backed up is a resource transfer file type, it parses the file backup request to determine a first access path for the file to be backed up; it obtains the file to be backed up based on the first access path and synchronizes the encrypted file to the server; if the file type of the file to be backed up is a peripheral system file type, it stores the file backup request in a peripheral file dataset; if preset processing conditions are met, it parses at least one file backup request obtained from the peripheral file dataset and determines a second access path for each file to be backed up based on path correspondence; and it synchronizes each file to be backed up to the server based on the second access path. Therefore, when the file type to be backed up is a resource transfer file, the file to be backed up is processed in real time; when the file type to be backed up is an external system file, batch processing is performed if the preset processing conditions are met. This enables timely response to file backups related to resource transfer and avoids resource contention caused by backing up a large number of files at the same time, thereby improving processing efficiency and security.

[0078] The present application has been described above with reference to block diagrams and / or flowcharts illustrating methods, apparatus (systems), and / or computer program products according to embodiments of the present application. It should be understood that a block of a block diagram and / or flowchart, as well as combinations of blocks of block diagrams and / or flowcharts, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, and / or other programmable data processing means to produce a machine such that the instructions, executable via the computer processor and / or other programmable data processing means, create methods for implementing the functions / actions specified in the blocks of the block diagrams and / or flowcharts.

[0079] Accordingly, this application can also be implemented using hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, this application can take the form of a computer program product on a computer-usable or computer-readable storage medium, having computer-usable or computer-readable program code implemented in the medium for use by or in conjunction with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium can be any medium that can contain, store, communicate, transmit, or deliver a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0080] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A file backup method, characterized in that, The method includes: During the execution of resource transfer operations, respond to file backup requests carrying identification information; Based on the identification information carried in the file backup request, the file type of the file to be backed up is determined, wherein the file type includes resource transfer file type and peripheral system file type; If the file type of the file to be backed up is a resource transfer file type, the file backup request is parsed to determine the first access path of the file to be backed up; the file to be backed up is obtained based on the first access path, and the encrypted file to be backed up is synchronized to the server. If the file type of the file to be backed up is an external system file type, the file backup request is stored in the external file dataset. If the preset processing conditions are met, at least one file backup request obtained from the external file dataset is parsed, and a second access path for each file to be backed up is determined based on the path correspondence. Based on the second access path, each file to be backed up is synchronized to the server.

2. The method as described in claim 1, characterized in that, The step of parsing the file backup request and determining the first access path of the file to be backed up includes: The file backup request is deserialized and parsed to obtain the path information segment, file information segment, resource transfer number, and absolute path of the file to be backed up; If the absolute path is valid, the absolute path shall be used as the first access path. If the absolute path is invalid, the path information segment is formatted, and based on a preset concatenation rule, the formatted path information segment, the file information segment, and the resource transfer number are concatenated to obtain the first access path.

3. The method as described in claim 1, characterized in that, The process of synchronizing the encrypted backup file to the server includes: After generating a session key based on the encryption protocol, the file to be backed up is encrypted based on the session key to generate an encrypted file to be backed up. After establishing an encrypted transmission path with the server based on the encryption protocol and the session key, the encrypted file to be backed up is transmitted to the server through the encrypted transmission path.

4. The method as described in claim 2, characterized in that, The file information segment includes the first file size and the first information verification value of the file to be backed up; After synchronizing the encrypted backup file to the server, the process also includes: At preset time intervals, obtain the second file size and second information verification value of the synchronized file corresponding to the file to be backed up in the server; If the size of the first file is the same as the size of the second file, and the first information verification value is the same as the second information verification value, then the verification is deemed successful. If the size of the first file is inconsistent with the size of the second file, and / or the first information verification value is inconsistent with the second information verification value, the verification is determined to be unsuccessful, and an alarm signal is sent.

5. The method according to any one of claims 1 to 4, characterized in that, The preset processing conditions include at least one of the following: The number of file backup requests in the peripheral file dataset has reached a preset threshold; The current time has reached the preset time node for batch processing of the centralized file backup requests of the peripheral file dataset.

6. The method as described in claim 1, characterized in that, The step of parsing at least one file backup request obtained from the peripheral file dataset and determining the second access path for each file to be backed up based on the path correspondence includes: Parse at least one file backup request obtained from the peripheral file dataset to obtain a business attribute identifier corresponding to each file to be backed up; Based on the pre-stored path correspondence between business attribute identifiers and second access paths, the second access path for each file to be backed up is determined.

7. The method as described in claim 6, characterized in that, The step of synchronizing each file to be backed up to the server based on the second access path includes: Based on the business attribute identifier of each file to be backed up, the priority score of each file to be backed up is calculated according to the business importance, data update frequency, business interruption impact and preset weight coefficient set. Based on the priority score of each file to be backed up, each file to be backed up is sequentially obtained through the second access path corresponding to each file and sent to the server.

8. A file backup device, characterized in that, The device includes: The response module is used to respond to file backup requests carrying identification information during the execution of resource transfer services; based on the identification information carried in the file backup request, it determines the file type of the file to be backed up, wherein the file type includes resource transfer file type and peripheral system file type; The backup module is configured to: 1) parse the file backup request to determine a first access path for the file to be backed up when the file type of the file to be backed up is a resource transfer file; 2) obtain the file to be backed up based on the first access path and synchronize the encrypted file to the server; 3) store the file backup request in an external file dataset when the file type of the file to be backed up is an external system file; 4) parse at least one file backup request obtained from the external file dataset under preset processing conditions, determine a second access path for each file to be backed up based on path correspondence; and 5) synchronize each file to be backed up to the server based on the second access path.

9. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-7.

10. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method described in any one of claims 1-7.