Index feature generation method and device, computer device, readable storage medium and program product
By generating and filtering indicator features using a large model, the problem of low feature generation efficiency was solved, achieving automated and high-speed feature generation and filtering, discovering diverse features, and improving feature generation efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI PUDONG DEVELOPMENT BANK
- Filing Date
- 2024-12-25
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, feature generation methods are inefficient, especially in the case of high-dimensional data, where frequent human intervention leads to low feature generation efficiency and a large number of redundant features.
By acquiring descriptive information, feature generation methods, and reference code text from the credit information dataset, a large model is used to generate target code text, automatically generating indicator features, and selecting effective features under preset conditions.
It improves the efficiency of indicator feature generation, discovers features overlooked by human experts, enriches feature diversity, avoids human intervention, and enhances the efficiency of feature generation and screening.
Smart Images

Figure CN119670701B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for generating indicator features. Background Technology
[0002] With the development of automated feature engineering technology, indicator feature generation technology has emerged. Automated feature engineering can effectively reduce manpower and time costs, improve the efficiency of high-value feature selection, and thus improve the efficiency and performance of machine learning model construction.
[0003] In traditional techniques, feature generation methods approach exhaustive feature combinations, often resulting in a large number of redundant and worthless features. When the original data has a high dimensionality, automatic feature generation methods cannot exhaustively list all combinations, leading to extremely long processing times. In such cases, expert-designed features become necessary, resulting in low feature generation efficiency and requiring manual intervention.
[0004] However, current methods for manually participating in feature generation suffer from inefficiency. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve the efficiency of generating indicator features in response to the above-mentioned technical problems.
[0006] Firstly, this application provides a method for generating indicator features, the method comprising:
[0007] Obtain prompt words, which include descriptive information of the credit information dataset, feature generation methods, and reference code text;
[0008] The description information of the credit information dataset, the feature generation method, and the reference code text are input into the large model to obtain the target code text output by the large model;
[0009] Execute the target code text to generate the indicator features corresponding to the credit information dataset;
[0010] If the indicator feature meets the preset conditions, the indicator feature is output.
[0011] In one embodiment, the large model includes a text embedding model; the method further includes:
[0012] Obtain the corresponding credit information dataset based on the description information of the credit information dataset;
[0013] The elements in the credit information dataset are transformed into feature vectors using the text embedding model.
[0014] Based on the feature generation method, determine the feature mapping function;
[0015] The target code text is determined based on the feature vector, the feature mapping function, and the reference code text.
[0016] In one embodiment, the step of converting elements in the credit information dataset into feature vectors using the text embedding model includes:
[0017] The elements in the credit information dataset are segmented into words to obtain the segmented text representation.
[0018] The text representation is then converted into a corresponding feature vector.
[0019] In one embodiment, the preset conditions include a first preset condition and a second preset condition; the step of outputting the indicator feature when the indicator feature meets the preset conditions includes:
[0020] If the indicator feature meets the first preset condition, the indicator feature is retained; wherein, the first preset condition indicates that the performance of the evaluation indicator corresponding to the addition of the indicator feature is better than the performance of the evaluation indicator corresponding to the absence of the indicator feature.
[0021] If the retained indicator features meet the second preset condition, the indicator features are output; wherein, the second preset condition indicates that the performance of the evaluation indicator corresponding to the indicator features has reached the target value.
[0022] In one embodiment, before retaining the indicator feature when the indicator feature meets the first preset condition, the method further includes:
[0023] The aforementioned indicator features are added to the training set and the validation set respectively to obtain a new training set and a new validation set;
[0024] The initial credit assessment model is trained using the new training set to obtain the target credit assessment model;
[0025] The target credit assessment model is evaluated using the new validation set to obtain a first evaluation result.
[0026] Obtain a second evaluation result, wherein the second evaluation result is determined based on the performance evaluation of the target credit assessment model using the validation set;
[0027] The step of retaining the indicator feature when the indicator feature meets the first preset condition includes:
[0028] If the performance of the evaluation index of the first evaluation result is improved compared to the performance of the evaluation index of the second evaluation result, the index characteristics are retained.
[0029] In one embodiment, the step of outputting the indicator feature when the retained indicator feature meets a second preset condition includes:
[0030] If the retained indicator features enable the performance of the evaluation indicator of the first evaluation result to reach the target value, then the indicator features are output.
[0031] Secondly, this application also provides an indicator feature generation device, the device comprising:
[0032] The first acquisition module is used to acquire prompt words, which include descriptive information of the credit information dataset, feature generation methods, and reference code text;
[0033] The second acquisition module is used to input the description information of the credit information dataset, the feature generation method and the reference code text into the large model, and acquire the target code text output by the large model;
[0034] The execution generation module is used to execute the target code text and generate the indicator features corresponding to the credit information dataset;
[0035] The judgment output module is used to output the indicator feature when the indicator feature meets the preset conditions.
[0036] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.
[0038] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method.
[0039] The aforementioned method, apparatus, computer equipment, computer-readable storage medium, and computer program product for generating indicator features first obtain prompt words, which include descriptive information of the credit information dataset, feature generation methods, and reference code text. Second, the descriptive information of the credit information dataset, feature generation methods, and reference code text are input into a large model to obtain the target code text output by the large model. This is then introduced into the large model, which generates the target code text based on the prompt words, executes the target code text, and generates the indicator features corresponding to the credit information dataset. On the one hand, this approach eliminates reliance on manual intervention, improving the efficiency of indicator feature generation. On the other hand, by utilizing the divergent and logical capabilities of the large model, features overlooked by human experts may be discovered, enriching the diversity of indicator features. Finally, if the indicator features meet preset conditions, the indicator features are output, thereby filtering the indicator features generated by the large model. The indicator features that meet the conditions can be used as the final indicator features, thus avoiding manual intervention in the generation and filtering of indicator features and improving the efficiency of generating and determining the final indicator features. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart illustrating an indicator feature generation method in one embodiment;
[0042] Figure 2 This is a flowchart illustrating the indicator feature generation method in another embodiment;
[0043] Figure 3 This is a flowchart illustrating the process of converting elements in a credit information dataset into feature vectors in one embodiment.
[0044] Figure 4 This is a flowchart illustrating the process of outputting indicator features when the indicator features meet preset conditions in one embodiment.
[0045] Figure 5 This is a flowchart illustrating the process of determining whether a first preset condition is met in one embodiment;
[0046] Figure 6 This is a structural block diagram of an indicator feature generation device in one embodiment;
[0047] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] In one exemplary embodiment, such as Figure 1 As shown, a method for generating indicator features is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, and to a system including both a terminal and a server, and can be implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S102 to S108:
[0050] Step S102: Obtain prompt words, which include descriptive information of the credit information dataset, feature generation methods, and reference code text.
[0051] The prompt words are described using natural language, which refers to a language that naturally evolves with culture. Examples of natural languages include English and Chinese. Natural language is the primary tool for human communication and thought. Logical language, in contrast to natural language, is the communication tool between the human brain and computers.
[0052] The descriptive information of a credit information dataset includes the main content it contains, such as the field types and meanings of the elements. Examples include account status, account opening date, employment information, and financial information.
[0053] Feature generation methods include feature combination, such as addition, subtraction, dot product, cross product, matrix multiplication, etc. They also include conditional feature filtering, such as setting conditional features like "age between 20 and 30 years old, male," etc.
[0054] Reference code text is a pre-written piece of code text that serves as a reference for generating new features.
[0055] Optionally, the server obtains natural language descriptive prompts, which include descriptive information from the credit information dataset, such as account status, account opening time, employment information, and financial information. The prompts also include feature generation methods, such as filtering based on conditional features, like "age between 20 and 30 years old, male, financial information." The prompts also include reference code text, such as Python code text or C language code text.
[0056] Step S104: Input the description information, feature generation method and reference code text of the credit information dataset into the large model, and obtain the target code text output by the large model.
[0057] Optionally, the server inputs the description information, feature generation method, and reference code text of the credit information dataset into the large model. The large model processes the description information, feature generation method, and reference code text of the credit information dataset and outputs the target code text generated based on the reference code text. The server obtains the target code text output by the large model, such as Python code text.
[0058] Step S106: Execute the target code text to generate the indicator features corresponding to the credit information dataset.
[0059] Optionally, when the server executes the target code text, it uses the feature generation method as a function, the elements in the credit information dataset as input to the feature generation method function, and the output of the feature generation method function is the indicator feature corresponding to the credit information dataset, that is, new field types or field meanings that do not exist in the credit information dataset are used as new indicator features.
[0060] Step S108: If the indicator features meet the preset conditions, output the indicator features.
[0061] Optionally, the server evaluates the indicator features to determine whether they meet preset conditions. If the indicator features meet the preset conditions, they are output; otherwise, the target code text is re-executed to generate new indicator features corresponding to the credit information dataset. The new indicator features are then evaluated to determine whether they meet the preset conditions. The server only outputs indicator features that meet the preset conditions. The output indicator features are considered qualified indicator features.
[0062] In the aforementioned indicator feature generation method, firstly, prompt words are obtained, including descriptive information of the credit information dataset, feature generation methods, and reference code text. Secondly, the descriptive information of the credit information dataset, feature generation methods, and reference code text are input into a large model to obtain the target code text output by the large model. The large model is then used to generate the target code text based on the prompt words, execute the target code text, and generate the indicator features corresponding to the credit information dataset. This method improves the efficiency of indicator feature generation by eliminating reliance on manual intervention. Furthermore, by utilizing the divergent and logical capabilities of the large model, features overlooked by human experts may be discovered, enriching the diversity of indicator features. Finally, if the indicator features meet preset conditions, the indicator features are output, thus filtering the indicator features generated by the large model. The indicator features that meet the conditions can be used as the final indicator features, thereby avoiding manual intervention in the generation and filtering of indicator features and improving the efficiency of generating and determining the final indicator features.
[0063] In one exemplary embodiment, such as Figure 2As shown, a method for generating indicator features is provided, with the large model including a text embedding model; the method includes the following steps S202 to S208. Wherein:
[0064] Step S202: Obtain the corresponding credit information dataset based on the description information of the credit information dataset.
[0065] Optionally, the large model receives descriptive information from the credit information dataset and retrieves the corresponding credit information dataset from the database based on this descriptive information. The large model can be deployed on a server.
[0066] Step S204: The elements in the credit information dataset are transformed into feature vectors using a text embedding model.
[0067] Text embedding, also known as word embedding, is a model that transforms a certain type of input data (such as text, images, and sounds) into a dense numerical vector.
[0068] Feature vectors are the foundation upon which large models can understand and process data.
[0069] Optionally, the large model uses an embedding model to transform each element in the credit information dataset into a feature vector.
[0070] Step S206: Determine the feature mapping function according to the feature generation method.
[0071] Optionally, the large model constructs a feature mapping function based on the description of the feature generation method. The feature mapping function may involve various vector operations, such as addition, subtraction, dot product, cross product, matrix multiplication, or logical judgments. These operations combine and transform the feature vectors corresponding to the elements in the credit information dataset according to the logic of the feature generation method, in order to generate new feature vectors.
[0072] Step S208: Determine the target code text based on the feature vector, feature mapping function, and reference code text.
[0073] Optionally, the large model generates target code text that calls the feature mapping function to calculate the feature vector, based on the reference code text.
[0074] In this embodiment, a large-scale model is used to automatically create and generate target code text for new indicator features throughout the entire process, without relying on manual design of feature generation logic, thus improving feature generation efficiency. Simultaneously, by leveraging the divergent and logical capabilities of the large-scale model to analyze feature generation methods and credit information data, indicator features overlooked by human experts can be discovered, thereby enriching the diversity of indicator features.
[0075] In one exemplary embodiment, such as Figure 3 As shown, the elements in the credit information dataset are transformed into feature vectors using a text embedding model, including steps S302 to S304. Wherein:
[0076] Step S302: The elements in the credit information dataset are segmented into words to obtain the segmented text representation.
[0077] Optionally, the large model uses a text embedding model to segment the elements in the credit information dataset. The server segments the elements in the credit information dataset into individual words or phrases. For example, the input sentence "I love natural language processing" might be segmented into "I / love / natural language / processing". The segmented words are then converted into text representations.
[0078] Step S304: Convert the text representation into the corresponding feature vector.
[0079] Optionally, the large model uses a text embedding model to convert the segmented text representations into feature vectors, also known as word embeddings.
[0080] In this embodiment, by performing word segmentation on the elements in the credit information dataset and converting the segmented text identifiers into corresponding feature vectors, the large model can mine features that human experts overlook based on these feature vectors. This improves the performance of subsequent indicator features on the machine learning model.
[0081] In one exemplary embodiment, such as Figure 4 As shown, the preset conditions include a first preset condition and a second preset condition; when the indicator feature meets the preset conditions, the indicator feature is output, including steps S402 to S404. Wherein:
[0082] Step S402: If the indicator features meet the first preset condition, retain the indicator features.
[0083] The first preset condition indicates that the performance of the evaluation index corresponding to the inclusion of indicator features is better than the performance of the evaluation index corresponding to the absence of indicator features.
[0084] Optionally, when the server acquires indicator features, it adds these features to the training set and trains a credit assessment model using the training set with the added features. The credit assessment model is determined based on a machine learning model. If the performance of the credit assessment model with the added features is better than that without, the indicator features are considered to meet a first preset condition, and the server retains the indicator features that improve the performance of the assessment indicators. The assessment indicators can include the accuracy, precision, recall, and area under the curve (AUC) of the credit assessment model. For example, if the accuracy and precision of the credit assessment model trained with the added indicator features are significantly higher than those trained without, the indicator features are considered to meet the first preset condition, and the server retains the indicator features that improve the performance of the assessment indicators.
[0085] Optionally, if the performance of the evaluation indicator corresponding to the added indicator feature is better than that of the evaluation indicator corresponding to the unadded indicator feature, that is, the performance of the evaluation indicator corresponding to the added indicator feature is worse than that of the evaluation indicator corresponding to the unadded indicator feature, then the indicator feature is considered not to meet the first preset condition, and the server will delete the indicator feature that does not meet the first preset condition.
[0086] Step S404: If the retained indicator features meet the second preset condition, output the indicator features.
[0087] Among them, the performance of the evaluation index corresponding to the second preset condition indicator reaches the target value.
[0088] Optionally, if the retained indicator features satisfy the requirement that the performance of the corresponding evaluation indicators reaches the target value, for example, the target values for the performance of the evaluation indicators of the credit assessment model are: accuracy of 85, precision of 80, recall of 5, and AUC of 75. If the retained indicator features enable the performance of the credit assessment model to reach the target value, it indicates that the second preset condition is met, and the server will output the retained indicator features.
[0089] Optionally, if the retained indicator features cannot meet the target value of the evaluation indicator performance corresponding to the indicator features, the server re-acquires new indicator features, and judges and filters the new indicator features according to the first preset condition and the second preset condition, retains the new indicator features that meet the first preset condition, and outputs the retained new indicator features that meet the second preset condition.
[0090] In this embodiment, by judging and filtering the first preset condition and the second preset condition, it is possible to obtain the indicator features that improve the performance of the credit assessment model and enable the credit assessment model to reach its optimal state.
[0091] In one exemplary embodiment, such as Figure 5 As shown, before retaining the indicator features when the indicator features meet the first preset condition, the process includes steps S502 to S508. Wherein:
[0092] Step S502: Add the indicator features to the training set and validation set respectively to obtain a new training set and a new validation set.
[0093] The training set is the dataset used to train the credit assessment model. The validation set is the dataset used to evaluate the performance of the credit assessment model during training, but it is not involved in the training of the credit assessment model. It is used to adjust the hyperparameters of the model and select the optimal model architecture.
[0094] Optionally, the server adds the indicator features to the training set (TS) to obtain a new training set; at the same time, it adds the indicator features to the validation set (VS) to obtain a new validation set.
[0095] Step S504: Train the initial credit assessment model using a new training set to obtain the target credit assessment model.
[0096] Optionally, the server trains the initial credit assessment model using a new training set, such as financial information (within one year), account information, and newly generated indicator features, such as financial information for a specific period within one year, to obtain the target credit assessment model.
[0097] Step S506: The target credit assessment model is evaluated using a new validation set to obtain the first evaluation result.
[0098] Optionally, the server performs a performance evaluation on the target information evaluation model using a new validation set to obtain a first evaluation result, which may include, for example, accuracy x, precision y, recall z, and AUC s. Here, x, y, z, and s are all arbitrary natural numbers.
[0099] Step S508: Obtain the second evaluation result, wherein the second evaluation result is determined based on the performance evaluation of the target credit assessment model using the validation set.
[0100] Optionally, before obtaining the second evaluation result, the server performs a performance evaluation on the target credit assessment model based on the validation set. For example, the second evaluation result includes accuracy X, precision Y, recall Z, and AUC S. X, Y, Z, and S are all arbitrary natural numbers.
[0101] If the indicator features meet the first preset condition, retain the indicator features, including step S510:
[0102] Step S510: If the performance of the evaluation index of the first evaluation result is improved compared with the performance of the evaluation index of the second evaluation result, the index characteristics are retained.
[0103] Among these, higher values for accuracy, precision, and AUC indicate better performance of the target credit assessment model. Conversely, lower recall indicates better performance of the target credit assessment model.
[0104] Optionally, the first evaluation result may include, for example, precision (x), accuracy (y), recall (z), and AUC (s). Here, x, y, z, and s are all arbitrary natural numbers. The second evaluation result may include precision (X), accuracy (Y), recall (Z), and AUC (S). Here, X, Y, Z, and S are all arbitrary natural numbers. If precision x > X; accuracy y > Y; recall z < Z; and AUC s > S, it indicates that the performance of the evaluation metrics in the first evaluation result is improved compared to the performance of the evaluation metrics in the second evaluation result, and the metric features are retained.
[0105] If accuracy x < X; precision y < Y; recall z > Z; and AUC s < S, it indicates that the performance of the evaluation indicators of the first evaluation result has decreased compared to the performance of the evaluation indicators of the second evaluation result, and the indicator features should be deleted.
[0106] In this embodiment, two evaluation results for the target credit assessment model can be obtained using a new training set, a new validation set, and a new validation set. Based on the comparison of the two evaluation results, it is determined whether the indicator features need to be retained. Retained indicator features can improve the performance of the target credit assessment model, such as increasing its accuracy and precision.
[0107] In an exemplary embodiment, if the retained indicator features meet the second preset conditions, the indicator features are output, including: if the retained indicator features cause the performance of the evaluation indicator of the first evaluation result to reach the target value, then the indicator features are output.
[0108] Optionally, the server will continue to determine the second preset condition for the retained indicator features. The second preset condition includes that the retained indicator features enable the performance of the evaluation indicators of the first evaluation result to reach the target value, with target values for precision (X'), precision (Y'), recall (Z'), and AUC (S'). For example, the target value for precision is 85, the target value for precision is 80, the target value for recall is 5, and the target value for AUC is 75. It should be noted that the specific values of the target values are not limited here; any value that conforms to the actual situation of the target credit assessment model is acceptable. The first evaluation result includes precision (x), precision (y), recall (z), and AUC (s). If precision (x) > X', precision (y) > Y', recall (z) < Z', and AUC (s) > S', it indicates that the performance of the evaluation indicators of the first evaluation result enables the performance of the target credit assessment model to reach its optimal level, and the server outputs the indicator features that enable the performance of the target credit assessment model to reach its optimal level.
[0109] Optionally, if the accuracy is x < X', precision is y < Y', recall is z > Z', and AUC is s < S', it indicates that the performance of the evaluation indicators of the first evaluation result cannot optimize the performance of the target credit evaluation model. In this case, the server continues to judge the new indicator features under the first and second preset conditions until the indicator features output by the server meet the stopping conditions.
[0110] In this embodiment, by judging the second preset condition, the indicator features that enable the target credit assessment model to achieve optimal performance can be obtained and output.
[0111] In an exemplary embodiment, the server obtains natural language descriptive prompts, which include descriptive information about the credit information dataset, such as account status, account opening time, employment information, and financial information. The prompts also include feature generation methods, such as filtering based on conditional features, like "age between 20 and 30 years old, male, financial information." The prompts also include reference code text, such as Python or C language code text. The server inputs the descriptive information of the credit information dataset, the feature generation methods, and the reference code text into a large model. The large model processes the descriptive information, feature generation methods, and reference code text, outputting target code text generated based on the reference code text. The server obtains the target code text output by the large model, such as Python code text. When executing the target code text, the server uses the feature generation method as a function, with elements from the credit information dataset as input to the feature generation method function. The output of the feature generation method function is the corresponding indicator feature of the credit information dataset, i.e., new field types or field meanings not present in the credit information dataset are used as new indicator features.
[0112] The server adds the indicator features to the training set (TS) to obtain a new training set; simultaneously, it adds the indicator features to the validation set (VS) to obtain a new validation set. The server trains the initial credit assessment model using the new training set, which may include financial information (within one year), account information, and newly generated indicator features such as financial information for a specific period within one year, resulting in the target credit assessment model. The server then evaluates the performance of the target credit assessment model using the new validation set, obtaining a first evaluation result. This first evaluation result may include, for example, precision x, accuracy y, recall z, and AUC s, where x, y, z, and s are all arbitrary natural numbers. The server then performs a second performance evaluation on the target credit assessment model based on the validation set, resulting in a second evaluation result including precision X, accuracy Y, recall Z, and AUC S, where X, Y, Z, and S are all arbitrary natural numbers. If accuracy x > X; accuracy y > Y; recall z < Z; and AUC s > S, it indicates that the performance of the indicator indicators in the first evaluation result is improved compared to the second evaluation result, and the indicator features are retained. If precision x < X, accuracy y < Y, recall z > Z, and AUC s < S, it indicates that the performance of the evaluation metrics in the first evaluation result has decreased compared to the second evaluation result, and the feature is deleted. The server will continue to judge the retained feature based on a second preset condition. This second preset condition includes that the retained feature enables the performance of the evaluation metrics in the first evaluation result to reach the target value, with a target value of X' for accuracy, Y' for precision, Z' for recall, and S' for AUC. For example, the target value for accuracy is 85, the target value for precision is 80, the target value for recall is 5, and the target value for AUC is 75. It should be noted that the specific values of the target values are not limited here; any value that conforms to the actual situation of the target credit assessment model is acceptable. The first evaluation result includes accuracy x, precision y, recall z, and AUC s. If the accuracy is x > X', precision y > Y', recall z < Z', and AUC s > S', it indicates that the performance of the evaluation indicators in the first evaluation result optimizes the performance of the target credit assessment model, and the server outputs the indicator features that optimize the performance of the target credit assessment model. If the accuracy is x < X', precision y < Y', recall z > Z', and AUC s < S', it indicates that the performance of the evaluation indicators in the first evaluation result fails to optimize the performance of the target credit assessment model, and the server continues to judge the new indicator features according to the first and second preset conditions until the indicator features output by the server meet the stopping conditions.
[0113] The large model includes a text embedding model; the method also includes: the large model receives descriptive information from a credit information dataset and retrieves the corresponding credit information dataset from a database based on the descriptive information. The large model can be deployed on a server. The large model performs word segmentation on the elements in the credit information dataset using the text embedding model. The server segments the elements in the credit information dataset into individual words or phrases. For example, the input sentence "I love natural language processing" might be segmented into "I / love / natural language / processing". The segmented words are then converted into text representations. The large model uses the text embedding model to convert the segmented text representations into corresponding feature vectors, also known as word embeddings. The large model constructs a feature mapping function based on the description of the feature generation method. The feature mapping function may involve various vector operations, such as addition, subtraction, dot product, cross product, matrix multiplication, or logical judgments. These operations combine and transform the feature vectors corresponding to the elements in the credit information dataset according to the logic of the feature generation method to generate new feature vectors. The large model generates target code text that calls the feature mapping function to calculate the feature vectors, based on the reference code text.
[0114] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0115] Based on the same inventive concept, this application also provides an indicator feature generation apparatus for implementing the indicator feature generation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more indicator feature generation apparatus embodiments provided below can be found in the limitations of the indicator feature generation method described above, and will not be repeated here.
[0116] In one exemplary embodiment, such as Figure 6 As shown, an indicator feature generation device is provided, including: a first acquisition module 601, a second acquisition module 602, an execution generation module 603, and a judgment output module 604, wherein:
[0117] The first acquisition module 601 is used to acquire prompt words, which include descriptive information of the credit information dataset, feature generation methods, and reference code text.
[0118] The second acquisition module 602 is used to input the description information, feature generation method and reference code text of the credit information dataset into the large model and obtain the target code text output by the large model.
[0119] The execution generation module 603 is used to execute the target code text and generate the indicator features corresponding to the credit information dataset.
[0120] The judgment output module 604 is used to output the indicator features when the indicator features meet the preset conditions.
[0121] In one exemplary embodiment, an indicator feature generation apparatus further includes:
[0122] The third acquisition module is used to acquire the corresponding credit information dataset based on the description information of the credit information dataset.
[0123] The vector transformation module is used to transform elements in a credit information dataset into feature vectors using a text embedding model.
[0124] The feature mapping function determination module is used to determine the feature mapping function based on the feature generation method.
[0125] The target code determination module is used to determine the target code text based on the feature vector, feature mapping function, and reference code text.
[0126] In one exemplary embodiment, the vector transformation module includes:
[0127] The word segmentation unit is used to segment elements in the credit information dataset into words to obtain the segmented text representation.
[0128] The transformation unit is used to transform the text representation into the corresponding feature vector.
[0129] In an exemplary embodiment, the preset conditions include a first preset condition and a second preset condition; the judgment output module includes:
[0130] The first judgment unit is used to retain the indicator features when the indicator features meet the first preset condition; wherein the first preset condition indicates that the performance of the evaluation indicator corresponding to the added indicator features is better than the performance of the evaluation indicator corresponding to the unadded indicator features.
[0131] The second judgment unit is used to output the indicator features when the retained indicator features meet the second preset conditions; wherein the second preset conditions indicate that the performance of the evaluation indicator corresponding to the indicator features has reached the target value.
[0132] In one exemplary embodiment, an indicator feature generation apparatus further includes:
[0133] The indicator features are added to the training set and validation set respectively to obtain a new training set and a new validation set; the initial credit assessment model is trained using the new training set to obtain the target credit assessment model; the target credit assessment model is evaluated using the new validation set to obtain the first evaluation result; and the second evaluation result is obtained, wherein the second evaluation result is determined based on the performance evaluation of the target credit assessment model using the validation set.
[0134] The first judgment unit is also used to retain the indicator characteristics when the performance of the evaluation indicator of the first evaluation result is improved relative to the performance of the evaluation indicator of the second evaluation result.
[0135] In an exemplary embodiment, the second judgment unit is further configured to output the indicator features if the retained indicator features cause the performance of the evaluation indicator of the first evaluation result to reach the target value.
[0136] Each module in the aforementioned indicator feature generation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0137] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores a credit information dataset. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements an indicator feature generation method.
[0138] Those skilled in the art will understand that Figure 7The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0139] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0140] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0141] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0142] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0143] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0144] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An index feature generation method characterized by, Applied to a server, the method includes: Obtain prompt words, which include descriptive information of the credit information dataset, feature generation methods, and reference code text; wherein, the reference code text is a pre-written code text that serves as a reference for generating new features; the reference code text includes Python code text or C language code text; The description information of the credit information dataset, the feature generation method, and the reference code text are input into a large model to obtain the target code text output by the large model; wherein, the large model is deployed on a server; the large model includes a text embedding model; the large model is used to obtain the corresponding credit information dataset based on the description information of the credit information dataset; the elements in the credit information dataset are converted into feature vectors through the text embedding model; a feature mapping function is determined according to the feature generation method; the target code text is determined according to the feature vectors, the feature mapping function, and the reference code text; the feature mapping function includes addition, subtraction, dot product, cross product, matrix multiplication, or logical judgment; the logical judgment includes conditional feature filtering; Execute the target code text to generate the indicator features corresponding to the credit information dataset; When the target code text is executed, the feature generation method is used as a function, the elements in the credit information dataset are used as the input of the feature generation method function, and the indicator features corresponding to the credit information dataset are used as the output of the feature generation method function. If the indicator feature meets the preset conditions, the indicator feature is output.
2. The method of claim 1, wherein, The process of converting elements in the credit information dataset into feature vectors using the text embedding model includes: The elements in the credit information dataset are segmented into words to obtain the segmented text representation. The text representation is then converted into a corresponding feature vector.
3. The method of claim 1, wherein, The preset conditions include a first preset condition and a second preset condition; the step of outputting the indicator feature when the indicator feature meets the preset conditions includes: If the indicator feature meets the first preset condition, the indicator feature is retained; wherein, the first preset condition indicates that the performance of the evaluation indicator corresponding to the addition of the indicator feature is better than the performance of the evaluation indicator corresponding to the absence of the indicator feature. If the retained indicator features meet the second preset condition, the indicator features are output; wherein, the second preset condition indicates that the performance of the evaluation indicator corresponding to the indicator features has reached the target value.
4. The method of claim 3, wherein, Before retaining the indicator feature when the indicator feature meets the first preset condition, the method further includes: The aforementioned indicator features are added to the training set and the validation set respectively to obtain a new training set and a new validation set; The initial credit assessment model is trained using the new training set to obtain the target credit assessment model; The target credit assessment model is evaluated using the new validation set to obtain a first evaluation result. Obtain a second evaluation result, wherein the second evaluation result is determined based on the performance evaluation of the target credit assessment model using the validation set; The step of retaining the indicator feature when the indicator feature meets the first preset condition includes: If the performance of the evaluation index of the first evaluation result is improved compared to the performance of the evaluation index of the second evaluation result, the index characteristics are retained.
5. The method of claim 4, wherein, The step of outputting the indicator features when the retained indicator features meet the second preset condition includes: If the retained indicator features enable the performance of the evaluation indicator of the first evaluation result to reach the target value, then the indicator features are output.
6. An indicator feature generation device, characterized in that, Applied to a server, the device includes: The first acquisition module is used to acquire prompt words, which include descriptive information of the credit information dataset, feature generation methods, and reference code text; wherein, the reference code text is a pre-written code text that serves as a reference for generating new features; the reference code text includes Python code text or C language code text; The second acquisition module is used to input the description information of the credit information dataset, the feature generation method and the reference code text into the large model, and acquire the target code text output by the large model; The third acquisition module is used to acquire the corresponding credit information dataset based on the description information of the credit information dataset using the large model deployed on the server; the large model includes a text embedding model; The vector transformation module is used to transform elements in the credit information dataset into feature vectors through the text embedding model. The feature mapping function determination module is used to determine the feature mapping function according to the feature generation method; The target code determination module is used to determine the target code text based on the feature vector, the feature mapping function, and the reference code text; the feature mapping function includes addition, subtraction, dot product, cross product, matrix multiplication, or logical judgment; the logical judgment includes conditional feature filtering; The execution generation module is used to execute the target code text and generate indicator features corresponding to the credit information dataset. When executing the target code text, the feature generation method is used as a function, the elements in the credit information dataset are used as the input of the feature generation method function, and the indicator features corresponding to the credit information dataset are used as the output of the feature generation method function. The judgment output module is used to output the indicator feature when the indicator feature meets the preset conditions.
7. The apparatus according to claim 6, characterized in that, The vector conversion module is also used to perform word segmentation on the elements in the credit information dataset to obtain the segmented text representation; and to convert the text representation into the corresponding feature vector.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.