Resource processing method and device, electronic equipment and computer readable storage medium
By determining the parameter information and corresponding relationships of target processing operations, unified management of multiple resource types is achieved, which solves the time cost and code redundancy problems when resource types increase in the existing technology, and meets the business management needs of multiple types of resources. , reducing processing costs.
Patent Information
- Application Number
- CN202410551062.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-08-23
AI Technical Summary
The existing resource management system can only manage one resource type. When adding new types of resources, an additional single system needs to be developed, resulting in high time costs, high code redundancy, and the inability to reuse existing resource systems.
By determining the parameter information corresponding to the target processing operation, including the target user ID, target business ID, and target resource processing volume, the corresponding relationship between the business ID and resource type is represented based on the corresponding relationship, the matching target resource is found, and the target resource is processed according to the corresponding relationship. Execute target processing operations in large quantities to achieve unified management of multiple resource types.
It reduces the processing cost of multiple types of resources, meets the business management needs of multiple types of resources, and realizes the reuse and efficient management of resource types.
Smart Images

Figure CN118535150A
Abstract
Description
Technical Field
[0001] The present invention is applied to the field of information technology, and specifically relates to a resource processing method, device, electronic equipment and computer-readable storage medium. Background Art
[0002] Currently, the platform encourages users to participate in activities and increase activity and loyalty by giving them a certain amount of resources.
[0003] In the related art, the resource management system only supports the management of one resource type in terms of business form. When a new resource type is added, an additional single system needs to be developed, which has high time cost and high code redundancy, and the existing resource system cannot be reused. Summary of the invention
[0004] In order to solve the above problems existing in the prior art, the present disclosure provides a resource processing method, device, electronic device and computer-readable storage medium.
[0005] The first aspect of the present invention provides a resource processing method, which includes: determining parameter information corresponding to a target processing operation to be performed on a resource to be processed, the parameter information including a target user identifier, a target service identifier, and a target resource processing volume; based on a first corresponding relationship, determining a target resource type corresponding to the target service identifier, the first corresponding relationship representing the corresponding relationship between the service identifier and the resource type; in a second corresponding relationship, determining a target resource that matches the target user identifier and the target resource type, the second corresponding relationship representing the corresponding relationship between resources, user identifiers, and resource types; and performing the target processing operation on the target resource according to the target resource processing volume.
[0006] In one embodiment, the parameter information also includes a target service source identifier associated with the target service identifier, and the method also includes: in response to the target processing operation including increasing or decreasing the target resource processing capacity of the target resource, obtaining a third corresponding relationship, the third corresponding relationship representing the correspondence between the resource processing capacity, the service identifier, the service source identifier, the user identifier and the resource type identifier; adding a first record to the third corresponding relationship, the first record representing the correspondence between the target resource processing capacity, the target service identifier, the target service source identifier, the target user identifier and the target resource type identifier.
[0007] In one embodiment, after performing the target processing operation on the target resource according to the target resource processing volume, the method further includes: in response to receiving a cancel instruction, the cancel instruction is used to cancel the target resource processing volume increased or decreased for the target resource, obtaining the target business source identifier, the target business identifier, the target user identifier and the target resource type identifier that match the target resource processing volume in the third corresponding relationship; and canceling the target resource processing volume increased or decreased for the target resource according to the target business source identifier, the target business identifier, the target user identifier and the target resource type identifier.
[0008] In one embodiment, the first corresponding relationship also includes a maximum resource processing capacity corresponding to the business identifier and the resource type; performing the target processing operation on the target resource according to the target resource processing capacity includes: in response to the target processing operation being to increase the target resource processing capacity for the target resource, determining the maximum target resource processing capacity that matches the target business identifier and the target resource type identifier based on the first corresponding relationship; if the target resource processing capacity exceeds the maximum target resource processing capacity, performing the target processing operation on the target resource according to the maximum target resource processing capacity; if the target resource processing capacity does not exceed the maximum target resource processing capacity, performing the target processing operation on the target resource according to the target resource processing capacity.
[0009] In one embodiment, the method also includes: in response to the target processing operation including increasing the target resource processing capacity of the target resource, obtaining a fourth correspondence in the resource library that matches the target user identifier and the target resource type identifier, the fourth correspondence representing the correspondence between available resources and resource expiration time; adding a second record in the fourth correspondence, the second record representing the correspondence between the target resource processing capacity and the resource expiration time corresponding to the target resource processing capacity.
[0010] In one embodiment, the method also includes: in response to the target processing operation including reducing the target resource processing volume of the target resource, obtaining a second record in the fourth correspondence that matches the target user identifier and the target resource type identifier; based on the resource expiration time in the second record, reducing the target resource processing volume for the available resources in the second record; adding a third record in the fifth correspondence of the resource library, the fifth correspondence being used to characterize the correspondence between the first record corresponding to the target processing operation, the first record corresponding to the second record, the target resource processing volume and the target resource type, the third record recording the target business source identifier corresponding to the target resource processing volume reduced in the third correspondence.
[0011] In one embodiment, the method further includes: in response to the parameter information including parameter information for freezing the target resource processing capacity, adding the target resource processing capacity in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and adding a fourth record in the sixth corresponding relationship, wherein the fourth record represents the correspondence between the target resource processing capacity added in the resource freezing item and the target resource type identifier; performing the target processing operation on the target resource according to the target resource processing capacity includes: in response to the target processing operation including reducing the target resource processing capacity of the target resource, reducing the target resource processing capacity of the target resource; in response to the target processing operation including increasing the target resource processing capacity of the target resource, keeping the target resource unchanged.
[0012] In one embodiment, the method also includes: in response to satisfying the condition for unfreezing the target resource processing capacity, reducing the target resource processing capacity in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and increasing the target resource processing capacity for the current target resource; the current target resource includes a resource whose target resource processing capacity is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0013] In one embodiment, the method also includes: in response to satisfying the condition for consuming the target resource processing volume, reducing the target resource processing volume in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and keeping the current target resource unchanged; the current target resource includes a resource whose target resource processing volume is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0014] The second aspect of the present invention provides a resource processing device, which includes: a determination unit, in which a user determines parameter information corresponding to a target processing operation to be performed on a resource to be processed, the parameter information including a target user identifier, a target service identifier and a target resource processing volume, and based on a first correspondence, determines a target resource type corresponding to the target service identifier, the first correspondence represents the correspondence between the service identifier and the resource type, and in a second correspondence, determines a target resource matching the target user identifier and the target resource type, the second correspondence represents the correspondence between resources, user identifiers and resource types; a processing unit, which is used to perform the target processing operation on the target resource according to the target resource processing volume.
[0015] In one embodiment, the parameter information also includes a target service source identifier associated with the target service identifier, and the processing unit is further used to: in response to the target processing operation including increasing or decreasing the target resource processing capacity of the target resource, obtain a third corresponding relationship, the third corresponding relationship representing the correspondence between the resource processing capacity, the service identifier, the service source identifier, the user identifier and the resource type identifier; and add a first record to the third corresponding relationship, the first record representing the correspondence between the target resource processing capacity, the target service identifier, the target service source identifier, the target user identifier and the target resource type identifier.
[0016] In one embodiment, after the processing unit performs the target processing operation on the target resource according to the target resource processing volume, the processing unit is also used to: in response to receiving a cancel instruction, the cancel instruction is used to cancel the target resource processing volume increased or decreased for the target resource, obtain the target business source identifier, the target business identifier, the target user identifier and the target resource type identifier that match the target resource processing volume in the third corresponding relationship; cancel the target resource processing volume increased or decreased for the target resource according to the target business source identifier, the target business identifier, the target user identifier and the target resource type identifier.
[0017] In one embodiment, the first corresponding relationship also includes a maximum resource processing capacity corresponding to the business identifier and the resource type; the processing unit executes the target processing operation on the target resource according to the target resource processing capacity in the following manner: in response to the target processing operation being to increase the target resource processing capacity for the target resource, based on the first corresponding relationship, determine the maximum target resource processing capacity that matches the target business identifier and the target resource type identifier; if the target resource processing capacity exceeds the maximum target resource processing capacity, execute the target processing operation on the target resource according to the maximum target resource processing capacity; if the target resource processing capacity does not exceed the maximum target resource processing capacity, execute the target processing operation on the target resource according to the target resource processing capacity.
[0018] In one embodiment, the processing unit is also used to: in response to the target processing operation including increasing the target resource processing capacity of the target resource, obtain a fourth correspondence in the resource library that matches the target user identifier and the target resource type identifier, the fourth correspondence representing the correspondence between available resources and resource expiration time; and add a second record in the fourth correspondence, the second record representing the correspondence between the target resource processing capacity and the resource expiration time corresponding to the target resource processing capacity.
[0019] In one embodiment, the processing unit is also used to: in response to the target processing operation including reducing the target resource processing volume of the target resource, obtain a second record in the fourth correspondence that matches the target user identifier and the target resource type identifier; based on the resource expiration time in the second record, reduce the target resource processing volume for the available resources in the second record; and add a third record in the fifth correspondence of the resource library, the fifth correspondence being used to characterize the correspondence between the first record corresponding to the target processing operation, the first record corresponding to the second record, the target resource processing volume and the target resource type, the third record recording the target business source identifier corresponding to the target resource processing volume reduced in the third correspondence.
[0020] In one embodiment, the processing unit is also used for: in response to the parameter information including parameter information for freezing the target resource processing capacity, adding the target resource processing capacity in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and adding a fourth record in the sixth corresponding relationship, wherein the fourth record represents the correspondence between the target resource processing capacity added in the resource freezing item and the target resource type identifier; performing the target processing operation on the target resource according to the target resource processing capacity, including: in response to the target processing operation including reducing the target resource processing capacity of the target resource, reducing the target resource processing capacity of the target resource; in response to the target processing operation including increasing the target resource processing capacity of the target resource, keeping the target resource unchanged.
[0021] In one embodiment, the processing unit is also used to: in response to satisfying the condition for unfreezing the target resource processing volume, reduce the target resource processing volume in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and increase the target resource processing volume for the current target resource; the current target resource includes a resource whose target resource processing volume is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0022] In one embodiment, the processing unit is also used to: in response to meeting the condition for consuming the target resource processing volume, reduce the target resource processing volume in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and keep the current target resource unchanged; the current target resource includes a resource whose target resource processing volume is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0023] The third aspect of the present invention provides an electronic device, comprising: a memory for storing instructions; and a processor for calling the instructions stored in the memory to execute the resource processing method described in the first aspect or any one of the embodiments of the first aspect.
[0024] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions, which, when executed by a processor, executes the resource processing method as described in the first aspect or any one of the embodiments of the first aspect.
[0025] The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: determining the target resource type corresponding to the target processing operation by determining the parameter information corresponding to the target processing operation and the first correspondence relationship representing the correspondence between the business identifier and the resource type, and determining the target resource to be processed by the target processing operation based on the second correspondence relationship representing the correspondence between the resource, the user identifier and the resource type, and performing the target processing operation on the target resource. The processing operation is implemented for resources of a specific resource type, the processing cost of multiple types of resources is reduced, and the business management requirements involving multiple types of resources are met. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other objects, features and advantages of the embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0027] Figure 1 The present invention is a flowchart of a resource processing method according to an exemplary embodiment.
[0028] Figure 2 The present invention is a flowchart of a resource processing method according to an exemplary embodiment.
[0029] Figure 3 The present invention is a flowchart of a resource processing method according to an exemplary embodiment.
[0030] Figure 4 The present invention is a flowchart of a resource processing method according to an exemplary embodiment.
[0031] Figure 5 The present invention is a flowchart of a resource processing method according to an exemplary embodiment.
[0032] Figure 6 The present invention is a flowchart of a resource processing method according to an exemplary embodiment.
[0033] Figure 7 The present invention is a flowchart showing a resource freezing method according to an exemplary embodiment.
[0034] Figure 8 The present invention is a flowchart showing a method for unfreezing resources according to an exemplary embodiment.
[0035] Fig. 9 The present invention is a flowchart showing a method for freezing consumption of resources according to an exemplary embodiment.
[0036] Fig.10 It is a schematic diagram of a resource type management page according to an exemplary embodiment.
[0037] Fig.11 It is a schematic diagram of a business source information management page according to an exemplary embodiment.
[0038] Fig.12 The diagram is a schematic diagram of a business information management page according to an exemplary embodiment.
[0039] Fig.13 The invention is a block diagram of a resource processing device according to an exemplary embodiment.
[0040] Fig.14 It is a block diagram of an electronic device for resource processing according to an exemplary embodiment.
[0041] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0042] The principle and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way.
[0043] It should be noted that although the expressions "first", "second", etc. are used herein to describe different modules, steps, data, etc. of the embodiments of the present invention, the expressions "first", "second", etc. are only used to distinguish between different modules, steps, data, etc., and do not indicate a specific order or importance. In fact, the expressions "first", "second", etc. can be used interchangeably.
[0044] The resource processing method provided by the embodiment of the present disclosure is applied to the field of information technology. The resource processing method provided by the embodiment of the present disclosure is mainly used to perform corresponding target processing operations on target resources of the type corresponding to the parameter information based on the parameter information corresponding to the target processing operation. With the intensification of market competition, the maintenance and enhancement of customer relationships has become one of the research hotspots for technicians in this field. In order to motivate users to use the platform or application with activeness and loyalty, the enterprise has designed a method that can obtain a predetermined amount of resources in response to users completing predetermined operations such as participating in activities. The resources can be used to exchange goods, deduct cash, etc., to encourage users to participate in activities and improve users' activeness and loyalty to the platform.
[0045] In the related art, the existing resource management system can only manage one type of resources and perform operations such as issuing and recycling resources to users. The corresponding database design does not distinguish between different resource types. If a new type of resource needs to be added to the resource management system of the related art and the resource of a type different from that already in the system needs to be processed, a new points management system and database need to be designed for this type of resource, which has problems such as high time cost, high code redundancy, and inability to reuse the existing points system.
[0046] For example, the resource management system in the related art can be applied to the points system. Among them, points are an incentive mechanism that encourages users to participate in activities, improve activity and loyalty by giving users a certain number of points or equivalents. Points can be used to redeem goods, deduct cash, etc. The points system provides a series of interfaces to enable businesses to modify user points accounts. The main functions are: issuing points, consuming points, issuing recycling, deducting returns, freezing points, unfreezing points, freezing consumption, points details, points expiration details, points account balance, etc. In addition, since points may have redemption and cash-off scenarios, issuing points will incur costs. Cost attribution means that multiple business departments can issue points to users, and each point will be attributed to the issuing department. Therefore, there is a need for a clear points flow to count the cost details of issuance, consumption, and refund within a time period. However, the resource processing method provided by the related art cannot manage multiple types of resources, and cannot effectively manage the source of resources. For example, when processing a refund, the cost of the returned points is traced back to the department to which the source points belonged when they were consumed. In addition, the related technologies cannot restrict the calls of various business departments, such as issuing and recycling quantity restrictions, or limiting the flow of points only issuing or only recycling, which cannot meet the needs of users for resource processing. In addition, when adding a new resource type in the related technologies, a single system needs to be redeveloped, which is time-consuming and has high code redundancy, and the existing resource system cannot be reused.
[0047] In view of this, the embodiment of the present disclosure provides a resource processing method, which determines parameter information corresponding to a target processing operation, including a target user identifier, a target service identifier, and a target resource processing amount, and determines a target resource type corresponding to the target service identifier through a first corresponding relationship, and then finds a matching target resource according to the target user identifier and the target resource type through a second corresponding relationship. Finally, the target processing operation is performed on the target resource according to the target resource processing amount.
[0048] Figure 1 is a flow chart of a resource processing method according to an exemplary embodiment. Figure 1 As shown, the following steps are included.
[0049] In step S11, parameter information corresponding to a target processing operation to be performed on a resource to be processed is determined.
[0050] In the embodiment of the present disclosure, the resources to be processed are resources that need to perform target processing operations, wherein the target processing operations may correspond to one or more types of resources to be processed, for example, the target processing operation may be performed on resource 1, or the same target processing operation may be performed on resource 2.
[0051] In the disclosed embodiment, the parameter information corresponding to the target processing operation to be performed on the resources to be processed includes a target user identifier, a target business identifier, and a target resource processing capacity. Among them, the user identifier is a unique identification information used to identify different users, that is, each user corresponds to a user identifier, and different users correspond to different user identifiers. The business identifier is a unique identification information used to identify different business activities, and each business corresponds to a business identifier, and different businesses correspond to different business identifiers. The target user identifier, target business identifier, and target resource processing capacity included in the parameter information corresponding to the target processing operation to be performed on the resources to be processed are the user identifier, business identifier, and resource processing capacity required to perform the target processing operation, and are used to indicate that a target processing operation of the target resource processing capacity is to be performed on the resources to be processed corresponding to the target user identifier and the target business identifier.
[0052] In step S12, based on the first corresponding relationship, the target resource type corresponding to the target service identifier is determined.
[0053] In the embodiment of the present disclosure, the resource type is used to identify the type of resource included in the system used to perform the target processing operation. Performing a processing operation on one type of resource will not affect other types of resources. The first correspondence relationship represents the correspondence between the service identifier and the resource type. For example, the first correspondence relationship can be a data table in a database, which contains at least two fields, the service identifier and the resource type, and these two fields are non-empty fields.
[0054] In the embodiments of the present disclosure, a multi-tenant system architecture can be used to process and operate multiple types of resources through one system. The multi-tenant system architecture refers to a software architecture that supports one instance to serve multiple users, each user is called a tenant, and the software gives the tenant the ability to partially customize the system. From a maintenance perspective, multi-tenant system maintenance is simpler and has the advantages of flexibility, isolation, scalability, and easy maintenance.
[0055] In step S13, in the second corresponding relationship, a target resource matching the target user identifier and the target resource type is determined.
[0056] In the disclosed embodiment, the second corresponding relationship represents the corresponding relationship between resources, user identifiers, and resource types. Resources can be virtual resources such as money, prices, gold coins, or points. In the second corresponding relationship, there can be at least one resource corresponding to multiple different resource types corresponding to the user identifier, and there can also be at least one resource corresponding to a resource type that does not correspond to multiple user identifiers, and there is a resource that matches the user identifier and the resource type. The target resource can be determined in the second corresponding relationship through the target user identifier and the target resource type.
[0057] In the disclosed embodiment, the resource library is a warehouse that organizes, stores, and manages data according to a data structure. It is a collection of a large amount of data that is stored in a computer for a long time, organized, shareable, and uniformly managed, such as a database and a file system. The first correspondence relationship and the second correspondence relationship are in the same resource library. For example, if the first correspondence relationship and the second correspondence relationship are data tables, and the resource library is a database, then the data table corresponding to the first correspondence relationship and the data table corresponding to the second correspondence relationship are stored in the same database.
[0058] In step S14, a target processing operation is performed on the target resource according to the target resource processing capacity.
[0059] In the embodiment of the present disclosure, the target resource processing volume is the amount of resources that need to be processed on the target resource. In response to determining the target resource based on the target user identifier and the target resource type, a target processing operation is performed on the target resource based on the target resource processing volume.
[0060] In an exemplary embodiment, the resource processing method provided by the present disclosure can be applied to a points system, using a multi-tenant architecture design with a shared schema, i.e., "one set of services + one set of databases", and using fields for isolation. A points type table is set to record the points type, and the primary key identifier (id) of the points table is used as a field in other data tables to record and distinguish different points types. When a new points type needs to be added, only a new record needs to be added to the points type table to obtain a new id, and the id can be passed in the general interface to complete operations such as issuing or deducting the points.
[0061] In the embodiment of the present disclosure, by determining parameter information corresponding to the target processing operation to be performed on the resource to be processed, and determining the target resource corresponding to the target user identifier and the target resource type based on the first correspondence and the second correspondence, the target processing operation is performed on the target resource, thereby realizing processing operations on resources of multiple resource types and satisfying processing operations such as issuance, recovery or management of multiple types of resources.
[0062] In the embodiment of the present disclosure, the parameter information may further include a target service source identifier associated with the target service identifier, and a new record is added based on the parameter information including the target service source identifier.
[0063] Figure 2 is a flow chart of a resource processing method according to an exemplary embodiment. Figure 2 As shown, the following steps are included.
[0064] In step S21, in response to the target processing operation including increasing or decreasing the target resource processing amount for the target resource, a third corresponding relationship is acquired.
[0065] In the disclosed embodiment, the third corresponding relationship represents the corresponding relationship between the resource processing volume, the service identifier, the service source identifier, the user identifier, and the resource type identifier. The third corresponding relationship is used to record the parameter information and the resource type identifier corresponding to all processing operations. For example, a flow table for storing flow data is established in the database of the resource management system, and the flow table records the parameter information corresponding to each target processing operation and the target resource type determined based on the target service identifier in the parameter information and the first corresponding relationship, that is, the flow table may contain the resource processing volume, service identifier, service source identifier, user identifier, resource type identifier fields, and the first record identifier for identifying the flow record.
[0066] In step S22, a first record is added to the third corresponding relationship.
[0067] In the disclosed embodiment, the business source identifier is unique identification information used to identify different business sources. The business source may be a group that creates or is responsible for operating the business based on actual production, such as a department or unit.
[0068] In the disclosed embodiment, the first record represents the correspondence between the target resource processing volume, the target business identifier, the target business source identifier, the target user identifier, and the target resource type identifier. The first record can be used to record the business identifier, business source identifier, user identifier, resource processing volume involved in a certain target processing operation, and the resource type corresponding to the business identifier determined based on the first correspondence. For example, if the parameter information corresponding to the target processing operation on the resource to be processed is the target user identifier 1, the target business identifier 1, and the target resource processing volume 1, and the target business identifier 1 is determined to correspond to the target resource type 1 based on the first correspondence, then a target user identifier 1, a target business identifier 1, a target resource processing volume 1, a target resource type 1, and a first record identifier 1 set based on a preset rule are added to the third correspondence. By adding the first record to the third correspondence, when the target processing operation includes increasing or decreasing the target resource processing volume of the target resource, the business identifier, business source identifier, user identifier, resource processing volume involved in the target processing operation, and the resource type corresponding to the business identifier determined based on the first correspondence are recorded.
[0069] In the embodiment of the present disclosure, by setting a third correspondence between resource processing capacity, service identifier, service source identifier, user identifier and resource type identifier, the transaction record of each user is bound to the service information and service source information, thereby supporting the use of the embodiment of the present disclosure in scenarios with multiple services and multiple service sources.
[0070] In the disclosed embodiment, a correspondence between business source identifiers, resources, business identifiers and resource type identifiers may also be set. For example, a consumption record table may be set up, including fields such as business source identifiers, number of resources, business identifiers and resource type identifiers, to record the resource usage of each business source, so as to facilitate users to manage the resource processing status related to each business source.
[0071] In an embodiment of the present disclosure, if it is detected that the user has performed a target processing operation including increasing or decreasing the target resource processing capacity, and then undone the target processing operation just performed, a cancel instruction will be received, and the inverse operation corresponding to the most recent target processing operation including increasing or decreasing the target resource processing capacity will be performed.
[0072] Figure 3 is a flow chart of a resource processing method according to an exemplary embodiment. Figure 3 As shown, the following steps are included.
[0073] In step S31, in response to receiving a cancel instruction, a target service source identifier, a target service identifier, a target user identifier, and a target resource type identifier matching the target resource processing volume in the third corresponding relationship are obtained.
[0074] In the disclosed embodiment, the cancel instruction is used to cancel the target resource processing amount increased or decreased by the last target processing operation on the target resource. For example, when a user triggers a target processing operation of issuing or reclaiming resources, and then triggers a target processing operation to cancel the last target processing operation of issuing or reclaiming resources, the system for managing resources can recycle or issue the resources issued or reclaimed last time based on the parameter information corresponding to this target processing operation and the parameter information corresponding to the last target processing operation, and return the resources recovered this time to the business source corresponding to the resources issued last time, or return the resources issued this time to the user corresponding to the resources reclaimed last time.
[0075] In an embodiment of the present disclosure, a first record is obtained in which the business source identifier in the third corresponding relationship is the same as the target business source identifier and the resource processing amount is the opposite of the target resource processing amount, and the business identifier, user identifier and resource type identifier corresponding to the first record are obtained as the target business identifier, target user identifier and target resource type identifier corresponding to the cancellation instruction.
[0076] It should be understood that if the resource processing volume in the third corresponding relationship can only be a positive number, and there is an identification field for identifying whether the resource processing volume is increased or decreased, then the method for obtaining the first record in the third corresponding relationship that matches the cancellation instruction can also be to obtain the first record in which the business source identifier and the target business source identifier in the third corresponding relationship are the same, the resource processing volume and the target resource processing volume are the same, and the identification field is different from the identification field corresponding to the cancellation instruction.
[0077] In step S32, the target resource processing volume increased or decreased for the target resource is cancelled according to the target service source identifier, the target service identifier, the target user identifier and the target resource type identifier.
[0078] In the disclosed embodiment, based on the determined target service source identifier, target service identifier, target user identifier and target resource type identifier, the target resource processing volume corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship is increased or decreased.
[0079] In the disclosed embodiment, the third correspondence generated by increasing or decreasing the target resources is associated with the target business identifier, and the refund is returned to the source business with complete record information, so the resource issuance / consumption of each business within the time period can be quickly calculated.
[0080] In the embodiment of the present disclosure, in order to limit the target resource processing volume usage quota for each target processing operation, the first corresponding relationship may also include a maximum resource processing volume corresponding to the business identifier and the resource type, which is used to limit the maximum usage of different types of resources for each business. For example, a field for the maximum resource processing volume is added to the data table used to characterize the first corresponding relationship.
[0081] Figure 4 is a flow chart of a resource processing method according to an exemplary embodiment. Figure 4 As shown, the following steps are included.
[0082] In step S41, in response to the target processing operation being to increase the target resource processing capacity of the target resource, based on the first corresponding relationship, a maximum value of the target resource processing capacity matching the target service identifier and the target resource type identifier is determined.
[0083] In the disclosed embodiment, the maximum value of the target resource processing volume is used to indicate the maximum value of the resource processing volume corresponding to the target resource type that can be issued by the service at one time. If the target processing operation is that the service issues the resource corresponding to the target resource processing volume to the user, the maximum value of the target resource processing volume corresponding to the target service identifier is determined based on the first corresponding relationship, and it is determined whether the target resource processing volume exceeds the maximum value of the target resource processing volume.
[0084] In step S42a, if the target resource processing capacity exceeds the target resource processing capacity maximum value, the target processing operation is performed on the target resource according to the target resource processing capacity maximum value.
[0085] In the embodiment of the present disclosure, if the target resource processing volume issued or recovered by the business at a single time exceeds the maximum value of the target resource processing volume preset in the first corresponding relationship, it is impossible to achieve the issuance and recovery of all target resource processing volumes through the issuance or recovery of a single target processing operation, and the target resource processing volume in the parameter information corresponding to the target processing operation is changed to the maximum value of the target resource processing volume preset in the first corresponding relationship. Avoid using multiple target resource processing volume resources at a single time, which will cause damage to the interests of the business party.
[0086] In step S42b, if the target resource processing capacity does not exceed the target resource processing capacity maximum value, the target processing operation is performed on the target resource according to the target resource processing capacity.
[0087] In the disclosed embodiment, when it is detected that the target resource processing volume does not exceed the target resource processing volume maximum value preset in the first corresponding relationship, the target processing operation is normally performed on the target resource based on the parameter information corresponding to the target processing operation.
[0088] In the disclosed embodiment, by recording the service identifier and the maximum resource processing volume corresponding to the resource type in the first corresponding relationship, it is possible to record the maximum number of points that can be issued each time or in total in each service scenario, the flow of points in the scenario, etc., and limit the call of each service.
[0089] In the embodiment of the present disclosure, a fourth corresponding relationship for characterizing the corresponding relationship between available resources and resource expiration times may also be set to record the expiration times of target resources acquired by the same user at different times.
[0090] Figure 5 is a flow chart of a resource processing method according to an exemplary embodiment. Figure 5 As shown, the following steps are included.
[0091] In step S51, in response to the target processing operation including increasing the target resource processing amount for the target resource, a fourth corresponding relationship matching the target user identifier and the target resource type identifier in the resource library is obtained.
[0092] In the embodiment of the present disclosure, the fourth corresponding relationship represents the corresponding relationship between available resources and resource expiration time. It should be understood that in addition to representing the corresponding relationship between available resources and resource expiration time, the fourth corresponding relationship may also include other information and the corresponding relationship between available resources and resource expiration time based on actual needs. For example, the fourth corresponding relationship may be set to represent the corresponding relationship between the target integral type, the third corresponding relationship identifier, the original resource, the available resource and the resource expiration time. To meet the resource-based processing requirements.
[0093] In step S52, a second record is added to the fourth corresponding relationship.
[0094] In the disclosed embodiment, the second record represents the correspondence between the target resource processing volume and the resource expiration time corresponding to the target resource processing volume. By adding the second record in the fourth correspondence, the expiration time information of the target resource processing volume increased by the user corresponding to each target processing operation including increasing the target resource processing volume of the target resource is recorded, which facilitates the management of the user's available resources.
[0095] In the embodiment of the present disclosure, when the target processing operation is to reduce the target resource processing amount of the target resource, the target processing operation can be performed on the fourth correspondence relationship and the second correspondence relationship used to characterize the user's available resources, and a fifth correspondence relationship for identifying the resource deduction situation can be added to record the user's resource deduction situation.
[0096] Figure 6 is a flow chart of a resource processing method according to an exemplary embodiment. Figure 6As shown, the following steps are included.
[0097] In step S61, in response to the target processing operation including reducing the target resource processing amount for the target resource, a second record matching the target user identifier and the target resource type identifier in the fourth corresponding relationship is obtained.
[0098] In an embodiment of the present disclosure, if the target processing operation includes reducing the target resource processing volume of the target resource, that is, corresponding to the business of deducting the user's target resources, then a second record is obtained in which the user identifier in the fourth correspondence is the same as the target user identifier, and the resource type is the same as the target resource type determined based on the target business identifier and the first correspondence, wherein the obtained second record may be one or more.
[0099] In step S62, based on the resource expiration time in the second record, the target resource processing amount of the available resources in the second record is reduced.
[0100] In the disclosed embodiment, the acquired second records are sorted according to resource expiration time, and the available resources corresponding to the second record with the earliest resource expiration time are preferentially deducted.
[0101] In the disclosed embodiment, if the target resource processing volume to be reduced by the target processing operation is greater than the available resources corresponding to the second record with the earliest resource expiration time, the available resources corresponding to the second record with the earliest resource expiration time are selected from the remaining acquired second records for deduction until the cumulatively deducted available resources are the same as the target resource processing volume to be reduced by the target processing operation. It should be understood that when the available resources corresponding to the second record with the earliest resource expiration time are deducted to 0, the second record can be deleted, or the second record can be retained and the corresponding available resources can be set to 0.
[0102] In an embodiment of the present disclosure, if the target resource processing amount to be reduced by the target processing operation is less than the available resources corresponding to the second record with the earliest resource expiration time, the available resources corresponding to the second record with the earliest resource expiration time are subtracted from the target resource processing amount to be reduced by the target processing operation.
[0103] In step S63, a third record is added to the fifth corresponding relationship of the resource library.
[0104] In the disclosed embodiment, the fifth corresponding relationship is used to characterize the corresponding relationship between the first record corresponding to the target processing operation, the first record corresponding to the second record, the target resource processing volume and the target resource type, and is used to record the first record corresponding to the target processing operation, and the first record corresponding to the deducted available resources, the target resource processing volume and the target resource type. For example, the third corresponding relationship can be a point deduction log data table, which includes the first record identifier corresponding to the current target processing operation, the first record identifier corresponding to the deducted second record, the deducted target resource processing volume and the target point type.
[0105] In the embodiment of the present disclosure, the third record records the target business source identifier corresponding to the target resource processing volume reduced in the third corresponding relationship. It should be understood that if the available resources in multiple second records are deducted, there may be multiple newly added third records, and the newly added third records correspond to the second records respectively. For example, based on the available resources contained in each deducted second record, the target resource processing volume reduced in the corresponding third record is determined, the first record identifier contained in the second record corresponds to the first record identifier corresponding to the deducted second record contained in the third record, and the target resource type contained in the second record corresponds to the target resource type contained in the third record.
[0106] In the embodiment of the present disclosure, a fifth correspondence is set including a first record corresponding to the target processing operation, a first record corresponding to the second record, and a correspondence between the target resource processing volume and the target resource type. In order to record which first record the resource in each resource consumption comes from, when a refund occurs, the fifth correspondence can be used to trace back to the first record of the resource source.
[0107] In the embodiment of the present disclosure, the parameter information may also include parameter information for freezing the target resource processing volume, and the second corresponding relationship includes a resource freezing item, freezing the target resource processing volume in the parameter information corresponding to the target resource processing operation. For example, a user uses the target resource of the target resource processing volume in his own account for consumption deduction, or the business direction issues the target resource of the target resource processing volume to the user when the user consumes.
[0108] Figure 7 is a flow chart showing a resource freezing method according to an exemplary embodiment. Figure 7 As shown, the following steps are included.
[0109] In step S71, in response to parameter information including parameter information for freezing target resource processing capacity, the target resource processing capacity is added to the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and a fourth record is added in the sixth corresponding relationship.
[0110] In the embodiment of the present disclosure, the sixth correspondence is used to characterize the target user identifier, the target frozen resource processing volume, and the target resource type. The fourth record characterizes the correspondence between the target resource processing volume added in the resource freezing item and the target resource type identifier. For example, the sixth correspondence is a data table including the target user identifier, the target frozen resource processing volume, and the target resource type. In response to the parameter information including freezing the target resource processing volume in the target processing operation, a piece of data is added to the data table, wherein the target user identifier in the data is the target user identifier included in the parameter information, the target resource frozen processing volume is the target user identifier included in the parameter information, and the target resource type identifier is the target type identifier determined based on the target service identifier included in the parameter information and the first correspondence.
[0111] In step S72a, in response to the target processing operation including reducing the target resource processing capacity of the target resource, the target resource processing capacity is reduced.
[0112] In an embodiment of the present disclosure, if the target processing operation includes reducing the target resource processing amount of the target resource, then the target resource corresponding to the target resource type determined based on the first corresponding relationship and the target business identifier is determined in the second correspondence, the resource amount of the target resource is reduced by the target resource processing amount, and the target resource processing amount is added to the resource freezing item.
[0113] In step S72b, in response to the target processing operation including increasing the target resource processing capacity of the target resource, the target resource is kept unchanged.
[0114] In an embodiment of the present disclosure, if the target processing operation includes increasing the target resource processing capacity of the target resource, then the target resource corresponding to the target resource type that matches the target user identifier and is determined based on the first corresponding relationship and the target business identifier is determined in the second correspondence, the resource capacity of the target resource is kept unchanged, and the target resource processing capacity is added to the resource freezing item.
[0115] In the disclosed embodiment, by freezing the increased or decreased target resource processing volume, the target processing operation on the user's target resources can meet a wider range of business needs.
[0116] In the embodiment of the present disclosure, after the target processing operation includes reducing the target resource processing volume and freezing the reduced target resource processing volume, if a unfreeze instruction is received or the conditions for unfreezing the target resource processing volume are met, the frozen target resource processing volume is unfrozen and the frozen target resource processing volume is added to the target resource.
[0117] Figure 8 is a flow chart showing a method for unfreezing resources according to an exemplary embodiment. Figure 7As shown, the following steps are included.
[0118] Figure 8 The steps in step S81 in Figure 7 The same as step S71 in, which will not be repeated here. Please refer to the relevant description of the above embodiment, and only the differences will be described below.
[0119] In step S82, in response to the condition of unfreezing the target resource processing capacity being met, the target resource processing capacity is reduced in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and the target resource processing capacity is increased for the current target resource.
[0120] In the embodiment of the present disclosure, the current target resource includes a resource whose processing amount is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0121] In the disclosed embodiment, the condition for unfreezing the target resource processing volume is a target processing operation in which the resources in the resource freezing item corresponding to the target user identifier and the target resource type are added to the target resource. For example, when a user places an order for a product and uses the target resource processing volume in his or her own account for consumption deduction, the user does not make payment but chooses to cancel the order. In this case, the frozen target resource processing volume needs to be returned to the user's account. For another example, when a user places an order for a product, the business direction issues the target source processing volume to the user in the resource freezing item of the user's corresponding resource type. After the user completes the payment, the resources in the resource freezing item need to be added to the target resource.
[0122] It should be understood that the above conditions for unfreezing the target resource processing volume are only for illustrative purposes, and the conditions for unfreezing the target resource processing volume can also be set based on actual business scenarios. The present disclosure does not impose additional restrictions on the conditions for unfreezing the target resource processing volume.
[0123] Fig. 9 is a flow chart showing a method for freezing resource consumption according to an exemplary embodiment. Fig. 9 As shown, the following steps are included.
[0124] Fig. 9 The steps in step S91 in Figure 7 The same as step S71 in, which will not be repeated here. Please refer to the relevant description of the above embodiment, and only the differences will be described below.
[0125] In step S92, in response to satisfying the condition for consuming the target resource processing volume, the target resource processing volume is reduced in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and the current target resource is kept unchanged.
[0126] In the embodiment of the present disclosure, the current target resource includes a resource whose processing amount is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0127] In the disclosed embodiment, the condition for consuming the target resource processing volume is to deduct the resources in the resource freezing item corresponding to the target user identifier and the target resource type, and the target resource is not adjusted. For example, when a user places an order for a product and uses the target resource of the target resource processing volume in his own account for consumption deduction, and the user makes a payment, the frozen target resource processing volume needs to be deducted and sent to the business party account. For another example, when a user places an order for a product, the business party issues the target source processing volume to the user in the resource freezing item of the corresponding resource type. If the user does not complete the payment, the resources in the resource freezing item need to be returned to the business party.
[0128] It should be understood that the above-mentioned conditions for consuming the target resource processing volume are only for illustrative purposes, and the conditions for consuming the target resource processing volume can also be set based on actual business scenarios. The present disclosure does not impose additional restrictions on the conditions for consuming the target resource processing volume.
[0129] In an exemplary embodiment, a page for managing resource types is shown as follows: Fig.10 As shown, Fig.10 FIG. 1 is a schematic diagram of a resource type management page according to an exemplary embodiment. Fig.10 In the system, resources are points, and backend managers can Fig.10 Click the "Add Points" button to create a point type, as well as the name, exchange rate, creation time, validity period, and activation status of the point. You can also click the "Edit" button to adjust the information of the created point type.
[0130] Pages used to manage business source information such as Fig.11 As shown, Fig.11 FIG. 1 is a schematic diagram of a business source information management page according to an exemplary embodiment. Fig.11 In the system, business source information is called business, and resources are points. Backend managers can Fig.11 Click the "Add Business" button to create a business source, as well as the name, points used, next year's budget, this year's budget, creation time, and activation status of the business source. You can click the "Edit" button to adjust the created business source information, or click the "View" button to view the created business source information, and click the "Pause" button to pause the issuance or recovery of points for the business source.
[0131] Pages used to manage business information such as Fig.12 As shown, Fig.12FIG. 1 is a schematic diagram of a business information management page according to an exemplary embodiment. Fig.12 In the system, business information is called channels, resources are points, and business sources are called businesses. Backstage managers can Fig.12 Click the "Add Channel" button to create a business, as well as the business description, exchange rate, business to which it belongs, points to which it belongs, channel type, planned number of resources to be issued, actual number of resources to be issued, actual total number of resources to be issued, actual total number of resources to be recovered, actual number of people to whom it is issued, and actual number of people to whom it is recovered.
[0132] Fig.12 FIG. 1 is a schematic diagram showing a process of increasing or decreasing the target resource processing amount according to an exemplary embodiment. Fig.12 In the table, business information is called channels, resources are called points, business sources are called business goals, the first corresponding relationship is called the channel table, the second corresponding relationship is called the user account table, the third corresponding relationship is called the flow record table or flow table, and each data in the flow record table is the first record, the fourth corresponding relationship is called the available points table, and each data in the available points table is the second record, the fifth corresponding relationship is called the points deduction log table, and each data in the points deduction log table is the third record, and the sixth corresponding relationship is called the frozen log table, and each data in the frozen log table is called the fourth record.
[0133] exist Fig.12In response to the target processing operation of increasing or decreasing the processing volume of the target resource, core parameters including user identification (uid), channel identification (id), number of points and business identification (id) are received. And based on the channel id, the channel information corresponding to the channel id in the channel table is obtained, wherein the channel information includes the resource type identification corresponding to the channel id, also referred to as the point type identification (id). Based on the obtained point type identification, the available status corresponding to the point type identification in the point type table is obtained, and whether the type of points is available is detected. In response to the point type identification being available, the channel information corresponding to the channel id is further detected based on the channel table, for example, whether the channel is available, whether it complies with the channel flow direction, whether the number of single channel issuances exceeds the limit, etc. If it is detected that the channel information corresponding to the channel id is normal, the balance check is performed on the points of the specific type corresponding to the user id. If it is detected that the points corresponding to a specific type of user id meet the preset balance verification requirements, a new record data is added to the flow record table. If it is a point issuance, the number of points in the record data is the number of points issued by the parameter input, and the point is a positive number. The business id in the data is the business id input by the parameter, and the point type id is the point type id corresponding to the channel id in the channel table. After adding the record data of this operation to the flow table, a new available points record is added to the user's available points table. The points field is the number of points contained in the input parameter. If there is no other deduction record in the remaining points, it is equivalent to all points. Query the points information in the points table through the point type id, obtain the expiration time of the point of this type, add it to the current time, get the expiration time of the record, and record it in the expiration time field. The user account table finds the user account record according to the parameters uid and the point type id, and adds the number of points obtained this time to the account balance field corresponding to the uid and the point type id in the user account table to update the account balance field corresponding to the uid and the point type id. Determine whether there are excess records under the same channel in the transaction record table. If there are excess records, the department or all the points issued this time will be used to pay off the outstanding balance. That is, the updated account balance field of the newly issued record will be subtracted from the outstanding balance, and the outstanding balance information in the outstanding record will be modified.
[0134] If it is a points recovery, the number of points in the record data added to the flow record table is the number of points issued by the parameter, and the point is a negative number. The business id in the data is the business id passed in by the parameter, and the point type id is the point type id corresponding to the channel id in the channel table. According to the uid, several records that have not expired and have a remaining number of available points greater than 0 are obtained from the user's available points table, and they are deducted one by one in the positive order of expiration time until the deduction amount equals the total number of points to be deducted.
[0135] When a user uses points to deduct cash to purchase goods, and then cancels the order and chooses a refund, the deducted points need to be returned to the user. Add a new record in the flow table, where the number of points is the number of points issued (positive number) passed in as a parameter, the business id is the business id determined based on the channel id and the channel table, and the point type id is the point type id corresponding to the parameter channel id in the channel table. Get the flow id of the deduction record from the flow record table according to the business id. Use the deduction record flow id (log_id) to get all the records corresponding to the deduction record from the point deduction log table, and get n detailed records, which record the source flow id (source_log_id) of the deduction record, the channel id (source_log_id) to which the source flow belongs, and the number of points deducted from the source flow (honey). Add several issuance logs to the flow record table and the user available points table, where the channel id, number of points, uid, etc. correspond to the channel id, number of points, uid, etc. of each deduction log mentioned above. Add several records to the refund log table, recording the transaction ID of the refund, the transaction ID of the deduction, the transaction ID of the source of the deduction, etc. Add the refund amount to the balance field corresponding to the uid and point type id in the user account table.
[0136] In order to promote products or motivate users to consume, users will be rewarded points after purchasing products. If users cancel the order after purchase and choose to refund, the reward points issued also need to be deducted. When the user issues a cancellation instruction, the record with the business id in the parameter is queried from the transaction record table, which is the original reward issuance record, and the corresponding channel id and the issuance points field are obtained. A new deduction record is added to the transaction record table, and the deduction points are equal to the issuance points. In the user's available points table, the remaining unused points are queried using the issuance record transaction id to obtain the remaining unused points of the issuance. If the original issuance record is not used at all (the remaining points are equal to the points), deductions are made from the record and the remaining points are set to zero. If the original issuance record is used partially or completely, the remaining points are deducted and the remaining points are set to zero. The remaining unpaid points are recorded in the outstanding points field, indicating the owed points, waiting to be paid off when there is an issuance record from the same channel. Same as the normal deduction of points mentioned above, add a new deduction record in the deduction record table, record the deduction log flow id, the corresponding deduction source, that is, the flow id of the reward, etc. In the user account table, deduct the deduction amount from the balance field corresponding to the uid and point type id.
[0137] In scenarios where users place orders but do not pay, you can freeze the points to be processed. For example, a deduction freeze is to deduct part of the account balance and temporarily freeze it. For example, when paying, use points to deduct cash. When the user submits an order but has not paid, you need to temporarily freeze part of the points balance. A distribution freeze is to freeze the account balance without changing a number of points. For example, when completing a daily task, first distribute the reward points to the account and freeze them, and then unfreeze them and distribute them to the balance after the task is completed.
[0138] If it is a deduction freeze, the points field of the user account table is -n, and the frozen field is +n; if it is a grant freeze, the frozen field of the user account table is +n. A new record is added to the freeze log table, the frozen field is the frozen points, and the points type id is the points type id corresponding to the channel id in the parameter.
[0139] If there is a scenario where the frozen points are to be added to the points corresponding to the user ID and the points type ID in the user account table, such as when the order is placed without payment, part of the balance is frozen, but the user does not pay but cancels the order, the frozen points are not consumed, and the balance is returned. Among them, if the release freeze is unfrozen, the user account balance will increase compared to before, so it is counted as a release record; if it is unfrozen by deduction, it just returns the balance that originally belonged to the user, which means no new record is generated. From the user account table, the frozen points amount -n, and the points balance +n. If it is released frozen unfreeze, call the release / recovery points operation, release a point, and add log records such as the flow record table.
[0140] If the frozen points need to be returned to the business party, the frozen points amount - n will be returned from the t_honey_account table; if the frozen points need to be consumed, the method of issuing / recovering points will be called to consume a sum of points, and a new consumption log record such as the transaction record table will be added.
[0141] To obtain the user's specific type of points balance, obtain the record from the user account table based on the uid contained in the parameter and the points type id determined based on the channel id in the parameter and the channel table, and obtain the points balance corresponding to the uid and points type id.
[0142] To obtain a user's specific type of points flow record information, obtain a record list from the flow record table based on user ID, points type ID, flow direction and other parameters. Each record has a channel ID field. Obtain channel details from the channel table based on the channel ID. If it is a distribution record, use the field representing the distribution as the log description; if it is a deduction record, use the field representing the deduction as the log description.
[0143] In the embodiment of the present disclosure, the target resource type corresponding to the target processing operation is determined through the first corresponding relationship, and the target resource matching the target resource type and the target user identifier is determined based on the second corresponding relationship, so as to implement the target processing operation on the target resource corresponding to the target user identifier and the target resource type, and implement the management operation of multiple points in one system at the same time, thereby meeting the business processing requirements of multiple types of resources.
[0144] Fig.13 is a block diagram of a resource processing device 100 according to an exemplary embodiment. Fig.13 , the device includes a determining unit 101 and a processing unit 102.
[0145] Determine unit 101, a user determines parameter information corresponding to a target processing operation to be performed on a resource to be processed, the parameter information includes a target user identifier, a target business identifier, and a target resource processing volume, and based on a first correspondence, determines a target resource type corresponding to the target business identifier, the first correspondence represents the correspondence between the business identifier and the resource type, and in a second correspondence, determines a target resource that matches the target user identifier and the target resource type, the second correspondence represents the correspondence between the resource, the user identifier, and the resource type; a processing unit 102, for performing a target processing operation on the target resource according to the target resource processing volume.
[0146] In one embodiment, the parameter information also includes a target service source identifier associated with the target service identifier, and the processing unit 102 is also used to: in response to a target processing operation including increasing or decreasing the target resource processing capacity of the target resource, obtain a third corresponding relationship, the third corresponding relationship representing the correspondence between the resource processing capacity, the service identifier, the service source identifier, the user identifier, and the resource type identifier; and add a first record in the third corresponding relationship, the first record representing the correspondence between the target resource processing capacity, the target service identifier, the target service source identifier, the target user identifier, and the target resource type identifier.
[0147] In one embodiment, after the processing unit 102 performs a target processing operation on the target resource according to the target resource processing volume, it is also used to: in response to receiving a cancel instruction, the cancel instruction is used to cancel the target resource processing volume increased or decreased for the target resource, obtain the target business source identifier, target business identifier, target user identifier and target resource type identifier that match the target resource processing volume in the third corresponding relationship; cancel the target resource processing volume increased or decreased for the target resource according to the target business source identifier, target business identifier, target user identifier and target resource type identifier.
[0148] In one embodiment, the first corresponding relationship also includes a maximum resource processing capacity corresponding to the business identifier and the resource type; the processing unit 102 performs a target processing operation on the target resource according to the target resource processing capacity in the following manner: in response to the target processing operation being to increase the target resource processing capacity for the target resource, based on the first corresponding relationship, determine the maximum target resource processing capacity that matches the target business identifier and the target resource type identifier; if the target resource processing capacity exceeds the maximum target resource processing capacity, perform the target processing operation on the target resource according to the maximum target resource processing capacity; if the target resource processing capacity does not exceed the maximum target resource processing capacity, perform the target processing operation on the target resource according to the target resource processing capacity.
[0149] In one embodiment, the processing unit 102 is also used to: in response to a target processing operation including increasing a target resource processing capacity for a target resource, obtain a fourth correspondence in a resource library that matches a target user identifier and a target resource type identifier, the fourth correspondence representing a correspondence between available resources and a resource expiration time; and add a second record in the fourth correspondence, the second record representing a correspondence between a target resource processing capacity and a resource expiration time corresponding to the target resource processing capacity.
[0150] In one embodiment, the processing unit 102 is also used to: in response to a target processing operation including reducing a target resource processing volume for a target resource, obtain a second record matching a target user identifier and a target resource type identifier in a fourth correspondence relationship; based on a resource expiration time in the second record, reduce a target resource processing volume for available resources in the second record; and add a third record to a fifth correspondence relationship in a resource library, the fifth correspondence relationship being used to characterize the correspondence between the first record corresponding to the target processing operation, the first record corresponding to the second record, the target resource processing volume, and the target resource type, the third record recording a target business source identifier corresponding to the target resource processing volume reduced in the third correspondence relationship.
[0151] In one embodiment, the processing unit 102 is also used for: in response to parameter information including parameter information for freezing the target resource processing capacity, adding the target resource processing capacity in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and adding a fourth record in the sixth corresponding relationship, the fourth record representing the correspondence between the target resource processing capacity added in the resource freezing item and the target resource type identifier; according to the target resource processing capacity, performing a target processing operation on the target resource, including: in response to the target processing operation including reducing the target resource processing capacity of the target resource, reducing the target resource processing capacity of the target resource; in response to the target processing operation including increasing the target resource processing capacity of the target resource, keeping the target resource unchanged.
[0152] In one embodiment, the processing unit 102 is also used to: in response to meeting the conditions for unfreezing the target resource processing volume, reduce the target resource processing volume in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and increase the target resource processing volume for the current target resource; the current target resource includes a resource whose target resource processing volume is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0153] In one embodiment, the processing unit 102 is also used to: in response to meeting the condition for consuming the target resource processing volume, reduce the target resource processing volume in the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and keep the current target resource unchanged; the current target resource includes a resource whose target resource processing volume is reduced based on the target processing operation, or a resource whose target processing operation keeps the target resource unchanged.
[0154] Fig.14 It is a block diagram of an electronic device 200 for resource processing according to an exemplary embodiment. The electronic device 200 includes a memory 201, a processor 202, and an input / output (I / O) interface 203. The memory 201 is used to store instructions. The processor 202 is used to call the instructions stored in the memory 201 to execute the resource processing method of the embodiment of the present invention. The processor 202 is connected to the memory 201 and the I / O interface 203 respectively, for example, through a bus system and / or other forms of connection mechanisms (not shown). The memory 201 can be used to store programs and data, including the program of the resource processing method involved in the embodiment of the present invention, and the processor 202 executes various functional applications and data processing of the electronic device 200 by running the program stored in the memory 201.
[0155] In the embodiment of the present invention, the processor 202 can be implemented in at least one hardware form of a digital signal processor (Digital Signal Processing, DSP), a field programmable gate array (Field-Programmable Gate Array, FPGA), and a programmable logic array (Programmable Logic Array, PLA). The processor 202 can be a central processing unit (Central Processing Unit, CPU) or one or a combination of other forms of processing units with data processing capabilities and / or instruction execution capabilities.
[0156] The memory 201 in the embodiment of the present invention may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD).
[0157] In the embodiment of the present invention, the I / O interface 203 may be used to receive input instructions (such as digital or character information, and key signal input related to user settings and function control of the electronic device 200), and may also output various information to the outside (such as images or sounds). In the embodiment of the present invention, the I / O interface 203 may include one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a mouse, a joystick, a trackball, a microphone, a speaker, and a touch panel.
[0158] It is to be understood that, although the operations are described in a specific order in the drawings in the embodiments of the present invention, it should not be understood as requiring to perform these operations in the specific order shown or in a serial order, or requiring to perform all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0159] The methods and devices involved in the embodiments of the present invention can be implemented using standard programming techniques, using rule-based logic or other logic to implement various method steps. It should also be noted that the words "device" and "module" used herein and in the claims are intended to include implementations using one or more lines of software code and / or hardware implementations and / or devices for receiving input.
[0160] Any steps, operations or procedures described herein may be performed or implemented using one or more hardware or software modules, either alone or in combination with other devices. In one embodiment, the software module is implemented using a computer program product including a computer-readable medium containing computer program code, which can be executed by a computer processor to perform any or all of the described steps, operations or procedures.
[0161] The foregoing description of the implementation of the present invention has been given for purposes of illustration and description. The foregoing description is not intended to be exhaustive nor to limit the invention to the exact form disclosed, and various variations and modifications are possible in accordance with the above teachings or may be obtained from the practice of the invention. These embodiments are selected and described in order to illustrate the principles of the invention and its practical application, so that those skilled in the art can utilize the invention in various embodiments and with various modifications suitable for the particular use contemplated.
Claims
1. A resource processing method, It is characterized in that The method comprises: Determine parameter information corresponding to a target processing operation to be performed on the resource to be processed, wherein the parameter information includes a target user identifier, a target service identifier, and a target resource processing capacity; Determine the target resource type corresponding to the target service identifier based on a first corresponding relationship, wherein the first corresponding relationship represents a corresponding relationship between the service identifier and the resource type; In a second corresponding relationship, determining a target resource matching the target user identifier and the target resource type, wherein the second corresponding relationship represents a corresponding relationship between resources, user identifiers, and resource types; The target processing operation is performed on the target resource according to the target resource processing capacity.
2. The method according to claim 1, It is characterized in that The parameter information also includes a target service source identifier associated with the target service identifier, and the method further includes: In response to the target processing operation including increasing or decreasing the target resource processing amount for the target resource, acquiring a third corresponding relationship, wherein the third corresponding relationship represents a corresponding relationship between the resource processing amount, the service identifier, the service source identifier, the user identifier, and the resource type identifier; A first record is added to the third corresponding relationship, wherein the first record represents the corresponding relationship among the target resource processing volume, the target service identifier, the target service source identifier, the target user identifier, and the target resource type identifier.
3. The method according to claim 2, It is characterized in that After performing the target processing operation on the target resource according to the target resource processing amount, the method further includes: In response to receiving a cancellation instruction, the cancellation instruction is used to cancel the target resource processing volume increased or decreased for the target resource, and obtain the target service source identifier, the target service identifier, the target user identifier, and the target resource type identifier that match the target resource processing volume in the third corresponding relationship; The target resource processing amount increased or decreased for the target resource is canceled according to the target service source identifier, the target service identifier, the target user identifier and the target resource type identifier.
4. The method according to any one of claims 1 to 3, It is characterized in that The first corresponding relationship also includes a maximum resource processing volume corresponding to the service identifier and the resource type; The performing the target processing operation on the target resource according to the target resource processing amount includes: In response to the target processing operation being to increase the target resource processing capacity of the target resource, determining, based on the first corresponding relationship, a maximum value of the target resource processing capacity that matches the target service identifier and the target resource type identifier; If the processing capacity of the target resource exceeds the maximum processing capacity of the target resource, performing the target processing operation on the target resource according to the maximum processing capacity of the target resource; If the target resource processing capacity does not exceed the target resource processing capacity maximum value, the target processing operation is performed on the target resource according to the target resource processing capacity.
5. The method according to claim 1, It is characterized in that The method further comprises: In response to the target processing operation including increasing the target resource processing amount for the target resource, obtaining a fourth corresponding relationship matching the target user identifier and the target resource type identifier in a resource library, wherein the fourth corresponding relationship represents a corresponding relationship between available resources and resource expiration time; A second record is added to the fourth corresponding relationship, where the second record represents the corresponding relationship between the target resource processing volume and the resource expiration time corresponding to the target resource processing volume.
6. The method according to claim 1, It is characterized in that The method further comprises: In response to the target processing operation including reducing the target resource processing amount for the target resource, obtaining a second record matching the target user identifier and the target resource type identifier in the fourth corresponding relationship; Based on the resource expiration time in the second record, reducing the target resource processing amount for the available resources in the second record; A third record is added in the fifth correspondence of the resource library, and the fifth correspondence is used to characterize the correspondence between the first record corresponding to the target processing operation, the first record corresponding to the second record, the target resource processing volume and the target resource type, and the third record records the target business source identifier corresponding to the target resource processing volume reduced in the third correspondence.
7. The method according to claim 1, It is characterized in that The method further comprises: In response to the parameter information including parameter information for freezing the target resource processing volume, the target resource processing volume is added to the resource freezing item corresponding to the target user identifier and the target resource type identifier in the second corresponding relationship, and a fourth record is added to the sixth corresponding relationship, wherein the fourth record represents the corresponding relationship between the target resource processing volume added in the resource freezing item and the target resource type identifier; The performing the target processing operation on the target resource according to the target resource processing amount includes: In response to the target processing operation including reducing the target resource processing amount on the target resource, reducing the target resource processing amount on the target resource; In response to the target processing operation including increasing the target resource processing capacity of the target resource, the target resource is kept unchanged.
8. A resource processing device, It is characterized in that The device comprises: A determination unit, in which a user determines parameter information corresponding to a target processing operation to be performed on a resource to be processed, wherein the parameter information includes a target user identifier, a target service identifier, and a target resource processing amount, and based on a first corresponding relationship, determines a target resource type corresponding to the target service identifier, wherein the first corresponding relationship represents a corresponding relationship between a service identifier and a resource type, and in a second corresponding relationship, determines a target resource matching the target user identifier and the target resource type, wherein the second corresponding relationship represents a corresponding relationship between a resource, a user identifier, and a resource type; A processing unit is used to perform the target processing operation on the target resource according to the target resource processing capacity.
9. An electronic device, It is characterized in that The electronic device comprises: a memory for storing instructions; and A processor, configured to call the instructions stored in the memory to execute the resource processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed by the processor, the resource processing method according to any one of claims 1 to 7 is executed.
