CN117610815A - Resource quota data processing method, device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN117610815A
CN117610815A CN202311441742.3A CN202311441742A CN117610815A CN 117610815 A CN117610815 A CN 117610815A CN 202311441742 A CN202311441742 A CN 202311441742A CN 117610815 A CN117610815 A CN 117610815A
Authority
CN
China
Prior art keywords
dimension information
preset
information
current
product identifier
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311441742.3A
Other languages
Chinese (zh)
Inventor
潘昔群
王世泽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial Consumer Finance Co Ltd
Original Assignee
Industrial Consumer Finance Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial Consumer Finance Co Ltd filed Critical Industrial Consumer Finance Co Ltd
Priority to CN202311441742.3A priority Critical patent/CN117610815A/en
Publication of CN117610815A publication Critical patent/CN117610815A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries

Abstract

The present application relates to a resource quota data processing method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and corresponding used resource values; acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information; sequentially matching the plurality of pieces of current dimension information with preset dimension information; comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that a plurality of pieces of current dimension information are matched with the preset dimension information; and under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information, executing the limitation of the resource use of the current dimension information. The method can improve the flexibility of limitation of the resource use data.

Description

Resource quota data processing method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technology, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for processing resource quota data.
Background
With the development of computer technology, resource usage limit is particularly important for a system for providing resource interaction for internet users.
The common practice is that when the resource interactive system is developed and designed, the scene related to the limit of the resource use limit is fully considered, and after the system is online, only the scene designed in advance can effectively limit the resource use limit.
However, if the new scenario needs to be limited by the resource usage amount, only the system code can be modified to adapt at this time, and flexible modification cannot be achieved.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a resource quota data processing method, apparatus, computer device, computer readable storage medium, and computer program product that can improve flexibility.
In a first aspect, the present application provides a method for processing resource quota data, the method including:
acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding used resource value;
acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information;
Sequentially matching the plurality of pieces of current dimension information with the preset dimension information;
comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information;
and executing limitation of resource use on the current dimension information under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information.
In one embodiment, the obtaining the target product identifier, the plurality of pieces of current dimension information of the target product identifier, and the corresponding used resource values includes:
acquiring the target product identifier, a plurality of pieces of current dimension information of the target product identifier and corresponding interface codes from a message;
and acquiring the used resource values of the plurality of pieces of current dimension information according to the interface codes corresponding to the plurality of pieces of current dimension information.
In one embodiment, the sequentially matching the plurality of current dimension information with the preset dimension information includes:
extracting the current dimension information and the preset dimension information to obtain first field information and second field information of the current dimension information and first field information and second field information of the preset dimension information;
Traversing the first field information of the preset dimension information based on the first field information of the current dimension information;
and traversing the second field information of the preset dimension information based on the second field information of the current dimension information under the condition that the first field information of the current dimension information is matched with the first field information of the preset dimension information.
In one embodiment, the method further comprises:
for each product identifier, acquiring a plurality of initial dimension information and corresponding initial values of the product identifier;
adjusting the sequence and the effective state of the plurality of initial dimension information;
and obtaining a preset rule set corresponding to the product identifier based on the adjusted multiple initial dimension information and initial values corresponding to the multiple initial dimension information.
In one embodiment, the adjusting the order and the validation state of the plurality of initial dimension information includes:
adjusting the sequence of the plurality of initial dimension information according to the weight of each initial dimension information; the weight is determined based on the application scene corresponding to the product identifier;
and adjusting the effective states corresponding to the plurality of initial dimension information according to the application scenes corresponding to the product identifiers.
In one embodiment, after the case that the plurality of pieces of current dimension information match with the preset dimension information, the method includes:
inquiring the effective state of the preset dimension information;
and when the preset dimension information is valid, continuing to execute the step of comparing the used resource value of each piece of current dimension information with the preset value corresponding to the preset dimension information.
In a second aspect, the present application further provides a resource quota data processing apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding used resource value;
the second acquisition module is used for acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information;
the dimension information matching module is used for sequentially matching the plurality of pieces of current dimension information with the preset dimension information;
the comparison module is used for comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information;
And the execution module is used for executing the limitation of the resource use on the current dimension information under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information.
In a third aspect, the present application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding used resource value;
acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information;
sequentially matching the plurality of pieces of current dimension information with the preset dimension information;
comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information;
and executing limitation of resource use on the current dimension information under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information.
In a fourth aspect, the present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding used resource value;
acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information;
sequentially matching the plurality of pieces of current dimension information with the preset dimension information;
comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information;
and executing limitation of resource use on the current dimension information under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of:
Acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding used resource value;
acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information;
sequentially matching the plurality of pieces of current dimension information with the preset dimension information;
comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information;
and executing limitation of resource use on the current dimension information under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information.
The resource quota data processing method, the device, the computer equipment, the storage medium and the computer program product acquire a corresponding preset rule set according to the product identification, wherein the rule set comprises preset dimension information and preset numerical values corresponding to the preset dimension information; sequentially matching the acquired multiple pieces of current dimension information with preset dimension information; under the condition that a plurality of pieces of current dimension information are matched with preset dimension information, comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information; under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information, the limitation of the resource use is carried out on the current dimension information, the corresponding rule set can be obtained according to the product identification, the matching and the control are carried out, the system development is not needed, and the limitation of the resource use data under the requirements of different product businesses can be flexibly realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related art, the drawings that are required to be used in the embodiments or the related technical descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the drawings without inventive effort for a person having ordinary skill in the art.
FIG. 1 is a diagram of an application environment for a resource quota data processing method in one embodiment;
FIG. 2 is a flow chart of a method for processing resource quota data in one embodiment;
FIG. 3 is a flow chart of sequentially matching a plurality of current dimension information with preset dimension information in one embodiment;
FIG. 4 is a flowchart of a method for processing resource quota data according to another embodiment;
FIG. 5 is a block diagram of a resource quota data processing apparatus in one embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The resource quota data processing method provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server. The server 104 obtains the target product identifier, a plurality of pieces of current dimension information of the target product identifier and corresponding used resource values; acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information; sequentially matching the plurality of pieces of current dimension information with preset dimension information; comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that a plurality of pieces of current dimension information are matched with the preset dimension information; and under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information, executing the limitation of the resource use of the current dimension information. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In an exemplary embodiment, as shown in fig. 2, a resource quota data processing method is provided, and an example of application of the method to the server in fig. 1 is described, which includes the following steps S202 to S206. Wherein:
step S202, a target product identifier, a plurality of pieces of current dimension information of the target product identifier and corresponding used resource values are obtained.
The product identifier can be an identifier distributed by a platform or a system for the product, or a unique identifier set by a developer and is generally used for naming variables, functions, arrays and the like, and the product identifier is a mark used for distinguishing other products and is an information symbol capable of representing the uniqueness of the product; the product identifier may be a temporary product identifier or a permanent product identifier.
Dimension refers to a certain characteristic of a product; the dimension may be divided into an organization, a product, a merchant, a channel number, a feed source, a post, a salary level, and the like, and the dimension information may include a parent dimension name field and an identification of a parent dimension name, and may also include a code of a child dimension name, for example, the parent dimension name field is an organization, the identification of the parent dimension name is gk1, the code of the child dimension name is 001, and the piece of dimension information indicates that the organization 001 is used as a dimension for data statistics and analysis. When the dimension information of the product identifier is a product, the code of the child dimension may be the same as or different from the product identifier.
The value of the used resource corresponding to the dimension information may be one value or may be a plurality of values, for example, the value of the used resource corresponding to the dimension information may be a daily used resource value, a monthly used resource value or a total used resource value, and may be dynamically adjusted according to the application scenario of the product, which does not limit the number.
Optionally, the server may periodically obtain, based on the timing task, the target product identifier a, the dimension information of the mechanism 001, the product a, the channel 001, and the like of the target product identifier a, and the corresponding daily used resource value, the month used resource value may also be the total used resource value. Before the information is obtained, the service needs to make statistics and analysis on a large amount of message data to obtain the information.
Step S204, a preset rule set is obtained according to the target product identification, wherein the rule set comprises preset dimension information and preset numerical values corresponding to the preset dimension information.
The rule set is a set containing a plurality of pieces of preset dimension information and preset numerical values corresponding to the preset dimension information, and can also include the effective state of each rule.
Optionally, the server obtains a preset rule set corresponding to the target product identifier according to the target product identifier, where the rule set includes preset dimension information and preset values corresponding to the preset dimension information, and the preset values may be one or more, or may be a day preset value, a month preset value, and a total preset value, for example, dimension information of a mechanism 001, a product a, a channel 001, etc. of the target product identifier a, and a day preset value, a month preset value, and a total preset value corresponding to the mechanism 001; a day preset value, a month preset value and a total preset value corresponding to the product A; the channel 001 corresponds to a day preset value, a month preset value and a total preset value.
Step S206, matching the plurality of pieces of current dimension information with the preset dimension information in sequence.
The matching may be complete matching or partial matching. The complete matching is that the current dimension information is identical to the current dimension information; the partial matching is that the similarity value of the current dimension information and the preset dimension information reaches a confidence threshold value, and the current dimension information and the preset dimension information are not required to be identical; the preset confidence threshold is set based on the probability that the current dimension information is the same as the preset dimension information.
Optionally, the server completely matches the plurality of pieces of current dimension information with the preset dimension information in sequence, the server selects one piece of current dimension information, traverses the preset dimension information, and when the current dimension information and the preset dimension information are completely matched, the information is selected, and the step of selecting one piece of current dimension information to traverse the preset dimension information is repeatedly executed.
Optionally, the server sequentially performs partial matching on the plurality of pieces of current dimension information and the preset dimension information, the server selects one piece of current dimension information, traverses the preset dimension information, and when the current dimension information and the preset dimension information meet a preset threshold, namely, the pieces of information are selected when the current dimension information and the preset dimension information are partially matched, and repeatedly performs the step of selecting one piece of current dimension information to traverse the preset dimension information.
Step S208, comparing the used resource value of each piece of current dimension information with the preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information.
Optionally, when the plurality of pieces of current dimension information are matched with the preset dimension information, the server compares the used resource value of the current dimension information with the preset value corresponding to the preset dimension information one by one, for example, the used resource value of the current dimension information includes a daily resource used value, a monthly resource used value, a total resource used value, the daily preset value, the monthly preset value and the total preset value corresponding to the preset dimension information, and the server sequentially executes comparison of the daily resource used value and the daily resource used value, comparison of the monthly resource used value and the monthly resource used value, and comparison of the total resource used value and the total resource used value.
In step S210, in the case that the value of the used resource of the current dimension information is greater than the preset value corresponding to the preset dimension information, the limitation of the resource use is performed on the current dimension information.
Optionally, in the case that any one of the used resource values of the current dimension information is greater than a preset value corresponding to the preset dimension information, the server performs limitation of resource use on the current dimension information, that is, cannot perform resource use under the current dimension information.
In the resource quota data processing method, a corresponding preset rule set is obtained according to the product identifier, wherein the rule set comprises preset dimension information and preset numerical values corresponding to the preset dimension information; sequentially matching the acquired multiple pieces of current dimension information with preset dimension information; under the condition that a plurality of pieces of current dimension information are matched with preset dimension information, comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information; under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information, the limitation of the resource use is carried out on the current dimension information, the corresponding rule set can be obtained according to the product identification, the matching and the control are carried out, the system development is not needed, and the limitation of the resource use data under the requirements of different product businesses can be flexibly realized.
In one exemplary embodiment, obtaining a target product identifier, a plurality of current dimensional information of the target product identifier, and a corresponding used resource value includes:
and acquiring the target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding interface code from the message.
The message is a data unit exchanged and transmitted in the network, namely a data block to be sent by the station at one time. The message contains complete data information to be sent, the lengths of the data information are not consistent, the length is not limited and is variable, and the message can be a resource interaction data message. The interface code is a calling interface that enforces the restricted use of resources.
Optionally, the server acquires the target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding interface code from the resource interaction data message.
And acquiring the used resource values of the plurality of pieces of current dimension information according to the interface codes corresponding to the plurality of pieces of current dimension information.
Optionally, the server queries the corresponding interface according to the interface codes corresponding to the plurality of pieces of current dimension information, and obtains the used resource values of the plurality of pieces of current dimension information through the interface.
In this embodiment, the values corresponding to each dimension information are queried through the corresponding interfaces, so that the efficiency of data acquisition can be ensured even if the data volume is increased in a short time, and delay caused by calling one interface does not occur.
In an exemplary embodiment, as shown in fig. 3, sequentially matching the plurality of current dimension information with the preset dimension information includes steps S302 to S306. Wherein:
step S302, extracting current dimension information and preset dimension information to obtain first field information and second field information of the current dimension information and first field information and second field information of the preset dimension information.
Wherein, the first field information may refer to a parent dimension name field; the second field information may refer to a field of the child dimension name code, for example, the parent dimension name field is organization and the child dimension name code field is 001.
Optionally, the server extracts the current dimension information and the preset dimension information according to the field category, so as to obtain first field information and second field information of the current dimension information and first field information and second field information of the preset dimension information.
Step S304, traversing the first field information of the preset dimension information based on the first field information of the current dimension information.
Optionally, the server selects the first field information of the current dimension information and traverses the first field information of the preset dimension information one by one.
Step S306, traversing the second field information of the preset dimension information based on the second field information of the current dimension information under the condition that the first field information of the current dimension information is matched with the first field information of the preset dimension information.
Optionally, the server selects the second field information of the current dimension information and traverses the second field information of the preset dimension information one by one under the condition that the first field information of the current dimension information is matched with the first field information of the preset dimension information.
In this embodiment, by performing matching of the first field information (parent field) and then performing matching of the second field information (sub field), the matched information can be screened out, the amount of traversed data is reduced, and the effect of improving the matching efficiency is achieved.
In an exemplary embodiment, as shown in fig. 4, the resource allowance data processing method further includes steps S402 to S406. Wherein:
step S402, for each product identifier, acquiring a plurality of initial dimension information and corresponding initial values of the product identifier.
Optionally, each product has its own product identifier, and the server obtains, for each product identifier, a plurality of initial dimension information of the product identifier and a corresponding initial numerical value. For example, the server acquires initial dimension information and corresponding initial values of the product identifier A aiming at the product identifier A; the server acquires initial dimension information and corresponding initial values of the product identifier B aiming at the product identifier B.
Step S404, adjusting the sequence and the effective state of the plurality of initial dimension information.
The sequence refers to the position information of the initial dimension information in the rule set; the validation state includes both valid and invalid states.
Optionally, the server adjusts the sequence of the plurality of initial dimension information, and the difference of the sequence of the initial dimension information affects the sequence of executing the matching process; the effective state of the initial dimension information can be selected to be effective or invalid at any time, and the adjusted initial dimension is effective in real time.
Step S406, obtaining a preset rule set corresponding to the product identifier based on the adjusted multiple initial dimension information and initial values corresponding to the multiple initial dimension information.
Optionally, the server generates a preset rule set corresponding to the product identifier based on the adjusted multiple initial dimension information and initial values corresponding to the multiple initial dimension information.
In this embodiment, by adjusting the sequence and the effective state of the initial dimension information, the preset rule set is adjusted at any time based on the application scenario, so that the flexibility of modifying the preset rule set can be improved.
In one exemplary embodiment, adjusting the order and validation state of the plurality of initial dimension information includes:
Adjusting the sequence of the plurality of initial dimension information according to the weight of each initial dimension information; the weight is determined based on the application scenario to which the product identification corresponds.
The weight is determined based on the application scene corresponding to the product identifier, and can be set manually or counted according to dimension information used in the application scene corresponding to the historical product identifier.
Optionally, the server adjusts the sequence of the plurality of initial dimension information according to the weight of each initial dimension information. The weight can be set manually or automatically generated according to dimension information used in the application scene corresponding to the historical product identifier. The weights are dynamically adjustable, so the order of the initial dimension information is also adjusted according to the dynamic adjustment of the weights.
And adjusting the effective states corresponding to the plurality of initial dimension information according to the application scene corresponding to the product identifier.
Optionally, the server adjusts whether each piece of initial dimension information is effective according to the product identification application scene; giving an effective identifier when the initial dimension information is effective; and when the initial dimension information fails, a failure identifier is given. And inquiring the effective state of each piece of initial dimension information according to the effective identification and the failure identification.
In the embodiment, the initial dimension information based on the scene is adjusted more flexibly based on various scenes by adjusting a plurality of initial dimension information through the weight and the application scene, so that the flexibility of adjusting the initial dimension information is improved.
In an exemplary embodiment, after the plurality of current dimension information matches the preset dimension information, the method includes:
inquiring the effective state of the preset dimension information, and continuously executing the step of comparing the used resource value of each piece of current dimension information with the preset value corresponding to the preset dimension information when the preset dimension information is effective.
Optionally, under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information, the server firstly inquires the effective state of the preset dimension information to obtain whether each piece of preset dimension information is effective or not. When the preset dimension information is valid, the server executes the step of comparing the used resource value of each piece of current dimension information with the preset value corresponding to the preset dimension information; and when the preset dimension information fails, stopping executing the matching of the piece of dimension information, and executing the matching of the next piece of dimension information.
In this embodiment, by querying the effective state of the preset dimension information, the preset dimension information of the ineffective state is eliminated, so that the accuracy of resource use limitation can be improved.
In an exemplary embodiment, before sequentially matching the plurality of pieces of current dimension information with the preset dimension information, the method includes:
and inquiring the effective state of the preset dimension information.
Optionally, before sequentially matching the plurality of pieces of current dimension information with the preset dimension information, the server queries the effective state of each piece of preset dimension information according to the effective identifier and the failure identifier.
And screening the preset dimension information with the effective birth effect state.
Optionally, the server screens preset dimension information with the effective birth effect state, and matches the preset dimension information with the current dimension information in sequence.
In this embodiment, by screening out the effective preset dimension information in advance, the amount of matched data is reduced, and the efficiency of dimension information matching can be improved.
In an exemplary embodiment, the server obtains the target product identifier a, a plurality of pieces of current dimension information of the target product identifier a, such as the organization-001, the product-a, the channel-001 and the corresponding interface codes, from the resource interaction data message, queries the corresponding interface according to the interface codes corresponding to the plurality of pieces of current dimension information, and obtains the used resource values of the plurality of pieces of current dimension information through the interface, wherein the used resource values include a daily used resource value, a monthly used resource value and a total used resource value.
Acquiring a preset rule set according to the target product identifier A, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information; the preset dimension information comprises institutions, products, merchants, channel numbers, feed sources, posts and salary levels, and the institutions comprise 001 and 002; the dimensions of the product, the merchant and the like also comprise corresponding contents to form a rule, such as an organization-001, an organization-002 and preset numerical values corresponding to each rule, wherein the preset numerical values comprise preset daily numerical values, preset month numerical values and preset total numerical values. For each product identifier, acquiring a plurality of initial dimension information and corresponding initial values of the product identifier; adjusting the sequence of the plurality of initial dimension information according to the weight of each initial dimension information; the weight is determined based on the application scene corresponding to the product identifier; adjusting effective states corresponding to the plurality of initial dimension information according to the application scene corresponding to the product identifier; and obtaining a preset rule set corresponding to the product identifier based on the adjusted multiple initial dimension information and initial values corresponding to the multiple initial dimension information.
Extracting current dimension information and preset dimension information to obtain first field information of the current dimension information, namely a father dimension name field and a second field information child dimension name code field, and first field information of the preset dimension information, namely a father dimension name field and a second field information child dimension name code field; traversing the first field information of the preset dimension information based on the first field information of the current dimension information; under the condition that the first field information of the current dimension information is matched with the first field information of the preset dimension information, traversing the second field information of the preset dimension information based on the second field information of the current dimension information, if the current dimension information comprises an organization-001, traversing the organization field through a preset father dimension name field, when the preset father dimension name field is also an organization, then removing a matched child dimension name code, when the preset child dimension name code field is also 001, checking whether a preset organization-001 is effective, and when the preset child dimension name code field is effective, further comparing the daily used resource value, the month used resource value and the total used resource value one by one to a preset daily value, a preset month value and a preset total value. And under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information, executing the limitation of the resource use of the current dimension information.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a resource quota data processing device for realizing the above related resource quota data processing method. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the one or more X-resource quota data processing apparatus provided below may refer to the limitation of the resource quota data processing method hereinabove, and will not be repeated herein.
In an exemplary embodiment, as shown in fig. 5, there is provided a resource quota data processing apparatus including: a first acquisition module 501, a second acquisition module 502, a dimension information matching module 503, a comparison module 504, and an execution module 505, wherein:
the first obtaining module 501 is configured to obtain a target product identifier, a plurality of pieces of current dimension information of the target product identifier, and a corresponding value of a used resource.
The second obtaining module 502 is configured to obtain a preset rule set according to the target product identifier, where the rule set includes preset dimension information and a preset value corresponding to the preset dimension information.
The dimension information matching module 503 is configured to match the plurality of pieces of current dimension information with the preset dimension information in sequence.
And the comparison module 504 is configured to compare the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information when the plurality of pieces of current dimension information are matched with the preset dimension information.
An execution module 505, configured to execute limitation of resource usage on the current dimension information if the value of the used resource of the current dimension information is greater than a preset value corresponding to the preset dimension information.
In one exemplary embodiment, the first acquisition module 501 includes:
The first acquisition unit is used for acquiring the target product identifier, a plurality of pieces of current dimension information of the target product identifier and corresponding interface codes from the message;
and the second acquisition unit is used for acquiring the used resource values of the plurality of pieces of current dimension information according to the interface codes corresponding to the plurality of pieces of current dimension information.
In one exemplary embodiment, the dimension information matching module 503 includes:
the extraction unit is used for extracting the current dimension information and the preset dimension information to obtain first field information and second field information of the current dimension information and first field information and second field information of the preset dimension information;
the first traversing unit is used for traversing the first field information of the preset dimension information based on the first field information of the current dimension information;
and the second traversing unit is used for traversing the second field information of the preset dimension information based on the second field information of the current dimension information under the condition that the first field information of the current dimension information is matched with the first field information of the preset dimension information.
In an exemplary embodiment, the resource quota data processing apparatus further comprises:
the third acquisition module is used for acquiring a plurality of initial dimension information and corresponding initial values of the product identifiers aiming at each product identifier;
The adjusting module is used for adjusting the sequence and the effective state of the plurality of initial dimension information;
the generation module is used for obtaining a preset rule set corresponding to the product identifier based on the adjusted multiple initial dimension information and initial values corresponding to the multiple initial dimension information.
In one exemplary embodiment, the adjustment module includes:
the sequence adjusting unit is used for adjusting the sequence of the plurality of initial dimension information according to the weight of each initial dimension information; the weight is determined based on the application scene corresponding to the product identifier;
and the state adjusting unit is used for adjusting the effective states corresponding to the plurality of initial dimension information according to the application scene corresponding to the product identifier.
In one exemplary embodiment of the present invention,
the inquiring unit is used for inquiring the effective state of the preset dimension information;
and the execution unit is used for continuously executing the step of comparing the used resource value of each piece of current dimension information with the preset value corresponding to the preset dimension information when the preset dimension information is valid.
The respective modules in the above-described resource allowance data processing apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one exemplary embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing resource quota data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a resource quota data processing method.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is merely a block diagram of some of the structures associated with the present application and is not limiting of the computer device to which the present application may be applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.

Claims (10)

1. A method of processing resource quota data, the method comprising:
acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding used resource value;
acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information;
Sequentially matching the plurality of pieces of current dimension information with the preset dimension information;
comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information;
and executing limitation of resource use on the current dimension information under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information.
2. The method of claim 1, wherein the obtaining the target product identifier, the plurality of current dimensional information for the target product identifier, and the corresponding used resource value comprises:
acquiring the target product identifier, a plurality of pieces of current dimension information of the target product identifier and corresponding interface codes from a message;
and acquiring the used resource values of the plurality of pieces of current dimension information according to the interface codes corresponding to the plurality of pieces of current dimension information.
3. The method of claim 1, wherein sequentially matching the plurality of current dimension information with the preset dimension information comprises:
Extracting the current dimension information and the preset dimension information to obtain first field information and second field information of the current dimension information and first field information and second field information of the preset dimension information;
traversing the first field information of the preset dimension information based on the first field information of the current dimension information;
and traversing the second field information of the preset dimension information based on the second field information of the current dimension information under the condition that the first field information of the current dimension information is matched with the first field information of the preset dimension information.
4. The method according to claim 1, wherein the method further comprises:
for each product identifier, acquiring a plurality of initial dimension information and corresponding initial values of the product identifier;
adjusting the sequence and the effective state of the plurality of initial dimension information;
and obtaining a preset rule set corresponding to the product identifier based on the adjusted multiple initial dimension information and initial values corresponding to the multiple initial dimension information.
5. The method of claim 4, wherein said adjusting the order and validation state of the plurality of initial dimension information comprises:
Adjusting the sequence of the plurality of initial dimension information according to the weight of each initial dimension information; the weight is determined based on the application scene corresponding to the product identifier;
and adjusting the effective states corresponding to the plurality of initial dimension information according to the application scenes corresponding to the product identifiers.
6. The method according to claim 4, wherein after the case that the plurality of current dimension information matches the preset dimension information, comprising:
inquiring the effective state of the preset dimension information;
and when the preset dimension information is valid, continuing to execute the step of comparing the used resource value of each piece of current dimension information with the preset value corresponding to the preset dimension information.
7. A resource quota data processing apparatus, the apparatus comprising:
the first acquisition module is used for acquiring a target product identifier, a plurality of pieces of current dimension information of the target product identifier and a corresponding used resource value;
the second acquisition module is used for acquiring a preset rule set according to the target product identifier, wherein the rule set comprises preset dimension information and preset values corresponding to the preset dimension information;
The dimension information matching module is used for sequentially matching the plurality of pieces of current dimension information with the preset dimension information;
the comparison module is used for comparing the used resource value of each piece of current dimension information with a preset value corresponding to the preset dimension information under the condition that the plurality of pieces of current dimension information are matched with the preset dimension information;
and the execution module is used for executing the limitation of the resource use on the current dimension information under the condition that the value of the used resource of the current dimension information is larger than the preset value corresponding to the preset dimension information.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202311441742.3A 2023-11-01 2023-11-01 Resource quota data processing method, device, computer equipment and storage medium Pending CN117610815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311441742.3A CN117610815A (en) 2023-11-01 2023-11-01 Resource quota data processing method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311441742.3A CN117610815A (en) 2023-11-01 2023-11-01 Resource quota data processing method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117610815A true CN117610815A (en) 2024-02-27

Family

ID=89955178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311441742.3A Pending CN117610815A (en) 2023-11-01 2023-11-01 Resource quota data processing method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117610815A (en)

Similar Documents

Publication Publication Date Title
CN111046237B (en) User behavior data processing method and device, electronic equipment and readable medium
CN112449009B (en) SVD-based communication compression method and device for Federal learning recommendation system
US20190180057A1 (en) Fingerprint-based configuration typing and classification
CN106557307B (en) Service data processing method and system
CN113408668A (en) Decision tree construction method and device based on federated learning system and electronic equipment
CN111625561B (en) Data query method and device
CN114327374A (en) Business process generation method and device and computer equipment
CN113326523A (en) Privacy calculation method and device and electronic equipment
CN111667018B (en) Object clustering method and device, computer readable medium and electronic equipment
CN117610815A (en) Resource quota data processing method, device, computer equipment and storage medium
CN112073395B (en) File distribution method and device
CN113779132A (en) Data import method and device, computer equipment and storage medium
CN111694876A (en) Method and device for realizing ID mapping based on Spark framework
US20240078222A1 (en) Selective Addition of Datum to a Tree Data Structure
CN117216164A (en) Financial data synchronous processing method, apparatus, device, medium and program product
CN110019352B (en) Method and apparatus for storing data
CN116720935A (en) Account category identification method, apparatus, computer device and storage medium
CN116228305A (en) Data verification method, device, computer equipment and storage medium
CN117391702A (en) Account data verification method, account data verification device, computer equipment and storage medium
CN116962054A (en) Data processing method, device, computer equipment and storage medium
CN115629958A (en) Universal field level automatic checking method and device for different service interfaces
CN117435576A (en) Data migration method, data migration device, computer equipment, storage medium and product
CN116485096A (en) Resource processing method, device, computer equipment and storage medium
CN117407156A (en) Target data extraction method, device, computer equipment and storage medium
CN116610703A (en) Data query method, device, computer equipment and storage medium

Legal Events

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