CN114169733A - Resource allocation method and device - Google Patents

Resource allocation method and device Download PDF

Info

Publication number
CN114169733A
CN114169733A CN202111453853.7A CN202111453853A CN114169733A CN 114169733 A CN114169733 A CN 114169733A CN 202111453853 A CN202111453853 A CN 202111453853A CN 114169733 A CN114169733 A CN 114169733A
Authority
CN
China
Prior art keywords
condition
resource
configuration
information
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111453853.7A
Other languages
Chinese (zh)
Inventor
户晓鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202111453853.7A priority Critical patent/CN114169733A/en
Publication of CN114169733A publication Critical patent/CN114169733A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06313Resource planning in a project environment

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Quality & Reliability (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Game Theory and Decision Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Educational Administration (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a resource allocation method and a resource allocation device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring user information in a pre-configured information table and resource information related to the user information; searching a plurality of configuration conditions required by resource allocation for the user information; for each configuration condition, calling a condition component corresponding to the configuration condition, and analyzing the resource information through the condition component; and if the analyzed result indicates that the resource information meets a plurality of configuration conditions, allocating the resources included in the resource information based on the allocation strategy included in the information table. According to the implementation method, the user and the conditions are decoupled, and all the conditions are decoupled, so that the conditions can meet more user requirements, and the flexibility of resource allocation and the user experience are improved.

Description

Resource allocation method and device
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a resource allocation method and apparatus.
Background
In the wholesale and retail industry, there is an inevitable need to allocate resources (such as allocating goods to be sold, profits for sale of goods, etc.) on demand between goods agents at different levels, between different merchants at the same level, between partners/cooperative stores, between merchants at shared stores, etc. Currently, for resource allocation, manual management is generally adopted or corresponding software is developed specifically for a certain resource allocation requirement for use by a user, and after the user requirement changes, the software code needs to be changed to realize the purpose.
The existing resource allocation mode aims at limited users and has poor use flexibility, so that the user experience is poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a resource allocation method and apparatus, which can decouple a user from a condition, and decouple each condition, so that the condition can meet more user requirements, thereby improving flexibility of resource allocation and user experience.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a resource allocation method, including:
acquiring user information in a pre-configured information table and resource information related to the user information;
searching a plurality of configuration conditions required by resource allocation for the user information;
for each configuration condition, calling a condition component corresponding to the configuration condition, and analyzing the resource information through the condition component;
and if the analyzed result indicates that the resource information meets a plurality of configuration conditions, allocating the resources included in the resource information based on the allocation strategy included in the information table.
Optionally, the invoking a condition component corresponding to the configuration condition, and analyzing the resource information by the condition component includes:
for a plurality of first configuration conditions with dependency relationships among the plurality of configuration conditions, sequentially calling first configuration condition components corresponding to the first configuration conditions 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;
and for a plurality of second configuration conditions without dependency relationship in the plurality of configuration conditions, asynchronously calling a second condition component corresponding to each second configuration condition, and analyzing the resource information related to the second configuration condition in the resource information through the second condition component.
Optionally, the resource allocation method further includes:
responding to the addition of user information to the information table, generating corresponding user identification for the user information, and respectively adding the user identification to the information table and a preset user queue;
acquiring a target user identifier from the user queue;
the acquiring of the user information in the preconfigured information table includes: and acquiring the user information matched with the target user identification from the information table.
Optionally, the resource allocation method further includes: constructing the configuration condition based on a Spring application program framework;
the calling of the condition component corresponding to the configuration condition comprises:
dynamically loading the constructed configuration conditions in initialized reusable components in a container.
Optionally, the resource allocation method further includes: providing a plurality of 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 configuration condition;
correspondingly storing the condition identification of the configuration condition and the user information into a preset condition configuration table;
the searching for a plurality of configuration conditions required for resource allocation for the user information includes: according to the user information, searching a condition identifier corresponding to the user information in the condition configuration table;
and determining configuration conditions according to the found condition identification.
Optionally, the allocating the resources included in the resource information includes:
calculating the value of the resource allocated to each user according to the resource allocation proportion included by the resource and the allocation strategy;
writing the resource value allocated to each user into a preset resource list, and synchronously writing the resource value into a resource settlement system so as to provide the resource value for the user through the resource settlement system.
Optionally, the resource allocation method further includes:
storing the distribution result into a preset resource queue and broadcasting the distribution result;
determining resource information of an allocation result aiming at the allocation result with a secondary allocation condition;
and searching a configuration condition for the allocation result through a crosscut logic, executing a condition component corresponding to the configuration condition, and analyzing the resource information through the condition component.
Optionally, the resource allocation method further includes:
and under the condition of writing the resource value failed by the resource settlement system, periodically executing rewriting to the resource settlement system until the writing is successful.
Optionally, the resource allocation method further includes:
storing the current analysis condition of the resource information into the resource detail table aiming at the condition that any condition component fails to be called;
and based on the current analysis condition stored in the resource detail table, calling a condition component at regular time and continuously analyzing the resource information.
In a second aspect, an embodiment of the present invention provides a resource allocation apparatus, including: an acquisition module, a search module, a calling module and an allocation module, wherein,
the acquisition module is used for acquiring user information in a preconfigured information table and resource information related to the user information;
the searching module is used for searching a plurality of configuration conditions required by resource allocation for the user information;
the calling module is used for calling a condition component corresponding to each configuration condition and analyzing the resource information through the condition component;
the allocation module is configured to allocate the resource included in the resource information based on an allocation policy included in the information table if the analyzed result indicates that the resource information satisfies the plurality of configuration conditions.
One embodiment of the above invention has the following advantages or benefits: because the configuration conditions have corresponding condition components, namely, the condition components are used for decoupling the conditions required by resource allocation, a user can randomly combine the conditions to obtain a plurality of configuration conditions required by user information, and then the condition components corresponding to the configuration conditions are called to analyze the resource information of the user, so that the decoupling between the user and the conditions is realized, the conditions can be dynamically configured, more user requirements are met, and the flexibility of resource allocation and the user experience are improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a resource allocation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a main flow of obtaining user information in an information table according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a main flow of determining configuration conditions according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a multi-type optional condition provided to a client according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a main flow of allocating resources included in the resource information according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a main flow of a resource allocation method according to another embodiment of the present invention;
FIG. 7 is a diagram illustrating a main flow of a resource allocation method according to another embodiment of the present invention;
FIG. 8 is a block diagram of an architecture for performing a resource allocation method according to an embodiment of the present invention;
fig. 9 is a schematic diagram of a main flow of a resource allocation method according to another embodiment of the present invention;
fig. 10 is a schematic diagram of main blocks of a resource allocation apparatus according to an embodiment of the present invention;
FIG. 11 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 12 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic main flow chart of a resource allocation method according to an embodiment of the present invention. As shown in fig. 1, the resource allocation method may include the following steps:
step S101: acquiring user information and resource information related to the user information in a pre-configured information table;
the user information generally refers to information capable of characterizing the uniqueness of the user, such as a user name, a user identification, and the like.
The resource information is generally information related to resources such as profit, amount of goods, and the like. Such as profit sharing time, profit arrival time, profit amount, borrowing time, expiration time, activation time, etc., related to profits, and such as commodity arrival time, commodity sharing activation time, etc., related to the quantity of commodities.
Step S102: searching a plurality of configuration conditions required by resource allocation for user information;
the allocation condition generally refers to a limit condition set for performing resource allocation, for example, the allocation condition for profit allocation can be divided into multiple types such as repayment, borrowing, overdue, and the like, each type can include multiple conditions, for example, for the type of repayment, the allocation condition can include selectable conditions such as successful repayment of a full-channel installment bill, non-repayment within 1 day of successful loan, non-repayment within 15 days of successful loan, non-repayment within 30 days of successful loan, and the like; for the type of borrowing, optional conditions such as non-borrowing within 10 days of successful activation, first loan, non-first loan, 7 days between activation time and loan time, channel-wide first loan, channel-wide second loan, 2 days between activation time and loan time, 1 day between activation time and loan time, and the like can be included; for this type of activation, it may include: optional conditions such as successful merchant activation, unsuccessful merchant activation, successful activation of a non-current merchant data source and the like are activated; for this type of staging, it may include: and optional conditions of the overdue single-dimensional overdue not exceeding 90 days, the overdue single-dimensional overdue not exceeding 30 days, the overdue single-dimensional overdue of the loan not exceeding 90 days, the overdue single-dimensional overdue of the loan not exceeding 180 days and the like. The user can select the conditions to be configured among a plurality of types of conditions, for example, a condition of "not repayment within 15 days of successful loan" in the type of configuration of repayment, a condition of "activation time and loan time are separated by 7 days" in the type of configuration of borrowing, a condition of "activating merchant successfully" for activating the type of configuration, and a condition of "single-dimensional degree of installment is not over 90 days" for the type of installment.
Step S103: calling a condition component corresponding to each configuration condition, and analyzing the resource information through the condition component;
each configuration condition is executed by a corresponding condition component, so that decoupling among the conditions is realized, and the condition components can be reused by multiple users.
Step S104: and if the analyzed result indicates that the resource information meets a plurality of configuration conditions, allocating the resources included in the resource information based on the allocation strategy included in the information table.
The allocation strategy mainly relates to allocation proportions among all users, and the users can carry out corresponding setting according to actual requirements.
In the embodiment shown in fig. 1, since the configuration conditions have corresponding condition components, that is, each condition required for resource allocation is decoupled through the condition components, a user can arbitrarily combine each condition to obtain a plurality of configuration conditions required for user information, and then the resource information of the user is analyzed by calling the condition components corresponding to the configuration conditions, so that decoupling between the user and the conditions is realized, the conditions can be dynamically configured, more user requirements are met, and flexibility of resource allocation and user experience are improved.
In an embodiment of the present invention, the detailed implementation of step S103 may include: aiming at a plurality of first configuration conditions with dependency relationship in the plurality of configuration conditions, sequentially calling first configuration condition components corresponding to the first configuration conditions according to the dependency relationship, and analyzing resource information related to the first configuration conditions in the resource information through the first configuration condition components; for example, the user-configured conditions include: the method comprises the following steps of configuring condition a, configuring condition b, configuring condition c, configuring condition d, configuring condition e, configuring condition f and configuring condition g, wherein the configuring condition b is executed after the configuring condition a is executed, and the configuring condition c is executed after the configuring condition b is executed. And c, depending on the configuration condition b according to the dependency relationship configuration condition, b, depending on the configuration condition a, calling a condition component 1 corresponding to the configuration condition a to analyze the resource information, calling a condition component 2 corresponding to the configuration condition b to analyze the resource if the analysis indicates that the resource information meets the configuration condition a, and calling a condition component 3 corresponding to the configuration condition c to analyze the resource information if the analysis result indicates that the resource information meets the configuration condition b.
And asynchronously calling a second condition component corresponding to each second configuration condition aiming at a plurality of second configuration conditions without dependency relationship in the plurality of configuration conditions, and analyzing the resource information related to the second configuration conditions in the resource information through the second condition components. If there is no dependency relationship among the configuration condition d, the configuration condition e, the configuration condition f, and the configuration condition g, and the configuration condition a, the configuration condition b, and the configuration condition c, the condition component 4 of the configuration condition d, the condition component 5 of the configuration condition e, the condition component 6 of the configuration condition f, and the condition component 7 of the configuration condition g may be asynchronously called, and the analysis result indicates that the resource information satisfies the configuration condition a, the configuration condition b, the configuration condition c, the configuration condition d, the configuration condition e, the configuration condition f, and the configuration condition g, it is determined that the analysis result indicates that the resource information satisfies the plurality of configuration conditions.
In the embodiment of the present invention, fig. 2 shows a main flow of obtaining user information in an information table. As shown in fig. 2, the main process of acquiring the user information in the information table may include the following steps:
step S201: responding to the addition of the user information to the information table, generating corresponding user identification for the user information, and respectively adding the user identification to the information table and a preset user queue;
the process can receive the user information filled in the form sent by the client by providing the filled form to the client, read the user information, add the user information to the information table, and generate a corresponding user identifier for the user information. The user identifier may be information such as a code, a number, etc. that uniquely identifies the location of the user information in the information table.
The user queue user stores the user identification for subsequent processing of the user's resource allocation based on the user queue order.
Step S202: acquiring a target user identifier from a user queue;
step S203: and acquiring the user information matched with the target user identification from the information table.
The user information is managed through the user queue to standardize user information management, and meanwhile, the user information can be processed according to the sequence of the user queue.
In the embodiment of the present invention, in order to decouple each condition and facilitate maintenance of each condition, the resource allocation method may further include: constructing a configuration condition based on a Spring application program framework; correspondingly, the condition component corresponding to the call configuration condition may include: the constructed configuration conditions are dynamically loaded in the initialized reusable components in the container. The Spring application frame architecture container may be an ApplicationContext container under a Spring application frame, and the reusable component is generally a java bean type component. The decoupling among the configuration conditions under the Spring framework is realized through the process, and the execution of the configuration conditions can be facilitated.
In the embodiment of the present invention, fig. 3 illustrates a specific implementation of determining a configuration condition in the resource allocation method. As shown in fig. 3, the specific embodiment of determining the configuration condition may include the following steps:
step S301: providing a plurality of types of optional conditions to the client;
the multiple types of optional conditions provided to the client may be type I, type II, type III, and type VI as shown in fig. 4, where the optional conditions in type I are condition a, condition B, condition C, and condition D, the optional conditions in type II are condition a ', condition B', condition C ', condition D', condition E ', condition F', and condition G ', the optional conditions in type III are condition a ", condition B", and the optional conditions in type VI are condition a' ", condition B '", condition C' ", condition D '", condition E' ", condition F '", and condition G' ". The user can select the configuration conditions required by the user from the conditions.
Step S302: in response to receiving a plurality of configuration conditions selected from a plurality of types of selectable conditions sent by a client, determining a condition identifier of each configuration condition;
the condition identification means a feature number or the like that uniquely identifies the arrangement condition.
Step S303: correspondingly storing the condition identification of the configuration condition and the user information into a preset condition configuration table;
step S304: according to the user information, searching a condition identifier corresponding to the user information in a condition configuration table;
step S305: and determining configuration conditions according to the found condition identification.
The flexible configuration and management of the configuration conditions of different users are realized through the process.
In this embodiment of the present invention, as shown in fig. 5, the specific implementation of allocating resources included in the resource information may include:
step S501: calculating the resource value allocated to each user according to the resource allocation proportion included by the resource and the allocation strategy;
step S502: and writing the resource value allocated to each user into a preset resource list, and synchronously writing the resource value into a resource settlement system so as to provide the resource value for the user through the resource settlement system.
And under the condition of writing the resource value failed by the resource settlement system, periodically executing rewriting to the resource settlement system until the writing is successful.
The resource settlement system is realized through the process, and corresponding resource allocation results are allocated to different resource settlement systems.
In this embodiment of the present invention, the resource allocation method as described above in fig. 6 may further include the following steps:
step S601: storing the current analysis condition of the resource information into a resource detail table aiming at the condition that any condition component fails to be called;
step S602: and based on the current analysis condition stored in the resource detail table, calling the condition component at regular time and continuing to analyze the resource information.
The resource information which is not processed is processed by calling the condition component at regular time, so that the efficiency of resource processing failure is reduced, and the reliability of resource allocation is improved.
In this embodiment of the present invention, as shown in fig. 7, the resource allocation method may further include the following steps:
step S701: storing the distribution result into a preset resource queue, and broadcasting the distribution result;
step S702: determining resource information of an allocation result aiming at the allocation result with the secondary allocation condition;
step S703: and searching a configuration condition for the distribution result through the crosscut logic, executing a condition component corresponding to the calling configuration condition, and analyzing the resource information through the condition component.
Through the above process, the re-allocation of the allocated resources can be realized, that is, the resource allocation among the multi-level users can be realized. In addition, the resource allocation efficiency among multi-level users can be effectively improved by searching the allocation conditions for the allocation results through the crosscutting logic.
In order to clearly illustrate the implementation process of the resource allocation method, the invention takes the architecture for implementing the resource allocation method shown in fig. 8 as an example for allocating profits to merchants of different levels. Specifically, as shown in fig. 9, the resource allocation method may include the following steps:
step S901: providing a plurality of types of optional conditions to the client;
in order to enable the profit sharing by the merchant, the embodiment of the present invention is completed based on the architecture shown in fig. 8. As shown in fig. 8, the architecture for realizing profit distribution of merchants mainly includes an access layer, a core layer, a resource distribution device, a data access layer, a condition calculation layer, an offline center, and the like. The access layer is mainly prepared for accessing the core layer, and provides merchant access (the merchant access is mainly used for acquiring merchant information, such as interfacing with a client, interfacing with a system including the merchant information, and the like), condition editing (mainly editing conditions to increase corresponding conditions according to customer requirements), condition configuration (mainly selecting desired conditions to configure according to conditions given by the condition editing), and offline task configuration (mainly receiving some parameters configured by a user for offline tasks, such as execution times, cycle interval duration, and the like). The core layer mainly comprises scenes such as scene 1, scene 2, scene 3 and the like, business classes, rule classes, condition classes and the like, which are targeted for resource allocation, the condition model mainly targets some condition behaviors of user configuration conditions, the resource allocation device mainly calls the condition 1, the condition n and the like obtained by combining the condition model and the condition behaviors so that the method executor of the data access layer executes the conditions based on data such as resource information and the like provided by a data source, and when the execution result of the conditions indicates that the resource information meets the conditions, the resource allocation is calculated by the condition calculation layer, and then, an offline task or a compensation/extension mechanism and the like are executed based on offline configuration by the offline center, so that the resource allocation can be successfully completed as far as possible.
For example, the merchant access shown in fig. 8 may be used to receive merchant information sent by a user, add the merchant information/user information to an information table, generate a corresponding user identifier for the user information, and add the user identifier to the information table and a preset user queue respectively.
Step S902: in response to receiving a plurality of configuration conditions selected from a plurality of types of selectable conditions sent by a client, determining a condition identifier of each configuration condition;
this step may provide the client with multiple types of optional conditions through the condition configuration of the access stratum shown in fig. 8, and accept the selection of the user to select multiple configuration conditions from the multiple types of optional conditions. It should be noted that various conditions edited by the condition editing can be stored in the core layer as condition classes, rule classes, etc. for the invocation of the condition model and different scenarios.
Step S903: correspondingly storing the condition identification of the configuration condition and the user information into a preset condition configuration table;
step S904: acquiring a target user identifier from a user queue;
step S905: acquiring user information matched with the target user identification and resource information related to the user information from the information table;
step S906: according to the user information, searching a condition identifier corresponding to the user information in a condition configuration table;
step S907: determining configuration conditions according to the searched condition identification; executing step S908 for a plurality of first configuration conditions for which a dependency relationship exists among the plurality of configuration conditions; step S909 is executed for a plurality of second configuration conditions for which there is no dependency relationship among the plurality of configuration conditions;
step S908: sequentially calling first configuration condition components corresponding to the first configuration conditions according to the dependency relationship, analyzing the resource information related to the first configuration conditions in the resource information through the first configuration condition components, and executing step S910;
step S909: asynchronously calling second condition components corresponding to the second configuration conditions, and analyzing resource information related to the second configuration conditions in the resource information through the second condition components;
step S908 and step S909 are realized by the resource allocation apparatus. The condition model is mainly used for constructing configuration conditions based on a Spring application program framework; accordingly, the call condition component: the constructed configuration conditions are dynamically loaded into the initialized reusable components in the container. It should be noted that the first condition component and the second condition component are mainly used to distinguish whether a dependency exists, and do not limit the number or the sequence of the condition components.
It is worth noting that a compensation/extension mechanism can be implemented by offline task configuration: storing the current analysis condition of the resource information into a resource detail table aiming at the condition that any condition component fails to be called; and based on the current analysis condition stored in the resource detail table, calling the condition component at regular time and continuing to analyze the resource information.
Step S910: if the analyzed result indicates that the resource information meets a plurality of configuration conditions, calculating a resource value allocated to each user according to the resource allocation proportion included by the resource and the allocation strategy;
step S911: writing the resource value allocated to each user into a preset resource list, and synchronously writing the resource value into a resource settlement system so as to provide the resource value for the user through the resource settlement system;
and under the condition that the resource value failed to be written into the resource settlement system, periodically executing rewriting into the resource settlement system until the writing is successful. This process may also be implemented through offline task configuration.
Step S912: storing the distribution result into a preset resource queue, and broadcasting the distribution result;
step S913: determining resource information of an allocation result aiming at the allocation result with the secondary allocation condition;
step S914: searching configuration conditions for the distribution result through the crosscut logic, and executing step S908 for a plurality of first configuration conditions having a dependency relationship among the plurality of configuration conditions; step S909 is executed for a plurality of second configuration conditions for which there is no dependency relationship among the plurality of configuration conditions.
As shown in fig. 10, an embodiment of the present invention provides a resource allocation apparatus 1000, where the resource allocation apparatus 1000 may include: an acquisition module 1001, a lookup module 1002, a calling module 1003, and an assignment module 1004, wherein,
an obtaining module 1001, configured to obtain user information in a preconfigured information table and resource information related to the user information;
a searching module 1002, configured to search a plurality of configuration conditions required for resource allocation for user information;
a calling module 1003, configured to call, for each configuration condition, a condition component corresponding to the configuration condition, and analyze the resource information through the condition component;
an allocating module 1004, configured to allocate the resource included in the resource information based on the allocation policy included in the information table if the analyzed result indicates that the resource information satisfies the plurality of configuration conditions.
In this embodiment of the present invention, the invoking module 1003 is further configured to, for a plurality of first configuration conditions with dependency relationships among the plurality of configuration conditions, sequentially invoke first configuration condition components corresponding to the respective first configuration conditions according to the dependency relationships, and analyze, by using the first configuration condition components, resource information related to the first configuration conditions in the resource information; and asynchronously calling a second condition component corresponding to each second configuration condition aiming at a plurality of second configuration conditions without dependency relationship in the plurality of configuration conditions, and analyzing the resource information related to the second configuration conditions in the resource information through the second condition components.
In the embodiment of the present invention, the resource allocation apparatus 1000 may further include:
the configuration module 1005, in response to adding the 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;
an obtaining module 1001, further configured to obtain a target user identifier from a user queue; and acquiring the user information matched with the target user identification from the information table.
In this embodiment of the present invention, the invoking module 1003 is further configured to dynamically load the configuration condition built based on the Spring application framework into the reusable component initialized in the container to build the configuration condition.
In the embodiment of the present invention, the resource allocation apparatus 1000 may further include: a block 1006 is provided in which, among other things,
a providing module 1006, configured to provide multiple types of selectable conditions to the client;
the configuration module 1005 further determines a condition identifier of each configuration condition in response to receiving a plurality of configuration conditions selected from the plurality of types of selectable conditions sent by the client; correspondingly storing the condition identification of the configuration condition and the user information into a preset condition configuration table;
the searching module 1002 is further configured to search, according to the user information, a condition identifier corresponding to the user information in the condition configuration table; and determining configuration conditions according to the searched condition identification.
In this embodiment of the present invention, the allocating module 1004 is further configured to calculate a resource value allocated to each user according to a resource allocation ratio included in the resource and the allocation policy; and writing the resource value allocated to each user into a preset resource list, and synchronously writing the resource value into a resource settlement system so as to provide the resource settlement system for the user.
In this embodiment of the present invention, the allocating module 1004 is further configured to store the allocation result in a preset resource queue, and broadcast the allocation result; determining resource information of an allocation result aiming at the allocation result with the secondary allocation condition;
the searching module 1002 is further configured to search the allocation result for the configuration condition through the transecting logic.
In this embodiment of the present invention, the allocating module 1004 is further configured to, in a case that the resource value failed to be written into the resource accounting system, periodically perform rewriting into the resource accounting system until the writing is successful.
In this embodiment of the present invention, the invoking module 1003 is further configured to store the current analysis condition of the resource information into the resource detail table for the condition that any conditional component fails to invoke; and based on the current analysis condition stored in the resource detail table, calling the condition component at regular time and continuing to analyze the resource information.
Fig. 11 shows an exemplary system architecture 1100 to which a resource allocation method or a resource allocation apparatus of an embodiment of the present invention may be applied.
As shown in fig. 11, the system architecture 1100 may include terminal devices 1101, 1102, 1103, a network 1104, a resource allocation server 1105, a data source database 1106, and a resource settlement server 1107. The network 1104 is a medium to provide communication links between the terminal devices 1101, 1102, 1103 and the resource server 1105, between the resource server 1105 and the data source database 1106, and between the resource server 1105 and the resource settlement system 1107. Network 1104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 1101, 1102, 1103 to interact with the resource allocation server 1105 via the network 1104 to receive multiple types of optional conditions provided by the resource allocation server 1105 and to feed back the selected configuration conditions to the resource allocation server 1105, etc. Various messaging client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, etc. (examples only) may be installed on the terminal devices 1101, 1102, 1103.
The terminal devices 1101, 1102, 1103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The resource allocation server 1105 may be a server that provides various services, such as a background management server (for example only) that supports the combination of conditions selected by the user using the terminal devices 1101, 1102, 1103. The backend management server may analyze the resource information related to the user information in the data source database 1106 based on the condition combination, allocate resources provided by the data source database 1106 according to the analysis result, and send the resource allocation result (for example, the profit allocated by each merchant, the goods, and the like, just by way of example) to the resource settlement server 1107.
It should be noted that the resource allocation method provided by the embodiment of the present invention is generally executed by the server 1105, and accordingly, the resource allocation apparatus is generally disposed in the resource allocation server 1105.
It should be understood that the numbers of terminal devices, networks, resource allocation servers, data source databases, and resource settlement servers in fig. 11 are merely illustrative. There may be any number of terminal devices, networks, resource allocation servers, data source databases 1106, and resource accounting servers 1107 as needed for the implementation.
Reference is now made to fig. 12 (the numerals are numbered as needed) which illustrates a schematic block diagram of a computer system 1200 suitable for implementing a terminal device of an embodiment of the present invention. The terminal device shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 12, the computer system 1200 includes a Central Processing Unit (CPU)1201, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. In the RAM 1203, various programs and data necessary for the operation of the system 1200 are also stored. The CPU 1201, ROM 1202, and RAM 1203 are connected to each other by a bus 1204. An input/output (I/O) interface 1205 is also connected to bus 1204.
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 portion 1207 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 1208 including a hard disk and the like; and a communication section 1209 including a network interface card such as a LAN card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. A driver 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1209, and/or installed from the removable medium 1211. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 1201.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an acquisition module, a lookup module, a calling module, and an allocation module. The names of these units do not in some cases constitute a limitation to the module itself, and for example, the acquiring module may also be described as a "module that acquires user information in a preconfigured information table and resource information related to the user information".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: acquiring user information and resource information related to the user information in a pre-configured information table; searching a plurality of configuration conditions required by resource allocation for user information; calling a condition component corresponding to each configuration condition, and analyzing the resource information through the condition component; and if the analyzed result indicates that the resource information meets a plurality of configuration conditions, allocating the resources included in the resource information based on the allocation strategy included in the information table.
According to the technical scheme of the embodiment of the invention, the configuration conditions have corresponding condition components, namely, the condition components are used for decoupling the conditions required by resource allocation, so that a user can randomly combine the conditions to obtain a plurality of configuration conditions required by user information, and the condition components corresponding to the configuration conditions are called to analyze the resource information of the user, so that the decoupling of the user and the conditions is realized, the decoupling of the conditions is realized, the conditions can be dynamically configured, more user requirements are met, and the flexibility of resource allocation and the user experience are improved.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (12)

1. A method for resource allocation, comprising:
acquiring user information in a pre-configured information table and resource information related to the user information;
searching a plurality of configuration conditions required by resource allocation for the user information;
for each configuration condition, calling a condition component corresponding to the configuration condition, and analyzing the resource information through the condition component;
and if the analyzed result indicates that the resource information meets a plurality of configuration conditions, allocating the resources included in the resource information based on the allocation strategy included in the information table.
2. The method according to claim 1, wherein the invoking a condition component corresponding to the configuration condition, and analyzing the resource information by the condition component comprises:
for a plurality of first configuration conditions with dependency relationships among the plurality of configuration conditions, sequentially calling first configuration condition components corresponding to the first configuration conditions 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;
and for a plurality of second configuration conditions without dependency relationship in the plurality of configuration conditions, asynchronously calling a second condition component corresponding to each second configuration condition, and analyzing the resource information related to the second configuration condition in the resource information through the second condition component.
3. The method of claim 1, further comprising:
responding to the addition of user information to the information table, generating corresponding user identification for the user information, and respectively adding the user identification to the information table and a preset user queue;
acquiring a target user identifier from the user queue;
the acquiring of the user information in the preconfigured information table includes: and acquiring the user information matched with the target user identification from the information table.
4. The method of claim 1,
further comprising: constructing the configuration condition based on a Spring application program framework;
the calling of the condition component corresponding to the configuration condition comprises:
dynamically loading the constructed configuration conditions in initialized reusable components in a container.
5. The method of claim 1,
further comprising: providing a plurality of 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 configuration condition;
correspondingly storing the condition identification of the configuration condition and the user information into a preset condition configuration table;
the searching for a plurality of configuration conditions required for resource allocation for the user information includes: according to the user information, searching a condition identifier corresponding to the user information in the condition configuration table;
and determining configuration conditions according to the found condition identification.
6. The method according to any of claims 1 to 5, wherein said allocating the resources included in the resource information comprises:
calculating the value of the resource allocated to each user according to the resource allocation proportion included by the resource and the allocation strategy;
writing the resource value allocated to each user into a preset resource list, and synchronously writing the resource value into a resource settlement system so as to provide the resource value for the user through the resource settlement system.
7. The method of any of claims 1 to 5, further comprising:
storing the distribution result into a preset resource queue and broadcasting the distribution result;
determining resource information of an allocation result aiming at the allocation result with a secondary allocation condition;
and searching a configuration condition for the allocation result through a crosscut logic, executing a condition component corresponding to the configuration condition, and analyzing the resource information through the condition component.
8. The method of claim 6, further comprising:
and under the condition of writing the resource value failed by the resource settlement system, periodically executing rewriting to the resource settlement system until the writing is successful.
9. The method of claim 6, further comprising:
storing the current analysis condition of the resource information into the resource detail table aiming at the condition that any condition component fails to be called;
and based on the current analysis condition stored in the resource detail table, calling a condition component at regular time and continuously analyzing the resource information.
10. A resource allocation apparatus, comprising: an acquisition module, a search module, a calling module and an allocation module, wherein,
the acquisition module is used for acquiring user information in a preconfigured information table and resource information related to the user information;
the searching module is used for searching a plurality of configuration conditions required by resource allocation for the user information;
the calling module is used for calling a condition component corresponding to each configuration condition and analyzing the resource information through the condition component;
the allocation module is configured to allocate the resource included in the resource information based on an allocation policy included in the information table if the analyzed result indicates that the resource information satisfies the plurality of configuration conditions.
11. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-9.
12. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-9.
CN202111453853.7A 2021-12-01 2021-12-01 Resource allocation method and device Pending CN114169733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111453853.7A CN114169733A (en) 2021-12-01 2021-12-01 Resource allocation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111453853.7A CN114169733A (en) 2021-12-01 2021-12-01 Resource allocation method and device

Publications (1)

Publication Number Publication Date
CN114169733A true CN114169733A (en) 2022-03-11

Family

ID=80482172

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111453853.7A Pending CN114169733A (en) 2021-12-01 2021-12-01 Resource allocation method and device

Country Status (1)

Country Link
CN (1) CN114169733A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826964A (en) * 2022-04-11 2022-07-29 京东科技信息技术有限公司 Resource monitoring method, device and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114826964A (en) * 2022-04-11 2022-07-29 京东科技信息技术有限公司 Resource monitoring method, device and system
CN114826964B (en) * 2022-04-11 2024-04-05 京东科技信息技术有限公司 Resource monitoring method, device and system

Similar Documents

Publication Publication Date Title
US11762684B2 (en) Distributed task execution
CN112651691A (en) Warehouse inventory processing method and device based on network sales order and electronic equipment
CN110706093A (en) Accounting processing method and device
CN112835904A (en) Data processing method and data processing device
CN110673959A (en) System, method and apparatus for processing tasks
CN113760488A (en) Method, device, equipment and computer readable medium for scheduling task
CN115170321A (en) Method and device for processing batch transaction data
CN109102200B (en) Timed task processing method and device
CN114169733A (en) Resource allocation method and device
CN112947919A (en) Method and device for constructing service model and processing service request
CN104954496A (en) Cloud resource allocation method and device
CN112102099B (en) Policy data processing method and device, electronic equipment and storage medium
WO2021068585A1 (en) Resource processing method and apparatus, electronic device, and medium
CN115344359A (en) Computing power resource allocation method, device, computer readable storage medium and equipment
CN113741888A (en) Service processing method and device
CN109840073B (en) Method and device for realizing business process
CN110033145B (en) Financial sharing job order separating method and device, equipment and storage medium
CN112799797A (en) Task management method and device
CN110955599A (en) Object creation method and device, electronic equipment and computer-readable storage medium
CN111831868A (en) Method and apparatus for financial product configuration
CN111161067A (en) Method and device for determining transaction route
CN115484149B (en) Network switching method, network switching device, electronic equipment and storage medium
CN113222332B (en) Bidding process configuration method and device, electronic equipment and storage medium
US11977922B2 (en) Resource reuse for pipeline workloads
CN111596941B (en) Application updating method, device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination