Order issuing control method and device based on rule engine and electronic equipment

By adopting a rule-based order distribution control method, keywords are extracted using global similarity and word similarity algorithms for order classification, which solves the problems of inflexibility and inefficiency in order distribution and achieves orderly distribution and improved system stability.

CN121213201AActive Publication Date: 2025-12-26SICHUAN GOOD DR CLOUD HEALTH TECH CO LTD

Patent Information

Application Number
CN202511745311.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-26
Publication Date
2025-12-26
Estimated Expiration
2045-11-26

AI Technical Summary

Technical Problem

The lack of flexibility in the order placement methods of existing internet trading platforms leads to high pressure on downstream systems, low processing efficiency, inability to guarantee stable operation, and low efficiency of manual screening.

Method used

A rule-based order distribution control method is adopted. Candidate keywords for orders are extracted by word extraction algorithms based on global similarity and word similarity. Keyword importance scores are calculated, and the rule engine is used to classify and process orders, which are then pushed to the rejection, immediate, or planned distribution data pool.

Benefits of technology

It enables flexible order categorization and push, reducing the pressure on downstream systems, ensuring the stability of system operation, improving processing efficiency, and reducing the error rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121213201A_ABST
    Figure CN121213201A_ABST
Patent Text Reader

Abstract

The invention discloses an order issuing control method and device based on a rule engine and electronic equipment, and the method comprises the steps: extracting effective order information through automatic recognition of order features; then, the orders are classified according to a preset rule, that is, the orders pushed by an upstream system are stored in different data pools based on rule matching through three data pools of rejection issuing, instant issuing and planned issuing; finally, the orders can be issued in order according to the pushing rules of different data pools. Therefore, compared with the traditional method of directly issuing the orders to the downstream system, the method has the advantages that the classified pushing of the orders is realized, so that the flexibility of issuing the orders is improved, the ordered issuing of the orders is realized, the operation pressure of the downstream system is reduced, and the operation stability of the system is ensured; meanwhile, the whole process does not need manual intervention, the efficiency is improved, and the error rate is reduced; therefore, the method is very suitable for large-scale application and popularization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of order push technology, specifically relating to an order issuance control method, device, and electronic device based on a rule engine. Background Technology

[0002] With the rapid development of internet technology, users are using online platforms for consumption and transactions more and more frequently. At the same time, the amount of order data generated during online and offline consumption and transactions is also increasing. Therefore, efficient order processing has become an important part of ensuring the timeliness of order logistics.

[0003] Currently, existing internet trading platforms typically capture online transaction data and generate orders through their business systems, then directly send these orders to downstream systems for processing (such as inventory allocation). This uncontrolled order distribution method increases the pressure on downstream systems. For example, some orders may not meet relevant rules, preventing downstream systems from processing them and leading to order backlog. Similarly, sending orders that don't require immediate processing directly to downstream systems increases their workload, preventing priority processing of orders that need immediate attention and impacting timeliness. While manual order screening can address these shortcomings, this method is inefficient and unsuitable for large-scale order processing. Thus, the existing order processing suffers from poor flexibility, failing to guarantee the stability of downstream system operations, and manual order screening is not conducive to efficient order data processing.

[0004] Therefore, given the aforementioned shortcomings, how to provide a rule engine-based order issuance control method that is highly flexible and can guarantee order processing efficiency and the stable operation of downstream systems has become an urgent problem to be solved. Summary of the Invention

[0005] The purpose of this invention is to provide a rule engine-based order issuance control method, device, and electronic device to solve the problems of poor flexibility, inability to guarantee the stability of downstream system operation, and low efficiency caused by manual order screening in the existing technology.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a rule engine-based order issuance control method is provided, including: Obtain an order push command, wherein the order push command contains order data; A word extraction algorithm based on global similarity and word similarity is used to extract candidate keywords from the order data in the order push command to obtain a set of order candidate keywords; The importance, attention, and relevance of each order candidate keyword in the order candidate keyword set are calculated. Based on the importance, attention, and relevance of each order candidate keyword, the importance score of each order candidate keyword relative to the order data is calculated. Based on the importance score of each order candidate keyword, a number of order keywords are determined from the set of order candidate keywords; Based on several order keywords, valid order information is determined from the order data; Using a rule engine, valid order information is matched against rules, and based on the rule matching results, the order data is pushed to a rejected data pool, an immediate data pool, or a planned data pool, so that the order data can be pushed to downstream systems according to the push rules corresponding to the rejected data pool, the immediate data pool, or the planned data pool.

[0007] Based on the above-disclosed content, after obtaining an order push command containing order data, this invention first employs a word extraction algorithm based on global similarity and word similarity to extract a set of candidate keywords for the order data in the order push command. Then, it calculates the word importance, word attention, and word relevance of each candidate keyword in the set, and based on this, obtains an importance score for each candidate keyword relative to the order data. This importance score is then used to determine several order keywords. Subsequently, valid order information can be determined based on these order keywords. Next, this invention utilizes a rule engine to perform rule matching on the valid order information, thereby sending the order data to a rejected data pool, an immediate data pool, or a planned data pool. Finally, the order data can be pushed in an orderly manner according to the push rules corresponding to the different types of data pools.

[0008] Through the above design, this invention extracts valid order information by automatically identifying order characteristics. Then, it classifies orders according to preset rules, namely, by using three data pools: rejected, immediate, and planned. Based on rule matching, orders pushed by the upstream system are stored in different data pools. Finally, orders are sent out in an orderly manner according to the push rules of different data pools. Thus, compared with the traditional method of directly sending orders to downstream systems, this invention achieves classified order push, which not only improves the flexibility of order sending but also ensures orderly order sending, thereby reducing the operational pressure on downstream systems and ensuring the stability of system operation. At the same time, the entire process requires no manual intervention, improving efficiency and reducing error rate. Therefore, this invention is very suitable for large-scale application and promotion.

[0009] In one possible design, a word extraction algorithm based on global similarity and word similarity is used to extract candidate keywords from the order data in the order push command, so as to obtain a set of order candidate keywords, including: The order data is segmented into words to obtain a word set; Obtain the initial candidate word set and the candidate word set for the k-th iteration. When k is 1, the initial candidate word set for the k-th iteration contains the target word, and the candidate word set for the k-th iteration is the word segmentation set after removing the target word. The target word is the word in the word segmentation set that has the highest similarity to the order data. Determine whether the iteration stopping condition is met, wherein the iteration stopping condition is that the total number of words in the initial candidate word set at the k-th iteration reaches a preset threshold; If not, then for any candidate word in the candidate word set at the k-th iteration, calculate the global similarity between the candidate word and the order data, and the word similarity between the candidate word and each initial candidate word in the initial candidate word set at the k-th iteration; Based on the global similarity and the similarity between individual words, the candidate score of any candidate word is calculated, and after all candidate words in the candidate word set have been queried, the candidate score of each candidate word is obtained. Add the candidate word with the highest candidate score to the initial candidate word set at the k-th iteration to obtain the initial candidate word set at the (k+1)-th iteration, and remove the candidate word with the highest candidate score from the candidate word set to obtain the candidate word set at the (k+1)-th iteration. Increment k by 1, and re-obtain the initial candidate word set and the candidate word set for the k-th iteration until the iteration stopping condition is met. Then, use the initial candidate word set that meets the iteration stopping condition as the order candidate keyword set.

[0010] In one possible design, the candidate score for any candidate word is calculated based on global similarity and inter-word similarity, including: From the word similarity scores, select the words with the highest similarity scores. Obtain the first hyperparameter, and calculate the difference between the hyperparameter threshold and the first hyperparameter to obtain the second hyperparameter; The first hyperparameter is multiplied by the global similarity, and the second hyperparameter is multiplied by the maximum word similarity to obtain the first product and the second product, respectively. The difference between the first product and the second product is calculated to obtain the candidate score for any of the candidate words.

[0011] In one possible design, the importance of each order candidate keyword in the order candidate keyword set is calculated, including: For any candidate keyword for an order, calculate the word weight of that candidate keyword; Calculate the frequency of occurrence of any candidate keyword for a given order in the order data; Obtain the historical order database, and filter out the first historical order containing the most order keywords and the second historical order containing the fewest order keywords from the historical order database; Based on the frequency of occurrence, the total number of order keywords in the first historical order, and the total number of order keywords in the second historical order, the word frequency feature value of any candidate keyword in the order is calculated; From the historical order database, the total number of historical orders containing any of the order candidate keywords is counted, and the number of times the order candidate keyword appears in each historical order in the historical order database is counted. Filter out the maximum and minimum occurrence counts from each occurrence count; Based on the total number, the maximum number of occurrences, and the minimum number of occurrences, the inverse document feature value of any order candidate keyword is calculated; Based on the word frequency feature value, the reverse document feature value, and the word weight, the word importance of any candidate keyword for an order is calculated.

[0012] In one possible design, the word weight of any of the order candidate keywords is calculated, including: From the order data, determine the occurrence position of any candidate keyword for an order and the part of speech of any candidate keyword for an order at each occurrence position; Calculate the position weight of any order candidate keyword based on its occurrence position. Based on the location weights, the location features of any candidate keyword for an order are calculated; Using the part-of-speech tag of any candidate keyword for an order at each occurrence position, calculate the part-of-speech feature of any candidate keyword for an order. Calculate the average word length of all order candidate keywords in the order candidate keyword set, and calculate the word length feature of any order candidate keyword based on the word length of any order candidate keyword and the average word length; The word weight of any order candidate keyword is calculated using its positional features, part-of-speech features, and word length features.

[0013] In one possible design, the word frequency feature value of any candidate keyword for an order is calculated based on the frequency of occurrence, the total number of order keywords in the first historical order, and the total number of order keywords in the second historical order, including: Based on the frequency of occurrence, the initial word frequency feature value of any candidate keyword for an order is calculated; Based on the occurrence frequency and the total number of order keywords in the first historical order, a first word frequency intermediate parameter is calculated, and based on the occurrence frequency and the total number of order keywords in the second historical order, a second word frequency intermediate parameter is calculated. Summing the first and second intermediate term frequency parameters yields the third intermediate term frequency parameter. Obtain the word frequency control factor, and use the word frequency control factor, the initial word frequency feature value, and the third word frequency intermediate parameter to calculate the word frequency feature value.

[0014] In one possible design, the word attention of each order candidate keyword in the order candidate keyword set is calculated, including: Using a self-attention mechanism, an attention weight matrix is ​​extracted from all order candidate keywords in the order candidate keyword set, wherein the size of the attention weight matrix is... , This represents the number of tokens corresponding to the set of candidate keywords for an order, and each candidate keyword for an order consists of at least one token; Based on the attention weight matrix, the attention value of each token is calculated; An attention matrix is ​​constructed using the attention value of each token; Based on the attention matrix and the attention weight matrix, a word association matrix is ​​generated; Calculate the association value of each token based on the word association matrix; The actual attention level of each token is calculated using its attention value and association value. For any candidate keyword for an order, identify all tokens that constitute that candidate keyword for an order, and use the actual attention of all tokens that constitute that candidate keyword for an order to calculate the word attention of that candidate keyword for an order.

[0015] In one possible design, a rule engine is used to perform rule matching on valid order information, and based on the rule matching results, the order data is pushed to a rejected data pool, an immediate data pool, or a planned data pool, including: If the order number in the valid order information belongs to the rejected order number and / or the delivery address in the valid order information belongs to the logistics out-of-area address, then the rule matching result is to refuse to issue the order, and the order data is pushed to the rejected order data pool; If the valid order information contains a specified delivery time and / or payment delay information, the rule matching result is determined to be a planned delivery order, and the order data is pushed to the planned delivery data pool; If the order amount in the valid order information exceeds the preset amount, the order customer belongs to a specified customer, and / or the order type belongs to a specified order type, then the rule matching result is to issue the order immediately, and the order data is pushed to the immediate issuance data pool. The specified order type is a commercial transfer order, a platform direct delivery order, or an initial order.

[0016] Secondly, a rule engine-based order issuance control device is provided, including: The acquisition unit is used to acquire an order push command, wherein the order push command contains order data; The candidate keyword extraction unit is used to extract candidate keywords from the order data in the order push command using a word extraction algorithm based on global similarity and word similarity, so as to obtain a set of order candidate keywords; The keyword extraction unit is used to calculate the word importance, word attention, and word relevance of each order candidate keyword in the order candidate keyword set, and to calculate the importance score of each order candidate keyword relative to the order data based on the word importance, word attention, and word relevance of each order candidate keyword. The keyword extraction unit is also used to determine several order keywords from the set of order candidate keywords based on the importance score of each order candidate keyword; The order information extraction unit is used to determine valid order information from the order data based on several order keywords; The order distribution unit is used to use a rule engine to perform rule matching on valid order information, and push the order data to the rejection distribution data pool, the immediate distribution data pool, or the planned distribution data pool according to the rule matching results, so that the order data can be pushed to the downstream system according to the push rules corresponding to the rejection distribution data pool, the immediate distribution data pool, or the planned distribution data pool.

[0017] Thirdly, another order placement control device based on a rule engine is provided. Taking the device as an electronic device as an example, it includes a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store computer programs, the transceiver is used to send and receive messages, and the processor is used to read the computer programs and execute the order placement control method based on the rule engine as described in the first aspect or any possible design in the first aspect.

[0018] Fourthly, a storage medium is provided, on which instructions are stored, which, when executed on a computer, perform the order issuance control method based on the rule engine as described in the first aspect or any possible design of the first aspect.

[0019] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer, causes the computer to perform the order issuance control method based on the rule engine as described in the first aspect or any possible design of the first aspect.

[0020] Beneficial effects: (1) This invention extracts valid order information by automatically identifying order characteristics; then, it classifies the orders according to preset rules, that is, it stores the orders pushed by the upstream system in different data pools based on rule matching, namely, rejecting delivery, immediate delivery, and planned delivery; finally, it can distribute the orders in an orderly manner according to the push rules of different data pools; thus, compared with the traditional method of directly sending orders to the downstream system, this invention realizes the classified push of orders, which not only improves the flexibility of order delivery, but also realizes the orderly delivery of orders, thereby reducing the operating pressure of the downstream system and ensuring the stability of system operation; at the same time, the whole process does not require manual intervention, which improves efficiency and reduces the error rate; therefore, this invention is very suitable for large-scale application and promotion. Attached Figure Description

[0021] Figure 1 A flowchart illustrating the steps of the order issuance control method based on a rule engine provided in an embodiment of the present invention; Figure 2 A schematic diagram of the structure of the order issuance control device based on a rule engine provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0023] It should be understood that although the terms first, second, etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, without departing from the scope of the exemplary embodiments of the invention.

[0024] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.

[0025] Example: See Figure 1 As shown, the order delivery control method based on a rule engine provided in this embodiment extracts valid order information by automatically identifying order characteristics. Then, it classifies orders according to preset rules, that is, it stores orders pushed by the upstream system in different data pools based on rule matching, namely, rejecting delivery, immediate delivery, and planned delivery. Finally, it can deliver orders in an orderly manner according to the push rules of different data pools. Thus, compared with traditional technology, this invention realizes the classified push of orders, which not only improves the flexibility of order delivery, but also realizes the orderly delivery of orders, thereby reducing the operating pressure of the downstream system and ensuring the stability of system operation. At the same time, the whole process does not require manual intervention, which improves efficiency and reduces the error rate. Therefore, this method is very suitable for large-scale application and promotion. For example, this method can be run on the order processing end. Optionally, the order processing end can be, but is not limited to, a server. It is understood that the aforementioned execution subject does not constitute a limitation on the embodiment of this application. Accordingly, the operation steps of this method can be, but are not limited to, the steps S1 to S6 below.

[0026] S1. Obtain an order push command, wherein the order push command contains order data; in this embodiment, for example, but not limited to, the upstream system may send an order push command to the order processing terminal, wherein the order data in the aforementioned order push command may include, but is not limited to: order number, order statistics (total quantity, total amount, number of rows, etc.), payment information (payment amount, payment time, whether payment is delayed, etc.), discount information (total discount amount, total subsidy amount, etc.), customer information (customer name, contact person, delivery address, etc.) and other relevant information (such as order type, whether a specified delivery time has been added, etc.); at the same time, the aforementioned order data may also include order details, such as product information (product number, product name, product unit price, product quantity, inventory type, etc.); thus, after obtaining the order push command containing order data, feature recognition, that is, extraction of effective information, can be performed on it so as to realize the classification and delivery of orders based on the extracted effective information.

[0027] The feature identification of order data mainly involves keyword extraction. The process is as follows: first, extract a set of candidate keywords for the order; then, determine several order keywords from the set of candidate keywords; finally, based on these order keywords, extract valid order information from the order data. Optionally, the process of extracting candidate keywords can be, but is not limited to, the steps shown in step S2 below.

[0028] S2. A word extraction algorithm based on global similarity and word similarity is adopted to extract candidate keywords from the order data in the order push command to obtain a set of order candidate keywords. In specific applications, this embodiment proposes a candidate keyword extraction algorithm that takes into account both global semantic similarity and inter-word similarity, which can ensure the representativeness and diversity of the extracted candidate keywords.

[0029] Optionally, the extraction process of the aforementioned candidate keywords may be, but is not limited to, the steps S21 to S27 below.

[0030] S21. The order data is segmented to obtain a segmentation set. In this embodiment, for example, but not limited to, the jieba segmentation tool can be used to segment the order data, and then stop words are removed. Finally, the segmentation set can be obtained. After obtaining the segmentation set, a word extraction algorithm based on global similarity and word similarity can be used to iteratively select candidate keywords. The process is shown in steps S22 to S27 below.

[0031] S22. Obtain the initial candidate word set and the candidate word set for the k-th iteration, wherein when k is 1, the initial candidate word set for the k-th iteration contains the target word, and the candidate word set for the k-th iteration is the word segmentation set after removing the target word, and the target word is the word in the word segmentation set that has the highest similarity to the order data.

[0032] In this embodiment, firstly, vector mapping is performed on each word in the word segmentation set and the order data to obtain the word vector corresponding to each word and the text vector corresponding to the order data. Then, the similarity between each word vector and the text vector is calculated, and the word corresponding to the word vector with the highest similarity is selected as the target word. Then, the initial candidate word set and the candidate word set are initialized to be empty. In this way, in the first iteration, the target word can be added to the initial candidate word set to obtain the initial candidate word set for the first iteration. Similarly, the target word is removed from the word segmentation set, and the remaining words are put into the initialized candidate word set to obtain the candidate word set for the first iteration. Of course, the initial value of k is 1.

[0033] Furthermore, for example, but not limited to, order data can be input into a pre-trained BERT model to generate a vector representation of the order data, that is, a text vector; similarly, each word in the word segmentation set can be input into the BERT model to generate a word vector corresponding to each word.

[0034] After obtaining the initial candidate word set and the word set to be selected at the k-th iteration, it can be determined whether the iteration stopping condition is met, as shown in step S23 below.

[0035] S23. Determine whether the iteration stopping condition is met, wherein the iteration stopping condition is that the total number of words in the initial candidate word set at the k-th iteration reaches a preset threshold; in specific applications, for example, the number of order candidate keywords is set, that is, the aforementioned preset threshold can be determined by the number of words in the word segmentation set, such as taking 30% to 50% of the total number of words in the word segmentation set as the preset threshold; of course, its value can be specifically set according to actual use, and is not limited to the aforementioned example.

[0036] In this embodiment, when the aforementioned iteration stopping condition is not met, it is necessary to use the initial candidate word set and order data from the k-th iteration to calculate the word similarity and global similarity, so that a candidate keyword for order can be determined from the candidate word set in the current iteration based on this. The calculation process of global similarity and word similarity can be, but is not limited to, as shown in step S24 below.

[0037] S24. If not, for any candidate word in the candidate word set at the k-th iteration, calculate the global similarity between the candidate word and the order data, and the word-to-word similarity between the candidate word and each initial candidate word in the initial candidate word set at the k-th iteration. In specific applications, as explained above, the words in the word segmentation set and the order data are represented by vectors. Therefore, the cosine similarity between the word vector of the candidate word and the text vector corresponding to the order data can be directly calculated as the global similarity of the candidate word. Similarly, the cosine similarity between the word vector of the candidate word and the word vectors of each initial candidate word at the k-th iteration is calculated as the word-to-word similarity. Thus, after calculating the global similarity and the word-to-word similarity, the candidate score of the candidate word can be calculated, as shown in step S25 below.

[0038] S25. Based on the global similarity and the similarity between individual words, calculate the candidate score of any candidate word, and after polling all candidate words in the candidate word set, obtain the candidate score of each candidate word; in specific implementation, for example, but not limited to, first filter out the largest word similarity from the word similarity; then, obtain the first hyperparameter (which takes a value between (0,1)), and calculate the difference between the hyperparameter threshold (which takes a value of 1) and the first hyperparameter to obtain the second hyperparameter; then, multiply the first hyperparameter by the global similarity, and multiply the second hyperparameter by the largest word similarity to obtain the first product and the second product respectively; finally, calculate the difference between the first product and the second product so that the aforementioned calculated difference can be used as the candidate score of any candidate word.

[0039] Thus, after obtaining the candidate scores of each candidate word in the candidate word set at the kth iteration using the aforementioned calculation method, the candidate keywords for the order at this iteration can be selected based on the candidate scores, as shown in step S26 below.

[0040] S26. Add the candidate word with the highest candidate score to the initial candidate word set for the k-th iteration to obtain the initial candidate word set for the (k+1)-th iteration. Also, remove the candidate word with the highest candidate score from the candidate word set to obtain the candidate word set for the (k+1)-th iteration. In practical applications, the candidate word with the highest candidate score is a candidate keyword for an order determined in this iteration. Therefore, it can be added to the initial candidate word set for the k-th iteration, thus updating the initial candidate word set so that it can be used as the initial candidate word set for the next iteration. Similarly, after selecting the candidate keyword for the order in this iteration, it needs to be removed from the candidate word set for the k-th iteration to update the candidate word set, thus obtaining the candidate word set for the next iteration. Based on this, after updating the initial candidate word set and the candidate word set, the aforementioned iterative process can be repeated until the iteration stopping condition is met. Then, the candidate words in the initial candidate word set can be used as candidate keywords for the order. The iterative process is shown in step S27 below.

[0041] S27. Increment k by 1, and re-obtain the initial candidate word set and the candidate word set at the k-th iteration until the iteration stopping condition is met. Then, use the initial candidate word set that meets the iteration stopping condition as the order candidate keyword set.

[0042] Therefore, through the aforementioned steps S21-S27, this embodiment, compared to the traditional method that only calculates the similarity between candidate words and documents, adds the calculation of cosine similarity between segmented words. Thus, while considering global semantic similarity, it also takes into account inter-word similarity. Based on this, if the similarity between candidate words and selected words is greater, it will further weaken their global similarity, minimizing the impact of keyword redundancy. Therefore, when the similarity between candidate words and documents is higher and the similarity between candidate words is lower, the diversity of extracted candidate keywords is higher. This method not only improves the representativeness of candidate keywords but also effectively reduces duplication and enhances the quality of extraction results.

[0043] After extracting the candidate keyword set for orders, it is necessary to determine the order keywords from the candidate keyword set. In this embodiment, the importance score of each candidate keyword for orders relative to the order data is comprehensively measured from three aspects: word importance, word attention, and word relevance. The calculation process of the aforementioned word importance, word attention, and word relevance can be, but is not limited to, as shown in step S3 below.

[0044] S3. Calculate the word importance, word attention, and word relevance of each order candidate keyword in the order candidate keyword set, and calculate the importance score of each order candidate keyword relative to the order data based on the word importance, word attention, and word relevance of each order candidate keyword.

[0045] In this embodiment, a method for calculating word importance is first provided, taking any candidate keyword for an order as an example. The calculation process can be, but is not limited to, the steps S31 to S38 below.

[0046] S31. For any candidate keyword for an order, calculate the word weight of that candidate keyword. In specific applications, this embodiment introduces word weight when calculating word importance. The word weight mainly considers features such as word position, part of speech, and word length. Specifically, the calculation process can be, but is not limited to, the steps S31a to S31f below.

[0047] S31a. From the order data, determine the occurrence position of any order candidate keyword and the part-of-speech tag of any order candidate keyword at each occurrence position; In this embodiment, after determining the occurrence position of any order candidate keyword and the part-of-speech tag of each occurrence position, position features can be calculated based on the occurrence position, and part-of-speech features can be calculated based on the part-of-speech tag of the occurrence position; wherein, the calculation process of position features is as shown in the following steps S31b and S31c.

[0048] S31b. Calculate the position weight of any order candidate keyword based on its occurrence position; in specific implementation, for example, but not limited to, the following formula (1) can be used to calculate the position weight of any order candidate keyword.

[0049] (1) In equation (1), This indicates the positional weight of any of the candidate keywords for the order. This indicates the m-th occurrence position of any candidate keyword for an order. This represents the total number of occurrence positions; for example, if the occurrence positions are the 2nd character, 6th character, and 10th character in the order data, then... The numbers are 2, 6, and 10 respectively. The value is 3. Thus, by substituting the aforementioned data into formula (1), the position weight of any candidate keyword for an order can be obtained. Of course, when the positions are different, the calculation method is the same as the example above, and will not be repeated here.

[0050] After obtaining the location weights, the location features can be calculated based on them, as shown in step S31c below.

[0051] S31c. Based on the position weight, calculate the position feature of any order candidate keyword; in specific implementation, for example, but not limited to, the following formula (2) can be used to calculate the position feature.

[0052] (2) In equation (2), This represents the positional characteristics of any of the candidate keywords for the order. This represents the position weight of the j-th order candidate keyword in the order candidate keyword set. This indicates the total number of candidate keywords for the order.

[0053] Thus, based on the aforementioned formula (2), after calculating the positional features of any candidate keyword for an order, the part-of-speech features can be calculated, as shown in step S31d below.

[0054] S31d. Calculate the part-of-speech features of any order candidate keyword by using the part-of-speech tag at each occurrence position.

[0055] In this embodiment, the part-of-speech features can be calculated using, but are not limited to, the following formula (3).

[0056] (3) In equation (3), This represents the part-of-speech feature of any of the candidate keywords for the order. This represents the mapping value corresponding to the part-of-speech tag at the m-th occurrence position of any candidate keyword in the order. This indicates the total number of parts of speech categories. In specific applications, the examples of parts of speech categories mainly include verbs, nouns, adjectives, and other parts of speech besides the aforementioned three categories. Among them, the mapping value of verbs is 4, the mapping value of nouns is 3, the mapping value of adjectives is 2, and the mapping value of other parts of speech is 1.

[0057] Thus, based on the aforementioned formula (3), the part-of-speech features of any candidate keyword for an order can be calculated; then, the word length features can be calculated, as shown in step S31e below.

[0058] S31e. Calculate the average word length of all order candidate keywords in the order candidate keyword set, and calculate the word length feature of any order candidate keyword based on the word length of any order candidate keyword and the average word length. In specific implementation, for example, but not limited to, the ratio of the word length of any order candidate keyword to the average word length can be used as the word length feature of any order candidate keyword. That is, if the candidate keyword is too short, it cannot reflect the information it contains; if it is too long, it contains more information, indicating that the candidate keyword can be further segmented. Therefore, this embodiment introduces the word length feature to measure the impact of word length on candidate keyword extraction.

[0059] After obtaining the word length feature, the word weight of any candidate keyword can be calculated by combining the aforementioned position feature and part-of-speech feature, as shown in step S31f below.

[0060] S31f. Calculate the word weight of any order candidate keyword using its positional features, part-of-speech features, and word length features. In this embodiment, the word weight is obtained by multiplying the positional features, part-of-speech features, and word length features by their respective weight coefficients and summing them. For example, the weight coefficients of the three are 0.6, 0.3, and 0.1, respectively.

[0061] Therefore, after calculating the word weight of any candidate keyword for the order through the aforementioned steps S31a to S31f, the word frequency feature value and the reverse document feature value can be calculated, as shown in the following steps S32 to S37.

[0062] S32. Calculate the frequency of occurrence of any candidate keyword in the order data. After calculating the frequency of occurrence of any candidate keyword, the corpus, i.e., the historical order database, can be used to filter out historical orders containing the most and least order keywords, so that the word frequency feature value can be calculated based on these. The calculation process of historical orders and word frequency feature value is as shown in steps S33 and S34 below.

[0063] S33. Obtain the historical order database, and filter out the first historical order containing the most order keywords and the second historical order containing the fewest order keywords from the historical order database.

[0064] S34. Calculate the word frequency feature value of any candidate keyword for an order based on the occurrence frequency, the total number of order keywords in the first historical order, and the total number of order keywords in the second historical order. In specific implementation, this embodiment first performs word frequency feature mapping based on the occurrence frequency, and then calculates the word frequency feature value by combining the total number of order keywords in the two historical orders. The aforementioned calculation process is shown in steps S34a to S34d below.

[0065] S34a. Calculate the initial word frequency feature value of any candidate keyword for an order based on the occurrence frequency; in specific applications, word frequency feature mapping is performed on the occurrence frequency, which essentially makes the number of occurrences correspond to a feature value, so that any candidate keyword for an order corresponds to a feature value, thereby facilitating the subsequent calculation of word frequency features.

[0066] Optionally, for example, but not limited to, the following formula (4) can be used to calculate the aforementioned initial word frequency feature value.

[0067] (4) In equation (4), This represents the initial word frequency feature value. This indicates the frequency of occurrence of any of the candidate keywords for the order. This is the word frequency parameter, with a value of 20.

[0068] Thus, after calculating the initial word frequency feature value, the word frequency feature value can be calculated by combining the total number of order keywords of the two historical orders determined above, as shown in steps S34b to S34d below.

[0069] S34b. Based on the occurrence frequency and the total number of order keywords in the first historical order, calculate a first word frequency intermediate parameter, and based on the occurrence frequency and the total number of order keywords in the second historical order, calculate a second word frequency intermediate parameter. In specific applications, for example, but not limited to, first add the total number of order keywords in the first historical order to 1 to obtain the sum; then, use the ratio between the occurrence frequency and the sum as the first word frequency intermediate parameter; similarly, the calculation process of the second word frequency intermediate parameter is the same as that of the first word frequency intermediate parameter, and will not be repeated here.

[0070] After calculating the intermediate parameters of the two word frequencies, the intermediate parameters of the third word frequency can be calculated in the following steps S34c.

[0071] S34c. Summing the first and second intermediate term frequency parameters yields the third intermediate term frequency parameter. After obtaining the third intermediate term frequency parameter, the final term frequency feature value can be calculated by combining the term frequency control factor and the initial term frequency feature value, as shown in step S34d below.

[0072] S34d. Obtain the word frequency control factor, and calculate the word frequency feature value using the word frequency control factor, the initial word frequency feature value, and the third word frequency intermediate parameter; in specific applications, for example, but not limited to, first calculating the product of the word frequency control factor and the third word frequency intermediate parameter, then summing the product and the word frequency control factor; finally, multiplying the summation result by the initial word frequency feature value to obtain the word frequency feature value.

[0073] Through the aforementioned steps S34a to S34d, this embodiment maps the occurrence frequency when calculating the word frequency feature value, and simultaneously introduces the maximum and minimum total number of order keywords. In this way, it is equivalent to using the aforementioned maximum and minimum total number of order keywords to perform double normalization processing of the word frequency feature value. This improved method can better handle the frequency difference of keywords and avoid the excessive influence of long texts on the weight. After calculating the word frequency feature value, the reverse document feature value can be calculated, and the process is shown in the following steps S35 to S37.

[0074] S35. From the historical order database, count the total number of historical orders containing any of the order candidate keywords, and count the number of times the order candidate keyword appears in each historical order in the historical order database.

[0075] S36. Filter out the maximum and minimum occurrence counts from each occurrence count; after counting the occurrence counts of any candidate keyword in each historical order and filtering out the maximum and minimum occurrence counts of any candidate keyword, the reverse document feature value of any candidate keyword can be calculated, as shown in step S37 below.

[0076] S37. Calculate the reverse document feature value of any order candidate keyword based on the total number, the maximum occurrence count, and the minimum occurrence count. In this embodiment, the maximum occurrence count is first used to calculate the maximum reverse document feature value, where the maximum occurrence count is multiplied by the aforementioned total number to obtain a first reverse document parameter. Then, the total number is incremented by 1 to obtain a second reverse document parameter (to prevent the denominator from being 0). The ratio of the first reverse document parameter to the second reverse document parameter is then used as the maximum reverse document feature value. Similarly, the minimum reverse document feature value is calculated based on the minimum occurrence count (the calculation process is the same as for the maximum reverse document feature value). Finally, the average of the sum of the maximum and minimum reverse document feature values ​​is used as the reverse document feature value of the order candidate keyword.

[0077] Thus, by introducing the maximum and minimum reverse document feature values ​​to verify the reverse document feature values, we can prevent rare candidate words from being given high weights, which could lead to biases in keyword extraction.

[0078] After obtaining the word frequency feature value and reverse document feature value of any candidate keyword for an order, the word importance of any candidate keyword for an order can be calculated by combining the word weight. The calculation process is shown in step S38 below.

[0079] S38. Based on the word frequency feature value, the reverse document feature value and the word weight, calculate the word importance of any order candidate keyword; in specific implementation, for example, but not limited to, the following formula (5) can be used to calculate the word importance.

[0080] (5) In the above formula (5), This indicates the importance of any of the candidate keywords for the order. These represent the word weight, word frequency feature value, and inverse document feature value of any candidate keyword for that order, in that order, respectively.

[0081] Thus, after calculating the word importance of any candidate keyword for the order through the aforementioned steps S31 to S38, the word attention can be calculated, as shown in the following steps S39 to S315.

[0082] S39. Using a self-attention mechanism, extract the attention weight matrix of all order candidate keywords in the order candidate keyword set, wherein the size of the attention weight matrix is... , This represents the number of tokens corresponding to the order candidate keyword set, and each order candidate keyword consists of at least one token. In practical applications, although the importance and relevance of keywords and documents are usually considered together, it is difficult to comprehensively distinguish the quality of order candidate keywords using only these features. Therefore, this embodiment introduces a self-attention mechanism to solve the anisotropy problem among candidate keywords, thereby better identifying order keywords. Specifically, this embodiment uses the BERT-base model to generate the attention weights of order candidate keywords. Specifically, the entire order candidate keyword set is used as input data and input into the BERT-base model. Then, the average attention value of each head in the last layer of the self-attention set of the model is extracted to generate the attention weight matrix of the order candidate keyword set.

[0083] In this embodiment, a token is the smallest unit of text processing in Natural Language Processing (NLP), which usually corresponds to a word, punctuation mark or other language element. That is, before processing the order candidate keyword set, the BERT-base model will tokenize it, that is, divide each order candidate keyword set into multiple tokens; for example, the order amount can be divided into two tokens: "order" and "amount".

[0084] Thus, after obtaining the attention weight matrix of the order candidate keywords, the attention level of each token can be calculated based on this matrix, as shown in step S310 below.

[0085] S310. Calculate the attention value of each token based on the attention weight matrix. In this embodiment, each column of the attention weight matrix corresponds to a token. Therefore, by summing each column of the attention weight matrix, the attention value of each token can be obtained. Then, the attention value of each token can be used to construct the attention matrix, as shown in step S311 below.

[0086] S311. Construct an attention matrix using the attention value of each token; in this embodiment, this is equivalent to constructing a... The matrix is ​​used as the attention matrix.

[0087] After obtaining the attention matrix, the attention weight matrix can be combined to generate the word association matrix, as shown in step S312 below.

[0088] S312. Based on the attention matrix and the attention weight matrix, generate a word association matrix; in specific implementation, for example, but not limited to, first normalize the attention matrix, and then multiply the normalized attention matrix with the attention weight matrix to obtain the word association matrix; after obtaining the word association matrix, the association value of each token can be obtained based on it, as shown in step S313 below.

[0089] S313. Calculate the association value of each token based on the word association matrix; in this embodiment, the word association matrix is ​​also... The matrix is ​​a set of tokens, and each element in the matrix corresponds to a token. Therefore, each element in the word association matrix corresponds to the association value between a token and all other tokens.

[0090] Thus, after obtaining the association value of each token, the actual attention level of each token can be calculated, as shown in step S314 below.

[0091] S314. Calculate the actual attention of each token using the attention value and association value of each token; in this embodiment, the actual attention of each token can be obtained by summing the attention value and association value of each token; then, based on this, the word attention of any order candidate keyword can be calculated, as shown in step S315 below.

[0092] S315. For any order candidate keyword, determine all tokens that constitute the order candidate keyword, and calculate the word attention of the order candidate keyword using the actual attention of all tokens that constitute the order candidate keyword; in this embodiment, the actual attention of all tokens that constitute the order candidate keyword is summed to obtain the order candidate keyword.

[0093] Thus, after calculating the word attention of any candidate keyword for the order through the aforementioned steps S39 to S315, word relevance can be calculated, as shown in the following steps S316 to S320.

[0094] S316. For any order candidate keyword, calculate the co-occurrence probability between the any order candidate keyword and each specified word in the specified word set, wherein the specified word set includes all order candidate keywords in the order candidate keyword set excluding the any order candidate keyword.

[0095] In this embodiment, order data can be traversed to count the number of times any candidate keyword for an order appears simultaneously with any specified word. For example, a sliding window method can be used to count the number of times any candidate keyword for an order appears simultaneously with any specified word within a certain range (e.g., a sentence). Then, the counted number of simultaneous occurrences is divided by the total number of word pair combinations in all sliding windows (i.e., the number of combinations of selecting two word items from all word items in the window) to obtain the co-occurrence probability between any candidate keyword for an order and any specified word. Of course, the calculation process for the co-occurrence probability between any candidate keyword for an order and other specified words is the same, and will not be elaborated here.

[0096] After obtaining the co-occurrence probability, the probability of occurrence of any candidate keyword for an order and each specified word can be calculated, as shown in step S317 below.

[0097] S317. Calculate the occurrence probability of any candidate keyword for an order and the occurrence probability of each specified word; in this embodiment, the occurrence probability of any candidate keyword for an order is obtained by dividing the frequency of occurrence of the candidate keyword in the order data by the total number of terms in the order data; of course, the calculation process of the occurrence probability of each specified word is the same, and will not be repeated here.

[0098] After obtaining the occurrence probability of any candidate keyword for the order and the occurrence probability of each specified word, the relevance decay factor can be calculated, as shown in step S318 below.

[0099] S318. Determine the relevance decay factor between any candidate keyword for an order and each specified word; in specific implementation, for example, but not limited to, obtaining the average co-occurrence interval between any candidate keyword for an order and any specified word, that is, the number of words between them when the candidate keyword for an order and the specified word appear together in the same window; then, take the average of all intervals as the average co-occurrence interval; then, add 1 to the average co-occurrence interval (to prevent the denominator from being 0) to obtain the actual average co-occurrence interval; finally, use the ratio between 1 and the actual average co-occurrence interval as the relevance decay factor between any candidate keyword for an order and any specified word; thus, the smaller the interval between the two, the higher the relevance.

[0100] After calculating the relevance decay factor between any candidate keyword for an order and each specified word, the word attention between any candidate keyword for an order and each specified word can be calculated by combining the co-occurrence probability and occurrence probability mentioned above. The calculation process is shown in step S319 below.

[0101] S319. Based on the co-occurrence probability between any order candidate keyword and each specified word, the occurrence probability of any order candidate keyword, the occurrence probability of each specified word, and the relevance decay factor between any order candidate keyword and each specified word, calculate the word attention between any order candidate keyword and each specified word.

[0102] In specific applications, for example, but not limited to, the following formula (6) can be used to calculate the word attention between any candidate keyword for an order and any specified word.

[0103] (6) In the above formula (6), This indicates the word attention level between any of the candidate keywords for an order and any of the specified words. The co-occurrence probability between any candidate keyword for an order and any specified word. These represent the probability of occurrence of any candidate keyword for an order and the probability of occurrence of any specified word, respectively. This represents the relevance decay factor between any candidate keyword for an order and any specified word.

[0104] Thus, using the aforementioned formula (6), the word attention between any candidate keyword for an order and each of the other specified words can be calculated; then, based on this, the word attention of any candidate keyword for an order can be calculated, as shown in step S320 below.

[0105] S320. Calculate the word attention of any order candidate keyword by using the word attention between any order candidate keyword and each specified word; in this embodiment, the average word attention between any order candidate keyword and each specified word is taken as the word attention of any order candidate keyword.

[0106] Therefore, after calculating the word importance, word attention, and word relevance of each order candidate keyword through the aforementioned steps S31 to S320, the importance score of each order candidate keyword relative to the order data can be calculated based on this. Specifically, the product of the word importance, word attention, and word relevance of each order candidate keyword is taken as the importance score of each order candidate keyword. Then, the final order keywords can be selected based on the importance score, and the selection process is shown in step S4 below.

[0107] S4. Based on the importance score of each order candidate keyword, determine several order keywords from the order candidate keyword set; in this embodiment, sort each order candidate keyword in descending order of importance score, and then take the top B keywords as order keywords, where B is the sum of data used in subsequent order rule matching. For example, if order number, delivery address, payment information, other relevant information, order amount, customer information, order type, etc. are required, then the number of B is 7; of course, the above example is only an example, and this embodiment is not limited to this.

[0108] After obtaining several order keywords, the effective order information can be extracted, as shown in step S5 below.

[0109] S5. Based on several order keywords, determine the valid order information from the order data; in this embodiment, the content corresponding to each order keyword is extracted from the order data. For example, if the order data contains: order number: xxxxx23, delivery address: xx city xx district xx number, payment information is xxxxx, then the actual content corresponding to the keywords such as order number, delivery address, payment information, other relevant information, order amount, customer information, and order type is extracted to form the valid order information.

[0110] After obtaining valid order information, the rule engine can be used to perform rule matching so that the orders can be classified and pushed to different data pools, and then distributed according to different push rules. The process is shown in step S6 below.

[0111] S6. Using a rule engine, valid order information is matched against rules, and based on the matching results, the order data is pushed to a rejected data pool, an immediate data pool, or a planned data pool. This allows the order data to be pushed to downstream systems according to the push rules corresponding to the rejected, immediate, or planned data pools. In this embodiment, before rule matching, data verification and cleaning can be performed, for example but not limited to, data validation and cleaning. Data validation includes, but is not limited to, null value verification of key data (such as amount and address) and uniqueness verification of order numbers. Data cleaning includes, but is not limited to, contact address processing and order number processing. After data cleaning and validation are completed, rule matching can be performed, as shown below: If the order number in the valid order information belongs to the rejected order number and / or the delivery address in the valid order information belongs to the logistics out-of-area address (i.e., whether the delivery address is an address that logistics cannot deliver to), then the rule matching result is to reject the order, and the order data is pushed to the rejected order data pool; wherein, the order number in the valid order information can be matched in the rejected order table, and the delivery address in the valid order information can be matched in the logistics reachable address, so as to determine whether it is the rejected order number and the logistics out-of-area address; wherein, if so, the order is determined to be a rejected order.

[0112] Similarly, if the valid order information contains a specified delivery time and / or payment delay information, the rule matching result is determined to be a planned delivery order, and the order data is pushed to the planned delivery data pool.

[0113] Finally, if the order amount in the valid order information exceeds the preset amount, the order customer belongs to a designated customer, and / or the order type belongs to a designated order type, then the rule matching result is determined to be an immediate order, and the order data is pushed to the immediate order data pool. The designated order type is a commercial transfer order, a platform direct delivery order, or an initial order. In this embodiment, the order customer (i.e., customer information) in the valid order information is matched with a pre-stored designated customer table (which records the names of major customers) to determine whether the order customer belongs to a designated customer. At the same time, based on the order type in the valid order information, it is determined whether it is a commercial transfer order, a platform direct delivery order, or an initial order (for an initial order, the customer can be matched with historical customers; if no match is found, it is considered an initial order). Thus, when the aforementioned rules are met, the order is determined to be an immediate order and needs to be pushed to the immediate order data pool.

[0114] Thus, when an order is pushed to the rejected data pool, the corresponding push rule is to stop pushing; at the same time, orders in the rejected data pool will automatically start pushing commands at 0:00 and 12:00 every day to re-match the rules, or be manually pushed.

[0115] Similarly, the push rule for the planned data pool is to automatically start the push command for orders in the pool at the planned release time; while the push rule for the instant data pool is to directly push the orders in the pool to the downstream system.

[0116] Furthermore, if an order does not match any of the aforementioned three rules, it will be moved to the matching rule exception pool and an exception notification will be issued to prompt the push personnel to handle it manually.

[0117] Furthermore, the rule engine can be configured with different components to achieve different rule matching. For example, after receiving a command, the OrderIssue component performs feature identification on the order data and verifies and cleans the extracted valid order information. Then, it sequentially sends rule matching commands to the OrderIssue_Reject, OrderIssue_Pronto, and OrderIssue_Plan components, and performs different processing based on the results. Specifically, the OrderIssue_Reject component matches rules for rejecting order placement, the OrderIssue_Pronto component matches rules for immediate order placement, and the OrderIssue_Plan component matches rules for planned order placement. In this way, different rules can be matched, thereby dividing orders into different types of data pools to achieve orderly order placement.

[0118] In this embodiment, if the extracted valid order information lacks the content required for rule matching, it is necessary to expand the keywords. That is, based on the extracted keywords, keywords are selected from the order candidate keyword set until the content extracted by the selected keywords covers all the content required for rule matching.

[0119] Thus, through the order distribution control method based on the rule engine described in detail in steps S1 to S6 above, the present invention realizes the classified push of orders. This not only improves the flexibility of order distribution but also achieves the orderly distribution of orders, thereby reducing the operating pressure on downstream systems and ensuring the stability of system operation. At the same time, the entire process does not require manual intervention, which improves efficiency and reduces the error rate. Therefore, the present invention is very suitable for large-scale application and promotion.

[0120] like Figure 2 As shown, the second aspect of this embodiment provides a hardware device for implementing the order issuance control method based on a rule engine as described in the first aspect of the embodiment, comprising: The acquisition unit is used to acquire an order push command, wherein the order push command contains order data.

[0121] The candidate keyword extraction unit is used to extract candidate keywords from the order data in the order push command using a word extraction algorithm based on global similarity and word similarity, so as to obtain a set of order candidate keywords.

[0122] The keyword extraction unit is used to calculate the word importance, word attention, and word relevance of each order candidate keyword in the order candidate keyword set, and to calculate the importance score of each order candidate keyword relative to the order data based on the word importance, word attention, and word relevance of each order candidate keyword.

[0123] The keyword extraction unit is also used to determine several order keywords from the set of order candidate keywords based on the importance score of each order candidate keyword.

[0124] The order information extraction unit is used to determine valid order information from the order data based on several order keywords.

[0125] The order distribution unit is used to use a rule engine to perform rule matching on valid order information, and push the order data to the rejection distribution data pool, the immediate distribution data pool, or the planned distribution data pool according to the rule matching results, so that the order data can be pushed to the downstream system according to the push rules corresponding to the rejection distribution data pool, the immediate distribution data pool, or the planned distribution data pool.

[0126] The working process, working details and technical effects of the device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0127] like Figure 3 As shown, the third aspect of this embodiment provides another order placement control device based on a rule engine. Taking the device as an electronic device as an example, it includes: a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the order placement control method based on a rule engine as described in the first aspect of the embodiment.

[0128] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.

[0129] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee (a low-power LAN protocol based on the IEEE 802.15.4 standard) transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.

[0130] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0131] The fourth aspect of this embodiment provides a storage medium for storing instructions containing the order issuance control method based on the rule engine described in the first aspect of the embodiment. That is, the storage medium stores instructions, and when the instructions are run on a computer, the order issuance control method based on the rule engine described in the first aspect of the embodiment is executed.

[0132] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or Memory Sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0133] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.

[0134] The fifth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform the order issuance control method based on a rule engine as described in the first aspect of this embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0135] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A rule engine based order issuing control method, characterized by, The method comprises the following steps: obtaining an order push command, wherein the order push command contains order data; adopting a word extraction algorithm based on global similarity and word similarity to extract candidate keywords from the order data in the order push command to obtain an order candidate keyword set; calculating the word importance, word attention and word relevance of each order candidate keyword in the order candidate keyword set, and calculating the importance score of each order candidate keyword relative to the order data according to the word importance, word attention and word relevance of each order candidate keyword; determining a plurality of order keywords from the order candidate keyword set according to the importance score of each order candidate keyword; determining effective order information from the order data based on the plurality of order keywords; using a rule engine to perform rule matching on the effective order information, and according to the rule matching result, pushing the order data to a rejection delivery data pool, an immediate delivery data pool or a planned delivery data pool, so as to push the order data to a downstream system according to the push rules corresponding to the rejection delivery data pool, the immediate delivery data pool or the planned delivery data pool.

2. The method of claim 1, wherein, The method of adopting a word extraction algorithm based on global similarity and word similarity to extract candidate keywords from the order data in the order push command to obtain an order candidate keyword set comprises the following steps: performing word segmentation on the order data to obtain a word segmentation set; obtaining an initial candidate word set and a candidate word set at the kth iteration, wherein when k is 1, the initial candidate word set at the kth iteration contains a target word, the candidate word set at the kth iteration is the word segmentation set after removing the target word, and the target word is the word in the word segmentation set that has the highest similarity with the order data; determining whether an iteration stop condition is met, wherein the iteration stop condition is that the total number of words in the initial candidate word set at the kth iteration reaches a preset threshold; if not, calculating the global similarity between any candidate word in the candidate word set at the kth iteration and the order data, and the inter-word similarity between the any candidate word and each initial candidate word in the initial candidate word set at the kth iteration; calculating the candidate score of the any candidate word according to the global similarity and the inter-word similarity, and obtaining the candidate scores of all candidate words after polling all candidate words in the candidate word set; adding the candidate word with the highest candidate score to the initial candidate word set at the kth iteration to obtain the initial candidate word set at the (k+1)th iteration, and deleting the candidate word with the highest candidate score from the candidate word set to obtain the candidate word set at the (k+1)th iteration; increasing k by 1 and re-obtaining the initial candidate word set and the candidate word set at the kth iteration until the iteration stop condition is met, and taking the initial candidate word set that meets the iteration stop condition as the order candidate keyword set.

3. The method of claim 2, wherein, The method of calculating the candidate score of the any candidate word according to the global similarity and the inter-word similarity comprises the following steps: selecting the maximum inter-word similarity from the inter-word similarities; obtaining a first hyperparameter, and calculating a difference between the hyperparameter threshold and the first hyperparameter to obtain a second hyperparameter; multiplying the first hyperparameter by the global similarity and multiplying the second hyperparameter by the maximum inter-word similarity to obtain a first product and a second product, respectively; calculating a difference between the first product and the second product to obtain the candidate score of the any candidate word.

4. The method of claim 1, wherein, calculating a word importance of each order candidate keyword in the order candidate keyword set, including: calculating a word weight of the any order candidate keyword; counting a frequency of occurrence of the any order candidate keyword in the order data; obtaining a historical order database, and screening a first historical order containing the most order keywords and a second historical order containing the least order keywords from the historical order database; calculating a term frequency characteristic value of the any order candidate keyword according to the frequency of occurrence, a total number of order keywords of the first historical order and a total number of order keywords of the second historical order; counting a total number of historical orders containing the any order candidate keyword and counting a number of occurrences of the any order candidate keyword in each historical order in the historical order database; screening a maximum number of occurrences and a minimum number of occurrences from the numbers of occurrences; calculating an inverse document characteristic value of the any order candidate keyword according to the total number, the maximum number of occurrences and the minimum number of occurrences; calculating a word importance of the any order candidate keyword based on the term frequency characteristic value, the inverse document characteristic value and the word weight.

5. The method of claim 4, wherein, calculating a word weight of the any order candidate keyword, including: determining a position of occurrence of the any order candidate keyword and a part of speech of the any order candidate keyword at each position of occurrence from the order data; calculating a position weight of the any order candidate keyword according to the position of occurrence of the any order candidate keyword; calculating a position feature of the any order candidate keyword based on the position weight; calculating a part of speech feature of the any order candidate keyword using the part of speech of the any order candidate keyword at each position of occurrence; calculating a word length feature of the any order candidate keyword according to a word length of the any order candidate keyword and an average word length of all order candidate keywords in the order candidate keyword set; calculating the word weight of the any order candidate keyword using the position feature, the part of speech feature and the word length feature of the any order candidate keyword.

6. The method of claim 4, wherein, calculating a term frequency characteristic value of the any order candidate keyword according to the frequency of occurrence, a total number of order keywords of the first historical order and a total number of order keywords of the second historical order, including: calculating an initial term frequency characteristic value of the any order candidate keyword according to the frequency of occurrence; a first term frequency intermediate parameter is calculated based on the occurrence frequency and the total number of order keywords of the first historical order, and a second term frequency intermediate parameter is calculated based on the occurrence frequency and the total number of order keywords of the second historical order; the first term frequency intermediate parameter and the second term frequency intermediate parameter are summed to obtain a third term frequency intermediate parameter; a term frequency control factor is obtained, and the term frequency control factor, the initial term frequency feature value and the third term frequency intermediate parameter are used to calculate the term frequency feature value.

7. The method of claim 1, wherein, a term attention degree of each order candidate keyword in the order candidate keyword set is calculated, including: The self-attention mechanism is used to extract an attention weight matrix of all order candidate keywords in the order candidate keyword set, wherein the size of the attention weight matrix is , , represents the number of tokens corresponding to the order candidate keyword set, and any order candidate keyword is composed of at least one token. an attention weight matrix is calculated based on the token attention weight matrix; an attention weight matrix is calculated based on the token attention weight matrix; a term attention degree of each order candidate keyword in the order candidate keyword set is calculated, including: a rule engine is used to perform rule matching on the valid order information, and according to the rule matching result, the order data is pushed to a rejection delivery data pool, an instant delivery data pool or a plan delivery data pool, including: if the order number in the valid order information belongs to the rejected order number and / or the delivery address in the valid order information belongs to the logistics super area address, it is determined that the rule matching result is a rejected delivery order, and the order data is pushed to the rejection delivery data pool; if there is a specified delivery time and / or payment delay information in the valid order information, it is determined that the rule matching result is a plan delivery order, and the order data is pushed to the plan delivery data pool; 8. The method of claim 1, wherein, wherein, if the order amount in the valid order information exceeds the preset amount, the order customer belongs to the specified customer and / or the order type belongs to the specified order type, it is determined that the rule matching result is an instant delivery order, and the order data is pushed to the instant delivery data pool, wherein the specified order type is a commercial allocation order, a platform direct allocation order or a first order. including: an acquisition unit is configured to acquire an order pushing command, wherein the order pushing command contains order data; a candidate keyword extraction unit is configured to extract candidate keywords from the order data in the order pushing command by using a term extraction algorithm based on global similarity and term similarity to obtain an order candidate keyword set; 9. A rule engine based order issuing control apparatus, characterized by, a keyword extraction unit is configured to calculate a term importance, a term attention degree and a term relevance of each order candidate keyword in the order candidate keyword set, and calculate an importance score of each order candidate keyword relative to the order data according to the term importance, the term attention degree and the term relevance of each order candidate keyword. ​ ​ ​ The keyword extraction unit is further configured to determine a plurality of order keywords from the order candidate keyword set according to the importance scores of the order candidate keywords; The order information extraction unit is configured to determine valid order information from the order data based on the plurality of order keywords; The order issuing unit is configured to perform rule matching on the valid order information by using a rule engine, and push the order data to a rejection issuing data pool, an instant issuing data pool or a plan issuing data pool according to a rule matching result, so as to push the order data to a downstream system according to a pushing rule corresponding to the rejection issuing data pool, the instant issuing data pool or the plan issuing data pool.

10. An electronic device, comprising: The method comprises the following steps: The memory, the processor and the transceiver are sequentially connected in communication, wherein the memory is configured to store a computer program, the transceiver is configured to receive and send messages, and the processor is configured to read the computer program and execute the order issuing control method based on the rule engine according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Iterative extraction of Chinese synonyms based on pattern learning

    CN109522547A

  • The invention discloses an aAutomatic keyword extraction method based on a universal gravitation model

    CN109614626A

  • Order matching method and device based on rule engine and rule engine

    CN116307980A

  • Data intelligent question and answer method and system fusing domain knowledge

    CN118779438A

  • Built-in order intelligent management system and method based on input method retrieval

    CN120634687A

Cited By

  • Remote auxiliary diagnosis and treatment system and data processing method

    CN121862355A