A pre-training model file management method, program product, device and medium

By sharding and managing large files on the client side, and using local databases to implement breakpoint resume transmission, the problem of breakpoint resume transmission in large file management is solved, efficiency is improved, system design is simplified, and costs are reduced.

CN118427159BActive Publication Date: 2024-09-03LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410889279.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2024-09-03
Estimated Expiration
2044-07-04

AI Technical Summary

Technical Problem

Existing large file management solutions do not support resumable downloads, which results in large files needing to be re-downloaded when the network is interrupted, affecting storage and sharing efficiency. Additionally, deploying additional tools that support resumable downloads will increase system complexity and cost.

Method used

By dividing the file into multiple data blocks on the client, numbering and storing the address information, and using the local database for upload status management, the breakpoint resumable upload function is realized. There is no need to deploy additional download tools and can be deployed directly on the client.

Benefits of technology

It effectively solves the problem of breakpoint resume upload of large files, improves upload efficiency, simplifies system design, and reduces implementation difficulty and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118427159B
    Figure CN118427159B
Patent Text Reader

Abstract

The present invention discloses a pre-trained model file management method, program product, device and medium, which relate to the field of file management technology, and are used to realize model file management. In view of the problem that traditional solutions do not support breakpoint resume of files, a pre-trained model file management method is provided, which transmits files in pieces and records the upload progress locally in real time. When re-uploading files after an exception occurs, the files can be re-uploaded from the breakpoint data block without uploading from the beginning, which can effectively solve the breakpoint resume of large model files and avoid the inability to continue downloading large files from the interruption point, which seriously affects the efficiency and data processing capabilities. In addition, the breakpoint resume function realized by this solution can be directly deployed locally on the client side of the uploaded file, and can be realized through an additionally set database file, without the need to deploy additional download tools, and without considering the adaptation between the download tool and the management system, which is easier to implement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of file management technology, and in particular to a pre-training model file management method, program product, device and medium. Background Art

[0002] With the development of deep learning technology and the increase of computing resources, the growth of neural network model size has become one of the current mainstream development trends. At the same time, with the growth of model size, the demand for data processing capabilities has also continued to increase. One of the keys to improving data processing capabilities is to improve the management capabilities of large model files, that is, large files.

[0003] At present, mainstream large file management solutions do not support the breakpoint resume function. If a user encounters problems such as network interruption when downloading a single file, he or she may need to restart the download of the entire file and cannot continue downloading from the interruption point. This has a very serious impact on the storage and sharing efficiency of large files and is not conducive to improving data processing capabilities. When downloading files through a download tool with a breakpoint resume function, it is necessary to consider issues such as the adaptation between the download tool and the file management system. In addition, the deployment of additional tools will also make the large file management system more complicated, increase the difficulty and cost of implementation, and have an adverse impact on operational stability.

[0004] Therefore, technical personnel in this field now urgently need a pre-trained model file management method to solve the problem that traditional large file management solutions do not support breakpoint resumption of large files, and the efficiency and management capabilities need to be further improved. Summary of the invention

[0005] The purpose of the present invention is to provide a pre-trained model file management method, program product, device and medium to solve the problem that traditional large file management solutions do not support breakpoint resumption of large files, and the efficiency and management capabilities need to be further improved.

[0006] In order to solve the above technical problems, the present invention provides a pre-training model file management method, comprising:

[0007] When receiving a file upload command, copy the target file to the project directory;

[0008] Divide the target file into a plurality of data blocks, assign a unique data block number to each of the data blocks, and determine the address information of each of the data blocks in the target file;

[0009] The address information and data block number of each data block are stored in a first database file, and for each data block, a corresponding upload status item is created in the first database file; wherein the first database file is a database file created in advance in a project directory; and the initial status of the upload status item is not uploaded;

[0010] Uploading each of the data blocks to the file storage server in sequence according to the data block number and address information;

[0011] If the data block is uploaded successfully, the corresponding upload status item in the first database file is updated to upload successfully;

[0012] When the target file needs to be re-uploaded, the data block whose first upload status item is not uploaded is determined as the target data block according to the upload status items and data block numbers corresponding to the data blocks;

[0013] Starting from the target data block, continue uploading the target file.

[0014] In a possible embodiment, after the target file is uploaded, the method further includes:

[0015] Storing the file information of the target file in a second database file;

[0016] The second database file is a database file created in advance in the project directory; whenever the second database file has data updated, the second database file is pushed to the remote warehouse.

[0017] In a possible embodiment, before uploading the target file, the method further includes:

[0018] Concatenate the project name of the project to which the target file belongs and the hash value of the target file as a file name; wherein the file name belongs to the file information;

[0019] According to the file name, query whether the target file already exists in the file storage server;

[0020] If not, go to the step of copying the target file to the project directory;

[0021] If so, the file information of the target file is obtained from the remote repository according to the file name, and updated into the second database file.

[0022] In a possible embodiment, it further includes:

[0023] When a file list display command is received, the file names of all the target files are read from the second database file;

[0024] Arrange and display the file names of all the target files in a preset sorting manner.

[0025] In a possible embodiment, it further includes:

[0026] When receiving a file update command, copy the new file to the project directory and delete the original file;

[0027] The concatenation of the project name and the hash value of the new file is used as the file name;

[0028] According to the file name, query whether the new file already exists in the file storage server;

[0029] If not, the new file is used as the target file, and the process proceeds to the step of copying the target file to the project directory;

[0030] If so, the file information of the new file is obtained from the remote repository according to the file name, and updated into the second database file.

[0031] In a possible embodiment, before deleting any file, the method further includes:

[0032] Traverse all branches of the current project to determine whether there is a file with the same file name as the file to be deleted;

[0033] If yes, exit this method;

[0034] If not, calling the interface of the file storage server to delete the file to be deleted;

[0035] Deleting the file information of the to-be-deleted file from the second database file;

[0036] Push the updated second database file to the remote warehouse.

[0037] In a possible embodiment, it further includes:

[0038] When a project creation command is received, a new folder is created in the folder specified by the project creation command under the project directory as a local repository;

[0039] Creating empty first database files and second database files in the local repository;

[0040] Wherein, the first database file is also used to store access keys, distributed version control server account information and personal tokens;

[0041] The second database file is also used to store user information, a distributed version control server interface address and a file storage server address.

[0042] In a possible embodiment, it further includes:

[0043] When a branch creation command is received, the first database file of the current branch is submitted to the local warehouse for storage;

[0044] Call the interface of the distributed version control server to create a new branch based on the current branch;

[0045] Copy the second database file of the current branch as the second database file of the new branch;

[0046] Push the new branch to the remote repository.

[0047] In a possible embodiment, it further includes:

[0048] When receiving a branch switch command, the distributed version control server interface is called to switch the current branch to the target branch;

[0049] Obtain the second database file of the target branch from the remote repository;

[0050] According to the second database file of the target branch, the second database file in the local repository is updated.

[0051] In a possible embodiment, it further includes:

[0052] Uploading the encrypted user information to the user server;

[0053] Receiving the access key, the distributed version control server account information and the personal token returned by the user server;

[0054] The access key is obtained by the user server registering the user on the file storage server through the user information;

[0055] The distributed version control server account information is obtained by the user server registering the user on the distributed version control server through the user information;

[0056] The personal token is generated by the user server according to the distributed version control server account information.

[0057] In a possible embodiment, it further includes:

[0058] When receiving a project list display command, uploading the encrypted user information to the user server;

[0059] Display the project list returned by the user server;

[0060] The project list is a list consisting of all projects related to the user information, which are screened out from all projects by the user server according to the user information.

[0061] In a possible embodiment, it further includes:

[0062] When a project download command is received, uploading the encrypted user information and the project name of the target project to the user server;

[0063] Receive the distributed version control server address of the target project returned by the user server;

[0064] The project files of the target project are downloaded from the distributed version control server to the local computer through the distributed version control server address.

[0065] In a possible embodiment, it further includes:

[0066] When a file download command is received, synchronizing file information of the target file from the remote repository to the second database file;

[0067] According to the file information, the target file is divided into a plurality of data blocks, and a unique data block number is assigned to each of the data blocks, and address information of each of the data blocks in the target file is determined;

[0068] The address information and the data block number of each data block are stored in the first database file, and for each data block, a corresponding download status item is created in the first database file; wherein the initial status of the download status item is not downloaded;

[0069] Downloading each of the data blocks from the file storage server in sequence according to the data block number and address information;

[0070] If the data block is downloaded successfully, the corresponding download status item in the first database file is updated to indicate that the download is successful;

[0071] When the target file needs to be downloaded again, the data block whose first download status item is not downloaded is determined as the target data block according to the download status items and data block numbers corresponding to the data blocks;

[0072] Starting from the target data block, continue downloading the target file;

[0073] After the target file is downloaded, the integrity of the target file is verified.

[0074] In order to solve the above technical problems, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the pre-trained model file management method as described above when executed by a processor.

[0075] In order to solve the above technical problems, the present invention also provides a large model file management device, comprising:

[0076] Memory for storing computer programs;

[0077] A processor is used to implement the steps of the pre-trained model file management method as described above when executing the computer program.

[0078] In order to solve the above technical problems, the present invention also provides a non-volatile storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the pre-trained model file management method as described above are implemented.

[0079] The present invention provides a pre-trained model file management method. When a file needs to be uploaded, the file is segmented locally on the client to obtain multiple data blocks; each data block is numbered, the address information of each data block in the file is determined, an upload status item is created, and all this information is stored in a local database file; further, when uploading a file, each data block can be uploaded in sequence according to the data block number, and the corresponding upload status item is updated in time after any data block is successfully uploaded; based on this, when the file upload is interrupted due to a client abnormality, the client can determine the progress of the last upload according to the upload status item, that is, find the first data block that has not been uploaded; then determine the starting address of this upload from the file through the address information of this data block, and continue to upload the file.

[0080] The pre-trained model file management method implemented by this solution can effectively solve the problem of breakpoint resuming of large model files, avoiding the problem that large files cannot be downloaded from the interruption point, which seriously affects efficiency and data processing capabilities. In addition, the breakpoint resuming function implemented by this solution can be directly deployed locally on the client that uploads the file, and can be implemented through an additional database file. There is no need to deploy additional download tools, and there is no need to consider the adaptation between the download tool and the file management system, which is easier to implement.

[0081] The large model file management device, computer program product and non-volatile storage medium provided by the present invention correspond to the above method and have the same effect as above. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0083] Figure 1 A flowchart of a pre-training model file management method provided by the present invention;

[0084] Figure 2 A structural diagram of a large model file management system provided by the present invention;

[0085] Figure 3 A structural diagram of a large model file management device provided by the present invention. DETAILED DESCRIPTION

[0086] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0087] The core of the present invention is to provide a pre-training model file management method, program product, device and medium.

[0088] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0089] At present, mainstream model file management systems do not support the breakpoint resume function of files. The deployment of additional download tools that support the breakpoint resume function requires additional consideration of issues such as compatibility, implementation difficulty, and cost, which is not easy to implement. Based on this, the present invention provides a pre-trained model file management method, such as Figure 1 As shown, including:

[0090] S101: When a file upload command is received, the target file is copied to the project directory.

[0091] S102: Divide the target file into multiple data blocks, assign a unique data block number to each data block, and determine the address information of each data block in the target file.

[0092] S103: storing the address information and data block number of each data block in the first database file, and creating a corresponding upload status item in the first database file for each data block.

[0093] The first database file is a database file created in advance in the project directory; the initial state of the upload status item is not uploaded.

[0094] S104: Upload each data block to the file storage server in sequence according to the data block number and address information.

[0095] S105: If the data block is uploaded successfully, the corresponding upload status item in the first database file is updated to upload successfully.

[0096] S106: When the target file needs to be re-uploaded, the first data block with the upload status item indicating that it has not been uploaded is determined as the target data block according to the upload status items and data block numbers corresponding to the data blocks.

[0097] S107: Starting from the target data block, continue uploading the target file.

[0098] First of all, it should be explained that the breakpoint resume transmission scenario targeted by this method is the breakpoint resume transmission of "large" model files; "model file" refers to the pre-trained model file, and "large" is a standard defined according to the actual file transfer needs; when the file size exceeds a certain threshold, it can be considered as a "large" model file targeted by this method.

[0099] It can be seen from the above steps that this method reduces the amount of data uploaded each time by dividing the large model file into multiple data blocks and then uploading the data blocks in sequence; and also numbers each data block, determines the address information of each data block in the large model file, and creates a corresponding upload status item for each data block; the data block number is used to determine the upload order, the upload status item is used to identify whether each data block has been uploaded successfully, and the address information is used to start uploading files from any data block; based on the above settings, this method can realize breakpoint resumption of large model files, avoid the need to re-upload large model files from the beginning due to abnormal situations such as network problems, and greatly improve the upload efficiency of large model files.

[0100] Furthermore, for the fragment transmission solution provided by the present invention, this embodiment also provides a further implementation scheme, and the method further includes:

[0101] S108: After any file is uploaded, verify the integrity of the file.

[0102] There are currently a variety of mature technical solutions for file integrity verification, and you can freely choose a suitable integrity verification solution according to actual needs. For example, a hash value (such as a SHA-256 value) is generated for each data block through a hash encryption algorithm (such as the SHA series algorithm), and the hash value is used to verify file integrity.

[0103] This embodiment avoids the problem of uploaded file data loss due to segmented uploading by performing file integrity check after the file is uploaded, and further ensures the reliability of file uploading.

[0104] In addition, it should be noted that this embodiment does not limit the data block segmentation method, and the large model file can be freely segmented into several data blocks according to actual needs. In addition, for non-large model files, it is also possible to upload the entire file directly to the file storage without using the file upload method that supports breakpoint continuation as described above, and this embodiment does not limit this.

[0105] For example, this embodiment also provides a corresponding implementation scheme for the other scenarios mentioned above. Before step S102, the method further includes:

[0106] S109: Determine whether the size of the target file exceeds a preset fragmentation threshold; if so, go to step S102; if not, go to step S110.

[0107] S110: directly upload the target file to the file storage server.

[0108] Correspondingly, step S102: dividing the target file into multiple data blocks, specifically:

[0109] Divide the target file into multiple data blocks according to the fragmentation threshold.

[0110] It should be noted that if the size of the target file is not an integer multiple of the fragmentation threshold, the size of the last data block is allowed to be non-fragmentation threshold. In addition, the specific value of the fragmentation threshold can be freely selected according to actual needs. Generally, the maximum file size that is not considered to take too long to upload the file can be used, such as 64MB.

[0111] Based on the upload method for large model files that supports breakpoint resumption mentioned in the above method, this embodiment also provides specific implementation plans for other situations in the file upload scenario. For small files that require a short upload time, on the one hand, even if the small file needs to be re-uploaded due to an upload exception, it does not take too long, and it can be received and re-uploaded from the beginning; on the other hand, for small files, adopting the method of pieced transmission may have a greater impact on its upload efficiency. Therefore, this embodiment judges the file size before uploading the file. If it is a large model file, the pieced transmission solution is executed, otherwise it is directly uploaded. The most appropriate upload method can be adopted for model files of different sizes, thereby maximizing the upload efficiency.

[0112] On the other hand, it should be noted that the method provided by the present invention is applied to the upload side of the model file, that is, in the case of Figure 2A possible model file management system hardware architecture is shown, which is applied to the client side. Further, Figure 2 The hardware architecture of a common model file management system shown includes: a file storage server, a database server, a user management server and a client; data communication is established between each server and the client through the Internet; uploading of the model file refers to the client uploading the model file to the file storage server.

[0113] The file storage server is used to store model files, and the client directly downloads the required model files from the file storage server. Considering that there are currently a variety of mature file storage service deployment solutions, in actual applications, appropriate file storage services can be deployed as needed to implement the above-mentioned file storage server, and this embodiment does not limit this.

[0114] The database server can provide remote persistent storage functions for the client, for example, it can be used to store user (client) related information, mainly login information such as username and password, authentication information of the file storage server, and service addresses of other components such as the interface address of the file service storage. In a possible implementation scenario, PostgreSQL (an object-relational database management system) and MySQL (a relational database management system) can be deployed as databases.

[0115] The user management server is used to manage client users' registration, login, authentication and other operations.

[0116] The client is an executable program that supports functions such as registration, login, project creation, file upload, file download, branch creation / switching, etc. The client is also the executor of the above method, and the first database file is stored locally on the client.

[0117] In addition, this embodiment also provides a further implementation scheme for the above-mentioned model file management system hardware architecture, such as Figure 2 As shown, the hardware architecture also includes: a distributed version control server (Git server);

[0118] Distributed version control servers are also connected to clients through the Internet; Git servers are used to implement version control and data metadata file storage. Software that supports the Git protocol, such as GitLab (a code and document management tool), can be deployed as a service. The Git server can provide version control for model files. Clients can upload different versions of the model and switch or roll back versions when necessary, which helps manage the evolution of the model and ensure the stability and reliability of the model.

[0119] Furthermore, it is not difficult to see from the upload method of file segment transmission provided by the present invention that the model file management implemented by this method is realized by means of a database file stored locally on the client, and the database file stores information related to file management, thereby ensuring the file management control of each end in the system. Therefore, based on the management system corresponding to the hardware architecture of a model file management system provided in the above embodiment, this embodiment also provides a possible implementation plan:

[0120] In such Figure 2 In the management system shown, file management is mainly realized by information interaction between the client and the user management server. Based on this, on the user management server side, information tables as shown in Table 1 and Table 2 below can be stored locally on the user management server.

[0121] Table 1 User information table

[0122]

[0123] Among them, the access key number and secret access key in Table 1 are collectively referred to as the access key, which is the necessary basis for the client to access the file storage server. In addition, the username and password are the user information of the client, and the Git system account and Git system password are the Git account information registered on the Git server based on the user information of the client.

[0124] Table 2 Project information table

[0125]

[0126] It should be noted that the user information stored in the project information table is used to associate the project with the user, so that the corresponding project management can be performed when the client needs it. The Git project address is the address of the project on the Git server. From the above embodiment, it can be seen that this management system uses the Git server to implement model file management with version control. Therefore, when using the version control function, it is necessary to know the address of the project file in the Git server.

[0127] In addition, for the client locally, there may be information tables as shown in Tables 3 to 6 below for implementing model file and project management:

[0128] Table 3 Upload schedule

[0129]

[0130] It should be noted that the information in Table 3 is the information stored in the first local database file of the client in the above method. Among them, start_pos and end_pos are the address information of the data block, and status is the above upload status item. In Table 3, in addition to not uploaded and uploaded successfully, the upload status item also includes the two states of uploading and uploading failed, which is used to achieve more accurate file upload management. In addition, Table 3 also includes some information not mentioned in the above method embodiment, which is also used to achieve model file and project management, which will be explained in subsequent embodiments.

[0131] Table 4 Download schedule

[0132]

[0133] Table 4 is roughly the same as Table 3, except that one records the progress of file upload and the other records the progress of file download. In addition, since file download is to download information from the file storage server to the client, the return item etag of the file storage server is not required.

[0134] It should be noted that the information in Table 3 and Table 4 are all stored in the first database file mentioned above.

[0135] Table 5 File information table

[0136]

[0137] Table 6 Configuration information table

[0138]

[0139] Among them, Table 5 is mainly used to record the file information of the model file, and Table 6 is used to record the configuration information of the client. Since the file information needs to be synchronized to each component in the management system as the file is uploaded and downloaded, the file information table needs to be transmitted along with the file transmission. Due to its importance, the configuration information needs to be backed up as much as possible. Based on this, in order to distinguish it from the above-mentioned first database file, another database file can be created separately; wherein, the first database file stores information that only needs to be stored locally on the user side, such as the information in the above-mentioned Tables 3 and 4 and the configuration information in Table 6; the second database file created separately is used to store information that needs to be synchronized to other components in the system, such as the file information recorded in Table 5, and the configuration information recorded in Table 6.

[0140] Based on the above settings, this embodiment also provides a possible implementation scheme. After the file is uploaded, the above method further includes:

[0141] S111: storing the file information of the target file in the second database file;

[0142] The second database file is a database file created in advance in the project directory; whenever the second database file has data updates, the second database file is pushed to the remote warehouse. The remote warehouse is the remote persistent storage function provided by the database server.

[0143] Regarding the creation of the first database file and the second database file, this embodiment also provides a corresponding implementation scheme, and the method further includes:

[0144] S201: When a project creation command is received, a new folder is created in the folder specified by the project creation command under the project directory as a local repository;

[0145] S202: creating an empty first database file and a second database file in the local warehouse;

[0146] Among them, the first database file is also used to store access keys, distributed version control server account information and personal tokens; the second database file is also used to store user information, distributed version control server interface address and file storage server address.

[0147] In addition, in a possible implementation manner, the first database file and the second database file are database files provided by a database tool PostgreSQL or MySQL, such as .db files provided by MySQL.

[0148] This embodiment manages different information separately by creating two database files. The first database file stores information that is only used locally on the client, and the second database file stores information that needs to be synchronized to other components in the management system for separate management. The second database file can be pushed to the remote warehouse whenever there is information update, so as to synchronize the information to other components in the management system for easy management.

[0149] Furthermore, in combination with the first database file and the second database file provided in the above embodiment, this embodiment also provides a possible implementation scheme. Before uploading the target file, the method further includes:

[0150] The project name of the project to which the target file belongs and the hash value of the target file are concatenated as the file name; the file name belongs to the file information;

[0151] S112: According to the file name, query whether the target file already exists in the file storage server; if not, go to step S101; if yes, go to step S113.

[0152] S113: According to the file name, obtain the file information of the target file from the remote repository and update it into the second database file.

[0153] This embodiment provides a file upload management method. Before uploading a file, it is first determined whether the target file to be uploaded has been uploaded; if not, it is uploaded as usual as in the above embodiment; if so, there is no need to upload the file repeatedly, which can avoid file redundancy on the one hand and improve efficiency on the other hand. In addition, when the target file already exists in the file storage server, based on the above embodiment, it can be known that each time a file is uploaded, the file information must be synchronized to the remote warehouse, so the upload process can directly obtain the file information of the uploaded file from the remote warehouse and save it in the local second database to achieve synchronization of local file information.

[0154] On the other hand, in addition to the file upload and project creation solutions provided in the above embodiments, the present invention also provides management methods for other scenarios to further improve the pre-trained model file management method provided by the present invention.

[0155] For example, for the file list display function in the model file management, this embodiment provides a corresponding implementation scheme based on the first database file and the second database file set in the above embodiment:

[0156] S301: when a file list display command is received, the file names of all target files are read from the second database file;

[0157] S302: Arrange and display the file names of all target files in a preset sorting manner.

[0158] The file list display command may be a list command issued by the user on the client. The preset sorting method is not limited in this embodiment, and may be sorting by upload time, sorting by file name, sorting by file size, etc., and may be customized according to actual needs.

[0159] Based on the method provided in this embodiment, a file list display solution based on the second database file provided in the above embodiment is provided. By obtaining the entered file information from the second database file, all the file information stored in the current file storage server can be quickly obtained, and the file name can be displayed for the convenience of the user.

[0160] On the other hand, for the file update scenario in the model file management, this embodiment provides a corresponding implementation scheme based on the first database file and the second database file set in the above embodiment, and the method further includes:

[0161] S401: When a file update command is received, the new file is copied to the project directory and the original file is deleted.

[0162] S402: Concatenate the project name and the hash value of the new file as the file name.

[0163] S403: According to the file name, query whether the new file already exists in the file storage server; if not, take the new file as the target file and go to step S101; if yes, go to step S404.

[0164] S404: According to the file name, obtain the file information of the new file from the remote repository and update it into the second database file.

[0165] Based on the method provided in this embodiment, a file update management solution based on the second database file provided in the above embodiment is provided. The file name is used to query whether the corresponding file already exists in the file storage server. If so, there is no need to upload it repeatedly. The file information can be directly obtained from the remote warehouse and synchronized to the second database file. In addition, in this embodiment, the file name is determined by concatenating the project name and the file hash value. On the one hand, the project to which the file belongs can be intuitively known. On the other hand, the hash value also helps the file to complete subsequent verification work and ensure the uniqueness of the file name.

[0166] On the other hand, for the file deletion scenario in the model file management, this embodiment provides a corresponding implementation scheme based on the first database file and the second database file set in the above embodiment, and before deleting any file, it also includes:

[0167] S501: traverse all branches of the current project to determine whether there is a file with the same file name as the file to be deleted; if so, exit this method; if not, go to step S502.

[0168] S502: Calling an interface of a file storage server to delete the file to be deleted.

[0169] S503: Delete the file information of the file to be deleted from the second database file.

[0170] S504: Push the updated second database file to the remote warehouse.

[0171] Based on the method provided in this embodiment, a file deletion management solution based on the second database file provided in the above embodiment is provided. By checking the original file to be replaced, traversing each branch of the project, checking whether there is a file with the same file name as the original file, if not, the file storage interface is used to delete the original file from the file storage server, if so, no operation is performed to prevent file redundancy.

[0172] On the other hand, considering that in actual applications, there may be multiple users and multiple clients performing different operations on the same model file. In this case, multiple different versions of the model file may be obtained. Based on this, in order to implement model file management with version control, this embodiment provides a possible implementation scheme, and the above method also includes:

[0173] S601: When a command to create a branch is received, the first database file of the current branch is submitted to the local warehouse for storage;

[0174] S602: Calling the interface of the distributed version control server to create a new branch based on the current branch;

[0175] S603: Copy the second database file of the current branch as the second database file of the new branch;

[0176] S604: Push the new branch to the remote repository.

[0177] It should be noted that the branch created in this embodiment is a version of the model file. Each time a new branch is created, it is based on the current branch (i.e., the baseline branch). By obtaining the second database file of the baseline branch, the second database file of the new branch can be quickly established and information synchronized.

[0178] In addition, version control also includes switching between different versions of model files, that is, switching between branches. Based on this, this embodiment provides a possible solution for branch switching. The above method also includes:

[0179] S605: When a branch switching command is received, an interface of the distributed version control server is called to switch the current branch to a target branch;

[0180] S606: Obtain the second database file of the target branch from the remote repository;

[0181] S607: Update the second database file in the local repository according to the second database file of the target branch.

[0182] It is not difficult to see from the above that the branch creation and branch switching provided in this embodiment realize the version control of the model file, and realize the rapid realization of branch creation and branch switching through the second database file.

[0183] In addition, it should be noted that the implementation of creating branches and switching branches in the above embodiment is based on the Git server. Therefore, when the client accesses the Git server, it needs corresponding identity proof and interface address information, that is, the Git user information and Git server project address stored in Table 1 and Table 2 above.

[0184] Considering that the management system includes a Git server as a possible solution provided by the above embodiment, it is not a mandatory option for managing system deployment. In addition, the client also needs a corresponding access key when accessing the file storage server. Therefore, this embodiment provides a corresponding implementation plan for how to implement model file management with version control after deploying the Git server. The above method also includes:

[0185] S203: Upload the encrypted user information to the user server;

[0186] S204: receiving the access key, distributed version control server account information and personal token returned by the user server;

[0187] The access key is obtained by the user server through user information when registering the user on the file storage server;

[0188] The distributed version control server account information is obtained by the user server through the user information to register the user on the distributed version control server;

[0189] The personal token is generated by the user server based on the distributed version control server account information.

[0190] It should be noted that since the information designed in this embodiment is necessary information for the subsequent implementation of model file management with version control, it is generally necessary to execute this solution at the beginning of project creation to obtain the corresponding information. However, it should be noted that this is only a possible implementation plan and does not limit the steps of this solution to only be implemented in the project creation stage.

[0191] After the solution provided in this embodiment obtains the user information of the client through the user server, it registers the user with the file storage server and the Git server, and returns the access key and Git account information obtained by registration to the client for retention, so as to facilitate the subsequent client to perform model file management with version control.

[0192] On the other hand, with respect to the project list display function in the model file management, this embodiment provides a corresponding implementation scheme based on the first database file and the second database file set in the above embodiment, and the method further includes:

[0193] S701: When receiving a project list display command, uploading the encrypted user information to the user server;

[0194] S702: Display the project list returned by the user server;

[0195] The project list is a list consisting of all projects related to the user information, which are screened out from all projects by the user server according to the user information.

[0196] Furthermore, to improve security, the user server needs to verify the identity of the user when executing any request made by the client, such as authenticating the user name and password sent by the client.

[0197] It is not difficult to see that this embodiment is similar to the file list display solution, the difference is that this solution uses the user server to obtain the client-related projects. Based on the above embodiment and Table 2, it can be seen that the user server stores the user name and its corresponding project name, that is, the user server stores each user and its associated project information. Through the user manager, all project information related to the current client can be simply and quickly screened and displayed in a list.

[0198] On the other hand, with respect to the project download function in the model file management, this embodiment provides a corresponding implementation scheme based on the first database file and the second database file set in the above embodiment, and the method further includes:

[0199] S801: When a project download command is received, the encrypted user information and the project name of the target project are uploaded to the user server;

[0200] S802: Receive the distributed version control server address of the target project returned by the user server;

[0201] S803: Download the project files of the target project from the distributed version control server to the local computer through the distributed version control server address.

[0202] As can be seen from the above embodiment, user information and project names will be uploaded to the user server in time and retained. Then, when the client needs to download the project file, it can directly obtain relevant information from the user server, and then access the Git server to quickly download the project file to meet the needs.

[0203] On the other hand, with respect to the file download function in the model file management, this embodiment provides a corresponding implementation scheme based on the first database file and the second database file set in the above embodiment, and the method further includes:

[0204] S901: When a file download command is received, synchronize the file information of the target file from the remote repository to the second database file;

[0205] S902: Divide the target file into multiple data blocks according to the file information, assign a unique data block number to each data block, and determine the address information of each data block in the target file;

[0206] S903: storing the address information and the data block number of each data block in the first database file, and creating a corresponding download status item in the first database file for each data block; wherein the initial status of the download status item is not downloaded;

[0207] S904: Downloading each data block from the file storage server in sequence according to the data block number and address information;

[0208] S905: If the data block is downloaded successfully, update the corresponding download status item in the first database file to indicate that the download is successful;

[0209] S906: when the target file needs to be downloaded again, according to the download status items and data block numbers corresponding to the data blocks, determine that the first data block whose download status item is not downloaded is the target data block;

[0210] S907: starting from the target data block, continue downloading the target file;

[0211] S908: After the target file is downloaded, the integrity of the target file is verified.

[0212] It is not difficult to see from the above steps that, similar to the file upload solution based on segmented transmission provided above, the file download solution provided in this embodiment is also based on segmented transmission. Therefore, other possible application solutions of this embodiment in actual applications can refer to the above-mentioned file upload solution embodiment. This embodiment will not be described in detail here, and can bring the same effect as the above-mentioned file upload embodiment.

[0213] Based on the above embodiments, it can be seen that a pre-trained model file management method provided in the present application is based on two database files and a Git server with different synchronization strategies, implements a model file management solution with version control, and supports breakpoint resumption of file uploads and downloads. It can meet all the functions and scenarios currently required in the model file management scenario, and brings higher management efficiency and data processing capabilities.

[0214] In addition to the embodiment of a pre-trained model file management method provided in the above embodiment, the present invention also provides an embodiment corresponding to a computer program product. A computer program product includes a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the pre-trained model file management method described in any of the above embodiments can be implemented.

[0215] Since the embodiments of the computer program product part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the computer program product part, which will not be repeated here.

[0216] Figure 3A structural diagram of a large model file management device provided by another embodiment of the present invention, such as Figure 3 As shown, a large model file management device includes: a memory 10, for storing a computer program;

[0217] The processor 11 is used to implement the steps of a pre-trained model file management method as described in the above embodiment when executing a computer program.

[0218] The large model file management device provided in this embodiment may include but is not limited to a mobile terminal, a personal computer, a workstation, etc.

[0219] Among them, the processor 11 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 11 can be implemented in at least one hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 11 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 11 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 11 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0220] The memory 10 may include one or more computer-readable storage media, which may be non-transitory. The memory 10 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 10 is at least used to store the following computer program 101, wherein, after the computer program is loaded and executed by the processor 11, it can implement the relevant steps of a pre-trained model file management method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 10 may also include an operating system 102 and data 103, etc., and the storage method may be short-term storage or permanent storage. Among them, the operating system 102 may include Windows, Unix, Linux, etc. Data 103 may include, but is not limited to, a pre-trained model file management method, etc.

[0221] In some embodiments, a large model file management device may also include a display screen 12, an input and output interface 13, a communication interface 14, a power supply 15 and a communication bus 16.

[0222] Those skilled in the art will understand that Figure 3 The structure shown in does not constitute a limitation of a large model file management device, and may include more or fewer components than those shown in the figure.

[0223] A large model file management device provided by an embodiment of the present invention includes a memory and a processor. When the processor executes a program stored in the memory, it can implement the following method: a pre-trained model file management method.

[0224] Finally, the present invention also provides an embodiment corresponding to a non-volatile storage medium. The non-volatile storage medium stores a computer program, and when the computer program is executed by a processor, the steps recorded in the above method embodiment are implemented.

[0225] It is understandable that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.

[0226] The above is a detailed introduction to a pre-trained model file management method, program product, device and medium provided by the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, the present invention can also be improved and modified in several ways, and these improvements and modifications also fall within the scope of protection of the present invention.

[0227] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A pre-training model file management method, characterized in that: include: When receiving a file upload command, copy the target file to the project directory; Divide the target file into a plurality of data blocks, assign a unique data block number to each of the data blocks, and determine the address information of each of the data blocks in the target file; The address information and data block number of each data block are stored in a first database file, and for each data block, a corresponding upload status item is created in the first database file; wherein the first database file is a database file created in advance in a project directory; and the initial status of the upload status item is not uploaded; Uploading each of the data blocks to the file storage server in sequence according to the data block number and address information; If the data block is uploaded successfully, the corresponding upload status item in the first database file is updated to upload successfully; When the target file needs to be re-uploaded, the data block whose first upload status item is not uploaded is determined as the target data block according to the upload status items and data block numbers corresponding to the data blocks; Starting from the target data block, continue uploading the target file; After the target file is uploaded, the method further includes: Storing the file information of the target file in a second database file; Wherein, the second database file is a database file created in advance in the project directory; whenever the second database file has data updated, the second database file is pushed to the remote warehouse; The method also includes: When a project creation command is received, a new folder is created in the folder specified by the project creation command under the project directory as a local repository; Creating empty first database files and second database files in the local repository; Wherein, the first database file is also used to store access keys, distributed version control server account information and personal tokens; The second database file is also used to store user information, a distributed version control server interface address and a file storage server address; The method also includes: When a branch creation command is received, the first database file of the current branch is submitted to the local warehouse for storage; Call the interface of the distributed version control server to create a new branch based on the current branch; Copy the second database file of the current branch as the second database file of the new branch; Push the new branch to the remote repository.

2. The pre-training model file management method according to claim 1, characterized in that: Before uploading the target file, the method further includes: Concatenate the project name of the project to which the target file belongs and the hash value of the target file as a file name; wherein the file name belongs to the file information; According to the file name, query whether the target file already exists in the file storage server; If not, go to the step of copying the target file to the project directory; If so, the file information of the target file is obtained from the remote repository according to the file name, and updated into the second database file.

3. The pre-training model file management method according to claim 2, characterized in that: Also includes: When a file list display command is received, the file names of all the target files are read from the second database file; Arrange and display the file names of all the target files in a preset sorting manner.

4. The pre-training model file management method according to claim 2, characterized in that: Also includes: When receiving a file update command, copy the new file to the project directory and delete the original file; The concatenation of the project name and the hash value of the new file is used as the file name; According to the file name, query whether the new file already exists in the file storage server; If not, the new file is used as the target file, and the process proceeds to the step of copying the target file to the project directory; If so, the file information of the new file is obtained from the remote repository according to the file name, and updated into the second database file.

5. The pre-training model file management method according to claim 4, characterized in that: Before deleting any files, also include: Traverse all branches of the current project to determine whether there is a file with the same file name as the file to be deleted; If yes, exit this method; If not, calling the interface of the file storage server to delete the file to be deleted; Deleting the file information of the to-be-deleted file from the second database file; Push the updated second database file to the remote warehouse.

6. The pre-training model file management method according to claim 1, characterized in that: Also includes: When receiving a branch switch command, the distributed version control server interface is called to switch the current branch to the target branch; Obtain the second database file of the target branch from the remote repository; According to the second database file of the target branch, the second database file in the local repository is updated.

7. The pre-training model file management method according to claim 1, characterized in that: Also includes: Uploading the encrypted user information to the user server; Receiving the access key, the distributed version control server account information and the personal token returned by the user server; The access key is obtained by the user server registering the user on the file storage server through the user information; The distributed version control server account information is obtained by the user server registering the user on the distributed version control server through the user information; The personal token is generated by the user server according to the distributed version control server account information.

8. The pre-training model file management method according to claim 7, characterized in that: Also includes: When receiving a project list display command, uploading the encrypted user information to the user server; Display the project list returned by the user server; The project list is a list consisting of all projects related to the user information, which are screened out from all projects by the user server according to the user information.

9. The pre-training model file management method according to claim 7, characterized in that: Also includes: When a project download command is received, uploading the encrypted user information and the project name of the target project to the user server; Receive the distributed version control server address of the target project returned by the user server; The project files of the target project are downloaded from the distributed version control server to the local computer through the distributed version control server address.

10. The pre-training model file management method according to any one of claims 1 to 9, characterized in that: Also includes: When a file download command is received, synchronizing file information of the target file from the remote repository to the second database file; According to the file information, the target file is divided into a plurality of data blocks, and a unique data block number is assigned to each of the data blocks, and address information of each of the data blocks in the target file is determined; The address information and the data block number of each data block are stored in the first database file, and for each data block, a corresponding download status item is created in the first database file; wherein the initial status of the download status item is not downloaded; Downloading each of the data blocks from the file storage server in sequence according to the data block number and address information; If the data block is downloaded successfully, the corresponding download status item in the first database file is updated to indicate that the download is successful; When the target file needs to be downloaded again, the data block whose first download status item is not downloaded is determined as the target data block according to the download status items and data block numbers corresponding to the data blocks; Starting from the target data block, continue downloading the target file; After the target file is downloaded, the integrity of the target file is verified.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the pre-trained model file management method as described in any one of claims 1 to 10 are implemented.

12. A large model file management device, characterized in that: include: Memory for storing computer programs; A processor, used to implement the steps of the pre-trained model file management method as described in any one of claims 1 to 10 when executing the computer program.

13. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the pre-trained model file management method according to any one of claims 1 to 10 are implemented.