CN113065887A - Resource processing method, resource processing device, computer equipment and storage medium - Google Patents

Resource processing method, resource processing device, computer equipment and storage medium Download PDF

Info

Publication number
CN113065887A
CN113065887A CN202110249295.6A CN202110249295A CN113065887A CN 113065887 A CN113065887 A CN 113065887A CN 202110249295 A CN202110249295 A CN 202110249295A CN 113065887 A CN113065887 A CN 113065887A
Authority
CN
China
Prior art keywords
resource
current
current resource
type
candidate
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.)
Granted
Application number
CN202110249295.6A
Other languages
Chinese (zh)
Other versions
CN113065887B (en
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.)
Nanjing Suning Software Technology Co ltd
Original Assignee
Nanjing Suning Software Technology 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 Nanjing Suning Software Technology Co ltd filed Critical Nanjing Suning Software Technology Co ltd
Priority to CN202110249295.6A priority Critical patent/CN113065887B/en
Publication of CN113065887A publication Critical patent/CN113065887A/en
Priority to CA3151214A priority patent/CA3151214A1/en
Application granted granted Critical
Publication of CN113065887B publication Critical patent/CN113065887B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0207Discounts or incentives, e.g. coupons or rebates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Software Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a resource processing method, a resource processing device, computer equipment and a storage medium. The method comprises the following steps: receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type; determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type; searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type; acquiring a database table name of a resource database table where a target business resource field is located; and according to the target service resource field and the database table name, splicing the obtained resource control condition, determining a target resource limit matched with the resource control condition from a preset candidate resource limit, and returning the target resource limit to the initiating device corresponding to the current resource control request. By adopting the method, resources can be effectively controlled.

Description

Resource processing method, resource processing device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a resource processing method and apparatus, a computer device, and a storage medium.
Background
At present, for retail enterprises, promotion of sales in a sales promotion mode is the most common operation means, so that the stickiness of users can be guaranteed, great help is provided for sales promotion, development of the enterprises is facilitated, and meanwhile, the quantity and strength of activities are guaranteed to be in a controllable range, and profits of groups are guaranteed.
However, the current management and control means of active resources mainly adopts a single resource pool limit control system. For example, when a certain activity is initiated, whether the resources required by the activity are enough or not is checked according to the type and the attribute of the activity, if the resources are not enough, the activity initiation is refused, and in a single-dimensional resource control system, the control action is ended. This approach is too single to effectively manage resources.
Disclosure of Invention
Therefore, it is necessary to provide a resource processing method, a resource processing apparatus, a computer device, and a storage medium for solving the above technical problems, so that multi-level and multi-dimensional control of resources can be achieved, resources can be effectively controlled, and diversity of resource usage can be improved.
A method of resource processing, the method comprising:
receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type;
determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type;
searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type;
acquiring a database table name of a resource database table where a target business resource field is located;
splicing according to the target service resource field and the database table name to obtain a resource control condition;
and determining a target resource limit matched with the resource control condition from the preset candidate resource limit, and returning the target resource limit to the initiating equipment corresponding to the current resource control request.
In one embodiment, the resource processing method further includes: acquiring a candidate resource type, a candidate resource attribute and a candidate resource dimension type; acquiring a candidate resource allocation rule; and establishing an incidence relation among the candidate resource type, the candidate resource attribute, the candidate resource dimension type and the candidate resource configuration rule.
In one embodiment, after determining the current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type, the method further includes: acquiring a related resource dimension type corresponding to the current resource dimension type; and searching a matched target service resource field from the current resource configuration rule according to the associated resource dimension type and the current resource type.
In one embodiment, searching for a matched target service resource field from a current resource configuration rule according to a current resource control type and a current resource dimension type includes: acquiring a current resource allocation rule, wherein the current resource allocation rule comprises a candidate resource control type, an association relation between a candidate resource dimension type and a corresponding candidate service resource field; and determining a target service resource field corresponding to the current resource control type and the current resource dimension type from the current resource configuration rule according to the association relationship.
In one embodiment, determining the current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type includes: determining a matched intermediate resource allocation rule from a cache resource allocation rule set according to the current resource type, the current resource attribute and the current resource dimension type; and screening the intermediate resource allocation rule according to the preset service field to obtain the screened current resource allocation rule.
In one embodiment, the determining the target resource limit matched with the resource control condition from the preset candidate resource limit includes: acquiring resource control details corresponding to the resource control conditions; and performing resource control on the preset candidate resource limit according to the resource control details to obtain the target resource limit.
In one embodiment, the current resource control request is any one of a current resource query request, a current resource freezing request, a current resource recharging request, and a current resource clearing request.
An apparatus for resource handling, the apparatus comprising:
a resource control request receiving module, configured to receive a current resource control request, where the current resource control request includes a current resource control type, a current resource attribute, and a current resource dimension type;
the configuration rule determining module is used for determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type;
the target service resource field searching module is used for searching the matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type;
the database table name acquisition module is used for acquiring the database table name of the resource database table where the target service resource field is located;
the resource control condition splicing module is used for splicing the target service resource field and the database table name to obtain a resource control condition;
and the resource limit acquisition module is used for determining a target resource limit matched with the resource control condition from the preset candidate resource limit and returning the target resource limit to the initiating equipment corresponding to the current resource control request.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type;
determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type;
searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type;
acquiring a database table name of a resource database table where a target business resource field is located;
splicing according to the target service resource field and the database table name to obtain a resource control condition;
and determining a target resource limit matched with the resource control condition from the preset candidate resource limit, and returning the target resource limit to the initiating equipment corresponding to the current resource control request.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type;
determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type;
searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type;
acquiring a database table name of a resource database table where a target business resource field is located;
splicing according to the target service resource field and the database table name to obtain a resource control condition;
and determining a target resource limit matched with the resource control condition from the preset candidate resource limit, and returning the target resource limit to the initiating equipment corresponding to the current resource control request.
According to the resource processing method, the resource processing device, the computer equipment and the storage medium, the corresponding current resource configuration rule is obtained through the current resource type, the current resource attribute and the current resource dimension type in the current resource control request, the target service resource field is searched from the current resource configuration rule, the resource control condition is obtained through splicing of the target service resource field and the database table name, and the target resource limit is determined from the preset candidate resource limit according to the resource control condition. Through the resource type, the resource attribute and the resource dimension type, multi-level and multi-dimension control of the resource is realized, the resource is effectively controlled and controlled, and the diversity of resource use is improved.
Drawings
FIG. 1 is a diagram of an application environment of a resource handling method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for resource handling in one embodiment;
FIG. 3 is a flow diagram illustrating a method for resource handling in one embodiment;
FIG. 3A is a schematic diagram illustrating the association establishment step in one embodiment;
FIG. 4 is a flow diagram of a resource handling method in another embodiment;
FIG. 5 is a flowchart illustrating a step of searching for a target business resource field in one embodiment;
FIG. 6 is a flowchart illustrating the current resource allocation rule determining step in one embodiment;
FIG. 7 is a flowchart illustrating the step of determining the quota of the target resource in one embodiment;
FIG. 8 is a flowchart illustrating a resource processing method corresponding to a current resource query request in one embodiment;
FIG. 9 is a schematic diagram illustrating a current resource query request and a current resource freeze request according to an embodiment;
FIG. 10 is a schematic diagram of an aggregation of order information in one embodiment;
FIG. 11 is a schematic diagram illustrating a current resource refill request in accordance with an embodiment;
FIG. 12 is a schematic diagram illustrating a correspondence of a current resource clearing request in one embodiment;
FIG. 13 is a block diagram showing the structure of a resource processing apparatus according to one embodiment;
FIG. 14 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The resource processing method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
Specifically, the terminal 102 initiates a current resource control request to the server 104, where the current resource control request includes a current resource control type, a current resource attribute, and a current resource dimension type. After receiving the current resource control request, the server 104 determines a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type, searches a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type, obtains a database table name of a resource database table where the target service resource field is located, obtains a resource control condition according to splicing of the target service resource field and the database table name, determines a target resource limit matched with the resource control condition from a preset candidate resource limit, and returns the target resource limit to the terminal 102.
In one embodiment, as shown in fig. 2, a resource processing method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step 202, receiving a current resource control request, where the current resource control request includes a current resource control type, a current resource attribute, and a current resource dimension type.
The current resource control request is used for requesting to control the current resource, the resource can be an active resource limit, and the current resource control request can be determined according to the type of the current activity. For example, if the type of activity currently active is a query, then the current resource control request is a current resource query request. The current resource control request can be generated by operation triggering of a relevant application page of the terminal, and is sent to the server.
The current resource control request includes a current resource control type, a current resource attribute, and a current resource dimension type, where the current resource control type refers to a request type corresponding to the entire current resource control request, for example, if the current resource control request is a current resource query request, the current resource control type is the current resource query type, the current resource type refers to a type of a current resource controlled by the current resource control request, the current resource attribute is all information related to the current resource, and the current resource dimension type refers to dimension information controlled by the current resource.
And 204, determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type.
The current resource allocation rule is a resource allocation rule corresponding to the current resource control request, and the current resource allocation rule can be determined according to the current resource type, the current resource attribute and the current resource dimension type. The association relationship between the resource type, the resource attribute, the resource dimension type and the corresponding resource configuration rule can be pre-established. Specifically, an association relationship is established according to actual business requirements, product requirements, or actual application scenarios, and after the association relationship is established, a current resource configuration rule corresponding to a current resource type, a current resource attribute, and a current resource dimension type may be determined according to the association relationship. The resource allocation rule can be configured in advance according to the resource type, the resource attribute, the resource dimension type, the actual service requirement and the like.
And step 206, searching matched target service resource fields from the current resource configuration rule according to the current resource control type and the current resource dimension type.
The target service resource field is a service resource field corresponding to the current resource control type and the current resource dimension type in the current resource configuration rule, and the service resource field is a field related to the service resource. The current resource configuration rule may include each service resource field, and the service resource field has a corresponding relationship with the resource control type and the resource dimension type. Therefore, after the current resource control type and the current resource dimension type are obtained, the matched target business resource field can be searched from the current resource configuration rule according to the corresponding relation
And step 208, acquiring the database table name of the resource database table in which the target service resource field is located.
The database table name is the name of the resource database table to which the target service resource field belongs, the service resource field can be stored in the corresponding resource database table, and each resource database table has a corresponding database table name. Therefore, after the target service resource field is determined, the resource database table to which the target service resource field belongs can be searched according to the target service resource field, and the database table name corresponding to the resource database table is obtained.
And step 210, splicing the target service resource field and the database table name to obtain a resource control condition.
The resource control condition is a condition for obtaining a final resource quota, and can be obtained by synthesizing a target service resource field and a database table name. Specifically, the resource control condition may be formed by splicing the target service resource field and the database table name. In fact, the resource control condition may be a processing logic through which the target resource quota may be queried.
Step 212, determining a target resource limit matched with the resource control condition from the preset candidate resource limit, and returning the target resource limit to the initiating device corresponding to the current resource control request.
The target resource limit is a resource limit corresponding to the current resource, and whether to initiate a corresponding activity is determined according to the target resource limit. Specifically, after the resource control condition is obtained, the matched target resource limit can be searched from the preset candidate resource limit according to the resource control condition. For example, if the resource control condition is a resource query condition, the resource query condition includes resource dimension information, and the resource dimension information includes a resource dimension type, so that the target resource limit can be queried from a preset resource limit according to the resource query condition. The preset candidate resource limit is updated, and the preset candidate resource limit can be updated according to the current resource control type of the current resource control request, for example, the current resource control request is a current resource freezing request, so that the finally generated resource control condition carries the resource freezing details, and therefore, the corresponding resource limit can be frozen from the preset candidate resource limit according to the current resource control request, and the remaining resource limit is determined as the target resource limit. And finally, returning the target resource limit to the initiating equipment corresponding to the current resource control request through network communication.
In the resource processing method, the corresponding current resource allocation rule is obtained through the current resource type, the current resource attribute and the current resource dimension type in the current resource control request, the target service resource field is searched from the current resource allocation rule, the resource control condition is obtained through splicing the target service resource field and the database table name, and the target resource limit is determined from the preset candidate resource limit according to the resource control condition. Through the resource type, the resource attribute and the resource dimension type, multi-level and multi-dimension control of the resource is realized, the resource is effectively controlled and controlled, and the diversity of resource use is improved.
In one embodiment, as shown in fig. 3, the resource processing method further includes:
step 302, obtaining a candidate resource type, a candidate resource attribute and a candidate resource dimension type.
Step 304, obtaining a candidate resource allocation rule.
Step 306, establishing the association relationship among the candidate resource type, the candidate resource attribute, the candidate resource dimension type and the candidate resource configuration rule.
The method includes the steps of determining a current resource configuration rule according to a current resource type, a current resource attribute and a current resource dimension type, and needing to establish an association relationship between the current resource configuration rule and the current resource dimension type, specifically, obtaining a candidate resource type, a candidate resource attribute and a candidate resource dimension type, wherein the candidate resource type, the candidate resource attribute and the candidate resource dimension type can be obtained according to actual business requirements or product requirements and application scenes, and meanwhile, corresponding candidate resource configuration rules are obtained, and the candidate configuration rules can also be used for determining configuration rules corresponding to the resource type, the resource attribute and the resource dimension type according to the actual business requirements, the product requirements or the actual application scenes. And finally, establishing an association relation among the candidate resource type, the candidate resource attribute, the candidate resource dimension type and the candidate resource configuration rule, so that the current resource type, the current resource attribute and the current resource dimension type can be obtained according to the association relation to determine the current resource configuration rule.
In an embodiment, as shown in fig. 3A, fig. 3A shows a schematic diagram of establishment of an association relationship between a candidate resource type, a candidate resource attribute, a candidate resource dimension type, and a candidate resource configuration rule in an embodiment, and the corresponding configuration is implemented by each module, including the following steps:
1) and defining a candidate resource type, a candidate resource attribute and a candidate resource dimension type.
2) Candidate resource dimension types and related field information are defined.
3) Candidate resource balance table names are defined, along with the included field information.
4) And adding a data table corresponding to the resource pool in the data storage layer (Mysq l).
5) When the resource is checked and deducted, the corresponding relation among the candidate resource type, the candidate resource attribute and the candidate resource dimension type is designated (here, a plurality of dimension types can be configured and a hierarchical relation can be defined).
6) The rule information is stored in a cache, and the control module performs resource control by reading the cache rule.
7) The resource control module need not be changed.
In an embodiment, as shown in fig. 4, after determining the current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type, the method further includes:
step 402, obtaining a related resource dimension type corresponding to the current resource dimension type.
Step 404, searching a matched target service resource field from the current resource configuration rule according to the associated resource dimension type and the current resource type.
Each resource dimension type can be associated with a corresponding associated resource dimension type, and the associated resource dimension type can be a similar resource dimension type of the resource dimension type and can also be determined according to a specific actual service requirement or an actual application scene. Specifically, all associated resource dimension types of the current resource dimension type are obtained, and the matched target service resource field is searched from the current resource configuration rule by combining the associated resource dimension types and the current resource type. The relationship between the resource dimension type and the resource type and the service resource field can also be pre-established in the current resource configuration rule, so that the target service resource field can be determined according to the relationship.
In one embodiment, as shown in fig. 5, finding a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type includes:
step 502, obtaining a current resource allocation rule, where the current resource allocation rule includes an association relationship between a candidate resource control type, a candidate resource dimension type, and a corresponding candidate service resource field.
Step 504, determining the target service resource field corresponding to the current resource control type and the current resource dimension type from the current resource configuration rule according to the association relationship.
The current resource configuration rule includes an association relationship between a candidate resource control type, a candidate resource dimension type and a corresponding candidate service resource field, that is, the candidate resource control type, the candidate resource dimension type and the corresponding candidate service resource field are bound. Therefore, the matched target service resource field is searched from the current resource configuration rule according to the current resource control type and the current resource dimension type, and the target service resource field corresponding to the current resource control type and the current resource dimension type can be searched according to the association relationship.
In one embodiment, as shown in fig. 6, determining the current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type includes:
step 602, determining a matched intermediate resource allocation rule from the cached resource allocation rule set according to the current resource type, the current resource attribute and the current resource dimension type.
And step 604, screening the intermediate resource allocation rule according to the preset service field to obtain the screened current resource allocation rule.
The matched intermediate resource allocation rule can be found from the cache resource allocation rule set according to the current resource type, the current resource attribute and the current resource dimension type. The relation between the candidate resource type, the resource attribute, the resource dimension type and the resource configuration rule can be established according to the actual service requirement, the product requirement or the actual application scene, so that after the relation is established, the matched intermediate resource configuration rule can be searched according to the current resource type, the current resource attribute and the current resource dimension type.
Further, a preset service field is obtained, where the preset service field is a field related to a specific service and may be determined in advance according to an actual service requirement, a product requirement, or an actual application scenario. The preset service field is, for example, a company or a cause department, and the intermediate resource allocation rule is screened according to the preset service field to obtain the screened current resource allocation rule. That is, the preset service field is a condition for screening the resource allocation rule, and the appropriate current resource allocation rule is obtained through two times of screening of the resource allocation rule.
In one embodiment, as shown in fig. 7, the determining the target resource limit matching the resource control condition from the preset candidate resource limit includes:
step 702, obtaining a resource control detail corresponding to the resource control condition.
Step 704, performing resource control on the preset candidate resource limit according to the resource control details to obtain the target resource limit.
The resource control details here are resource control detailed information corresponding to the resource control conditions, and may include a resource control amount, a control resource name, and the like. When the resource control condition is synthesized, a resource control detail is included. Therefore, the resource control detail corresponding to the resource control condition is obtained, and the resource control is performed on the preset candidate resource limit according to the resource control detail to obtain the target resource limit. For example, the resource control condition is a resource freezing condition, a resource freezing amount corresponding to the resource freezing condition is obtained, resource freezing is performed on the preset candidate resource limit according to the resource freezing condition, the resource freezing amount can be specifically a resource freezing amount, and the remaining resource limit is determined as a target resource limit.
In one embodiment, the current resource control request is any one of a current resource query request, a current resource freezing request, a current resource recharging request, and a current resource clearing request.
The current resource control request can be any one of a current resource query request, a current resource freezing request, a current resource recharging request and a current resource clearing request, wherein the current resource query request is used for requesting to query a target resource quota corresponding to a current resource dimension type, and the current resource freezing request is used for requesting to freeze a resource quota corresponding to the current resource dimension type to obtain the target resource quota after being frozen. Similarly, the current resource clearing request is used to request clearing of all resource quota corresponding to the current resource dimension type.
In an embodiment, as shown in fig. 8, fig. 8 is a flowchart illustrating a resource processing method corresponding to a current resource query request in an embodiment, where an activity initiator initiates the current resource query request, the current resource query request includes a resource type, a resource attribute, and a dimension type, a resource control interface performs compliance check, acquires a corresponding rule from a cache according to the resource type, the resource attribute, and the dimension type, and further performs screening on the acquired rule according to a preset service field, such as a company department or a cause department. And then judging whether the resources need to be checked according to the current dimension or the associated dimension according to the rule data and the corresponding checking type, inquiring the field information forming the dimension, the corresponding database table name and the balance field name according to the dimension type, splicing and caching (red i s) inquired key values according to the acquired dimension field, and splicing and querying the resource inquiry statement according to the acquired database table, balance field and dimension field, inquiring the cache and the database, and returning the target resource limit to the activity initiator.
In an embodiment, as shown in fig. 9, fig. 9 is a schematic diagram illustrating a principle that a current resource query request and a current resource freezing request in one embodiment correspond to each other, where a promotion center sends the current resource query request through a query interface, reads a resource check rule configuration table according to the current resource query request, finds a corresponding configuration rule according to a field transmitted by the query interface, performs corresponding logic processing, and queries an available balance table. Similarly, the promotion center sends a current resource freezing request through the freezing interface, reads the resource check rule configuration table according to the current resource freezing request, finds the corresponding configuration rule according to the field transmitted by the query interface, performs corresponding logic processing, queries the available balance table, freezes if the condition is met, freezes the data into the freezing detail table, otherwise, returns failure.
In an embodiment, as shown in fig. 10, fig. 10 is a schematic diagram illustrating the principle of order information summarization in an embodiment, where a promotion center performs interface processing through a data interface of basic information and promotion activities and completes warehousing of a basic information table and a temporary data table of promotion activities, where the basic information table and the temporary data table of promotion activities are associated with a timing task, the timing task processes the data table of promotion activities, invokes an oms service (order management service), queries order information, warehouses an order table, and changes data successfully entered into the order table into a mark that can be summarized. And further, checking data by the activity basic information table and the promotion activity data temporary table, warehousing the data in the order table if the data are in accordance with the requirement, simultaneously summarizing, processing the promotion activity data table by a timing task, reading a summary rule configuration table, inquiring a corresponding rule according to the promotion activity data, processing, and sending the processed data into a sales summary table.
In an embodiment, as shown in fig. 11, fig. 11 shows a schematic diagram of a principle corresponding to a current resource recharging request in an embodiment, after a process approval of a water reservoir expenditure, recharging, and allocation process is completed, a detailed schedule of a flushing and allocating support is performed to perform a timing task process, a recharging rule configuration table is read, a corresponding rule is found according to data of a receiving detailed schedule to perform a process, the process is summarized to a company dimension table, the receiving data is transmitted under R3, the receiving detailed schedule is obtained through a rsf interface, a platform where the receiving detailed schedule is located also includes a timing task process, specifically, a recharging rule configuration table is read, a corresponding rule is found according to data of the receiving detailed schedule to perform a process, and the process is summarized to the company dimension table.
In an embodiment, as shown in fig. 12, fig. 12 is a schematic diagram illustrating a principle corresponding to a current resource clearing request in an embodiment, a company dimension table and a freezing detail table are both associated with a timing task process, the timing task process corresponding to the company dimension table is to read an available calculation rule, query a corresponding configuration rule according to company dimension table data, perform logic processing, and enter an available balance table after the timing task is completed. And the timing task processing corresponding to the freezing list is to read the available calculation rule, inquire the corresponding configuration rule according to the freezing list data, perform logic processing, and enter the available balance list after the timing task is completed.
In a specific embodiment, a resource processing method is provided, which specifically includes the following steps:
1. and acquiring the candidate resource type, the candidate resource attribute and the candidate resource dimension type.
2. And acquiring a candidate resource allocation rule.
3. And establishing an incidence relation among the candidate resource type, the candidate resource attribute, the candidate resource dimension type and the candidate resource configuration rule.
4. Receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type, and is any one of a current resource query request, a current resource freezing request, a current resource recharging request and a current resource clearing request.
5. And determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type.
And 5-1, determining a matched intermediate resource allocation rule from the cache resource allocation rule set according to the current resource type, the current resource attribute and the current resource dimension type.
And 5-2, screening the intermediate resource allocation rule according to the preset service field to obtain the screened current resource allocation rule.
6. And acquiring the associated resource dimension type corresponding to the current resource dimension type.
7. And searching a matched target service resource field from the current resource configuration rule according to the associated resource dimension type and the current resource type.
8. And searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type.
8-1, obtaining a current resource allocation rule, wherein the current resource allocation rule comprises a candidate resource control type, an association relation between a candidate resource dimension type and a corresponding candidate service resource field.
And 8-2, determining a target service resource field corresponding to the current resource control type and the current resource dimension type from the current resource configuration rule according to the association relationship.
9. And acquiring the database table name of the resource database table where the target service resource field is located.
10. And splicing the target service resource field and the database table name to obtain a resource control condition.
11. And determining a target resource limit matched with the resource control condition from the preset candidate resource limit, and returning the target resource limit to the initiating equipment corresponding to the current resource control request.
11-1, acquiring resource control details corresponding to the resource control conditions.
11-2, performing resource control on the preset candidate resource limit according to the resource control details to obtain a target resource limit. It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in the above-described flowcharts may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or the stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 13, there is provided a resource processing apparatus 1300, including: a resource control request receiving module 1302, a configuration rule determining module 1304, a target business resource field searching module 1306, a database table name obtaining module 1308, a resource control condition splicing module 1310 and a resource limit obtaining module 1312, wherein:
a resource control request receiving module 1302, configured to receive a current resource control request, where the current resource control request includes a current resource control type, a current resource attribute, and a current resource dimension type.
A configuration rule determining module 1304, configured to determine a current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type.
And a target service resource field searching module 1306, configured to search a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type.
A database table name obtaining module 1308, configured to obtain a database table name of the resource database table where the target service resource field is located.
And a resource control condition splicing module 1310, configured to splice the target service resource field and the database table name to obtain a resource control condition.
The resource limit obtaining module 1312 is configured to determine a target resource limit matching the resource control condition from the preset candidate resource limit, and return the target resource limit to the initiating device corresponding to the current resource control request.
In one embodiment, the resource processing apparatus 1300 obtains the candidate resource type, the candidate resource attribute, and the candidate resource dimension type, obtains the candidate resource allocation rule, and establishes the association relationship between the candidate resource type, the candidate resource attribute, and the candidate resource dimension type and the candidate resource allocation rule.
In an embodiment, the resource processing apparatus 1300 obtains an associated resource dimension type corresponding to the current resource dimension type, and searches for a matched target service resource field from the current resource configuration rule according to the associated resource dimension type and the current resource type.
In one embodiment, the target service resource field searching module 1306 obtains a current resource configuration rule, where the current resource configuration rule includes a candidate resource control type, an association relationship between a candidate resource dimension type and a corresponding candidate service resource field, and determines, according to the association relationship, a target service resource field corresponding to the current resource control type and the current resource dimension type from the current resource configuration rule.
In an embodiment, the configuration rule determining module 1304 determines a matched intermediate resource configuration rule from the cached resource configuration rule set according to the current resource type, the current resource attribute, and the current resource dimension type, and filters the intermediate resource configuration rule according to a preset service field to obtain a filtered current resource configuration rule.
In one embodiment, the resource limit obtaining module 1312 obtains a resource control detail corresponding to the resource control condition, and performs resource control on the preset candidate resource limit according to the resource control detail to obtain the target resource limit.
In one embodiment, the current resource control request is any one of a current resource query request, a current resource freezing request, a current resource recharging request, and a current resource clearing request. For the specific limitation of the resource processing device, reference may be made to the above limitation of the resource processing method, which is not described herein again. The modules in the resource processing device can be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 14. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing resource allocation rules. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a resource handling method.
Those skilled in the art will appreciate that the architecture shown in fig. 14 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type, determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type, searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type, obtaining a database table name of a resource database table where the target service resource field is located, splicing the target service resource field and the database table name to obtain a resource control condition, determining a target resource quota matched with the resource control condition from a preset candidate resource quota, and returning the target resource quota to initiating equipment corresponding to the current resource control request.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a candidate resource type, a candidate resource attribute and a candidate resource dimension type, obtaining a candidate resource configuration rule, and establishing an association relation among the candidate resource type, the candidate resource attribute, the candidate resource dimension type and the candidate resource configuration rule.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring the associated resource dimension type corresponding to the current resource dimension type, and searching the matched target service resource field from the current resource configuration rule according to the associated resource dimension type and the current resource type.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring a current resource allocation rule, wherein the current resource allocation rule comprises a candidate resource control type, an association relation between a candidate resource dimension type and a corresponding candidate service resource field, and determining a target service resource field corresponding to the current resource control type and the current resource dimension type from the current resource allocation rule according to the association relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and determining a matched intermediate resource allocation rule from the cache resource allocation rule set according to the current resource type, the current resource attribute and the current resource dimension type, and screening the intermediate resource allocation rule according to a preset service field to obtain the screened current resource allocation rule.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring a resource control detail corresponding to the resource control condition, and performing resource control on the preset candidate resource limit according to the resource control detail to obtain a target resource limit.
In one embodiment, the current resource control request is any one of a current resource query request, a current resource freezing request, a current resource recharging request, and a current resource clearing request.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type, determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type, searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type, obtaining a database table name of a resource database table where the target service resource field is located, splicing the target service resource field and the database table name to obtain a resource control condition, determining a target resource quota matched with the resource control condition from a preset candidate resource quota, and returning the target resource quota to initiating equipment corresponding to the current resource control request.
In one embodiment, the processor, when executing the computer program, further performs the steps of: the method comprises the steps of obtaining a candidate resource type, a candidate resource attribute and a candidate resource dimension type, obtaining a candidate resource configuration rule, and establishing an association relation among the candidate resource type, the candidate resource attribute, the candidate resource dimension type and the candidate resource configuration rule.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring the associated resource dimension type corresponding to the current resource dimension type, and searching the matched target service resource field from the current resource configuration rule according to the associated resource dimension type and the current resource type.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring a current resource allocation rule, wherein the current resource allocation rule comprises a candidate resource control type, an association relation between a candidate resource dimension type and a corresponding candidate service resource field, and determining a target service resource field corresponding to the current resource control type and the current resource dimension type from the current resource allocation rule according to the association relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and determining a matched intermediate resource allocation rule from the cache resource allocation rule set according to the current resource type, the current resource attribute and the current resource dimension type, and screening the intermediate resource allocation rule according to a preset service field to obtain the screened current resource allocation rule.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring a resource control detail corresponding to the resource control condition, and performing resource control on the preset candidate resource limit according to the resource control detail to obtain a target resource limit.
In one embodiment, the current resource control request is any one of a current resource query request, a current resource freezing request, a current resource recharging request, and a current resource clearing request.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synch Lnk DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bused dynamic RAM (DRDRAM), and bused dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of resource processing, the method comprising:
receiving a current resource control request, wherein the current resource control request comprises a current resource control type, a current resource attribute and a current resource dimension type;
determining a current resource configuration rule according to the current resource type, the current resource attribute and the current resource dimension type;
searching a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type;
acquiring a database table name of a resource database table where the target service resource field is located;
splicing according to the target business resource field and the database name to obtain a resource control condition;
and determining the target resource limit matched with the resource control condition from a preset candidate resource limit, and returning the target resource limit to the initiating device corresponding to the current resource control request.
2. The method of claim 1, further comprising:
acquiring a candidate resource type, a candidate resource attribute and a candidate resource dimension type;
acquiring a candidate resource allocation rule;
and establishing an incidence relation among the candidate resource type, the candidate resource attribute, the candidate resource dimension type and the candidate resource configuration rule.
3. The method of claim 1, wherein after determining a current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type, the method further comprises:
acquiring a related resource dimension type corresponding to the current resource dimension type;
and searching a matched target service resource field from the current resource configuration rule according to the associated resource dimension type and the current resource type.
4. The method of claim 1, wherein the searching for a matching target business resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type comprises:
acquiring a current resource allocation rule, wherein the current resource allocation rule comprises a candidate resource control type, an association relation between a candidate resource dimension type and a corresponding candidate service resource field;
and determining the target service resource fields corresponding to the current resource control type and the current resource dimension type from a current resource configuration rule according to the association relationship.
5. The method of claim 1, wherein determining a current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type comprises:
determining a matched intermediate resource allocation rule from a cache resource allocation rule set according to the current resource type, the current resource attribute and the current resource dimension type;
and screening the intermediate resource allocation rule according to a preset service field to obtain a screened current resource allocation rule.
6. The method of claim 1, wherein the determining the target resource quota matching the resource control condition from a preset candidate resource quota comprises:
acquiring resource control details corresponding to the resource control conditions;
and performing resource control on the preset candidate resource limit according to the resource control details to obtain a target resource limit.
7. The method according to claim 1, wherein the current resource control request is any one of a current resource query request, a current resource freezing request, a current resource recharging request, and a current resource clearing request.
8. An apparatus for resource handling, the apparatus comprising:
a resource control request receiving module, configured to receive a current resource control request, where the current resource control request includes a current resource control type, a current resource attribute, and a current resource dimension type;
a configuration rule determining module, configured to determine a current resource configuration rule according to the current resource type, the current resource attribute, and the current resource dimension type;
a target service resource field searching module, configured to search a matched target service resource field from the current resource configuration rule according to the current resource control type and the current resource dimension type;
the database table name acquisition module is used for acquiring the database table name of the resource database table where the target service resource field is located;
the resource control condition splicing module is used for splicing the target service resource field and the database name to obtain a resource control condition;
and the resource limit acquisition module is used for determining the target resource limit matched with the resource control condition from a preset candidate resource limit and returning the target resource limit to the initiating equipment corresponding to the current resource control request.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202110249295.6A 2021-03-08 2021-03-08 Resource processing method, resource processing device, computer equipment and storage medium Active CN113065887B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110249295.6A CN113065887B (en) 2021-03-08 2021-03-08 Resource processing method, resource processing device, computer equipment and storage medium
CA3151214A CA3151214A1 (en) 2021-03-08 2022-03-07 Resource processing method, device. computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110249295.6A CN113065887B (en) 2021-03-08 2021-03-08 Resource processing method, resource processing device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113065887A true CN113065887A (en) 2021-07-02
CN113065887B CN113065887B (en) 2022-12-23

Family

ID=76559925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110249295.6A Active CN113065887B (en) 2021-03-08 2021-03-08 Resource processing method, resource processing device, computer equipment and storage medium

Country Status (2)

Country Link
CN (1) CN113065887B (en)
CA (1) CA3151214A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113610558A (en) * 2021-07-12 2021-11-05 北京达佳互联信息技术有限公司 Resource distribution method and device, electronic equipment and storage medium
CN113806698A (en) * 2021-09-06 2021-12-17 深圳云之家网络有限公司 Application resource control method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008207A (en) * 2019-11-22 2020-04-14 口碑(上海)信息技术有限公司 Resource data processing method, device and equipment
CN111104222A (en) * 2019-12-16 2020-05-05 上海众源网络有限公司 Task processing method and device, computer equipment and storage medium
CN111625467A (en) * 2020-06-03 2020-09-04 深圳华锐金融技术股份有限公司 Automatic testing method and device, computer equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111008207A (en) * 2019-11-22 2020-04-14 口碑(上海)信息技术有限公司 Resource data processing method, device and equipment
CN111104222A (en) * 2019-12-16 2020-05-05 上海众源网络有限公司 Task processing method and device, computer equipment and storage medium
CN111625467A (en) * 2020-06-03 2020-09-04 深圳华锐金融技术股份有限公司 Automatic testing method and device, computer equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113610558A (en) * 2021-07-12 2021-11-05 北京达佳互联信息技术有限公司 Resource distribution method and device, electronic equipment and storage medium
CN113806698A (en) * 2021-09-06 2021-12-17 深圳云之家网络有限公司 Application resource control method and device, computer equipment and storage medium
CN113806698B (en) * 2021-09-06 2024-01-09 深圳云之家网络有限公司 Application resource control method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113065887B (en) 2022-12-23
CA3151214A1 (en) 2022-09-08

Similar Documents

Publication Publication Date Title
CN109787908B (en) Server current limiting method, system, computer equipment and storage medium
CN113065887B (en) Resource processing method, resource processing device, computer equipment and storage medium
CN111460504B (en) Service processing method, device, node equipment and storage medium
CN110795171B (en) Service data processing method, device, computer equipment and storage medium
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
CN109460252B (en) Configuration file processing method and device based on git and computer equipment
CN108717426B (en) Enterprise data updating method and device, computer equipment and storage medium
CN110704177A (en) Computing task processing method and device, computer equipment and storage medium
CN108965450B (en) Service request response method, device, computer equipment and storage medium
CN109492856B (en) Service request processing method, device, computer equipment and storage medium
CN111898102A (en) Authority configuration method and device, computer equipment and storage medium
CN116089321A (en) Memory management method, device, electronic device and storage medium
CN108154024B (en) Data retrieval method and device and electronic equipment
CN114281263A (en) Storage resource processing method, system and equipment of container cluster management system
CN112632375A (en) Session information processing method, server and storage medium
CN110888872A (en) Data storage method and device, computer equipment and storage medium
CN112507010B (en) Service data processing method and device, computer equipment and storage medium
CN110941681B (en) Multi-tenant data processing system, method and device of power system
CN112764897B (en) Task request processing method, device and system and computer readable storage medium
CN114493598A (en) Computing resource management method, device, computer equipment and storage medium
CN111125744B (en) Code branch merging method, system, computer device and readable storage medium
CN111191082A (en) Data management method and device, computer equipment and storage medium
CN110990427A (en) Statistical method, system and storage medium for application program affiliated area
CN110930213A (en) Service data processing method and device, computer equipment and storage medium
CN115858551B (en) Memory management method, device, equipment and storage medium based on LDAP

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
GR01 Patent grant
GR01 Patent grant