Resource acquisition method and terminal
A technology for acquiring methods and resources, applied in the field of resource management, can solve the problems of reduced business processing efficiency, returned abnormal information, and increased invalid requests, and achieves the effects of improving security and robustness, improving efficiency, and reducing invalid requests.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0055] Please refer to figure 1 , a resource acquisition method, including steps:
[0056] S1. Receive a resource acquisition request sent by an upstream node.
[0057] Specifically, in this embodiment, the upstream node includes the client, and when all resource acquisition requests sent by the client are normally in order, the resource acquisition request sent by the client normally arrives at the public platform gateway, and the public platform gateway sends a request to the resource The distribution system requests to obtain the resource interface, and after the request is made to obtain the resource interface, the resource is pre-locked inside the interface.
[0058] S2. If the resource to be acquired corresponding to the resource acquisition request is locked, determine whether the number of all resource acquisition requests reaches the threshold, and if so, return a special exception identifier to the upstream node, and according to the special exception The identific...
Embodiment 2
[0073] The difference between this embodiment and Embodiment 1 is that it further defines how to acquire resources when the locked resources to be acquired are unlocked or the number of all resource acquisition requests does not reach the threshold, specifically:
[0074] If the locked resource to be acquired is unlocked or the number of all resource acquisition requests does not reach the threshold, notify the upstream node to unlock the request for the resource to be acquired, and delete all resources related to the resource in the public cluster. Describes the lock information corresponding to the resource to be acquired.
[0075] In this embodiment, when the downstream node has been unlocked or the downstream node is still locked, but the request to wait for the locked resource is within a certain value, the upstream node can be notified of the unlocked resource, and the subsequent upstream node will delete the resource. The switch settings in the local memory continue to ...
Embodiment 3
[0077] Please refer to figure 2 , a resource acquisition terminal, including a memory, a processor, and a computer program stored on the memory and operable on the processor, and the processor implements the resource of Embodiment 1 or Embodiment 2 when executing the computer program Get the steps of the method.
[0078] To sum up, a resource acquisition method and a terminal provided by the present invention receive a resource acquisition request sent by an upstream node, and if the resource to be acquired has been locked, judge whether the number of all resource acquisition requests reaches a threshold, and if it reaches the threshold, then Return the special exception identifier to the upstream node. The upstream node requests locking according to the special exception identifier, and synchronizes the lock information of the resource to be acquired to the public cluster. The upstream node that requests the lock obtains the lock information of the resource to be acquired by...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 

