Training method and device of file slicing model, equipment and medium

By establishing a file slicing model and using machine learning technology to dynamically adjust the shard size, we solve the problem of increased transmission time caused by unreasonable file slicing sizes in the existing technology, achieve more efficient and stable file transmission, and reduce the cost of transmission during the transmission process. Abnormal effects.

CN118540230APending Publication Date: 2024-08-23CHINA UNITED NETWORK COMM GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410591817.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-13
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing file slicing method has unreasonable slice sizes, which results in increased file transfer time, and the transfer fails when the network or device is abnormal, requiring the entire file to be re-uploaded, affecting transfer efficiency and stability.

Method used

By establishing a file slicing model, machine learning technology is used to dynamically adjust the slicing size based on file parameter information and network conditions, and the model is trained to optimize the slicing size to achieve dynamic slicing of file transmission, reduce abnormal effects during the transmission process, and improve transmission efficiency and stability. sex.

Benefits of technology

By dynamically adjusting the fragment size, the device performance and network bandwidth are fully utilized, the transmission time is shortened, the transmission success rate and stability are improved, and the defect of having to re-upload the entire file when fragment transmission fails is avoided, thereby improving the transmission efficiency and success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540230A
    Figure CN118540230A
Patent Text Reader

Abstract

The invention provides a training method and device of a file slicing model, equipment and a medium. Comprising the steps of obtaining parameter information and a target slice value of a sample file, and inputting the parameter information into a to-be-trained slice model to obtain a model slice value of the sample file; determining a slice error value of the sample file according to the model slice value and the target slice value; determining the iteration rate and the number of iterations of the to-be-trained model, and performing iteration of the number of iterations on the model parameters according to the iteration rate to obtain a slice error value after iteration; if the slice error value after iteration meets a preset threshold value requirement, determining the corresponding model parameter value as a target model parameter value; and determining a target slice model according to the target model parameter. Through the method provided by the invention, the influence of network and equipment abnormity on file slice uploading in the transmission process is reduced, the transmission stability and success rate are improved, the transmission efficiency is improved, and the transmission time is shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of file transmission, and in particular to a training method, device, equipment and medium for a file slicing model. Background Art

[0002] When the uploaded file size is large, the transmission process is easily affected by various problems, resulting in file upload failure, such as connection timeout or network interruption. At this time, it is necessary to upload the file in segments, that is, by dividing the large file into small file segments and uploading them in parallel, the file upload speed can be significantly improved.

[0003] In the current solution, the existing fragmented upload technology slices the file according to a fixed size, uploads the fragments after slicing, and merges them on the server after the transmission is completed to obtain a complete file.

[0004] However, the existing file slicing method has the problem that the file slice size is unreasonable, which leads to an increase in file transmission time. Summary of the invention

[0005] The present application provides a training method, device, equipment and medium for a file slicing model, so as to solve the problem that the existing file slicing method has unreasonable file slice size, resulting in increased file transmission time.

[0006] In a first aspect, the present application provides a method for training a file slicing model, the method comprising:

[0007] Obtain parameter information and target slice value of the sample file, and input the parameter information into the slice model to be trained to obtain the model slice value of the sample file;

[0008] Determine the slicing error value of the sample file according to the model slicing value and the target slicing value;

[0009] Determine the iteration rate and number of iterations of the model to be trained, and iterate the model parameters according to the iteration rate, to obtain the slice error value after the iteration;

[0010] If the slice error value after iteration meets the preset threshold requirement, the corresponding model parameter value is determined to be the target model parameter value;

[0011] According to the target model parameters, the target slice model is determined.

[0012] In the embodiment of the present application, determining the slicing error value of the sample file according to the model slicing value and the target slicing value includes:

[0013] Determine the slice loss function of the sample file according to the model slice value and the target slice value;

[0014] According to the slice loss function, the slice error value is determined.

[0015] In the embodiment of the present application, the iteration rate and the number of iterations of the model to be trained are determined, and the model parameters are iterated the number of iterations according to the iteration rate to obtain the slice error value after the iteration, including:

[0016] Determine the preset learning rate of the model to be trained and the derivative parameters of the model parameters;

[0017] Determine the iteration rate based on the preset learning rate and derivative parameters.

[0018] In the embodiment of the present application, if the slice error value after iteration meets the preset threshold requirement, determining the corresponding model parameter value as the target model parameter value includes:

[0019] Determine preset threshold requirements;

[0020] Among the slice error values ​​of the iteration number, a standard slice error value that meets a preset threshold requirement is determined;

[0021] Compare the values ​​of the standard slice error values, and determine the standard slice error value with the smallest value as the target slice error value according to the comparison result;

[0022] The model parameter value corresponding to the target slice error value is determined as the target model parameter value.

[0023] In the embodiment of the present application, after determining that the model parameter value corresponding to the target slice error value is the target model parameter value, the method further includes:

[0024] If the slice error value after iteration does not meet the preset threshold requirement, a new number of iterations is determined;

[0025] Re-execute the step of iterating the model parameters according to the iteration rate for the number of iterations to obtain the slice error value after the iteration, until the slice error value after the iteration meets the preset threshold requirement, then determine the corresponding model parameter value as the target model parameter value.

[0026] In the embodiment of the present application, after determining that the model parameter value corresponding to the target slice error value is the target model parameter value, the method further includes:

[0027] Determine the network layers of the slice model;

[0028] Delinearization is performed between adjacent network layers.

[0029] In the embodiment of the present application, after determining the target slice model according to the target model parameters, the method further includes:

[0030] Determine the file to be sliced, and input the file to be sliced ​​into the target slice model to obtain the slice value corresponding to the file to be sliced

[0031] Based on the slice value, slice the file to be sliced ​​to obtain the corresponding slice file;

[0032] Transfer the slice files.

[0033] In a second aspect, the present application provides a training device for a file slicing model, the device comprising:

[0034] An information acquisition module is used to obtain parameter information and target slice values ​​of a sample file, and input the parameter information into a slice model to be trained to obtain a model slice value of the sample file;

[0035] An error value determination module is used to determine a slice error value of a sample file according to a model slice value and a target slice value;

[0036] The iteration module is used to determine the iteration rate and iteration number of the model to be trained, and iterate the model parameters according to the iteration rate to obtain the slice error value after the iteration;

[0037] A parameter value determination module is used to determine the corresponding model parameter value as the target model parameter value if the slice error value after iteration meets the preset threshold requirement;

[0038] The model determination module is used to determine the target slice model according to the target model parameters.

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

[0040] Memory stores computer-executable instructions;

[0041] The processor executes the computer-executable instructions stored in the memory to implement the method of the present application.

[0042] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method of the present application.

[0043] The training method, apparatus, equipment and medium of the file slicing model provided in the present application obtain the parameter information and target slicing value of the sample file, and input the parameter information into the slicing model to be trained to obtain the model slicing value of the sample file; determine the slicing error value of the sample file according to the model slicing value and the target slicing value; determine the iteration rate and number of iterations of the model to be trained, and iterate the model parameters according to the iteration rate to obtain the slicing error value after the iteration; if the slicing error value after the iteration meets the preset threshold requirement, determine the corresponding model parameter value as the target model parameter value; determine the target slicing model according to the target model parameters.

[0044] In this way, by determining the slice error value between the model slice value output by the slice model and the target slice value of the file, the slice model is trained and the target model parameters are determined, so that the slice size corresponding to the file can be determined according to the target slice model, thereby realizing dynamic slicing of file transmission, reducing the impact of network and equipment abnormalities on file slice upload during transmission, improving the stability and success rate of transmission, improving transmission efficiency, and shortening transmission time. At the same time, when the slice transmission fails, only the slice needs to be retransmitted without re-uploading the entire file, thereby improving the stability and success rate of transmission. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0046] Figure 1 A flowchart of a training method for a file slicing model provided in an embodiment of the present application;

[0047] Figure 2 An application flow chart of a training method for a file slicing model provided in an embodiment of the present application;

[0048] Figure 3 A flowchart of another file slicing model training method provided in an embodiment of the present application;

[0049] Figure 4 A schematic diagram of the structure of a training device for a file slicing model provided in an embodiment of the present application;

[0050] Figure 5 This is a structural block diagram of a device for executing a training method for a file slicing model according to an embodiment of the present application.

[0051] The above-mentioned drawings have shown clear embodiments of the present application, which will be described in more detail below; these drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0052] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0053] The parameter information may be any parameter information that affects the file transfer process, including file size, network bandwidth, transfer time, device load rate, response speed, packet loss rate, and other information.

[0054] The slice model to be trained is used to determine the predicted slice value of the file. The slice model to be trained is trained according to the predicted slice value to obtain the target slice model, so as to output the slice value of the file to be sliced ​​according to the target slice model. File transfer based on the slice value can improve the file transfer rate and transfer performance; the slice model to be trained can be a neural network model with a 3-layer linear perception network structure.

[0055] The slice error value is used to characterize the error between the model slice value output by the model and the target slice value of the file. It can be in the form of a loss function. The loss function between the model slice value and the target slice value is determined by the mean square error (MSE-LOSS), thereby obtaining the slice error value. By subsequently reducing the slice error value, the difference between the model's prediction result and the true value can be made as small as possible, thereby improving the model's prediction accuracy and obtaining the target slice model.

[0056] The existing fragmented upload technology slices files according to a fixed size. If the fragment size is too small, too much fragment scheduling will cause performance overhead and increase the transmission time. If the fragment size is too large, when the network fluctuates or the device is abnormal, the large fragment retransmission will increase the transmission time. In addition, due to the differences in the performance of each transmission device and the different network conditions, the fixed fragment size cannot fully utilize the device performance and network bandwidth.

[0057] In order to solve the above problems, the embodiment of the present application proposes a training method for a file slicing model. By establishing a machine learning model, combining multiple factors such as network rate, device performance and load, file size, etc., the slicing size is dynamically adjusted through an algorithm to give full play to device performance and network bandwidth, thereby achieving the purpose of improving transmission efficiency and shortening transmission time.

[0058] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0059] Figure 1 A flowchart of a training method for a file slicing model provided in an embodiment of the present application. Figure 1 As shown, the training method of the file slicing model may include the following steps:

[0060] S110, obtaining parameter information and target slice value of the sample file, and inputting the parameter information into the slice model to be trained to obtain the model slice value of the sample file.

[0061] Among them, the sample file is a file used for model training, and the target slice value can be understood as a qualified slice value of the sample file, that is, slicing and transmitting the file according to the target slice value can improve the transmission rate.

[0062] Based on this, by determining the sample file and the corresponding target slicing value, and determining the model slicing value of the sample file by the slicing model to be trained, the slicing error value of the sample file can be determined subsequently according to the target slicing value and the model slicing value.

[0063] S120: Determine a slicing error value of the sample file according to the model slicing value and the target slicing value.

[0064] The slice error value can be in the form of a loss function. The loss function between the model slice value and the target slice value is determined by the mean square error, thereby obtaining the slice error value. The mean square error is a widely used indicator for evaluating prediction errors in regression problems, and the loss function is mainly used in the training phase of the model. After each batch of training data is fed into the model, the predicted value is output through forward propagation, and then the loss function calculates the difference between the predicted value and the true value, which is the loss value. After obtaining the loss value, the model updates each parameter through back propagation to reduce the loss between the true value and the predicted value, so that the predicted value generated by the model moves closer to the true value, thereby achieving the purpose of learning and training.

[0065] Based on this, by determining the slicing error value of the sample file, the model parameters are iterated, and the new slicing error value obtained after the iteration is determined, so as to reduce the loss between the model slicing value and the target slicing value, so as to determine the target model parameters corresponding to the slicing error value that meets the threshold requirements, thereby obtaining the target slicing model.

[0066] S130, determining the iteration rate and the number of iterations of the model to be trained, and iterating the model parameters according to the iteration rate by the number of iterations to obtain the slice error value after the iteration.

[0067] It can be understood that the slice error value represents the loss error between the model slice value output by the model and the target slice value. After iterating the model parameters, the slice error value will change with the change of the model slice value.

[0068] Based on this, by determining the iteration rate and number of iterations of the model, the model is iterated, and the slice error value corresponding to each iteration can be determined, so that the target model parameters can be determined from the model parameters corresponding to each iteration according to the slice error value of each iteration, so as to determine the target slice model.

[0069] S140: If the slice error value after iteration meets the preset threshold requirement, determine the corresponding model parameter value as the target model parameter value.

[0070] Among them, the preset threshold requirement is used to determine the standard slice error value that meets the threshold requirement from the slice error value after each iteration, so as to determine the target model parameter corresponding to the standard slice error value; it can be set by the user or determined by other means. For example, it can be set to 0.08, that is, if the slice error value obtained after the iteration is within 0.0.8, the model parameter corresponding to the iteration is determined to be the target model parameter.

[0071] Based on this, by comparing the slice error value after each iteration with the preset threshold requirement, the slice error value that meets the threshold requirement and its corresponding model parameter value are determined, so as to obtain the target model parameters, and determine the target slice model according to the target model parameters, so that the slice value output by the model can be closer to the target slice value of the sample file, thereby improving the prediction output capability of the model.

[0072] S150: Determine a target slice model according to target model parameters.

[0073] Based on this, by determining the target parameters of the model, the parameters are updated and the target slicing model is determined. The target slicing model can output model slicing values ​​that fit the target slicing values ​​and dynamically adjust the slicing size to give full play to the device performance and network bandwidth, so as to improve transmission efficiency and shorten transmission time.

[0074] Based on the feasible implementation of S120 above, the present application further provides a process of determining a slice error value between a model slice value and a target slice value by determining a loss function:

[0075] Determine the slice loss function of the sample file according to the model slice value and the target slice value;

[0076] According to the slice loss function, the slice error value is determined.

[0077] Among them, the slice loss function is a loss function used to fit the error between the model slice value and the target slice value. The loss function is a function of the model parameters. In applications, the loss function is usually associated with the optimization problem as a learning criterion, that is, the model can be solved and evaluated by determining the minimum value of the loss function.

[0078] Based on this, by determining the loss function between the model slice value and the target slice value, the slice error value of the two can be determined.

[0079] Based on the feasible implementation of S130 above, the present application further provides a process for determining the iteration rate during model iteration according to the learning rate of the model and the derivative parameters of the parameters:

[0080] Determine the preset learning rate of the model to be trained and the derivative parameters of the model parameters;

[0081] Determine the iteration rate based on the preset learning rate and derivative parameters.

[0082] Among them, the iteration rate can be determined by the gradient descent method; the gradient descent method is used to minimize the loss function (i.e., error) when training a machine learning model. The goal of the gradient descent method is to determine the minimum point of the loss function, that is, to minimize the loss function by updating the model parameters of the model, thereby improving the model's predictive output capability and making the model's output value closer to the target value.

[0083] The learning rate and derivative parameters are used to determine the iteration rate of the model iteration. The learning rate can be set by the user. The learning rate can be understood as controlling the step size of each iteration. A learning rate that is too small will lead to slow convergence, and a learning rate that is too large will cause the algorithm to diverge. It can be initialized to 0.01; the derivative parameter is the result of differentiating the model parameters, which can be the derivative of all model parameters, thereby determining the minimum value of the loss function at this iteration.

[0084] Based on this, by determining the learning rate and derivative parameters, the iteration rate of the model can be determined, so that the model can be iterated according to the iterations later and the corresponding slice error value can be obtained at each iteration.

[0085] Based on the feasible implementation of S150 above, the present application further provides a process of determining the slice value corresponding to the file to be sliced ​​according to the target slice model, and transmitting the slice file:

[0086] Determine the file to be sliced, and input the file to be sliced ​​into the target slice model to obtain the slice value corresponding to the file to be sliced

[0087] Based on the slice value, slice the file to be sliced ​​to obtain the corresponding slice file;

[0088] Transfer the slice files.

[0089] Among them, the file to be sliced ​​is the file that needs to be transmitted. By determining the slice value of the file to be sliced, the file can be sliced ​​and uploaded, thereby improving the transmission efficiency and shortening the transmission time.

[0090] Based on this, the slice value of the file to be sliced ​​is determined through the target slice model, so that the file is sliced ​​and uploaded to achieve efficient file transmission.

[0091] See also Figure 2 , Figure 2 The application flow chart of a training method for a file slicing model provided in an embodiment of the present application is as follows: Figure 2 As shown in the figure, in the actual application process, the parameter information of the file can be determined, such as file size, network bandwidth, transmission time, device load rate, response speed, and packet loss rate, and machine learning modeling can be performed. The parameter information is collected as samples to train the model; for example, 10,000 pieces of parameter information are collected as samples, of which 8,000 are used as training samples. 2,000 are used as validation sets. The 8,000 training samples are brought into the model, iterated for 5,000 times, and the full validation set is used for validation every 100 times. The model is saved every 1,000 times. After the training is completed, the loss of the optimal model is within 0.08, and the training is qualified, which is used as the final shard size. If the model does not achieve the best performance, repeat the above steps.

[0092] In this embodiment, in order to dynamically determine the appropriate slice size during file transfer, thereby giving full play to the device performance and network bandwidth and achieving the goal of improving transmission efficiency and shortening transmission time, the slice model to be trained can be determined, and the model slice value output by the model can be obtained according to the parameter information of the sample file. Then, according to the model slice value and the target slice value of the sample file, the slice error value between the two can be determined in the form of a loss function, and the minimum value of the loss function can be determined by the gradient descent method, that is, the slice error value that meets the preset threshold requirement, so as to determine the model parameters corresponding to the minimum loss function value as the target model parameters, and obtain the target slice model.

[0093] In this way, the problem of unreasonable file slice size in the existing file slicing method, which leads to increased file transmission time, is solved, the impact of network and device abnormalities on file slice uploading during the transmission process is reduced, the stability and success rate of transmission are improved, the transmission efficiency is improved, and the transmission time is shortened. The model dynamically adjusts the slice size to give full play to the device performance and network bandwidth, so as to achieve the purpose of improving transmission efficiency and shortening transmission time.

[0094] Figure 3 A flowchart of another file slicing model training method provided in an embodiment of the present application. Figure 3 As shown, the training method of the file slicing model may include the following steps:

[0095] S310: Obtain parameter information and target slice value of the sample file, and input the parameter information into the slice model to be trained to obtain the model slice value of the sample file.

[0096] S320: Determine a slicing error value of the sample file according to the model slicing value and the target slicing value.

[0097] S330, determining the iteration rate and number of iterations of the model to be trained, and iterating the model parameters according to the iteration rate by the number of iterations to obtain the slice error value after the iteration.

[0098] In this embodiment, the specific implementation of step S310 to step S330 can refer to the content of the above-mentioned embodiment, which will not be repeated here.

[0099] S340: Determine a preset threshold requirement.

[0100] The preset threshold requirement may be set to 0.08, that is, if the slice error value is within 0.08, the slice error value is determined to be the target slice error value.

[0101] Based on this, by determining a preset threshold requirement, the slicing error value obtained in each iteration is used to determine a standard slicing error value that meets the threshold requirement.

[0102] S350 . Determine, among the slice error values ​​of the iteration number, a standard slice error value that meets a preset threshold requirement.

[0103] Based on this, by comparing the slice error value after each iteration with the preset threshold requirement, the slice error value that meets the threshold requirement is determined.

[0104] S360, comparing the values ​​of the standard slice error values, and determining the standard slice error value with the smallest value as the target slice error value according to the comparison result.

[0105] Based on this, each time the model parameters are iterated, the slice error value of this iteration will be obtained. Within the number of iterations, if there is more than one standard slice error value that meets the preset threshold requirements, the minimum value of the loss function can be determined by comparing the numerical values ​​of all standard slice error values ​​and determining the standard slice error value with the smallest value as the target slice error value.

[0106] S370. Determine the model parameter value corresponding to the target slice error value as the target model parameter value.

[0107] Based on this, the target model parameters and the target slice model are determined by determining the model parameter values ​​corresponding to the target slice error values.

[0108] S380: Determine a target slice model according to target model parameters.

[0109] In this embodiment, the specific implementation of step S380 can refer to the content of the above-mentioned embodiment, which will not be repeated here.

[0110] Based on the feasible implementation of S370 above, the present application further provides a process of repeating the model iteration if the slice error value after iteration does not meet the preset threshold requirement:

[0111] If the slice error value after iteration does not meet the preset threshold requirement, a new number of iterations is determined;

[0112] Re-execute the step of iterating the model parameters according to the iteration rate for the number of iterations to obtain the slice error value after the iteration, until the slice error value after the iteration meets the preset threshold requirement, then determine the corresponding model parameter value as the target model parameter value.

[0113] The new number of iterations may be the original number of iterations or a newly determined number of iterations.

[0114] Based on this, if the slice error value after iteration does not meet the preset threshold requirement, the model parameters are iterated again according to the new number of iterations until the target slice error value that meets the preset threshold requirement is obtained, and the corresponding target model parameters are determined.

[0115] Based on the feasible implementation of S370 above, the present application further provides a process of delinearizing the network layers of the slice model:

[0116] Determine the network layers of the slice model;

[0117] Delinearization is performed between adjacent network layers.

[0118] Among them, delinearization can be done by using activation functions between each layer to make the interpretation ability stronger after spatial transformation. Normalization is followed by the activation function to make the distribution concentrated in the (0,1) interval. The advantage of this is that after the distribution is concentrated, the convergence of the model is accelerated and the gradient explosion caused by excessive values ​​is avoided.

[0119] In this embodiment, in order to determine the target slice error value in the slice error value obtained in each iteration, and thus determine the target model parameters and the target slice model according to the target slice error value, a standard slice error value that meets the threshold requirement can be determined through a preset threshold requirement. If there is more than one standard slice error value, the standard slice error value with the smallest error value is determined as the target slice error value. If there is no slice error value that meets the threshold requirement within the number of iterations, a new number of iterations is determined, and the model is repeatedly iterated until an error value that meets the threshold requirement is obtained.

[0120] In this way, by determining the target slice error value that meets the preset threshold requirements, the corresponding model parameters can be determined, thereby determining the target slice model, thereby improving the model's predictive output capability and making the model's output value closer to the target value.

[0121] Figure 4 A structural diagram of a file slicing model training device 400 provided in an embodiment of the present application, such as Figure 4 As shown, the training device 400 for the file slicing model includes: an information acquisition module 410, an error value determination module 420, an iteration module 430, a parameter value determination module 440 and a model determination module 450.

[0122] The information acquisition module 410 is used to acquire parameter information and target slice values ​​of the sample file, and input the parameter information into the slice model to be trained to obtain the model slice value of the sample file;

[0123] The error value determination module 420 is used to determine the slice error value of the sample file according to the model slice value and the target slice value;

[0124] Iteration module 430, used to determine the iteration rate and iteration number of the model to be trained, and iterate the model parameters according to the iteration rate, to obtain the slice error value after the iteration;

[0125] A parameter value determination module 440 is used to determine the corresponding model parameter value as a target model parameter value if the slice error value after iteration meets the preset threshold requirement;

[0126] The model determination module 450 is used to determine the target slice model according to the target model parameters.

[0127] In the embodiment of the present application, the error value determination module 420 may also be specifically used for:

[0128] Determine the slice loss function of the sample file according to the model slice value and the target slice value;

[0129] According to the slice loss function, the slice error value is determined.

[0130] In the embodiment of the present application, the iteration module 430 may also be specifically used for:

[0131] Determine the preset learning rate of the model to be trained and the derivative parameters of the model parameters;

[0132] Determine the iteration rate based on the preset learning rate and derivative parameters.

[0133] In the embodiment of the present application, the parameter value determination module 440 may also be specifically used for:

[0134] Determine preset threshold requirements;

[0135] Among the slice error values ​​of the iteration number, a standard slice error value that meets a preset threshold requirement is determined;

[0136] Compare the values ​​of the standard slice error values, and determine the standard slice error value with the smallest value as the target slice error value according to the comparison result;

[0137] The model parameter value corresponding to the target slice error value is determined as the target model parameter value.

[0138] In the embodiment of the present application, the parameter value determination module 440 may also be specifically used for:

[0139] If the slice error value after iteration does not meet the preset threshold requirement, a new number of iterations is determined;

[0140] Re-execute the step of iterating the model parameters according to the iteration rate for the number of iterations to obtain the slice error value after the iteration, until the slice error value after the iteration meets the preset threshold requirement, then determine the corresponding model parameter value as the target model parameter value.

[0141] In the embodiment of the present application, the parameter value determination module 440 may also be specifically used for:

[0142] Determine the network layers of the slice model;

[0143] Delinearization is performed between adjacent network layers.

[0144] In the embodiment of the present application, the training device 400 of the file slicing model can also be specifically used for:

[0145] Determine the file to be sliced, and input the file to be sliced ​​into the target slice model to obtain the slice value corresponding to the file to be sliced

[0146] Based on the slice value, slice the file to be sliced ​​to obtain the corresponding slice file;

[0147] Transfer the slice files.

[0148] Figure 5 This is a schematic diagram of the structure of the device provided in the embodiment of the present application. Figure 5 As shown, the device 500 includes:

[0149] The device 500 may include a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a communication component 503 and other components. The processor 501 , the memory 502 and the communication component 503 are connected via a bus 504 .

[0150] In a specific implementation process, at least one processor 501 executes the computer execution instructions stored in the memory 502, so that at least one processor 501 executes the above message processing method.

[0151] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0152] In the above Figure 5 In the illustrated embodiment, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the present application may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.

[0153] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.

[0154] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.

[0155] In some embodiments, a computer program product is also proposed, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the above-mentioned file slicing model training methods.

[0156] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0157] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0158] To this end, an embodiment of the present application provides a computer-readable storage medium, which stores multiple computer execution instructions, and the computer execution instructions can be loaded by a processor to execute the steps in any file slicing model training method provided in the embodiment of the present application.

[0159] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0160] According to one aspect of the present application, a computer program product or a computer program is provided. The computer program product or the computer program comprises computer instructions stored in a computer-readable storage medium.

[0161] Since the instructions stored in the storage medium can execute the steps in the training method of any file slicing model provided in the embodiments of the present application, the beneficial effects that can be achieved by the training method of any file slicing model provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0162] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

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

Claims

1. A training method for a file slicing model, characterized in that: The method comprises: Obtain parameter information and target slice value of the sample file, and input the parameter information into the slice model to be trained to obtain the model slice value of the sample file; Determining a slicing error value of the sample file according to the model slicing value and the target slicing value; Determine the iteration rate and the number of iterations of the model to be trained, and iterate the model parameters for the number of iterations according to the iteration rate to obtain the slice error value after the iteration; If the slice error value after the iteration meets the preset threshold requirement, the corresponding model parameter value is determined to be the target model parameter value; A target slice model is determined according to the target model parameters.

2. The method according to claim 1, characterized in that The step of determining the slicing error value of the sample file according to the model slicing value and the target slicing value includes: Determining a slice loss function of the sample file according to the model slice value and the target slice value; The slice error value is determined according to the slice loss function.

3. The method according to claim 1, characterized in that: The step of determining an iteration rate and an iteration number of the model to be trained, and iterating the model parameters for the iteration number according to the iteration rate to obtain the slice error value after the iteration includes: Determining a preset learning rate of the model to be trained and derivative parameters of the model parameters; The iteration rate is determined according to the preset learning rate and derivative parameters.

4. The method according to claim 1, characterized in that: If the slice error value after the iteration meets the preset threshold requirement, determining the corresponding model parameter value as the target model parameter value includes: Determining the preset threshold requirement; Determining a standard slicing error value that meets the preset threshold requirement among the slicing error values ​​of the iteration number; Comparing the values ​​of the standard slicing error values, and determining the standard slicing error value with the smallest value as the target slicing error value according to the comparison result; A model parameter value corresponding to the target slice error value is determined as the target model parameter value.

5. The method according to claim 4, characterized in that After determining that the model parameter value corresponding to the target slice error value is the target model parameter value, the method further includes: If the slice error value after the iteration does not meet the preset threshold requirement, determining a new number of iterations; The step of iterating the model parameters the number of times according to the iteration rate to obtain the slice error value after the iteration is re-executed until the slice error value after the iteration meets the preset threshold requirement, and then determining the corresponding model parameter value as the target model parameter value.

6. The method according to claim 4, characterized in that After determining that the model parameter value corresponding to the target slice error value is the target model parameter value, the method further includes: Determining a network layer of the slice model; Delinearization is performed between adjacent network layers.

7. The method according to claim 1, characterized in that After determining the target slice model according to the target model parameters, the method further includes: Determine the file to be sliced, and input the file to be sliced ​​into the target slice model to obtain the slice value corresponding to the file to be sliced Based on the slicing value, slicing the file to be sliced ​​to obtain a corresponding slicing file; The slice file is transferred.

8. A training device for a file slicing model, characterized in that: The device comprises: An information acquisition module is used to acquire parameter information and target slice values ​​of a sample file, and input the parameter information into a slice model to be trained to obtain a model slice value of the sample file; An error value determination module, used to determine a slice error value of the sample file according to the model slice value and the target slice value; An iteration module, used to determine the iteration rate and the number of iterations of the model to be trained, and iterate the model parameters for the number of iterations according to the iteration rate to obtain the slice error value after the iteration; A parameter value determination module, used for determining the corresponding model parameter value as a target model parameter value if the slice error value after the iteration meets the preset threshold requirement; The model determination module is used to determine the target slice model according to the target model parameters.

9. A device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, which can be called by a processor to execute the method according to any one of claims 1 to 7.