CN114615287B - File backup method and device, computer equipment and storage medium - Google Patents

File backup method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114615287B
CN114615287B CN202210500560.8A CN202210500560A CN114615287B CN 114615287 B CN114615287 B CN 114615287B CN 202210500560 A CN202210500560 A CN 202210500560A CN 114615287 B CN114615287 B CN 114615287B
Authority
CN
China
Prior art keywords
backup
file
files
determining
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210500560.8A
Other languages
Chinese (zh)
Other versions
CN114615287A (en
Inventor
陈立军
陈涛
魏军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Barda Technology Co.,Ltd.
Original Assignee
Wuhan Sitong Information Service Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Sitong Information Service Co ltd filed Critical Wuhan Sitong Information Service Co ltd
Priority to CN202210500560.8A priority Critical patent/CN114615287B/en
Publication of CN114615287A publication Critical patent/CN114615287A/en
Application granted granted Critical
Publication of CN114615287B publication Critical patent/CN114615287B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/1734Details of monitoring file system events, e.g. by the use of hooks, filter drivers, logs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Library & Information Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a file backup method, a device, computer equipment and a storage medium, wherein the file backup method comprises the following steps: determining a webpage application program needing to be subjected to file backup according to the acquired file backup request; packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files; determining a plurality of backup files in a plurality of target files and a first grade parameter and a second grade parameter of each backup file according to the attribute information; determining the backup sequence of a plurality of backup files according to the first grade parameter and the second grade parameter; and transmitting the plurality of backup files to a file storage server according to the backup sequence so as to realize the backup of the plurality of backup files. The method and the device can realize the file backup of the webpage application program, and can perform priority backup on files with higher privacy degree and higher importance degree.

Description

File backup method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a file backup method and apparatus, a computer device, and a storage medium.
Background
As web technologies have developed and web standards have matured, various web-based applications have developed, and a user may input an address of a web page in a browser to open a web-based application. During the use of the web application, a large number of files are generated, and in order to prevent the files from being lost, the files need to be backed up. However, the existing web application is limited by the security policy of the browser, and thus file backup cannot be realized.
Disclosure of Invention
The embodiment of the application provides a file backup method, a file backup device, computer equipment and a storage medium, which can realize file backup of a webpage application program and can perform priority backup on files with higher privacy degree and higher importance degree.
In one aspect, the present application provides a file backup method, where the file backup method includes:
determining a webpage application program needing to be subjected to file backup according to the acquired file backup request;
packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files;
determining a plurality of backup files in the plurality of target files and a first-level parameter and a second-level parameter of each backup file in the plurality of backup files according to the attribute information, wherein the first-level parameter is used for representing the privacy degree of each backup file, and the second-level parameter is used for representing the importance degree of each backup file;
determining the backup sequence of the backup files according to the first level parameter and the second level parameter;
and transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files.
In some embodiments of the present application, the determining the first ranking parameter and the second ranking parameter of the plurality of backup files and each backup file of the plurality of backup files according to the attribute information includes:
determining a plurality of backup files in the plurality of target files according to the file attributes;
and determining a first grade parameter and a second grade parameter of each backup file in the plurality of backup files according to the file type, the file creator and the file keyword.
In some embodiments of the present application, the determining a first ranking parameter and a second ranking parameter of each of the plurality of backed-up files according to the file type, the file creator, and the file keyword includes:
respectively determining a first score, a second score and a third score of each backup file according to the file type, the file creator and the file keyword, and respectively determining a fourth score, a fifth score and a sixth score of each backup file;
determining a first grade parameter of each backup file according to the first score, the second score and the third score, and determining a second grade parameter of each backup file according to the fourth score, the fifth score and the sixth score.
In some embodiments of the present application, the determining, according to the file attribute, a plurality of backup files in the plurality of target files includes:
determining the privacy level and the importance level of each target file in the plurality of target files according to the file attributes;
and determining a plurality of backup files in the plurality of target files according to the privacy grade and the importance grade.
In some embodiments of the present application, the determining a privacy level and an importance level of each of the plurality of target files according to the file attributes comprises:
and inputting the file attributes into a grade prediction model, and outputting the privacy grade and the importance grade of each target file in the plurality of target files through the grade prediction model.
In some embodiments of the present application, the determining the backup order of the backup files according to the first level parameter and the second level parameter includes:
determining a target grade parameter of each backup file according to the first grade parameter and the second grade parameter;
and determining the backup sequence of the backup files according to the target grade parameters.
In some embodiments of the present application, after the transmitting the backup files to the file storage server according to the backup order, the method further comprises:
receiving a file continuous transmission request of the plurality of backup files, wherein the file continuous transmission request comprises a breakpoint position determined based on an uploaded file in the plurality of backup files;
and according to the breakpoint position and the backup sequence, performing breakpoint continuous transmission on the plurality of backup files.
In another aspect, the present application provides a file backup apparatus, including:
the application determining unit is used for determining a webpage application program needing to be subjected to file backup according to the acquired file backup request;
the information acquisition unit is used for packaging the webpage application program into a client application program and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files;
a parameter determining unit, configured to determine, according to the attribute information, a plurality of backup files in the plurality of target files and a first level parameter and a second level parameter of each backup file in the plurality of backup files, where the first level parameter is used to represent a privacy degree of each backup file, and the second level parameter is used to represent an importance degree of each backup file;
the sequence determining unit is used for determining the backup sequence of the backup files according to the first level parameter and the second level parameter;
and the file backup unit is used for transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files.
In another aspect, the present application further provides a computer device, including:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor to implement the file backup method of any of the first aspects.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, the computer program being loaded by a processor to execute the steps in the file backup method according to any one of the first aspect.
According to the method and the device, the webpage application program is packaged into the client application program, the files needing to be backed up are obtained through the client application program, the problem that file backup of the webpage application program cannot be achieved due to the limitation of a browser security strategy can be solved, a plurality of backup files and backup sequences are determined according to the attribute information, and the files with high privacy degree and high importance degree can be backed up preferentially.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a scenario of a file backup system according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an embodiment of a file backup method provided in an embodiment of the present application;
FIG. 3 is a schematic structural diagram of an embodiment of a file backup apparatus provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an embodiment of a computer device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings, merely for convenience of description and simplicity of description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered limiting of the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
It should be noted that, since the method in the embodiment of the present application is executed in a computer device, processing objects of each computer device all exist in the form of data or information, for example, time, which is substantially time information, and it is understood that, in the subsequent embodiments, if size, number, position, and the like are mentioned, corresponding data exist so as to be processed by the computer device, and details are not described herein.
Embodiments of the present application provide a file backup method and apparatus, a computer device, and a storage medium, which are described in detail below.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of a file backup system according to an embodiment of the present application, where the file backup system may include a computer device 100, and a file backup apparatus, such as the computer device in fig. 1, is integrated in the computer device 100.
In the embodiment of the present application, the computer device 100 is mainly configured to determine, according to the acquired file backup request, a web application program that needs to perform file backup; packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files; determining a plurality of backup files in the plurality of target files and a first-level parameter and a second-level parameter of each backup file in the plurality of backup files according to the attribute information, wherein the first-level parameter is used for representing the privacy degree of each backup file, and the second-level parameter is used for representing the importance degree of each backup file; determining the backup sequence of the backup files according to the first level parameter and the second level parameter; and transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files, realize the file backup of the webpage application program, and preferentially backup the files with higher privacy degree and higher importance degree.
In this embodiment, the computer device 100 may be an independent server, or may be a server network or a server cluster composed of servers, for example, the computer device 100 described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a plurality of network server sets, or a cloud server composed of a plurality of servers. Among them, the Cloud server is constituted by a large number of computers or web servers based on Cloud Computing (Cloud Computing).
It will be appreciated that the computer device 100 used in the embodiments of the present application may be a device that includes both receiving and transmitting hardware, i.e., a device having receiving and transmitting hardware capable of performing two-way communications over a two-way communications link. Such a device may include: a cellular or other communication device having a single line display or a multi-line display or a cellular or other communication device without a multi-line display. The specific computer device 100 may specifically be a desktop terminal or a mobile terminal, and the computer device 100 may also specifically be one of a mobile phone, a tablet computer, a notebook computer, and the like.
Those skilled in the art will appreciate that the application environment shown in fig. 1 is only one application scenario related to the present application, and does not constitute a limitation on the application scenario of the present application, and that other application environments may further include more or fewer computer devices than those shown in fig. 1, for example, only 1 computer device is shown in fig. 1, and it is understood that the file backup system may further include one or more other services, which are not limited herein.
In addition, as shown in fig. 1, the file backup system may further include a memory 200 for storing data, such as attribute information, e.g., file attribute, file type, file creator, file keyword, such as a correspondence between attribute information and score, e.g., a correspondence between file type and first score, a correspondence between file creator and second score, a correspondence between file keyword and third score, etc.
It should be noted that the scenario diagram of the file backup system shown in fig. 1 is merely an example, and the file backup system and the scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation to the technical solution provided in the embodiment of the present application.
First, an embodiment of the present application provides a file backup method, where an execution main body of the file backup method is a file backup apparatus, and the file backup apparatus is applied to a computer device, and the file backup method includes: determining a webpage application program needing to be subjected to file backup according to the acquired file backup request; packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files; determining a plurality of backup files in the plurality of target files and a first grade parameter and a second grade parameter of each backup file in the plurality of backup files according to the attribute information, wherein the first grade parameter is used for representing the privacy degree of each backup file, and the second grade parameter is used for representing the importance degree of each backup file; determining the backup sequence of the backup files according to the first level parameters and the second level parameters; and transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files.
As shown in fig. 2, which is a schematic flowchart of an embodiment of a file backup method in an embodiment of the present application, the file backup method includes:
s100, determining a webpage application program needing to be subjected to file backup according to the acquired file backup request.
The web application (web application) is an application that can be accessed through the web, and the web application has the greatest advantage that a user can easily access the application, and the user only needs to have a browser and does not need to install other software. The file backup request is a file backup instruction of a web application sent by a user to the computer device, and the file backup request includes, but is not limited to, a touch instruction, a mouse instruction, a remote control instruction, a voice instruction, and the like, for example, when the user wants to backup a file of a certain web application, the user directly clicks an icon of the web application on the touch screen, or the user clicks the icon of the web application on the touch screen through the mouse, or the user sends a voice instruction of "backup the file of the web application". After a user sends a file backup request of a webpage application program to computer equipment, the computer acquires the file backup request and determines the webpage application program needing to be backed up according to the file backup request.
S200, packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files.
The client application is a desktop application obtained by packaging the web application through an existing open-source application development framework, for example, the client application may be a desktop application obtained by packaging the web application through an Electron, the Electron is developed by GitHub, a cross-platform desktop application is constructed by using JavaScript, HTML and CSS, and the web application can be directly packaged into the desktop application. The method comprises the following steps that a plurality of target files are files acquired from a local folder of a client application program, attribute information is information related to attributes of each target file, and the attribute information comprises but is not limited to file attributes, file types, file creators and file keywords, wherein the file attributes comprise but are not limited to system attributes, hidden attributes, read-only attributes, filing attributes and the like, the file types are the types to which each target file belongs, for example, when the target files are pictures, the corresponding file types are pictures, and when the target files are texts, the corresponding file types are texts; the file creator is a creator of the target file, for example, the target file is created for an application developer, the file creator is an application developer, and the target file is created when the user a uses the web application program, and then the file creator is the user a; the file keywords are keywords in the target file, and the number of the keywords in the target file can be one or more.
Considering that a web application cannot implement file backup due to the limitation of a browser security policy, in this embodiment, after determining a web application that needs to perform file backup, the web application is packaged into a client application, and by packaging the web application into the client application, the problem that files of the web application cannot be backed up due to the limitation of the browser security policy can be solved, and then a plurality of target files of the client application and attribute information of each target file of the plurality of target files are acquired, so that file backup is performed in subsequent steps. For example, after the webpage application program is packaged into the client application program by the Electron, the reading of the local folder can be realized through the node environment provided by the Electron, and all the file objects under the obtained local folder are a plurality of target files.
S300, according to the attribute information, determining a plurality of backup files in the plurality of target files and a first-level parameter and a second-level parameter of each backup file in the plurality of backup files, wherein the first-level parameter is used for representing the privacy degree of each backup file, and the second-level parameter is used for representing the importance degree of each backup file.
The plurality of backup files are files needing to be backed up and screened from the plurality of target files according to the attribute information, the first-level parameter is a parameter which is determined according to the attribute information and used for representing the privacy degree of the backup files, and the second-level parameter is a parameter which is determined according to the attribute information and used for representing the importance degree of the backup files. In consideration of the different backup requirements of target files with different privacy levels and different importance levels, for example, system files cannot be viewed and deleted, the privacy level and the backup level are higher, backup is not needed, files with read-only property can be applied and copied, and backup is needed to avoid accidental deletion or modification of such files. In this embodiment, after the attribute information of the plurality of target files and each of the plurality of target files is acquired, the first-level parameter and the second-level parameter of the plurality of backup files and each of the plurality of backup files to be backed up are screened from the plurality of target files according to the attribute information, so that the plurality of backup files are backed up according to the first-level parameter and the second-level parameter in the subsequent step.
In one embodiment, step S300 includes:
s310, determining a plurality of backup files in the plurality of target files according to the file attributes;
s320, determining a first grade parameter and a second grade parameter of each backup file in the plurality of backup files according to the file type, the file creator and the file keyword.
When the attribute information includes file attributes, file types, file creators and file keywords, first, a plurality of backup files in a plurality of target files are determined according to the file attributes, for example, when the file attributes of the target files are read-only attributes or filing attributes, the target files are determined as the backup files, and then, first-level parameters and second-level parameters of each backup file are determined according to the file types, the file creators and the file keywords of each backup file in the plurality of backup files.
In one embodiment, step S310 includes:
s311, determining the privacy grade and the importance grade of each target file in the plurality of target files according to the file attributes;
s312, determining a plurality of backup files in the plurality of target files according to the privacy level and the importance level.
The files with different file attributes correspond to different privacy levels and importance levels, for example, the files with system attributes correspond to a privacy level of 1 level and an importance level of 1 level, the files with hidden attributes correspond to a privacy level of 2 level and an importance level of 2 level, the files with read-only attributes correspond to a privacy level of 3 level and an importance level of 3 level, the files with filing attributes correspond to a privacy level of 4 level and an importance level of 4 level. In this embodiment, when determining a plurality of backup files according to file attributes, a privacy level and an importance level of each of a plurality of target files are determined according to the file attributes, and then a plurality of backup files in the plurality of target files are determined according to the privacy level and the importance level. When determining the privacy level and the importance level according to the file attributes, the corresponding relationship between the file attributes and the privacy level and the importance level can be preset, and after the file attributes of each target file are obtained, the privacy level and the importance level of each target file are determined according to the corresponding relationship between the file attributes of each target file and the privacy level and the importance level.
In one embodiment, step S311 includes:
s3111, inputting the file attributes into a level prediction model, and outputting the privacy level and the importance level of each target file in the plurality of target files through the level prediction model.
Considering that when the number of the acquired target files is large, it takes time to determine the privacy level and the importance level of each target file according to the corresponding relationship between the text attribute of each target file and the privacy level and the importance level, this embodiment inputs the file attribute of each target file into the level prediction model, and outputs the privacy level and the importance level of each target file in the plurality of target files through the level prediction model. The level prediction model is obtained by training a preset network model based on a preset training sample set, and the preset network model may adopt a deep learning model or a machine learning model, such as a Convolutional Neural Network (CNN), a deconvolution Neural network (De-Convolutional network, DN), and the like.
In one embodiment, step S320 includes:
s321, respectively determining a first score, a second score and a third score of each backup file according to the file type, the file creator and the file keyword, and respectively determining a fourth score, a fifth score and a sixth score of each backup file;
s322, determining a first grade parameter of each backup file according to the first score, the second score and the third score, and determining a second grade parameter of each backup file according to the fourth score, the fifth score and the sixth score.
The files with different attributes, the files created by different creators and the files containing different keywords have different privacy degrees, and the first score, the second score and the third score are respectively used for representing the privacy degrees of the files with different attributes, the files created by different creators and the files containing different keywords. Similarly, the importance levels of the files with different attributes, the files created by different creators and the files containing different keywords are different, and the fourth score, the fifth score and the sixth score are respectively used for representing the importance levels of the files with different attributes, the files created by different creators and the files containing different keywords. Before determining the first and second ranking parameters according to the file type, the file creator, and the file keyword, the embodiment may preset a corresponding relationship between the file attribute and the first score, a corresponding relationship between the file creator and the second score, and a corresponding relationship between the file keyword and the third score, as well as a corresponding relationship between the file attribute and the fourth score, a corresponding relationship between the file creator and the fifth score, and a corresponding relationship between the file keyword and the sixth score, for example, video, picture, and text respectively correspond to the first score a1, the first score a2, and the first score A3, and creators B1, B2, and B3 respectively correspond to the second score a4, the second score a5, and the second score a 6.
After obtaining the attribute information of each target file in the plurality of target files, respectively determining a first score, a second score and a third score of each target file, a fourth score, a fifth score and a sixth score of each target file according to the file attribute, the file creator, the file keyword and a preset corresponding relationship, determining a first ranking parameter of each target file according to the first score, the second score and the third score, and determining a second ranking parameter of each target file according to the fourth score, the fifth score and the sixth score. When determining the first ranking parameter, the first score, the second score, and the third score may be summed, or the first score, the second score, and the third score may be weighted and summed, or the first score, the second score, and the third score may be summed and then averaged, which is not limited in this application. Similarly, when determining the second level parameter, the fourth score, the fifth score and the sixth score may be summed, or the fourth score, the fifth score and the sixth score may be summed in a weighted manner, or the fourth score, the fifth score and the sixth score may be summed and then averaged, which is not limited in this application.
S400, determining the backup sequence of the backup files according to the first level parameter and the second level parameter.
The backup sequence is a backup sequence of the plurality of backup files, for example, the backup sequence is a backup file a, a backup file B, and a backup file C, and when the plurality of backup files are backed up, the backup file a is backed up first, then the backup file B is backed up, and finally the backup file C is backed up. In consideration of the different degrees of urgency of backup files with different degrees of privacy and different degrees of importance, for example, generally speaking, a user wants to backup files with high privacy and high importance preferentially, in this embodiment, after determining the first level parameter and the second level parameter of each target file, the backup order of a plurality of backup files is further determined according to the first level parameter and the second level parameter, so that a plurality of backup files are backed up according to the backup order in the subsequent step.
In one embodiment, step S400 includes:
s410, determining a target grade parameter of each target file according to the first grade parameter and the second grade parameter;
s420, according to the target grade parameters, determining a plurality of backup files in the target files and the backup sequence of the backup files.
The target level parameter is a parameter determined according to the first level parameter and the second level parameter, and when determining the backup order of the plurality of backup files according to the first level parameter and the second level parameter, the present embodiment first determines the target level parameter of each target file according to the first level parameter and the second level parameter, and then determines the backup order of the plurality of backup files according to the target level parameter. For example, the backup files with large target level parameters are backed up first, and the backup files with small target level parameters are backed up later. When determining the target level parameter, the first level parameter and the second level parameter may be summed, or the first level parameter and the second level parameter are summed in a weighted manner, or the first level parameter and the second level parameter are summed and then averaged, which is not limited in this application.
Of course, the present embodiment may also determine backup cycles of a plurality of backup files according to the target level parameter, for example, perform real-time backup on backup files with the target level parameter greater than the preset parameter value, and perform timed backup on backup files with the target level parameter less than or equal to the preset parameter value.
S500, transmitting the backup files to a file storage server according to the backup sequence so as to realize backup of the backup files.
The file storage server is a preset server for storing a plurality of backup files, and includes but is not limited to a minio server, the minio server is a high-performance distributed object storage system, is compatible with an amazon S3 cloud storage server interface, and is very suitable for storing large-capacity unstructured data such as pictures, videos, log files, backup data and container/virtual machine images. After the backup files and the backup sequence of the backup files are determined, the backup files can be transmitted to the file storage server according to the backup sequence, so that the backup of the backup files is realized. In addition, in a scenario where the backup files need to be restored, a plurality of backup files may also be restored according to the backup order, for example, the backup files with high privacy degree and importance degree are restored preferentially, and the backup files with relatively low privacy degree and importance degree are restored later.
In a specific embodiment, after step S500, the method further includes:
s610, receiving a file continuous transmission request of the plurality of backup files, wherein the file continuous transmission request comprises breakpoint positions determined based on uploaded files in the plurality of backup files;
s620, according to the breakpoint position and the backup sequence, breakpoint resuming is carried out on the backup files.
Considering that the backup of the plurality of backup files may fail due to network outage or power outage and other factors in the backup process of the plurality of backup files, the computer device may receive a file resuming request of the plurality of backup files, where the file resuming request includes a breakpoint position determined based on an uploaded file in the plurality of backup files, and resume the plurality of backup files according to the breakpoint position and the backup sequence in the file resuming request.
In order to better implement the file backup method in the embodiment of the present application, on the basis of the file backup method, an embodiment of the present application further provides a file backup apparatus, as shown in fig. 3, the file backup apparatus 600 includes:
an application determining unit 601, configured to determine, according to the acquired file backup request, a web application program that needs to perform file backup;
an information obtaining unit 602, configured to package the web application into a client application, and obtain a plurality of target files of the client application and attribute information of each of the plurality of target files;
a parameter determining unit 603, configured to determine, according to the attribute information, a plurality of backup files in the plurality of target files and a first level parameter and a second level parameter of each backup file in the plurality of backup files, where the first level parameter is used to represent a privacy degree of each backup file, and the second level parameter is used to represent an importance degree of each backup file;
a sequence determining unit 604, configured to determine a backup sequence of the backup files according to the first level parameter and the second level parameter;
the file backup unit 605 is configured to transmit the backup files to a file storage server according to the backup sequence, so as to implement backup of the backup files.
In the embodiment of the application, the webpage application program is packaged into the client application program, the files needing to be backed up are obtained through the client application program, the problem that file backup of the webpage application program cannot be achieved due to the limitation of a browser security strategy can be solved, a plurality of backup files and backup sequences are determined according to the attribute information, and the files with high privacy degree and high importance degree can be backed up preferentially.
In some embodiments of the present application, the parameter determining unit 603 is specifically configured to:
determining a plurality of backup files in the plurality of target files according to the file attributes;
and determining a first grade parameter and a second grade parameter of each backup file in the plurality of backup files according to the file type, the file creator and the file keyword.
In some embodiments of the present application, the parameter determining unit 603 is further specifically configured to:
respectively determining a first score, a second score and a third score of each backup file according to the file type, the file creator and the file keyword, and respectively determining a fourth score, a fifth score and a sixth score of each backup file;
determining a first grade parameter of each backup file according to the first score, the second score and the third score, and determining a second grade parameter of each backup file according to the fourth score, the fifth score and the sixth score.
In some embodiments of the present application, the parameter determining unit 603 is further specifically configured to:
determining the privacy level and the importance level of each target file in the plurality of target files according to the file attributes;
and determining a plurality of backup files in the plurality of target files according to the privacy grade and the importance grade.
In some embodiments of the present application, the parameter determining unit 603 is further specifically configured to:
and inputting the file attributes into a grade prediction model, and outputting the privacy grade and the importance grade of each target file in the plurality of target files through the grade prediction model.
In some embodiments of the present application, the order determining unit 604 is specifically configured to:
determining a target grade parameter of each backup file according to the first grade parameter and the second grade parameter;
and determining the backup sequence of the backup files according to the target grade parameters.
In some embodiments of the present application, the file backup apparatus 600 further includes:
the request receiving unit is used for receiving a file continuous transmission request of the plurality of backup files, wherein the file continuous transmission request comprises breakpoint positions determined based on uploaded files in the plurality of backup files;
and the breakpoint resuming unit is used for performing breakpoint resuming on the plurality of backup files according to the breakpoint positions and the backup sequence.
An embodiment of the present application further provides a computer device, which integrates any one of the file backup apparatuses provided in the embodiment of the present application, where the computer device includes:
one or more processors;
a memory; and
one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the processor for performing the steps of the file backup method described in any of the above embodiments of the file backup method.
The embodiment of the present application further provides a computer device, which integrates any one of the file backup apparatuses provided in the embodiments of the present application. Fig. 4 is a schematic diagram showing a structure of a computer device according to an embodiment of the present application, specifically:
the computer device may include components such as a processor 701 of one or more processing cores, memory 702 of one or more computer-readable storage media, a power supply 703, and an input unit 704. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 4 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components. Wherein:
the processor 701 is a control center of the computer apparatus, connects various parts of the entire computer apparatus using various interfaces and lines, and performs various functions of the computer apparatus and processes data by running or executing software programs and/or modules stored in the memory 702 and calling data stored in the memory 702, thereby monitoring the computer apparatus as a whole. Optionally, processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 701.
The memory 702 may be used to store software programs and modules, and the processor 701 executes various functional applications and data processing by operating the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 702 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
The computer device further includes a power supply 703 for supplying power to the various components, and preferably, the power supply 703 is logically connected to the processor 701 through a power management system, so that functions of managing charging, discharging, and power consumption are implemented through the power management system. The power supply 703 may also include any component including one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 704, the input unit 704 being operable to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 701 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 702 according to the following instructions, and the processor 701 runs the application program stored in the memory 702, thereby implementing various functions as follows:
determining a webpage application program needing to be subjected to file backup according to the acquired file backup request;
packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files;
determining a plurality of backup files in the plurality of target files and a first grade parameter and a second grade parameter of each backup file in the plurality of backup files according to the attribute information, wherein the first grade parameter is used for representing the privacy degree of each backup file, and the second grade parameter is used for representing the importance degree of each backup file;
determining the backup sequence of the backup files according to the first level parameter and the second level parameter;
and transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like. The file backup method comprises a step of storing a computer program, and a step of executing the steps of any one of the file backup methods provided by the embodiments of the present application by loading the computer program by a processor. For example, the computer program may be loaded by a processor to perform the steps of:
determining a webpage application program needing to be subjected to file backup according to the acquired file backup request;
packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files;
determining a plurality of backup files in the plurality of target files and a first grade parameter and a second grade parameter of each backup file in the plurality of backup files according to the attribute information, wherein the first grade parameter is used for representing the privacy degree of each backup file, and the second grade parameter is used for representing the importance degree of each backup file;
determining the backup sequence of the backup files according to the first level parameter and the second level parameter;
and transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and parts that are not described in detail in a certain embodiment may refer to the above detailed descriptions of other embodiments, and are not described herein again.
In a specific implementation, each unit or structure may be implemented as an independent entity, or may be combined arbitrarily to be implemented as one or several entities, and the specific implementation of each unit or structure may refer to the foregoing method embodiment, which is not described herein again.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
The foregoing describes in detail a file backup method, device, computer device, and storage medium provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principle and implementation manner of the present application, and the description of the foregoing embodiments is only used to help understand the method and core ideas of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and the application scope may be changed, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for file backup, the method comprising:
determining a webpage application program needing to be subjected to file backup according to the acquired file backup request;
packaging the webpage application program into a client application program, and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files;
determining a plurality of backup files in the plurality of target files and a first-level parameter and a second-level parameter of each backup file in the plurality of backup files according to the attribute information, wherein the first-level parameter is used for representing the privacy degree of each backup file, and the second-level parameter is used for representing the importance degree of each backup file;
determining the backup sequence of the backup files according to the first level parameter and the second level parameter;
and transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files.
2. The method of claim 1, wherein the attribute information includes file attributes, file types, file creators, and file keywords, and wherein determining the first ranking parameters and the second ranking parameters of the plurality of target files and each of the plurality of target files based on the attribute information comprises:
determining a plurality of backup files in the plurality of target files according to the file attributes;
and determining a first grade parameter and a second grade parameter of each backup file in the plurality of backup files according to the file type, the file creator and the file keyword.
3. The method of claim 2, wherein determining the first ranking parameter and the second ranking parameter for each of the plurality of ghosted files based on the file type, the file creator, and the file keyword comprises:
respectively determining a first score, a second score and a third score of each backup file according to the file type, the file creator and the file keyword, and respectively determining a fourth score, a fifth score and a sixth score of each backup file;
determining a first ranking parameter of each backup file according to the first score, the second score and the third score, and determining a second ranking parameter of each backup file according to the fourth score, the fifth score and the sixth score.
4. The method for backing up files according to claim 2, wherein said determining backup files of the target files according to the file attributes comprises:
determining the privacy level and the importance level of each target file in the plurality of target files according to the file attributes;
and determining a plurality of backup files in the plurality of target files according to the privacy grade and the importance grade.
5. The method of claim 4, wherein said determining a privacy rating and an importance rating for each of the plurality of target files based on the file attributes comprises:
and inputting the file attributes into a grade prediction model, and outputting the privacy grade and the importance grade of each target file in the plurality of target files through the grade prediction model.
6. The method of claim 1, wherein determining the backup order of the backed-up files according to the first level parameter and the second level parameter comprises:
determining a target grade parameter of each backup file according to the first grade parameter and the second grade parameter;
and determining the backup sequence of the backup files according to the target grade parameters.
7. The method for backing up files according to claim 1, wherein after the transferring the backup files to a file storage server according to the backup order, the method further comprises:
receiving a file continuous transmission request of the plurality of backup files, wherein the file continuous transmission request comprises a breakpoint position determined based on an uploaded file in the plurality of backup files;
and according to the breakpoint position and the backup sequence, performing breakpoint continuous transmission on the plurality of backup files.
8. A file backup apparatus, characterized in that the file backup apparatus comprises:
the application determining unit is used for determining a webpage application program which needs to be subjected to file backup according to the acquired file backup request;
the information acquisition unit is used for packaging the webpage application program into a client application program and acquiring a plurality of target files of the client application program and attribute information of each target file in the plurality of target files;
a parameter determining unit, configured to determine, according to the attribute information, a plurality of backup files in the plurality of target files and a first level parameter and a second level parameter of each backup file in the plurality of backup files, where the first level parameter is used to represent a privacy degree of each backup file, and the second level parameter is used to represent an importance degree of each backup file;
the sequence determining unit is used for determining the backup sequence of the backup files according to the first level parameter and the second level parameter;
and the file backup unit is used for transmitting the backup files to a file storage server according to the backup sequence so as to realize the backup of the backup files.
9. A computer device, characterized in that the computer device comprises:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the file backup method of any of claims 1-7.
10. A computer-readable storage medium, having stored thereon a computer program which is loaded by a processor to perform the steps of the file backup method according to any one of claims 1 to 7.
CN202210500560.8A 2022-05-10 2022-05-10 File backup method and device, computer equipment and storage medium Active CN114615287B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210500560.8A CN114615287B (en) 2022-05-10 2022-05-10 File backup method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210500560.8A CN114615287B (en) 2022-05-10 2022-05-10 File backup method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114615287A CN114615287A (en) 2022-06-10
CN114615287B true CN114615287B (en) 2022-07-12

Family

ID=81870063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210500560.8A Active CN114615287B (en) 2022-05-10 2022-05-10 File backup method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114615287B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415794A (en) * 2018-01-30 2018-08-17 河南职业技术学院 File backup method and file backup device
CN109766215A (en) * 2018-12-06 2019-05-17 合肥联宝信息技术有限公司 A kind of data processing method and device
CN112583868A (en) * 2019-09-27 2021-03-30 浙江宇视科技有限公司 Backup method, device, equipment and medium for cloud storage data

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3910415B2 (en) * 2001-11-20 2007-04-25 インターナショナル・ビジネス・マシーンズ・コーポレーション Data recording method, data recording system and program
US20070050361A1 (en) * 2005-08-30 2007-03-01 Eyhab Al-Masri Method for the discovery, ranking, and classification of computer files
US20160019119A1 (en) * 2014-07-21 2016-01-21 Longsand Limited Prioritizing backup of files
US10409689B2 (en) * 2016-08-26 2019-09-10 Dell Products, L.P. Systems and processes for data backup and recovery

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108415794A (en) * 2018-01-30 2018-08-17 河南职业技术学院 File backup method and file backup device
CN109766215A (en) * 2018-12-06 2019-05-17 合肥联宝信息技术有限公司 A kind of data processing method and device
CN112583868A (en) * 2019-09-27 2021-03-30 浙江宇视科技有限公司 Backup method, device, equipment and medium for cloud storage data

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
利用Electron 把Web项目打包成桌面应用;xferris;《https:cloud.tencent.com/developer/article/1141268》;20180718;全文 *

Also Published As

Publication number Publication date
CN114615287A (en) 2022-06-10

Similar Documents

Publication Publication Date Title
US8825817B1 (en) Using a template to update a stack of resources
CN111901294A (en) Method for constructing online machine learning project and machine learning system
CN104281468A (en) Method and system for distributed virtual machine image management
US10693816B2 (en) Communication methods and systems, electronic devices, and computer clusters
WO2022062888A1 (en) Document editing method and apparatus, computer device and storage medium
CN106990975A (en) One kind application heat deploying method, device and system
US20170004221A1 (en) Establishment of state representation of a web page represented in a web browser
CN107329991A (en) A kind of list access to web page and methods of exhibiting and its system
US11636093B2 (en) Reducing data loss in remote databases
EP3821344B1 (en) Use of cache for content validation and error remediation
CN111586164A (en) Sharing method and succession method of remote cloud desktop, information processing method and electronic equipment
CN112860343B (en) Configuration changing method, system, device, electronic equipment and storage medium
WO2018209465A1 (en) Webpage access control method and gateway device
US20220407907A1 (en) Web application component migration to a cloud computing system
CN115202729A (en) Container service-based mirror image generation method, device, equipment and medium
US10089139B2 (en) Systems, methods and media for managing embedded content
CN117033082A (en) Virtual machine backup recovery method and device, computer equipment and storage medium
US10223346B2 (en) Hybrid client/network service application integration
CN116578447B (en) Virtual machine data recovery method and device, computer equipment and storage medium
CN114615287B (en) File backup method and device, computer equipment and storage medium
CN102843369B (en) The Network Access Method at UI interface and system
CN114584574B (en) Data synchronization method and device, computer equipment and storage medium
CN116361584A (en) Page data processing method and device, computer equipment and storage medium
CN116578219A (en) Form page self-adaptive display method and device suitable for left and right double screens, computer equipment and computer readable storage medium
CN103975301A (en) Event service for local client applications through local server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee after: Wuhan Barda Technology Co.,Ltd.

Address before: 430070 No. 1, 2 and 10, floors 1-3, building A7, Rongke Zhigu industrial project phase I, No. 555, Wenhua Avenue, Hongshan District, Wuhan City, Hubei Province

Patentee before: Wuhan Sitong Information Service Co.,Ltd.

CP01 Change in the name or title of a patent holder