Batch service template generation method and device
By automatically identifying and generating batch business templates through machine learning models, the problems of low efficiency and error-proneness in manual configuration are solved, and the templates are used to achieve efficient, accurate and highly adaptable batch business processing.
Patent Information
- Application Number
- CN202411961210.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2044-12-27
AI Technical Summary
In existing technologies, batch business templates rely on manual configuration, which is inefficient, error-prone, and has poor applicability. It cannot quickly adapt to market changes, resulting in low business processing success rates and affecting system stability.
Machine learning models, especially random forest and logistic regression models, are used to automatically identify key field features in batch business data and product data, generate batch business templates that are most suitable for the target business scenario, and optimize the template structure through data cleaning, standardization and coding, combined with frequent itemset analysis and template complexity control.
It improves the accuracy and quality of templates, reduces the complexity and error rate of manual configuration, ensures the relevance and accuracy of templates, adapts to market changes, and enhances the success rate of batch business processing and system stability.
Smart Images

Figure CN119886094B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method and apparatus for generating batch business templates. Background Technology
[0002] In the current context of the telecommunications industry, batch service processing is an indispensable part of operators' daily operations. It involves the rapid and efficient execution of numerous similar service operations, covering subscription, modification, and cancellation of mobile, broadband, IPTV, and cloud hosting services. Traditional batch processing processes typically rely on manually created and maintained Excel templates, requiring sales staff to customize template content based on different service combinations and product attributes. However, this process exposes several problems, including: manual template creation is time-consuming and labor-intensive; with the continuous innovation of telecommunications products and services, templates require frequent updates, and traditional update methods are slow to adapt to market changes. Diverse service combinations and complex attributes make manual template configuration prone to omissions or errors, leading to low success rates in batch service processing and a degraded user experience. Traditional template optimization relies on human experience, making it difficult to automate and dynamically optimize based on actual usage and business data, thus limiting the accuracy and applicability of the templates. Errors introduced during manual template entry, along with a lack of effective data quality control, can result in numerous anomalies or errors during batch processing, affecting system stability and the smoothness of business processes. The existing system exhibits performance bottlenecks when handling large-scale batch transactions, making it difficult to meet the rapidly growing business demands in the context of digital transformation.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a method and apparatus for generating batch service templates, which at least solves the technical problems of batch service templates in related solutions that mainly rely on manual configuration, resulting in low efficiency, easy errors, and poor applicability.
[0005] According to one aspect of the embodiments of this application, a method for generating a batch business template is provided, comprising: acquiring target batch business data to be processed, determining a target business scenario corresponding to the target batch business data, and acquiring target product data corresponding to the target business scenario; determining all first key field features in the target batch business data and the target product data to obtain a set of first key field features; analyzing the set of first key field features 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 for analyzing the first importance score of different key field features on the success of batch business processing, determining target key field features from the set of first key field features based on the first importance score, and generating 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 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 product 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 target product data to obtain a set of first key field features includes: preprocessing the target batch business data and target product data, wherein the preprocessing includes at least: data cleaning and data standardization; identifying all first key fields in the preprocessed target batch business data and target product data, and encoding each first key field using a preset encoder to obtain multiple first key field features, and forming a set of first key field features from all the first key field features.
[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; acquiring multiple sets of historical batch business data and historical product data and corresponding historical batch business templates under the target business scenario; for each set of historical batch business data and historical product data, determining the second key field feature set corresponding to the historical batch business data and historical product data, using the second key field feature set as a training sample, and determining the third key field feature set corresponding to the corresponding historical batch business template, determining the 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 the sample label of the training sample; training the initial model using multiple training samples and sample labels to obtain the batch business template generation model.
[0009] Optionally, determining the second key field feature set corresponding to historical batch business data and historical product data includes: preprocessing the historical batch business data and historical product 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 target product data, and encoding each second key field using a preset encoder to obtain multiple second key field features, and forming a second key field feature set by combining all second key field features; 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 a third key field feature set by combining all third key field features.
[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 feedback score of the target object on the third key field; determining the weight coefficients corresponding to the usage frequency, information gain, field weight and feedback score respectively, and performing a weighted summation of the usage frequency, information gain, field weight and feedback score based on the weight coefficients, and using the obtained summation as the second importance score of the third key field feature.
[0011] Optionally, the method further includes: for each third key field feature, determining a first number of historical batch business templates that have successfully completed business transactions including the third key field feature and a second number of historical batch business templates that have successfully completed business transactions excluding the third key field feature; determining the difference between the first number and the second number; and determining the ratio of the difference to the second number as the success rate impact factor; determining a time decay factor based on the completion time of the batch business transactions corresponding to the third key field feature; and using the product of the weighted summation value, the success rate impact factor, and the time decay factor corresponding to the third key field feature 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 for the success of batch business processing 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 a template field; and a template generation module is used to perform a weighted summation of the third importance score and selection probability of each first key field feature based on preset weight coefficients to obtain the first importance score of the first key field feature. If the first importance score is higher than a preset score threshold, the first key field feature is determined as the target key field feature.
[0013] Optionally, the template generation module is also used during model training to determine multiple frequent itemsets in each set of second and third key field features using the Apriori algorithm, and to determine the support and confidence of each frequent itemset, wherein each frequent itemset includes multiple associated key field features.
[0014] Optionally, the template generation module is used to determine a target frequent itemset whose support and confidence are both higher than a preset threshold among multiple frequent itemsets associated with the target key field features, and to randomly combine the key fields corresponding to the multiple associated key field features associated with the target key field features and the key fields corresponding to the target key field features in the target frequent itemset to obtain multiple candidate batch business templates, and to determine the target batch business template from the multiple candidate batch business templates.
[0015] Optionally, the template generation module is used to determine, for each candidate batch business template, the number of goods involved, the number of sales items, and the number of relationships 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 goods, the number of sales items, and the number of relationships, and determine the target batch business template from the candidate batch business templates whose template complexity meets the preset conditions.
[0016] Optionally, batch business processing is performed based on the target batch business template, and the processing results and user feedback information are obtained; the target batch business data, target product data, target batch business template, processing results and user feedback information are used as new training samples; the batch business template generation model is periodically retrained using all the new training samples to update the model parameters.
[0017] According to another aspect of the embodiments of this application, a batch business template generation apparatus is also provided, comprising: an acquisition module, configured to acquire target batch business data to be processed, determine the target business scenario corresponding to the target batch business data, and acquire target product data corresponding to the target business scenario; a feature extraction module, configured to determine all first key field features in the target batch business data and the target product data, and obtain a first key field feature set; and a template generation module, configured 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, configured to analyze the first importance score of different key field features on the success of batch business processing, determine target key field features from the first key field feature set based on the first importance score, and generate a target batch business template based on the target key field features.
[0018] According to another aspect of the embodiments of this application, a computer program product is also provided, the computer program product comprising: a computer program, wherein the computer program, when executed by a processor, implements the above-described method for generating batch business templates.
[0019] According to another aspect of the embodiments of this application, an electronic device is also provided, the electronic device including: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described method for generating batch business templates through the computer program.
[0020] In this embodiment, the specific business scenario corresponding to the batch business data to be processed is automatically identified and matched, while the product data under that scenario is efficiently obtained. This ensures the relevance and accuracy of the subsequent template generation, avoiding situations where the template is not suitable for a specific business type or key product information is omitted. Through intelligent analysis, all first key field features are automatically identified from the batch business data and product data, forming a key field feature set. This process utilizes the frequency of data usage, domain knowledge, and inter-field correlations to ensure that the template only contains fields that are crucial to business success, improving the template's conciseness and efficiency, while also reducing the complexity and error rate of manual template configuration. By employing machine learning models, especially random forest and logistic regression models, the most suitable batch business template for the target business scenario can be generated based on the key field feature set. The random forest model can evaluate the importance of fields and the correlation between fields, while the logistic regression model can predict the probability of a field being selected. Combining the two models not only generates templates but also optimizes the template structure, ensuring that the template contains necessary information while avoiding redundancy, thus improving the template's accuracy and quality. This solves the technical problems of related solutions where batch business templates mainly rely on manual configuration, resulting in low efficiency, high error rates, and poor applicability. Attached Figure Description
[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0022] Figure 1 This is a flowchart illustrating an optional method for generating batch business templates according to an embodiment of this application;
[0023] Figure 2 This is a schematic diagram of an optional batch service template generation device according to an embodiment of this application;
[0024] Figure 3 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0025] 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 with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] The information collected in this application embodiment is information and data authorized by the user or fully authorized by all parties. The collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data all comply with the relevant laws, regulations and standards of the relevant countries and regions, necessary confidentiality measures have been taken, and they do not violate public order and good morals. Corresponding operation entry points are provided for users to choose to authorize or refuse.
[0028] Example 1
[0029] According to an embodiment of this application, a method for generating batch business templates is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0030] Figure 1 This is a flowchart illustrating a method for generating batch business templates according to an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps:
[0031] Step S102: Obtain the target batch business data to be processed, determine the target business scenario corresponding to the target batch business data, and obtain the target product data corresponding to the target business scenario.
[0032] Step S104: Determine all first key field features in the target batch business data and target product data to obtain the first key field feature set;
[0033] Step S106: Analyze the first key field feature set using the batch business template generation model corresponding to the target business scenario to obtain the target batch business template. The batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model to analyze the first importance score of different key field features on the success of batch business processing. Based on the first importance score, determine the target key field features from the first key field feature set and generate the target batch business template based on the target key field features.
[0034] The following section explains the steps involved in generating batch business templates, using a specific implementation process as an example.
[0035] First, a batch business template generation model needs to be established to process all business transactions.
[0036] As an optional implementation method, the training process of the batch business template generation model can be carried out in the following way:
[0037] S1, Construct 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 based on the analysis results of the random forest sub-model and the logistic regression sub-model and generates target batch business templates;
[0038] S2, obtain multiple sets of historical batch business data and historical product 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, JDBC (Java Database Connectivity) or other database connection technologies can be used to establish a secure connection with the business system database. During the connection process, data transmission security and encryption should be ensured to prevent the leakage of sensitive information. The types of data to be collected should be clearly defined, including historical batch business data, product data (detailed specifications of products and sales items), and corresponding historical batch business templates. This data should cover the typical characteristics of the target business scenario. Based on the predefined collection scope, the required historical data should be 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 AM) through incremental data synchronization, extracting only the data added or updated the previous day.
[0040] Batch business data can include detailed information for each batch processing, such as processing time, processing person, processing number, product type, sales product information, related relationships, processing results, etc.; product data includes 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 previously used for batch processing, including template ID, template name, creation time, creator, template structure and field configuration information, etc.
[0041] For acquiring product data, a RESTful API interface can be developed to connect with the corresponding modules of the business system, obtain the latest information on products and sales items in real time, including specifications, attributes and relationships. Product information can be automatically polled every 15 minutes to ensure that the template generation uses the latest data, and when data changes are detected, it is immediately synchronized to the local database.
[0042] S3, for each set of historical batch business data and historical product data, determine the second key field feature set corresponding to the historical batch business data and historical product data, use the second key field feature set as a training sample, 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] The process of determining the second key field feature set corresponding to historical batch business data and historical product data includes: preprocessing the historical batch business data and historical product data, wherein the preprocessing includes at least: data cleaning and data standardization; identifying all the second key fields in the preprocessed target batch business data and target product data, and encoding each second key field using a preset encoder to obtain multiple second key field features, and forming a second key field feature set by combining all the second key field features.
[0044] For example, after acquiring the data, the key fields of each collected record should be checked, such as the service number and product type, to ensure that there are no missing records. Records with missing data may reflect system problems or business anomalies and should be marked or excluded. Outliers can be detected and handled by defining valid ranges and formats. Specifically, the following steps can be taken:
[0045] For numerical fields, statistical methods can be used, such as using quartile ranges to identify outliers. For slightly anomalous values, corrections can be considered, such as adjusting values that are out of range to boundary values. For severe outliers that seriously affect model training, they can be directly excluded to avoid biasing the model. Median, mean, or nearest neighbor values can also be used to replace outliers to maintain the integrity of the dataset.
[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 the IMEI number is formatted correctly. Natural language processing techniques, such as Levenshtein distance, can also be used to identify and correct spelling errors, or to remove information irrelevant to the business, such as extra comments or irrelevant characters appearing in the text field.
[0047] Outliers in the time field may manifest as unreasonable dates (such as future dates or unreasonable dates in historical periods). Reasonableness checks can be performed to ensure that the value of the time field is within the range allowed by business logic. For example, it should not be earlier than the system launch date, nor should it exceed the current date. For dates that exceed the reasonable range, they can be corrected to the system launch date or the current date, depending on business requirements.
[0048] Outliers in enumeration type fields are usually invalid codes or undefined states. You can perform coding checks to ensure that each enumeration value is a valid value in the predefined list. If an enumeration value is invalid, you can recode it to the most common valid value (mode) or select a reasonable alternative value according to the 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 a rule engine to verify whether the data conforms to predefined business rules. For outliers that cannot be automatically corrected, set up a manual review process for experts or business personnel to judge and handle them.
[0050] When handling outliers, the system should record detailed information about each outlier detection and handling, including the outlier type, handling method, and handling time. It can also set up outlier notifications to automatically notify relevant maintenance personnel for verification and adjustment when an outlier is detected.
[0051] After processing the data, it is also possible to perform data integrity scoring, accuracy scoring, and consistency scoring, and calculate the average of the three scores, thereby helping system administrators and data scientists quickly understand the overall quality of the dataset.
[0052] Determine the set of third key field features corresponding to the corresponding historical batch business template, including: 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 a set of third key field features from all the third key field features.
[0053] Determine the second importance score of each third key field feature in the third key field feature set, including: 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 the preset field weight coefficient table, and obtain the feedback score of the target object on the third key field.
[0054] Among them, the third key field feature corresponds to the frequency of use of the third key field in all historical batch business templates. The calculation formula can be expressed as follows:
[0055]
[0056] In the formula, N(f) represents the number of times field f appears in the historical batch business template, N total This indicates the total number of historical batch business templates.
[0057] Information gain is a metric that measures the contribution of a field to classification or prediction. It calculates the contribution of each third key field to the success rate of batch business processing, thereby assessing its importance in template generation. The formula can be expressed as:
[0058] IG(Class,f)=H(Class)-H(Class|f)
[0059] In the formula, (H(Class)) represents the entropy without considering field f, and H(Class|f)) represents the conditional entropy after knowing field f.
[0060] Field weights are determined based on a preset field weight coefficient table. This table sets different importance levels according to field type (such as mobile phone number, package type, address, etc.). By querying this table, an initial weight is assigned to each third key field. Feedback on the importance of fields is also collected from users or business operators. This may be collected through the user interface or based on statistics of the results after business processing.
[0061] Determine the weight coefficients for usage frequency, information gain, field weight, and feedback score respectively. Then, sum the weighted values of usage frequency, information gain, field weight, and feedback score based on these weight coefficients. Use the sum as the second importance score for the third key field feature. The formula for calculating the second importance score 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 rating of the target object for field f. α, β, γ, and δ are weight coefficients used to adjust the importance of each factor.
[0064] In addition, success rate impact factors and time decay factors were 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 field's recent usage and the pattern of changes in importance to ensure the timeliness and adaptability of the scoring. Specifically:
[0065] For each third key field feature, determine the first number of historical batch business templates that have successfully completed business transactions including the third key field feature, and the second number of historical batch business templates that have successfully completed business transactions excluding the third key field feature. Determine the difference between the first and second numbers, and determine the ratio of the difference to the second number as the success rate impact factor. The formula for calculating the success rate impact factor can be expressed as:
[0066]
[0067] In the formula, SuccessRate with(f) This indicates the number of historical batch business templates that have been successfully processed, including the third key field 'f'. SuccessRate without(f) This represents the number of historical batch transaction templates that successfully completed transactions without including the third key field 'f'. This factor reflects the actual contribution of field 'f' to improving the transaction success rate. If the transaction success rate is significantly higher in templates containing field 'f' than in templates without 'f', then the value of Importance(f) will be higher, indicating that field 'f' has a positive impact on successfully completing the transaction.
[0068] In addition, a time decay factor is determined based on the completion time of batch transactions corresponding to the third key field feature. This factor reflects the impact of time on field importance, especially for fields that have been used less recently, whose importance will decrease, thus receiving a lower weight in template generation. The time decay factor weight is used to measure the change in field importance over time. By assigning higher weights to recent data, it ensures that weight adjustments can reflect the latest business trends and data distribution in a timely manner. This factor is usually used in conjunction with the importance and frequency of use of a field, helping the system to quickly adapt to field weight adjustments in emerging and declining business scenarios.
[0069] The product of the weighted sum of the third key field feature, the success rate impact factor, and the time decay factor is used as the second importance score of the third key field feature. This comprehensive score fully reflects the field's impact on the successful generation and processing of business templates, as well as its importance at the current point in time, and serves as the basis for the model to select key fields for template generation.
[0070] S4 uses multiple training samples and sample labels to train an initial model, resulting in a batch business template generation model.
[0071] The batch business template generation model corresponding to the target business scenario is trained using the above method. This model is then used to analyze the first key field feature set to obtain the target batch business template. This process can be performed as follows:
[0072] First, obtain the target batch of business data to be processed, determine the target business scenario corresponding to the target batch of business data, and obtain the target product data corresponding to the target business scenario.
[0073] As an optional implementation method, 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 product 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, the system acquires batch business data to be processed. This data may be contained in an Excel spreadsheet or database query results, including key information such as the type, content, and time range of the batch business. Based on keywords (such as mobile phone, broadband, ITV, cloud server) and business type in the batch business data, the system determines the target business scenario corresponding to the data. For example, if the data contains a large number of mobile phone numbers and UIM card information, the system will identify that this is a batch of mobile phone service order requests and extract relevant product data from the product specification library and sales product specification library. For example, for the mobile phone business scenario, the system will acquire all mobile phone product information, package sales product information, and optional package sales product information, while recording the relationship between products and sales products.
[0075] After obtaining the above data, identify all the first key field features in the target batch business data and the target product data to obtain the first key field feature set;
[0076] Preprocessing is performed on the target batch business data and target product data. The preprocessing includes at least: data cleaning and data standardization. All first key fields in the preprocessed target batch business data and target product data are identified, and each first key field is encoded using a preset encoder to obtain multiple first key field features. All first key field features are then combined into a first key field feature set.
[0077] In the preprocessed data, the system re-identifies all primary key fields. This is because preprocessing may alter the values or states of fields; for example, data cleaning and missing value imputation may render certain fields new key fields. The system uses a pre-defined encoder to encode each primary key field, converting categorical fields into numerical forms for easier processing by machine learning algorithms. Encoding methods may include one-hot encoding, label encoding, or embedding encoding, depending on the field type and model requirements. For example, for the "product type" field, there may be options such as "mobile phone," "broadband," and "ITV." The system would encode these as numerical vectors such as [1,0,0], [0,1,0], and [0,0,1], facilitating model recognition and processing of different types of business scenarios.
[0078] The first key field feature set contains the encoded representations of all key fields in the batch business data and product data, serving as crucial input for subsequent model training and intelligent template generation. By standardizing the features, the system can uniformly process information from different fields, improving data processing efficiency and the ease 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 the target batch business template. The batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model to analyze the first importance score of different key field features on the success of batch business processing. Based on the first importance score, the target key field features are determined from the first key field feature set, and the target batch business template is generated based on the target key field features.
[0080] 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 success of batch business processing based on information gain or Gini index. The calculation formula for 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 field f i The importance score in the entire random forest model. This score measures the impact of a field on the final decision during template generation. T represents the total number of decision trees in the random forest, and I... t (f i ) represents field f i The importance score in the t-th decision tree is typically calculated using the information gain that this field brings when splitting nodes in the tree.
[0083] The formula for calculating the third importance score based on the Gini index can be expressed as:
[0084]
[0085] In the formula, S t (f i ) indicates that in the t-th 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 dataset. ΔGini(s) represents the difference in Gini index before and after node s is split.
[0086] The logistic regression sub-model is used to determine the probability that the first key field corresponding to each first key field feature is 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 equals 1 given the input feature x. β0 is the intercept term (also called the bias), which does not depend on any input feature. i It is with each input feature x i The relevant weights or coefficients, where n is the number of features.
[0089] The template generation module is also used to perform a 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. If the first importance score is higher than the preset score threshold, the first key field feature is determined as the target key field feature.
[0090] The template generation module is also used during model training to determine multiple frequent itemsets in each set of second and third key field features using the Apriori algorithm, and to determine the support and confidence of each frequent itemset. Each frequent itemset includes multiple related key field features. A frequent itemset is a combination of fields that frequently appear together in the dataset. The Apriori algorithm helps the system understand the relationship between fields by searching for frequent itemsets and evaluating their support and confidence. Support reflects the frequency of an itemset in the dataset, while confidence measures the probability that other fields will appear when one field appears.
[0091] For example, set a minimum support threshold, say 0.5, which indicates the minimum percentage of historical batch transactions a certain itemset must appear in to be considered frequent. Set a minimum confidence threshold, say 0.7, which indicates the minimum probability that Y must also appear given X for a rule to be considered meaningful. Extract all individual features from the second and third key field feature sets, calculate their support, and filter out features with support greater than or equal to the minimum support threshold to form frequent 1-itemsets. Combine frequent 1-itemsets to generate candidate 2-itemsets, calculate the support of each candidate 2-itemset, and filter out itemsets with support greater than or equal to the minimum support threshold to form frequent 2-itemsets. Repeat the above process to gradually generate larger frequent itemsets (such as 3-itemsets, 4-itemsets, etc.) until no new frequent itemsets can be found. For each frequent itemset, generate all possible association rules (e.g., X→Y), where X represents a premise item or itemset, i.e., the left-hand side of the rule, and Y represents a conclusion item or itemset, i.e., the right-hand side of the rule. Calculate the confidence of each rule and filter out rules with a confidence greater than or equal to the minimum confidence threshold. Support represents the frequency of a certain itemset (or rule) in all historical batch transactions, and confidence represents the probability that Y will also occur if X occurs.
[0092] The template generation module is used to identify a target frequent itemset whose support and confidence are both higher than a preset threshold among multiple frequent itemsets associated with the target key field features. The module randomly combines the key fields corresponding to the multiple associated key field features and the key fields corresponding to the target key field features in the target frequent itemset to obtain multiple candidate batch business templates. The target batch business template is then determined from the multiple candidate batch business templates.
[0093] For example, the template generation module first identifies multiple frequent itemsets from all the second and third key field feature sets. These itemsets have support and confidence levels higher than preset thresholds. From these frequent itemsets, itemsets associated with the target key field feature are further identified; that is, these itemsets contain at least one target key field feature. The key fields contained in the target frequent itemsets associated with the target key field feature are randomly combined to generate multiple candidate batch business templates. This step ensures that the templates contain all possible associated fields, while randomization avoids the limitations of a single combination. Each candidate template has a different structure and field combination, providing diverse options for subsequent template complexity analysis.
[0094] The template generation module is used to determine the number of products, the number of sales items, and the number of relationships between different products and sales items involved in each candidate batch business template. Based on the number of products, the number of sales items, and the number of relationships, the template complexity of the candidate batch business template is determined, and the target batch business template is determined from the candidate batch business templates whose template complexity meets the preset conditions.
[0095] The quantity of goods can be the number of product categories included in the template (such as mobile phones, broadband, etc.), the quantity of sales items can be the number of sales item types included in the template (such as packages, agreements, etc.), and the number of relationships can be the number of various dependencies or combination rules between goods and sales items. Using a preset complexity calculation formula, the quantity of goods, the quantity of sales items, and the number of relationships are transformed into a quantifiable complexity indicator.
[0096]
[0097] In the formula, α, β, and γ are weighting 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 true complexity of batch business. N products This refers to the number of products involved in the candidate batch business template, such as mobile phones, broadband, IPTV, etc. The more products there are, the higher the complexity of the template usually is, because the number of fields and rules that need to be considered also increases. N salesThis refers to the quantity of sales items involved in the candidate bulk business template, such as packages, agreements, optional packages, etc. i w represents the number of the i-th type of dependency. i This represents the weight of the i-th dependency relationship.
[0098] Based on business requirements or system settings, a preset condition or threshold for template complexity is determined. The template generation module selects templates whose complexity meets the preset condition from all candidate templates as candidates for the target batch business templates. One or more of these candidate templates that meet the complexity condition are selected as the target batch business templates.
[0099] For example, when using a target batch business template for batch business processing, obtain processing results and user feedback information, including success or failure status, and any related error messages or processing time metrics. User feedback messages may include feedback collected from users or sales personnel regarding the template usage process, including the template's usability, the necessity of fields, any problems encountered during processing, or suggestions for improvement. Use the target batch business data, target product data, target batch business template, processing results, and user feedback information as new training samples. Periodically retrain the batch business template generation model using all new training samples, updating the model parameters. For example, set a period (such as weekly or monthly) to retrain the batch business template generation model using all new training samples. This helps the model learn the latest business trends, user preferences, and processing rules. Through retraining, the model can adjust its internal parameters based on new data to improve prediction accuracy and generalization ability. For example, a random forest model might adjust the tree depth and feature selection threshold, while a logistic regression model might update its weight coefficients.
[0100] In this embodiment, the specific business scenario corresponding to the batch business data to be processed is automatically identified and matched, while the product data under that scenario is efficiently obtained. This ensures the relevance and accuracy of the subsequent template generation, avoiding situations where the template is not suitable for a specific business type or key product information is omitted. Through intelligent analysis, all first key field features are automatically identified from the batch business data and product data, forming a key field feature set. This process utilizes the frequency of data usage, domain knowledge, and inter-field correlations to ensure that the template only contains fields that are crucial to business success, improving the template's conciseness and efficiency, while also reducing the complexity and error rate of manual template configuration. By employing machine learning models, especially random forest and logistic regression models, the most suitable batch business template for the target business scenario can be generated based on the key field feature set. The random forest model can evaluate the importance of fields and the correlation between fields, while the logistic regression model can predict the probability of a field being selected. Combining the two models not only generates templates but also optimizes the template structure, ensuring that the template contains necessary information while avoiding redundancy, thus improving the template's accuracy and quality. This solves the technical problems of related solutions where batch business templates mainly rely on manual configuration, resulting in low efficiency, high error rates, and poor applicability.
[0101] Example 2
[0102] According to an embodiment of this application, a batch service template generation apparatus is also provided for implementing the batch service template generation method in Embodiment 1, such as... Figure 2 As shown, the batch business template generation device includes at least: 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 product data corresponding to the target business scenario.
[0104] Feature extraction module 22 is used to determine all first key field features in the target batch business data and target product data, and obtain the 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 the target batch business template. The batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model to analyze the first importance score of different key field features on the success of batch business processing. Based on the first importance score, the target key field features are determined from the first key field feature set, and the target batch business template is generated based on the target key field features.
[0106] The following section describes the functions of each module in the batch business template generation device, using a specific implementation process as an example.
[0107] The acquisition module obtains the target batch business data to be processed, determines the target business scenario corresponding to the target batch business data, and obtains the target product data corresponding to the target business scenario.
[0108] As an optional implementation method, 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 product 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 the first key field features in the target batch business data and the target product data, and obtains the first key field feature set;
[0110] Preprocessing is performed on the target batch business data and target product data. The preprocessing includes at least: data cleaning and data standardization. All first key fields in the preprocessed target batch business data and target product data are identified, and each first key field is encoded using a preset encoder to obtain multiple first key field features. All first key field features are then combined into a first key field feature set.
[0111] After obtaining the first key field feature set, the template generation module analyzes the first key field feature set using a batch business template generation model corresponding to the target business scenario to obtain the target batch business template. The batch business template generation model includes at least a random forest sub-model and a logistic regression sub-model to analyze the first importance score of different key field features on the success of batch business processing. Based on the first importance score, the target key field features are determined from the first key field feature set, and the target batch business template is generated based on the target key field features.
[0112] As an optional implementation method, the training process of the batch business template generation model can be carried out in the following way:
[0113] S1, Construct 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 based on the analysis results of the random forest sub-model and the logistic regression sub-model and generates target batch business templates;
[0114] S2, obtain multiple sets of historical batch business data and historical product data and corresponding historical batch business templates under the target business scenario;
[0115] S3, for each set of historical batch business data and historical product data, determine the second key field feature set corresponding to the historical batch business data and historical product data, use the second key field feature set as a training sample, 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] The process of determining the second key field feature set corresponding to historical batch business data and historical product data includes: preprocessing the historical batch business data and historical product 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 target product data, and encoding each second key field using a preset encoder to obtain multiple second key field features, and forming a second key field feature set from all the second key field features; and determining 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 encoding each third key field using a preset encoder to obtain multiple third key field features, and forming a third key field feature set from all the third key field features.
[0117] Determine the second importance score for each third key field feature in the third key field feature set, including:
[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 the preset field weight coefficient table, and obtain the feedback score of the target object on the third key field.
[0119] Determine the weight coefficients corresponding to usage frequency, information gain, field weight, and feedback score respectively. Then, sum the usage frequency, information gain, field weight, and feedback score according to the weight coefficients, and use the sum as the second importance score of the third key field feature.
[0120] For each third key field feature, determine the first number of historical batch business templates that have been successfully processed, including those corresponding to the third key field feature, and the second number of historical batch business templates that have been successfully processed, excluding those corresponding to the third key field feature. Determine the difference between the first and second numbers, and the ratio of the difference to the second number is determined as the success rate impact factor. Determine the time decay factor based on the processing completion time of the batch business corresponding to the third key field feature. The product of the weighted sum of the third key field feature, the success rate impact factor, and the time decay factor is used as the second importance score of the third key field feature.
[0121] S4 uses multiple training samples and sample labels to train an initial model, resulting in a batch business template generation model.
[0122] The batch business template generation model corresponding to the target business scenario is trained in the above manner. The model is then used to analyze the first key field feature set to obtain the target batch business template.
[0123] 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 success of batch business processing based on information gain or Gini index.
[0124] 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.
[0125] The template generation module is used to perform a 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. If the first importance score is higher than the preset score threshold, the first key field feature is determined as the target key field feature.
[0126] The template generation module is also used during model training to determine multiple frequent itemsets in each set of second and third key field features using the Apriori algorithm, and to determine the support and confidence of each frequent itemset, wherein each frequent itemset includes multiple associated key field features.
[0127] The template generation module is used to identify a target frequent itemset whose support and confidence are both higher than a preset threshold among multiple frequent itemsets associated with the target key field features. The module randomly combines the key fields corresponding to the multiple associated key field features and the key fields corresponding to the target key field features in the target frequent itemset to obtain multiple candidate batch business templates. The target batch business template is then determined from the multiple candidate batch business templates.
[0128] Perform batch business processing based on the target batch business template and obtain processing results and user feedback information; use the target batch business data, target product data, target batch business template, processing results and user feedback information as new training samples; periodically retrain the batch business template generation model using all new training samples and update the model parameters.
[0129] It should be noted that each module in the batch service template generation device in this application embodiment corresponds one-to-one with each implementation step of the batch service template generation method in embodiment 1. Since embodiment 1 has been described in detail, some details not shown in this embodiment can be referred to embodiment 1, and will not be elaborated further here.
[0130] Example 3
[0131] According to an embodiment of this application, a computer program product is also provided, which includes a computer program, wherein when the computer program is executed by a processor, it implements the batch business template generation method in Embodiment 1.
[0132] According to an embodiment of this 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 batch service template generation method in Embodiment 1 by running the computer program.
[0133] According to an embodiment of this application, a processor is also provided for running a computer program, wherein the computer program executes the batch business template generation method in Embodiment 1 during runtime.
[0134] According to an embodiment of this application, an electronic device is also provided, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the batch service template generation method of Embodiment 1 through the computer program.
[0135] Specifically, the computer program executes the following steps during runtime: acquiring the target batch business data to be processed, determining the target business scenario corresponding to the target batch business data, and acquiring the target product data corresponding to the target business scenario; determining all first key field features in the target batch business data and target product data to obtain a set of first key field features; analyzing the set of first key field features 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, used to analyze the first importance score of different key field features on the success of batch business processing, determining the target key field features from the set of first key field features based on the first importance score, and generating the target batch business template based on the target key field features.
[0136] As an alternative implementation, the above-mentioned electronic device may exist in the form of a mobile terminal, a computer terminal, or a similar computing device. Figure 3 A hardware structure block diagram of an electronic device for implementing a method for generating batch service templates is shown. For example... Figure 3 As shown, the electronic device 30 may include one or more processors 302 (shown as 302a, 302b, ..., 302n in the figure) (processor 302 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), 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 a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 3 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, electronic device 30 may also include... Figure 3 The more or fewer components shown, or having the same Figure 3 The different configurations shown.
[0137] It should be noted that the aforementioned one or more processors 302 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element of the electronic device 30. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination 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 batch business template generation method in this embodiment. The processor 302 executes various functional applications and data processing by running the software programs and modules stored in the memory 304, thereby implementing the above-mentioned application vulnerability detection method. The memory 304 may include high-speed random access memory, and may also include 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 memory remotely located relative to the processor 302, and these remote memories can be connected to the electronic device 30 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0139] The transmission device 306 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the electronic device 30. In one example, the transmission device 306 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 306 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0140] The display may be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the electronic device 30.
[0141] The sequence numbers of the above embodiments are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0142] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions 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. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.
[0144] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0145] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0146] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0147] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating batch business templates, characterized in that, The method comprises the following steps: acquiring target batch service data to be processed, and determining a target service scenario corresponding to the target batch service data, and acquiring target commodity data corresponding to the target service scenario; determining all first key field features in the target batch service data and the target commodity data to obtain a first key field feature set; analyzing the first key field feature set by using a batch service template generation model corresponding to the target service scenario to obtain a target batch service template, wherein the batch service template generation model at least comprises a random forest sub-model and a logistic regression sub-model, which are used to analyze first importance scores of different key field features on the success of batch service processing, determine target key field features from the first key field feature set according to the first importance scores, and generate the target batch service template according to the target key field features; the training process of the batch service template generation model comprises: constructing an initial model, wherein the initial model at least comprises: a random forest sub-model, a logistic regression sub-model, a template generation module for selecting target key field features and generating the target batch service template according to analysis results of the random forest sub-model and the logistic regression sub-model; acquiring multiple sets of historical batch service data and historical commodity data under the target service scenario and corresponding historical batch service templates; for each set of historical batch service data and historical commodity data, determining a second key field feature set corresponding to the historical batch service data and the historical commodity data, taking the second key field feature set as a training sample, and determining a third key field feature set corresponding to a historical batch service template corresponding to the training sample, determining second importance scores of each third key field feature in the third key field feature set, taking the third key field feature set and the second importance scores as sample labels of the training sample; training the initial model by using multiple training samples and sample labels to obtain the batch service template generation model.
2. The method of claim 1, wherein: the target service scenario comprises at least one of the following: a mobile phone service scenario, a broadband service scenario, a broadband Internet audio-visual service scenario, and a cloud host service scenario; the target batch service data comprises at least one of the following: a batch service type, a batch service content, and a preset time period; the target commodity data at least comprises: product information corresponding to the target service scenario, sales product information, and an association relationship between the product and the sales product.
3. The method of claim 1, wherein, The method comprises the following steps: preprocessing the target batch service data and the target commodity data, wherein the preprocessing at least comprises: data cleaning and data standardization processing; Identify all first key fields in the pre-processed target bulk service data and the target commodity data, encode each of the first key fields by using a preset encoder to obtain a plurality of first key field features, and group all the first key field features to form a first key field feature set.
4. The method of claim 1, wherein, determining a second key field feature set corresponding to the historical bulk service data and historical commodity data comprises: pre-processing the historical bulk service data and historical commodity data, wherein the pre-processing at least includes data cleaning and data standardization processing; identifying all second key fields in the pre-processed target bulk service data and the target commodity data, and encoding each of the second key fields by using a preset encoder to obtain a plurality of second key field features, and grouping all the second key field features to form the second key field feature set; determining a third key field feature set corresponding to the historical bulk service template comprises: identifying all third key fields in the corresponding historical bulk service template, and encoding each of the third key fields by using a preset encoder to obtain a plurality of third key field features, and grouping all the third key field features to form the third key field feature set.
5. The method of claim 1, wherein, determining a second importance score of each third key field feature in the third key field feature set comprises: for each third key field feature in the third key field feature set, determining a frequency of use of the third key field corresponding to the third key field feature in all the historical bulk service 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 the third key field by a target object; respectively determining weight coefficients corresponding to the frequency of use, the information gain, the field weight, and the feedback score, and performing weighted summation on the frequency of use, the information gain, the field weight, and the feedback score according to the weight coefficients, and taking a sum value obtained as the second importance score of the third key field feature.
6. The method of claim 5, wherein, The method further comprises: for each third key field feature, determining a first number of historical bulk service templates in which a service is successfully handled and which include the third key field corresponding to the third key field feature, a second number of historical bulk service templates in which a service is successfully handled and which do not include the third key field, determining a difference between the first number and the second number, and determining a success rate influence factor as a ratio of the difference to the second number; determining a time decay factor according to a completion time of the bulk service corresponding to the third key field feature; taking a product of the weighted summation value corresponding to the third key field feature, the success rate influence factor, and the time decay factor as the second importance score of the third key field feature.
7. The method of claim 1, wherein, The random forest sub-model is configured to determine a third importance score of each first key field feature on the success of batch business handling based on information gain or Gini index; The logistic regression sub-model is configured to determine a selection probability of a first key field corresponding to each first key field feature being selected as a template field; The template generation module is configured to, for each first key field feature, perform weighted summation on the third importance score of the first key field feature and the selection probability based on a preset weight coefficient to obtain the first importance score of the first key field feature, and determine the first key field feature as the target key field feature if the first importance score is higher than a preset score threshold.
8. The method of claim 7, wherein The template generation module is further configured to, in a model training process, determine a plurality of frequent item sets in each group of the second key field feature set and the third key field feature set by using an Apriori algorithm, and determine a support degree and a confidence degree of each frequent item set, wherein each frequent item set includes a plurality of associated key field features.
9. The method of claim 8, wherein The template generation module is configured to determine a target frequent item set in which the support degree and the confidence degree of a plurality of frequent item sets associated with the target key field feature are both higher than a preset threshold, randomly combine a key field corresponding to a plurality of associated key field features associated with the target key field feature in the target frequent item set and a key field corresponding to the target key field feature to obtain a plurality of candidate batch business templates, and determine the target batch business template from the plurality of candidate batch business templates.
10. The method of claim 9, wherein The template generation module is configured to, for each candidate batch business template, determine a number of commodities, a number of sales items, and a number of association relationships between different products and sales items involved in the candidate batch business template, determine a template complexity of the candidate batch business template according to the number of commodities, the number of sales items, and the number of association relationships, and determine the target batch business template from the candidate batch business templates whose template complexity satisfies a preset condition.
11. The method of claim 1, wherein, The method further includes: processing batch business according to the target batch business template, and obtaining a processing result 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; periodically retraining the batch business template generation model using all new training samples to update model parameters.
12. A device for generating batch business templates, characterized in that, The method further includes: an acquisition module configured to acquire target batch business data to be processed, and determine 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 configured to 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; and a template generation module configured to determine a target batch business template corresponding to the target batch business data from the first key field feature set. The template generation module is configured to analyze the first key field feature set by 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 at least includes a random forest sub-model and a logistic regression sub-model, and is configured to analyze a first importance score of different key field features on the success of batch business handling, determine a target key field feature from the first key field feature set according to the first importance score, and generate the target batch business template according to the target key field feature; and a training process of the batch business 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, a template generation module configured to select a target key field feature according to an analysis result of the random forest sub-model and the logistic regression sub-model and generate the target batch business template; obtaining a plurality of sets of historical batch business data and historical commodity data and corresponding historical batch business templates under the target business scenario; for each set of the historical batch business data and historical commodity data, determining a second key field feature set corresponding to the historical batch business data and historical commodity data, taking the second key field feature set as a training sample, and determining a third key field feature set corresponding to a historical batch business template corresponding to the training sample, determining a second importance score of each third key field feature in the third key field feature set, taking the third key field feature set and the second importance score as a sample label of the training sample; and training the initial model by using a plurality of training samples and sample labels to obtain the batch business template generation model.
13. A computer program product, characterised in that, The computer program is executed by a processor to implement the batch business template generation method in any one of claims 1 to 11. The memory and the processor, wherein the memory stores a computer program, and the processor is configured to execute the batch business template generation method in any one of claims 1 to 11 by using the computer program.
14. An electronic device, comprising: The memory and the processor, wherein the memory stores a computer program, and the processor is configured to execute the batch business template generation method in any one of claims 1 to 11 by using the computer program.
Citation Information
Patent Citations
Customer service strategy making method and device based on random forest and logistic regression
CN108388955A
Data processing template generation method and device, electronic equipment and storage medium
CN115169316A