Batch service template generation method and device
By analyzing the key field characteristics of batch business data and product data, using machine learning models to generate suitable batch business templates, solving the problems of low-efficiency and error-prone template configuration in the existing technology, and improving processing success rate and user experience.
Patent Information
- Application Number
- CN202411961210.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-27
AI Technical Summary
In the prior art, batch business templates mainly rely on manual configuration, are inefficient, error-prone and poorly applicable, and cannot quickly adapt to market changes, resulting in a low success rate of batch business processing and a damaged user experience.
By obtaining the target batch business data and target product data to be processed, determining its first key field characteristics, analyzing these characteristics using the random forest sub-model and logistic regression sub-model to generate the most suitable batch business template.
It improves the simplicity and efficiency of the template, reduces the complexity and error rate of manual configuration, ensures the accuracy and applicability of the template, and improves the success rate and user experience of batch business processing.
Smart Images

Figure CN119886094A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method and device for generating batch service templates. Background Art
[0002] In the current telecommunications industry, batch business acceptance is an indispensable part of the daily operations of operators. It involves the rapid and efficient execution of a large number of similar business operations, covering the ordering, modification, and cancellation of mobile phone, broadband, ITV, and cloud hosting services. The traditional batch acceptance process usually relies on manually created and maintained Excel templates, and sales staff need to customize the template content according to different business combinations and product attributes. However, this process exposes many problems, mainly including: manual template creation is time-consuming and labor-intensive, and with the continuous innovation of telecommunications products and services, templates need to be updated frequently. The traditional update method is slow to respond and cannot quickly adapt to market changes. The business combination is diverse and the attributes are complicated. It is easy to omit or input errors when manually configuring templates, resulting in a low success rate of batch business processing and a damaged user experience. Traditional template optimization relies on manual experience, and it is difficult to perform automatic and dynamic optimization based on actual usage and business data, which limits the accuracy and applicability of the template. The erroneous data introduced when manually filling in the template and the lack of effective data quality control methods may lead to a large number of exceptions or errors in batch acceptance, affecting the stability of the system and the smoothness of the business process. The existing system has performance bottlenecks when processing large-scale batch business, and it is difficult to meet the rapidly growing business needs in the context of digital transformation.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present application provide a method and device for generating batch service templates, so as to at least solve the technical problem that batch service templates in related solutions mainly rely on manual configuration, which is inefficient, error-prone and has poor applicability.
[0005] According to one aspect of an embodiment of the present application, a method for generating a batch business template is provided, including: obtaining target batch business data to be processed, and determining a target business scenario corresponding to the target batch business data, and obtaining target commodity data corresponding to the target business scenario; determining all first key field features in the target batch business data and the target commodity data to obtain a first key field feature set; using a batch business template generation model corresponding to the target business scenario to analyze the first key field feature set to obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate a target batch business template based on the target key field features.
[0006] Optionally, the target business scenario includes at least one of the following: mobile phone business scenario, broadband business scenario, broadband Internet audio-visual business scenario, cloud host scenario; the target batch business data includes at least one of the following: batch business type, batch business content, and within a preset time period; the target commodity data includes at least: product information corresponding to the target business scenario, sales product information, and the relationship between products and sales products.
[0007] Optionally, determining all first key field features in the target batch business data and the target commodity data to obtain a first key field feature set includes: preprocessing the target batch business data and the target commodity data, wherein the preprocessing at least includes: data cleaning and data standardization; identifying all first key fields in the preprocessed target batch business data and the target commodity data, and encoding each first key field using a preset encoder to obtain multiple first key field features, and forming all the first key field features into a first key field feature set.
[0008] Optionally, the training process of the batch business template generation model includes: constructing an initial model, wherein the initial model includes at least: a random forest sub-model, a logistic regression sub-model, and a template generation module that selects target key field features and generates target batch business templates based on the analysis results of the random forest sub-model and the logistic regression sub-model; obtaining multiple groups of historical batch business data and historical commodity data and corresponding historical batch business templates under the target business scenario; for each group of historical batch business data and historical commodity data, determining a second key field feature set corresponding to the historical batch business data and the historical commodity data, using the second key field feature set as a training sample, and determining a third key field feature set corresponding to the corresponding historical batch business template, determining a second importance score of each third key field feature in the third key field feature set, and using the third key field feature set and the second importance score as sample labels for the training samples; using multiple training samples and sample labels to train the initial model to obtain a batch business template generation model.
[0009] Optionally, determining the second key field feature set corresponding to the historical batch business data and the historical commodity data includes: preprocessing the historical batch business data and the historical commodity data, wherein the preprocessing includes at least: data cleaning and data standardization; identifying all second key fields in the preprocessed target batch business data and the target commodity data, and encoding each second key field using a preset encoder to obtain multiple second key field features, and forming all second key field features into a second key field feature set; determining the third key field feature set corresponding to the corresponding historical batch business template includes: identifying all third key fields in the corresponding historical batch business template, and encoding each third key field using a preset encoder to obtain multiple third key field features, and forming all third key field features into a third key field feature set.
[0010] Optionally, determining the second importance score of each third key field feature in the third key field feature set includes: for each third key field feature in the third key field feature set, determining the usage frequency of the third key field corresponding to the third key field feature in all historical batch business templates, determining the information gain of the third key field, determining the field weight corresponding to the field type of the third key field from a preset field weight coefficient table, and obtaining the target object's feedback score for the third key field; respectively determining the weight coefficients corresponding to the usage frequency, information gain, field weight and feedback score, and performing weighted summation of the usage frequency, information gain, field weight and feedback score according to the weight coefficient, and using the obtained sum as the second importance score of the third key field feature.
[0011] Optionally, the method also includes: for each third key field feature, determining a first number of historical batch business templates that include successful business processing of the third key field corresponding to the third key field feature and a second number of historical batch business templates that do not include successful business processing of the third key field, determining the difference between the first number and the second number, and determining the ratio of the difference to the second number as a success rate influencing factor; determining a time decay factor based on the completion time of the batch business corresponding to the third key field feature; and taking the product of the weighted sum value corresponding to the third key field feature, the success rate influencing factor, and the time decay factor as the second importance score of the third key field feature.
[0012] Optionally, a random forest sub-model is used to determine the third importance score of each first key field feature to the successful processing of batch business based on information gain or Gini index; a logistic regression sub-model is used to determine the selection probability of the first key field corresponding to each first key field feature being selected as the template field; a template generation module is used to, for each first key field feature, perform weighted summation of the third importance score and selection probability of the first key field feature based on a preset weight coefficient to obtain the first importance score of the first key field feature; when the first importance score is higher than a preset score threshold, determine the first key field feature as the target key field feature.
[0013] Optionally, the template generation module is also used to determine multiple frequent item sets in each group of second key field feature sets and third key field feature sets using the Apriori algorithm during the model training process, and determine the support and confidence of each frequent item set, wherein each frequent item set includes multiple associated key field features.
[0014] Optionally, a template generation module is used to determine a target frequent item set whose support and confidence are higher than a preset threshold among multiple frequent item sets associated with the target key field feature, randomly combine key fields corresponding to multiple associated key field features associated with the target key field feature in the target frequent item set and key fields corresponding to the target key field feature to obtain multiple candidate batch business templates, and determine the target batch business template from the multiple candidate batch business templates.
[0015] Optionally, a template generation module is used to determine, for each candidate batch business template, the number of commodities, the number of sales items, and the number of associations between different products and sales items involved in the candidate batch business template, determine the template complexity of the candidate batch business template based on the number of commodities, the number of sales items, and the number of associations, and determine the target batch business template from the candidate batch business templates whose template complexity meets preset conditions.
[0016] Optionally, batch business processing is performed according to the target batch business template, and the processing results and user feedback information are obtained; the target batch business data, target commodity data, target batch business template, processing results and user feedback information are used as new training samples; and the batch business template generation model is periodically retrained using all new training samples to update the model parameters.
[0017] According to another aspect of an embodiment of the present application, a device for generating a batch business template is also provided, including: an acquisition module, used to acquire target batch business data to be processed, and determine the target business scenario corresponding to the target batch business data, and acquire target commodity data corresponding to the target business scenario; a feature extraction module, used to determine all first key field features in the target batch business data and the target commodity data, and obtain a first key field feature set; a template generation module, used to analyze the first key field feature set using a batch business template generation model corresponding to the target business scenario, and obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate a target batch business template based on the target key field features.
[0018] According to another aspect of an embodiment of the present application, a computer program product is further provided, the computer program product comprising: a computer program, wherein when the computer program is executed by a processor, the above-mentioned method for generating batch service templates is implemented.
[0019] According to another aspect of an embodiment of the present application, an electronic device is further provided, the electronic device comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the above-mentioned method for generating batch business templates through the computer program.
[0020] In the embodiment of the present application, the specific business scenario corresponding to the batch business data to be processed is automatically identified and matched, and the commodity data under the scenario is efficiently obtained, which ensures the pertinence and accuracy of the subsequent template generation, and avoids the situation where the template is not suitable for a specific business type or misses key commodity information. Through intelligent analysis, all the first key field features are automatically identified from the batch business data and commodity data to form a key field feature set. This process uses the frequency of use of data, domain knowledge and the correlation between fields to ensure that the template only contains fields that are critical to the success of the business, improves the simplicity and efficiency of the template, and also reduces the complexity and error rate of the manual configuration template. Using machine learning models, especially random forest and logistic regression models, it is possible to generate batch business templates that are most suitable for the target business scenario based on the key field feature set. The random forest model can evaluate the importance of the field and the correlation between the fields, while the logistic regression model can predict the probability of the field being selected. Combining the two models, not only can the template be generated, but also the template structure can be optimized to ensure that the template contains both necessary information and avoids redundancy, improves the accuracy and quality of the template, and thus solves the technical problems that the batch business templates in the relevant schemes mainly rely on manual configuration, low efficiency, error-prone and poor applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0022] Figure 1 It is a flowchart of an optional method for generating batch service templates according to an embodiment of the present application;
[0023] Figure 2 It is a structural schematic diagram of an optional device for generating batch service templates according to an embodiment of the present application;
[0024] Figure 3 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0026] It should be noted that the terms "first", "second", etc. in the specification, claims and drawings of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] The information collected in the embodiments of the present application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0028] Example 1
[0029] According to an embodiment of the present application, a method for generating batch business templates is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a flow chart of a method for generating batch service templates according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0031] Step S102, obtaining target batch business data to be processed, determining a target business scenario corresponding to the target batch business data, and obtaining target commodity data corresponding to the target business scenario;
[0032] Step S104, determining all first key field features in the target batch business data and the target commodity data, and obtaining a first key field feature set;
[0033] Step S106, using the batch business template generation model corresponding to the target business scenario to analyze the first key field feature set to obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate a target batch business template based on the target key field features.
[0034] The following describes each step of the method for generating batch service templates in conjunction with a specific implementation process.
[0035] First, a batch business template generation model needs to be established to process all businesses.
[0036] As an optional implementation, the training process of the batch service template generation model can be performed in the following manner:
[0037] S1, constructing an initial model, wherein the initial model at least includes: a random forest sub-model, a logistic regression sub-model, and a template generation module for selecting target key field features and generating target batch business templates based on analysis results of the random forest sub-model and the logistic regression sub-model;
[0038] S2, obtaining multiple groups of historical batch business data and historical commodity data and corresponding historical batch business templates under the target business scenario. It should be noted that multiple models can be trained for different business scenarios;
[0039] For example, you can use JDBC (Java Database Connectivity) or other database connection technologies to achieve a secure connection with the business system database. During the connection process, the security and encryption of data transmission should be ensured to avoid leakage of sensitive information. Clarify the types of data that need to be collected, including historical batch business data, commodity data (detailed specifications of products and sales items), and corresponding historical batch business templates. These data should cover the typical characteristics of the target business scenario. According to the predefined collection scope, the required historical data is extracted from the business system database. Considering the impact on system operation, data collection is usually carried out during off-peak hours (such as 2:00 a.m.) through incremental data synchronization, and only the data newly added or updated on the previous day is extracted.
[0040] Batch business data can be detailed information of each batch acceptance, such as acceptance time, acceptor, acceptance number, product type, sales product information, related relationships, acceptance results, etc.; commodity data contains detailed specifications of products and sales products, such as product ID, product name, sales product ID, sales product name, attribute list, related relationship definition, etc.; historical batch business templates are Excel templates used for batch acceptance in the past, including template ID, template name, creation time, creator, template structure and field configuration and other information.
[0041] To obtain product data, you can develop a RESTful API interface and connect it to the corresponding module of the business system to obtain the latest information on products and sales items in real time, including specifications, attributes and relationships. You can set it to automatically poll product information every 15 minutes to ensure that the template is generated using the latest data. When data changes are detected, they are immediately synchronized to the local database.
[0042] S3, for each group of historical batch business data and historical commodity data, determine the second key field feature set corresponding to the historical batch business data and the historical commodity data, use the second key field feature set as a training sample, and determine the third key field feature set corresponding to the corresponding historical batch business template, determine the second importance score of each third key field feature in the third key field feature set, and use the third key field feature set and the second importance score as the sample label of the training sample;
[0043] Among them, determining the second key field feature set corresponding to the historical batch business data and the historical commodity data includes: preprocessing the historical batch business data and the historical commodity data, wherein the preprocessing at least includes: data cleaning and data standardization processing; identifying all second key fields in the preprocessed target batch business data and target commodity data, and encoding each second key field using a preset encoder to obtain multiple second key field features, and forming all the second key field features into a second key field feature set.
[0044] For example, after acquiring the data, check the key fields of each collected record, such as acceptance number, product type, etc., to ensure that there are no missing data. Records with missing data may reflect system problems or business anomalies and should be marked or excluded. Detect and handle abnormal values by defining valid ranges and formats. Specifically, the following steps can be taken:
[0045] For numeric fields, you can use statistical methods, such as using the interquartile range to identify outliers. For slightly abnormal values, you can consider correction, for example, adjusting out-of-range values to the boundary values. For severe outliers that seriously affect model training, you can directly exclude them to avoid biasing the model. You can also use the median, mean, or adjacent values to replace outliers to maintain the integrity of the data set.
[0046] Outliers in text fields often manifest as formatting errors, spelling errors, or irrelevant information. Regular expressions or other text processing techniques can be used to correct formatting errors, such as ensuring that the IMEI number is in the correct format. Natural language processing techniques, such as Levenshtein distance, can also be used to identify and correct spelling errors, or remove information that is not relevant to the business, such as additional comments or irrelevant characters that appear in text fields.
[0047] Abnormal values of the time field may appear as unreasonable dates (such as future dates or unreasonable dates in historical periods). A rationality check can be performed to ensure that the value of the time field is within the range allowed by the business logic. For example, it should not be earlier than the system launch date, nor should it exceed the current date. For dates that are out of the reasonable range, they can be corrected to the system launch date or the current date, depending on business needs.
[0048] Exception values of enumeration type fields are usually invalid encoding or undefined status. Encoding checks can be performed to ensure that each enumeration value is a valid value in the predefined list. If the enumeration value is invalid, it can be recoded to the most common valid value (mode) or a reasonable alternative value can be selected based on business logic.
[0049] Outliers are not only reflected in numerical values or formats, but may also violate business rules, such as incorrect product combinations or unreasonable business processes. Use the rule engine to verify whether the data complies with predefined business rules. For outliers that cannot be corrected automatically, set up a manual review process for experts or business personnel to judge and handle them.
[0050] When handling abnormal values, the system should record the details of each abnormal detection and processing, including the type of abnormality, processing method, processing time, etc., and can set up abnormal notifications to automatically notify relevant maintenance personnel for verification and adjustment when abnormal values are detected.
[0051] After processing the data, you can also perform data completeness scoring, accuracy scoring, and consistency scoring, and calculate the average of the three scores to help system administrators and data scientists quickly understand the overall quality of the data set.
[0052] Determine the third key field feature set corresponding to the corresponding historical batch business template, including: identifying all third key fields in the corresponding historical batch business template, and using a preset encoder to encode each third key field to obtain multiple third key field features, and forming all third key field features into a third key field feature set.
[0053] Determining a second importance score of each third key field feature in the third key field feature set includes: for each third key field feature in the third key field feature set, determining a usage frequency of a third key field corresponding to the third key field feature in all historical batch business templates, determining an information gain of the third key field, determining a field weight corresponding to a field type of the third key field from a preset field weight coefficient table, and obtaining a feedback score of a target object on the third key field;
[0054] The calculation formula for the usage frequency of the third key field corresponding to the third key field feature in all historical batch business templates can be expressed as:
[0055]
[0056] Where N(f) represents the number of times field f appears in the historical batch business template, N total Indicates the total number of historical batch service templates.
[0057] Information gain is an indicator that measures the contribution of a field to classification or prediction. The contribution of each third key field to the success rate of batch business acceptance is calculated to evaluate its importance in template generation. The calculation formula can be expressed as:
[0058] IG(Class,f)=H(Class)-H(Class|f)
[0059] Where (H(Class)) represents the entropy without considering field f, and H(Class|f)) represents the conditional entropy after field f is known.
[0060] Field weights are determined based on a preset field weight coefficient table, which sets different importance levels based on field types (such as mobile phone number, package type, address, etc.). By querying the table, an initial weight is assigned to each third key field. Feedback from users or business operators on the importance of the fields is also collected, which may be collected through the user interface or based on statistics of the results after business processing.
[0061] Determine the weight coefficients corresponding to the usage frequency, information gain, field weight and feedback score respectively, and perform weighted summation of the usage frequency, information gain, field weight and feedback score according to the weight coefficients, and use the sum value as the second importance score of the third key field feature. The second importance score calculation formula can be expressed as:
[0062] Score(f)=α·Frequency(f)+β·IG(Class,f)+γ·Weight rule (f)+δ·Feedback(f)
[0063] In the formula, Weight rule (f) is the weight of field f obtained from the preset field weight coefficient table. Feedback(f) is the feedback score of the target object on field f. α, β, γ, and δ are weight coefficients used to adjust the importance of each factor.
[0064] In addition, the success rate impact factor and time decay factor are also considered. The success rate impact factor reflects the actual impact of the field on the business success rate, while the time decay factor adjusts its weight according to the recent use of the field and the law of importance change to ensure the timeliness and adaptability of the score. Specifically:
[0065] For each third key field feature, determine a first number of historical batch business templates including successful business handling of the third key field corresponding to the third key field feature and a second number of historical batch business templates not including successful business handling of the third key field, determine the difference between the first number and the second number, and determine the ratio of the difference to the second number as a success rate influencing factor. The calculation formula of the success rate influencing factor can be expressed as:
[0066]
[0067] In the formula, SuccessRate with(f) Indicates the number of historical batch business templates that successfully processed business containing the third key field f, SuccessRate without(f) Indicates the number of historical batch business templates that successfully handle business without the third key field f. This factor reflects the actual contribution of field f to improving the success rate of business handling. If the business success rate in the template containing field f is significantly higher than that in the template not containing f, then the value of Importance(f) will be high, indicating that field f has a positive impact on the successful completion of the business.
[0068] In addition, the time decay factor is determined based on the completion time of the batch business corresponding to the third key field feature. This factor reflects the impact of time on the importance of the field, especially for those fields that are rarely used recently, their importance will decrease, and thus they will be given a lower weight in template generation. The time decay factor weight is used to measure the change in the importance of the field over time. It assigns a higher weight to recent data to ensure that the weight adjustment can timely reflect the latest business trends and data distribution. This factor is usually used in combination with the importance and frequency of use of the field, which helps the system quickly adapt to the field weight adjustment in emerging business scenarios and declining business scenarios.
[0069] The product of the weighted sum value corresponding to the third key field feature, the success rate influencing factor, and the time attenuation factor is taken as the second importance score of the third key field feature. This comprehensive score fully reflects the impact of the field on the successful generation and processing of the business template, as well as its importance at the current time point. It is the basis for the model to select key fields for template generation.
[0070] S4, using multiple training samples and sample labels to train the initial model to obtain a batch business template generation model.
[0071] The batch business template generation model corresponding to the target business scenario is obtained by training in the above manner, and the first key field feature set is analyzed using the model to obtain the target batch business template. This process can be performed in the following manner:
[0072] First, target batch business data to be processed is obtained, and a target business scenario corresponding to the target batch business data is determined, and target commodity data corresponding to the target business scenario is obtained.
[0073] As an optional implementation, the target business scenario includes at least one of the following: mobile phone business scenario, broadband business scenario, broadband Internet audio-visual business scenario, cloud host scenario; the target batch business data includes at least one of the following: batch business type, batch business content, and within a preset time period; the target commodity data includes at least: product information corresponding to the target business scenario, sales product information, and the relationship between products and sales products.
[0074] For example, target batch business data to be processed is obtained. This data may be contained in an Excel spreadsheet or database query result, including key information such as the type, content and time range of the batch business. According to the keywords in the batch business data (such as mobile phone, broadband, ITV, cloud host) and business type, the target business scenario corresponding to the data is determined. For example, if the data contains a large number of mobile phone numbers and UIM card information, the system will recognize that this is a batch of order requests for mobile phone services, and extract relevant product data from the product specification library and the sales product specification library. For example, for the mobile phone business scenario, the system will obtain all mobile phone product information, package sales product information and optional package sales product information, and record the relationship between products and sales products.
[0075] After obtaining the above data, all first key field features in the target batch business data and the target commodity data are determined to obtain a first key field feature set;
[0076] Preprocessing the target batch business data and target commodity data, wherein the preprocessing at least includes: data cleaning and data standardization; identifying all first key fields in the preprocessed target batch business data and target commodity data, and encoding each first key field using a preset encoder to obtain multiple first key field features, and forming all the first key field features into a first key field feature set.
[0077] In the preprocessed data, the system re-identifies all first key fields. This is because preprocessing may change the value or status of the field. For example, through data cleaning and filling missing values, some fields may become new key fields. The system uses a preset encoder to encode each first key field and converts the categorical field into a numerical form to facilitate the processing of machine learning algorithms. The encoding method may include one-hot encoding, label encoding, or embedding encoding. The specific choice depends on the type of field and the requirements of the model. For example, for the "product type" field, there may be options such as "mobile phone", "broadband", and "ITV". The system will encode it into numerical vectors such as [1,0,0], [0,1,0], and [0,0,1] to facilitate the model to identify and process different types of business scenarios.
[0078] The first key field feature set contains the coded representation of all key fields in batch business data and commodity data, and is the key input for subsequent model training and intelligent template generation. By integrating features, the system can uniformly process information from different fields, improving the efficiency of data processing and the convenience of model training.
[0079] After obtaining the first key field feature set, the first key field feature set is analyzed using a batch business template generation model corresponding to the target business scenario to obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate a target batch business template based on the target key field features.
[0080] Among them, in the model analysis process, the random forest sub-model is used to determine the third importance score of each first key field feature for the successful batch business processing based on information gain or Gini index. The calculation formula of the third importance score based on information gain can be expressed as:
[0081]
[0082] In the formula, f i The i-th field feature, I(f i ) represents the field f i The importance score in the entire random forest model. This score is used to measure the impact of the field on the final decision during the template generation process. T represents the total number of decision trees in the random forest. I t (f i ) represents the field f i The importance score in the t-th decision tree, which is usually calculated by the information gain that the field brings when splitting a node in the tree.
[0083] The calculation formula of the third importance score based on the Gini index can be expressed as:
[0084]
[0085] In the formula, S t (f i ) means that in the tth decision tree, field f i The set of all nodes used as split nodes, Gini(s) represents the Gini index. The lower the index, the higher the purity of the data set. ΔGini(s) represents the difference in the Gini index before and after the node s is split.
[0086] The logistic regression sub-model is used to determine the selection probability of the first key field corresponding to each first key field feature being selected as the template field. The calculation formula can be expressed as:
[0087]
[0088] P(Y=1|X) represents the conditional probability that the target variable y is equal to 1 given the input feature x. β0 is the intercept term (also called bias) and does not depend on any input feature. i is related to each input feature x i The associated weights or coefficients, and n is the number of features.
[0089] The template generation module is also used to perform weighted summation of the third importance score and selection probability of each first key field feature based on a preset weight coefficient to obtain the first importance score of the first key field feature, and determine that the first key field feature is a target key field feature when the first importance score is higher than a preset score threshold.
[0090] The template generation module is also used to determine multiple frequent item sets in each group of second key field feature sets and third key field feature sets using the Apriori algorithm during the model training process, and determine the support and confidence of each frequent item set, wherein each frequent item set includes multiple associated key field features, and a frequent item set refers to a combination of fields that frequently appear together in a data set. The Apriori algorithm helps the system understand the relationship between fields by searching for frequent item sets and evaluating their support and confidence. The support reflects the frequency of an item set appearing in a data set, and the confidence measures the possibility of other fields appearing when one field appears.
[0091] For example, a minimum support threshold is set, assuming it is 0.5, indicating that a certain item set must appear in at least a certain proportion of historical batch transactions to be considered frequent. A minimum confidence threshold is set, such as 0.7, indicating that when X appears, the probability of Y also appearing must reach at least this value for the rule to be considered meaningful. Extract all individual features from the second key field feature set and the third key field feature set, calculate their support, filter out features with support greater than or equal to the minimum support threshold, and form a frequent 1-item set. Combine frequent 1-item sets to generate candidate 2-item sets, calculate the support of each candidate 2-item set, filter out item sets with support greater than or equal to the minimum support threshold, and form frequent 2-item sets. Repeat the above process to gradually generate larger frequent item sets (such as 3-item sets, 4-item sets, etc.) until no new frequent item sets can be found. For each frequent item set, all possible association rules (such as X→Y) are generated, where X represents a premise item or item set, i.e., the left part of the rule, and Y represents a conclusion item or item set, i.e., the right part of the rule. The confidence of each rule is calculated, and the rules with confidence greater than or equal to the minimum confidence threshold are screened out. The support represents the frequency of an item set (or rule) appearing in all historical batch transactions, and the confidence represents the probability that Y will also appear when X appears.
[0092] The template generation module is used to determine a target frequent item set whose support and confidence are higher than a preset threshold among multiple frequent item sets associated with the target key field feature, randomly combine the key fields corresponding to the multiple associated key field features associated with the target key field feature in the target frequent item set and the key fields corresponding to the target key field feature to obtain multiple candidate batch business templates, and determine the target batch business template from the multiple candidate batch business templates.
[0093] For example, the template generation module first determines multiple frequent item sets from all second key field feature sets and third key field feature sets, and the support and confidence of these item sets are higher than the preset threshold. From the screened frequent item sets, further determine the item sets associated with the target key field features, that is, these item sets contain at least one target key field feature. The key fields contained in the target frequent item sets associated with the target key field features are randomly combined to generate multiple candidate batch business templates. This step ensures that all possible associated fields are included in the template, and at the same time avoids the limitations of a single combination through randomization. The structure and field combination of each candidate template are different, providing a variety of choices for subsequent template complexity analysis.
[0094] The template generation module is used to determine, for each candidate batch business template, the number of commodities, the number of sales items, and the number of associations between different products and sales items involved in the candidate batch business template, determine the template complexity of the candidate batch business template based on the number of commodities, the number of sales items, and the number of associations, and determine the target batch business template from the candidate batch business templates whose template complexity meets preset conditions.
[0095] The number of goods can be the number of product types included in the template (such as mobile phones, broadband, etc.), the number of sales items can be the number of sales item types included in the template (such as packages, agreements, etc.), and the number of associations can be the number of various dependencies or combination rules between goods and sales items. Use the preset complexity calculation formula to convert the number of goods, the number of sales items, and the number of associations into a quantitative complexity indicator.
[0096]
[0097] Where α, β, and γ are weight coefficients used to adjust the importance of different factors. They can be set according to the business environment, actual needs, or experience to ensure that the model can accurately reflect the real complexity of batch business. products Refers to the number of products involved in the candidate batch business template, such as mobile phones, broadband, ITV, etc. The more products there are, the more complex the template is, because the fields and rules that need to be considered also increase. salesRefers to the number of sales items involved in the candidate batch business template, such as packages, agreements, optional packages, etc. i represents the number of the i-th dependency, w i represents the weight of the i-th dependency.
[0098] According to business requirements or system settings, a preset condition or threshold of template complexity is determined. The template generation module selects templates whose complexity meets the preset condition from all candidate templates as candidates for target batch business templates, and selects one or more from these candidate templates whose complexity meets the condition as target batch business templates.
[0099] For example, when using the target batch business template to process batch business, obtain the processing results and user feedback information, including the success or failure status, and any related error information or processing time and other indicators. The user feedback message may include collecting feedback from users or business personnel on the template usage process, including the ease of use of the template, the necessity of the field, any problems in the processing or suggested improvement points; using the target batch business data, target commodity data, target batch business template, processing results and user feedback information as new training samples; periodically using all new training samples to retrain the batch business template generation model and update model parameters, such as setting a period (such as weekly or monthly) to retrain the batch business template generation model using all new training samples, which helps the model learn the latest business trends, user preferences and processing rules. Through retraining, the model can adjust its internal parameters according to the new data to improve prediction accuracy and generalization ability. For example, the random forest model may adjust the tree depth, feature selection threshold, etc., while the logistic regression model may update the weight coefficient.
[0100] In the embodiment of the present application, the specific business scenario corresponding to the batch business data to be processed is automatically identified and matched, and the commodity data under the scenario is efficiently obtained, which ensures the pertinence and accuracy of the subsequent template generation, and avoids the situation where the template is not suitable for a specific business type or misses key commodity information. Through intelligent analysis, all the first key field features are automatically identified from the batch business data and commodity data to form a key field feature set. This process uses the frequency of use of data, domain knowledge and the correlation between fields to ensure that the template only contains fields that are critical to the success of the business, improves the simplicity and efficiency of the template, and also reduces the complexity and error rate of the manual configuration template. Using machine learning models, especially random forest and logistic regression models, it is possible to generate batch business templates that are most suitable for the target business scenario based on the key field feature set. The random forest model can evaluate the importance of the field and the correlation between the fields, while the logistic regression model can predict the probability of the field being selected. Combining the two models, not only can the template be generated, but also the template structure can be optimized to ensure that the template contains both necessary information and avoids redundancy, improves the accuracy and quality of the template, and thus solves the technical problems that the batch business templates in the relevant schemes mainly rely on manual configuration, low efficiency, error-prone and poor applicability.
[0101] Example 2
[0102] According to an embodiment of the present application, a device for generating batch service templates for implementing the method for generating batch service templates in embodiment 1 is also provided. Figure 2 As shown, the batch service template generation device at least includes: an acquisition module 21, a feature extraction module 22 and a template generation module 23, wherein:
[0103] The acquisition module 21 is used to acquire the target batch business data to be processed, determine the target business scenario corresponding to the target batch business data, and acquire the target commodity data corresponding to the target business scenario;
[0104] A feature extraction module 22, used to determine all first key field features in the target batch business data and the target commodity data, and obtain a first key field feature set;
[0105] The template generation module 23 is used to analyze the first key field feature set using a batch business template generation model corresponding to the target business scenario to obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate a target batch business template based on the target key field features.
[0106] The functions of each module of the device for generating batch service templates are described below in conjunction with a specific implementation process.
[0107] The acquisition module acquires the target batch business data to be processed, determines the target business scenario corresponding to the target batch business data, and acquires the target commodity data corresponding to the target business scenario.
[0108] As an optional implementation, the target business scenario includes at least one of the following: mobile phone business scenario, broadband business scenario, broadband Internet audio-visual business scenario, cloud host scenario; the target batch business data includes at least one of the following: batch business type, batch business content, and within a preset time period; the target commodity data includes at least: product information corresponding to the target business scenario, sales product information, and the relationship between products and sales products.
[0109] After obtaining the above data, the feature extraction module determines all first key field features in the target batch business data and the target commodity data to obtain a first key field feature set;
[0110] Preprocessing the target batch business data and target commodity data, wherein the preprocessing at least includes: data cleaning and data standardization; identifying all first key fields in the preprocessed target batch business data and target commodity data, and encoding each first key field using a preset encoder to obtain multiple first key field features, and forming all the first key field features into a first key field feature set.
[0111] After obtaining the first key field feature set, the template generation module uses the batch business template generation model corresponding to the target business scenario to analyze the first key field feature set to obtain the target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate the target batch business template based on the target key field features.
[0112] As an optional implementation, the training process of the batch service template generation model can be performed in the following manner:
[0113] S1, constructing an initial model, wherein the initial model at least includes: a random forest sub-model, a logistic regression sub-model, and a template generation module for selecting target key field features and generating target batch business templates based on analysis results of the random forest sub-model and the logistic regression sub-model;
[0114] S2, obtaining multiple groups of historical batch business data and historical commodity data under the target business scenario and corresponding historical batch business templates;
[0115] S3, for each group of historical batch business data and historical commodity data, determine the second key field feature set corresponding to the historical batch business data and the historical commodity data, use the second key field feature set as a training sample, and determine the third key field feature set corresponding to the corresponding historical batch business template, determine the second importance score of each third key field feature in the third key field feature set, and use the third key field feature set and the second importance score as the sample label of the training sample;
[0116] Among them, determining the second key field feature set corresponding to the historical batch business data and the historical commodity data includes: preprocessing the historical batch business data and the historical commodity data, wherein the preprocessing at least includes: data cleaning and data standardization processing; identifying all second key fields in the preprocessed target batch business data and the target commodity data, and encoding each second key field using a preset encoder to obtain multiple second key field features, and forming all second key field features into a second key field feature set; determining the third key field feature set corresponding to the corresponding historical batch business template includes: identifying all third key fields in the corresponding historical batch business template, and encoding each third key field using a preset encoder to obtain multiple third key field features, and forming all third key field features into a third key field feature set.
[0117] Determining a second importance score of each third key field feature in the third key field feature set includes:
[0118] For each third key field feature in the third key field feature set, determine the usage frequency of the third key field corresponding to the third key field feature in all historical batch business templates, determine the information gain of the third key field, determine the field weight corresponding to the field type of the third key field from a preset field weight coefficient table, and obtain the feedback score of the target object on the third key field;
[0119] The weight coefficients corresponding to the usage frequency, information gain, field weight and feedback score are determined respectively, and the usage frequency, information gain, field weight and feedback score are weighted and summed according to the weight coefficients, and the obtained sum is used as the second importance score of the third key field feature.
[0120] For each third key field feature, determine a first number of historical batch business templates including successful business processing of the third key field corresponding to the third key field feature and a second number of historical batch business templates excluding successful business processing of the third key field, determine the difference between the first number and the second number, and determine the ratio of the difference to the second number as a success rate influencing factor; determine a time decay factor based on the processing completion time of the batch business corresponding to the third key field feature; and take the product of the weighted sum value corresponding to the third key field feature, the success rate influencing factor, and the time decay factor as the second importance score of the third key field feature.
[0121] S4, using multiple training samples and sample labels to train the initial model to obtain a batch business template generation model.
[0122] A batch business template generation model corresponding to the target business scenario is obtained by training in the above manner, and the first key field feature set is analyzed using the model to obtain a target batch business template.
[0123] Among them, in the model analysis process, the random forest sub-model is used to determine the third importance score of each first key field feature to the success of batch business processing based on information gain or Gini index;
[0124] A logistic regression sub-model, used to determine the selection probability of the first key field corresponding to each first key field feature being selected as the template field;
[0125] The template generation module is used to perform weighted summation of the third importance score and selection probability of each first key field feature based on a preset weight coefficient to obtain the first importance score of the first key field feature, and determine that the first key field feature is a target key field feature when the first importance score is higher than a preset score threshold.
[0126] The template generation module is also used to determine multiple frequent item sets in each group of second key field feature sets and third key field feature sets using the Apriori algorithm during the model training process, and determine the support and confidence of each frequent item set, wherein each frequent item set includes multiple associated key field features.
[0127] The template generation module is used to determine a target frequent item set whose support and confidence are higher than a preset threshold among multiple frequent item sets associated with the target key field feature, randomly combine the key fields corresponding to the multiple associated key field features associated with the target key field feature in the target frequent item set and the key fields corresponding to the target key field feature to obtain multiple candidate batch business templates, and determine the target batch business template from the multiple candidate batch business templates.
[0128] Perform batch business processing according to the target batch business template, and obtain processing results and user feedback information; use the target batch business data, target commodity data, target batch business template, processing results and user feedback information as new training samples; periodically use all new training samples to retrain the batch business template generation model and update the model parameters.
[0129] It should be noted that the modules in the device for generating batch business templates in the embodiment of the present application correspond one-to-one to the implementation steps of the method for generating batch business templates in Example 1. Since a detailed description has been given in Example 1, some details not reflected in this embodiment can be referred to Example 1 and will not be repeated here.
[0130] Example 3
[0131] According to an embodiment of the present application, a computer program product is also provided. The computer program product includes a computer program. When the computer program is executed by a processor, the method for generating batch service templates in Example 1 is implemented.
[0132] According to an embodiment of the present application, a non-volatile storage medium is also provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the method for generating batch business templates in Example 1 by running the computer program.
[0133] According to an embodiment of the present application, a processor is further provided, which is used to run a computer program, wherein the method for generating batch service templates in Example 1 is executed when the computer program is running.
[0134] According to an embodiment of the present application, an electronic device is also provided, which includes: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute the method for generating batch business templates in Example 1 through the computer program.
[0135] Specifically, the computer program executes the following steps when it is running: obtaining target batch business data to be processed, determining a target business scenario corresponding to the target batch business data, and obtaining target commodity data corresponding to the target business scenario; determining all first key field features in the target batch business data and the target commodity data to obtain a first key field feature set; analyzing the first key field feature set using a batch business template generation model corresponding to the target business scenario to obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate a target batch business template based on the target key field features.
[0136] As an optional implementation, the electronic device may be in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 3 FIG. 1 shows a hardware structure block diagram of an electronic device for implementing a method for generating batch service templates. Figure 3 As shown, the electronic device 30 may include one or more (302a, 302b, ..., 302n are used to illustrate) processors 302 (the processor 302 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 304 for storing data, and a transmission device 306 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 3 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown.
[0137] It should be noted that the one or more processors 302 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the electronic device 30. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0138] The memory 304 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for generating batch business templates in the embodiment of the present application. The processor 302 executes various functional applications and data processing by running the software programs and modules stored in the memory 304, that is, realizing the vulnerability detection method of the above-mentioned application. The memory 304 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 304 may further include a memory remotely arranged relative to the processor 302, and these remote memories may be connected to the electronic device 30 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0139] The transmission device 306 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the electronic device 30. In one example, the transmission device 306 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 306 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0140] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the electronic device 30 .
[0141] The serial numbers of the above embodiments are only for description and do not represent the advantages or disadvantages of the embodiments.
[0142] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0143] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc. Various media that can store program codes.
[0147] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for generating batch service templates, characterized in that: include: Acquire target batch business data to be processed, determine a target business scenario corresponding to the target batch business data, and acquire target commodity data corresponding to the target business scenario; Determine all first key field features in the target batch business data and the target commodity data to obtain a first key field feature set; The first key field feature set is analyzed using a batch business template generation model corresponding to the target business scenario to obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance scores of different key field features to the successful processing of batch business, determine the target key field features from the first key field feature set based on the first importance scores, and generate the target batch business template based on the target key field features.
2. The method according to claim 1, characterized in that The target service scenario includes at least one of the following: a mobile service scenario, a broadband service scenario, a broadband Internet audio-visual service scenario, and a cloud host scenario; The target batch service data includes at least one of the following: batch service type, batch service content, and within a preset time period; The target commodity data at least includes: product information corresponding to the target business scenario, sales item information, and association relationships between products and sales items.
3. The method according to claim 1, characterized in that Determine all first key field features in the target batch business data and the target commodity data to obtain a first key field feature set, including: Preprocessing the target batch business data and the target commodity data, wherein the preprocessing at least includes: data cleaning and data standardization; Identify all first key fields in the preprocessed target batch business data and the target commodity data, and use a preset encoder to encode each of the first key fields to obtain multiple first key field features, and form all the first key field features into a first key field feature set.
4. The method according to claim 1, characterized in that: The training process of the batch service template generation model includes: Constructing an initial model, wherein the initial model at least includes: a random forest sub-model, a logistic regression sub-model, and a template generation module for selecting target key field features and generating the target batch business template according to the analysis results of the random forest sub-model and the logistic regression sub-model; Acquire multiple groups of historical batch business data and historical commodity data under the target business scenario and corresponding historical batch business templates; For each group of the historical batch business data and historical commodity data, determine a second key field feature set corresponding to the historical batch business data and the historical commodity data, use the second key field feature set as a training sample, determine a third key field feature set corresponding to the corresponding historical batch business template, determine a second importance score of each third key field feature in the third key field feature set, and use the third key field feature set and the second importance score as sample labels of the training sample; The initial model is trained using a plurality of the training samples and sample labels to obtain the batch business template generation model.
5. The method according to claim 4, characterized in that Determining the second key field feature set corresponding to the historical batch business data and the historical commodity data includes: preprocessing the historical batch business data and the historical commodity data, wherein the preprocessing includes at least: data cleaning and data standardization; identifying all second key fields in the preprocessed target batch business data and the target commodity data, and encoding each of the second key fields using a preset encoder to obtain a plurality of second key field features, and forming all the second key field features into the second key field feature set; Determine the third key field feature set corresponding to the corresponding historical batch business template, including: identifying all third key fields in the corresponding historical batch business template, and using a preset encoder to encode each of the third key fields to obtain multiple third key field features, and compose all the third key field features into the third key field feature set.
6. The method according to claim 4, characterized in that Determining a second importance score of each third key field feature in the third key field feature set includes: For each third key field feature in the third key field feature set, determine the usage frequency of the third key field corresponding to the third key field feature in all the historical batch business templates, determine the information gain of the third key field, determine the field weight corresponding to the field type of the third key field from a preset field weight coefficient table, and obtain the feedback score of the target object on the third key field; Determine the weight coefficients corresponding to the usage frequency, the information gain, the field weight and the feedback score respectively, and perform weighted summation of the usage frequency, the information gain, the field weight and the feedback score according to the weight coefficients, and use the obtained sum as the second importance score of the third key field feature.
7. The method according to claim 6, characterized in that The method further comprises: For each third key field feature, determine a first number of historical batch business templates including successful business handling of the third key field corresponding to the third key field feature and a second number of historical batch business templates including successful business handling of the third key field, determine a difference between the first number and the second number, and determine a ratio of the difference to the second number as a success rate influencing factor; Determining a time decay factor according to the processing completion time of the batch business corresponding to the third key field feature; The product of the weighted sum value corresponding to the third key field feature, the success rate influencing factor, and the time decay factor is used as the second importance score of the third key field feature.
8. The method according to claim 4, characterized in that The random forest sub-model is used to determine the third importance score of each of the first key field features to the success of batch business processing based on information gain or Gini index; The logistic regression sub-model is used to determine the selection probability of the first key field corresponding to each of the first key field features being selected as the template field; The template generation module is used to perform a weighted summation of the third importance score and the selection probability of each of the first key field features based on a preset weight coefficient to obtain the first importance score of the first key field feature, and determine that the first key field feature is the target key field feature when the first importance score is higher than a preset score threshold.
9. The method according to claim 8, characterized in that The template generation module is also used to determine multiple frequent item sets in each group of the second key field feature set and the third key field feature set using the Apriori algorithm during the model training process, and determine the support and confidence of each of the frequent item sets, wherein each of the frequent item sets includes multiple associated key field features.
10. The method according to claim 9, characterized in that The template generation module is used to determine a target frequent item set whose support and confidence are higher than a preset threshold among multiple frequent item sets associated with the target key field feature, randomly combine key fields corresponding to multiple associated key field features associated with the target key field feature in the target frequent item set and key fields corresponding to the target key field feature to obtain multiple candidate batch business templates, and determine the target batch business template from the multiple candidate batch business templates.
11. The method according to claim 10, characterized in that The template generation module is used to determine, for each candidate batch business template, the number of commodities, the number of sales items, and the number of associations between different products and sales items involved in the candidate batch business template, determine the template complexity of the candidate batch business template based on the number of commodities, the number of sales items, and the number of associations, and determine the target batch business template from the candidate batch business templates whose template complexity meets preset conditions.
12. The method according to claim 1, characterized in that The method further comprises: Perform batch business processing according to the target batch business template, and obtain processing results and user feedback information; Using the target batch business data, the target commodity data, the target batch business template, the processing result and the user feedback information as new training samples; The batch service template generation model is periodically retrained using all new training samples to update model parameters.
13. A device for generating batch service templates, characterized in that: include: An acquisition module is used to acquire target batch business data to be processed, determine a target business scenario corresponding to the target batch business data, and acquire target commodity data corresponding to the target business scenario; A feature extraction module, used to determine all first key field features in the target batch business data and the target commodity data, and obtain a first key field feature set; A template generation module is used to analyze the first key field feature set using a batch business template generation model corresponding to the target business scenario to obtain a target batch business template, wherein the batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model, which are used to analyze the first importance score of different key field features to the successful processing of batch business, determine the target key field feature from the first key field feature set based on the first importance score, and generate the target batch business template based on the target key field feature.
14. A computer program product, characterized in that include: A computer program, wherein when the computer program is executed by a processor, the method for generating batch service templates according to any one of claims 1 to 12 is implemented.
15. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method for generating batch service templates according to any one of claims 1 to 12 through the computer program.
Citation Information
Patent Citations
Customer service strategy making method and device based on random forest and logistic regression
CN108388955A
Information processing method and device, information display method and device and computing equipment
CN110322093A
Data processing template generation method and device, electronic equipment and storage medium
CN115169316A
Batch testing method, device and system, computer equipment and storage medium
CN117194249A
Batch processing method, device and equipment for business files and storage medium
CN117557231A