CN111538576B - Data resource processing method, device, equipment and storage medium - Google Patents

Data resource processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN111538576B
CN111538576B CN202010312811.0A CN202010312811A CN111538576B CN 111538576 B CN111538576 B CN 111538576B CN 202010312811 A CN202010312811 A CN 202010312811A CN 111538576 B CN111538576 B CN 111538576B
Authority
CN
China
Prior art keywords
resource
data
bin
calling
data resource
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.)
Active
Application number
CN202010312811.0A
Other languages
Chinese (zh)
Other versions
CN111538576A (en
Inventor
施萍
刁仁祥
祁超
周根伟
吴跃嘉
潘晓峰
吴磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010312811.0A priority Critical patent/CN111538576B/en
Priority to CN202310492357.5A priority patent/CN116578397A/en
Publication of CN111538576A publication Critical patent/CN111538576A/en
Application granted granted Critical
Publication of CN111538576B publication Critical patent/CN111538576B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural

Abstract

An embodiment of the present specification provides a data resource processing method, apparatus, device, and storage medium, where the method includes: a resource allocation instruction for allocating data resources for a target object is obtained. The target object has a first resource bin in which is stored a first data resource of a first data type allocated for the target object. The resource allocation instruction is to instruct allocation of a second data resource of a second data type for the target object. And creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, and allocating the second data resource to the first resource bin. After the data resource calling instruction of the target object is obtained, if the data resource calling instruction meets the calling condition corresponding to the second data type, the second data resource is called from the first resource bin, and otherwise, the first data resource is called from the first resource bin.

Description

Data resource processing method, device, equipment and storage medium
Technical Field
The present document relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing data resources.
Background
In a computer system, a resource caller needs to call various data resources in the running process to meet the running requirement. For example, a program in a computer is used as a resource calling party, and data of other programs are required to be called in the running process. To facilitate the resource caller's invocation, the resource caller may be pre-allocated with the required data resources.
However, with the complexity of the running process of the resource caller, the resource caller is required to call many types of data resources in the running process, so it is necessary to provide a technical solution to improve the calling efficiency of the data resources.
Disclosure of Invention
An object of one embodiment of the present disclosure is to provide a data resource processing method, apparatus, device, and storage medium, so as to improve the calling efficiency of data resources.
To solve the above technical problems, an embodiment of the present specification is implemented as follows:
one embodiment of the present disclosure provides a data resource processing method, including: a resource allocation instruction for allocating data resources for a target object is obtained. The target object has a first resource bin in which first data resources of a first data type allocated for the target object are stored. The resource allocation instruction is to instruct allocation of a second data resource of a second data type for the target object. And creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocating the second data resource to the first resource bin, and recording the resource remaining amount of the second data resource in the second resource bin according to an allocation result. After the data resource calling instruction of the target object is obtained, if the data resource calling instruction accords with the calling condition corresponding to the second data type, the second data resource is called from the first resource bin, the resource remaining amount of the second data resource recorded in the second resource bin is modified according to a calling result, and if not, the first data resource is called from the first resource bin.
One embodiment of the present specification provides a data resource processing apparatus, including: the acquisition module acquires a resource allocation instruction for allocating data resources for the target object. The target object has a first resource bin in which first data resources of a first data type allocated for the target object are stored. The resource allocation instruction is to instruct allocation of a second data resource of a second data type for the target object. And the allocation module is used for creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocating the second data resource to the first resource bin, and recording the resource remaining quantity of the second data resource in the second resource bin according to an allocation result. And the calling module is used for calling the second data resource from the first resource bin after the data resource calling instruction of the target object is acquired, if the data resource calling instruction accords with the calling condition corresponding to the second data type, modifying the resource remaining amount of the second data resource recorded in the second resource bin according to a calling result, and otherwise, calling the first data resource from the first resource bin.
One embodiment of the present specification provides a data resource processing apparatus including: a processor and a memory arranged to store computer executable instructions. The computer executable instructions, when executed, cause the processor to perform the steps of the data resource processing method described above.
An embodiment of the present specification provides a storage medium storing computer-executable instructions that, when executed, implement the steps of the data resource processing method described above.
Drawings
In order to more clearly illustrate the technical solution in one or more embodiments of the present description, the following description will briefly introduce the drawings that are needed in the embodiments or the description of the prior art, it is obvious that the drawings in the following description are only some embodiments described in the present description, and other drawings may be obtained according to these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a flow chart illustrating a method for processing data resources according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of calling a second data resource from a first resource bin according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart of calling a first data resource from a first resource bin according to an embodiment of the present disclosure;
FIG. 4 is a schematic diagram illustrating the module composition of a data resource processing device according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a data resource processing device according to an embodiment of the present disclosure.
Detailed Description
In order to enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one or more embodiments of the present disclosure without inventive faculty, are intended to be within the scope of the present disclosure.
An object of one embodiment of the present disclosure is to provide a data resource processing method, apparatus, device, and storage medium, so as to improve the calling efficiency of data resources. The data resource processing method can be applied to a background server (hereinafter referred to as a server) and executed by the server.
Fig. 1 is a flow chart of a data resource processing method according to an embodiment of the present disclosure, as shown in fig. 1, the method includes the following steps:
step S102, a resource allocation instruction for allocating data resources to a target object is acquired, the target object is provided with a first resource bin, the first resource bin stores first data resources of a first data type allocated to the target object, and the resource allocation instruction is used for indicating allocation of second data resources of a second data type to the target object;
step S104, creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocating second data resources to the first resource bin, and recording the resource remaining amount of the second data resources in the second resource bin according to the allocation result;
step S106, after the data resource calling instruction of the target object is obtained, if the data resource calling instruction meets the calling condition corresponding to the second data type, calling the second data resource from the first resource bin, modifying the resource remaining amount of the second data resource recorded in the second resource bin according to the calling result, and otherwise, calling the first data resource from the first resource bin.
In this embodiment, the target object has a first resource bin, where a first data resource of a first data type allocated for the target object is stored. When a second data resource of a second data type is allocated for the target object, a second resource bin is created under the first resource bin, and the second data resource is allocated to the first resource bin. The second resource bin is used for recording the resource remaining amount of the second data resource. And when the target object needs to call the resource, if the call condition of the second data type is met, calling the second data resource from the first resource bin, and otherwise, calling the first data resource from the first resource bin. Therefore, according to the embodiment, under the condition that the target object is allocated with the data resources of multiple data types, the data resources of various data types can be uniformly allocated in one resource bin, so that the accessed resource bin does not need to be frequently switched under the condition that the data resources of various data types are frequently called, the data resources of various data types can be called from the same resource bin, the problem of low data resource calling efficiency caused by frequently switching the accessed resource bin is avoided, and the calling efficiency of the data resources is improved.
The data resource processing method can be applied to a server, and is executed by the server, wherein the server has the functions of receiving a resource allocation instruction and allocating data resources for a target object, and the functions of receiving a data resource calling instruction of the target object and calling the data resources required by the target object.
In an exemplary embodiment (hereinafter referred to as a first embodiment) of the present specification, the target object may be a target program inside a computer, and specifically may be a target program inside the server described above. The first data resource of the first data type may be exemplified by first program data of a first type program which communicates with the program, the first program data may be data generated in the running process of the first type program, and the first data type is a data type corresponding to the first program data. The second data resource of the second data type may be exemplified by second program data of a second type program which communicates with the program, the second program data may be data generated during the running of the second type program, and the second data type is a data type corresponding to the second program data. The first class program and the second class program can be obtained by dividing according to a predetermined class division rule. The first type of program and the second type of program are not the same type of program, and the first data type and the second data type are not the same. Correspondingly, the resource remaining amount of the first data resource is the remaining data amount of the first program data, and the resource remaining amount of the second data resource is the remaining data amount of the second program data. The first and second resource bins may be understood as a repository of target objects for storing allocated data resources. The first resource bin and the second resource bin may be embodied within the computer system as two blocks of memory space of fixed storage size for storing the data resources to which the target object is allocated. The storage space sizes of the first and second resource bins may be the same or different.
In another example embodiment (hereinafter referred to as a second embodiment) of the present specification, the target object may be a user of the computer program, i.e., a user. The first data resource of the first data type may be exemplified by a user's own funds, and not funds obtained by a network lending platform lending, the first data type being an own funds type. The second data resource of the second data type may be, for example, a loan funds obtained by a user loaning through the network loan platform, and is not the original owned funds of the user, and the second data type is a loan funds type. Correspondingly, the resource remaining amount of the first data resource is the balance of the own funds of the user, and the resource remaining amount of the second data resource is the balance of the borrowed funds of the user. The first resource repository may be a balance account of the user, and the balance account may store the user's own funds and record the balance of the user's own funds in the event that the user does not borrow funds via the network lending platform. The second resource bin is a borrowing account which is created under the balance account of the user and belongs to the balance account of the user, and under the condition that the user borrows funds through the network borrowing platform, the funds obtained by the borrowing of the user are stored under the balance account of the user, and the balance of the borrowing funds of the user is recorded in the borrowing account of the user.
In the first embodiment described above, the server acquires the resource allocation instruction for allocating the data resource to the target object, and the resource allocation instruction may be transmitted to the server by another server, or by the target object, or by the electronic device where the target object is located, or by the electronic device used by the target object, or by the server, which is not limited herein. The resource allocation instruction is to instruct allocation of a second data resource of a second data type for the target object. In the first embodiment described above, the resource allocation instruction is used to instruct allocation of the second program data to the target object. In the second embodiment, the resource allocation instruction may be an instruction for issuing a loan fund to the user according to a loan behavior instruction of the user on the network platform.
After receiving the resource allocation instruction, the server creates a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction. Specifically, the second resource bin is located below the first resource bin, subject to the first resource bin. For example, in the first embodiment, the second resource bin and the first resource bin are two blocks of storage space associated with each other, and the second resource bin is subordinate to the first resource bin. In the second embodiment described above, the user can see his/her balance account and debit account at the user terminal, and the debit account is subordinate to the balance account as a sub-account of the balance account. One of the sub-accounts that the user may browse to the balance account on the detailed page of the balance account is a debit account.
Then, the server also allocates the second data resource to the first resource bin, and records the resource remaining amount of the second data resource in the second resource bin according to the allocation result. For example, in the first embodiment described above, the server stores the second program data to the first resource bin, and records the remaining data amount of the second program data in the second resource bin. In the second embodiment described above, the server issues the loan funds of the user to the balance account of the user, and records the balance of the loan funds of the user in the loan account of the user.
The server then receives a data resource call instruction of the target object, where the instruction may be sent to the server by the target object, or sent to the server by an electronic device in which the target object is located, or sent to the server by an electronic device used by the target object, and is not limited herein. And the server judges whether the data resource calling instruction accords with a calling condition corresponding to the second data type, if so, the server calls the second data resource from the first resource bin, and the resource remaining amount of the second data resource recorded in the second resource bin is modified according to a calling result. If not, the server invokes the first data resource from the first resource bin. After the server calls the resource, a notification message of successful resource call can be returned to the target object, the called resource can also be returned to the target object, and the server can execute subsequent operation after successful resource call according to a specific scene, which is not limited herein.
In the first embodiment, after receiving the data resource calling instruction, if it is determined that the data resource calling instruction meets a preset calling condition corresponding to the second data type, the server calls the second data resource from the first resource bin, that is, calls the second program data, and modifies the remaining data amount of the second program data recorded in the second resource bin according to the calling result, such as the size of the called data amount. And if the server determines that the data resource calling instruction does not meet the preset calling condition corresponding to the second data type, calling the first data resource from the first resource bin, namely calling the first program data. In this embodiment, the server may return the invoked resource to the target object.
In the above second embodiment, the data resource call instruction may be a payment instruction of the user. And after receiving the payment instruction, if the payment instruction is determined to be in accordance with the preset payment condition corresponding to the borrowed funds, the server invokes the borrowed funds of the user from the balance account of the user to pay, and modifies the balance of the borrowed funds recorded in the borrowed account of the user according to the amount of payment. And if the server determines that the payment instruction does not meet the payment condition corresponding to the preset borrowed funds, calling the owned funds of the user from the balance account of the user to pay. In this embodiment, the server may return a notification message to the user that the payment was successful.
It can be seen that, taking the first embodiment as an example, the specific procedure of the method in fig. 1 is summarized as follows: the target program has a first resource bin storing first program data, the first resource bin being a block of memory space. When the server receives an instruction for distributing second program data for the target program, according to the instruction, another storage space is opened up as a second resource bin of the target program, and the second resource bin is set to be subordinate to the first resource bin. The server allocates the second program data in the first resource bin and records the remaining data amount of the second program data in the second resource bin. After receiving a data resource calling instruction of the target program, if the instruction meets a preset calling condition corresponding to the second data type, the server calls the second program data from the first resource bin, and modifies the residual data volume of the second program data recorded in the second resource bin according to the size of the called data volume. And if the server determines that the data resource calling instruction does not accord with the preset calling condition corresponding to the second data type, calling the first program data from the first resource bin. The server may return the invoked resource to the target program.
It can be seen that, taking the second embodiment as an example, the specific procedure of the method in fig. 1 is summarized as follows: the user has a balance account stored with funds. When the server receives an instruction for issuing borrowed funds for the user, the server creates a borrowed account subordinate to the balance account for the user under the balance account of the user, and the borrowed account is a sub-account of the balance account. The server issues the user's debit funds to the user's balance account and records the user's debit funds's balance in the user's debit account. And after receiving the payment instruction, if the payment instruction is determined to be in accordance with the preset payment condition corresponding to the borrowed funds, the server invokes the borrowed funds of the user from the balance account of the user to pay, and modifies the balance of the borrowed funds recorded in the borrowed account of the user according to the amount of payment. And if the server determines that the data resource calling instruction does not meet the preset payment condition corresponding to the borrowed funds, calling the owned funds of the user from the balance account of the user to pay. In this embodiment, the server may return a notification message of successful payment to the target object.
According to the two embodiments, through the data resource processing method, under the condition that the target object is allocated with the data resources of multiple data types, the data resources of the multiple data types can be uniformly allocated in one resource bin, so that the accessed resource bin is not required to be frequently switched under the condition that the data resources of the multiple data types are frequently called, the data resources of the multiple data types can be called from the same resource bin, the problem of low data resource calling efficiency caused by the frequently switched accessed resource bin is avoided, and the calling efficiency of the data resources is improved.
It should be noted that the above two embodiments are only two exemplary embodiments, and the present specification may also have other embodiments. For example, the target object may also be a virtual machine, the first data resource may be a CPU resource, the second data resource may be a GPU resource, the first resource bin may be a first cloud computing space of the virtual machine, and the second resource bin may be a second cloud computing space of the virtual machine. Or the target object is a file reading system, the first data resource is first file data of a first type file, the second data resource is second file data of a second type file, the first resource bin is a first storage space of the file reading system, and the second resource bin is a second storage space of the file reading system. And are not exemplified here.
The specific procedure of the data resource processing method will be described in detail.
In the step S106, if the data resource calling instruction meets the calling condition corresponding to the second data type, the second data resource is called from the first resource bin, specifically: if the resource use scene identifier carried in the data resource calling instruction is a legal use scene identifier corresponding to the second data type, determining that the data resource calling instruction accords with a calling condition corresponding to the second data type, and calling the second data resource from the first resource bin.
Specifically, legal usage scenario identifiers corresponding to the second data types are preset, the identifiers are used for representing the scenarios where the second data resources are allowed to be used, and the number of the identifiers can be one or more. In step S106, the server extracts a resource usage scenario identifier from the data resource call instruction, where the identifier indicates what the usage scenario corresponds to the called resource indicated by the target object. Judging whether the resource use scene identifier is a legal use scene identifier corresponding to the second data type, if so, indicating that the use scene corresponding to the called resource indicated by the server is a scene allowing the second data resource to be used, so that the server determines that the data resource calling instruction accords with the calling condition corresponding to the second data type, and calling the second data resource from the first resource bin. If not, the situation that the usage scenario corresponding to the called resource indicated by the server is not the scenario allowing the second data resource to be used is indicated, the server determines that the data resource calling instruction does not accord with the calling condition corresponding to the second data type, and the first data resource is called from the first resource bin.
In the first embodiment, after receiving the data resource call instruction, the server extracts the resource usage scenario identifier from the instruction, for example, the identifier is "cloud computing", and then indicates that the resource indicated to be called by the target object is to be used in the cloud computing scenario. Then, the server judges whether the extracted identification is a preset legal use scene identification. If the judgment result is yes, the fact that the use scene corresponding to the called resource indicated by the server is the scene allowing the second program data to be used is indicated, and the server calls the second program data from the first resource bin. If the judgment result is not yes, the fact that the use scene corresponding to the called resource indicated by the server is not the scene allowing the second program data to be used is indicated, and the server calls the first program data from the first resource bin. For example, if the legal usage scenario identifier includes "cloud computing" and "big data", the server calls the second program data from the first resource bin, and if the legal usage scenario identifier includes only "big data", the server calls the first program data from the first resource bin.
In the second embodiment, the data resource call instruction may be a payment instruction of the user, and after receiving the payment instruction, the server extracts a resource usage scenario identifier from the instruction, for example, the identifier is "daily necessities", and indicates that the resource (i.e. the cost to be paid by the user) that is called by the target object is used in the scenario of "purchasing daily necessities". Then, the server judges whether the extracted identification is a preset legal use scene identification. If the result is yes, the use scene corresponding to the called fee indicated by the server is the scene allowing the use of the borrowed funds, and the server calls the borrowed funds of the user from the balance account to pay. If the result is not yes, the situation that the use scene corresponding to the called fee indicated by the server is not the scene allowing the use of the borrowed funds is indicated, and the server calls the own funds of the user from the balance account to pay. For example, if the legal usage scenario identifier includes "daily necessities" and "electronic products", the server invokes the lending funds of the user from the balance account to pay, and if the legal usage scenario identifier includes only "electronic products", the server invokes the owned funds of the user from the balance account to pay.
It can be seen that, through this embodiment, it can be determined whether the resource usage scenario identifier carried in the data resource calling instruction is a legal usage scenario identifier corresponding to the second data type, if yes, the second data resource is called from the first resource bin, if not, the first data resource is called from the first resource bin, so that when the called resource, that is, the corresponding usage scenario is a scenario that allows the second data resource to be used, the second data resource is called, otherwise, the first data resource is called, and the effect of ensuring that the called second data resource can be reasonably used is achieved.
In this embodiment, since the first data resource allocated to the target object is also stored in the first resource bin, the resource remaining amount of the first data resource may also be recorded in the first resource bin. In the case that the remaining amount of resources of the first data resource is also recorded in the first resource bin, the method in this embodiment further includes: after the second data resource is allocated to the first resource bin, the resource remaining amount of the second data resource is recorded in the first resource bin according to the allocation result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource is recorded.
Specifically, after the second data resource is allocated to the first resource bin, not only the resource remaining amount of the second data resource is recorded in the second resource bin, but also the resource remaining amount of the second data resource is recorded in the first resource bin, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource is recorded. The first resource bin also records the resource surplus of the first data resource.
Taking the first embodiment as an example, table 1 below shows the data record forms of the first resource bin and the second resource bin.
TABLE 1
Figure BDA0002458491090000091
Taking the second embodiment as an example, table 2 below shows the data record forms of the balance account and the debit account.
TABLE 2
Balance account Debit and credit account
Balance of owned funds 100 yuan
Balance of borrowed funds 50 yuan 50 yuan
Sum total 150 yuan
Therefore, according to the embodiment, the resource surplus of the first data resource and the resource surplus of the second data resource can be clearly and detailed recorded in the first resource bin and the second resource bin, so that the subsequent analysis and use are facilitated.
The present embodiment also provides a process of calling a second data resource from the first resource bin, as shown in fig. 2, which is a schematic flow chart of calling the second data resource from the first resource bin according to an embodiment of the present disclosure, as shown in fig. 2, where the flow includes:
Step S202, extracting a field value of a specific field from a data resource calling instruction, wherein the field value represents the data resource quantity indicated to be called by a target object;
step S204, if the indicated amount of the called data resources is smaller than or equal to the resource remaining amount of the second data resources recorded in the first resource bin or the second resource bin, calling the second data resources from the first resource bin according to the indicated amount of the called data resources;
in step S206, if the indicated amount of the called data resources is greater than the remaining amount of the second data resources recorded in the first or second resource bins and less than or equal to the sum, all the second data resources are called from the first resource bins, and part or all of the first data resources are called.
Specifically, a field value of a particular field is extracted from the data resource call instruction, the field value representing the amount of data resource that is indicated to be invoked by the target object. And if the indicated data resource quantity is less than or equal to the resource residual quantity of the second data resource recorded in the first resource bin or the second resource bin, calling the second data resource from the first resource bin according to the indicated data resource quantity, and modifying the resource residual quantity of the second data resource recorded in the first resource bin and the second resource bin according to the called resource residual quantity of the second data resource.
And if the indicated amount of the called data resources is determined to be larger than the first resource bin or the resource remaining amount of the second data resources recorded in the second resource bin and smaller than or equal to the sum, calling all the second data resources from the first resource bin, calling part or all of the first data resources, and finally, the sum of the amount of the called second data resources and the amount of the called first data resources is equal to the indicated amount of the called data resources. After the call, the resource surplus of the second data resource recorded in the first resource bin and the second resource bin is modified according to the called resource surplus of the second data resource, the resource surplus of the first data resource recorded in the first resource bin is modified according to the called resource surplus of the first data resource, and the sum of the resource surplus of the first data resource and the resource surplus of the second data resource recorded in the first resource bin is modified according to the called resource surplus of the first data resource and the called resource surplus of the second data resource.
And if the data resource quantity indicated to be called is determined to be greater than the sum, sending a notification message of call failure to the target object.
In the first embodiment described above, the server extracts a field value of a specific field, which represents the amount of data instructed to be invoked by the target program, from the data resource invocation instruction. And if the indicated data volume of the call is less than or equal to the remaining data volume of the second program data recorded in the first resource bin or the second resource bin, calling the second program data from the first resource bin according to the indicated data volume of the call, and modifying the remaining data volumes of the second program data recorded in the first resource bin and the second resource bin according to the called remaining data volume of the second program data.
And if the data quantity of the instructed call is determined to be larger than the residual data quantity of the second program data recorded in the first resource bin or the second resource bin and smaller than or equal to the sum, all the second program data are called from the first resource bin, part or all of the first program data are called, and finally the sum of the data quantity of the called second program data and the data quantity of the called first program data is equal to the data quantity of the instructed call. After the calling, the residual data amount of the second program data recorded in the first resource bin and the second resource bin is modified according to the residual data amount of the second program data after the calling, the residual data amount of the first program data recorded in the first resource bin is modified according to the residual data amount of the first program data after the calling, and the sum of the residual data amount of the first program data and the residual data amount of the second program data recorded in the first resource bin is modified according to the residual data amount of the first program data after the calling and the residual data amount of the second program data.
And if the data quantity of the indicated call is determined to be larger than the sum, sending a notification message of call failure to the target object.
In the second embodiment described above, the server extracts a field value of a specific field from the data resource call instruction, the field value representing the amount of funds to be called instructed by the user. And if the indicated amount of the transferred funds is less than or equal to the balance of the borrowed funds recorded in the balance account or the borrowed account, transferring the borrowed funds of the user from the balance account according to the indicated amount of the transferred funds, and modifying the balance of the balance account and the borrowed funds recorded in the borrowed account according to the balance of the transferred borrowed funds.
If the indicated amount of funds transferred is determined to be greater than the balance account or the balance of funds transferred recorded in the credit account and less than or equal to the sum, transferring all of the funds transferred from the balance account and transferring part or all of the funds owned by the user, and finally transferring the sum of the amount of funds transferred and the amount of funds owned by the user to be equal to the indicated amount of funds transferred. After the call, the balance account and the balance of the borrowed funds recorded in the borrowed account are modified according to the balance of the called borrowed funds, the balance of the owned funds recorded in the balance account is modified according to the balance of the called owned funds, and the sum of the balance of the owned funds and the balance of the borrowed funds recorded in the balance account is modified according to the balance of the called borrowed funds and the balance of the owned funds.
If it is determined that the indicated amount of funds to be transferred is greater than the sum, a notification message of a transfer failure is sent to the user.
Therefore, according to the embodiment, accurate calling of the second data resource can be achieved according to the quantity of the data resource indicated to be called by the target object and the quantity of the resource remaining quantity of the second data resource. And if the indicated amount of the called data resources is greater than the resource remaining amount of the second data resources recorded in the first resource bin or the second resource bin and is less than or equal to the sum, the first data resources and the second data resources can be called together so as to meet the resource use requirement of the target object.
Further, in this embodiment, after the second data resource is called from the first resource bin, the resource remaining amount of the second data resource recorded in the first resource bin is modified according to the call result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified.
Specifically, as described above, after the second data resource is called from the first resource bin, the resource remaining amount of the second data resource recorded in the first resource bin is modified according to the call result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified. And, the resource remaining amount of the second data resource recorded in the second resource bin is also modified.
Similarly, in this embodiment, after the first data resource and the second data resource are obtained from the first resource bin, the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin are modified according to the call result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified. And modifying the resource remaining amount of the second data resource recorded in the second resource bin.
The specific procedure for modifying the remaining amount is not exemplified here. Therefore, by the embodiment, after the data resource is called, the resource remaining amount recorded in the resource bin can be timely and accurately modified, so that the next data resource call is facilitated.
The present embodiment also provides a process of calling the first data resource from the first resource bin, as shown in fig. 3, which is a schematic flow chart of calling the first data resource from the first resource bin according to an embodiment of the present disclosure, as shown in fig. 3, where the flow includes:
step S302, extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the data resource quantity indicated to be called by the target object;
Step S304, if the indicated amount of the called data resources is smaller than or equal to the resource remaining amount of the first data resources recorded in the first resource bin, the first data resources are called from the first resource bin according to the indicated amount of the called data resources.
Specifically, a field value of a particular field is extracted from the data resource call instruction, the field value representing the amount of data resource that is indicated to be invoked by the target object. And if the data resource quantity indicated to be called is less than or equal to the resource remaining quantity of the first data resource recorded in the first resource bin, calling the first data resource from the first resource bin according to the data resource quantity indicated to be called. After the call, the resource remaining amount of the first data resource recorded in the first resource bin and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin are also modified. And if the data resource quantity indicated to be called is determined to be larger than the resource remaining quantity of the first data resource recorded in the first resource bin, returning a notification message of call failure to the target object.
In the first embodiment described above, the server extracts a field value of a specific field, which represents the amount of data instructed to be invoked by the target program, from the data resource invocation instruction. And if the data quantity of the indicated call is less than or equal to the residual data quantity of the first program data recorded in the first resource bin, calling the first program data from the first resource bin according to the data quantity of the indicated call. After the call, the resource remaining amount of the first program data recorded in the first resource bin and the sum of the resource remaining amount of the first program data and the resource remaining amount of the second program data recorded in the first resource bin are also modified. And if the data quantity of the indicated call is determined to be larger than the residual data quantity of the first program data recorded in the first resource bin, sending a notification message of call failure to the target object.
In the second embodiment described above, the server extracts a field value of a specific field from the data resource call instruction, the field value representing the amount of funds to be called instructed by the user. And if the indicated amount of the transferred funds is less than or equal to the balance of the owned funds recorded in the balance account, transferring the owned funds of the user from the balance account according to the indicated amount of the transferred funds. After the invocation, the balance of the user's own funds recorded in the balance account and the sum of the balance of the user's own funds recorded in the balance account and the balance of the user's borrowed funds are also modified. And if the indicated amount of the transferred funds is determined to be larger than the balance of the owned funds recorded in the balance account, sending a notification message of transferring failure to the user.
Therefore, according to the embodiment, accurate calling of the first data resource can be achieved according to the quantity of the data resource indicated to be called by the target object and the quantity of the resource remaining quantity of the first data resource.
Further, in this embodiment, after the first data resource is called from the first resource bin, the resource remaining amount of the first data resource recorded in the first resource bin is modified according to the call result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified.
The specific procedure for modifying the remaining amount is not exemplified here. Therefore, by the embodiment, after the data resource is called, the resource remaining amount recorded in the resource bin can be timely and accurately modified, so that the next data resource call is facilitated.
Further, in an embodiment of the present disclosure, if it is detected that the resource flow direction of the second data resource in the first resource bin does not conform to the preset flow direction rule, a notification message for retrieving the second data resource is sent to the target object.
Specifically, the resource flow direction of the second data resource in the first resource bin can be detected by means of big data, for example, in the first embodiment, the resource flow direction is changed from the target object to the server a and then to the server B. Also as in the second embodiment described above, the resource flow direction is from user a to user B and back to user C. In this embodiment, the preset flow rule may be, for example, that the second data resource cannot return to the target object any more, and if it is detected that the resource flow of the second data resource is the second data resource and returns to the target object, it is determined that the target object does not have the condition of using the second data resource any more, and a notification message for retrieving the second data resource is sent to the target object.
For example, in the first embodiment, after a certain amount of second program data is called to the target program, the second program data should be sent by the target program to a certain server a for processing according to the processing principle of the second program data, so as to prevent cheating when the target program processes the second program data. However, by detecting the resource flow direction of the second data resource in the first resource bin, the second data resource called by the target program is found to be sent to the target program for processing by the server A, and the target program is confirmed to not have the condition of processing the second data resource any more, and a notification message for recovering the second data resource is sent to the target program.
For example, in the second embodiment, after a certain amount of loan funds are paid according to the payment instruction of the user, the loan funds should not be circulated back to the user according to the circulation principle of the loan funds, so as to prevent the user from money laundering. But by detecting the flow direction of the borrowed funds in the balance account of the user, the user is found to re-deposit the borrowed funds into the balance account as the own balance through a plurality of transaction behaviors, and then a notification message of early repayment is sent to the user.
It can be seen that, according to the embodiment, after detecting that the resource flow direction of the second data resource in the first resource bin does not conform to the preset flow direction rule, a notification message for retrieving the second data resource is sent to the target object, so that the second data resource is used in compliance.
The above-described data resource processing method is described below by way of a specific embodiment.
In the scenario of a user lending funds, it is generally prescribed that the funds lended to the user cannot be used in certain restricted scenarios, such as in the fields of financial, real estate, stock market, etc. And for the owned funds of the user, the use scenario is not limited, and the user can use the owned funds to purchase financial products, real estate, stocks and the like. Based on this, by the above-described data resource processing method, after the loan funds are issued to the user, a sub-account is created under the balance account of the user, which may be referred to as a loan account (or a credit sub-account, a loan sub-account, etc.).
When a user obtains borrowed funds through various ways, a plurality of borrowed accounts can be created for the user, for example, the user obtains a piece of funds through A-platform loan and obtains a piece of funds through B-platform loan, two borrowed accounts are created for the user under the balance account of the user, one borrowed account corresponds to the A-platform, and one borrowed account corresponds to the B-platform. A debit account is described below as an example.
The loan funds issued for the user are uniformly entered into the balance account of the user, the balance of the own funds, the balance of the loan funds, the total balance of the own funds and the loan funds of the user are respectively recorded in the balance account of the user, and the balance of the loan funds of the user is recorded in the loan account of the user.
When the user requests payment, acquiring a payment scene of the user, if the payment scene supports payment by using the loan funds, preferentially using the loan funds for payment, modifying the balance of the loan funds, the owned funds and the total balance of the loan funds recorded in the balance account according to the amount of payment, and modifying the balance of the loan funds recorded in the loan account according to the amount of payment.
When the user requests payment, if the payment scene of the user supports payment by using the borrowed funds, but the borrowed balance of the user is insufficient for payment, the borrowed funds of the user and the own funds of the user are simultaneously used for payment so as to ensure the consumption requirement of the user. After payment, the balance of the user's own funds, the balance of the borrowed funds, the total balance of the own funds and the borrowed funds recorded in the user's balance account, and the balance of the borrowed funds recorded in the user's borrowed account are also modified.
When the user requests payment, a payment scene of the user is obtained, if the payment scene does not support payment by using the loan funds, the balance of the loan funds of the user is not displayed when the available balance of the user is displayed, the balance of the own funds of the user is only displayed, and the user is only allowed to pay through the own funds. After the user pays, the balance of the user's own funds and the total balance of the own funds and the borrowed funds recorded under the balance account are also modified. If the self funds are insufficient for payment, notifying the user of the failure of payment.
Table 3 below is a schematic table of recorded balances, and in Table 3, the total balance of the debited funds and the owned funds recorded in the balance account are shown as schematic illustrations.
As shown in table 3, the table indicates that the user has 100 yuan of own funds in the initial state, and then the user obtains 50 yuan of loan at the platform a, at this time, the total balance recorded in the balance account of the user and the loan balance recorded in the loan account of the user are adjusted. The user then consumes the debit funds 30 elements, thereby adjusting the total balance recorded in the user's balance account and the debit balance recorded in the user's debit account. Then, the user consumes the loan funds again by 20 elements, thereby continuing to adjust the total balance recorded in the user's balance account and the loan balance recorded in the user's loan account. So far, the borrowing funds of the user are consumed, and the balance is 0. Finally, the user consumes 50 yuan of own funds, and the total balance of the user is 50 yuan.
TABLE 3 Table 3
Figure BDA0002458491090000151
Figure BDA0002458491090000161
In this embodiment, the flow direction of the loan funds of the user is detected by big data means, and if the flow direction of the loan funds of the user is abnormal, for example, the loan funds are returned to the user in the form of the own funds of the user by a plurality of transactions, or the loan funds of the user are determined to be abnormal by flowing into impermissible transaction scenes such as stocks, property and the like by a plurality of transactions, the user is informed of the need of repayment in advance.
Therefore, the data resource processing method is applied to the lending scene, so that a lending account can be created for the user, the use scene of the lending funds of the user is limited, meanwhile, the user perceives the going of the lending funds in a balance recording mode, and the fund use experience of the user is ensured.
An embodiment of the present disclosure further provides a data resource processing device, configured to implement the above-mentioned data resource processing method, and fig. 4 is a schematic block diagram of the data resource processing device provided in an embodiment of the present disclosure, as shown in fig. 4, where the device includes:
an acquisition module 41 that acquires a resource allocation instruction for allocating a data resource for a target object; the target object is provided with a first resource bin, wherein first data resources of a first data type allocated for the target object are stored in the first resource bin, and a resource allocation instruction is used for indicating allocation of second data resources of a second data type for the target object;
the allocation module 42 creates a second resource bin belonging to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocates the second data resource to the first resource bin, and records the resource remaining amount of the second data resource in the second resource bin according to the allocation result;
And the calling module 43 is used for calling the second data resource from the first resource bin after the data resource calling instruction of the target object is acquired, if the data resource calling instruction meets the calling condition corresponding to the second data type, modifying the resource remaining amount of the second data resource recorded in the second resource bin according to the calling result, and otherwise, calling the first data resource from the first resource bin.
Optionally, the calling module 43 is specifically configured to: if the resource use scene identifier carried in the data resource calling instruction is a legal use scene identifier corresponding to the second data type, determining that the data resource calling instruction accords with a calling condition corresponding to the second data type, and calling the second data resource from the first resource bin.
Optionally, the first resource bin also records the resource remaining amount of the first data resource; the apparatus further comprises: and the first recording module is used for recording the resource surplus of the second data resource in the first resource bin according to the allocation result after the second data resource is allocated to the first resource bin, and recording the sum of the resource surplus of the first data resource and the resource surplus of the second data resource.
Optionally, the calling module 43 is specifically configured to: extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity; if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the second data resource recorded in the first resource bin or the second resource bin, calling the second data resource from the first resource bin according to the indicated data resource quantity; and if the indicated amount of the called data resources is larger than the resource remaining amount of the second data resources recorded in the first resource bin or the second resource bin and smaller than or equal to the sum, calling all the second data resources from the first resource bin and calling part or all of the first data resources.
Optionally, the apparatus further comprises: and the second recording module is used for modifying the resource residual quantity of the second data resources recorded in the first resource bin according to the calling result after the second data resources are called from the first resource bin, and modifying the sum of the resource residual quantity of the first data resources and the resource residual quantity of the second data resources recorded in the first resource bin.
Optionally, the calling module 43 is specifically configured to: extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity; and if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the first data resource recorded in the first resource bin, calling the first data resource from the first resource bin according to the indicated data resource quantity.
Optionally, the apparatus further comprises: and the third recording module is used for modifying the resource residual quantity of the first data resource recorded in the first resource bin according to the calling result after the first data resource is called from the first resource bin, and modifying the sum of the resource residual quantity of the first data resource and the resource residual quantity of the second data resource recorded in the first resource bin.
Optionally, the apparatus further comprises: and the recovery module is used for sending a notification message for recovering the second data resource to the target object if the resource flow direction of the second data resource in the first resource bin is detected to be not in accordance with the preset flow direction rule.
In this embodiment, the target object has a first resource bin, where a first data resource of a first data type allocated for the target object is stored. When a second data resource of a second data type is allocated for the target object, a second resource bin is created under the first resource bin, and the second data resource is allocated to the first resource bin. The second resource bin is used for recording the resource remaining amount of the second data resource. And when the target object needs to call the resource, if the call condition of the second data type is met, calling the second data resource from the first resource bin, and otherwise, calling the first data resource from the first resource bin. Therefore, according to the embodiment, under the condition that the target object is allocated with the data resources of multiple data types, the data resources of various data types can be uniformly allocated in one resource bin, so that the accessed resource bin does not need to be frequently switched under the condition that the data resources of various data types are frequently called, the data resources of various data types can be called from the same resource bin, the problem of low data resource calling efficiency caused by frequently switching the accessed resource bin is avoided, and the calling efficiency of the data resources is improved.
It should be noted that, the data resource processing device in this embodiment can implement each process of the foregoing data resource processing method embodiment and achieve the same effects and functions, which are not described herein again.
Further, another embodiment of the present disclosure further provides a data resource processing device, and fig. 5 is a schematic structural diagram of the data resource processing device provided in an embodiment of the present disclosure, as shown in fig. 5, the data resource processing device may have a relatively large difference due to different configurations or performances, and may include one or more processors 901 and a memory 902, where the memory 902 may store one or more storage applications or data. Wherein the memory 902 may be transient storage or persistent storage. The application programs stored in the memory 902 may include one or more modules (not shown), each of which may include a series of computer-executable instructions in the data resource processing device. Still further, the processor 901 may be arranged to communicate with a memory 902 and execute a series of computer executable instructions in the memory 902 on a data asset processing device. The data resource processing device may also include one or more power supplies 903, one or more wired or wireless network interfaces 904, one or more input output interfaces 905, one or more keyboards 906, and the like.
In a particular embodiment, a data resource processing device includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer-executable instructions in the data resource processing device, and execution of the one or more programs by one or more processors comprises computer-executable instructions for:
acquiring a resource allocation instruction for allocating data resources for a target object; the target object is provided with a first resource bin, wherein first data resources of a first data type allocated for the target object are stored in the first resource bin, and a resource allocation instruction is used for indicating allocation of second data resources of a second data type for the target object;
creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocating second data resources to the first resource bin, and recording the resource remaining amount of the second data resources in the second resource bin according to the allocation result;
After the data resource calling instruction of the target object is obtained, if the data resource calling instruction meets the calling condition corresponding to the second data type, calling the second data resource from the first resource bin, modifying the resource remaining amount of the second data resource recorded in the second resource bin according to the calling result, and otherwise, calling the first data resource from the first resource bin.
Optionally, when the computer executable instruction is executed, if the data resource calling instruction meets a calling condition corresponding to the second data type, the second data resource is called from the first resource bin, including: if the resource use scene identifier carried in the data resource calling instruction is a legal use scene identifier corresponding to the second data type, determining that the data resource calling instruction accords with a calling condition corresponding to the second data type, and calling the second data resource from the first resource bin.
Optionally, the computer executable instructions, when executed, further record a resource remaining amount of the first data resource in the first resource bin; further comprises: after the second data resource is allocated to the first resource bin, the resource remaining amount of the second data resource is recorded in the first resource bin according to the allocation result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource is recorded.
Optionally, the computer-executable instructions, when executed, invoke the second data resource from the first resource bin, comprising: extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity; if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the second data resource recorded in the first resource bin or the second resource bin, calling the second data resource from the first resource bin according to the indicated data resource quantity; and if the indicated amount of the called data resources is larger than the resource remaining amount of the second data resources recorded in the first resource bin or the second resource bin and smaller than or equal to the sum, calling all the second data resources from the first resource bin and calling part or all of the first data resources.
Optionally, the computer executable instructions, when executed, further comprise: after the second data resource is called from the first resource bin, the resource remaining amount of the second data resource recorded in the first resource bin is modified according to the calling result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified.
Optionally, the computer-executable instructions, when executed, invoke the first data resource from the first resource bin, comprising: extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity; and if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the first data resource recorded in the first resource bin, calling the first data resource from the first resource bin according to the indicated data resource quantity.
Optionally, the computer executable instructions, when executed, further comprise: after the first data resource is called from the first resource bin, the resource remaining amount of the first data resource recorded in the first resource bin is modified according to the calling result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified.
Optionally, the computer executable instructions, when executed, further comprise: and if the resource flow direction of the second data resource in the first resource bin is detected to be not in accordance with the preset flow direction rule, sending a notification message for recovering the second data resource to the target object.
In this embodiment, the target object has a first resource bin, where a first data resource of a first data type allocated for the target object is stored. When a second data resource of a second data type is allocated for the target object, a second resource bin is created under the first resource bin, and the second data resource is allocated to the first resource bin. The second resource bin is used for recording the resource remaining amount of the second data resource. And when the target object needs to call the resource, if the call condition of the second data type is met, calling the second data resource from the first resource bin, and otherwise, calling the first data resource from the first resource bin. Therefore, according to the embodiment, under the condition that the target object is allocated with the data resources of multiple data types, the data resources of various data types can be uniformly allocated in one resource bin, so that the accessed resource bin does not need to be frequently switched under the condition that the data resources of various data types are frequently called, the data resources of various data types can be called from the same resource bin, the problem of low data resource calling efficiency caused by frequently switching the accessed resource bin is avoided, and the calling efficiency of the data resources is improved.
It should be noted that, the data resource processing device in this embodiment can implement each process of the foregoing data resource processing method embodiment and achieve the same effects and functions, which are not described herein again.
Further, another embodiment of the present disclosure further provides a storage medium, which is configured to store computer executable instructions, and in a specific embodiment, the storage medium may be a usb disk, an optical disk, a hard disk, etc., where the computer executable instructions stored in the storage medium can implement the following flow when executed by a processor:
acquiring a resource allocation instruction for allocating data resources for a target object; the target object is provided with a first resource bin, wherein first data resources of a first data type allocated for the target object are stored in the first resource bin, and a resource allocation instruction is used for indicating allocation of second data resources of a second data type for the target object;
creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocating second data resources to the first resource bin, and recording the resource remaining amount of the second data resources in the second resource bin according to the allocation result;
After the data resource calling instruction of the target object is obtained, if the data resource calling instruction meets the calling condition corresponding to the second data type, calling the second data resource from the first resource bin, modifying the resource remaining amount of the second data resource recorded in the second resource bin according to the calling result, and otherwise, calling the first data resource from the first resource bin.
Optionally, when the computer executable instructions stored in the storage medium are executed by the processor, if the data resource calling instruction meets a calling condition corresponding to the second data type, the method calls the second data resource from the first resource bin, including: if the resource use scene identifier carried in the data resource calling instruction is a legal use scene identifier corresponding to the second data type, determining that the data resource calling instruction accords with a calling condition corresponding to the second data type, and calling the second data resource from the first resource bin.
Optionally, the computer executable instructions stored on the storage medium, when executed by the processor, further record a resource remaining amount of the first data resource in the first resource bin; further comprises: after the second data resource is allocated to the first resource bin, the resource remaining amount of the second data resource is recorded in the first resource bin according to the allocation result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource is recorded.
Optionally, the storage medium storing computer executable instructions that when executed by the processor invoke the second data resource from the first resource bin, comprising: extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity; if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the second data resource recorded in the first resource bin or the second resource bin, calling the second data resource from the first resource bin according to the indicated data resource quantity; and if the indicated amount of the called data resources is larger than the resource remaining amount of the second data resources recorded in the first resource bin or the second resource bin and smaller than or equal to the sum, calling all the second data resources from the first resource bin and calling part or all of the first data resources.
Optionally, the storage medium stores computer executable instructions that when executed by the processor further comprise: after the second data resource is called from the first resource bin, the resource remaining amount of the second data resource recorded in the first resource bin is modified according to the calling result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified.
Optionally, the storage medium storing computer executable instructions that when executed by the processor invoke a first data resource from a first resource bin, comprising: extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity; and if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the first data resource recorded in the first resource bin, calling the first data resource from the first resource bin according to the indicated data resource quantity.
Optionally, the storage medium stores computer executable instructions that when executed by the processor further comprise: after the first data resource is called from the first resource bin, the resource remaining amount of the first data resource recorded in the first resource bin is modified according to the calling result, and the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin is modified.
Optionally, the storage medium stores computer executable instructions that when executed by the processor further comprise: and if the resource flow direction of the second data resource in the first resource bin is detected to be not in accordance with the preset flow direction rule, sending a notification message for recovering the second data resource to the target object.
In this embodiment, the target object has a first resource bin, where a first data resource of a first data type allocated for the target object is stored. When a second data resource of a second data type is allocated for the target object, a second resource bin is created under the first resource bin, and the second data resource is allocated to the first resource bin. The second resource bin is used for recording the resource remaining amount of the second data resource. And when the target object needs to call the resource, if the call condition of the second data type is met, calling the second data resource from the first resource bin, and otherwise, calling the first data resource from the first resource bin. Therefore, according to the embodiment, under the condition that the target object is allocated with the data resources of multiple data types, the data resources of various data types can be uniformly allocated in one resource bin, so that the accessed resource bin does not need to be frequently switched under the condition that the data resources of various data types are frequently called, the data resources of various data types can be called from the same resource bin, the problem of low data resource calling efficiency caused by frequently switching the accessed resource bin is avoided, and the calling efficiency of the data resources is improved.
It should be noted that, the storage medium in this embodiment can implement the processes of the foregoing embodiments of the data resource processing method, and achieve the same effects and functions, which are not described herein again.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing one or more embodiments of the present description.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, embodiments of the present description may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present description are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, embodiments of the present description may take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
One or more embodiments of the present specification may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations of the embodiments described herein will be apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. that fall within the spirit and principles of the present document are intended to be included within the scope of the claims of the present document.

Claims (15)

1. A data resource processing method, comprising:
acquiring a resource allocation instruction for allocating data resources for a target object; the target object is provided with a first resource bin, first data resources of a first data type allocated for the target object are stored in the first resource bin, and the resource allocation instruction is used for indicating to allocate second data resources of a second data type for the target object;
creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocating the second data resource to the first resource bin, and recording the resource remaining amount of the second data resource in the second resource bin according to an allocation result;
after the data resource calling instruction of the target object is obtained, if the data resource calling instruction accords with the calling condition corresponding to the second data type, the second data resource is called from the first resource bin, the resource remaining amount of the second data resource recorded in the second resource bin is modified according to a calling result, and if not, the first data resource is called from the first resource bin.
2. The method of claim 1, invoking the second data resource from the first resource bin if the data resource invocation instruction meets an invocation condition corresponding to the second data type, comprising:
and if the resource use scene identifier carried in the data resource calling instruction is a legal use scene identifier corresponding to the second data type, determining that the data resource calling instruction accords with a calling condition corresponding to the second data type, and calling the second data resource from the first resource bin.
3. The method according to claim 1 or 2, wherein the first resource bin further records a resource remaining amount of the first data resource; the method further comprises the steps of:
after the second data resource is allocated to the first resource bin, the resource residual quantity of the second data resource is recorded in the first resource bin according to the allocation result, and the sum of the resource residual quantity of the first data resource and the resource residual quantity of the second data resource is recorded.
4. The method of claim 3, invoking the second data resource from the first resource bin, comprising:
extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity;
If the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the second data resource recorded in the first resource bin or the second resource bin, calling the second data resource from the first resource bin according to the indicated data resource quantity;
and if the indicated amount of the called data resources is larger than the resource remaining amount of the second data resources recorded in the first resource bin or the second resource bin and smaller than or equal to the sum, calling all the second data resources from the first resource bin and calling part or all of the first data resources.
5. The method of claim 4, the method further comprising:
after the second data resource is called from the first resource bin, modifying the resource remaining amount of the second data resource recorded in the first resource bin according to the calling result, and modifying the sum of the resource remaining amount of the first data resource and the resource remaining amount of the second data resource recorded in the first resource bin.
6. The method of claim 3, invoking the first data resource from the first resource bin, comprising:
Extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity;
and if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the first data resource recorded in the first resource bin, calling the first data resource from the first resource bin according to the indicated data resource quantity.
7. The method of claim 6, the method further comprising:
after the first data resource is called from the first resource bin, modifying the resource residual quantity of the first data resource recorded in the first resource bin according to a calling result, and modifying the sum of the resource residual quantity of the first data resource and the resource residual quantity of the second data resource recorded in the first resource bin.
8. The method of claim 1, the method further comprising:
and if the resource flow direction of the second data resource in the first resource bin is detected not to accord with the preset flow direction rule, sending a notification message for recovering the second data resource to the target object.
9. A data resource processing apparatus comprising:
The acquisition module is used for acquiring a resource allocation instruction for allocating data resources for the target object; the target object is provided with a first resource bin, first data resources of a first data type allocated for the target object are stored in the first resource bin, and the resource allocation instruction is used for indicating to allocate second data resources of a second data type for the target object;
the allocation module is used for creating a second resource bin subordinate to the first resource bin under the first resource bin of the target object according to the resource allocation instruction, allocating the second data resource to the first resource bin, and recording the resource remaining amount of the second data resource in the second resource bin according to an allocation result;
and the calling module is used for calling the second data resource from the first resource bin after the data resource calling instruction of the target object is acquired, if the data resource calling instruction accords with the calling condition corresponding to the second data type, modifying the resource remaining amount of the second data resource recorded in the second resource bin according to a calling result, and otherwise, calling the first data resource from the first resource bin.
10. The apparatus of claim 9, wherein the calling module is specifically configured to:
and if the resource use scene identifier carried in the data resource calling instruction is a legal use scene identifier corresponding to the second data type, determining that the data resource calling instruction accords with a calling condition corresponding to the second data type, and calling the second data resource from the first resource bin.
11. The apparatus according to claim 9 or 10, wherein the first resource bin further has a resource remaining amount of the first data resource recorded therein; the apparatus further comprises:
and the first recording module is used for recording the resource surplus of the second data resource in the first resource bin according to the allocation result after the second data resource is allocated to the first resource bin, and recording the sum of the resource surplus of the first data resource and the resource surplus of the second data resource.
12. The apparatus of claim 11, wherein the calling module is specifically configured to:
extracting a field value of a specific field from the data resource calling instruction, wherein the field value represents the indicated called data resource quantity;
if the indicated data resource quantity is smaller than or equal to the resource remaining quantity of the second data resource recorded in the first resource bin or the second resource bin, calling the second data resource from the first resource bin according to the indicated data resource quantity;
And if the indicated amount of the called data resources is larger than the resource remaining amount of the second data resources recorded in the first resource bin or the second resource bin and smaller than or equal to the sum, calling all the second data resources from the first resource bin and calling part or all of the first data resources.
13. The apparatus of claim 12, the apparatus further comprising:
and the second recording module is used for modifying the resource residual quantity of the second data resource recorded in the first resource bin according to the calling result after the second data resource is called from the first resource bin, and modifying the sum of the resource residual quantity of the first data resource and the resource residual quantity of the second data resource recorded in the first resource bin.
14. A data resource processing apparatus comprising: a processor; and a memory arranged to store computer executable instructions which, when executed, cause the processor to implement the steps of the data resource processing method of any of the preceding claims 1 to 8.
15. A storage medium storing computer executable instructions which when executed implement the steps of the data resource processing method of any of the preceding claims 1 to 8.
CN202010312811.0A 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium Active CN111538576B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202010312811.0A CN111538576B (en) 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium
CN202310492357.5A CN116578397A (en) 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010312811.0A CN111538576B (en) 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN202310492357.5A Division CN116578397A (en) 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111538576A CN111538576A (en) 2020-08-14
CN111538576B true CN111538576B (en) 2023-05-02

Family

ID=71975151

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202310492357.5A Pending CN116578397A (en) 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium
CN202010312811.0A Active CN111538576B (en) 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202310492357.5A Pending CN116578397A (en) 2020-04-20 2020-04-20 Data resource processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (2) CN116578397A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014031540A1 (en) * 2012-08-20 2014-02-27 Cameron Donald Kevin Processing resource allocation
CN110134510A (en) * 2019-03-28 2019-08-16 熊睿 RAM resource allocation methods and device based on intelligent contract
CN110389842A (en) * 2019-07-26 2019-10-29 中国工商银行股份有限公司 A kind of dynamic resource allocation method, device, storage medium and equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4473256B2 (en) * 2006-12-27 2010-06-02 インターナショナル・ビジネス・マシーンズ・コーポレーション Information processing apparatus, method, and program for controlling resource access by application program
US10554577B2 (en) * 2017-03-14 2020-02-04 International Business Machines Corporation Adaptive resource scheduling for data stream processing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014031540A1 (en) * 2012-08-20 2014-02-27 Cameron Donald Kevin Processing resource allocation
CN110134510A (en) * 2019-03-28 2019-08-16 熊睿 RAM resource allocation methods and device based on intelligent contract
CN110389842A (en) * 2019-07-26 2019-10-29 中国工商银行股份有限公司 A kind of dynamic resource allocation method, device, storage medium and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
肖熠 ; 鲁永泉 ; 谢思烨 ; .一种针对GPU资源的深度学习容器云研究.中国传媒大学学报(自然科学版).2017,(06),全文. *

Also Published As

Publication number Publication date
CN116578397A (en) 2023-08-11
CN111538576A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
CN109615495B (en) Data reconciliation method, device, equipment and system
CN107424069B (en) Wind control feature generation method, risk monitoring method and equipment
CN110020542B (en) Data reading and writing method and device and electronic equipment
CN110008018B (en) Batch task processing method, device and equipment
CN107291720B (en) Method, system and computer cluster for realizing batch data processing
CN110188990A (en) A kind of resource request and funds request shunt method, device and equipment
CN112862293A (en) Resource allocation method, device, storage medium and electronic equipment
CN111709748B (en) Transaction execution method and device with business attribute and electronic equipment
CN111538576B (en) Data resource processing method, device, equipment and storage medium
CN112288565A (en) System, method and device for executing service
CN114548963B (en) Payment interaction processing method and device
CN112016914B (en) Resource control and fund control method, device and equipment
CN107392408B (en) Credit score prompt information output method and device
CN109598511B (en) Account risk identification method, device and equipment
CN110263816B (en) Enterprise classification method and device
CN112764676A (en) Resource allocation system and method
CN114297256A (en) Method, system and device for determining resource quantity value of tenant system
CN117333186A (en) Acquisition method of credit information and establishment method and device of credit management and control rule
CN109903165B (en) Model merging method and device
CN112579292A (en) Resource allocation method and device
CN109658239B (en) Application function expansion method and device, request processing method and device
CN110245115B (en) File processing method, engine and system
CN110766546A (en) Bank account management method
CN112184193A (en) Payment processing method and device
CN113435889B (en) Transaction processing method and device based on credit

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40035846

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant