Resource allocation method and device
By obtaining business data in the resource allocation system and finding corresponding rules from the rule database, data merging and resource allocation matching, the problem of manual operation dependence in the existing technology is solved, and automatic calculation and efficient settlement of resource allocation are realized.
Patent Information
- Application Number
- CN202510289152.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-20
AI Technical Summary
The existing resource allocation system is highly dependent on manual operations, resulting in low settlement efficiency, high operating costs, and low data deviation and rule matching efficiency.
By obtaining business data, searching for data merging rules and resource allocation rules from a pre-established rule base based on object information, data merging processing and resource allocation matching are carried out, and automatic calculation and rapid access to required data are achieved.
It improves the settlement efficiency of resource allocation, reduces the time and errors of manual operations, and improves overall work efficiency and customer satisfaction.
Smart Images

Figure CN120179698A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to a resource allocation method. This application also relates to a resource allocation device, a computing device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the existing resource allocation system, business personnel still generally adopt a manual operation mode in resource allocation calculations. First, they need to manually count and verify the resource acquisition data of customers. This process is not only time-consuming but also prone to data deviation due to manual oversight. Second, business personnel need to match item by item against multi-level resource allocation rules. Further, business personnel need to complete the calculation of resource allocation based on the resource allocation rules. This operation mode highly dependent on manual experience not only leads to low settlement efficiency and high operating costs but also has become a key technical bottleneck restricting the intelligent upgrade of the current resource allocation system. Summary of the Invention
[0003] In view of this, embodiments of this application provide a resource allocation method to solve the technical defects existing in the prior art. Embodiments of this application also provide a resource allocation device, a computing device, a computer-readable storage medium, and a computer program product.
[0004] According to the first aspect of the embodiments of this application, a resource allocation method is provided, including: Obtain service data, where the service data includes object information of a first object and demand data of each second object for the target product of the first object; Based on the object information of the first object, search for the corresponding data merging rule and resource allocation rule of the first object from a pre-established rule library; Perform a merging process on the demand data that hits the data merging rule to obtain updated demand data; According to the updated demand data, perform a match in the resource allocation rule to determine the resource allocation result.
[0005] Optionally, the rule library includes a data merging sub-table and a resource allocation sub-table; The step of searching for the corresponding data merging rule and resource allocation rule of the first object from a pre-established rule library based on the object information of the first object includes: Based on the object information of the first object, determine the hit data merging rule from the data merging sub-table; Based on the object information of the first object, determine the hit resource allocation rule from the resource allocation sub-table.
[0006] Optionally, the rule library further includes a rule master table, and the rule master table includes policy configuration information of each allocation policy, where the allocation policy refers to a set of data merging rules and resource allocation rules; Before determining the hit data merging rule from the data merging sub-table based on the object information of the first object, it further includes: Receiving a policy invocation request, where the policy invocation request includes a policy identifier and policy usage information; Based on the policy identifier, determining the hit target allocation policy and the policy configuration information of the target allocation policy from the rule master table; The determining the hit data merging rule from the data merging sub-table based on the object information of the first object includes: When the policy usage information matches the policy configuration information, determining the hit data merging rule from the data merging sub-table based on the object information of the first object.
[0007] Optionally, the data merging rule includes an item to be merged identifier and a merging operator; the merging the required data that hits the data merging rule to obtain updated required data includes: Determining the attribution information of the required data; When it is determined that the required data hits the item to be merged identifier according to the attribution information, performing a merging process on the required data based on the merging operator to obtain updated required data.
[0008] Optionally, the resource allocation rule includes preset comparison data and a comparison operator; the matching in the resource allocation rule according to the updated required data to determine the resource allocation result includes: Based on the comparison operator, comparing the updated required data with the preset comparison data, and determining the resource allocation result based on the comparison result.
[0009] Optionally, the resource allocation rule further includes filtering field information; Before the comparing the updated required data with the preset comparison data based on the comparison operator and determining the resource allocation result based on the comparison result, it further includes: Filtering the updated required data that does not conform to the filtering field information.
[0010] According to the second aspect of the embodiments of the present application, there is provided a resource allocation device, including: An acquisition module, configured to acquire service data, where the service data includes object information of a first object and demand data of each second object for a target product of the first object; A search module, configured to search, based on the object information of the first object, for a data merging rule and a resource allocation rule corresponding to the first object from a pre-established rule library; A merging module, configured to perform a merging process on the demand data that hits the data merging rule to obtain updated demand data; A calculation module, configured to match according to the updated demand data in the resource allocation rule to determine a resource allocation result.
[0011] According to a third aspect of the embodiments of the present application, a computing device is provided, including: a memory and a processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, any one of the resource allocation methods is implemented.
[0012] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer programs / instructions. When the computer programs / instructions are executed by a processor, any one of the resource allocation methods is implemented.
[0013] According to a fifth aspect of the embodiments of the present application, a computer program product is provided, including computer programs / instructions. When the computer programs / instructions are executed by a processor, any one of the resource allocation methods is implemented.
[0014] A resource allocation method provided by the present application acquires service data, where the service data includes object information of a first object and demand data of each second object for a target product of the first object, and thus searches for a data merging rule and a resource allocation rule corresponding to the first object from a pre-established rule library based on the object information of the first object, thereby achieving rapid access to the required data and significantly improving work efficiency, avoiding the low efficiency caused by manual search by staff in the rule library. Moreover, a merging process is performed on the demand data that hits the data merging rule to obtain updated demand data, and according to the updated demand data, a match is made in the resource allocation rule to determine a resource allocation result, thereby realizing the automatic calculation of resource allocation, improving the settlement efficiency of resource allocation, and further enhancing the efficiency of resource allocation. Description of the Drawings
[0015] Figure 1 is a flowchart of a resource allocation method provided by an embodiment of the present application; Figure 2It is a configuration policy diagram in a resource allocation method provided by an embodiment of the present application; Figure 3 It is a policy configuration diagram in a resource allocation method provided by an embodiment of the present application; Figure 4 It is a type-based settlement configuration diagram in a resource allocation method provided by an embodiment of the present application; Figure 5 It is a configuration schematic diagram of the content included in the policy in a resource allocation method provided by an embodiment of the present application; Figure 6 It is an example diagram of the settlement summary details in a resource allocation method provided by an embodiment of the present application; Figure 7 It is a preferential details diagram in a resource allocation method provided by an embodiment of the present application; Figure 8 It is a preferential rebate policy rule diagram in a resource allocation method provided by an embodiment of the present application; Figure 9 It is a processing flow diagram of a resource allocation method provided by an embodiment of the present application applied to the preferential rebate calculation scenario; Figure 10 It is another processing flow diagram of a resource allocation method provided by an embodiment of the present application applied to the preferential rebate calculation scenario; Figure 11 It is a structural schematic diagram of a resource allocation device provided by an embodiment of the present application; Figure 12 It is a structural block diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners
[0016] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.
[0017] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the", and "said" used in one or more embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more of the associated listed items.
[0018] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0019] In the present application, a resource allocation method is provided. The present application also relates to a resource allocation device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail one by one in the following embodiments.
[0020] Figure 1 The flowchart of a resource allocation method provided according to an embodiment of the present application is shown, which specifically includes the following steps: Step 102: Obtain service data, where the service data includes object information of a first object and demand data of each second object for the target product of the first object.
[0021] Specifically, the service data can be understood as the settlement data to be generated when a customer obtains a required product. The service data can be obtained in a business system, such as obtaining service data according to sales records, pre-order records, etc. in the business system, or by the customer independently filling in information and uploading it. The present specification does not specifically limit the acquisition method of the service data.
[0022] The first object can be understood as a product provider, such as a product manufacturer, a product seller, etc., and the object information of the first object can be understood as the basic information of the product provider, including: the name, number, etc. of the product provider; each second object can be understood as a product acquirer, such as an enterprise, a company, an individual, etc. that purchases a product; the target product of the first object can be understood as the product produced / sold by the first object.
[0023] The demand data can be understood as the actual demand of the second object for the target product, including the type, quantity, purchase quantity of the product to be purchased, and at least one inventory location where the purchased product is located. Further, the first object can provide the product at the inventory location for the second object according to the actual demand of the second object. For example, the products provided by the first object are included in inventory location A, inventory location B, and inventory location C respectively, and inventory location A is the closest to the second object. Then, the corresponding product is preferentially provided to the second object through inventory location A. If the inventory of the product at inventory location A is 0, the corresponding product is further provided to the second object from a nearby inventory location.
[0024] In specific implementation, business data is obtained. For the business data, a pre-trained semantic recognition model based on natural language processing (NLP) (such as BERT) can be used to identify keyword fields such as the first object name, the second object name, the target product, the resource demand quantity, and the inventory location of the business data. In practical applications, the specific recognition method can be determined according to actual needs, and the semantic recognition model used can be any semantic recognition model based on natural language processing, which is not specifically limited in this specification.
[0025] In the embodiment of this specification, the settlement data to be settled generated by obtaining the required resources is determined, and the product provider included therein and the information corresponding to the product provider, the product acquirer, and the demand data of the product acquirer for the target product are determined.
[0026] Step 104: Based on the object information of the first object, search for the data merging rule and the resource allocation rule corresponding to the first object from the pre-established rule library.
[0027] Specifically, the pre-established rule library can be understood as a rule library constructed based on a pre-defined set of rules, and each rule includes clear execution conditions; the data merging rule can be understood as the rule that needs to be followed when integrating data from different sources; the resource allocation rule can be understood as the rule for allocating resources according to the conditions satisfied by the resource quantity. Among them, the pre-established rule library can be established by the staff filling and editing through the interface shown below, and the specific establishment method is not specifically limited here. Figure 2 The interface shown below is used for the staff to fill in and edit to establish it, and the specific establishment method is not specifically limited here.
[0028] In the embodiment of this specification, rule information is obtained. The rule information is: the rule that needs to be followed when integrating data from different sources, then this rule information is classified as a data merging rule.
[0029] The rule information is: the rule for allocating resources according to the conditions that the resource quantity needs to satisfy, then this rule information is classified as a resource allocation rule, and a rule library is constructed based on the data merging rule and the resource allocation rule.
[0030] After determining the object information of the first object, based on the object information of the first object, search for the data merging rule corresponding to the first object (that is, the rule that needs to be followed when integrating data from different sources) and the resource allocation rule (that is, the rule for allocating resources according to the conditions that the resource quantity needs to satisfy) from the pre-established rule library.
[0031] Furthermore, since the pre-established rule library may contain a large number of rules, to ensure the accuracy and efficiency of matching the corresponding rules based on the object information of the first object, searching for the data merging rule and the resource allocation rule corresponding to the first object from the pre-established rule library can also be implemented through the following method: The rule base includes a data merging sub-table and a resource allocation sub-table.
[0032] Correspondingly, finding the data merging rule and the resource allocation rule corresponding to the first object from the pre-established rule base based on the object information of the first object includes: determining the hit data merging rule from the data merging sub-table based on the object information of the first object.
[0033] In the embodiment of this specification, a data merging sub-table is constructed based on the rules that need to be followed when integrating data from different sources. During the construction process, a primary key is added to the rows of the data merging sub-table. The primary key is used to uniquely identify a certain row record in the data merging sub-table. The primary key can be the name of the first object, and no specific limitation is made here.
[0034] This specification takes the primary key in the data merging sub-table as the name of the first object as an example for illustration. After determining the object information of the first object, locate the associated row in the data merging sub-table according to the name of the first object, and further determine the corresponding data merging rule in the row. For example, according to the name F of a certain company, determine the row where name F is located in the data merging sub-table, and then determine the corresponding data merging rule in the row, that is, determine the data merging rule that needs to be followed when integrating data from different sources.
[0035] Determine the hit resource allocation rule from the resource allocation sub-table based on the object information of the first object.
[0036] Specifically, a resource allocation sub-table is constructed based on the rules for resource allocation according to the conditions that the resource quantity needs to meet. During the construction process, a primary key is added to the rows of the resource allocation sub-table. The primary key is used to uniquely identify each row record in the resource allocation sub-table. The primary key can be the name of the first object, and no specific limitation is made here.
[0037] In the embodiment of this specification, taking the primary key in the resource allocation sub-table as the name of the first object as an example, after determining the object information of the first object, locate the associated row in the resource allocation sub-table according to the name of the first object, and further determine the corresponding resource allocation rule in the row. That is, determine the rule for resource allocation according to the conditions that the resource quantity corresponding to the name of the first object needs to meet.
[0038] Continuing with the above example, according to the company name F, determine the row where name F is located in the resource allocation sub-table, and then determine the resource allocation rule in the row. The resource allocation rule states that when the purchase quantity ≥ 100 tons, there is a discount of 100 yuan; when the purchase quantity ≥ 200 tons, there is a discount of 220 yuan.
[0039] In the embodiments of this specification, by determining the hit data merging rules from the data merging sub-table based on the object information of the first object and determining the hit resource allocation rules from the resource allocation sub-table, the accuracy and efficiency of matching the corresponding rules are ensured.
[0040] Furthermore, the rules in the rule library may be updated with changes in business requirements, laws and regulations, or company policies, so it is necessary to ensure that the latest rule library is obtained before matching. The specific implementation is as follows: The rule library also includes a rule master table, which includes the policy configuration information of each allocation policy. The allocation policy refers to the set of data merging rules and resource allocation rules; Before determining the hit data merging rules from the data merging sub-table based on the object information of the first object, it further includes: receiving a policy call request, where the policy call request includes a policy identifier and policy usage information; Based on the policy identifier, determine the hit target allocation policy and the policy configuration information of the target allocation policy from the rule master table; Determining the hit data merging rules from the data merging sub-table based on the object information of the first object includes: when the policy usage information matches the policy configuration information, determining the hit data merging rules from the data merging sub-table based on the object information of the first object.
[0041] Specifically, the policy configuration information can be understood as the configuration status information of the pre-established rule library, as follows Figure 3 As shown, the policy configuration information may include rule type, name, number, execution start date, execution end date, and enabled status, etc. The policy configuration information is the policy configuration information corresponding to the latest version of the rule library.
[0042] The policy call request can be understood as a request to call a rule, and the policy call request is initiated by a customer.
[0043] The policy identifier includes rule type, name, number, etc., and the policy identifier can be one or more; the policy usage information can be understood as the information describing the rule usage situation, including the time, type, company, customer, self-pickup, delivery, etc. of the rule usage.
[0044] In the embodiments of this specification, the rule library includes a rule master table, which includes the policy configuration information of the rule library, such as rule type, name, etc. The rule master table also includes data merging rules and resource allocation rules.
[0045] After receiving a policy invocation request sent by a customer, based on the policy identifier and policy usage information in the policy invocation request, that is, according to the rule name specified by the customer, etc., determine the corresponding data merging rule and resource allocation rule in the rule master table, as well as the policy configuration information corresponding to each rule. Further, match the policy usage information in the policy invocation request initiated by the customer with the policy configuration information corresponding to the rule. In the case of a match, based on the object information of the first object, determine the hit data merging rule. Among them, the content included in the policy configuration information, policy identifier, and policy usage information can be set according to the actual application scenario, and this specification does not make specific limitations on this.
[0046] Continuing with the above example, the pre-established rule library includes a rule master table. The rule master table includes data merging rules, resource allocation rules, and policy configuration information. The policy configuration information records the rule type (such as self-pickup, delivery, year, month, etc.), name GZ, number 0123, is valid within the time period from 2025.02.20 to 2025.03.20, and the enabled status is enabled.
[0047] After the customer initiates a policy invocation request, based on the name GZ of the rule included in the request, determine the set of corresponding data merging rules and resource allocation rules in the rule master table. Further, based on the policy configuration information in the rule master table and the policy usage information in the policy invocation request initiated by the user, judge the matching situation between the policy usage information and the policy configuration information.
[0048] For example: The policy usage information included in the policy invocation request initiated by the customer includes using the rule on 2025.4.20, while the policy configuration information records that it is valid within the time period from 2025.02.20 to 2025.03.20, which means that the policy usage information does not match the policy configuration information and the corresponding data merging rule cannot be determined; Or, for example, the policy usage information included in the policy invocation request initiated by the customer includes using the rule through the self-pickup type, while the policy configuration information records that the rule type is specified as the delivery type, which means that the policy usage information does not match the policy configuration information; Or, for another example, if the enabled status in the policy configuration information is disabled, it also means that any policy usage information does not match the policy configuration information and the corresponding rule cannot be obtained.
[0049] And the policy usage information included in the policy invocation request initiated by the customer includes: list price, delivery type, and invoking the rule on 2025.02.25. Further, as follows Figure 4As shown below: When the type corresponding to the listed price recorded in the policy configuration information is the delivery type, it includes the corresponding preferential policy, which means that the policy usage information matches the policy configuration information. For another example, if the policy configuration information records that it is valid within the time period from 2025.02.20 to 2025.03.20, and any type is acceptable, and the enabled status is enabled, it means that the policy usage information matches the policy configuration information. Thus, further based on the object information of the first object, the hit data merging rule is determined from the data merging sub-table.
[0050] In the embodiments of this specification, when the rules, enabled / disabled status, usage time, type, etc. in the rule library change, the rule library is updated accordingly. To prevent customers from using the old version of the rule library during the usage process, which may lead to inaccurate matching of corresponding rules, after the customer initiates a policy invocation request, according to the policy identifier and policy usage information included in the policy invocation request, the policy configuration information corresponding to the latest version of the rule library is matched to ensure obtaining the latest rule library before matching. Furthermore, when the policy usage information matches the policy configuration information, the hit data merging rule is further determined to improve the customer's usage experience.
[0051] Step 106: Perform a merging process on the required data that hits the data merging rule to obtain updated required data.
[0052] Specifically, the data merging rule includes a customer merging rule and a storage location merging rule. Among them, the customer merging rule can be understood as a rule that stipulates that customers can merge the purchase quantities for calculation, and the storage location merging rule can be understood as a rule that stipulates that storage locations can merge the purchase quantities for calculation.
[0053] In the embodiments of this specification, based on the hit data merging rule, the customer merging rule and the storage location merging rule included in the data merging rule are determined. Based on the hit customer merging rule and storage location merging rule, the required data is merged to obtain updated required data.
[0054] As follows Figure 5 As shown below, in detail 1 of the customer merging rule, it is recorded that when purchasing products of Company A, customers X, Y, and Z merge the calculation of the purchase quantity. In addition, the storage locations where the products of Company F are located include storage location A, storage location B, and storage location C. The storage location merging rule records that the purchase of products at storage location A and the purchase of products at storage location B are merged for calculation. Then, based on the content recorded in the customer merging rule and the storage location merging rule, the required data is merged to obtain updated required data.
[0055] Further, during the merging process, it is also necessary to determine the organization, department, or individual to which the product acquirer in the requirement data belongs, as well as the procurement location for the merging process. The specific implementation is as follows: The data merging rule includes an item-to-be-merged identifier and a merging operator; Merging the requirement data that hits the data merging rule to obtain updated requirement data includes: determining the attribution information of the requirement data; When it is determined that the requirement data hits the item-to-be-merged identifier according to the attribution information, the requirement data is merged based on the merging operator to obtain updated requirement data.
[0056] Specifically, the item-to-be-merged identifier can be understood as the identifier information corresponding to the data that needs to be merged. For example, the identifier information corresponding to the product acquirer is Customer A; the merging operator can be understood as the operation symbol or method used to combine two or more data; the attribution information can be understood as the organization, department, or individual to which the product acquirer belongs, as well as the procurement location.
[0057] In the embodiments of this specification, the data merging rule includes the specific identifier information corresponding to the data that needs to be merged, as well as the operation symbol or method used to combine the data. Further, it is necessary to determine the organization, department, or individual to which the product acquirer in the requirement data belongs, as well as the procurement location, to match the corresponding item-to-be-merged identifier. When the item-to-be-merged identifier is hit, the requirement data is merged based on the merging operator.
[0058] Continuing with the above example, the item-to-be-merged identifiers include Customer X, Customer Y, Customer Z, Warehouse A, Warehouse B, and Warehouse C, and the merging operator is "+". Further, it is necessary to determine the organization, department, or individual to which the product acquirer in the requirement data belongs, as well as the procurement location, and then determine that the identifier information corresponding to the product acquirer is Customer X, and the identifier information of the procurement location is Warehouse B. It can be seen that Customer X and Warehouse B hit the item-to-be-merged identifier in the data merging rule, and then are merged based on the merging operator "+", where the merging operator can be "+", or can be taking the percentage after addition, etc., which can be set according to the actual application scenario, and this specification does not make specific settings in this regard.
[0059] Further, as follows Figure 6As shown, the identifier of the product purchaser is customer X, and the inventory location is B, hitting the item identifier to be merged in the data merging rule. The purchase quantity of customer X at inventory location B this time is 50 tons, hitting detail 1 in the data merging rule. Further, customer Y once purchased 100 tons at inventory location A, and customer Z once purchased 50 tons at inventory location C. According to the hit customer merging rule and inventory location merging rule, that is, customer X and customer Y meet the customer merging rule and inventory location merging rule. However, since customer Z, although meeting the customer merging rule, does not meet the inventory location merging rule, the purchase quantities of customer X and customer Y are merged. The merge operator for the merge process is "+", that is, the purchase quantities of customer X and customer Y are added together (i.e., "50 + 100") as the updated demand data.
[0060] In the embodiments of this specification, the item identifier to be merged and the merge operator in the data merging rule are determined, and the attribution information of the demand data is obtained for matching to determine the hit data merging rule to perform merging processing on the demand data, thereby avoiding the low efficiency caused by manually comparing item by item to determine the items to be merged and then performing the merging process, and the high error rate of manual matching and merging during the matching process of the data merging rule and the merging process, thus improving the efficiency and accuracy during the matching process and the merging process of the data merging rule.
[0061] Step 108: Match according to the updated demand data in the resource allocation rule to determine the resource allocation result.
[0062] Specifically, the updated demand data is the data after the demand data is merged based on the data merging rule; the resource allocation result can be understood as the way of resource allocation, which can be the way of providing additional target products to customers, or the way of providing currency or discounts to customers. The specific resource allocation method is set according to the actual application scenario, and this specification does not make specific settings.
[0063] In the embodiments of this specification, after the demand data is merged based on the data merging rule, it is further calculated according to the calculation method recorded in the resource allocation rule based on the conditions satisfied by the resource quantity, and then the way of resource allocation is determined.
[0064] Further, calculation errors are likely to occur during the process of manual calculation based on rule information. In traditional resource allocation methods, hard-coded logic or fixed thresholds are usually relied on, which are difficult to adapt to changing business scenarios. Therefore, it is necessary to introduce preset comparison data and comparison operators. On the one hand, automated matching and calculation can be achieved. On the other hand, by adjusting the preset comparison data and operators, it is possible to adapt to changing business scenarios. The specific implementation is as follows: The resource allocation rule includes preset comparison data and a comparison operator; the determining of the resource allocation result by matching in the resource allocation rule according to the updated requirement data includes: comparing the updated requirement data with the preset comparison data based on the comparison operator, and determining the resource allocation result based on the comparison result.
[0065] Specifically, the preset comparison data can be understood as at least one preset data for participating in the comparison; the comparison operator can be understood as the range of the comparison operation, and the comparison operators include ">", "<", "=", "≥", "≤".
[0066] In the embodiments of this specification, as follows Figure 7 As shown, the resource allocation rule records the preset data to be compared (i.e., the purchase quantity) and the comparison operator (i.e., greater than). Further, the updated requirement data is compared with the preset data for participating in the comparison, and then the resource allocation result is determined.
[0067] As follows Figure 8 As shown, the preset data to be compared are 60, 160, and 210, and the comparison operator is "≥". The updated data obtained by Customer X after merging the data based on the data merging rule is "50 + 100". Further, based on "≥", 150 is compared with the preset data to be compared, 60 and 210. It is determined that 150 > 60, and then the resource allocation method is determined based on the comparison result, that is, a discount of 100.
[0068] Further, in the embodiments of this specification, for different comparison results of the preset data to be compared, the corresponding resource allocation methods may also be different. For example, if the updated requirement data is 250, which is greater than the preset 60 and 210 respectively. When it is greater than 60, the resource allocation method is to provide a discount of 100 to the customer. When it is greater than 210, the resource allocation method is to provide a discount of 150 to the customer.
[0069] In addition, during the comparison process, when the preset comparison data includes two or more data, based on the preset comparison operator, the updated requirement data is compared with at least two preset comparison data one by one in sequence to ensure the accuracy of the comparison result. The sequence can be the ascending order, which is not specifically limited herein.
[0070] In the embodiments of this specification, preset comparison data and comparison operators are set, so that dynamic, accurate, and scalable resource allocation can be achieved through rule-based configuration. Moreover, based on the comparison operators, the updated requirement data is compared with the preset comparison data, and the resource allocation result is determined based on the comparison result, thus eliminating the need for manual participation, improving the accuracy and efficiency of the comparison process, and realizing automatic matching and calculation.
[0071] Furthermore, since the business data may contain various field types of data, the corresponding system needs to process a large amount of data. However, not all data meets the conditions for participating in resource allocation. These field types of data will cause waste of computing resources for resource allocation rule matching and confusion of rule logic during the comparison and allocation process, reducing the overall processing efficiency. Therefore, in the embodiments of this specification, by introducing filtering field information and pre-filtering processing, the specific implementation is as follows: The resource allocation rule also includes filtering field information; before comparing the updated requirement data with the preset comparison data based on the comparison operator and determining the resource allocation result based on the comparison result, it also includes: filtering the updated requirement data that does not meet the filtering field information.
[0072] Specifically, the filtering field information can be understood as the field information that needs to participate in the comparison with the preset comparison data.
[0073] In the embodiments of this specification, before comparing the updated requirement data with the preset comparison data based on the comparison operator and determining the resource allocation result based on the comparison result, it is necessary to eliminate the data corresponding to the conditions that do not meet the participation in resource allocation. Furthermore, filter the data of the field information in the updated requirement data that does not need to participate in the comparison with the preset comparison data, so as to retain the data that needs to participate in the comparison with the preset comparison data.
[0074] Continuing with the above example, in the updated requirement data, information such as customer X, code, and address is included. However, information such as customer X, code, and address does not need to be compared with the preset comparison data, that is, it does not meet the filtering field information, so it is filtered.
[0075] In the embodiments of this specification, a resource allocation method provided by this application obtains service data, where the service data includes the object information of a first object and the demand data of each second object for the target product of the first object. Then, based on the object information of the first object, the data merging rule and the resource allocation rule corresponding to the first object are found from a pre-established rule library, so as to achieve rapid access to the required data, significantly improve work efficiency, and avoid the low efficiency caused by manual searching in the rule library by staff. Moreover, the demand data that hits the data merging rule is merged to obtain updated demand data. According to the updated demand data, a match is made in the resource allocation rule to determine the resource allocation result, thereby realizing the automatic calculation of resource allocation, improving the settlement efficiency of resource allocation, and further enhancing the overall work efficiency and customer satisfaction.
[0076] The following combines the attached Figure 9 and the attached Figure 10 , taking the application of the resource allocation method provided by this application in the preferential rebate calculation scenario as an example, to further illustrate the resource allocation method. Among them, the attached Figure 9 and the attached Figure 10 show a processing flow chart of a resource allocation method provided by an embodiment of this application applied to the preferential rebate calculation scenario, which specifically includes the following steps: Step 902: The service data is associated with the preferential rebate policy, and multiple policies can be associated.
[0077] Step 904: Obtain the customer merging rule and the inventory location merging rule of the preferential rebate policy through the company, customer, inventory location, and product information of the service data.
[0078] Step 906: Through the preferential rebate policy rule information, obtain the current purchase quantity of the corresponding service data from the procurement calculation detail data, and the purchase quantity is accumulated according to the customer merging rule and the inventory location merging rule.
[0079] Step 908: Match the service data purchase quantity with the purchase quantity rule to determine the preferential rebate amount corresponding to the purchase quantity.
[0080] Step 910: Save the preferential rebate amount into the service data.
[0081] A resource allocation method provided in an embodiment of this specification obtains service data, where the service data includes object information of a first object and demand data of each second object for a target product of the first object. Then, based on the object information of the first object, a data merging rule and a resource allocation rule corresponding to the first object are found from a pre-established rule library, thereby achieving fast access to required data, significantly improving work efficiency, and avoiding inefficiency caused by manual search by staff in the rule library. Moreover, the demand data that hits the data merging rule is merged to obtain updated demand data. According to the updated demand data, a match is made in the resource allocation rule to determine the resource allocation result, thereby realizing automatic calculation of resource allocation, improving the settlement efficiency of resource allocation, and further enhancing the overall work efficiency and customer satisfaction.
[0082] Corresponding to the above method embodiment, this specification also provides an embodiment of a resource allocation device. Figure 11 The structural schematic diagram of a resource allocation device provided in an embodiment of this specification is shown. As Figure 11 shown, the device includes: An acquisition module 1102, configured to acquire service data, where the service data includes object information of a first object and demand data of each second object for a target product of the first object; A search module 1104, configured to, based on the object information of the first object, find a data merging rule and a resource allocation rule corresponding to the first object from a pre-established rule library; A merging module 1106, configured to perform a merging process on the demand data that hits the data merging rule to obtain updated demand data; A calculation module 1108, configured to, according to the updated demand data, perform a match in the resource allocation rule to determine the resource allocation result.
[0083] Optionally, the rule library includes a data merging sub-table and a resource allocation sub-table; Correspondingly, the search module 1104 is further configured to: Based on the object information of the first object, determine the hit data merging rule from the data merging sub-table; Based on the object information of the first object, determine the hit resource allocation rule from the resource allocation sub-table.
[0084] Optionally, the rule library further includes a rule main table, and the rule main table includes policy configuration information of each allocation policy, where the allocation policy refers to a set of a data merging rule and a resource allocation rule; In one or more alternative embodiments of this specification, the device further includes a calling module, configured to: Receive a policy invocation request, where the policy invocation request includes a policy identifier and policy usage information; Based on the policy identifier, determine the hit target allocation policy and the policy configuration information of the target allocation policy from the rule master table; The determining the hit data merging rule from the data merging sub-table based on the object information of the first object includes: When the policy usage information matches the policy configuration information, determine the hit data merging rule from the data merging sub-table based on the object information of the first object.
[0085] Optionally, the data merging rule includes an item-to-be-merged identifier and a merging operator; Correspondingly, the merging module 1106 is further configured to: Determine the ownership information of the demand data; When it is determined that the demand data hits the item-to-be-merged identifier according to the ownership information, perform a merging process on the demand data based on the merging operator to obtain updated demand data.
[0086] Optionally, the resource allocation rule includes preset comparison data and a comparison operator; Correspondingly, the calculation module 1108 is further configured to: Based on the comparison operator, compare the updated demand data with the preset comparison data, and determine the resource allocation result based on the comparison result.
[0087] Optionally, the resource allocation rule further includes filtering field information; Correspondingly, the calculation module 1108 is further configured to: Filter the updated demand data that does not meet the filtering field information.
[0088] The above is a schematic solution of a resource allocation device in this embodiment. It should be noted that the technical solution of this resource allocation device and the technical solution of the above resource allocation method belong to the same concept. For the details not described in the technical solution of the resource allocation device, reference can be made to the description of the technical solution of the above resource allocation method. In addition, each component in the device embodiment should be understood as a functional module that must be established to implement each step of the program flow or each step of the method. The device claims defined by such a set of functional modules should be understood as mainly implementing the functional module architecture of the solution through the computer program described in the specification, rather than being understood as mainly implementing the physical device of the solution through hardware means.
[0089] Figure 12 The structural block diagram of a computing device 1200 provided according to an embodiment of the present application is shown. The components of the computing device 1200 include, but are not limited to, a memory 1210 and a processor 1220. The processor 1220 is connected to the memory 1210 via a bus 1230, and a database 1250 is used to store data.
[0090] The computing device 1200 further includes an access device 1240, which enables the computing device 1200 to communicate via one or more networks 1260. Examples of these networks include PSTN (Public Switched Telephone Network), LAN (Local Area Network), WAN (Wide Area Network), PAN (Personal Area Network), or a combination of communication networks such as the Internet. The access device 1240 may include one or more of any type of wired or wireless network interfaces (e.g., NIC (Network Interface Controller)), such as an IEEE802.11 WLAN (Wireless Local Area Network) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a USB (Universal Serial Bus) interface, a cellular network interface, a Bluetooth interface, an NFC (Near Field Communication) interface.
[0091] In an embodiment of the present application, the above components of the computing device 1200 and Figure 12 other components not shown may also be connected to each other, for example, via a bus. It should be understood that Figure 12 the shown structural block diagram of the computing device is only for illustrative purposes and not a limitation on the scope of the present application. Those skilled in the art can add or replace other components as needed.
[0092] The computing device 1200 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or a PC (Personal Computer). The computing device 1200 can also be a mobile or stationary server.
[0093] Wherein, the processor 1220 is used to execute the computer-executable instructions of the resource allocation method.
[0094] The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above resource allocation method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the description of the technical solution of the above resource allocation method.
[0095] An embodiment of the present application further provides a computer-readable storage medium, which stores computer programs / instructions, and when the computer programs / instructions are executed by a processor, they are used for the resource allocation method.
[0096] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above resource allocation method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above resource allocation method.
[0097] An embodiment of the present application further provides a computer program product, including computer programs / instructions, and when the computer programs / instructions are executed by a processor, they are used for the resource allocation method.
[0098] The above is a schematic solution of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product and the technical solution of the above resource allocation method belong to the same concept. For the details not described in detail in the technical solution of the computer program product, reference can be made to the description of the technical solution of the above resource allocation method.
[0099] The computer program / instructions include computer program code, which may be in the form of source code, object code, executable files, or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, external hard drives, magnetic disks, optical discs, computer memories, ROM (Read-Only Memory), RAM (Random Access Memory), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice within the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0100] It should be noted that for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0101] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0102] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not elaborate on all the details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of this application, so that those skilled in the art can understand and utilize this application well. This application is only limited by the claims and their full scope and equivalents.
Claims
1. A resource allocation method, characterized in that: include: Acquire business data, wherein the business data includes object information of the first object and demand data of each second object for a target product of the first object; Based on the object information of the first object, searching for a data merging rule and a resource allocation rule corresponding to the first object from a pre-established rule library; Merging the demand data that matches the data merging rule to obtain updated demand data; According to the updated demand data, a match is made in the resource allocation rules to determine a resource allocation result.
2. The method according to claim 1, characterized in that The rule base includes a data merging sub-table and a resource allocation sub-table; The searching, based on the object information of the first object, for a data merging rule and a resource allocation rule corresponding to the first object from a pre-established rule library includes: Based on the object information of the first object, determining a hit data merging rule from the data merging sub-table; Based on the object information of the first object, a hit resource allocation rule is determined from the resource allocation sub-table.
3. The method according to claim 2, characterized in that The rule base also includes a rule master table, which includes policy configuration information of each allocation strategy, and the allocation strategy refers to a collection of data merging rules and resource allocation rules; Before determining the hit data merging rule from the data merging sub-table based on the object information of the first object, the method further includes: Receiving a policy invocation request, wherein the policy invocation request includes a policy identifier and policy usage information; Based on the strategy identifier, determining the hit target allocation strategy and strategy configuration information of the target allocation strategy from the rule master table; The determining a hit data merging rule from the data merging sub-table based on the object information of the first object includes: In a case where the policy usage information matches the policy configuration information, a hit data merging rule is determined from the data merging sub-table based on the object information of the first object.
4. The method according to any one of claims 1 to 3, characterized in that The data merging rule includes an identifier of an item to be merged and a merging operator; the merging process of the demand data matching the data merging rule to obtain updated demand data includes: Determining attribution information of the demand data; In the case where it is determined according to the attribution information that the demand data hits the to-be-merged item identifier, the demand data is merged based on the merge operator to obtain updated demand data.
5. The method according to any one of claims 1 to 3, characterized in that The resource allocation rule includes preset comparison data and comparison operators; matching is performed in the resource allocation rule according to the updated demand data to determine the resource allocation result, including: Based on the comparison operator, the updated demand data is compared with the preset comparison data, and a resource allocation result is determined based on the comparison result.
6. The method according to claim 5, characterized in that The resource allocation rule also includes filtering field information; Before comparing the updated demand data with the preset comparison data based on the comparison operator and determining the resource allocation result based on the comparison result, the method further includes: The updated demand data that does not conform to the filtering field information is filtered.
7. A resource allocation device, characterized in that: include: An acquisition module is configured to acquire business data, wherein the business data includes object information of the first object and demand data of each second object for a target product of the first object; a search module configured to search for a data merging rule and a resource allocation rule corresponding to the first object from a pre-established rule library based on the object information of the first object; A merging module is configured to merge the demand data that matches the data merging rule to obtain updated demand data; The calculation module is configured to match the resource allocation rules according to the updated demand data to determine the resource allocation result.
8. A computing device comprising a memory, a processor, and a computer program / instruction stored in the memory and executable on the processor, characterized in that: include: The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that The method comprises a computer program / instruction, which implements the method according to any one of claims 1 to 6 when executed by a processor.
Citation Information
Cited By
Bus data transmission method and device and chip
CN121233537A