Data backup method and device, electronic equipment and storage medium

By converting backup data to binary stream data and formatting it using a data saving method interface, the method addresses the inefficiencies of learning new storage specifications, improving data backup efficiency and reducing costs.

CN119105905APending Publication Date: 2024-12-10CHINA UNITED NETWORK COMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310671805.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Existing data backup methods require learning new storage specifications for each backup destination, leading to increased learning costs and reduced efficiency.

Method used

Convert backup data into binary stream data and use a data saving method interface to format it into a target storage format, utilizing configuration attributes or defaults to determine the appropriate storage format for efficient backup.

Benefits of technology

Reduces learning costs and improves backup efficiency by allowing businesses to use multiple storage types with minimal configuration changes, enhancing team productivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119105905A_ABST
    Figure CN119105905A_ABST
Patent Text Reader

Abstract

The invention provides a data backup method and device, electronic equipment and a storage medium, and the method comprises the steps: carrying out the serialization processing of to-be-backed-up data, obtaining binary stream data, carrying out the storage format conversion processing of the binary stream data through a data storage method interface, obtaining the data of a target storage format corresponding to the to-be-backed-up data, and carrying out the storage format conversion processing of the binary stream data. Interface parameters of the data storage method are serialized declarations and cold data abstract declarations, and then data in a target storage format is backed up to a storage space corresponding to the target storage format. According to the technical scheme, the binary stream data is subjected to format conversion, so that the data to be backed up is converted into the target storage format and then backed up into the corresponding storage space, and the data backup efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a data backup method, device, electronic device and storage medium. Background Art

[0002] As time goes by and the business volume grows, platform data will gradually occupy the storage space of existing data. Some data that exceeds a certain period of time does not have much meaning to users and the platform, but it cannot be physically deleted directly. At this time, it is necessary to back up this part of historical data to reduce the amount of original data and storage space.

[0003] In the prior art, when developing platform services for different scenarios, different storage specifications need to be connected in order to back up transferable historical data.

[0004] However, the above method has the cost of learning storage specifications, which reduces the efficiency of data backup. Therefore, how to improve the efficiency of data backup has become a technical problem to be solved. Summary of the invention

[0005] The present application provides a data backup method, device, electronic device and storage medium to solve the technical problem of low efficiency of data backup in the prior art.

[0006] In a first aspect, the present application provides a data backup method, comprising:

[0007] Serialize the backup data to obtain binary stream data;

[0008] The binary stream data is converted into a storage format through a data saving method interface to obtain data in a target storage format corresponding to the data to be backed up, wherein the interface parameters of the data saving method are a serialization declaration and a cold data abstract declaration;

[0009] The data in the target storage format is backed up to the storage space corresponding to the target storage format.

[0010] In a possible design of the first aspect, performing storage format conversion processing on the binary stream data through the data saving method interface to obtain data in a target storage format corresponding to the data to be backed up includes:

[0011] Detecting whether there is a configuration attribute for performing storage format conversion on the binary stream data;

[0012] If the configuration attribute exists, determining the target storage format corresponding to the configuration attribute;

[0013] Through the data saving method interface, the conversion method corresponding to the target storage format is called to perform storage format conversion processing on the binary stream data to obtain data in the target storage format.

[0014] In another possible design of the first aspect, after detecting whether there is a configuration file for performing storage format conversion on the binary stream data, the method further includes:

[0015] If the configuration attribute does not exist, setting the default storage format to the target storage format;

[0016] Through the data saving method interface, the conversion method corresponding to the default storage format is called to perform storage format conversion processing on the binary stream data to obtain data in the target storage format.

[0017] In yet another possible design of the first aspect, before determining the target storage format corresponding to the configuration attribute if the configuration attribute exists, the method further includes:

[0018] The configuration attributes are injected into the implementation class in the data saving method interface by means of configuration injection.

[0019] In another possible design of the first aspect, the storage space corresponding to the target storage format includes any one of the following: object storage, nas, mongodb, and a business-specific destination source.

[0020] In yet another possible design of the first aspect, before serializing the data to be backed up to obtain binary stream data, the method further includes:

[0021] The data to be backed up is obtained from a preset service platform.

[0022] In a second aspect, the present application provides a data backup device, comprising:

[0023] The first processing module is used to perform serialization processing on the data to be backed up to obtain binary stream data;

[0024] A second processing module is used to perform storage format conversion processing on the binary stream data through a data storage method interface to obtain data in a target storage format corresponding to the data to be backed up, wherein the interface parameters of the data storage method are a serialization declaration and a cold data abstract declaration;

[0025] The backup module is used to back up the data in the target storage format to the storage space corresponding to the target storage format.

[0026] In a possible design of the second aspect, the second processing module is specifically configured to:

[0027] Detecting whether there is a configuration attribute for performing storage format conversion on the binary stream data;

[0028] If the configuration attribute exists, determining the target storage format corresponding to the configuration attribute;

[0029] Through the data saving method interface, the conversion method corresponding to the target storage format is called to perform storage format conversion processing on the binary stream data to obtain data in the target storage format.

[0030] In another possible design of the second aspect, after detecting whether there is a configuration file for performing storage format conversion on the binary stream data, the second processing module is further used to:

[0031] If the configuration attribute does not exist, setting the default storage format to the target storage format;

[0032] Through the data saving method interface, the conversion method corresponding to the default storage format is called to perform storage format conversion processing on the binary stream data to obtain data in the target storage format.

[0033] In yet another possible design of the second aspect, before determining the target storage format corresponding to the configuration attribute if the configuration attribute exists, the second processing module is further configured to:

[0034] The configuration attributes are injected into the implementation class in the data saving method interface by means of configuration injection.

[0035] In another possible design of the second aspect, the storage space corresponding to the target storage format includes any one of the following: object storage, nas, mongodb, and a business-side specific destination source.

[0036] In yet another possible design of the second aspect, before serializing the data to be backed up to obtain binary stream data, an acquisition module is used to:

[0037] The data to be backed up is obtained from a preset service platform.

[0038] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;

[0039] The memory stores computer-executable instructions;

[0040] The processor executes the computer-executable instructions stored in the memory to implement the method as described in the first aspect or any one of the above methods.

[0041] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect or any one of the above methods.

[0042] The data backup method, device, electronic device and storage medium provided by the present application obtain binary stream data by serializing the data to be backed up, and converting the storage format of the binary stream data through the data saving method interface to obtain data of the target storage format corresponding to the data to be backed up. The interface parameters of the data saving method are serialization declaration and cold data abstract declaration, and then the data of the target storage format is backed up to the storage space corresponding to the target storage format. In this technical solution, the binary stream data is formatted to realize the conversion of the data to be backed up into the target storage format, and then backed up to the corresponding storage space, thereby improving the data backup efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0044] Figure 1 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 1 ;

[0045] Figure 2 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 2 ;

[0046] Figure 3 A schematic diagram of a data backup method according to an embodiment of the present invention;

[0047] Figure 4 A schematic diagram of the structure of a data backup device provided in an embodiment of the present application;

[0048] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0049] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0051] Before introducing the embodiments of the present application, the application background of the embodiments of the present application is first explained:

[0052] As time goes by and the business volume grows, platform data will gradually occupy the storage space of existing data. Some data that exceeds a certain period of time does not have much meaning to users and the platform, but it cannot be physically deleted directly. At this time, it is necessary to back up this part of historical data to reduce the amount of original data and storage space.

[0053] Among them, the data mentioned above may be cold data.

[0054] In the prior art, when developing platform services for different scenarios, different storage specifications need to be connected in order to back up transferable historical data.

[0055] However, the above method has the following possible technical problems, which are also the problems in the prior art that need to be solved by the embodiments of the present application:

[0056] 1. Business development members need to learn a new storage specification after learning the new storage specification. However, after learning the new storage specification, if the type of backup destination source (storage space or database that needs to store data) changes, they need to learn the new storage specification again.

[0057] 2. The current backup solution cannot be used out of the box.

[0058] 3. Due to the increased learning cost, the backup efficiency is low.

[0059] In response to the above-mentioned technical problems, the inventor's technical conception is as follows: if the format of the data to be backed up can be converted into binary stream data of various formats first, and then the conversion method corresponding to the target data format to be backed up can be called to convert the binary stream data to obtain data corresponding to the target data format, so as to perform backup, the above-mentioned technical problems can be solved.

[0060] In view of the above technical problems, the embodiments of the present application can achieve the following effects:

[0061] 1. Business development members only need to learn once. When the type of the backup destination source changes, the learning cost of business development members is reduced because they follow the same operating specifications.

[0062] 2. Through pluggable configuration, multiple source storage media can be used accordingly by simply configuring the necessary properties.

[0063] 3. Since cold data backup can expand the components of the destination source to adapt to multiple storage types, it can achieve the same functions and improve team efficiency.

[0064] The technical solution of the present application is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0065] It is worth noting that the application fields of the data backup method, device, electronic device and storage medium provided in the embodiments of the present application are not limited.

[0066] Among them, the executor of this application is an electronic device, which can be a server, terminal device, etc.

[0067] Figure 1 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 1 ,like Figure 1 As shown, the method may include the following steps:

[0068] Step 11: Serialize the data to be backed up to obtain binary stream data;

[0069] In this step, in order to facilitate backing up the backup data into data in a target storage format, the backup data may be serialized first to obtain binary stream data.

[0070] The reason for implementing step 11 is that binary stream data can be easily converted into data in any storage format.

[0071] Optionally, this step may be: obtaining the data to be backed up from a preset business platform.

[0072] In one possible implementation, the purpose of the embodiment of the present application may be to back up data in different business platforms, and the preset business platforms may include: different business platforms that may be involved, such as various operating system platforms, business processing platforms, etc.

[0073] Step 12: Perform storage format conversion processing on the binary stream data through the data saving method interface to obtain data in a target storage format corresponding to the data to be backed up.

[0074] Among them, the interface parameters of the data saving method are serialization declaration and cold data abstract declaration;

[0075] In this step, a data saving method interface declaration may be defined first, and the interface parameters of the data saving method are a serialization declaration and a cold data abstract declaration.

[0076] Serialization declaration refers to the process of converting an object or data structure into a string of byte streams for use in network communication or data storage. In actual development, it is often necessary to serialize an object into a string of binary streams, and then deserialize it back to the object to facilitate data transmission and storage.

[0077] Cold data abstract declaration: refers to the separation of data access from actual physical storage by defining an abstract layer in software design, which improves the flexibility and maintainability of the program. In other words, cold data refers to static data, and the abstract declaration is to encapsulate these static data so that the data implementation is not bound by details, making it more flexible and easier to maintain and upgrade.

[0078] Optionally, this step may be implemented by calling a related format conversion method (ie, a storage format conversion function) using a data saving method interface to perform format conversion on binary stream data to obtain data after format conversion, ie, a target storage format.

[0079] In a possible implementation, the target storage format may be: object storage, nas, mongodb, and other destination sources.

[0080] That is, if the data to be backed up needs to be stored in the storage space of the object storage, the conversion method corresponding to the object storage format can be called to convert the format of the binary stream data to obtain data in the object storage format.

[0081] Step 13: Back up the data in the target storage format to the storage space corresponding to the target storage format.

[0082] In this step, as the above format conversion is continuously performed, the converted data is stored in the storage space corresponding to the target storage format.

[0083] In a possible implementation, the target storage format is nas, and the data to be backed up in the nas storage format is backed up to the storage space corresponding to the nas storage format.

[0084] Optionally, the storage space corresponding to the target storage format includes any of the following: object storage, nas, mongodb, and a destination source specific to the business party.

[0085] Furthermore, when other business lines are developing businesses and need to use cold data backup, they only need to introduce the dependent Java package and configure the properties of the corresponding cold data backup destination source to quickly use the destination source data backup function.

[0086] It should be understood that the above method can be implemented in the form of a cold data backup component, and the cold data backup component can be integrated into an electronic device.

[0087] The data backup method provided in the embodiment of the present application obtains binary stream data by serializing the data to be backed up, and performs storage format conversion processing on the binary stream data through the data saving method interface to obtain data of the target storage format corresponding to the data to be backed up. The interface parameters of the data saving method are serialization declaration and cold data abstract declaration, and then the data of the target storage format is backed up to the storage space corresponding to the target storage format. In this technical solution, the binary stream data is format converted to realize the conversion of the data to be backed up into the target storage format, and then backed up to the corresponding storage space, thereby improving the data backup efficiency.

[0088] Based on the above embodiments, Figure 2 Schematic diagram of the data backup method provided in the embodiment of the present application Figure 2 ,like Figure 2 As shown, the above step 12 may include the following steps:

[0089] Step 21, detecting whether there is a configuration attribute for performing storage format conversion on binary stream data;

[0090] In this step, when the storage format of the binary stream data is converted, it is also necessary to obtain the configuration attributes of the storage format conversion, that is, the format into which the binary stream data is converted.

[0091] Step 22: If there is a configuration attribute, determine the target storage format corresponding to the configuration attribute;

[0092] In this step, if the configuration attribute exists, the type of the target storage format is determined based on the configuration attribute.

[0093] For example, the target source of the load (ie, the storage space corresponding to the target storage format) is determined by configuring the property detection.

[0094] For example, the configuration property wocloud.base.colddata.oss.ak = {accessKeyId} indicates that the object storage related properties are configured, and the object storage related default configuration is automatically initialized to achieve the preservation of cold data backup using object storage.

[0095] Optionally, before this step, the configuration attributes may be injected into the implementation class in the data saving method interface by configuration injection.

[0096] For example, in actual use, the default configuration properties (ie, configuration parameters) can be passed to the specific implementation class of the data saving method interface through configuration injection, and then the Save method is called to store the data in the specified location, that is, the storage space corresponding to the configuration properties.

[0097] Step 23: Call the conversion method corresponding to the target storage format through the data saving method interface, perform storage format conversion processing on the binary stream data, and obtain data in the target storage format;

[0098] In this step, after the target storage format is confirmed, the data saving method interface is used to call the conversion method corresponding to the target storage format, and the binary stream data is processed to obtain the data in the target storage format.

[0099] That is, if the data to be backed up needs to be stored in the storage space of the object storage, the conversion method corresponding to the object storage format can be called to convert the format of the binary stream data to obtain data in the object storage format.

[0100] Step 24: If the configuration attribute does not exist, set the default storage format to the target storage format;

[0101] In this step, if the configuration attributes are not determined above, the default storage format may be set as the target storage format.

[0102] For example, the default storage format may be any one of object storage, NAS, MongoDB, and other destination sources predefined by the user.

[0103] In other implementations, the default storage format for the backup of cold data of different business platforms can also be set in advance. For example, the default storage format of business platform 1 is object storage, the default storage format of business platform 2 is nas, the default storage format of business platform 3 is mongodb, and the default storage format of business platform 4 is object storage, etc.

[0104] Step 25: Call the conversion method corresponding to the default storage format through the data saving method interface, perform storage format conversion processing on the binary stream data, and obtain data in the target storage format.

[0105] In this step, after confirming that the target storage format is the default storage format, the data saving method interface is used to call the conversion method corresponding to the default storage format, and the binary stream data is processed to obtain the data in the target storage format.

[0106] That is, if the data to be backed up needs to be stored in the storage space of the object storage, the conversion method corresponding to the object storage format can be called to convert the format of the binary stream data to obtain data in the object storage format.

[0107] The data backup method provided by the embodiment of the present application detects whether there is a configuration attribute for performing storage format conversion on binary stream data. If there is a configuration attribute, the target storage format corresponding to the configuration attribute is determined, and the conversion method corresponding to the target storage format is called through the data saving method interface to perform storage format conversion processing on the binary stream data to obtain data in the target storage format. If there is no configuration attribute, the default storage format is set to the target storage format, and the conversion method corresponding to the default storage format is called through the data saving method interface to perform storage format conversion processing on the binary stream data to obtain data in the target storage format. In this technical solution, storage format conversion of binary stream data is realized.

[0108] Based on the above embodiments, Figure 3 A schematic diagram of a data backup method provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the framework diagram includes:

[0109] 1. Start;

[0110] 2. Cold data backup component;

[0111] 3. Abstract cold data backup general context, including serialization declaration and cold data abstract declaration;

[0112] 4. Cold data backup general saving method interface declaration;

[0113] 5. The backup interface declaration and implementation of each destination source, including: object storage backup interface declaration and implementation, nas backup interface declaration and implementation, mongodb backup interface declaration and implementation, and other extensible (business-specific destination source) interface declaration and implementation;

[0114] 6. Configuration condition declarations of the destination source, including: object storage configuration condition declaration, nas configuration condition declaration, mongodb configuration condition declaration, and other destination source configuration condition declarations;

[0115] 7. End.

[0116] The technical solution and technical effects of this embodiment are similar to those of the above-mentioned embodiment and will not be described in detail here.

[0117] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

[0118] Figure 4 This is a schematic diagram of the structure of the data backup device provided in the embodiment of the present application. Figure 4 As shown, the data backup device includes:

[0119] The first processing module 41 is used to perform serialization processing on the data to be backed up to obtain binary stream data;

[0120] The second processing module 42 is used to perform storage format conversion processing on the binary stream data through the data storage method interface to obtain data of the target storage format corresponding to the data to be backed up. The interface parameters of the data storage method are serialization declaration and cold data abstract declaration;

[0121] The backup module 43 is used to back up the data in the target storage format to the storage space corresponding to the target storage format.

[0122] In a possible design of the embodiment of the present application, the second processing module 42 is specifically used for:

[0123] Check whether there is a configuration attribute for converting the storage format of binary stream data;

[0124] If there are configuration attributes, determine the target storage format corresponding to the configuration attributes;

[0125] Through the data saving method interface, call the conversion method corresponding to the target storage format, perform storage format conversion processing on the binary stream data, and obtain data in the target storage format.

[0126] In another possible design of the embodiment of the present application, after detecting whether there is a configuration file for performing storage format conversion on the binary stream data, the second processing module 42 is further used to:

[0127] If no configuration property exists, the default storage format is set to the target storage format;

[0128] Through the data saving method interface, call the conversion method corresponding to the default storage format, perform storage format conversion on the binary stream data, and obtain data in the target storage format.

[0129] In another possible design of the embodiment of the present application, if there is a configuration attribute, before determining the target storage format corresponding to the configuration attribute, the second processing module 42 is further used to:

[0130] Inject configuration properties into the implementation class in the data saving method interface through configuration injection.

[0131] In another possible design of the embodiment of the present application, the storage space corresponding to the target storage format includes any one of the following: object storage, nas, mongodb, and a business-side specific destination source.

[0132] In another possible design of the embodiment of the present application, before serializing the backup data to obtain binary stream data, an acquisition module is used to:

[0133] Get the data to be backed up from the preset business platform.

[0134] The data backup device provided in the embodiment of the present application can be used to execute the data backup method in any of the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.

[0135] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0136] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device may include: a processor 51, a memory 52, and computer program instructions stored in the memory 52 and executable on the processor 51, and the processor 51 implements the method provided in any of the foregoing embodiments when executing the computer program instructions.

[0137] Optionally, the above-mentioned components of the electronic device may be connected via a system bus.

[0138] The memory 52 may be a separate storage unit or a storage unit integrated in the processor 51. The number of the processor 51 may be one or more.

[0139] It should be understood that the processor 51 can be a central processing unit (CPU), or other general-purpose processors 51, digital signal processors 51 (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor 51 can be a microprocessor 51 or the processor 51 can also be any conventional processor 51, etc. The steps of the method disclosed in the present application can be directly embodied as being executed by the hardware processor 51, or can be executed by a combination of hardware and software modules in the processor 51.

[0140] The system bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The memory 52 may include a random access memory 52 (RAM), and may also include a non-volatile memory 52 (NVM), such as at least one disk storage 52.

[0141] All or part of the steps of the above-mentioned method embodiments can be completed by hardware related to program instructions. The above-mentioned program can be stored in a readable memory 52. ​​When the program is executed, the steps of the above-mentioned method embodiments are executed; and the above-mentioned memory 52 (storage medium) includes: read-only memory 52 (ROM), RAM, flash memory 52, hard disk, solid state hard disk, magnetic tape, floppy disk, optical disc and any combination thereof.

[0142] The electronic device provided in the embodiment of the present application can be used to execute the method provided in any of the above method embodiments. Its implementation principles and technical effects are similar and will not be repeated here.

[0143] An embodiment of the present application provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the above method.

[0144] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory, electrically erasable programmable read-only memory, erasable programmable read-only memory, programmable read-only memory, read-only memory, magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0145] Optionally, a readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.

[0146] An embodiment of the present application also provides a computer program product, which includes a computer program. The computer program is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the above method can be implemented.

[0147] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A data backup method, characterized in that: include: Serialize the backup data to obtain binary stream data; The binary stream data is converted into a storage format through a data saving method interface to obtain data in a target storage format corresponding to the data to be backed up, wherein the interface parameters of the data saving method are a serialization declaration and a cold data abstract declaration; The data in the target storage format is backed up to the storage space corresponding to the target storage format.

2. The method according to claim 1, characterized in that The step of performing storage format conversion processing on the binary stream data through the data saving method interface to obtain data in a target storage format corresponding to the data to be backed up includes: Detecting whether there is a configuration attribute for performing storage format conversion on the binary stream data; If the configuration attribute exists, determining the target storage format corresponding to the configuration attribute; Through the data saving method interface, the conversion method corresponding to the target storage format is called to perform storage format conversion processing on the binary stream data to obtain data in the target storage format.

3. The method according to claim 2, characterized in that After detecting whether there is a configuration file for performing storage format conversion on the binary stream data, the method further includes: If the configuration attribute does not exist, setting the default storage format to the target storage format; Through the data saving method interface, the conversion method corresponding to the default storage format is called to perform storage format conversion processing on the binary stream data to obtain data in the target storage format.

4. The method according to claim 2, characterized in that: Before determining the target storage format corresponding to the configuration attribute if the configuration attribute exists, the method further includes: The configuration attributes are injected into the implementation class in the data saving method interface by means of configuration injection.

5. The method according to any one of claims 1 to 4, characterized in that: The storage space corresponding to the target storage format includes any of the following: object storage, nas, mongodb, and a destination source specific to the business party.

6. The method according to any one of claims 1 to 4, characterized in that: Before serializing the data to be backed up to obtain binary stream data, the method further includes: The data to be backed up is obtained from a preset service platform.

7. A data backup device, characterized in that: include: The first processing module is used to perform serialization processing on the data to be backed up to obtain binary stream data; A second processing module is used to perform storage format conversion processing on the binary stream data through a data storage method interface to obtain data in a target storage format corresponding to the data to be backed up, wherein the interface parameters of the data storage method are a serialization declaration and a cold data abstract declaration; The backup module is used to back up the data in the target storage format to the storage space corresponding to the target storage format.

8. The device according to claim 7, characterized in that The second processing module is specifically used for: Detecting whether there is a configuration attribute for performing storage format conversion on the binary stream data; If the configuration attribute exists, determining the target storage format corresponding to the configuration attribute; Through the data saving method interface, the conversion method corresponding to the target storage format is called to perform storage format conversion processing on the binary stream data to obtain data in the target storage format.

9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.