Index feature generation method and device, computer equipment, readable storage medium and program product
By entering the description information, feature generation method and reference code text of the credit information data set into the big model, and generating and executing the target code text, the problem of inefficient feature generation in the prior art is solved, and efficient index feature generation and screening is achieved.
Patent Information
- Application Number
- CN202411920832.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-25
AI Technical Summary
In the prior art, the feature generation method is inefficient, especially when the original data dimension is high, the automatic feature generation method takes a long time and requires manual intervention, resulting in inefficiency.
By obtaining the description information, feature generation method and reference code text of the credit information data set, input it into the big model, generating the target code text, and executing the code text to generate indicator features. This method outputs features when the index features meet preset conditions to avoid manual participation.
The efficiency of index feature generation is improved, manual intervention is reduced, features that are ignored by human experts are discovered, the diversity of index features is enriched, and the final index features are screened through preset conditions.
Smart Images

Figure CN119670701A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to an indicator feature generation method, device, computer equipment, computer-readable storage medium and computer program product. Background Art
[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 construction efficiency and performance of machine learning models.
[0003] In traditional technologies, feature generation is close to exhaustive feature combinations, which often produces a large number of redundant and worthless features. When the original data dimension is high, the automatic feature generation method cannot exhaust all combinations and takes a very long time. At this time, it will rely on experts to design features, and the feature generation efficiency is low, requiring manual intervention.
[0004] However, the current method of manually participating in feature generation has the problem of low efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide an indicator feature generation method, device, computer equipment, computer-readable storage medium and computer program product that can improve efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides a method for generating indicator features, the method comprising:
[0007] Obtaining a prompt word, wherein the prompt word includes description information of the credit information dataset, a feature generation method, and a reference code text;
[0008] Inputting the description information of the credit information dataset, the feature generation method and the reference code text into the large model, and obtaining the target code text output by the large model;
[0009] Executing the target code text to generate indicator features corresponding to the credit information data set;
[0010] When 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] Acquire a corresponding credit information data set according to the description information of the credit information data set;
[0013] Converting elements in the credit information dataset into feature vectors through the text embedding model;
[0014] According to the feature generation method, determining a feature mapping function;
[0015] A target code text is determined based on the feature vector, the feature mapping function and the reference code text.
[0016] In one embodiment, converting the elements in the credit information dataset into feature vectors by using the text embedding model includes:
[0017] Performing word segmentation on the elements in the credit information dataset to obtain a text representation after word segmentation;
[0018] The text representation is converted into a corresponding feature vector.
[0019] In one embodiment, the preset condition includes a first preset condition and a second preset condition; when the indicator feature satisfies the preset condition, outputting the indicator feature includes:
[0020] In the case where the indicator feature satisfies a first preset condition, retaining the indicator feature; wherein the first preset condition indicates that the performance of the evaluation indicator corresponding to the indicator feature is better than the performance of the evaluation indicator corresponding to the indicator feature not being added;
[0021] When the retained indicator feature meets a second preset condition, the indicator feature is output; wherein the second preset condition indicates that the evaluation indicator performance corresponding to the indicator feature reaches a target value.
[0022] In one of the embodiments, when the indicator feature satisfies the first preset condition, before retaining the indicator feature, the method further includes:
[0023] Adding the indicator features 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 a target credit assessment model;
[0025] Performing a performance evaluation on the target credit assessment model using the new validation set to obtain a first evaluation result;
[0026] Obtaining a second evaluation result, wherein the second evaluation result is determined by performing a performance evaluation on the target credit evaluation model based on the validation set;
[0027] When the indicator feature satisfies the first preset condition, retaining the indicator feature includes:
[0028] When the evaluation indicator performance of the first evaluation result is improved relative to the evaluation indicator performance of the second evaluation result, the indicator feature is retained.
[0029] In one embodiment, when the retained indicator feature satisfies a second preset condition, outputting the indicator feature includes:
[0030] When the retained index feature makes the evaluation index performance of the first evaluation result reach a target value, the index feature is output.
[0031] In a second aspect, the present application also provides an indicator feature generation device, the device comprising:
[0032] A first acquisition module, used to acquire a prompt word, wherein the prompt word includes description information of a credit information dataset, a feature generation method, and a reference code text;
[0033] A 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 obtain the target code text output by the large model;
[0034] An execution generation module is used to execute the target code text to generate indicator features corresponding to the credit information data set;
[0035] The judgment output module is used to output the indicator feature when the indicator feature meets the preset conditions.
[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0038] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0039] The above-mentioned indicator feature generation method, device, computer equipment, computer-readable storage medium and computer program product first obtain prompt words, which include description information, feature generation method and reference code text of the credit information data set; secondly, the description information, feature generation method and reference code text of the credit information data set are input into the big model to obtain the target code text output by the big model; thereby introducing the big model, generating the target code text according to the prompt words, executing the target code text, and generating the indicator features corresponding to the credit information data set; on the one hand, it does not rely on manual labor, thereby improving the efficiency of indicator feature generation; on the other hand, by utilizing the divergent ability and logical ability of the big model, it may discover features that are overlooked by human experts, thereby enriching the diversity of indicator features; finally, when the indicator features meet the preset conditions, the indicator features are output, thereby screening the indicator features generated by the big model, and the indicator features that meet the conditions can be used as the final indicator features, thereby avoiding manual participation in the generation and screening of indicator features, and improving the efficiency of the generation and determination of the final indicator features. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A schematic diagram of a flow chart of an indicator feature generating method in one embodiment;
[0042] Figure 2 A schematic flow chart of an indicator feature generating method in another embodiment;
[0043] Figure 3 A schematic diagram of a process of converting elements in a credit information data set into feature vectors in one embodiment;
[0044] Figure 4 It is a flowchart of outputting indicator characteristics when the indicator characteristics meet the preset conditions in one embodiment;
[0045] Figure 5 A schematic diagram of a flow chart for determining whether a first preset condition is met in one embodiment;
[0046] Figure 6 It is a structural block diagram of an indicator feature generating device in one embodiment;
[0047] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] In an exemplary embodiment, Figure 1 As shown, a method for generating indicator features is provided. This embodiment uses the method applied to a terminal as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is 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, obtaining prompt words, which include description information of the credit information dataset, feature generation method and reference code text.
[0051] Among them, the prompt words are described by natural language. Natural language refers to a language that develops naturally with culture. English and Chinese are examples of natural languages. Natural language is the main tool for human communication and thinking. Logical language, which is opposite to natural language, is a communication tool between the human brain and computer.
[0052] The description information of the credit information dataset includes the main contents of the credit information dataset, including the field type and field meaning of the elements in the credit information dataset, such as account status, account opening time, work information, financial information, etc.
[0053] Feature generation methods include feature combinations, such as addition, subtraction, dot product, cross product, matrix multiplication, etc. It also includes conditional feature screening, such as setting conditional features such as "age between 20 and 30 years old, male", etc.
[0054] Reference code text is a pre-written code text that serves as a reference for generating new features.
[0055] Optionally, the server obtains a prompt word of a natural language description, the prompt word including description information of the credit information dataset, such as account status, account opening time, work information, financial information, etc. The prompt word also includes a feature generation method, such as screening according to conditional features, such as "age between 20 and 30 years old, male, financial information". The prompt word also includes reference code text, such as Python code text or C language code text, etc.
[0056] Step S104, input the description information, feature generation method and reference code text of the credit information dataset into the big model, and obtain the target code text output by the big model.
[0057] Optionally, the server inputs the description information, feature generation method and reference code text of the credit information dataset into the big model, and the big model processes the description information, feature generation method and reference code text of the credit information dataset, and outputs the target code text generated according to the reference code text. The server obtains the target code text output by the big model, such as Python code text.
[0058] Step S106, execute the target code text to generate indicator features corresponding to the credit information data set.
[0059] Optionally, when executing the target code text, the server uses the feature generation method as a function, and the elements in the credit information dataset as the input of the feature generation method function. The output of the feature generation method function is the indicator feature corresponding to the credit information dataset, that is, the new field type or field meaning that does not exist in the credit information dataset as a new indicator feature.
[0060] Step S108: When the indicator feature meets the preset conditions, the indicator feature is output.
[0061] Optionally, the server judges the indicator feature to determine whether the indicator feature meets the preset conditions. If the indicator feature meets the preset conditions, the indicator feature is output; if the indicator feature does not meet the preset conditions, the target code text is re-executed to generate a new indicator feature corresponding to the credit information data set. The new indicator feature is continued to be judged to determine whether it meets the preset conditions. The server only outputs the indicator feature that meets the preset conditions. The output indicator feature is a qualified indicator feature.
[0062] In the above-mentioned indicator feature generation method, first, a prompt word is obtained, and the prompt word includes the description information of the credit information data set, the feature generation method and the reference code text; secondly, the description information, the feature generation method and the reference code text of the credit information data set are input into the big model to obtain the target code text output by the big model; thereby, the big model is introduced, the target code text is generated according to the prompt word, the target code text is executed, and the indicator feature corresponding to the credit information data set is generated; on the one hand, it does not rely on manual labor, thereby improving the efficiency of indicator feature generation; on the other hand, by utilizing the divergent ability and logical ability of the big model, it may be possible to discover features that are overlooked by human experts, thereby enriching the diversity of indicator features; finally, when the indicator feature meets the preset conditions, the indicator feature is output, thereby screening the indicator features generated by the big model, and the indicator features that meet the conditions can be used as the final indicator features, thereby avoiding manual participation in the generation and screening of indicator features, and improving the efficiency of the generation and determination of the final indicator features.
[0063] In an exemplary embodiment, Figure 2As shown, a method for generating indicator features is provided, wherein the large model includes a text embedding model; the method includes the following steps S202 to S208. Among them:
[0064] Step S202: acquiring a corresponding credit information dataset according to the description information of the credit information dataset.
[0065] Optionally, the large model receives description information of the credit information dataset, and obtains the corresponding credit information dataset from the database according to the description information of the credit information dataset. The large model may be deployed on a server.
[0066] Step S204: convert the elements in the credit information dataset into feature vectors through a text embedding model.
[0067] Among them, text embedding is also called word embedding. The text embedding model refers to a model that converts a certain type of input data (such as text, image, sound, etc.) into a dense numerical vector.
[0068] Feature vectors are the basis for large models to understand and process.
[0069] Optionally, the large model converts each element in the credit information dataset into a feature vector through an embedding model.
[0070] Step S206: determining a feature mapping function according to the feature generation method.
[0071] Optionally, the large model constructs a feature mapping function according to 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 judgment. 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 a new feature vector.
[0072] Step S208, determining the target code text according to the feature vector, the feature mapping function and the reference code text.
[0073] Optionally, the large model generates a target code text that calls a feature mapping function to calculate a feature vector according to the reference code text.
[0074] In this embodiment, the target code text of the new indicator features is automatically created and generated through the large model, without relying on manually designed feature generation logic, thereby improving the efficiency of feature generation. At the same time, by using the divergent ability and logical ability of the large model to analyze the feature generation method and credit information data, indicator features that are ignored by human experts will be discovered, thereby enriching the diversity of indicator features.
[0075] In an exemplary embodiment, Figure 3 As shown, the elements in the credit information dataset are converted into feature vectors through a text embedding model, including steps S302 to S304. Among them:
[0076] Step S302, performing word segmentation processing on the elements in the credit information data set to obtain a text representation after word segmentation.
[0077] Optionally, the large model performs word segmentation on the elements in the credit information dataset through a 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" may be segmented into "I / love / natural language / processing". The segmented words are converted into text representations.
[0078] Step S304: convert the text representation into a corresponding feature vector.
[0079] Optionally, the large model converts the text representation after word segmentation into feature vectors through a text embedding model, which can also be called word embeddings.
[0080] In this embodiment, by performing word segmentation on the elements in the credit information data set and converting the text identifiers after word segmentation into corresponding feature vectors, the large model can mine features that are ignored by human experts based on these feature vectors, thereby improving the performance of subsequent indicator features on the machine learning model.
[0081] In an exemplary embodiment, 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. Among them:
[0082] Step S402: When the indicator feature meets the first preset condition, retain the indicator feature.
[0083] Among them, the first preset condition indicates that the performance of the evaluation index corresponding to the added indicator feature is better than the performance of the evaluation index corresponding to the unadded indicator feature.
[0084] Optionally, when the server obtains the indicator feature, it adds the obtained indicator feature to the training set, and trains the credit assessment model by adding the training set with the feature, wherein the credit assessment model is determined based on the machine learning model. If the indicator feature satisfies that the evaluation indicator performance of the credit assessment model corresponding to the added indicator feature is better than the evaluation indicator performance of the credit assessment model corresponding to the unadded indicator feature, then the indicator feature is considered to meet the first preset condition, and the server will retain the indicator feature that can improve the evaluation indicator performance. Among them, the evaluation index may include the accuracy, precision, recall rate, area under the curve (AUC) and the like of the credit assessment model. For example, if the accuracy and precision of the credit assessment model trained with the added indicator feature are significantly higher than those of the credit assessment model trained without the added indicator feature, then the indicator feature is considered to meet the first preset condition, and the server will retain the indicator feature that can improve the evaluation indicator performance.
[0085] Optionally, if the indicator feature does not satisfy the requirement that the evaluation indicator performance corresponding to the added indicator feature is better than the evaluation indicator performance corresponding to the unadded indicator feature, that is, the evaluation indicator performance corresponding to the added indicator feature is worse than the evaluation indicator performance corresponding to the indicator feature that was not added before, then it is considered that the indicator feature does not satisfy the first preset condition, and the server will delete the indicator feature that does not satisfy the first preset condition.
[0086] Step S404: output the indicator feature when the retained indicator feature meets the second preset condition.
[0087] Among them, the second preset condition indicates that the evaluation indicator performance corresponding to the indicator feature reaches the target value.
[0088] Optionally, if the retained indicator feature satisfies that the evaluation indicator performance corresponding to the indicator feature reaches the target value, for example, the target values of the evaluation indicator performance of the credit assessment model are: the target value of accuracy is 85, the target value of precision is 80, the target value of recall is 5, and the target value of AUC is 75. If the retained indicator feature can make the evaluation indicator performance of the credit assessment model reach the target value, it indicates that the second preset condition is met, and the server performs an output operation on the retained indicator feature.
[0089] Optionally, if the retained indicator feature cannot satisfy the target value of the evaluation indicator performance corresponding to the indicator feature, the server re-acquires a new indicator feature, and judges and screens the new indicator feature according to the first preset condition and the second preset condition, retains the new indicator feature that meets the first preset condition, and outputs the retained new indicator feature that meets the second preset condition.
[0090] In this embodiment, by judging and screening the first preset condition and the second preset condition, it is possible to obtain indicator features that improve the performance of the credit assessment model and make the credit assessment model reach the optimal level.
[0091] In an exemplary embodiment, Figure 5 As shown, when the indicator feature meets the first preset condition, before retaining the indicator feature, steps S502 to S508 are included. Among them:
[0092] Step S502, adding the indicator features to the training set and the validation set respectively to obtain a new training set and a new validation set.
[0093] The training set is the data set used to train the credit assessment model. The validation set is the data set used to evaluate the performance of the credit assessment model during the training process, but does not participate in the training of the credit assessment model. It is used to adjust the model's hyperparameters and select the best model architecture.
[0094] Optionally, the server adds the indicator feature to the training set (TS) to obtain a new training set; at the same time, the server adds the indicator feature to the validation set (VS) to obtain a new validation set.
[0095] Step S504: train the initial credit assessment model using the new training set to obtain a target credit assessment model.
[0096] Optionally, the server trains the initial credit assessment model using a new training set, for example, the new training set includes financial information (within one year), account information, and newly generated indicator features such as financial information for a specific time period within one year, to obtain a target credit assessment model.
[0097] Step S506: Perform performance evaluation on the target credit evaluation model using the new validation set to obtain a first evaluation result.
[0098] Optionally, the server performs a performance evaluation on the target information evaluation model through a new validation set to obtain a first evaluation result, wherein the first evaluation result may include, for example, an accuracy of x, a precision of y, a recall of z, and an AUC of s, wherein x, y, z, and s are all arbitrary natural numbers.
[0099] Step S508, obtaining a second evaluation result, wherein the second evaluation result is determined by performing a performance evaluation on the target credit evaluation model based on the validation set.
[0100] Optionally, before obtaining the second evaluation result, the server performs a performance evaluation on the target credit evaluation model based on the validation set, such as 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] When the indicator feature meets the first preset condition, retaining the indicator feature includes step S510:
[0102] Step S510, retaining the indicator feature when the evaluation indicator performance of the first evaluation result is improved relative to the evaluation indicator performance of the second evaluation result.
[0103] Among them, the larger the accuracy, precision and AUC values are, the better the performance of the target credit assessment model is. Conversely, the lower the recall rate is, the better the performance of the target credit assessment model is.
[0104] Optionally, the first evaluation result may include, for example, an accuracy of x, a precision of y, a recall of z, and an AUC of s. Where x, y, z, and s are all arbitrary natural numbers. For example, the second evaluation result includes an accuracy of X, a precision of Y, a recall of Z, and an AUC of S. Where X, Y, Z, and S are all arbitrary natural numbers. If the accuracy x>X; the precision y>Y, the recall z<Z, and the AUC value s>S, it indicates that the evaluation index performance of the first evaluation result is improved relative to the evaluation index performance of the second evaluation result, and the indicator feature is retained.
[0105] If the accuracy x<X; the precision y<Y, the recall z>Z, and the AUC value s<S, it indicates that the evaluation index performance of the first evaluation result is lower than the evaluation index performance of the second evaluation result, and the indicator feature is deleted.
[0106] In this embodiment, two evaluation results for the target credit assessment model can be obtained through a new training set, a 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. The retained indicator features can improve the performance of the target credit assessment model, such as the accuracy and precision of the target credit assessment model.
[0107] In an exemplary embodiment, when the retained indicator feature satisfies the second preset condition, the indicator feature is output, including: when the retained indicator feature makes the evaluation indicator performance of the first evaluation result reach the target value, the indicator feature is output.
[0108] Optionally, the server will continue to judge the second preset condition for the retained indicator features, wherein the second preset condition includes that the retained indicator features make the evaluation indicator performance of the first evaluation result reach the target value, and the target value of accuracy is X', the precision is Y', the recall rate is Z', and the AUC is S'. For example, the target value of accuracy is 85, the target value of precision is 80, the target value of recall rate is 5, and the target value of AUC is 75. It should be noted that the specific values of the target values are not limited here, and any value that meets the actual situation of the target credit assessment model is acceptable. The first evaluation result includes an accuracy of x, a precision of y, a recall rate of z, and an AUC of s. If the accuracy is x>X', the precision is y>Y', the recall rate is z<Z', and the AUC value is s>S', it means that the evaluation indicator performance of the first evaluation result makes the performance of the target credit assessment model optimal, and the server outputs the indicator features that make the performance of the target credit assessment model optimal.
[0109] Optionally, if the accuracy is x<X', the precision is y<Y', the recall rate is z>Z', and the AUC value is s<S', it indicates that the evaluation index performance of the first evaluation result cannot make the performance of the target credit evaluation model reach the optimal level, then the server continues to judge the new index feature according to the first preset condition and the second preset condition until the index feature output by the server meets the stop condition.
[0110] In this embodiment, by judging the second preset condition, it is possible to obtain and output the indicator characteristics that optimize the performance of the target credit assessment model.
[0111] In an exemplary embodiment, the server obtains prompt words described in natural language, and the prompt words include description information of the credit information dataset, such as account status, account opening time, work information, financial information, etc. The prompt words also include a feature generation method, such as screening according to conditional features, such as "age between 20 and 30 years old, male, financial information". The prompt words also include reference code text, such as Python code text or C language code text, etc. The server inputs the description information, feature generation method and reference code text of the credit information dataset into the big model, and the big model processes the description information, feature generation method and reference code text of the credit information dataset, and outputs the target code text generated according to the reference code text. The server obtains the target code text output by the big model, such as Python code text. When executing the target code text, the server uses the feature generation method as a function, and the elements in the credit information dataset as the input of the feature generation method function. The output of the feature generation method function is also the indicator feature corresponding to the credit information dataset, that is, the new field type or field meaning that does not exist in the credit information dataset as a new indicator feature.
[0112] The server adds the indicator features to the training set (TS) to obtain a new training set; at the same time, the indicator features are added to the validation set (VS) to obtain a new validation set. The server trains the initial credit assessment model through the new training set, for example, the new training set includes financial information (within one year), account information, and newly generated indicator features such as financial information in a special time period within one year, to obtain the target credit assessment model. The server performs a performance evaluation on the target information assessment model through the new validation set to obtain a first evaluation result, wherein the first evaluation result may include, for example, an accuracy of x, a precision of y, a recall of z, and an AUC of s. Where x, y, z, and s are all arbitrary natural numbers. The server performs a performance evaluation on the target credit assessment model based on the validation set, such as a second evaluation result including an accuracy of X, a precision of Y, a recall of Z, and an AUC of S. Where X, Y, Z, and S are all arbitrary natural numbers. If the accuracy x>X; the precision y>Y, the recall z<Z, and the AUC value s>S, it indicates that the evaluation indicator performance of the first evaluation result is improved relative to the evaluation indicator performance of the second evaluation result, and the indicator feature is retained. If the accuracy rate x is less than X, the precision y is less than Y, the recall rate z is greater than Z, and the AUC value s is less than S, it indicates that the evaluation index performance of the first evaluation result has decreased relative to the evaluation index performance of the second evaluation result, and the indicator feature is deleted. The server will continue to judge the second preset condition for the retained indicator feature, wherein the second preset condition includes that the retained indicator feature makes the evaluation index performance of the first evaluation result reach the target value, and the target value of the accuracy rate is X', the precision is Y', the recall rate is Z', and the AUC is S'. For example, the target value of the accuracy rate is 85, the target value of the precision is 80, the target value of the recall rate is 5, and the target value of the AUC is 75. It should be noted that the specific values of the target values are not limited here, and any value that meets the actual situation of the target credit assessment model is acceptable. The first evaluation result includes an accuracy rate of x, a precision of y, a recall rate of z, and an AUC of s. If the accuracy is x>X', the precision is y>Y', the recall rate is z<Z', and the AUC value is s>S', it indicates that the evaluation index performance of the first evaluation result makes the performance of the target credit evaluation model reach the optimal level, and the server outputs the index feature that makes the performance of the target credit evaluation model reach the optimal level. If the accuracy is x<X', the precision is y<Y', the recall rate is z>Z', and the AUC value is s<S', it indicates that the evaluation index performance of the first evaluation result cannot make the performance of the target credit evaluation model reach the optimal level, and the server continues to judge the first preset condition and the second preset condition for the new index feature until the index feature output by the server meets the stop condition.
[0113] The large model includes a text embedding model; the method also includes: the large model receives the description information of the credit information data set, and obtains the corresponding credit information data set from the database according to the description information of the credit information data set. The large model can be deployed on a server. The large model performs word segmentation processing on the elements in the credit information data set through the text embedding model. The server divides the elements in the credit information data set into independent words or phrases. For example, the input sentence "I love natural language processing" may be segmented into "I / love / natural language / processing". The segmented words are converted into text representations. The large model converts the segmented text representations into feature vectors, which can also be called word embeddings, through the text embedding model. The large model constructs a feature mapping function according to 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 judgment. These operations combine and transform the feature vectors corresponding to the elements in the credit information data set according to the logic of the feature generation method to generate new feature vectors. The large model generates a target code text that calls the feature mapping function to calculate the feature vector according to the reference code text.
[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0115] Based on the same inventive concept, the embodiment of the present application also provides an indicator feature generation device for implementing the indicator feature generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more indicator feature generation device embodiments provided below can refer to the limitations of the indicator feature generation method above, and will not be repeated here.
[0116] In an exemplary embodiment, 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 description information of the credit information dataset, feature generation method 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 data set 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 indicator features corresponding to the credit information data set.
[0120] The judgment output module 604 is used to output the indicator feature when the indicator feature meets the preset conditions.
[0121] In an exemplary embodiment, an indicator feature generating device further includes:
[0122] The third acquisition module is used to acquire the corresponding credit information data set according to the description information of the credit information data set.
[0123] The vector conversion module is used to convert the elements in the credit information dataset into feature vectors through the text embedding model.
[0124] The feature mapping function determination module is used to determine the feature mapping function according to the feature generation method.
[0125] The target code determination module is used to determine the target code text according to the feature vector, the feature mapping function and the reference code text.
[0126] In an exemplary embodiment, the vector conversion module includes:
[0127] The word segmentation unit is used to perform word segmentation on the elements in the credit information dataset to obtain a text representation after word segmentation.
[0128] The conversion unit is used to convert the text representation into the corresponding feature vector.
[0129] In an exemplary embodiment, the preset condition includes 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 feature when the indicator feature meets a first preset condition; wherein the first preset condition indicates that the evaluation indicator performance corresponding to the added indicator feature is better than the evaluation indicator performance corresponding to the unadded indicator feature.
[0131] The second judgment unit is used to output the indicator feature when the retained indicator feature meets the second preset condition; wherein the second preset condition indicates that the evaluation indicator performance corresponding to the indicator feature reaches the target value.
[0132] In an exemplary embodiment, an indicator feature generating device further includes:
[0133] The 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 by the new training set to obtain a target credit assessment model; the performance of the target credit assessment model is evaluated by the new validation set to obtain a first evaluation result; and a second evaluation result is obtained, wherein the second evaluation result is determined based on the performance evaluation of the target credit assessment model by the validation set.
[0134] The first judgment unit is further configured to retain the indicator feature when the evaluation indicator performance of the first evaluation result is improved relative to the evaluation indicator performance of the second evaluation result.
[0135] In an exemplary embodiment, the second judgment unit is further configured to output the indicator feature when the retained indicator feature enables the evaluation indicator performance of the first evaluation result to reach a target value.
[0136] Each module in the above-mentioned indicator feature generation device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0137] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store credit information data sets. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for generating indicator features is implemented.
[0138] Those skilled in the art will understand that Figure 7The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0139] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0140] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0141] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0142] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0143] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating indicator features, characterized in that: The method comprises: Obtaining a prompt word, wherein the prompt word includes description information of the credit information dataset, a feature generation method, and a reference code text; Inputting the description information of the credit information dataset, the feature generation method and the reference code text into the large model, and obtaining the target code text output by the large model; Executing the target code text to generate indicator features corresponding to the credit information data set; When the indicator feature meets the preset conditions, the indicator feature is output.
2. The method according to claim 1, characterized in that The large model includes a text embedding model; the method further includes: Acquire a corresponding credit information data set according to the description information of the credit information data set; Converting elements in the credit information dataset into feature vectors through the text embedding model; Determine a feature mapping function according to the feature generation method; A target code text is determined based on the feature vector, the feature mapping function and the reference code text.
3. The method according to claim 2, characterized in that The converting the elements in the credit information dataset into feature vectors by using the text embedding model includes: Performing word segmentation on the elements in the credit information dataset to obtain a text representation after word segmentation; The text representation is converted into a corresponding feature vector.
4. The method according to claim 1, characterized in that: The preset condition includes a first preset condition and a second preset condition; and when the indicator feature meets the preset condition, outputting the indicator feature includes: In the case where the indicator feature satisfies a first preset condition, retaining the indicator feature; wherein the first preset condition indicates that the performance of the evaluation indicator corresponding to the indicator feature is better than the performance of the evaluation indicator corresponding to the indicator feature not being added; When the retained indicator feature meets a second preset condition, the indicator feature is output; wherein the second preset condition indicates that the evaluation indicator performance corresponding to the indicator feature reaches a target value.
5. The method according to claim 4, characterized in that In the case where the indicator feature meets the first preset condition, before retaining the indicator feature, the method further includes: Adding the indicator features 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 a target credit assessment model; Performing a performance evaluation on the target credit assessment model using the new validation set to obtain a first evaluation result; Obtaining a second evaluation result, wherein the second evaluation result is determined by performing a performance evaluation on the target credit evaluation model based on the validation set; When the indicator feature satisfies the first preset condition, retaining the indicator feature includes: When the evaluation indicator performance of the first evaluation result is improved relative to the evaluation indicator performance of the second evaluation result, the indicator feature is retained.
6. The method according to claim 5, characterized in that When the retained indicator feature meets the second preset condition, outputting the indicator feature includes: When the retained index feature makes the evaluation index performance of the first evaluation result reach a target value, the index feature is output.
7. An indicator feature generation device, characterized in that: The device comprises: A first acquisition module, used to acquire a prompt word, wherein the prompt word includes description information of a credit information dataset, a feature generation method, and a reference code text; A 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 obtain the target code text output by the large model; An execution generation module is used to execute the target code text to generate indicator features corresponding to the credit information data set; The judgment output module is used to output the indicator feature when the indicator feature meets the preset conditions.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Feature calculation code generation method and apparatus
CN107705199A
Index data acquisition method and device, computer equipment and storage medium
CN111324716A
Method and device for generating credit investigation index information
CN112613988A
Data processing method and device, equipment and storage medium
CN115145897A
Financial feature data screening method and device, electronic equipment and storage medium
CN116089809A