Model parameter adjustment method, device and equipment, readable storage medium and product

By obtaining the feature change information of the initial model, adjusting and generating parameter update files, the problem of inefficiency in model update is solved, efficient update and reuse of model parameters is achieved, and the efficiency and accuracy of model optimization iterations are improved.

CN118535995APending Publication Date: 2024-08-23XINGIN INFORMATION TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing technology requires training from scratch when updating the model, resulting in low efficiency. Especially after the initial model has been trained for a long time, the cold start method requires clearing the existing parameters and retraining, resulting in reduced model update efficiency.

Method used

By obtaining the characteristic change information of the initial model, determine the change position of the changed parameters, perform adjustment processing, generate a parameter update file, and load the file in the target model for hot start, reusing the unchanged parameters in the initial model.

Benefits of technology

It improves the efficiency of model update, avoids repeated training steps, and directly updates the model based on the adjusted parameters, improving the efficiency and accuracy of model optimization iterations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535995A
    Figure CN118535995A
Patent Text Reader

Abstract

The embodiment of the invention discloses a model parameter adjustment method and device, equipment, a readable storage medium and a product, and the method comprises the steps: obtaining feature change information; the characteristic change information is used for reflecting dimension change of input characteristics of the initial model; determining a change position of the initial model for a change parameter of the characteristic change information based on the characteristic change information; the change position refers to the position where the dimension of the change parameter changes; adjusting the change parameter at the change position to obtain an adjusted parameter; generating a parameter updating file based on the adjustment parameter, and loading the parameter updating file in a target model to warm start the target model; the target model is used for multiplexing unchanged parameters in the initial model. By adopting the embodiment of the invention, the model updating efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, specifically to the field of artificial intelligence technology, and in particular to a model parameter adjustment method, device, equipment, readable storage medium and product. Background Art

[0002] Models are required for business processing in many scenarios, such as using models for search or recommendation. Since business needs are constantly changing, it is necessary to update the existing initial model online to improve business indicators, so that the business processing effect can be improved when using the updated target model for search, recommendation and other business processing.

[0003] Usually, when optimizing and updating the initial model, the initial model is cold-started, that is, the parameters in the online initial model are cleared and the initial model is trained from scratch to obtain the target model, so that the target model is used for business processing such as search and recommendation. Since the initial model has been trained for a long time before going online, the parameters in the initial model have been fully learned, and the cold-start method requires clearing the learned parameters in the initial model and retraining to obtain the target model, which reduces the efficiency of model update. Summary of the invention

[0004] The embodiments of the present application provide a model parameter adjustment method, device, equipment, readable storage medium and product, which can improve the model update efficiency.

[0005] In a first aspect, the present application provides a model parameter adjustment method, comprising:

[0006] Obtain feature change information; the feature change information is used to reflect the dimensional changes of the input features of the initial model;

[0007] Determine, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information; the change position refers to a position where a dimension of the change parameter changes;

[0008] Adjusting the change parameter at the change position to obtain an adjustment parameter;

[0009] A parameter update file is generated based on the adjustment parameters, and the parameter update file is loaded in the target model to hot start the target model; the target model is used to reuse the unchanged parameters in the initial model.

[0010] In a second aspect, the present application provides a model parameter adjustment device, comprising:

[0011] An information acquisition unit, used to acquire feature change information; the feature change information is used to reflect the dimensional change of the input features of the initial model;

[0012] A position determination unit, configured to determine, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information; the change position refers to a position where a dimension of the change parameter changes;

[0013] A parameter adjustment unit, used for adjusting the change parameter at the change position to obtain an adjustment parameter;

[0014] The model updating unit is used to generate a parameter updating file based on the adjustment parameters, and load the parameter updating file in the target model to hot start the target model; the target model is used to reuse the unchanged parameters in the initial model.

[0015] In a third aspect, the present application provides a computer device, including: a processor, a memory, and a network interface;

[0016] The above-mentioned processor is connected to the memory and the network interface, wherein the network interface is used to provide data communication function, the above-mentioned memory is used to store computer program code, and the above-mentioned processor is used to call the above-mentioned computer program code so that the computer device containing the processor executes the above-mentioned model parameter adjustment method.

[0017] In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded and executed by a processor so that a computer device having the processor executes the above-mentioned model parameter adjustment method.

[0018] In a fifth aspect, the present application provides a computer program product or a computer program, which includes computer instructions. When the computer instructions are executed by a processor, they implement the model parameter adjustment method provided in the various optional methods in the first aspect of the present application.

[0019] In the embodiment of the present application, feature change information is obtained; the feature change information is used to reflect the dimensional change of the input features of the initial model; based on the feature change information, the change position of the change parameter of the initial model for the feature change information is determined; the change position refers to the position where the dimension of the change parameter changes; the change parameter at the change position is adjusted to obtain the adjustment parameter; a parameter update file is generated based on the adjustment parameter, and the parameter update file is loaded in the initial model to obtain the target model. Since only the changed parameters need to be adjusted, the target model is updated based on the adjusted parameters without training the target model from scratch, that is, when loading the parameter update file, it is equivalent to reusing the unchanged parameters in the initial model, thereby improving the model update efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 It is a network architecture diagram of a model parameter adjustment system provided in an embodiment of the present application;

[0022] Figure 2 It is a flow chart of a model parameter adjustment method provided in an embodiment of the present application;

[0023] Figure 3 It is a flowchart of another model parameter adjustment method provided in an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of a scenario for adjusting model parameters provided in an embodiment of the present application;

[0025] Figure 5 It is a schematic diagram of the composition structure of a model parameter adjustment device provided in an embodiment of the present application;

[0026] Figure 6 It is a schematic diagram of the composition structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0028] The technical solution of the present application can be applied to the scenario where the initial model is updated to obtain the target model. For example, it can be applied to the scenarios of model optimization and update in various scenarios, such as the video heat prediction model, which can be used to predict the heat of the video. By updating the video heat prediction model, the efficiency and accuracy of the video heat prediction model in predicting the heat of the video can be improved. Or it can also be applied to the note click prediction model, which can be used to predict whether a user will click on a certain note. By updating the note click prediction model, the efficiency and accuracy of the note click prediction model in making predictions can be improved. The embodiments of the present application can also be applied to other scenarios where model updates are required, and the embodiments of the present application are not limited to this.

[0029] It is understandable that the collection, use and processing of relevant data (such as feature change information, change parameters, initial configuration files, target configuration files, etc.) involved in the embodiments of the present application require the consent of the corresponding personal information subject and must comply with the provisions of relevant laws and regulations.

[0030] Please refer to Figure 1 , Figure 1 is a network architecture diagram of a model parameter adjustment system provided in an embodiment of the present application, such as Figure 1 As shown, the computer device can exchange data with the terminal device, and the number of the terminal devices can be one or at least two. For example, when the number of the terminal devices is multiple, the terminal device may include Figure 1 The terminal device 101a, the terminal device 101b and the terminal device 101c, etc. Among them, taking the terminal device 101a as an example, the computer device 102 can obtain the feature change information, and determine the change position of the change parameter of the initial model for the feature change information based on the feature change information. Further, the computer device 102 can adjust the change parameter at the change position to obtain the adjustment parameter; generate a parameter update file based on the adjustment parameter, and load the parameter update file in the initial model to obtain the target model. Optionally, the computer device 102 can also obtain video data from the terminal device 101a, predict the heat of the video data based on the target model, and send the heat prediction result for the video data to the terminal device 101a, so that the terminal device 101a performs corresponding processing on the video data based on the heat prediction result, for example, encoding the video data using a corresponding video encoding method based on the heat prediction result of the video data, and so on.

[0031] The computer device mentioned in the embodiments of the present application may refer to a server or a terminal device, or may also be a system composed of a server and a terminal device, which is not limited in the embodiments of the present application. The terminal device may be an electronic device, including but not limited to a mobile phone, a tablet computer, a laptop computer, a vehicle-mounted device, etc. The server mentioned above may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, and big data and artificial intelligence platforms.

[0032] For further information, see Figure 2 , Figure 2 is a flow chart of a model parameter adjustment method provided in an embodiment of the present application; Figure 2 As shown, the model parameter adjustment method can be applied to a computer device, and the model parameter adjustment method includes but is not limited to the following steps:

[0033] S101, obtaining feature change information.

[0034] The technical solution of the present application can be applied to the scenario of optimizing and iterating models in various scenarios. Take the scenario of optimizing and iterating models in various scenarios as an example for explanation. For example, by optimizing and iterating the video heat prediction model through the technical solution of the present application, the iteration efficiency of the video heat prediction model can be improved. And because in the process of optimizing and iterating the video heat prediction model, some features that are irrelevant to the prediction results of the video heat prediction model can be screened out from the input features of the model, the efficiency and accuracy of subsequent video heat prediction can be improved. Or, for example, by optimizing and iterating the note click prediction model through the technical solution of the present application, the iteration efficiency of the note click prediction model can be improved. And because in the process of optimizing and iterating the note click prediction model, some features that are irrelevant to the prediction results of the note click prediction model can be screened out from the input features of the model, the efficiency and accuracy of subsequent note click prediction can be improved. The embodiments of the present application can also be applied to other scenarios where models need to be used for data processing. By iteratively training the models in various scenarios, the use efficiency of the models in various scenarios can be improved, and the iteratively optimized models in various scenarios can be hot-started by the method in the embodiments of the present application, which can improve the model training efficiency.

[0035] In the embodiments of the present application, optimization and iteration of the model is taken as an example to illustrate. The model mentioned in the embodiments of the present application may refer to models in various application scenarios, that is, the model here may refer to a synonym, and the model in any application scenario can adopt the method proposed in the technical solution of the present application to perform model optimization and iteration.

[0036] In one scenario, there are a lot of model iterations in search, advertising, recommendation and other businesses, and the existing initial models (old models) need to be continuously optimized and iterated to improve business indicators. Since the existing initial models have been trained for a long time, the parameters of the existing initial models have been fully learned. Compared with the cold start, the existing initial models have great advantages. If the new target model (new model) cannot use these parameters, even if the cold start determines that the model update effect is better, the target model will not be able to catch up with the level of the existing initial models in the short term. The target model refers to the initial model after optimization and iteration.

[0037] Since the model input features and model structure are often changed during the model optimization iteration process, the dimensions of the network parameters in the model will change. The parameter change file of the initial model cannot be directly loaded by the target model due to inconsistent parameter dimensions. In the early stage, when the model is relatively lightweight, the parameters of the model Embedding layer (the network layer that performs high-dimensional spatial mapping of the sparse features of the model) will be retained, and the dense network part after the Embedding layer of the model will be retrained using the initial parameter change file that has been trained for a long time so that it can catch up with the indicators of the online initial model. In the case of a simple model structure, the parameters in the parameter change file will be manually modified according to the changes in the model parameters (such as deleting parameter dimensions and inserting new parameter dimensions), retaining the information learned by the online initial model, so that the new target model can catch up with the indicators faster. However, as the model becomes larger and the structure becomes more complex, retraining the new model requires a lot of training resources and a long time to track data. In addition, the complex and changeable structure causes the dimensional changes involved in the feature changes to be scattered in various variables. Manually calculating the dimensional changes of the parameters and manually modifying them becomes very cumbersome and error-prone.

[0038] In view of this, the embodiment of the present application provides a model parameter adjustment method for a new model, which can be applied to the situation where the model network parameter dimension changes after the model feature or structure changes, and the old model cannot be directly loaded for hot start. By obtaining the feature change information for the model, the change position of the change parameter of the model for the feature change information is determined based on the feature change information, so that the change parameter can be adjusted, and a parameter update file can be generated based on the adjusted change parameter, and then the parameter update file can be loaded in the model to obtain the target model, which is equivalent to directly hot starting the model. Since the hot start model only needs to adjust the change parameters in the initial model, there is no need to clear the parameters in the initial model and reuse a large amount of sample data to train the model, so the efficiency of model optimization iteration can be improved. Among them, hot start can refer to adjusting the parameters that need to be adjusted directly on the basis of the existing parameters without clearing the existing parameters in the initial model, and reusing the parameters that do not need to be adjusted in the existing parameters, and loading the adjusted parameters and the parameters that do not need to be adjusted to achieve model update. Compared with the cold start that requires clearing the existing parameters in the model and retraining, hot start can improve the efficiency of model update.

[0039] In an embodiment of the present application, a computer device may obtain feature change information. Among them, the feature change information is used to reflect the dimensional changes of the input features of the initial model. The initial model may refer to a model that needs to be iteratively updated, for example, it may refer to an existing online model, or it may refer to an application that needs to use an existing online model for data processing, etc. The embodiment of the present application uses a model as an example to illustrate. The initial model may include multiple parameters, and the parameters may refer to variables that perform operations on the feature coding layer of the initial model or process the input features. For example, the input features can be mapped to specified feature dimensions through network variables in the feature coding layer, so that the subsequent initial model can process the input features. Among them, the initial model may include multiple feature coding layers, each feature coding layer may include one or more parameters, and the parameters included in each feature coding layer may be different.

[0040] In an embodiment of the present application, due to a change in the dimension of the input features of the initial model, such as an increase or decrease in the dimension of the input features, the input features after the dimension change are input into the initial model, and the parameters in the network structure in the initial model need to be adaptively changed, so as to achieve corresponding processing of the input features after the dimension change. In an embodiment of the present application, by determining the feature change information corresponding to the change in the input features of the initial model, the change in the parameters in the network structure of the initial model caused by the input features of the initial model is determined, so as to adjust the changed parameters, and then load the adjusted parameters in the initial model to obtain the target model.

[0041] Among them, the variable parameter refers to the parameter whose dimension changes. The variable parameter is used to map the feature dimension of the input feature to the feature dimension specified by the feature encoding layer of the initial model. The dimension change of the variable parameter is determined based on the feature dimension change of the input feature. For example, if the feature dimension of the input feature increases, the dimension of the variable parameter increases, so that the input feature with increased feature dimension can be mapped to the feature dimension specified by the feature encoding layer of the initial model using the variable parameter.

[0042] In the embodiment of the present application, when the computer device obtains the characteristic change information, it can obtain it in the following ways:

[0043] In the first way, the computer device can automatically compare the initial configuration file of the initial model with the target configuration file of the target model to determine the feature change information. Specifically, the initial configuration file of the initial model can be obtained; the initial configuration file is used to indicate the input features of the initial model; the target configuration file of the target model is obtained; the target configuration file is used to indicate the input features of the target model; the initial configuration file and the target configuration file are compared and processed to determine the difference between the initial configuration file and the target configuration file, and based on the difference between the initial configuration file and the target configuration file, the change feature is determined; the feature attribute information of the change feature is obtained, and the feature attribute information of the change feature is determined as the feature change information. Among them, the feature attribute information of the change feature includes at least one of the following: feature identification of the change feature, feature mapping dimension of the change feature, feature order of the change feature, and feature change type of the change feature. The feature mapping dimension of the change feature is obtained by mapping the change feature based on the feature coding layer in the initial model, and the feature order of the change feature refers to the feature arrangement order of the change feature in the initial configuration file.

[0044] In an embodiment of the present application, an initial configuration file may refer to a file used to reflect the input features of an initial model. For example, the initial configuration file may include information such as feature identifiers of all input features used by the initial model, feature dimensions of all input features mapped through the feature coding layer of the initial model, and the like. A target configuration file may refer to a file used to reflect the input features of a target model. For example, a target configuration file may include information such as feature identifiers of all input features used by the target model, feature dimensions of all input features mapped through the feature coding layer of the target model, and the like. The feature identifier of an input feature may refer to, for example, a feature name or feature number of the input feature, and the like.

[0045] Further, the comparison process of the initial configuration file and the target configuration file may refer to: comparing whether there is a feature identifier in the target configuration file that is the same as the feature identifier of any feature in the initial configuration file. If there is no feature identifier in the target configuration file that is the same as the feature identifier of any feature in the initial configuration file, it can be determined that there is a difference between the initial configuration file and the target configuration file, for example, the any feature can be determined as a changed feature. Alternatively, if there is a feature identifier in the target configuration file that is the same as the feature identifier of any feature in the initial configuration file, it can be further compared whether the feature dimensions of any feature in the initial configuration file and the corresponding feature in the target configuration file are the same. If the feature dimensions of any feature are not the same, the any feature can be determined as a changed feature. The feature identifier of the changed feature may include but is not limited to the feature name, feature number and other information of the changed feature. The feature change type of the changed feature may include but is not limited to types such as addition or deletion. The added type of changed feature may indicate a feature that does not exist in the initial configuration file and exists in the target configuration file, that is, a newly added feature. The deleted type of changed feature may indicate a feature that exists in the initial configuration file and does not exist in the target configuration file, that is, a deleted feature. By comparing the changed features in the two configuration files, information such as the feature identifier of the changed feature, the feature mapping dimension of the changed feature, the feature sequence of the changed feature, and the feature change type of the changed feature can be found in the initial configuration file.

[0046] In this way, by comparing the difference between the initial configuration file and the target configuration file, the changed features for the initial model can be determined. For example, it can be determined which input features of the initial model are deleted or added based on the initial model, so that the changed features, that is, the deleted features or the added features, can be obtained, and then the feature attribute information of the changed features can be obtained, and the feature attribute information of the changed features can be determined as feature change information. Since the difference between the two model files can be automatically compared, the changed features can be accurately determined, thereby improving the accuracy of the feature change information.

[0047] In the second way, the computer device can specify the change information through the user, and the user can refer to the user of the terminal device. Specifically, the feature identifier of the input feature is obtained; from the initial configuration file of the initial model, the feature identifier that matches the feature identifier of the input feature is determined as the change feature identifier; the feature indicated by the change feature identifier is the change feature; the feature attribute information of the change feature is obtained, and the feature attribute information of the change feature is determined as the feature change information. Among them, the feature attribute information of the change feature includes at least one of the following: the feature identifier of the change feature, the feature mapping dimension of the change feature, the feature order of the change feature, and the feature change type of the change feature. The feature mapping dimension of the change feature is obtained by mapping the change feature based on the feature coding layer in the initial model, and the feature order of the change feature refers to the feature arrangement order of the change feature in the initial configuration file.

[0048] In an embodiment of the present application, the feature identifier of the input feature may, for example, refer to a feature identifier input by a user on a client, the client may be installed on a terminal device, and the user may be embodied as a user account on the client, and the changed feature may be determined from the initial configuration file by the feature identifier input by the user on the client. The feature identifier that matches the feature identifier of the input feature may refer to a feature identifier that is the same as the feature identifier of the input feature, or a feature identifier that is similar to the feature identifier of the input feature. For example, when there are multiple feature identifiers in the initial configuration file whose first-level classification names are the same as the first-level classification names of the input feature, the multiple feature identifiers may all be determined as changed feature identifiers. Alternatively, a selection instruction for multiple feature identifiers may be obtained, and a changed feature identifier may be further selected from the multiple feature identifiers.

[0049] Optionally, the computer device can match the changed feature from the initial configuration file according to the feature identifier of the input feature, so that the feature identifier of the changed feature, the feature mapping dimension of the changed feature, the feature order of the changed feature, the feature change type of the changed feature and other information can be found in the initial configuration file. The feature change type of the changed feature can be input by the user or determined from the initial configuration file. For example, if the feature identifier of the changed feature does not exist in the initial configuration file, it can be determined that the feature change type of the changed feature is a newly added type.

[0050] In this way, the user specifies newly added features or deleted features, which can be applicable to situations where the input features change little, so as to quickly determine the changed features, that is, the deleted features or the added features, and then obtain the feature attribute information of the changed features, and determine the feature attribute information of the changed features as feature change information.

[0051] S102, determining the change position of the change parameter of the initial model corresponding to the feature change information based on the feature change information.

[0052] In an embodiment of the present application, by determining the feature change information, the change position of the change parameter of the initial model for the feature change information can be determined based on the feature change information. The change position refers to the position where the dimension of the change parameter changes. The change parameter refers to the parameter whose dimension has changed in the initial model. The parameter may refer to a variable in a network layer in the model, and the change parameter may specifically be a variable whose dimension has changed in the network layer in the model. Since the variable may be multi-dimensional, the same variable may change in any one or more dimensional positions in the multi-dimensionality. By determining the position of the dimension where the change parameter has changed, the parameter can be adjusted in the dimension, and then the adjusted parameter can be obtained, so that the adjusted parameter is loaded in the target model.

[0053] In one embodiment, the computer device can determine the change position of the change parameter of the feature change information in combination with the feature sequence of multiple input features of the initial model. Specifically, the feature grouping information of multiple input features of the initial model can be obtained; the feature grouping information of the multiple input features includes the feature attribute information of the multiple input features and the parameter attribute information of the multiple input features mapped to parameters respectively, the feature attribute information of the input features includes the feature identifier of the input features, the feature mapping dimension of the input features, the feature sequence of the input features, and the feature change type of the input features, and the parameter attribute information of the parameters includes the parameter identifier of the parameters, the sequence of the parameters, and the dimensions of the parameters; from the feature grouping information of the multiple input features, the feature grouping information of the input features to be processed indicated by the feature change information is determined; the feature grouping information of the input features to be processed includes the feature attribute information of the input features to be processed and the parameter attribute information of the input features to be processed mapped to the change parameters; based on the feature attribute information of the input features to be processed and the parameter attribute information of the change parameters, the change position of the change parameters is determined.

[0054] Among them, the feature grouping information of the input feature can be used to reflect the group to which the input feature belongs. By determining the group to which multiple input features belong, the feature order of each input feature can be determined, and then the change position of the changed feature can be determined. The feature attribute information of the input feature can reflect the processing of the input feature by the feature coding layer in the initial model. For example, the feature mapping dimension of the input feature refers to the dimension after the input feature is mapped by the feature coding layer in the initial model. The feature order of the input feature can refer to the order in which the feature coding layer in the initial model processes the input feature. The feature change type of the input feature can indicate whether the input feature is a newly added feature or a deleted feature.

[0055] Furthermore, the parameter attribute information of the input feature mapping as a parameter is used to reflect the dimension of the variables involved in the network layer in the initial model. For example, if an input feature is a 200-dimensional feature, the 200-dimensional input feature is mapped to 100-dimensional information through the feature coding layer of the target model. For example, the 200-dimensional input feature is mapped to 100-dimensional information on the feature coding layer using parameter conversion. For example, the dimension of the parameter is 200*100. The parameter here can be called a variable in the model, that is, the 200-dimensional input feature is mapped to 100-dimensional information on the feature coding layer using a 200*100 variable. If an input feature is a 201-dimensional feature, the 201-dimensional input feature is mapped to 100-dimensional information through the feature coding layer of the target model. Then, the input feature mapping to 100-dimensional information is obtained by using a 201*100 variable conversion. It can be seen that after the feature dimension of the input feature changes, the dimension of the parameter (i.e., variable) in the feature coding layer will also change. Therefore, by finding the input features with changes and the changing positions of the dimensions of the variables in the feature encoding layer caused by the changed input features, the changing positions of the changing parameters can be found.

[0056] Among them, the parameter identifier of the parameter may refer to the name of the parameter or the number of the parameter and other information, the order of the parameters may refer to the order of arrangement of the parameters in the feature coding layer, and the dimension of the parameter may refer to the dimension of the variable. Based on the feature attribute information of the input feature to be processed and the parameter attribute information of the change parameter, determining the change position of the change parameter may specifically refer to: based on the feature attribute information of the input feature to be processed, determining which parameters the input feature to be processed is mapped to, and which dimensions of which parameters are mapped to, and whether the parameter change type of the parameter is to be added or deleted, the parameter attribute information of the change parameter includes the parameter identifier of the change parameter, the order of the change parameter and the dimension of the change parameter, then the dimension mapped in the change parameter to which the feature attribute information of the input feature to be processed is mapped, and determined as the change position of the change parameter.

[0057] Since the feature grouping information of the changing feature is determined, it is equivalent to knowing the association between the variables corresponding to the changing feature, so the changing position of the changing variable can be determined. That is, the feature order of the changing feature and which variables the changing feature is mapped to, and which dimensions of the corresponding variables are mapped to are known. Therefore, combined with the order of the changing parameters and the dimensions of the changing parameters, the specific changing position of the changing parameters can be determined, such as which dimension or dimensions of the changing parameters have changed, so that subsequent adjustments can be made in the changing dimensions.

[0058] In an embodiment of the present application, feature grouping information of multiple input features is obtained, and feature change information is determined. From the feature grouping information of multiple input features, feature grouping information of input features to be processed (i.e., change features) indicated by the feature change information is determined. Thus, change parameters corresponding to the change features can be determined based on the feature grouping information of the change features, and then the change positions of the change parameters can be determined. Subsequently, the change parameters at the change positions can be adjusted, thereby achieving reuse of unadjusted variables and saving optimization update efficiency of the target model.

[0059] S103, adjusting the change parameter at the change position to obtain the adjustment parameter.

[0060] In an embodiment of the present application, the change parameter for the feature change information may refer to a parameter whose dimension has changed due to a change in the input features of the initial model. By adjusting the change parameter at the change position, the adjustment parameter can be obtained, and thus the adjustment parameter can be loaded, which is equivalent to adjusting the parameters that have changed and not adjusting the parameters that have not changed. This allows the subsequent target model to quickly learn the new adjustment parameters and retain the parameters that have not changed, thereby improving the model loading efficiency.

[0061] In one embodiment, the computer device can adjust the change parameter at the change position in combination with the parameter change type of the change parameter to obtain the adjustment parameter. For example, the parameter change type of the change parameter can be determined based on the feature change information. Since the feature change information includes the feature change type of the change feature, the parameter change type of the change parameter can be determined based on the feature change type of the change feature. For example, the feature change type of the change feature is determined as the parameter change type of the change parameter, that is, the change types of the two are the same. For example, if the feature change type is added, the parameter change type is also added, and if the feature change type is deleted, the parameter change type is also deleted.

[0062] For example, if the input feature of the initial model is a 200-dimensional feature, the feature coding layer of the initial model maps the 200-dimensional input feature to 100-dimensional information, and 200*100-dimensional parameters are required. If the dimension of the input feature increases by 1 dimension, that is, the input feature becomes a 201-dimensional feature, the feature coding layer of the initial model maps the 201-dimensional variable feature to 100-dimensional information, and 201*100-dimensional parameters are required. It can be seen that when the feature dimension of the input feature increases, the dimension of the variables in the feature coding layer will also increase. Similarly, when the feature dimension of the input feature decreases, the dimension of the variables in the feature coding layer will also decrease. Therefore, the parameter change type of the variable parameter can be determined based on the feature change type of the variable feature.

[0063] Since the parameter change type of the change parameter is determined, the change parameter at the change position can be adjusted in combination with the parameter change type of the change parameter to obtain the adjustment parameter. Specifically, if the parameter change type of the change parameter is a new type, the parameter dimension of the change parameter is increased by the target dimension, and the change parameter with the increased target dimension is determined as the adjustment parameter; if the parameter change type of the change parameter is a deletion type, the parameter dimension of the change parameter is deleted by the target dimension, and the change parameter with the deleted target dimension is determined as the adjustment parameter.

[0064] Among them, the target dimension refers to the dimension that needs to be changed, such as the dimension that needs to be added or the dimension that needs to be deleted. Adding a new dimension means adding a dimension to the original dimension of the variable corresponding to the input feature, so that the dimension of the variable becomes more, for example, you can insert a value in the dimension space of the variable of the original dimension to make the dimension of the variable more. Deleting a variable means reducing the dimension on the original dimension of the variable, so that the dimension of the variable becomes less. For example, the adding type can indicate that the target dimension is increased in the changing parameter at the changing position, such as adding 1 dimension at the changing position, so that the parameter changes from 200*100 dimension to 201*100 dimension. The deleting type can indicate that the target dimension is deleted at the changing position, such as deleting 1 dimension at the changing position, so that the parameter changes from 201*100 dimension to 200*100 dimension. By adjusting the changing parameters in combination with the parameter change type, the accuracy of parameter adjustment can be improved.

[0065] In one embodiment, the variable parameter has multiple dimensions, and the variable position refers to the position corresponding to the dimension where the change exists in the multiple dimensions of the variable parameter. Then, the parameter dimension of the variable parameter is increased by the target dimension, and the method of determining the variable parameter with the increased target dimension as the adjustment parameter may include: inserting the parameter of the target dimension at the position corresponding to the dimension where the change exists to obtain the adjustment parameter.

[0066] For example, if the variable parameter has 100 dimensions, the dimension that changes is the second dimension, the target dimension is the first dimension, and the parameter change type is a new type, then the first dimension parameter is inserted at the position corresponding to the second dimension to obtain the adjustment parameter. Specifically, it means that after inserting the first dimension parameter at the position corresponding to the second dimension, the original third dimension parameter and the remaining 97 dimension parameters are concatenated to obtain the adjustment parameter, and the dimension of the adjustment parameter is 101 (that is, the original second dimension parameter of the variable parameter is increased by one dimension, and the other dimension parameters remain unchanged).

[0067] In one embodiment, the computer device deletes the target dimension from the parameter dimension of the variable parameter, and the method of determining the variable parameter of the deleted target dimension as the adjustment parameter may include: deleting the parameter of the target dimension at the position corresponding to the dimension where the variable exists, to obtain the adjustment parameter.

[0068] For example, if the variable parameter has 100 dimensions, the dimension that changes is the second dimension, the target dimension is the first dimension, and the parameter change type is the deletion type, then the first dimension parameter is deleted at the position corresponding to the second dimension to obtain the adjustment parameter. Specifically, it means that after deleting the first dimension parameter at the position corresponding to the second dimension, the original third dimension parameter and the remaining 97 dimension parameters are concatenated to obtain the adjustment parameter, and the dimension of the adjustment parameter is 99 dimensions (that is, the original second dimension parameter of the variable parameter is deleted, and the other dimension parameters remain unchanged).

[0069] In the embodiment of the present application, by combining the specific change situation of the change parameter, deleting or adding dimensions at the change position of the change parameter, the accuracy of parameter adjustment can be improved.

[0070] In the embodiment of the present application, any variable parameter can be adjusted in the above-mentioned manner to obtain the adjusted parameter. If the characteristic change information indicates that there are multiple variable parameters, each variable parameter can be adjusted in the above-mentioned manner respectively to obtain the adjusted parameter corresponding to each variable parameter, thereby adjusting all variable parameters and improving the accuracy of parameter adjustment.

[0071] S104, generating a parameter update file based on the adjustment parameters, and loading the parameter update file into the initial model to obtain a target model.

[0072] In an embodiment of the present application, a computer device can adjust each variable parameter that has changed, and obtain adjustment parameters corresponding to each variable parameter. If the number of variable parameters is one, a parameter update file can be generated based on the adjustment parameter corresponding to the variable parameter. If the number of variable parameters is multiple, a parameter update file can be generated based on the adjustment parameters corresponding to the multiple variable parameters. Further, the parameter update file can be loaded in the initial model to obtain a target model. In other words, the initial model and the target model are the same model, but the loaded parameters are different. That is, when the model loads the unchanged parameters, it is called the initial model, and after loading the changed parameters, it is called the target model. Since there is no need to clear the parameters in the initial model and then retrain to obtain the parameters, it is equivalent to hot starting the target model. The target model can reuse the unchanged parameters in the initial model. The target model may refer to a model obtained after updating the initial model. For example, the initial model may refer to an existing model online, and the target model may refer to an updated model.

[0073] The target model is obtained by loading the parameter update file in the initial model. The parameter update file includes the adjustment parameters after adjusting the changed parameters and the unchanged parameters. This is equivalent to the target model reusing the unchanged parameters in the initial model, that is, the hot start model can be realized, thereby improving the model update efficiency.

[0074] In one embodiment, a computer device may generate a parameter update file based on adjustment parameters by the following method: obtaining parameter attribute information of the parameters to be combined in the initial configuration file of the initial model; the parameters to be combined refer to the parameters other than the variable parameters in the initial configuration file, and the parameter attribute information of the parameters to be combined includes the parameter identifiers of the parameters to be combined, the order of the parameters to be combined and the dimensions of the parameters to be combined; obtaining the parameter attribute information of the adjustment parameters, and performing parameter combination processing on the adjustment parameters and the parameters to be combined based on the parameter attribute information of the parameters to be combined and the parameter attribute information of the adjustment parameters, to generate a parameter update file.

[0075] In an embodiment of the present application, the parameter attribute information of the adjustment parameter includes the parameter identifier of the adjustment parameter, the order of the adjustment parameter, and the dimension of the adjustment parameter. For example, the parameters to be combined and the adjustment parameters can be combined to obtain a parameter update file according to the order of each parameter to be combined and the order of the adjustment parameter. The order of the parameters can correspond to the feature order of the input features corresponding to the parameters. Since the initial configuration file of the initial model includes all the input features and parameters of the initial model, that is, it includes the changed parameters and the unchanged parameters (parameters to be combined), and the adjustment parameters are obtained after the changed parameters are adjusted, the parameters to be combined and the adjustment parameters can be processed by parameter combination in order, for example, spliced ​​in order to obtain a parameter update file.

[0076] Optionally, the initial model and the target model may include, but are not limited to, a convolutional neural network model (CNN), a recurrent neural network model (RNN), a deep neural network model (DNN), etc., or may be any other model, which is not limited in the embodiments of the present application.

[0077] In the embodiment of the present application, feature change information is obtained; the feature change information is used to reflect the dimensional change of the input features of the initial model; based on the feature change information, the change position of the change parameter of the initial model for the feature change information is determined; the change position refers to the position where the dimension of the change parameter changes; the change parameter at the change position is adjusted to obtain the adjustment parameter; a parameter update file is generated based on the adjustment parameter, and the parameter update file is loaded in the initial model to obtain the target model. Since only the changed parameters need to be adjusted, the target model is updated based on the adjusted parameters without training the target model from scratch, that is, when loading the parameter update file, it is equivalent to reusing the unchanged parameters in the initial model, thereby improving the model update efficiency.

[0078] For further information, see Figure 3 , Figure 3is a flow chart of another model parameter adjustment method provided in an embodiment of the present application; Figure 3 As shown, the model parameter adjustment method can be applied to a model parameter adjustment system, which may include a server and a terminal device, wherein a feature perception module, a parameter position calculation module and a model modification module may be deployed on the server. The feature perception module is used to obtain feature change information, the parameter position calculation module is used to determine the change position of the change parameter of the initial model for the feature change information based on the feature change information, and the model modification module is used to load the parameter update file in the initial model to obtain the target model. The terminal device can send video data to the server and predict the popularity of the video data based on the updated target model. For example, the model parameter adjustment method includes but is not limited to the following steps:

[0079] S201, the server calls the feature perception module to obtain feature change information.

[0080] In an embodiment of the present application, the model parameter adjustment system can automatically compare the configuration file for the model with a unified feature configuration by calling the feature perception module, identify the feature change information updated this time for use in subsequent steps, and can also support users to directly input added or deleted feature information. The user input method can be suitable for situations where the feature changes are small.

[0081] Optionally, the feature perception module may include an automatic comparison feature perception module and a user description-based feature perception module. The automatic comparison feature perception module may be used to compare the initial configuration file and the target configuration file, determine the difference between the two configuration files, determine the change feature based on the difference between the two configuration files, and thereby determine the feature attribute information of the change feature as the feature change information.

[0082] Since the model usually has a configuration file, the configuration file lists the feature names used by the model (feature names of input features), the dimensions mapped by the features through the feature encoding layer (embedding layer), and other information. The model will construct the input layer according to the input features involved in the configuration file. In the embodiment of the present application, the target configuration file of the target model (new model) and the initial configuration file of the initial model (old model) provided by the user can be used to check the feature change information for the model. For example, the feature change information may include the feature name of the changed feature, the feature mapping dimension of the changed feature, the feature order of the changed feature, whether the changed feature is a newly added or deleted feature, etc., for use by the subsequent parameter position calculation module. For example, the initial configuration file and the target configuration file can be obtained through the configuration file interface, and the user can upload the two configuration files to the model parameter adjustment system through the configuration file interface.

[0083] Furthermore, the feature perception module based on user description can determine the feature change information by providing the feature name of the changed feature by the user. Since the input feature changes of this hot start are small and easy to describe, it can support the user to directly provide the changed feature name (supporting regular matching) to input the changed feature information. The feature perception module based on user description can collect the feature attribute information of the input feature from the initial configuration file according to the input feature name, for example, it can include but not be limited to the feature name of the input feature, the feature mapping dimension of the input feature, the feature order of the input feature, etc., for use by the subsequent parameter position calculation module.

[0084] S202: The server calls a parameter position calculation module to determine, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information.

[0085] In an embodiment of the present application, a function is also provided to automatically calculate the model parameter dimension (model variable dimension) and the specific position of the change (the change position of the change parameter) caused by the current feature change, thereby eliminating tedious and error-prone manual calculation steps, and can improve the efficiency of a single hot start, especially in models with complex structures.

[0086] Specifically, by providing a series of extensible preset rules, users can describe the relationship between model variables and input features through simple configuration. For example, by parsing the mapping relationship between "model variable <—> mapping rule <—> grouping feature <—> single feature", the model variable dimension change position caused by the change of input feature can be automatically calculated according to the perceived change of the input feature of the model, and the model transformation and hot start function can be quickly performed. Further optionally, the function of calculating the change position of the change parameter can be realized through the following modules:

[0087] Variable mapping rule module: According to the form in which the input features will be presented in the model, a series of rules can be predefined, which are specifically divided into two categories: variable type and mapping logic. The variable type is mainly distinguished according to the dimensions of the model network variables involved, such as Dim2Warm(input,output) is responsible for processing two-dimensional variables, Dim1Warm(input) is responsible for processing one-dimensional variables, and so on. Different dimensions correspond to a variety of preset processing methods, such as two-dimensional variables may change in the first dimension, or in the second dimension or both dimensions. The mapping logic corresponds to different combinations of input features, such as sequential splicing (AllTablesInOrder()), tail filling (Const(fill_tail)), group splicing (CustomSparse(name,reduce_emb=False,reduce_emb_to_dim=1)), etc. The embodiment of the present application can automatically identify the specific positions of variables (parameters) that need to be spliced, cropped, and inserted according to different combinations and corresponding feature change information.

[0088] Through the variable mapping rule module, the configuration file can be automatically identified, and the relationship between each input feature and the variable can be quickly identified, thereby identifying the change position of the change parameter. The predefined rules are convenient for users to use immediately, quickly configure rules for different model variables, and improve the efficiency of model iteration.

[0089] Feature custom grouping module: In the rule configuration stage, there is a mapping logic for group splicing to deal with certain complex network compositions. The embodiment of the present application provides a function that facilitates users to package and group features. Users only need to insert the basic information of the features into the feature custom grouping module and assign a custom group name. Then, the feature order and dimension information covered in the group to which the inserted feature belongs can be automatically recorded, and the feature change type can be judged as a new type or a deleted type. Users use group names to configure rules, which greatly simplifies the complexity of rule configuration. The custom grouping module provides a high degree of freedom on the user side. Optionally, users can also use this module to define some virtual features. For example, a virtual feature can refer to a new structure, such as a new 100-dimensional feature. By giving a constant in the variable mapping rule module, it can be assumed that the 100-dimensional variable is a feature, so that a hot start can be performed in combination with the 100-dimensional feature to achieve a description of the situation where some dimensions produced after passing through a complex network module are embedded in the input layer.

[0090] Parameter position calculation module: Based on the above three modules (i.e., feature perception module, variable mapping rule module, and feature custom grouping module), the association relationship of model variables -> variable components -> grouping features -> single input features can be parsed, and this association relationship remains unchanged when the model structure other than the features remains unchanged or when additional structures are added, and can be reused. After parsing the association relationship, the embodiment of the present application can automatically calculate the affected groups of this change and the specific positions corresponding to the variables (such as a list of dimension numbers where values ​​need to be inserted / deleted) according to the feature changes.

[0091] S203, the server calls the model modification module to adjust the change parameters at the change position to obtain the adjustment parameters.

[0092] In the embodiment of the present application, since the change position of the change parameter is determined, the call model modification module can be used to adjust the change parameter at the change position to obtain the adjustment parameter, and the call model modification module can be used to generate a parameter update file based on the adjustment parameter, and the parameter update file can be loaded in the initial model to obtain the target model. For example, according to the above-mentioned change position, the change variable (change parameter) of the initial model can be read, and the corresponding position of the change variable can be cut, spliced, and inserted to generate a new adjustment variable (adjustment parameter), and the complete model file (i.e., parameter update file) can be re-generated.

[0093] S204, the server calls the model modification module to generate a parameter update file based on the adjustment parameters, and loads the parameter update file into the initial model to obtain the target model.

[0094] The embodiment of the present application is applicable to the situation where the model network variable dimension changes after the model feature or structure changes, and the old model cannot be directly loaded for hot start. First, by obtaining the feature change information for the model; second, the specific change position in the model variable is calculated according to the feature change information; then, according to the change position, the change variable in the old model is cut, spliced, and inserted to adapt to the new model structure and produce a new model file; finally, the new model loads the produced parameter update file to complete the hot start.

[0095] See also Figure 4 , Figure 4 is a schematic diagram of a scenario of model parameter adjustment provided in an embodiment of the present application, such as Figure 4As shown, by obtaining the feature configuration, the feature configuration includes, for example, the initial configuration file and the target configuration file, or may also include the feature name of the changed feature, then the feature perception module may perceive the feature change based on the feature configuration, thereby obtaining the feature change information. Further, the old model may be loaded for single-step training, all input features in the initial configuration file of the old model may be traversed, the feature information of all input features (i.e., the feature attribute information of the input features) may be recorded, and all input features in the initial configuration file may be loaded into the custom feature group. Further, by obtaining the custom feature group configuration and the model variable rule configuration, the parameter position calculation module may determine the position of the feature in the custom feature group based on the variable mapping rule base, the custom feature group configuration, and the model variable rule configuration, thereby determining the specific position of the changed variable (i.e., the changed position of the changed variable of the feature change information). In addition, the model modification module may also be used to adjust the changed variable at the changed position in the model, obtain the adjustment parameter, and generate a parameter update file, load the parameter update file in the initial model, and obtain the target model.

[0096] Specifically, Figure 4 As shown in Figure 4 The functions involved in the code mainly include the following three parts, namely, obtaining feature change information, calculating the change position of the change parameter, and loading the target model. The following describes these three parts respectively:

[0097] The first part is to obtain feature change information, which can be obtained through the feature perception module. For example, the feature change information can be determined based on the initial configuration file and the target configuration file by automatic comparison. Or it can be based on user configuration, such as directly exposing the interface to the user to directly configure the changed features, and supporting regular matching of feature names, such as obtaining the {feature name}->{new / delete} input by the user, and then the feature change information can be obtained. Further, the old model can be loaded for single-step training to determine the feature order of each input feature in the initial configuration file. Specifically, after obtaining the input features of this change and the feature change type of the input features, through single-step training, the input features in the initial configuration file are traversed once, and all input features can be recorded in order, for example, the feature name, feature mapping dimension, and feature change type of each input feature can be recorded, such as whether it is a newly added / deleted feature, and stored in the default grouping class. Optionally, the user-defined feature grouping configuration can also be recorded according to the user's custom grouping configuration in the training code. The feature grouping configuration can include, for example, the group name, the feature name in the group, the feature mapping dimension, the number of features in the group, and whether it is a newly added / deleted feature, and is stored in the custom grouping class.

[0098] The second part is to calculate the change position of the change parameter, and configure the rules of the model variables according to the rules in the variable mapping rule library provided by the above variable mapping rule module. The variable mapping rule library can be divided into variable type and mapping logic. Furthermore, a variable rule configuration can be configured according to the business model, which records the mapping relationship between variable name and rule, where variable name also supports regular matching. This configuration information is a general configuration, which only describes the variables in the model that have a corresponding relationship with the features (that is, they will be affected by feature changes), and can be reused without major changes to the model. If configured in the form of a python dictionary: {variable A: Dim1Warm(input=[AllTablesInOrder()]), variable B: Dim2Warm(input=[CustomSparse(name=Group 1), CustomSparse(name=Group 2, reduce_emb=True, reduce_emb_to_dim=32), Const(dim=256, fill_tail=8)])}, it means that variable A is a one-dimensional variable, and the corresponding relationship with the input feature is the feature concatenation according to the order and dimension in the default grouping class. Variable B is a two-dimensional variable, and the relationship between the first dimension and the feature is the concatenation of group 1, group 2, and fixed dimension 256 of the custom feature grouping. The feature dimensions in group 2 will be remapped and uniformly mapped to 32 bits. The last 8 dimensions of the fixed dimension 256 are newly added this time, and the second dimension is irrelevant to the feature.

[0099] Further, according to the variable rule configuration, the specific position of the variable that affects the feature change information is calculated: after obtaining the default and custom grouping information of the feature in the single-step training stage, the model variables are traversed. When the current variable matches the mapping rule, the features in the group are traversed according to the corresponding feature group information in the rule. During the traversal process, the current position information ({s},{e}) is recorded, where {s} = the number of previous features * feature mapping dimension, {e} = {s} + current feature mapping dimension, and when the changed feature is counted, the position information is updated to the list to be operated. It can be understood that whether adding or deleting features, the feature traversal process is always based on the configuration with more features to ensure that all feature changes are matched. The information in the final list to be operated is as follows: [{variable A: (total dimension, change dimension, change type (delete / add), change position list [{s1},{e1},{s2},{e2},…]), variable B: (…),…}].

[0100] The third part is to load the target model, which can modify the initial configuration file of the initial model and produce the target model. For example, according to the information in the list to be operated and the variable type in the mapping rule, the matched variables can be cropped, inserted, and spliced ​​in various dimensions. If the change type is increase, the one-dimensional variable A is inserted into the {e1}-{s1} dimension variable at the {s1} position, and then the original {e1}+1 dimension variable is spliced ​​to the newly inserted variable, and so on. Furthermore, after all variables are traversed and modified, they are saved as parameter update files, and the parameter update files and target models are reloaded in the training code. This can achieve the change of the feature dimensions of the input features of the model, and the unchanged parameters in the initial model can be reused to continue training. The information learned by the initial model can be retained, and the speed at which the target model catches up with the indicator can be improved.

[0101] Exemplarily, the variable mapping rule base may be as follows:

[0102] Variable type:

[0103] Dim2Warm(input, output=None): used for warm start of two-dimensional variables;

[0104] Dim1Warm(input): used for warm start of one-dimensional variables;

[0105] Mapping logic: Several feature mapping relationship classes are predefined. The input and output of each type can be filled in according to the network structure. The variable classes filled in are:

[0106] AllTablesInOrder(reduce_emb=False,reduce_emb_to_dim=1): indicates that the default order of all features is used;

[0107] reduce_emb=False: indicates that the feature dimension is the default configuration dimension;

[0108] reduce_emb = True: indicates that the feature dimension needs to be changed;

[0109] reduce_emb_to_dim=1:Indicates that the feature dimension is changed to a custom dimension, the default value is 1;

[0110] DenseFeature(num): indicates that dense features are used, and num is filled in with the number of dense features in the new model;

[0111] Const(num,insert_info=None,fill_tail=0): indicates that a variable of fixed length num is used, usually used as an offset;

[0112] num: variable length;

[0113] insert_info: The location where the fill value needs to be inserted during the hot start process of this variable (if no insertion is required, leave it blank);

[0114] fill_tail: The length of the fill value that needs to be inserted into the tail of this variable during the hot start process (optional);

[0115] CustomSparse(name,reduce_emb=False,reduce_emb_to_dim=1): indicates the use of user-defined feature grouping;

[0116] name: Enter a custom name (corresponding to the name given by the user in the business network). reduce_emb and reduce_emb_to_dim are the same as those described in AllTablesInOrder.

[0117] It can be seen that when the initial configuration file is obtained, the initial configuration file can be parsed through the variable mapping rule library to determine the model network variables, and then the specific location of the changed variables can be determined in combination with the feature change information for subsequent adjustments.

[0118] In the embodiment of the present application, in the iteration of the machine learning model, due to the change in the dimension of the model variable caused by the change in the new model feature, the old model file cannot be directly loaded for hot start, and the existing hot start method requires manual calculation of the position of the model insertion and cutting dimension according to each feature change. The embodiment of the present application provides a series of scalable preset rules and a complete set of process architectures, which can realize automatic detection of the difference between the new and old model features, automatic calculation of the variable position where the dimension changes occur, and cutting or inserting new dimensions into the old model variables through simple and low-frequency configuration, while retaining the original network parameters. Output a loadable parameter update file to quickly iterate the model online. The embodiment of the present application integrates the process of sensing feature changes -> automatically calculating the position of variable dimension changes -> modifying model variables, avoiding cumbersome and error-prone manual calculations and manual model modification operations. Further, by comparing configuration files, the function of automatically sensing feature changes can be realized. At the same time, it can also support users to input feature change information for quick configuration in the case of a small number of feature changes, and enhance the flexibility of determining feature change methods. In addition, by providing a series of scalable variable mapping rules, users can use low-frequency and simple configuration work to automatically calculate the specific location of model variable changes when different input features change, thereby improving the accuracy and efficiency of hot start work.

[0119] S205, the terminal device sends video data to the server.

[0120] Among them, the terminal device can refer to any device that uploads video data, and the video data can refer to any type of video data, for example, including but not limited to video data of people, scenery, food, animals, sports, beauty, etc.

[0121] S206, the server predicts the popularity of the video data based on the target model, obtains a popularity prediction result, and sends the popularity prediction result to the terminal device.

[0122] In an embodiment of the present application, after the terminal device sends the video data to the server, the server can perform prediction processing on the video data based on the target model, for example, the heat of the video data can be predicted to obtain a heat prediction result, and the heat prediction result can be used to indicate the heat level of the video data. The greater the heat level of the video data, the greater the probability that the video data becomes a popular video, and the greater the probability that the video data is spread. The way the video is spread may include but is not limited to the video being played, collected, forwarded, and liked. The smaller the heat level of the video data, the smaller the probability that the video data becomes a popular video, and the smaller the probability that the video data is spread. After the server sends the heat prediction result to the terminal device, the terminal device can perform corresponding processing on the video data based on the heat prediction result. For example, if the heat level of the video data is greater than the target level, it means that the probability of the video being spread is greater, and a high-bitrate video encoding parameter can be used for video encoding, so that the clarity of the encoded video data is higher, thereby improving the video quality, and then improving the video playback experience. If the popularity of video data is less than or equal to the target level, it means that the probability of the video being transmitted is smaller, and low-bitrate video encoding parameters can be used for video encoding, which can reduce the complexity of video encoding, thereby reducing resource waste and reducing the video encoding cost for video data.

[0123] In the embodiment of the present application, feature change information is obtained; the feature change information is used to reflect the dimensional change of the input features of the initial model; based on the feature change information, the change position of the change parameter of the initial model for the feature change information is determined; the change position refers to the position where the dimension of the change parameter changes; the change parameter at the change position is adjusted to obtain the adjustment parameter; based on the adjustment parameter, a parameter update file is generated, and the parameter update file is loaded in the initial model to obtain the target model. Since only the changed parameters need to be adjusted, the target model is updated based on the adjusted parameters without training the target model from scratch, that is, when loading the parameter update file, it is equivalent to reusing the unchanged parameters in the initial model, thereby improving the update efficiency of the model.

[0124] The method of the embodiment of the present application is introduced above, and the device of the embodiment of the present application is introduced below.

[0125] See also Figure 5 , Figure 5 : is a schematic diagram of the structure of a model parameter adjustment device provided in an embodiment of the present application. The above-mentioned model parameter adjustment device can be deployed on a computer device; the model parameter adjustment device can be used to execute the corresponding steps in the model parameter adjustment method provided in an embodiment of the present application. The model parameter adjustment device 50 includes:

[0126] The information acquisition unit 501 is used to acquire feature change information; the feature change information is used to reflect the dimensional change of the input features of the initial model;

[0127] A position determination unit 502 is used to determine, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information; the change position refers to a position where a dimension of the change parameter changes;

[0128] A parameter adjustment unit 503 is used to adjust the change parameter at the change position to obtain an adjustment parameter;

[0129] The model updating unit 504 is used to generate a parameter updating file based on the adjustment parameters, and load the parameter updating file into the initial model to obtain a target model.

[0130] Optionally, the information acquisition unit 501 is specifically used to:

[0131] Obtaining an initial configuration file of the initial model; the initial configuration file is used to indicate input features of the initial model;

[0132] Obtaining a target configuration file of the target model; the target configuration file is used to indicate input features of the target model;

[0133] performing a comparison process on the initial configuration file and the target configuration file to determine a difference between the initial configuration file and the target configuration file, and determining a change feature based on the difference between the initial configuration file and the target configuration file;

[0134] Acquire feature attribute information of the change feature, and determine the feature attribute information of the change feature as the feature change information.

[0135] Optionally, the information acquisition unit 501 is specifically used to:

[0136] Get the feature identifier of the input feature;

[0137] Determine, from the initial configuration file of the initial model, a feature identifier that matches the feature identifier of the input feature as a variable feature identifier; the feature indicated by the variable feature identifier is a variable feature;

[0138] Acquire feature attribute information of the change feature, and determine the feature attribute information of the change feature as the feature change information.

[0139] Optionally, the feature attribute information of the changing feature includes at least one of the following: a feature identifier of the changing feature, a feature mapping dimension of the changing feature, a feature order of the changing feature, and a feature change type of the changing feature. The feature mapping dimension of the changing feature is obtained by mapping the changing feature based on the feature coding layer in the initial model, and the feature order of the changing feature refers to the feature arrangement order of the changing feature in the initial configuration file.

[0140] Optionally, the location determination unit 502 is specifically configured to:

[0141] Acquire feature grouping information of multiple input features of the initial model; the feature grouping information of the multiple input features includes feature attribute information of the multiple input features and parameter attribute information of the multiple input features respectively mapped to parameters, the feature attribute information of the input features includes a feature identifier of the input features, a feature mapping dimension of the input features, a feature order of the input features, and a feature change type of the input features, and the parameter attribute information of the parameters includes a parameter identifier of the parameters, an order of the parameters, and a dimension of the parameters;

[0142] Determining, from the feature grouping information of the plurality of input features, the feature grouping information of the input feature to be processed indicated by the feature change information; the feature grouping information of the input feature to be processed includes feature attribute information of the input feature to be processed and parameter attribute information of the input feature to be processed mapped as a change parameter;

[0143] Based on the feature attribute information of the input feature to be processed and the parameter attribute information of the changing parameter, the changing position of the changing parameter is determined.

[0144] Optionally, the parameter adjustment unit 503 is further configured to determine a parameter change type of the changed parameter based on the characteristic change information; the parameter change type includes a new addition type and a deletion type;

[0145] The parameter adjustment unit 503 is specifically used for:

[0146] If the parameter change type of the change parameter is a new addition type, the parameter dimension of the change parameter is increased by the target dimension, and the change parameter with the increased target dimension is determined as the adjustment parameter;

[0147] If the parameter change type of the change parameter is a deletion type, the parameter dimension of the change parameter is deleted as a target dimension, and the change parameter of the deleted target dimension is determined as the adjustment parameter.

[0148] Optionally, the change parameter has multiple dimensions, and the change position refers to a position corresponding to a dimension where the change exists in the multiple dimensions of the change parameter; the parameter adjustment unit 503 is specifically used to:

[0149] The parameter of the target dimension is inserted into the position corresponding to the dimension having changed to obtain the adjustment parameter.

[0150] Optionally, the model updating unit 504 is specifically configured to:

[0151] Acquire parameter attribute information of the parameters to be combined in the initial configuration file of the initial model; the parameters to be combined refer to the parameters in the initial configuration file other than the variable parameter, and the parameter attribute information of the parameters to be combined includes the parameter identifier of the parameters to be combined, the order of the parameters to be combined, and the dimensions of the parameters to be combined;

[0152] Parameter attribute information of the adjustment parameter is obtained, and based on the parameter attribute information of the parameter to be combined and the parameter attribute information of the adjustment parameter, parameter combination processing is performed on the adjustment parameter and the parameter to be combined to generate the parameter update file.

[0153] Optionally, the variation parameter is used to map the feature dimension of the input feature to the feature dimension specified by the feature coding layer of the initial model. The variation parameter refers to a parameter whose dimension changes. The dimension change of the variation parameter is determined based on the feature dimension change of the input feature.

[0154] It should be noted that Figure 5 For the contents not mentioned in the corresponding embodiments, please refer to the description of the method embodiments, which will not be repeated here.

[0155] In the embodiment of the present application, feature change information is obtained; the feature change information is used to reflect the dimensional change of the input features of the initial model; based on the feature change information, the change position of the change parameter of the initial model for the feature change information is determined; the change position refers to the position where the dimension of the change parameter changes; the change parameter at the change position is adjusted to obtain the adjustment parameter; based on the adjustment parameter, a parameter update file is generated, and the parameter update file is loaded in the initial model to obtain the target model. Since only the changed parameters need to be adjusted, the target model is updated based on the adjusted parameters without training the target model from scratch, that is, when loading the parameter update file, it is equivalent to reusing the unchanged parameters in the initial model, thereby improving the update efficiency of the model.

[0156] See also Figure 6 , Figure 6 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 6As shown, the above-mentioned computer device 60 may include: a processor 601, a network interface 604 and a memory 605. In addition, the above-mentioned computer device 60 may also include: a user interface 603 and at least one communication bus 602. Among them, the communication bus 602 is used to realize the connection and communication between these components. Among them, the user interface 603 may include a display screen (Display), a keyboard (Keyboard), and the optional user interface 603 may also include a standard wired interface and a wireless interface. The network interface 604 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 605 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 605 may optionally also be at least one storage device located away from the aforementioned processor 601. As Figure 6 As shown, the memory 605 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0157] exist Figure 6 In the computer device 60 shown, the network interface 604 can provide a network communication function; the user interface 603 is mainly used to provide an input interface for the user; and the processor 601 can be used to call the device control application stored in the memory 605 to achieve:

[0158] Obtain feature change information; the feature change information is used to reflect the dimensional changes of the input features of the initial model;

[0159] Determine, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information; the change position refers to a position where a dimension of the change parameter changes;

[0160] Adjusting the change parameter at the change position to obtain an adjustment parameter;

[0161] A parameter update file is generated based on the adjustment parameters, and the parameter update file is loaded into the initial model to obtain a target model.

[0162] It should be understood that the computer device 60 described in the embodiment of the present application can execute the above Figure 2 and Figure 3 The description of the above model parameter adjustment method in the corresponding embodiment can also be performed as described above. Figure 5 The description of the model parameter adjustment device in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated here either.

[0163] In the embodiment of the present application, feature change information is obtained; the feature change information is used to reflect the dimensional change of the input features of the initial model; based on the feature change information, the change position of the change parameter of the initial model for the feature change information is determined; the change position refers to the position where the dimension of the change parameter changes; the change parameter at the change position is adjusted to obtain the adjustment parameter; based on the adjustment parameter, a parameter update file is generated, and the parameter update file is loaded in the initial model to obtain the target model. Since only the changed parameters need to be adjusted, the target model is updated based on the adjusted parameters without training the target model from scratch, that is, when loading the parameter update file, it is equivalent to reusing the unchanged parameters in the initial model, thereby improving the update efficiency of the model.

[0164] The embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, which includes program instructions, which, when executed by a computer, causes the computer to execute the method of the aforementioned embodiment, and the computer may be part of the computer device mentioned above. For example, it is the above-mentioned processor 601. As an example, the program instructions may be deployed on a computer device for execution, or deployed on multiple computer devices located at one location for execution, or, executed on multiple computer devices distributed at multiple locations and interconnected by a communication network, and multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain network.

[0165] The present application provides a computer program product or a computer program, which includes computer instructions, and when the computer instructions are executed by a processor, some or all of the steps in the above method are implemented. For example, the computer instructions are stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps performed in the embodiments of the above methods.

[0166] Those skilled in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0167] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A model parameter adjustment method, characterized in that: The method comprises: Acquire feature change information; the feature change information is used to reflect the dimensional change of the input features of the initial model; Determine, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information; the change position refers to a position where a dimension of the change parameter changes; Adjusting the change parameter at the change position to obtain an adjustment parameter; A parameter update file is generated based on the adjustment parameters, and the parameter update file is loaded into the initial model to obtain a target model.

2. The method according to claim 1, characterized in that The obtaining of feature change information includes: Acquire an initial configuration file of the initial model; the initial configuration file is used to indicate input features of the initial model; Acquire a target configuration file of the target model; the target configuration file is used to indicate input features of the target model; Comparing the initial configuration file with the target configuration file, determining a difference between the initial configuration file and the target configuration file, and determining a change feature based on the difference between the initial configuration file and the target configuration file; Acquire feature attribute information of the change feature, and determine the feature attribute information of the change feature as the feature change information.

3. The method according to claim 1, characterized in that The obtaining of feature change information includes: Get the feature identifier of the input feature; Determine, from the initial configuration file of the initial model, a feature identifier that matches the feature identifier of the input feature as a changed feature identifier; the feature indicated by the changed feature identifier is the changed feature; Acquire feature attribute information of the change feature, and determine the feature attribute information of the change feature as the feature change information.

4. The method according to claim 2 or 3, characterized in that: The feature attribute information of the changing feature includes at least one of the following: a feature identifier of the changing feature, a feature mapping dimension of the changing feature, a feature order of the changing feature, and a feature change type of the changing feature. The feature mapping dimension of the changing feature is obtained by mapping the changing feature based on the feature coding layer in the initial model. The feature order of the changing feature refers to the feature arrangement order of the changing feature in the initial configuration file.

5. The method according to claim 1, characterized in that: The determining, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information comprises: Acquire feature grouping information of multiple input features of the initial model; the feature grouping information of the multiple input features includes feature attribute information of the multiple input features and parameter attribute information of the multiple input features respectively mapped to parameters, the feature attribute information of the input features includes feature identifiers of the input features, feature mapping dimensions of the input features, feature order of the input features, and feature change types of the input features, and the parameter attribute information of the parameters includes parameter identifiers of the parameters, the order of the parameters, and the dimensions of the parameters; Determining, from the feature grouping information of the plurality of input features, the feature grouping information of the input features to be processed indicated by the feature change information; the feature grouping information of the input features to be processed includes feature attribute information of the input features to be processed and parameter attribute information of the input features to be processed mapped as change parameters; Based on the feature attribute information of the input feature to be processed and the parameter attribute information of the change parameter, a change position of the change parameter is determined.

6. The method according to claim 1, characterized in that The method further comprises: Determine the parameter change type of the changed parameter based on the characteristic change information; the parameter change type includes a new addition type and a deletion type; The adjusting process of the change parameter at the change position to obtain the adjustment parameter includes: If the parameter change type of the change parameter is a new addition type, the parameter dimension of the change parameter is increased by the target dimension, and the change parameter with the increased target dimension is determined as the adjustment parameter; If the parameter change type of the change parameter is a deletion type, a target dimension is deleted from the parameter dimension of the change parameter, and the change parameter of the deleted target dimension is determined as the adjustment parameter.

7. The method according to claim 1, characterized in that The generating a parameter update file based on the adjustment parameter comprises: Acquire parameter attribute information of the parameters to be combined in the initial configuration file of the initial model; the parameters to be combined refer to the parameters in the initial configuration file other than the variable parameters, and the parameter attribute information of the parameters to be combined includes parameter identifiers of the parameters to be combined, the order of the parameters to be combined, and the dimensions of the parameters to be combined; Parameter attribute information of the adjustment parameter is acquired, and based on the parameter attribute information of the parameter to be combined and the parameter attribute information of the adjustment parameter, parameter combination processing is performed on the adjustment parameter and the parameter to be combined to generate the parameter update file.

8. The method according to claim 1, characterized in that: The change parameter is used to map the feature dimension of the input feature to the feature dimension specified by the feature encoding layer of the initial model. The change parameter refers to a parameter whose dimension changes. The dimensional change of the change parameter is determined based on the change in the feature dimension of the input feature.

9. A model parameter adjustment device, characterized in that: The device comprises: An information acquisition unit, used to acquire feature change information; the feature change information is used to reflect the dimensional change of the input features of the initial model; A position determination unit, configured to determine, based on the feature change information, a change position of a change parameter of the initial model corresponding to the feature change information; the change position refers to a position where a dimension of the change parameter changes; A parameter adjustment unit, used for adjusting the change parameter at the change position to obtain an adjustment parameter; A model updating unit is used to generate a parameter updating file based on the adjustment parameters, and load the parameter updating file into the initial model to obtain a target model.

10. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the processor is used to call the program code so that the computer device executes the method described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded and executed by a processor, so that a computer device having the processor executes the method according to any one of claims 1 to 8.

12. A computer program product, characterized in that The computer program product comprises computer instructions, and when the computer instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.