Resource allocation method and device

By decoupling the configuration condition components, flexibility in resource allocation and improved user experience are achieved, solving the problem of poor user experience in existing technologies.

CN114169733BActive Publication Date: 2025-09-16JINGDONG TECH HLDG CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111453853.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-01
Publication Date
2025-09-16
Estimated Expiration
2041-12-01

AI Technical Summary

Technical Problem

The existing resource allocation method is limited to users and has poor flexibility, resulting in a poor user experience.

Method used

By decoupling the configuration condition components, users can arbitrarily combine various conditions and dynamically configure conditions to meet more user needs, thereby achieving flexibility in resource allocation and improving user experience.

Benefits of technology

It improves the flexibility of resource allocation and user experience, and can meet more user needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114169733B_ABST
    Figure CN114169733B_ABST
Patent Text Reader

Abstract

The present invention discloses a resource allocation method and device, which relates to the field of computer technology. A specific implementation of the method includes: obtaining user information and resource information related to the user information in a pre-configured information table; searching for multiple configuration conditions required for resource allocation for the user information; for each of the configuration conditions, calling the condition component corresponding to the configuration condition, and analyzing the resource information through the condition component; if the result of the analysis indicates that the resource information meets multiple configuration conditions, then allocating the resources included in the resource information based on the allocation strategy included in the information table. This implementation decouples users from conditions, and decouples the various conditions from each other, so that the conditions can meet more user needs, thereby improving the flexibility of resource allocation and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of big data technology, and in particular to a resource allocation method and device. Background Art

[0002] In the wholesale and retail industries, it's inevitable to allocate resources (e.g., goods to be sold, profits from sales, etc.) on demand between merchandise agents at different levels, between different merchants at the same level, between partners / cooperating stores, and between merchants in shared stores. Currently, resource allocation is typically managed manually or through the development of specialized software tailored to specific resource allocation needs. Changing user needs require code modifications.

[0003] This existing resource allocation method targets a limited number of users and has poor flexibility, resulting in a poor user experience. Summary of the Invention

[0004] In view of this, an embodiment of the present invention provides a resource allocation method and apparatus that can decouple users from conditions and decouple conditions from each other, so that conditions can meet more user needs, thereby improving the flexibility of resource allocation and user experience.

[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a resource allocation method is provided, comprising:

[0006] Obtain user information and resource information related to the user information in a pre-configured information table;

[0007] Searching for multiple configuration conditions required for resource allocation for the user information;

[0008] For each of the configuration conditions, calling a condition component corresponding to the configuration condition, and analyzing the resource information through the condition component;

[0009] If the result of the analysis indicates that the resource information satisfies a plurality of the configuration conditions, the resources included in the resource information are allocated based on the allocation policy included in the information table.

[0010] Optionally, calling a condition component corresponding to the configuration condition and analyzing the resource information by the condition component includes:

[0011] For a plurality of first configuration conditions having a dependency relationship among the plurality of configuration conditions, sequentially calling a first configuration condition component corresponding to each of the first configuration conditions according to the dependency relationship, and analyzing resource information related to the first configuration condition in the resource information through the first configuration condition component;

[0012] For multiple second configuration conditions that have no dependency relationship among the multiple configuration conditions, the second condition components corresponding to each of the second configuration conditions are asynchronously called, and the resource information related to the second configuration condition in the resource information is analyzed by the second condition components.

[0013] Optionally, the resource allocation method further includes:

[0014] In response to adding user information to the information table, generating a corresponding user identifier for the user information, and adding the user identifier to the information table and a preset user queue respectively;

[0015] Obtaining a target user identifier from the user queue;

[0016] The acquiring of user information from a pre-configured information table includes: acquiring user information matching the target user identifier from the information table.

[0017] Optionally, the resource allocation method further comprises: constructing the configuration condition based on a Spring application framework;

[0018] The calling of the condition component corresponding to the configuration condition includes:

[0019] The constructed configuration conditions are dynamically loaded into a reusable component initialized in the container.

[0020] Optionally, the resource allocation method further comprises: providing multiple types of optional conditions to the client;

[0021] In response to receiving a plurality of configuration conditions selected from the multiple types of optional conditions sent by the client, determining a condition identifier of each of the configuration conditions;

[0022] Storing the condition identifier of the configuration condition and the user information in a preset condition configuration table in correspondence;

[0023] The searching for multiple configuration conditions required for resource allocation for the user information includes: searching for a condition identifier corresponding to the user information in the condition configuration table according to the user information;

[0024] The configuration condition is determined according to the found condition identifier.

[0025] Optionally, allocating the resources included in the resource information includes:

[0026] Calculating the resource value allocated to each user based on the resources and the resource allocation ratio included in the allocation strategy;

[0027] The resource value allocated to each user is written into a preset resource list, and the resource value is synchronously written into a resource settlement system so that the resource value can be provided to the user through the resource settlement system.

[0028] Optionally, the resource allocation method further includes:

[0029] Storing the allocation result in a preset resource queue and broadcasting the allocation result;

[0030] For an allocation result in which secondary allocation occurs, determining resource information of the allocation result;

[0031] Through cross-cutting logic, configuration conditions are searched for the allocation results, and the steps of calling the conditional component corresponding to the configuration conditions and analyzing the resource information through the conditional component are executed.

[0032] Optionally, the resource allocation method further includes:

[0033] In the case where the resource value fails to be written into the resource settlement system, rewriting into the resource settlement system is performed periodically until the writing succeeds.

[0034] Optionally, the resource allocation method further includes:

[0035] In case of failure in calling any of the conditional components, storing the current analysis of the resource information in the resource detail table;

[0036] Based on the current analysis situation stored in the resource list, the condition component is called periodically to continue analyzing the resource information.

[0037] In a second aspect, an embodiment of the present invention provides a resource allocation device, comprising: an acquisition module, a search module, a call module, and an allocation module, wherein:

[0038] The acquisition module is used to acquire user information and resource information related to the user information from a pre-configured information table;

[0039] The search module is used to search for multiple configuration conditions required for resource allocation for the user information;

[0040] The calling module is configured to call a condition component corresponding to each configuration condition and analyze the resource information through the condition component;

[0041] The allocation module is configured to allocate the resources included in the resource information based on the allocation policy included in the information table if the analysis result indicates that the resource information meets a plurality of the configuration conditions.

[0042] One embodiment of the above invention has the following advantages or beneficial effects: because the configuration conditions have corresponding conditional components, that is, the various conditions required for resource allocation are decoupled through the conditional components, then the user can arbitrarily combine the various conditions to obtain multiple configuration conditions required for user information. Subsequently, by calling the conditional components corresponding to the configuration conditions, the user's resource information is analyzed to achieve decoupling of the user and the conditions, and decoupling of the various conditions, so that the conditions can be dynamically configured to meet more user needs, thereby improving the flexibility of resource allocation and user experience.

[0043] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings are provided for a better understanding of the present invention and are not intended to limit the present invention.

[0045] Figure 1 is a schematic diagram of the main process of the resource allocation method according to an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of the main process of obtaining user information in an information table according to an embodiment of the present invention;

[0047] Figure 3 is a schematic diagram of a main process for determining configuration conditions according to an embodiment of the present invention;

[0048] Figure 4 is a schematic diagram of the structure of multiple types of optional conditions provided to a client according to an embodiment of the present invention;

[0049] Figure 5 is a schematic diagram of a main process of allocating resources included in resource information according to an embodiment of the present invention;

[0050] Figure 6 is a schematic diagram of the main process of a resource allocation method according to another embodiment of the present invention;

[0051] Figure 7 is a schematic diagram of the main process of a resource allocation method according to another embodiment of the present invention;

[0052] Figure 8 is a structural diagram of an architecture for executing a resource allocation method according to an embodiment of the present invention;

[0053] Figure 9 is a schematic diagram of the main process of a resource allocation method according to another embodiment of the present invention;

[0054] Figure 10is a schematic diagram of main modules of a resource allocation device according to an embodiment of the present invention;

[0055] Figure 11 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;

[0056] Figure 12 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0057] The following description of exemplary embodiments of the present invention is made in conjunction with the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding. These details should be considered as merely exemplary. Therefore, it should be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0058] Figure 1 FIG. 1 is a schematic diagram of the main flow of a resource allocation method according to an embodiment of the present invention. Figure 1 As shown, the resource allocation method may include the following steps:

[0059] Step S101: Acquire user information and resource information related to the user information in a pre-configured information table;

[0060] The user information generally refers to information that can represent the uniqueness of the user, such as user name, user ID, etc.

[0061] Resource information generally refers to information related to resources such as profit and product volume. Examples include profit distribution time, profit receipt time, profit amount, loan time, overdue time, and activation time. Another example is product arrival time, product distribution time, and product distribution activation time, which are related to product volume.

[0062] Step S102: searching for multiple configuration conditions required for resource allocation for user information;

[0063] The configuration conditions generally refer to the limiting conditions set for the execution of resource allocation. For example, the configuration conditions for profit distribution can be divided into repayment, borrowing, overdue and other types. Each type can include multiple conditions. For example, for the repayment type, it can include successful repayment of all-channel installment orders, failure to repay within 1 day after successful borrowing, failure to repay within 15 days after successful borrowing, failure to repay within 30 days after successful borrowing, and other optional conditions; for the borrowing type, it can include failure to borrow within 10 days after successful activation, first loan, non-first loan, 7 days between activation time and loan time, all-channel first loan, all-channel re-loan, 2 days between activation time and loan time, 1 day between activation time and loan time and other optional conditions; for the activation type, it can include: successful merchant activation, failure to activate successfully in the merchant, successful activation of non-current merchant data source and other optional conditions; for the installment type, it can include: installment single dimension overdue not exceeding 90 days, installment single dimension overdue not exceeding 30 days, borrowing single dimension overdue not exceeding 90 days, borrowing single dimension overdue not exceeding 180 days and other optional conditions. Users can select the conditions to be configured from multiple types of conditions. For example, in the repayment type, configure the condition "not repaid within 15 days after successful loan", in the borrowing type, configure the condition "activation time and loan time are 7 days apart", in the activation type, configure the condition "merchant activation is successful", and in the installment type, configure the condition "installment single dimension overdue does not exceed 90 days".

[0064] Step S103: For each configuration condition, call the condition component corresponding to the configuration condition and analyze the resource information through the condition component;

[0065] Each configuration condition is executed by the corresponding conditional component, which decouples the conditions and enables the conditional components to be reused by multiple users.

[0066] Step S104: If the analysis result indicates that the resource information satisfies a plurality of configuration conditions, the resources included in the resource information are allocated based on the allocation policy included in the information table.

[0067] This allocation strategy mainly involves allocating the allocation ratio among various users, and users can make corresponding settings based on actual needs.

[0068] exist Figure 1 In the embodiment shown, because the configuration conditions have corresponding conditional components, that is, the various conditions required for resource allocation are decoupled through the conditional components, the user can arbitrarily combine the various conditions to obtain multiple configuration conditions required for user information. Subsequently, by calling the conditional components corresponding to the configuration conditions, the user's resource information is analyzed to achieve decoupling between the user and the conditions, and between the various conditions, so that the conditions can be dynamically configured to meet more user needs, thereby improving the flexibility of resource allocation and user experience.

[0069] In an embodiment of the present invention, a specific implementation of the above-mentioned step S103 may include: for multiple first configuration conditions with dependency relationships among multiple configuration conditions, sequentially calling the first configuration condition components corresponding to each first configuration condition according to the dependency relationships, and analyzing resource information related to the first configuration conditions in the resource information through the first configuration condition components; for example, the conditions configured by the user include: configuration condition a, configuration condition b, configuration condition c, configuration condition d, configuration condition e, configuration condition f, and configuration condition g, wherein after configuration condition a is executed, configuration condition b is executed, and after configuration condition b is executed, configuration condition c is executed. According to the dependency relationship, configuration condition c depends on configuration condition b, and configuration condition b depends on configuration condition a, then the condition component 1 corresponding to configuration condition a is first called to analyze the resource information. If the analysis indicates that the resource information satisfies configuration condition a, the condition component 2 corresponding to configuration condition b is called to analyze the resource. If the analysis result indicates that the resource information satisfies configuration condition b, the condition component 3 corresponding to configuration condition c is called to analyze the resource information.

[0070] For multiple second configuration conditions that do not have a dependency relationship among multiple configuration conditions, the second condition components corresponding to each second configuration condition are asynchronously called, and the resource information related to the second configuration condition in the resource information is analyzed by the second condition components. For the above-mentioned configuration conditions d, configuration conditions e, configuration conditions f, and configuration conditions g, there is no dependency relationship among them, and there is no dependency relationship between configuration conditions d, configuration conditions e, configuration conditions f, and configuration conditions g and the above-mentioned configuration conditions a, configuration conditions b, and configuration conditions c, then the condition component 4 of configuration condition d, the condition component 5 of configuration condition e, the condition component 6 of configuration condition f, and the condition component 7 of configuration condition g can be asynchronously called to analyze the resource information respectively. If the analysis result indicates that the resource information satisfies the above-mentioned configuration conditions a, configuration conditions b, configuration conditions c, configuration conditions d, configuration conditions e, configuration conditions f, and configuration conditions g, then it is determined that the analysis result indicates that the resource information satisfies multiple configuration conditions.

[0071] In an embodiment of the present invention, Figure 2 The main process of obtaining user information from the information table is shown in Figure 2. Figure 2 As shown, the main process of obtaining user information in the information table may include the following steps:

[0072] Step S201: In response to adding user information to the information table, generating a corresponding user identifier for the user information, and adding the user identifier to the information table and a preset user queue respectively;

[0073] This process can be performed by providing a form to be filled out to the client, receiving the user information filled out in the form from the client, reading the user information, adding the user information to the information table, and generating a corresponding user ID for the user information. The user ID can be information such as a code or number that uniquely identifies the location of the user information in the information table.

[0074] The user queue user stores the user identifier to subsequently process resource allocation for the user based on the user queue sequence.

[0075] Step S202: Obtain the target user ID from the user queue;

[0076] Step S203: Obtain user information matching the target user identifier from the information table.

[0077] User information is managed through user queues to standardize user information management, and user information can be processed according to the order of the user queues.

[0078] In an embodiment of the present invention, to decouple various conditions and facilitate their maintenance, the resource allocation method may further include constructing configuration conditions based on the Spring application framework. Accordingly, invoking the conditional component corresponding to the configuration condition may include dynamically loading the constructed configuration condition into a reusable component initialized in a container. The Spring application framework container may be an ApplicationContext container within the Spring application framework, and the reusable component is typically a JavaBean-type component. This process decouples various configuration conditions within the Spring architecture and facilitates their execution.

[0079] In an embodiment of the present invention, Figure 3 FIG. 4 shows a specific implementation method for determining configuration conditions in the above resource allocation method. Figure 3 As shown, the specific implementation of determining the configuration condition may include the following steps:

[0080] Step S301: providing multiple types of optional conditions to the client;

[0081] The multiple types of optional conditions provided to the client can be as follows Figure 4Type I, Type II, Type III, and Type VI are shown, where the optional conditions under Type I are Condition A, Condition B, Condition C, and Condition D; the optional conditions under Type II are Condition A', Condition B', Condition C', Condition D', Condition E', Condition F', and Condition G'; the optional conditions under Type III are Condition A" and Condition B", and the optional conditions under Type VI are Condition A'', Condition B'', Condition C'', Condition D'', Condition E'', Condition F'', and Condition G''. Users can select the configuration conditions they need from these conditions.

[0082] Step S302: In response to receiving multiple configuration conditions selected from multiple types of optional conditions sent by the client, determining a condition identifier for each configuration condition;

[0083] The condition identifier refers to a characteristic number that uniquely identifies a configuration condition, etc.

[0084] Step S303: storing the condition identifier of the configuration condition and the user information in a preset condition configuration table;

[0085] Step S304: searching the condition identifier corresponding to the user information in the condition configuration table according to the user information;

[0086] Step S305: Determine the configuration condition according to the found condition identifier.

[0087] The above process enables flexible configuration and management of configuration conditions for different users.

[0088] In the embodiment of the present invention, Figure 5 As shown, the specific implementation of allocating the resources included in the resource information may include:

[0089] Step S501: Calculate the resource value allocated to each user based on the resource and resource allocation ratio included in the allocation policy;

[0090] Step S502: Write the resource value allocated to each user into a preset resource list, and simultaneously write the resource value into the resource settlement system so that the resource value can be provided to the user through the resource settlement system.

[0091] In the case where the resource value fails to be written into the resource settlement system, rewriting into the resource settlement system is performed periodically until the writing succeeds.

[0092] The above process is used to realize the communication with the resource settlement system, so as to allocate corresponding resource allocation results to different resource settlement systems.

[0093] In the embodiment of the present invention, Figure 6The resource allocation method may further include the following steps:

[0094] Step S601: When any conditional component fails to be called, the current analysis of the resource information is stored in the resource detail table;

[0095] Step S602: Based on the current analysis status stored in the resource list, the condition component is called periodically to continue analyzing the resource information.

[0096] By calling the conditional component regularly, unprocessed resource information is processed to reduce the efficiency of resource processing failure and improve the reliability of resource allocation.

[0097] In the embodiment of the present invention, Figure 7 As shown, the resource allocation method may further include the following steps:

[0098] Step S701: storing the allocation result in a preset resource queue and broadcasting the allocation result;

[0099] Step S702: For allocation results with secondary allocation, determine resource information of the allocation results;

[0100] Step S703: searching for configuration conditions for the allocation results through cross-cutting logic, executing the steps of calling the conditional components corresponding to the configuration conditions, and analyzing the resource information through the conditional components.

[0101] The above process can be used to reallocate already allocated resources, thus achieving resource allocation among multiple levels of users. In addition, by using cross-cutting logic to find configuration conditions for the allocation results, the efficiency of resource allocation among multiple levels of users can be effectively improved.

[0102] In order to clearly illustrate the implementation process of the resource allocation method, the present invention uses Figure 8 The architecture of the resource allocation method shown is described by taking the profit distribution of merchants at different levels as an example. Figure 9 As shown, the resource allocation method may include the following steps:

[0103] Step S901: providing multiple types of optional conditions to the client;

[0104] In order to realize the profit distribution of merchants, the embodiment of the present invention is to Figure 8 The architecture shown is based on the Figure 8As shown, the architecture for implementing merchant profit distribution mainly includes an access layer, a core layer, a resource allocation device, a data access layer, a conditional calculation layer, and an offline center. The access layer primarily prepares for access to the core layer, providing merchant access (this merchant access is primarily for obtaining merchant information, such as connecting to the client or connecting to systems containing merchant information), condition editing (primarily allowing conditions to be edited to add corresponding conditions based on customer needs), condition configuration (primarily allowing the user to select desired conditions from the conditions provided in the condition editor for configuration), and offline task configuration (primarily receiving user-configured parameters for offline tasks, such as the number of executions and the duration of the loop interval). The core layer mainly includes some scenarios for resource allocation, such as scenario 1, scenario 2, scenario 3, etc., merchant class, rule class, condition class, etc. The condition model is mainly for some conditional behaviors of user configuration conditions. The resource allocation device mainly calls the above condition model combined with the conditional behavior to obtain condition 1, condition n, etc., so that the method executor of the data access layer executes these conditions based on the data provided by the data source, such as resource information, and when the execution results of these conditions indicate that the resource information meets these conditions, the resource allocation is calculated through the conditional calculation layer. Subsequently, the offline center can execute offline tasks or compensation / extension mechanisms based on offline configuration to ensure that resource allocation can be successfully completed as much as possible.

[0105] For example, through Figure 8 The merchant access shown receives merchant information sent by the user, adds the merchant information / user information to the information table, generates a corresponding user identifier for the user information, and adds the user identifier to the information table and a preset user queue respectively.

[0106] Step S902: In response to receiving multiple configuration conditions selected from multiple types of optional conditions sent by the client, determining a condition identifier of each configuration condition;

[0107] This step can be done by Figure 8 The access layer condition configuration shown here provides the client with multiple optional conditions and accepts user selection to select multiple configuration conditions from these optional conditions. It is worth noting that the various conditions edited by the condition editor can be stored as condition classes and rule classes in the core layer for use in condition models and different scenarios.

[0108] Step S903: storing the condition identifier of the configuration condition and the user information in a preset condition configuration table;

[0109] Step S904: Obtain the target user ID from the user queue;

[0110] Step S905: Acquire user information that matches the target user identifier and resource information related to the user information from the information table;

[0111] Step S906: According to the user information, search the condition configuration table for a condition identifier corresponding to the user information;

[0112] Step S907: Determine the configuration conditions according to the found condition identifiers; for multiple first configuration conditions that have dependencies among the multiple configuration conditions, execute step S908; for multiple second configuration conditions that do not have dependencies among the multiple configuration conditions, execute step S909;

[0113] Step S908: sequentially calling the first configuration condition components corresponding to the respective first configuration conditions according to the dependency relationship, analyzing the resource information related to the first configuration condition in the resource information through the first configuration condition components, and executing step S910;

[0114] Step S909: asynchronously calling the second condition component corresponding to each second configuration condition, and analyzing resource information related to the second configuration condition in the resource information through the second condition component;

[0115] Steps S908 and S909 are implemented via the resource allocation mechanism. The conditional model primarily constructs configuration conditions based on the Spring application framework. Accordingly, the conditional component is invoked to dynamically load the constructed configuration conditions into a reusable component initialized in the container. It is worth noting that the first and second conditional components are primarily used to distinguish between dependencies and do not limit the number or order of conditional components.

[0116] It is worth noting that a compensation / extension mechanism can be implemented through offline task configuration: in the event that any conditional component fails to be called, the current analysis of the resource information is stored in the resource details table; based on the current analysis stored in the resource details table, the conditional component is called periodically to continue analyzing the resource information.

[0117] Step S910: If the analysis result indicates that the resource information meets multiple configuration conditions, the resource value allocated to each user is calculated based on the resource and resource allocation ratio included in the allocation policy;

[0118] Step S911: writing the resource value allocated to each user into a pre-set resource list, and synchronously writing the resource value into the resource settlement system so that the resource value can be provided to the user through the resource settlement system;

[0119] If a resource value fails to be written to the resource settlement system, it will be rewritten to the resource settlement system periodically until it is successfully written. This process can also be implemented through offline task configuration.

[0120] Step S912: storing the allocation result in a preset resource queue and broadcasting the allocation result;

[0121] Step S913: For the allocation result with secondary allocation, determine the resource information of the allocation result;

[0122] Step S914: Search for configuration conditions for the allocation result through cross-cutting logic, and execute step S908 for multiple first configuration conditions with dependencies among the multiple configuration conditions; execute step S909 for multiple second configuration conditions without dependencies among the multiple configuration conditions.

[0123] like Figure 10 As shown, an embodiment of the present invention provides a resource allocation device 1000, which may include: an acquisition module 1001, a search module 1002, a call module 1003 and an allocation module 1004, wherein:

[0124] An acquisition module 1001 is used to acquire user information and resource information related to the user information in a pre-configured information table;

[0125] Search module 1002, used to search for multiple configuration conditions required for resource allocation for user information;

[0126] The calling module 1003 is used to call the condition component corresponding to each configuration condition and analyze the resource information through the condition component;

[0127] The allocation module 1004 is configured to allocate the resources included in the resource information based on the allocation policy included in the information table if the analysis result indicates that the resource information meets multiple configuration conditions.

[0128] In an embodiment of the present invention, the calling module 1003 is further used to, for multiple first configuration conditions that have dependencies among the multiple configuration conditions, sequentially call the first configuration condition components corresponding to each first configuration condition according to the dependencies, and analyze the resource information related to the first configuration condition in the resource information through the first configuration condition components; for multiple second configuration conditions that do not have dependencies among the multiple configuration conditions, asynchronously call the second condition components corresponding to each second configuration condition, and analyze the resource information related to the second configuration condition in the resource information through the second condition components.

[0129] In an embodiment of the present invention, the resource allocation apparatus 1000 may further include:

[0130] Configuration module 1005, in response to adding user information to the information table, generates a corresponding user identifier for the user information, and adds the user identifier to the information table and a preset user queue respectively;

[0131] The acquisition module 1001 is further configured to acquire a target user identifier from the user queue; and acquire user information matching the target user identifier from the information table.

[0132] In the embodiment of the present invention, the calling module 1003 is further used to dynamically load the configuration conditions constructed based on the Spring application framework into the initialized reusable components in the container to construct the configuration conditions.

[0133] In an embodiment of the present invention, the resource allocation apparatus 1000 may further include: a providing module 1006, wherein:

[0134] Providing module 1006, for providing multiple types of optional conditions to the client;

[0135] The configuration module 1005 further determines a condition identifier of each configuration condition in response to receiving multiple configuration conditions selected from multiple types of optional conditions sent by the client; and stores the condition identifier of the configuration condition and the user information in a preset condition configuration table in correspondence;

[0136] The search module 1002 is further configured to search the conditional configuration table for a conditional identifier corresponding to the user information according to the user information; and determine the configuration condition according to the searched conditional identifier.

[0137] In an embodiment of the present invention, the allocation module 1004 is further used to calculate the resource value allocated to each user based on the resource and resource allocation ratio included in the allocation strategy; write the resource value allocated to each user into a pre-set resource list, and synchronously write the resource value into the resource settlement system so that it can be provided to the user through the resource settlement system.

[0138] In the embodiment of the present invention, the allocation module 1004 is further configured to store the allocation result in a preset resource queue and broadcast the allocation result; for allocation results with secondary allocation, determine resource information of the allocation result;

[0139] The search module 1002 is further configured to search for configuration conditions for the allocation result through cross-cutting logic.

[0140] In the embodiment of the present invention, the allocation module 1004 is further configured to, in the event that writing of the resource value to the resource settlement system fails, periodically execute rewriting to the resource settlement system until the writing succeeds.

[0141] In an embodiment of the present invention, the calling module 1003 is further used to store the current analysis of resource information in the resource details table when any conditional component fails to be called; based on the current analysis stored in the resource details table, the conditional component is called periodically to continue analyzing the resource information.

[0142] Figure 11 An exemplary system architecture 1100 is shown to which the resource allocation method or resource allocation apparatus according to the embodiment of the present invention can be applied.

[0143] like Figure 11 As shown, system architecture 1100 may include terminal devices 1101, 1102, and 1103, a network 1104, a resource allocation server 1105, a data source database 1106, and a resource settlement server 1107. Network 1104 is a medium for providing communication links between terminal devices 1101, 1102, and 1103 and resource server 1105, between resource server 1105 and data source database 1106, and between resource server 1105 and resource settlement system 1107. Network 1104 may include various connection types, such as wired or wireless communication links or fiber optic cables.

[0144] Users can use terminal devices 1101, 1102, and 1103 to interact with resource allocation server 1105 via network 1104 to receive multiple types of optional conditions provided by resource allocation server 1105 and feedback selected configuration conditions to resource allocation server 1105. Various communication client applications can be installed on terminal devices 1101, 1102, and 1103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0145] The terminal devices 1101 , 1102 , and 1103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0146] Resource allocation server 1105 may be a server providing various services, such as a backend management server (for example only) that supports the condition combinations selected by users using terminal devices 1101, 1102, and 1103. Based on the condition combinations, the backend management server may analyze resource information related to user information in data source database 1106, allocate resources provided by data source database 1106 based on the analysis results, and transmit the resource allocation results (for example, the profits and products allocated to each merchant - for example only) to resource settlement server 1107.

[0147] It should be noted that the resource allocation method provided in the embodiment of the present invention is generally executed by the server 1105 , and accordingly, the resource allocation device is generally provided in the resource allocation server 1105 .

[0148] It should be understood that Figure 11The number of terminal devices, networks, resource allocation servers, data source databases, and resource settlement servers in the embodiment is merely illustrative. Any number of terminal devices, networks, resource allocation servers, data source databases 1106, and resource settlement servers 1107 may be provided as needed.

[0149] Reference below Figure 12 (Numbers are numbered according to actual needs), which shows a structural diagram of a computer system 1200 of a terminal device suitable for implementing an embodiment of the present invention. Figure 12 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0150] like Figure 12 As shown, the computer system 1200 includes a central processing unit (CPU) 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage unit 1208 into a random access memory (RAM) 1203. Various programs and data required for the operation of the system 1200 are also stored in the RAM 1203. The CPU 1201, the ROM 1202, and the RAM 1203 are connected to each other via a bus 1204. An input / output (I / O) interface 1205 is also connected to the bus 1204.

[0151] The following components are connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output section 1207 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 1208 including a hard disk; and a communication section 1209 including a network interface card such as a LAN card or a modem. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. Removable media 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1210 as needed, so that computer programs read therefrom can be installed into the storage section 1208 as needed.

[0152] In particular, according to the embodiments disclosed herein, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1209, and / or installed from a removable medium 1211. When the computer program is executed by the central processing unit (CPU) 1201, the above-mentioned functions defined in the system of the present invention are performed.

[0153] It should be noted that the computer-readable medium described in the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.

[0154] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0155] The modules described in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as comprising an acquisition module, a search module, a call module, and an allocation module. The names of these units do not, in some cases, limit the modules themselves. For example, the acquisition module may also be described as a "module for acquiring user information from a preconfigured information table and resource information related to the user information."

[0156] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment, or may exist independently and not be incorporated into the device. The computer-readable medium carries one or more programs, which, when executed by the device, causes the device to: obtain user information and resource information related to the user information in a preconfigured information table; search for multiple configuration conditions required for resource allocation for the user information; for each configuration condition, invoke a condition component corresponding to the configuration condition, and analyze the resource information through the condition component; if the analysis result indicates that the resource information satisfies the multiple configuration conditions, allocate the resources included in the resource information based on the allocation policy included in the information table.

[0157] According to the technical solution of the embodiment of the present invention, since the configuration conditions have corresponding conditional components, that is, the various conditions required for resource allocation are decoupled through the conditional components, the user can arbitrarily combine the various conditions to obtain multiple configuration conditions required for user information. Subsequently, by calling the conditional components corresponding to the configuration conditions, the user's resource information is analyzed to achieve decoupling of the user and the conditions, and decoupling of the various conditions, so that the conditions can be dynamically configured to meet more user needs, thereby improving the flexibility of resource allocation and user experience.

[0158] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A resource allocation method, characterized in that: include: Build configuration conditions based on the Spring application framework; Obtain user information and resource information related to the user information in a pre-configured information table; Searching for multiple configuration conditions required for resource allocation for the user information; For each of the configuration conditions, calling a condition component corresponding to the configuration condition, and analyzing the resource information through the condition component; If the result of the analysis indicates that the resource information satisfies a plurality of the configuration conditions, allocating the resources included in the resource information based on the allocation policy included in the information table; The calling of the conditional component corresponding to the configuration condition includes: dynamically loading the constructed configuration condition into a reusable component initialized in a container; The calling of the condition component corresponding to the configuration condition and analyzing the resource information by the condition component includes: For a plurality of first configuration conditions having a dependency relationship among the plurality of configuration conditions, sequentially calling a first configuration condition component corresponding to each of the first configuration conditions according to the dependency relationship, and analyzing resource information related to the first configuration condition in the resource information through the first configuration condition component; For multiple second configuration conditions that have no dependency relationship among the multiple configuration conditions, the second condition components corresponding to each of the second configuration conditions are asynchronously called, and the resource information related to the second configuration condition in the resource information is analyzed by the second condition components.

2. The method according to claim 1, characterized in that Further including: In response to adding user information to the information table, generating a corresponding user identifier for the user information, and adding the user identifier to the information table and a preset user queue respectively; Obtaining a target user identifier from the user queue; The acquiring of user information from a pre-configured information table includes: acquiring user information matching the target user identifier from the information table.

3. The method according to claim 1, characterized in that Further including: providing multiple types of optional conditions to the client; In response to receiving a plurality of configuration conditions selected from the multiple types of optional conditions sent by the client, determining a condition identifier of each of the configuration conditions; Storing the condition identifier of the configuration condition and the user information in a preset condition configuration table in correspondence; The searching for multiple configuration conditions required for resource allocation for the user information includes: searching for a condition identifier corresponding to the user information in the condition configuration table according to the user information; The configuration condition is determined according to the found condition identifier.

4. The method according to any one of claims 1 to 3, characterized in that: The allocating the resources included in the resource information includes: Calculating the resource value allocated to each user based on the resources and the resource allocation ratio included in the allocation strategy; The resource value allocated to each user is written into a preset resource list, and the resource value is synchronously written into a resource settlement system so that the resource value can be provided to the user through the resource settlement system.

5. The method according to any one of claims 1 to 3, characterized in that: Further including: Storing the allocation result in a preset resource queue and broadcasting the allocation result; For an allocation result in which secondary allocation occurs, determining resource information of the allocation result; Through cross-cutting logic, configuration conditions are searched for the allocation results, and the steps of calling the conditional component corresponding to the configuration conditions and analyzing the resource information through the conditional component are executed.

6. The method according to claim 4, characterized in that Further including: In the case where the resource value fails to be written into the resource settlement system, rewriting into the resource settlement system is performed periodically until the writing succeeds.

7. The method according to claim 4, characterized in that Further including: In case of failure in calling any of the conditional components, storing the current analysis of the resource information in the resource detail table; Based on the current analysis situation stored in the resource list, the condition component is called periodically to continue analyzing the resource information.

8. A resource allocation device, characterized in that: include: Configuration module, acquisition module, search module, call module and allocation module, among which, The configuration module is used to build configuration conditions based on the Spring application framework; The acquisition module is used to acquire user information and resource information related to the user information from a pre-configured information table; The search module is used to search for multiple configuration conditions required for resource allocation for the user information; The calling module is configured to call a condition component corresponding to each configuration condition and analyze the resource information through the condition component; The allocation module is configured to allocate the resources included in the resource information based on the allocation policy included in the information table if the analysis result indicates that the resource information satisfies a plurality of the configuration conditions; The calling module is further used to dynamically load the constructed configuration conditions into the initialized reusable components in the container; The calling module is also used for: For a plurality of first configuration conditions having a dependency relationship among the plurality of configuration conditions, sequentially calling a first configuration condition component corresponding to each of the first configuration conditions according to the dependency relationship, and analyzing resource information related to the first configuration condition in the resource information through the first configuration condition component; For multiple second configuration conditions that have no dependency relationship among the multiple configuration conditions, the second condition components corresponding to each of the second configuration conditions are asynchronously called, and the resource information related to the second configuration condition in the resource information is analyzed by the second condition components.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Application-oriented dynamic resource allocation method for IaaS (Infrastructure As A Service) layer

    CN104679595A