Model parameter configuration method, device, electronic device and readable storage medium
By dividing the artificial intelligence model into logical modules and configuring target preset features, the problem of heavy parameter configuration workload and low efficiency in model training is solved, and efficient model parameter configuration is achieved.
Patent Information
- Application Number
- CN202210759448.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2042-06-29
AI Technical Summary
During the training process of artificial intelligence model, parameter configuration is large and inefficient, which is limited by the complexity of parameter settings and the diversity of model structure.
By classifying the modeling model as a logical module in advance, and determining the target preset features from multiple preset features as the input parameter, the target preset features are configured to achieve parameter configuration of the configuration model.
It simplifies the model configuration process, improves configuration efficiency, reduces development costs, and maximizes feature reuse.
Smart Images

Figure CN114938332B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a model parameter configuration method, device, electronic device and readable storage medium. Background Art
[0002] In the field of artificial intelligence technology, when training a model, it usually involves the setting of a large number of parameters, such as the increase or decrease of the features as parameters, the length of the features, etc. On the one hand, the number of parameters is large, and on the other hand, the setting methods of each parameter are also numerous and complex. In addition, when the model structure is complex and needs to be adjusted accordingly, multiple changing factors interact and accumulate, resulting in a large workload for configuring the model during model training and low efficiency. Summary of the invention
[0003] The object of the present invention is to provide a model parameter configuration method, device, electronic device and readable storage medium, which can simplify the configuration of the model and improve the configuration efficiency.
[0004] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0005] In a first aspect, an embodiment of the present invention provides a model parameter configuration method, which is applied to an electronic device, and the method comprises: obtaining a model to be configured, wherein the model to be configured comprises a pre-divided logic module; determining a target preset feature as an input parameter of the logic module from a plurality of preset features; and configuring the target preset feature to implement parameter configuration of the model to be configured.
[0006] Optionally, a plurality of preset features are displayed on the display interface of the electronic device, and the step of determining a target preset feature as input to the logic module from the plurality of preset features includes:
[0007] In response to a feature selection operation by a user on the display interface, the feature selection operation includes a target preset feature selected by the user from the plurality of preset features on the display interface;
[0008] The target preset characteristics are used as input parameters of the logic module.
[0009] Optionally, the target preset feature is one, and basic configuration items of the target preset feature are displayed on the display interface of the electronic device. The step of configuring the target preset feature to implement parameter configuration of the model to be configured includes:
[0010] Responding to a configuration selection operation performed by a user on the display interface, the configuration selection operation including a target configuration item selected by the user from the basic configuration items on the display interface and a configuration value of the target configuration item;
[0011] The target configuration item is configured according to the configuration value to implement parameter configuration of the model to be configured.
[0012] Optionally, there are multiple target preset features, and a shared configuration item of each target preset feature is displayed on the display interface of the electronic device. The step of configuring the target preset features to implement parameter configuration of the model to be configured includes:
[0013] In response to a shared identification value of a shared configuration item of each of the target preset features input by a user on the display interface, the shared identification values of at least two of the target preset features are the same;
[0014] A sharing relationship is established for the target preset features having the same shared identification value, and the feature values of the target preset features having the sharing relationship belong to the same set.
[0015] Optionally, the target preset feature includes multiple sub-features, and a pooled configuration item of the target preset feature is displayed on a display interface of the electronic device. The step of configuring the target preset feature to implement parameter configuration of the model to be configured includes:
[0016] A pooling method of the target preset feature in response to input by the user on the display interface;
[0017] The pooling configuration items are configured according to the pooling method to implement parameter configuration of the model to be configured.
[0018] Optionally, the method further comprises:
[0019] Acquire a characteristic value and a configuration item of a target preset characteristic of the logic module, wherein the configuration item includes at least one of a basic configuration item, a shared configuration item, and a pooled configuration item;
[0020] The eigenvalue is vector-processed according to the configuration item to obtain an output eigenvector of the logic module.
[0021] Optionally, there are multiple target preset features, and the basic configuration items of each target preset feature include sequential configuration items. The step of performing vector processing on the feature value according to the configuration items to obtain the output feature vector of the logic module includes:
[0022] Performing vectorization processing on the characteristic value of each of the target preset characteristics to obtain the characteristic vector of each of the target preset characteristics;
[0023] According to the values of the sequential configuration items of each of the target preset features, the feature vectors of all the target preset features are concatenated to obtain the output feature vector of the logic module.
[0024] In a second aspect, an embodiment of the present invention provides a model parameter configuration device, which is applied to an electronic device, and the device includes: an acquisition module, which is used to acquire a model to be configured, wherein the model to be configured includes a pre-divided logic module; a determination module, which is used to determine a target preset feature as an input parameter of the logic module from multiple preset features; and a configuration module, which is used to configure the target preset feature to achieve parameter configuration of the model to be configured.
[0025] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor and a memory; the memory is used to store programs; the processor is used to implement the model parameter configuration method as described in the first aspect above when executing the program.
[0026] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the model parameter configuration method as described in the first aspect above.
[0027] Compared with the prior art, the model parameter configuration method, device, electronic device and readable storage medium provided in the embodiments of the present invention uniformly manage multiple preset features, abstract the model to be configured in advance, divide it into logical modules, and then determine the target preset features for the logical model. By configuring the target preset features, efficient configuration of the model to be configured is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0029] Figure 1 An example diagram of the logical module division of the WideDeep model provided in an embodiment of the present invention.
[0030] Figure 2 This is an example diagram of the logical module division of the DeepFM model provided in an embodiment of the present invention.
[0031] Figure 3Example of a process for configuring model parameters provided by an embodiment of the present invention Figure 1 .
[0032] Figure 4 Example of a process for configuring model parameters provided by an embodiment of the present invention Figure 2 .
[0033] Figure 5 This is a screenshot of an example of the modification operation provided in an embodiment of the present invention.
[0034] Figure 6 This is a screenshot of an example of the operation of performing shared configuration provided in an embodiment of the present invention.
[0035] Figure 7 Example of a process for configuring model parameters provided by an embodiment of the present invention Figure 3 .
[0036] Figure 8 A block diagram of a model parameter configuration device provided by an embodiment of the present invention is shown.
[0037] Fig. 9 A block diagram of an electronic device provided by an embodiment of the present invention is shown.
[0038] Icons: 10 - electronic device; 11 - processor; 12 - memory; 13 - bus; 100 - model parameter configuration device; 110 - acquisition module; 120 - determination module; 130 - configuration module; 140 - generation module. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0040] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0042] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0043] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0044] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0045] When training a model, algorithm engineers need to set many parameters. Since the parameters and parameter settings are numerous and complex, the usual solution is to set these parameters in a specific format, such as JSON or YAML, and write corresponding code in the model training script to parse these formats. This approach will have the following problems:
[0046] 1. Regardless of whether it is JSON or YAML format, different algorithm engineers may sample in different formats. The inconsistent formats make it impossible to reuse the parsing code for one format for the parsing code for another format.
[0047] 2. Developers are required to manually write and maintain it, which is costly and error-prone.
[0048] 3. The training framework cannot be uniformly compatible. When the model changes, the code needs to be rewritten and the corresponding parameter processing logic needs to be rewritten.
[0049] In view of this, an embodiment of the present invention provides a model parameter configuration method, device, electronic device and readable storage medium to solve the above-mentioned problem, which will be described in detail below.
[0050] In order to simplify the configuration of the model and improve the reuse of features, the embodiments of the present invention are improved from the following two aspects: (1) The model to be configured is divided into one or more logic modules according to the processing logic of the model structure of the model to be configured. When configuring the model to be configured, the input parameters of each logic module are first determined, and then the input parameters are configured, and finally the parameter configuration of the model to be configured is realized. Of course, according to the needs of training, after determining the input parameters of the logic module, the configuration of the logic module can be modified to realize the reconfiguration of the parameters of the model to be configured. (2) After analyzing the reasons for the frequent changes in the code for model training, the inventors found that in the process of model training, it is usually necessary to increase or decrease features, update the order of multiple features in the feature vector, perform some routine configuration on the features, and reuse the same features in different logic processing stages in the same model to be configured. Based on the above analysis results, the inventors abstracted the features of the model to be configured to maximize the reuse of features and simplify configuration.
[0051] The embodiment of the present invention first describes the division of the configuration model, taking the common WideDeep model as an example, please refer to Figure 1 , Figure 1 An example diagram of the logical module division of the WideDeep model provided in an embodiment of the present invention, Figure 1 In the WideDeep model, the wide part, deep part and attention part are each a logical module, namely the wide module, deep module and attention module. Each logical module corresponds to its own input parameters. Features ft1~ft4 are the input parameters of the wide module, features ft5~ft8 are the input parameters of the deep module, and features condition and ft8 are the inputs of the attention module. By setting the input parameters of each module, the parameter configuration of the entire WideDeep model is completed. Taking another common DeepFM model as an example, Figure 2 This is an example diagram of the logical module division of the DeepFM model provided in an embodiment of the present invention. Figure 2 In the figure, the FM1 part, FM2 part, Deep part and attention part of the DeepFM model are each regarded as a logical module, namely FM1 module, FM2 module, Deep module and attention module. Features ft1, ft4 and ft7 are the input parameters of the FM1 module, features ft1, ft2, ft3, ft4 and ft6 are the input parameters of the FM2 module, features ft1~ft8 are the input parameters of the Deep module, and feature condition-fts is the input parameter of the attention module.
[0052] It should be noted that the above is just an example of module division. In fact, users can divide the modules according to the needs of the actual scenario and the needs of logical processing in the actual scenario. Finally, the processing structures of each module are merged to complete the construction of the entire model structure, which simplifies the model structure construction process and reduces the development cost of the model structure construction.
[0053] It should also be noted that the user can also add modules to the model or delete existing modules, or modify the properties of existing modules, such as modifying the name of the module, etc. through the interface.
[0054] After the model to be configured is divided, the following describes in detail the process of configuring the logic modules in the model to be configured based on the divided model. Please refer to Figure 3 , Figure 3 Example of a process for configuring model parameters provided by an embodiment of the present invention Figure 1 , the method comprises the following steps:
[0055] Step S100: obtaining a model to be configured, wherein the model to be configured includes pre-divided logic modules.
[0056] In this embodiment, the model to be configured may be a multimedia resource recommendation model, which recommends multimedia resources that meet the user's preferences based on the user's listening or viewing of multimedia resources. The multimedia resources may be audio, video and other resources, such as song albums, online courses, etc.
[0057] Step S101 : determining a target preset feature as an input parameter of a logic module from a plurality of preset features.
[0058] In this embodiment, the preset features are all the features involved in the model to be configured. This embodiment manages the preset features in a unified manner and abstracts multiple parameters for the preset features. For example, each preset feature supports configuration items such as vector size, feature name, and vector name. The configuration of the model to be configured is achieved by configuring the configuration items.
[0059] In this embodiment, the user can specify one or more preset features as input parameters of the logic module, and the target preset feature is the preset feature used as the input parameter of the logic module among the multiple preset features. The user can conveniently specify the association between the target preset feature and the logic module through the interface, without the need to develop additional code, avoiding the user from changing the code or manually editing the configuration file, allowing the user to focus on building the upper structure of the model and minimize development costs.
[0060] In this embodiment, taking the multimedia resource recommendation model as an example, the preset features may be the ID of the album that the user has listened to obtained based on the user's listening history records, the ID of the host of the album that the user has listened to within the most recent preset historical period, a list of specific time periods that the user has listened to within the most recent preset historical period, etc.
[0061] Step S102, configuring the target preset features to implement parameter configuration of the model to be configured.
[0062] In this embodiment, as an implementation method, the user can first specify the target preset features for the model to be configured and then configure the target preset features, or first configure the preset features and then specify the target preset features for the model to be configured from the configured preset features.
[0063] In this embodiment, configuring the target preset feature may be to modify the value of the configuration item of the target preset feature, or to release the relationship between the target preset feature and the model to be configured, that is, no longer using the target preset feature as an input parameter of the model to be configured.
[0064] The above method provided in this embodiment abstracts the model to be configured in advance, divides it into logical modules, and then determines the target preset features for the logical model. By configuring the target preset features, efficient configuration of the model to be configured is achieved.
[0065] exist Figure 3 Based on this, this embodiment also provides a specific implementation method for determining the preset characteristics of the target, please refer to Figure 4 , Figure 4 Example of a process for configuring model parameters provided by an embodiment of the present invention Figure 2 , step S101 includes the following sub-steps:
[0066] Sub-step S1010, responding to a feature selection operation performed by a user on a display interface, the feature selection operation comprising a target preset feature selected by the user from a plurality of preset features on the display interface.
[0067] In this embodiment, in order to simplify the configuration, the user can determine the target preset features through interface operations. The executor of the model parameter configuration method in this embodiment can be an electronic device. Multiple preset features are displayed on the display interface of the electronic device. The user can select the target preset features that need to be used as input parameters of the model to be configured on the display interface.
[0068] Sub-step S1011, using the target preset features as input parameters of the logic module.
[0069] In this embodiment, as a specific implementation method, an association relationship between a target preset feature and a logic module may be established, and the association method may be marked as an input parameter.
[0070] In this embodiment, the target preset feature may include different expressions, which may be a single preset feature, may include multiple preset features, or may be composed of multiple sub-features. The target preset feature may be at least one of these expressions. Under each expression, the specific configuration may also be different. The main expressions will be introduced below. It can be understood that those skilled in the art can expand on this basis without creative labor.
[0071] In this embodiment, if there is one target preset feature, the method for configuring the target preset feature may be:
[0072] First, in response to a configuration selection operation performed by a user on a display interface, the configuration selection operation includes a target configuration item and a configuration value of the target configuration item selected by the user from basic configuration items on the display interface.
[0073] In this embodiment, the basic configuration item is a configuration item of an independent preset feature, such as feature length, feature vector length, feature entry and exit parameters, etc. The display interface displays the basic configuration items of the target preset feature. For the basic configuration item, the user can edit the basic configuration item by selecting the basic configuration item to enter the configuration value of the basic configuration item. For example, the basic configuration item is: feature name, and the configuration value of the feature name entered is: user-id. Please refer to Figure 5 , Figure 5 This is a screenshot of an example of the modification operation provided in an embodiment of the present invention. Figure 5 In the configuration file, change the value of the emb_size configuration item to 10.
[0074] Secondly, configure the target configuration items according to the configuration values to implement parameter configuration of the model to be configured.
[0075] It should be noted that, when there are multiple target preset features and it is necessary to configure the basic configuration items of any one of the multiple target preset features, the above configuration method can still be used for configuration.
[0076] In this embodiment, if there are multiple target preset features, in order to realize sharing of multiple target preset features, the target preset features are shared and configured, so as to realize parameter configuration of the configuration model in the following manner:
[0077] First, in response to the shared identification value of the shared configuration item of each target preset feature input by the user on the display interface, the shared identification values of at least two target preset features are the same.
[0078] In this embodiment, the display interface displays the shared configuration items of each target preset feature. A sharing relationship can be established by setting the same shared identification value for two or more target preset features. For example, the target preset features include features a, b, c, and d. Setting the shared identification values of the shared configuration items of b, c, and d to bcd means that b, c, and d have a sharing relationship.
[0079] In this embodiment, taking the multimedia resource recommendation model as an example, there may be a sharing relationship between the id feature of the album that the user recently listened to and the id feature of the candidate album, there may be a sharing relationship between the category feature of the album that the user recently listened to and the category feature of the candidate album, there may be a sharing relationship between the id feature of the host of the album that the user recently listened to and the id feature of the host of the candidate album, and so on.
[0080] Secondly, a sharing relationship is established for target preset features with the same shared identification value, and the feature values of the target preset features with a sharing relationship belong to the same set.
[0081] In this embodiment, only target preset features whose feature values belong to the same set can be shared. If the target preset features with a shared relationship have the same feature values, the feature vectors generated in the end are also the same. If the feature value of one of the target preset features changes, the feature value of the other feature with a shared relationship also changes. Figure 6 , Figure 6 This is a screenshot of an example of the operation of performing sharing configuration provided in an embodiment of the present invention. Figure 6 In the example, the values of the feature sharing identifier emb_name in the second and third rows are both set to "test1".
[0082] The feature sharing configuration provided in this embodiment can greatly simplify the maintenance workload of shared features, and also avoid the problems of missed modifications and wrong modifications that are easy to occur when modifying shared features.
[0083] In this embodiment, if the target preset feature has multiple sub-features, the multiple sub-features can be merged or superimposed through different pooling methods, and the target preset feature is pooled to configure the parameters of the configuration model to be configured. The method can be:
[0084] First, a pooling method of a target preset feature input by a user on a display interface is responded to.
[0085] In this embodiment, the display interface displays pooling configuration items of target preset features. The pooling configuration items are edited and a pooling method can be input. The pooling methods include, but are not limited to, average pooling, maximum pooling, and the like.
[0086] Secondly, configure the pooling configuration items in a pooling manner to achieve parameter configuration for the configuration model.
[0087] It should be noted that, for a target preset feature including multiple sub-features, its pooling configuration item can be set or not set as needed.
[0088] It should also be noted that the target preset features may include two or more of the above-mentioned expressions. At this time, the target preset features of each mode can be configured in a corresponding manner. For example, the target preset features include features ft1 to ft5, ft1 to ft4 are independent single features, ft5 is composed of multiple sub-features, ft2 to ft4 are shared features, for ft1 to ft4, their basic configuration items can be configured, for ft2 to ft4, they can be configured with the same shared identification value to establish a sharing relationship between the three, and for ft5, it can be configured with a pooled configuration item.
[0089] In this embodiment, the target preset feature including multiple sub-features is generally used to represent the user's behavior record. Taking the multimedia resource recommendation model as an example, the target preset feature can be the time period of the user's listening in the preset historical period. Taking one day as an example, if the user often listens at night, the time period for listening in one day can be: {17, 19, 21}, which respectively represent the listening time of 17:00, 19:00 and 21:00. At this time, the target preset feature includes 3 sub-features: 17, 19 and 21. Of course, the target preset feature can include the listening time period of multiple days. At this time, the target preset feature can include the features of the listening time period of each day in the multiple days. The target preset feature can be obtained by arranging multiple sub-features in a preset order. The preset order can be a time order or a position order, etc.
[0090] In this embodiment, after the configuration model is set, in order to automatically generate a feature vector according to the configuration item of the target preset feature, this embodiment also provides a specific implementation method for generating a feature vector, please refer to Figure 7 , Figure 7 Example of a process for configuring model parameters provided by an embodiment of the present invention Figure 3 , the method further comprises the following steps:
[0091] Step S110, acquiring feature values and configuration items of target preset features of the logic module, wherein the configuration items include at least one of basic configuration items, shared configuration items, and pooled configuration items.
[0092] In this embodiment, the basic configuration items, shared configuration items and pooled configuration items have been described in the previous embodiments and will not be repeated here.
[0093] Step S111, performing vector processing on the eigenvalue according to the configuration item to obtain an output eigenvector of the logic module.
[0094] In this embodiment, for example, when the target preset feature is one, its basic configuration item is the feature vector length, and the feature vector length is set to 10, then the length of the output feature vector after vector processing is 10.
[0095] When there are multiple target preset features, the basic configuration items of each target preset feature also include sequence configuration items. The sequence configuration items are used to characterize the position of the vector corresponding to the target preset feature in the output feature vector. When there are multiple target preset features, the sequence configuration items can be configured by adjusting the arrangement order of the target preset features on the display interface. For example, the target preset features arranged from top to bottom on the display interface are a, b, c, d, and their order can be adjusted by dragging up or down. For example, they can be adjusted to be: a, d, b, c from top to bottom.
[0096] In this case, the specific implementation method of obtaining the output feature vector of the logic module is:
[0097] First, the eigenvalues of each target preset feature are vectorized to obtain the eigenvector of each target preset feature.
[0098] Secondly, according to the values of the sequential configuration items of each target preset feature, the feature vectors of all target preset features are concatenated to obtain the output feature vector of the logic module.
[0099] For example, the target preset features arranged in order from top to bottom on the display interface are a, b, c, d, and their corresponding vectors are emb1, emb2, emb3, and emb4, then the output feature vector obtained after splicing is emb1emb2emb3 emb4.
[0100] When the target preset feature is composed of multiple sub-features, and the target preset feature is configured with a pooling configuration item, the specific implementation method of obtaining the output feature vector of the logic module is:
[0101] First, the eigenvalue of each sub-feature is vectorized to obtain the eigenvector of each sub-feature.
[0102] Secondly, according to the pooling method of the pooling configuration item, the feature vectors of all sub-features are pooled to obtain the output feature vector of the logic module.
[0103] For example, the target preset feature ft includes three sub-features ft-1, ft-2, and ft-3. The pooling mode configured by the pooling configuration item of ft is average pooling, and the vector length is 5. The feature vectors of ft-1, ft-2, and ft-3 are respectively expressed as: {a1a2a3a4a5}, {b1b2b3b4b5}, and {c1c2c3c4c5}. If the output feature vector is expressed as {x1x2x3x4x5}, where x1=avg(a1, b1, c1), x2=avg(a2, b2, c2), x3=avg(a3, b3, c3), x4=avg(a4, b4, c4), and x5=avg(a5, b5, c5).
[0104] In addition, this embodiment can also export all configuration items to a configuration file and preview the configuration file.
[0105] In order to execute the corresponding steps in the above embodiment and various possible implementations, a model parameter configuration device 100 is provided below, which is applied to electronic devices. Figure 8 , Figure 8 It should be noted that the basic principle and technical effects of the model parameter configuration device 100 provided in this embodiment are the same as those in the above embodiment, and are not mentioned in this embodiment for the sake of brief description.
[0106] The model parameter configuration device 100 includes an acquisition module 110 , a determination module 120 , a configuration module 130 and a generation module 140 .
[0107] The acquisition module 110 is used to acquire the model to be configured, wherein the model to be configured includes pre-divided logic modules.
[0108] The determination module 120 is used to determine a target preset feature as an input parameter of the logic module from a plurality of preset features.
[0109] Optionally, a plurality of preset features are displayed on the display interface of the electronic device, and the determination module 120 is specifically used to: respond to a feature selection operation performed by a user on the display interface, the feature selection operation including a target preset feature selected by the user from a plurality of preset features on the display interface; and use the target preset feature as an input parameter of the logic module.
[0110] The configuration module 130 is used to configure the target preset features to implement parameter configuration of the model to be configured.
[0111] Optionally, there is one target preset feature, and basic configuration items of the target preset feature are displayed on the display interface of the electronic device. The configuration module 130 is specifically used to: respond to a configuration selection operation performed by a user on the display interface, the configuration selection operation including a target configuration item and a configuration value of the target configuration item selected by the user from the basic configuration items on the display interface; configure the target configuration item according to the configuration value to implement parameter configuration of the configuration model.
[0112] Optionally, there are multiple target preset features, and the shared configuration items of each target preset feature are displayed on the display interface of the electronic device. The configuration module 130 is specifically used to: respond to the shared identification value of the shared configuration item of each target preset feature input by the user on the display interface, and the shared identification values of at least two target preset features are the same; establish a sharing relationship for the target preset features with the same shared identification value, and the feature values of the target preset features with a sharing relationship belong to the same set.
[0113] Optionally, the target preset feature includes multiple sub-features, and the pooling configuration items of the target preset feature are displayed on the display interface of the electronic device. The configuration module 130 is specifically used to: respond to the pooling method of the target preset feature input by the user on the display interface; configure the pooling configuration items according to the pooling method to realize the parameter configuration of the configuration model.
[0114] The generation module 140 is used to: obtain the feature value and configuration items of the target preset feature of the logic module, the configuration items include at least one of the basic configuration items, the shared configuration items and the pooled configuration items; perform vector processing on the feature value according to the configuration items to obtain the output feature vector of the logic module.
[0115] Optionally, there are multiple target preset features, and the basic configuration items of each target preset feature include sequential configuration items. The generation module 140 is specifically used to: vectorize the feature value of each target preset feature to obtain the feature vector of each target preset feature; and splice the feature vectors of all target preset features according to the value of the sequential configuration item of each target preset feature to obtain the output feature vector of the logic module.
[0116] The embodiment of the present invention further provides a block diagram of an electronic device 10, and the method in the above embodiment is applied to the electronic device 10, please refer to Fig. 9 , Fig. 9 A block diagram of an electronic device 10 provided in an embodiment of the present invention is shown. The electronic device 10 includes a processor 11, a memory 12 and a bus 13. The processor 11 and the memory 12 are connected via the bus 13.
[0117] The processor 11 may be an integrated circuit chip having signal processing capability. In the implementation process, each step of the model parameter configuration method may be completed by an integrated logic circuit of hardware in the processor 11 or by instructions in the form of software. The above-mentioned processor 11 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0118] The memory 12 is used to store programs, such as Figure 8 The model parameter configuration device 100 in the embodiment. The model parameter configuration device 100 includes at least one software function module that can be stored in the memory 12 in the form of software or firmware or fixed in the operating system (OS) of the electronic device 10. After receiving the execution instruction, the processor 11 executes the program to implement the model parameter configuration method disclosed in the above embodiment.
[0119] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the model parameter configuration method as described above is implemented.
[0120] In summary, an embodiment of the present invention provides a model parameter configuration method, device, electronic device and readable storage medium, which are applied to an electronic device. The method includes: obtaining a model to be configured, wherein the model to be configured includes a pre-divided logic module; determining a target preset feature as an input parameter of the logic module from multiple preset features; and configuring the target preset feature to achieve parameter configuration of the model to be configured.
[0121] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A model parameter configuration method, characterized in that: Applied to electronic equipment, the method comprises: Obtain a model to be configured, wherein the model to be configured includes logic modules pre-divided based on abstract features of the model to be configured, each logic module corresponds to a respective input parameter, and the model to be configured is a WideDeep model or a DeepFM model. If the model to be configured is a WideDeep model, the logic modules of the model to be configured include a Wide module, a Deep module, and an attention module: The input parameters of the Wide module of the WideDeep model include input features and input vectors converted from the input features, and the Wide module of the WideDeep model includes the input parameters of the module, a connection processing layer for connecting the input vectors of the module, and a Wide part; The input parameters of the Deep module of the WideDeep model include input features and input vectors converted from the input features. The Deep module of the WideDeep model includes the input parameters of the module, a connection processing layer for connecting the input vectors of the module, a deep processing layer for performing deep processing on the output of the connection processing layer, an attention part, and a Deep part. The input parameters of the attention module of the WideDeep model include conditional features and conditional vectors converted from the conditional features, and the attention module of the WideDeep model includes the input features of the module; If the model to be configured is a DeepFM model, the logic modules of the model to be configured include an FM1 module, an FM2 module, a Deep module, and an attention module: The input parameters of the FM1 module of the DeepFM model include input features, and the FM1 module of the DeepFM model includes the input features of the module and the FM1 part; The input parameters of the FM2 module of the DeepFM model include input features and input vectors converted from the input features, and the FM2 module of the DeepFM model includes the input parameters of the module, a connection processing layer for connecting the input vectors of the module, and the FM2 part; The input parameters of the Deep module of the DeepFM model include input features and input vectors converted from the input features. The Deep module of the DeepFM model includes the input parameters of the module, a deep processing layer for performing deep processing on the input vector of the module, an attention part, and a Deep part. The input parameters of the attention module of the DeepFM model include conditional features and conditional vectors converted from the conditional features, and the attention module of the DeepFM model includes the input features of the module; The input of the attention part is the conditional vector of the attention module and the input vector in the Deep module; Determine a target preset feature as an input parameter of the logic module from a plurality of preset features, wherein there are a plurality of logic modules, and the same preset feature is repeatedly used in different logic processing stages of the same model to be configured; The target preset features are configured to implement parameter configuration of the model to be configured.
2. The model parameter configuration method according to claim 1, characterized in that: A plurality of preset features are displayed on the display interface of the electronic device, and the step of determining a target preset feature as input to the logic module from the plurality of preset features comprises: In response to a feature selection operation by a user on the display interface, the feature selection operation includes a target preset feature selected by the user from the plurality of preset features on the display interface; The target preset characteristics are used as input parameters of the logic module.
3. The model parameter configuration method according to claim 1, characterized in that: The target preset feature is one, and basic configuration items of the target preset feature are displayed on the display interface of the electronic device. The step of configuring the target preset feature to realize parameter configuration of the model to be configured includes: Responding to a configuration selection operation performed by a user on the display interface, the configuration selection operation including a target configuration item selected by the user from the basic configuration items on the display interface and a configuration value of the target configuration item; The target configuration item is configured according to the configuration value to implement parameter configuration of the model to be configured.
4. The model parameter configuration method according to claim 1, characterized in that: There are multiple target preset features, and a shared configuration item of each target preset feature is displayed on the display interface of the electronic device. The step of configuring the target preset features to implement parameter configuration of the model to be configured includes: In response to a shared identification value of a shared configuration item of each of the target preset features input by a user on the display interface, the shared identification values of at least two of the target preset features are the same; A sharing relationship is established for the target preset features having the same shared identification value, and the feature values of the target preset features having the sharing relationship belong to the same set.
5. The model parameter configuration method according to claim 1, characterized in that: The target preset feature includes a plurality of sub-features, and a pooled configuration item of the target preset feature is displayed on a display interface of the electronic device. The step of configuring the target preset feature to implement parameter configuration of the model to be configured includes: A pooling method of the target preset feature in response to input by the user on the display interface; The pooling configuration items are configured according to the pooling method to implement parameter configuration of the model to be configured.
6. The model parameter configuration method according to claim 1, characterized in that: The method further comprises: Acquire a characteristic value and a configuration item of a target preset characteristic of the logic module, wherein the configuration item includes at least one of a basic configuration item, a shared configuration item, and a pooled configuration item; The eigenvalue is vector-processed according to the configuration item to obtain an output eigenvector of the logic module.
7. The model parameter configuration method according to claim 6, characterized in that: There are multiple target preset features, and the basic configuration items of each target preset feature include sequential configuration items. The step of performing vector processing on the feature value according to the configuration items to obtain the output feature vector of the logic module includes: Performing vectorization processing on the characteristic value of each of the target preset characteristics to obtain the characteristic vector of each of the target preset characteristics; According to the values of the sequential configuration items of each of the target preset features, the feature vectors of all the target preset features are concatenated to obtain the output feature vector of the logic module.
8. A model parameter configuration device, characterized in that: Applied to electronic equipment, the device comprises: An acquisition module is used to acquire a model to be configured, wherein the model to be configured includes logic modules pre-divided based on abstract features of the model to be configured, each logic module corresponds to a respective input parameter, and the model to be configured is a WideDeep model or a DeepFM model. If the model to be configured is a WideDeep model, the logic modules of the model to be configured include a Wide module, a Deep module, and an attention module: The input parameters of the Wide module of the WideDeep model include input features and input vectors converted from the input features, and the Wide module of the WideDeep model includes the input parameters of the module, a connection processing layer for connecting the input vectors of the module, and a Wide part; The input parameters of the Deep module of the WideDeep model include input features and input vectors converted from the input features. The Deep module of the WideDeep model includes the input parameters of the module, a connection processing layer for connecting the input vectors of the module, a deep processing layer for performing deep processing on the output of the connection processing layer, an attention part, and a Deep part. The input parameters of the attention module of the WideDeep model include conditional features and conditional vectors converted from the conditional features, and the attention module of the WideDeep model includes the input features of the module; If the model to be configured is a DeepFM model, the logic modules of the model to be configured include an FM1 module, an FM2 module, a Deep module, and an attention module: The input parameters of the FM1 module of the DeepFM model include input features, and the FM1 module of the DeepFM model includes the input features of the module and the FM1 part; The input parameters of the FM2 module of the DeepFM model include input features and input vectors converted from the input features, and the FM2 module of the DeepFM model includes the input parameters of the module, a connection processing layer for connecting the input vectors of the module, and the FM2 part; The input parameters of the Deep module of the DeepFM model include input features and input vectors converted from the input features. The Deep module of the DeepFM model includes the input parameters of the module, a deep processing layer for performing deep processing on the input vector of the module, an attention part, and a Deep part. The input parameters of the attention module of the DeepFM model include conditional features and conditional vectors converted from the conditional features, and the attention module of the DeepFM model includes the input features of the module; The input of the attention part is the conditional vector of the attention module and the input vector in the Deep module; A determination module, used to determine a target preset feature as an input parameter of the logic module from a plurality of preset features, wherein there are a plurality of logic modules, and the same preset feature is repeatedly used in different logic processing stages in the same model to be configured; The configuration module is used to configure the preset characteristics of the target to realize parameter configuration of the model to be configured.
9. An electronic device, characterized in that: It comprises a processor and a memory; the memory is used to store a program; the processor is used to implement the model parameter configuration method as described in any one of claims 1 to 7 when executing the program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the model parameter configuration method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
AI application-oriented continuous construction method and device, terminal and storage medium
CN110489093A
Method for improving accuracy of quantized multi-level object detection network
CN114444650A
Microservice development method and apparatus, storage medium, and electronic device
WO2022095412A1