A position management method and apparatus

By setting up multiple position sub-nodes in the financial trading system, determining the target position size based on historical consumption and dynamically adjusting it, the problems of trading efficiency and stability caused by frequent trading are solved, and more efficient trading processing is achieved.

CN114170001BActive Publication Date: 2026-06-05WEBANK (CHINA)

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WEBANK (CHINA)
Filing Date
2021-12-09
Publication Date
2026-06-05

Smart Images

  • Figure CN114170001B_ABST
    Figure CN114170001B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a position management method and device, the method is applied to any position sub-node, a plurality of position sub-nodes are connected with a position centralized node, different position sub-nodes correspond to different service types, and the method comprises the following steps: determining a target position amount of the position sub-node in a current period based on historical position consumption of the position sub-node in a historical period; comparing the target position amount of the position sub-node with a current position amount of the position sub-node; and sending a position processing request to the position centralized node based on a comparison result, so that the position centralized node allocates position to the position sub-node or recalls position from the position sub-node based on the position processing request. The method can process different types of services by setting a plurality of position sub-nodes, improve transaction processing efficiency and stability, and dynamically allocate position to the position sub-node or recall position from the position sub-node by the position centralized node in each period, so that the position amount of each position sub-node is reasonable.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of financial technology (Fintech), and more particularly to a position management method and apparatus. Background Technology

[0002] With the development of computer technology, more and more technologies are being applied in the financial sector, and the traditional financial industry is gradually transforming into fintech. However, due to the security and real-time requirements of the financial industry, higher demands are being placed on technology. In the financial sector, different institutions frequently conduct financial transactions through position management systems.

[0003] In related technologies, an institution advances funds to other institutions. When these other institutions conduct transactions, the other institutions deduct funds from the advanced funds through their position management system before settlement. However, when the institution trades frequently, the position management system receives a large number of business requests in a short period, affecting transaction processing efficiency and stability.

[0004] In summary, there is an urgent need for a position management method to improve transaction processing efficiency and stability. Summary of the Invention

[0005] This application provides a position management method and apparatus to improve transaction processing efficiency and stability.

[0006] In a first aspect, embodiments of this application provide a position management method, applied to any position sub-node, wherein multiple position sub-nodes are connected to a position central node, and different position nodes correspond to different business types. The method includes:

[0007] Based on the historical position consumption of the position sub-node in the historical period, the target position amount of the position sub-node in the current period is determined;

[0008] Compare the target position size of the position sub-node with the current position size of the position sub-node;

[0009] Based on the comparison results, a position processing request is sent to the position central node, so that the position central node can allocate positions to the position sub-nodes or recall positions based on the position processing request.

[0010] The above solution balances the TPS of each node and improves transaction processing efficiency and stability by setting up multiple position sub-nodes to handle different types of business. In addition, based on the historical position consumption of each position sub-node in historical periods, the target position amount required by each position sub-node in the current period can be determined relatively accurately. By comparing the target position amount of each position sub-node with the current position amount, it can be determined whether the current position amount meets the needs of the current period. Thus, the position central node dynamically allocates positions to each position sub-node or recalls positions in each period, so that the position amount of each position sub-node can meet the business needs without affecting other position sub-nodes due to excessive position consumption.

[0011] In some optional implementations, the target position size of the position sub-node in the current period is determined based on the historical position consumption of the position sub-node in a historical period, including:

[0012] Based on the first historical position consumption of the position sub-node in the historical period of this cycle, and / or the second historical position consumption of the position sub-node in the historical period of this cycle, the estimated position consumption of the position sub-node in this period is determined.

[0013] The target position size is determined by the ratio between the estimated position consumption of the position sub-node and the first coefficient; wherein the first coefficient is determined based on the ratio between the historical position consumption and the historical target position size of the position sub-node over multiple historical periods.

[0014] The above scheme, since the first historical position consumption reflects the historical position consumption of the position sub-node in the current period, and the second historical position consumption reflects the historical position consumption of the position sub-node in the historical period, can predict the position amount that the position sub-node may consume in the current period (i.e., the estimated position consumption in the current period) based on these historical position consumption figures. The estimated position consumption is adjusted by the first coefficient so that the target position amount is slightly larger than the estimated position consumption, in order to cope with some unexpected situations in practical applications.

[0015] In some optional implementations, before determining the ratio between the estimated position consumption of the position sub-node and the first coefficient as the target position amount, the method further includes:

[0016] The ratio between the estimated position consumption of the position sub-node and the first coefficient is determined to be greater than the current minimum position of the position sub-node and less than the current maximum position of the position sub-node.

[0017] The current minimum position size is determined by multiplying the current position consumption rate of the position sub-node with the duration of the current period; the current maximum position size is a preset multiple of the current minimum position size.

[0018] In the above scheme, since the position consumption rate of each position sub-node is constantly changing, the position amount obtained by multiplying the current position consumption rate of the position sub-node by the duration of the current period is the minimum position amount required to maintain the current position consumption rate, and the target position amount cannot be less than this minimum position amount. In addition, if the position sub-node occupies too much position amount, it will affect other position sub-nodes, so it is also necessary to determine the maximum position amount based on a preset multiple, and the target position amount cannot be greater than this maximum position amount. Therefore, when the above ratio is between the current minimum position amount and the current maximum position amount, this ratio is determined as the target position amount.

[0019] In some optional implementations, the method further includes:

[0020] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not greater than the current minimum position of the position sub-node, then the current minimum position is determined as the target position; or

[0021] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not less than the current maximum position of the position sub-node, then the current maximum position is determined as the target position.

[0022] In the above scheme, since the position consumption rate of each position sub-node is constantly changing, the position amount obtained by multiplying the current position consumption rate of the position sub-node by the duration of the current period is the minimum position amount required to maintain the current position consumption rate, and the target position amount cannot be less than this minimum position amount. In addition, if the position sub-node occupies too much position amount, it will affect other position sub-nodes, so it is also necessary to determine the maximum position amount based on a preset multiple, and the target position amount cannot be greater than this maximum position amount. Therefore, when the above ratio is not greater than the current minimum position amount, the current minimum position amount is determined as the target position amount; when the above ratio is not less than the current maximum position amount, the current maximum position amount is determined as the target position amount, so as to accurately determine a reasonable target position amount in different scenarios.

[0023] In some optional implementations, a position processing request is sent to the position centralization node based on the comparison results, including:

[0024] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is greater than the target position size of the position sub-node, then a first position processing request containing the deviation size is sent to the position central node; wherein, the first position processing request represents recalling the position with the deviation size to the position sub-node.

[0025] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is less than the target position size of the position sub-node, then a second position processing request containing the deviation is sent to the position central node; wherein, the second position processing request represents the allocation of the deviation to the position sub-node.

[0026] In the above scheme, if the deviation of the current position size of a position sub-node from the target position size is greater than a preset deviation, it indicates that the current position size of the position sub-node is significantly different from the target position size, and the position of the position sub-node needs to be adjusted. If the current position size of a position sub-node is greater than the target position size, it indicates that the current position size of the position sub-node is too large, and the position size with the aforementioned deviation needs to be recalled through a central node, so that after the position size of the position sub-node is recalled, the position size of the target position size remains, reducing the impact on other position sub-nodes. If the current position size of a position sub-node is less than the target position size, it indicates that the current position size of the position sub-node is too small, and the position size with the aforementioned deviation needs to be allocated through a central node, so that after the position size of the position sub-node is allocated, the position size reaches the target position size, ensuring the business needs of the position sub-node.

[0027] In some optional implementations, the method further includes:

[0028] Upon receiving a business request of the corresponding type, if the current position of the position sub-node is less than the position required for the business corresponding to the business request, a business processing request containing the position required for the business is sent to the position central node, so that the position central node allocates the position required for the business to the position sub-node based on the business processing request.

[0029] In the above scheme, if a position sub-node receives a business request of the corresponding type and its current position is less than the position required by the business request, the current position cannot meet the business demand. The position sub-node then sends a business processing request containing the required position to the position central node. Upon receiving the business processing request, the position central node allocates the required position to the position sub-node to satisfy the business request.

[0030] Secondly, embodiments of this application provide a position management method applied to a position central node, wherein the position central node is connected to multiple position sub-nodes, and different position sub-nodes correspond to different business types. The method includes:

[0031] For any first position processing request in the cache queue, the corresponding position with the specified deviation is recalled to the position sub-node corresponding to the first position processing request. The first position processing request is triggered when the corresponding position sub-node's deviation between the current position size and the target position size is greater than a preset deviation, and the current position size is greater than the target position size. The position processing requests in the cache queue are sequentially placed into the cache queue based on the time the request is received. The target position size is determined by the corresponding position sub-node based on historical position consumption over a historical period.

[0032] For any second position processing request in the cache queue, if the remaining position amount in the position set node is less than the deviation amount corresponding to the second position processing request, then the second position processing request is placed at the tail of the cache queue; wherein, the second position processing request is triggered when the deviation of the current position amount relative to the target position amount is greater than a preset deviation, and the current position amount is less than the target position amount;

[0033] For any second position processing request in the cache queue, if the remaining position amount in the position set node is not less than the deviation amount corresponding to the second position processing request, then the position with the corresponding deviation amount is allocated to the position sub-node corresponding to the second position processing request.

[0034] In the above scheme, the position central node connects to multiple position sub-nodes and may receive multiple position processing requests in a short period of time. Based on this, position processing requests can be placed into a cache queue sequentially according to the time they are received, and processed in order. Since recalling positions does not require the position central node to provide additional positions, for the first position processing request representing recall, the position central node can directly recall positions with the corresponding deviation from the corresponding position sub-node. Since allocating positions requires the position central node to provide additional positions, for the second position processing request representing allocation, if the remaining position amount in the position central node is less than the corresponding deviation, that is, the position central node cannot provide enough positions, the second position processing request needs to be placed at the tail of the cache queue, and processed later after recalling positions based on the first position processing request. For the second position processing request representing allocation, if the remaining position amount in the position central node is not less than the corresponding deviation, that is, the position central node can provide enough positions, the position central node can directly allocate positions with the corresponding deviation to the corresponding position sub-node.

[0035] In some optional implementations, the method further includes:

[0036] If there is no first position processing request in the cache queue, and the remaining position amount in the position central node is less than the deviation amount corresponding to the second position processing request, then a recall request is sent to each position sub-node so that each position sub-node responds to the recall request and triggers the first position request when it is determined that the deviation amount of the current position amount relative to the target position amount is greater than a preset deviation and the current position amount is greater than the target position amount.

[0037] The above solution addresses the situation where, after recalling positions based on the first position processing request in the cache queue, the position central node still cannot provide sufficient positions for the second position processing request. By sending a recall request to the position sub-nodes, the position sub-nodes that currently meet the recall conditions trigger the first position request, further recalling positions, thereby continuing to allocate positions for the aforementioned second position processing request.

[0038] In some optional implementations, the method further includes:

[0039] In response to a service processing request sent by any position sub-node, determine the required position size for the service corresponding to the service processing request; wherein, the service processing request is triggered by the position sub-node when the current position size is less than the required position size for the service corresponding to the received service request;

[0040] If the remaining position amount in the position central node is less than the position amount required by the business, the required position amount will be recalled from at least one other position sub-node, and the required position amount will be allocated to the position sub-node.

[0041] In the above scheme, if a position sub-node receives a business request of the corresponding type and its current position size is less than the position size required for the business request, the current position size cannot meet the business demand. The position sub-node sends a business processing request containing the required position size to the position central node. Upon receiving the business processing request, even if the remaining position size in the position central node is less than the required position size, the position central node will retrieve the required position size from other position sub-nodes and allocate the required position size to the aforementioned position sub-nodes to satisfy the business request.

[0042] Thirdly, embodiments of this application also provide a position management device, applied to any position sub-node, with multiple position sub-nodes connected to a position central node, and different position sub-nodes corresponding to different business types. The device includes:

[0043] The position determination module is used to determine the target position amount of the position sub-node in the current period based on the historical position consumption of the position sub-node in the historical period.

[0044] The position comparison module is used to compare the target position amount of the position sub-node with the current position amount of the position sub-node.

[0045] The sending module is used to send a position processing request to the position central node based on the comparison result, so that the position central node can allocate positions to the position sub-nodes or recall positions based on the position processing request.

[0046] Fourthly, this application also provides another position management device applied to a position central node, wherein the position central node is connected to multiple position sub-nodes, and different position sub-nodes correspond to different business types. The device includes:

[0047] The position processing module is used to retrieve positions with corresponding deviations from any first position processing request in the cache queue to the corresponding position sub-node. The first position processing request is triggered when the corresponding position sub-node's deviation between the current position size and the target position size is greater than a preset deviation, and the current position size is greater than the target position size. Position processing requests in the cache queue are sequentially added to the cache queue based on the time the request is received. The target position size is determined by the corresponding position sub-node based on historical position consumption over a historical period.

[0048] For any second position processing request in the cache queue, if the remaining position amount in the position set node is less than the deviation amount corresponding to the second position processing request, then the second position processing request is placed at the tail of the cache queue; wherein, the second position processing request is triggered when the deviation of the current position amount relative to the target position amount is greater than a preset deviation, and the current position amount is less than the target position amount;

[0049] For any second position processing request in the cache queue, if the remaining position amount in the position set node is not less than the deviation amount corresponding to the second position processing request, then the position with the corresponding deviation amount is allocated to the position sub-node corresponding to the second position processing request.

[0050] Fifthly, embodiments of this application provide a position sub-node, with multiple position sub-nodes connected to a position central node, and different position sub-nodes corresponding to different service types;

[0051] The position sub-node includes at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform any of the position management methods described in the first aspect above.

[0052] Sixthly, embodiments of this application provide a position centralization node, which is connected to multiple position sub-nodes, with different position sub-nodes corresponding to different business types;

[0053] The position centralization node includes at least one processor and at least one memory, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform any of the position management methods described in the second aspect above.

[0054] In a seventh aspect, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computing device, which, when run on the computing device, causes the computing device to perform the position management method described in either the first or second aspect above.

[0055] Furthermore, the technical effects of any of the implementation methods in aspects three through seven can be found in the technical effects of different implementation methods in aspects one and two, and will not be repeated here. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of this application;

[0058] Figure 2 This is a schematic diagram illustrating another application scenario provided by an embodiment of this application;

[0059] Figure 3 An interactive flowchart illustrating the first position management method provided in this application embodiment;

[0060] Figure 4 A flowchart illustrating the first method for determining target position size provided in this application embodiment;

[0061] Figure 5 A flowchart illustrating the second method for determining target position size provided in this application embodiment;

[0062] Figure 6 An interactive flowchart illustrating the second position management method provided in this application embodiment;

[0063] Figure 7 A flowchart illustrating the first position management method provided in this application embodiment;

[0064] Figure 8 A flowchart illustrating the second position management method provided in this application embodiment;

[0065] Figure 9 A schematic diagram of the structure of the first position management device provided in the embodiments of this application;

[0066] Figure 10 This is a schematic diagram of the structure of the second position management device provided in the embodiments of this application;

[0067] Figure 11 This is a schematic diagram of the structure of the head-inch sub-node provided in the embodiments of this application;

[0068] Figure 12 This is a schematic diagram of the position concentration node provided in an embodiment of this application. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0070] In the embodiments of this application, the term "and / or" describes the relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.

[0071] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0072] The term "position" refers to the total amount of cash, securities, commodities, and other financial instruments held and / or owned by an individual or legal entity, such as the funds a bank holds in other banks.

[0073] In the financial sector, different institutions frequently conduct financial transactions through position systems. (See also...) Figure 1 As shown, in some embodiments, an institution advances positions to other institutions. When the institution transacts with other institutions through the trading system 100, the two institutions do not immediately settle their accounts. Instead, the funds are deducted from the advanced positions through the position system 201 before settlement. If the advanced positions are insufficient for the transaction, the transaction will be interrupted.

[0074] However, when the institution trades frequently, the position system 201 will receive a large number of business requests in a short period of time, that is, the system throughput (Transactions per Second, TPS) is too high, which affects the efficiency and stability of transaction processing.

[0075] In view of this, this application proposes a position management method and apparatus. The method is applied to any position sub-node, and multiple position sub-nodes are connected to a position central node. Different position sub-nodes correspond to different business types. The method includes: determining the target position amount of the position sub-node in the current period based on the historical position consumption of the position sub-node in a historical period; comparing the target position amount of the position sub-node with the current position amount of the position sub-node; and sending a position processing request to the position central node based on the comparison result, so that the position central node allocates positions to the position sub-node or recalls positions based on the position processing request.

[0076] The above solution balances the TPS of each node and improves transaction processing efficiency and stability by setting up multiple position sub-nodes to handle different types of business. In addition, based on the historical position consumption of each position sub-node in historical periods, the target position amount required by each position sub-node in the current period can be determined relatively accurately. By comparing the target position amount of each position sub-node with the current position amount, it can be determined whether the current position amount meets the needs of the current period. Thus, the position central node dynamically allocates positions to the position sub-nodes or recalls positions in each period, so that the position amount of each position sub-node can meet the business needs without affecting other position sub-nodes due to excessive position consumption.

[0077] See Figure 2 The illustration shows another application scenario provided by an embodiment of this application. This scenario includes: a trading system 100, a position centralization node 202, and multiple position sub-nodes connected to the position centralization node 202. Figure 2 Taking the 301, 302, and 303 sub-nodes as examples, in practical applications, more or fewer sub-nodes can be set.

[0078] Each position sub-node corresponds to a Data Communication Network (DCN) partition, and each position sub-node can provide position query, accounting and other services to the corresponding DCN partition.

[0079] The trading system 100 is used to send different types of business requests to the corresponding position sub-nodes. The trading system 100 and each position sub-node can transmit data through various communication methods, such as: Local Area Network (LAN), Wireless Local Area Network (WLAN) or other networks.

[0080] The aforementioned position sub-node determines its target position amount for the current period based on its historical position consumption over a historical period; compares the target position amount with the current position amount of the position sub-node; and sends a position processing request to the position central node based on the comparison result.

[0081] The aforementioned position centralization node, in response to a position processing request sent by any position sub-node, allocates positions to the position sub-node or recalls positions.

[0082] This embodiment does not limit the specific implementation of the above-mentioned position sub-nodes and position centralization nodes. In some optional implementations, the position centralization node may adopt... Figure 1 The position system 201 in the embodiment is a reuse of an existing position system.

[0083] The above application scenarios are merely examples of application scenarios for implementing the embodiments of this application, and the embodiments of this application are not limited to the above application scenarios.

[0084] The technical solution of this application and how it solves the above-mentioned technical problems will be described in detail below with reference to the accompanying drawings and specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0085] Figure 3 An interactive flowchart of the first position management method provided in the embodiments of this application is shown below. Figure 3 As shown, it includes the following steps:

[0086] Step S301: The position sub-node determines the target position amount for the current period based on the historical position consumption of the position sub-node in the historical period.

[0087] In this embodiment, multiple position sub-nodes are set up. If the position volume in a position sub-node is small, it may not meet the business requirements; if the position volume in a position sub-node is large, it may affect other position sub-nodes.

[0088] Therefore, this embodiment requires reasonable and dynamic adjustment of the position in the position sub-node.

[0089] Since the historical position consumption of a position sub-node in a historical period reflects, to some extent, the position amount that may be consumed in the current period, this embodiment determines the target position amount required by the position sub-node in the current period based on the historical position consumption of the position sub-node in a historical period.

[0090] Step S302: The position sub-node compares the target position amount of the position sub-node with the current position amount of the position sub-node.

[0091] In this embodiment, the target position size of the position sub-node represents the position demand of the position sub-node in the current time period. By comparing the target position size of the position sub-node with the current position size, it can be determined whether the current position size meets the position demand for the current time period. Based on this, this embodiment compares the target position size of the position sub-node with the current position size, and subsequently, based on the comparison result, it can accurately determine whether the position in the position sub-node needs to be adjusted, and how to adjust the position.

[0092] Step S303: The position sub-node sends a position processing request to the position central node based on the comparison result.

[0093] As mentioned above, based on the comparison results, it is possible to accurately determine whether the position in the position sub-node needs to be adjusted, and how to adjust the position, such as recalling the position or allocating the position, the number of recalled positions, and the number of allocated positions, etc.

[0094] Based on this, after determining that the position in the position sub-node needs to be adjusted, this embodiment sends a position processing request, which indicates how the position should be adjusted, to the position central node.

[0095] Step S304: The position central node responds to a position processing request sent by any position sub-node by allocating a position to the position sub-node or recalling a position.

[0096] The aforementioned position processing request characterizes how to adjust positions. Based on this, the position central node allocates a certain number of positions to the corresponding position sub-nodes or recalls a certain number of positions based on the position processing requests sent by each position sub-node.

[0097] The above solution balances the TPS of each node and improves transaction processing efficiency and stability by setting up multiple position sub-nodes to handle different types of business. In addition, based on the historical position consumption of each position sub-node in historical periods, the target position amount required by each position sub-node in the current period can be determined relatively accurately. By comparing the target position amount of each position sub-node with the current position amount, it can be determined whether the current position amount meets the needs of the current period. Thus, the position central node dynamically allocates positions to each position sub-node or recalls positions in each period, so that the position amount of each position sub-node can meet the business needs without affecting other position sub-nodes due to excessive position consumption.

[0098] See Figure 4 As shown, in some optional embodiments, step S301 above can be implemented in, but is not limited to, the following ways:

[0099] Step S401: Based on the first historical position consumption of the position sub-node in the historical period of this cycle, and / or the second historical position consumption of the position sub-node in the historical period of the historical cycle, determine the estimated position consumption of the position sub-node in this period.

[0100] Since the first historical position consumption reflects the historical position consumption of the position sub-node in the current period, and the second historical position consumption reflects the historical position consumption of the position sub-node in the historical period, the position amount that the position sub-node may consume in the current period can be estimated based on these historical position consumption figures.

[0101] For example, the estimated position consumption of a position sub-node in the current period is determined based on its historical position consumption in the previous period of the current cycle and its historical position consumption in the same period of the previous cycle. For instance: the estimated position consumption NA′ of position sub-node in period i, specifically in period j. i,j =E(NA) k-1,j )*β+(1-β)*(NA i,j-1 ); where E(NA) k-1,j ) represents the expected value of the historical position consumption of the position sub-node in the same time period j of historical period k-1, where k = 1, 2, ..., i; NA i,j-1 β is the historical position consumption of the position sub-node in the previous period j-1 of the current period i; β is the weight coefficient corresponding to the historical period, and (1-β) is the weight coefficient corresponding to the current period.

[0102] The above example is merely an illustration of one way to determine the estimated position consumption, but this embodiment is not limited to this.

[0103] Step S402: Determine the target position amount by the ratio between the estimated position consumption of the position sub-node and the first coefficient.

[0104] The first coefficient is determined based on the ratio between the historical position consumption and the historical target position amount for multiple historical periods of the position sub-node.

[0105] In practical applications, some unexpected situations may occur, such as a surge in TPS, which may cause a sudden increase in the rate of position consumption. In order to deal with these unexpected situations, it is necessary to adjust the estimated position consumption using the first coefficient so that the target position is slightly larger than the estimated position consumption.

[0106] By comparing the historical position consumption to the historical target position size over multiple historical periods, a first coefficient suitable for the current period can be determined. For example, the first coefficient α′... i,j =E(α) k,t ); where α k,t Let t be the expected value of the ratio between the historical position consumption and the historical target position amount at the position sub-node in period k, where k = 1, 2, ..., i; t = 1, 2, ..., j-1.

[0107] The above example is merely an illustration of one way to determine the first coefficient, but this embodiment is not limited to this.

[0108] The above scheme, since the first historical position consumption reflects the historical position consumption of the position sub-node in the current period, and the second historical position consumption reflects the historical position consumption of the position sub-node in the historical period, can predict the position amount that the position sub-node may consume in the current period (i.e., the estimated position consumption in the current period) based on these historical position consumption figures. The estimated position consumption is adjusted by the first coefficient so that the target position amount is slightly larger than the estimated position consumption, in order to cope with some unexpected situations in practical applications.

[0109] Since the above estimated position consumption is based on historical position consumption, it may not be accurate enough in some scenarios, resulting in figures that are too high or too low. Therefore, please refer to... Figure 5 As shown, in some optional embodiments, step S301 above can be implemented in, but is not limited to, the following ways:

[0110] Step S501: Based on the first historical position consumption of the position sub-node in the historical period of this cycle, and / or the second historical position consumption of the position sub-node in the historical period of the historical cycle, determine the estimated position consumption of the position sub-node in this period.

[0111] Step S501 can be referred to step S401 above, and will not be repeated here.

[0112] Step S502: Determine whether the ratio between the estimated position consumption of the position sub-node and the first coefficient is greater than the current minimum position of the position sub-node and less than the current maximum position of the position sub-node.

[0113] The current minimum position size is determined by multiplying the current position consumption rate of the position sub-node with the duration of the current period; the current maximum position size is a preset multiple of the current minimum position size.

[0114] The above-mentioned current minimum position size N Min =Amt*T; where Amt is the current position consumption rate and T is the duration of the current period;

[0115] The above-mentioned current maximum position size N Max =N Min *N; where N is a preset multiple, and the specific value of N can be set according to the actual application scenario.

[0116] Since the position consumption rate of each position sub-node is constantly changing, the position amount obtained by multiplying the current position consumption rate of the position sub-node by the duration of the current period is the minimum position amount required to maintain the current position consumption rate. The target position amount cannot be less than this minimum position amount.

[0117] In addition, if a position sub-node occupies too much position amount, it will affect other position sub-nodes. Therefore, it is also necessary to determine the maximum position amount based on a preset multiple, and the target position amount cannot exceed this maximum position amount.

[0118] Based on this, if the ratio between the estimated position consumption of the position sub-node and the first coefficient is greater than the current minimum position of the position sub-node and less than the current maximum position of the position sub-node, then step S503 is executed, that is, the ratio between the estimated position consumption of the position sub-node and the first coefficient is determined as the target position; otherwise, step S504 is executed, that is, when the ratio between the estimated position consumption of the position sub-node and the first coefficient is not greater than the current minimum position of the position sub-node, the current minimum position is determined as the target position; when the ratio between the estimated position consumption of the position sub-node and the first coefficient is not less than the current maximum position of the position sub-node, the current maximum position is determined as the target position.

[0119] Step S503: Determine the target position amount by the ratio between the estimated position consumption of the position sub-node and the first coefficient.

[0120] Step S504: If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not greater than the current minimum position of the position sub-node, then the current minimum position is determined as the target position; or if the ratio between the estimated position consumption of the position sub-node and the first coefficient is not less than the current maximum position of the position sub-node, then the current maximum position is determined as the target position.

[0121] The above scheme, since the position consumption rate of each position sub-node is constantly changing, the position amount obtained by multiplying the current position consumption rate of the position sub-node by the duration of the current period is the minimum position amount required to maintain the current position consumption rate, and the target position amount cannot be less than this minimum position amount. In addition, if the position sub-node occupies too much position amount, it will affect other position sub-nodes, so it is also necessary to determine the maximum position amount based on a preset multiple, and the target position amount cannot be greater than this maximum position amount. Therefore, by determining the target position amount when the above ratio is between the current minimum position amount and the current maximum position amount; when the above ratio is not greater than the current minimum position amount, the current minimum position amount is determined as the target position amount; and when the above ratio is not less than the current maximum position amount, the current maximum position amount is determined as the target position amount, so as to accurately determine a reasonable target position amount in different scenarios.

[0122] In some optional implementations, step S303 above can be implemented in, but is not limited to, the following ways:

[0123] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is greater than the target position size of the position sub-node, then a first position processing request containing the deviation size is sent to the position central node; wherein, the first position processing request represents recalling the position with the deviation size to the position sub-node.

[0124] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is less than the target position size of the position sub-node, then a second position processing request containing the deviation is sent to the position central node; wherein, the second position processing request represents the allocation of the deviation to the position sub-node.

[0125] In the above scheme, if the deviation of the current position size of a position sub-node from the target position size is greater than the preset deviation, it indicates that the difference between the current position size and the target position size of the position sub-node is large, and the position of the position sub-node needs to be adjusted; furthermore, if the current position size of a position sub-node is greater than the target position size, it indicates that the current position size of the position sub-node is too large, and the position with the above deviation needs to be recalled through the central node, so that after the position in the position sub-node is recalled, there is still a position of the target position size, reducing the impact on other position sub-nodes; furthermore, if the current position size of a position sub-node is less than the target position size, it indicates that the current position size of the position sub-node is too small, and the position with the above deviation needs to be allocated through the central node, so that after the position is allocated, the position of the position sub-node reaches the target position size, ensuring the business needs of the position sub-node.

[0126] Correspondingly, step S304 above can be implemented in, but is not limited to, the following ways:

[0127] Based on the time when the position processing request is received, the position processing request is sequentially placed into the cache queue in the position central node;

[0128] For any first position processing request in the cache queue, recall the position with the corresponding deviation to the position sub-node corresponding to the first position processing request;

[0129] For any second position processing request in the cache queue, if the remaining position amount in the position set node is less than the deviation amount corresponding to the second position processing request, then the second position processing request is placed at the tail of the cache queue.

[0130] For any second position processing request in the cache queue, if the remaining position amount in the position set node is not less than the deviation amount corresponding to the second position processing request, then the position with the corresponding deviation amount is allocated to the position sub-node corresponding to the second position processing request.

[0131] In this embodiment, the position concentration node has a large number of positions, while the target position amount of the position sub-nodes is small in each period. Therefore, there are usually remaining positions in the position concentration node.

[0132] In the above scheme, the position central node connects to multiple position sub-nodes and may receive multiple position processing requests in a short period of time. Based on this, position processing requests can be placed into a cache queue sequentially according to the time they are received, and processed in order. Since recalling positions does not require the position central node to provide additional positions, for the first position processing request representing recall, the position central node can directly recall positions with the corresponding deviation from the corresponding position sub-node. Since allocating positions requires the position central node to provide additional positions, for the second position processing request representing allocation, if the remaining position amount in the position central node is less than the corresponding deviation, that is, the position central node cannot provide enough positions, the second position processing request needs to be placed at the tail of the cache queue, and processed later after recalling positions based on the first position processing request. For the second position processing request representing allocation, if the remaining position amount in the position central node is not less than the corresponding deviation, that is, the position central node can provide enough positions, the position central node can directly allocate positions with the corresponding deviation to the corresponding position sub-node.

[0133] In this embodiment, when the position centralization node cannot provide enough positions, the second position processing request needs to be placed at the tail of the cache queue. Subsequently, positions are recalled based on the first position processing request before processing this type of second position processing request. However, even after recalling positions based on the first position processing request in the cache queue, it may still be impossible to provide enough positions for this type of second position processing request.

[0134] Based on this, in some optional implementations, after placing the second position processing request at the tail of the cache queue, the following steps are also performed:

[0135] If there is no first position processing request in the cache queue, and the remaining position amount in the position central node is less than the deviation amount corresponding to the second position processing request, then a recall request is sent to each position sub-node so that each position sub-node responds to the recall request and triggers the first position request when it is determined that the deviation amount of the current position amount relative to the target position amount is greater than a preset deviation and the current position amount is greater than the target position amount.

[0136] The above solution addresses the situation where, after recalling positions based on the first position processing request in the cache queue, the position central node still cannot provide sufficient positions for the second position processing request. By sending a recall request to the position sub-nodes, the position sub-nodes that currently meet the recall conditions trigger the first position request, further recalling positions, thereby continuing to allocate positions for the aforementioned second position processing request.

[0137] This embodiment does not limit the specific implementation method of allocating / recalling positions from the position centralization node to the position sub-nodes. For example, since the position sub-nodes not only send position processing requests to the position centralization node but also receive corresponding business requests, both of these interactions affect the position quantity in the position sub-nodes. Typically, business requests are more frequent, while requests initiated by the position sub-nodes and position adjustment operations by the position centralization node are less frequent. Therefore, to avoid position quantity processing errors, the position centralization node can implement a locking mechanism (distributed lock) on the position sub-nodes to allocate / recall positions, preventing the position sub-nodes from deducting position quantities based on business requests when allocating / recalling positions. In other words, requests initiated by the position sub-nodes have the highest priority, position adjustment operations by the position centralization node have the second highest priority, and business requests have the lowest priority.

[0138] The following refers to the above. Figure 2 To illustrate this, let's take a specific example, where the preset deviation is 5:

[0139] The deviation Q1 between the current position size of position sub-node 301 and its target position size is 3, which is less than the preset deviation. Position sub-node 301 does not send a position processing request to the position central node in this cycle.

[0140] The deviation Q2 between the current position size of position sub-node 302 and its target position size is 7, which is greater than the preset deviation, and the current position size is greater than the target position size. Position sub-node 302 sends a first position processing request containing Q2 to the position central node in this period. After receiving the first position processing request, the position central node recalls the position of Q2 to position sub-node 302.

[0141] The deviation Q3 between the current position size of position sub-node 303 and its target position size is 9, which is greater than the preset deviation, and the current position size is less than the target position size. Position sub-node 303 sends a second position processing request containing Q3 to the position central node in this period. After receiving the second position processing request, the position central node first determines its own remaining position size. If its own remaining position size is greater than or equal to Q3, it allocates a position of Q3 to position sub-node 303. If its own remaining position size is less than Q3, it recalls some positions and then allocates a position of Q3 to position sub-node 303.

[0142] The above examples are only for illustrating more clearly how to implement position allocation and recall of position child nodes, and are not intended to limit this application.

[0143] Based on any of the above embodiments, this application provides an interactive flowchart of a second position management method, such as... Figure 6 As shown, it includes the following steps:

[0144] Step S601: After receiving a service request of the corresponding type, if the current position of the position sub-node is less than the position required by the service corresponding to the service request, then the position sub-node sends a service processing request containing the position required by the service to the position central node.

[0145] In this embodiment, as a large number of transactions occur, the overall position balance may become insufficient. That is, the position central node has no remaining positions or the remaining position amount is extremely small, and there are no positions that can be recalled in the position sub-nodes. In this case, the position central node cannot process the second position processing request, and the positions in the position sub-nodes cannot be replenished. As a result, when the position sub-nodes receive a business request of the corresponding type, the current position amount is less than the position amount required by the business corresponding to the business request, that is, the business needs cannot be met.

[0146] At this point, the position central node urgently needs to allocate the required position size to fulfill the business request. Therefore, the position sub-nodes need to send a business processing request containing the required position size to the position central node.

[0147] Step S602: The position central node responds to a service processing request sent by any position sub-node and determines the position amount required for the service corresponding to the service processing request.

[0148] Step S603: If the remaining position amount in the position centralization node is less than the position amount required by the business, the position centralization node recalls the position amount required by the business from at least one other position sub-node and allocates the position amount required by the business to the position sub-node.

[0149] Upon receiving the aforementioned business processing request, the position centralization node must prioritize processing it. Even if the remaining position quantity in the position centralization node is less than the position quantity required by the business, it must retrieve the required position quantity from other position sub-nodes and allocate the required position quantity to the aforementioned position sub-nodes to satisfy the business request.

[0150] In the above scheme, if a position sub-node receives a business request of the corresponding type and its current position size is less than the position size required for the business request, the current position size cannot meet the business demand. The position sub-node sends a business processing request containing the required position size to the position central node. Upon receiving the business processing request, even if the remaining position size in the position central node is less than the required position size, the position central node will retrieve the required position size from other position sub-nodes and allocate the required position size to the aforementioned position sub-nodes to satisfy the business request.

[0151] Refer to the above. Figure 2 Let's illustrate this with a specific example:

[0152] After receiving business request A, position sub-node 301 determines that the required position quantity for business request A is 10, but the current position quantity of position sub-node 301 is only 3. It then sends a business processing request containing the required position quantity of 10 to the position central node.

[0153] At this point, there are no remaining positions in the position central node. Position sub-node 302 currently has 12 positions, and position sub-node 303 currently has 7 positions. Ten positions can be recalled from position sub-node 302; or seven positions can be recalled from position sub-node 302, and three positions can be recalled from position sub-node 303 (the specific recall method can be selected according to the actual application scenario, and this embodiment does not limit it).

[0154] The position central node allocates 10 recalled positions to position child node 301.

[0155] In practice, if the current position size of the position sub-node is less than the position size required for the business corresponding to the above business request, the difference between the required position size and the current position size can be determined first. A business processing request containing this difference can then be sent to the position central node, allowing the position central node to allocate the position size based on this request to the position sub-node. Referring to the example above, if the difference between the required position size and the current position size is 7, the position sub-node 301 sends a business processing request containing 7 positions required for the business to the position central node.

[0156] The examples above are only to illustrate more clearly how to handle situations where the current position size of a position sub-node is less than the position size required by the business corresponding to the business request, but this application is not limited to these examples.

[0157] It is understandable that during implementation, there may be instances where the position centralization node is unable to retrieve the required position amount from other position sub-nodes. This means that there are very few available positions left, and the above business processing requests cannot be completed. In this case, the corresponding institution can be notified to carry out liquidation in a timely manner.

[0158] Since each position sub-node has not yet generated historical position consumption when the position centralization node initially allocates positions to each position sub-node, in some optional implementations, the position centralization node can allocate an initial number of positions to each position sub-node. The initial number corresponding to each position sub-node can be the same or different.

[0159] In some optional embodiments, preset personnel can set the preset information involved in the above embodiments through a management console connected to the position central node.

[0160] In addition, the aforementioned management console can also display relevant data about the positions in each position sub-node to the preset personnel, such as the position consumption rate, so that the preset personnel can adjust various preset information based on the relevant data about the positions in each position sub-node.

[0161] In this embodiment of the application, the position management method executed by the position sub-node is as follows: Figure 7 As shown, it includes the following steps:

[0162] Step S701: Based on the historical position consumption of the position sub-node in the historical period, determine the target position amount of the position sub-node in the current period;

[0163] Step S702: Compare the target position size of the position sub-node with the current position size of the position sub-node;

[0164] Step S703: Based on the comparison result, send a position processing request to the position central node, so that the position central node can allocate positions to the position sub-nodes or recall positions based on the position processing request.

[0165] In some optional implementations, the target position size of the position sub-node in the current period is determined based on the historical position consumption of the position sub-node in a historical period, including:

[0166] Based on the first historical position consumption of the position sub-node in the historical period of this cycle, and / or the second historical position consumption of the position sub-node in the historical period of this cycle, the estimated position consumption of the position sub-node in this period is determined.

[0167] The target position size is determined by the ratio between the estimated position consumption of the position sub-node and the first coefficient; wherein the first coefficient is determined based on the ratio between the historical position consumption and the historical target position size of the position sub-node over multiple historical periods.

[0168] In some optional implementations, before determining the ratio between the estimated position consumption of the position sub-node and the first coefficient as the target position amount, the method further includes:

[0169] The ratio between the estimated position consumption of the position sub-node and the first coefficient is determined to be greater than the current minimum position of the position sub-node and less than the current maximum position of the position sub-node.

[0170] The current minimum position size is determined by multiplying the current position consumption rate of the position sub-node with the duration of the current period; the current maximum position size is a preset multiple of the current minimum position size.

[0171] In some optional implementations, the method further includes:

[0172] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not greater than the current minimum position of the position sub-node, then the current minimum position is determined as the target position; or

[0173] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not less than the current maximum position of the position sub-node, then the current maximum position is determined as the target position.

[0174] In some optional implementations, a position processing request is sent to the position centralization node based on the comparison results, including:

[0175] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is greater than the target position size of the position sub-node, then a first position processing request containing the deviation size is sent to the position central node; wherein, the first position processing request represents recalling the position with the deviation size to the position sub-node.

[0176] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is less than the target position size of the position sub-node, then a second position processing request containing the deviation is sent to the position central node; wherein, the second position processing request represents the allocation of the deviation to the position sub-node.

[0177] In some optional implementations, the method further includes:

[0178] Upon receiving a business request of the corresponding type, if the current position of the position sub-node is less than the position required for the business corresponding to the business request, a business processing request containing the position required for the business is sent to the position central node, so that the position central node allocates the position required for the business to the position sub-node based on the business processing request.

[0179] In this embodiment of the application, the position management method executed by the position centralization node is as follows: Figure 8 As shown, it includes the following steps:

[0180] Step S801: Receive position processing requests sent by each position sub-node;

[0181] Step S802: In response to a position processing request sent by any position sub-node, allocate a position to the position sub-node or recall a position;

[0182] The position processing request is triggered by the position sub-node determining its target position amount for the current period based on the historical position consumption amount in the historical period, and based on the comparison result between the target position amount and the current position amount of the position sub-node.

[0183] In some optional implementations, in response to a position processing request sent by any position sub-node, allocating a position to the position sub-node or recalling a position includes:

[0184] For any first position processing request in the cache queue, the corresponding position with the specified deviation is recalled to the position sub-node corresponding to the first position processing request. The first position processing request is triggered when the corresponding position sub-node's deviation between the current position size and the target position size is greater than a preset deviation, and the current position size is greater than the target position size. The position processing requests in the cache queue are sequentially placed into the cache queue based on the time the request is received. The target position size is determined by the corresponding position sub-node based on historical position consumption over a historical period.

[0185] For any second position processing request in the cache queue, if the remaining position amount in the position set node is less than the deviation amount corresponding to the second position processing request, then the second position processing request is placed at the tail of the cache queue; wherein, the second position processing request is triggered when the deviation of the current position amount relative to the target position amount is greater than a preset deviation, and the current position amount is less than the target position amount;

[0186] For any second position processing request in the cache queue, if the remaining position amount in the position central node is not less than the deviation amount corresponding to the second position processing request, then the position with the corresponding deviation amount is allocated to the position sub-node corresponding to the second position processing request.

[0187] In some alternative implementations, after placing the second position processing request at the tail of the cache queue, the method further includes:

[0188] If there is no first position processing request in the cache queue, and the remaining position amount in the position central node is less than the deviation amount corresponding to the second position processing request, then a recall request is sent to each position sub-node so that each position sub-node responds to the recall request and triggers the first position request when it is determined that the deviation amount of the current position amount relative to the target position amount is greater than a preset deviation and the current position amount is greater than the target position amount.

[0189] In some optional implementations, the method further includes:

[0190] In response to a service processing request sent by any position sub-node, determine the required position size for the service corresponding to the service processing request; wherein, the service processing request is triggered by the position sub-node when the current position size is less than the required position size for the service corresponding to the received service request;

[0191] If the remaining position amount in the position central node is less than the position amount required by the business, the required position amount will be recalled from at least one other position sub-node, and the required position amount will be allocated to the position sub-node.

[0192] Figure 7 and Figure 8 For details on the specific implementation of the embodiments, please refer to the implementation of the above-described interaction method; repeated details will not be repeated here.

[0193] like Figure 9 As shown, based on and Figure 7 Using the same inventive concept as the position management method shown, this application provides a first position management device 900, applied to a position sub-node, comprising:

[0194] The position determination module 901 is used to determine the target position amount of the position sub-node in the current period based on the historical position consumption of the position sub-node in the historical period.

[0195] The position comparison module 902 is used to compare the target position amount of the position sub-node with the current position amount of the position sub-node.

[0196] The sending module 903 is used to send a position processing request to the position central node based on the comparison result, so that the position central node can allocate positions to the position sub-nodes or recall positions based on the position processing request.

[0197] In some optional implementations, the position determination module 901 is specifically used for:

[0198] Based on the first historical position consumption of the position sub-node in the historical period of this cycle, and / or the second historical position consumption of the position sub-node in the historical period of this cycle, the estimated position consumption of the position sub-node in this period is determined.

[0199] The target position size is determined by the ratio between the estimated position consumption of the position sub-node and the first coefficient; wherein the first coefficient is determined based on the ratio between the historical position consumption and the historical target position size of the position sub-node over multiple historical periods.

[0200] In some optional implementations, before determining the ratio between the estimated position consumption of the position sub-node and the first coefficient as the target position amount, the position determination module 901 is further configured to:

[0201] The ratio between the estimated position consumption of the position sub-node and the first coefficient is determined to be greater than the current minimum position of the position sub-node and less than the current maximum position of the position sub-node.

[0202] The current minimum position size is determined by multiplying the current position consumption rate of the position sub-node with the duration of the current period; the current maximum position size is a preset multiple of the current minimum position size.

[0203] In some optional implementations, the position determination module 901 is also used for:

[0204] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not greater than the current minimum position of the position sub-node, then the current minimum position is determined as the target position; or

[0205] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not less than the current maximum position of the position sub-node, then the current maximum position is determined as the target position.

[0206] In some alternative implementations, the sending module 903 is specifically used for:

[0207] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is greater than the target position size of the position sub-node, then a first position processing request containing the deviation size is sent to the position central node; wherein, the first position processing request represents recalling the position with the deviation size to the position sub-node.

[0208] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is less than the target position size of the position sub-node, then a second position processing request containing the deviation is sent to the position central node; wherein, the second position processing request represents the allocation of the deviation to the position sub-node.

[0209] In some optional implementations, the sending module 903 is further configured to:

[0210] Upon receiving a business request of the corresponding type, if the current position of the position sub-node is less than the position required for the business corresponding to the business request, a business processing request containing the position required for the business is sent to the position central node, so that the position central node allocates the position required for the business to the position sub-node based on the business processing request.

[0211] like Figure 10 As shown, based on and Figure 8 Using the same inventive concept as the position management method shown, this application provides a second position management device 1000, applied to a position centralization node, comprising:

[0212] The position processing module 1001 is used to respond to a position processing request sent by any position sub-node by allocating positions to the position sub-node or recalling positions.

[0213] The position processing request is triggered by the position sub-node determining its target position amount for the current period based on the historical position consumption amount in the historical period, and based on the comparison result between the target position amount and the current position amount of the position sub-node.

[0214] In some optional implementations, the position processing module 1001 is specifically used for:

[0215] For any first position processing request in the cache queue, the corresponding position with the specified deviation is recalled to the position sub-node corresponding to the first position processing request. The first position processing request is triggered when the corresponding position sub-node's deviation between the current position size and the target position size is greater than a preset deviation, and the current position size is greater than the target position size. The position processing requests in the cache queue are sequentially placed into the cache queue based on the time the request is received. The target position size is determined by the corresponding position sub-node based on historical position consumption over a historical period.

[0216] For any second position processing request in the cache queue, if the remaining position amount in the position set node is less than the deviation amount corresponding to the second position processing request, then the second position processing request is placed at the tail of the cache queue; wherein, the second position processing request is triggered when the deviation of the current position amount relative to the target position amount is greater than a preset deviation, and the current position amount is less than the target position amount;

[0217] For any second position processing request in the cache queue, if the remaining position amount in the position set node is not less than the deviation amount corresponding to the second position processing request, then the position with the corresponding deviation amount is allocated to the position sub-node corresponding to the second position processing request.

[0218] In some optional implementations, the position processing module 1001 is further configured to:

[0219] After placing the second position processing request at the tail of the cache queue, if there is no first position processing request in the cache queue and the remaining position amount in the position central node is less than the deviation amount corresponding to the second position processing request, a recall request is sent to each position sub-node so that each position sub-node responds to the recall request and triggers the first position request when it is determined that the deviation amount of the current position amount relative to the target position amount is greater than a preset deviation and the current position amount is greater than the target position amount.

[0220] In some optional implementations, the position processing module 1001 is further configured to:

[0221] In response to a service processing request sent by any position sub-node, determine the required position size for the service corresponding to the service processing request; wherein, the service processing request is triggered by the position sub-node when the current position size is less than the required position size for the service corresponding to the received service request;

[0222] If the remaining position amount in the position central node is less than the position amount required by the business, the required position amount will be recalled from at least one other position sub-node, and the required position amount will be allocated to the position sub-node.

[0223] Figure 9 and Figure 10 For details on the specific implementation of the embodiments, please refer to the implementation of the above-described interaction method; repeated details will not be repeated here.

[0224] Based on the same technical concept, this application also provides a head-size sub-node 1100, such as... Figure 11 As shown, it includes at least one processor 1101 and a memory 1102 connected to at least one processor. In this embodiment, the specific connection medium between the processor 1101 and the memory 1102 is not limited. Figure 11 Taking the connection between processor 1101 and memory 1102 via bus 1103 as an example. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 11 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0225] The processor 1101 is the control center of the sub-node, and can connect to various parts of the sub-node using various interfaces and lines. It performs data processing by running or executing instructions stored in memory 1102 and calling data stored in memory 1102. Optionally, the processor 1101 may include one or more processing units. The processor 1101 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles issuing instructions. It is understood that the modem processor may not be integrated into the processor 1101. In some embodiments, the processor 1101 and memory 1102 may be implemented on the same chip; in some embodiments, they may be implemented on separate chips.

[0226] Processor 1101 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the position management method embodiments can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0227] Memory 1102, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1102 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 1102 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 1102 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0228] In this embodiment, the memory 1102 stores a computer program, which, when executed by the processor 1101, causes the processor 1101 to perform the following:

[0229] Based on the historical position consumption of the position sub-node in the historical period, the target position amount of the position sub-node in the current period is determined;

[0230] Compare the target position size of the position sub-node with the current position size of the position sub-node;

[0231] Based on the comparison results, a position processing request is sent to the position central node, so that the position central node can allocate positions to the position sub-nodes or recall positions based on the position processing request.

[0232] In some optional implementations, processor 1101 specifically performs:

[0233] Based on the first historical position consumption of the position sub-node in the historical period of this cycle, and / or the second historical position consumption of the position sub-node in the historical period of this cycle, the estimated position consumption of the position sub-node in this period is determined.

[0234] The target position size is determined by the ratio between the estimated position consumption of the position sub-node and the first coefficient; wherein the first coefficient is determined based on the ratio between the historical position consumption and the historical target position size of the position sub-node over multiple historical periods.

[0235] In some optional implementations, before the processor 1101 determines the target position amount as the ratio between the estimated position consumption of the position sub-node and the first coefficient, it further performs the following:

[0236] The ratio between the estimated position consumption of the position sub-node and the first coefficient is determined to be greater than the current minimum position of the position sub-node and less than the current maximum position of the position sub-node.

[0237] The current minimum position size is determined by multiplying the current position consumption rate of the position sub-node with the duration of the current period; the current maximum position size is a preset multiple of the current minimum position size.

[0238] In some alternative implementations, processor 1101 also performs:

[0239] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not greater than the current minimum position of the position sub-node, then the current minimum position is determined as the target position; or

[0240] If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not less than the current maximum position of the position sub-node, then the current maximum position is determined as the target position.

[0241] In some optional implementations, processor 1101 specifically performs:

[0242] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is greater than the target position size of the position sub-node, then a first position processing request containing the deviation size is sent to the position central node; wherein, the first position processing request represents recalling the position with the deviation size to the position sub-node.

[0243] If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is less than the target position size of the position sub-node, then a second position processing request containing the deviation is sent to the position central node; wherein, the second position processing request represents the allocation of the deviation to the position sub-node.

[0244] In some alternative implementations, processor 1101 also performs:

[0245] Upon receiving a business request of the corresponding type, if the current position of the position sub-node is less than the position required for the business corresponding to the business request, a business processing request containing the position required for the business is sent to the position central node, so that the position central node allocates the position required for the business to the position sub-node based on the business processing request.

[0246] Since the inch node is the same as the inch node in the method of this application embodiment, and the principle of the inch node in solving the problem is similar to that of the method, the implementation of the inch node can refer to the implementation of the method, and the repeated parts will not be described again.

[0247] Based on the same technical concept, this application also provides a position centralization node 1200, such as... Figure 12 As shown, it includes at least one processor 1201 and a memory 1202 connected to at least one processor. In this embodiment, the specific connection medium between the processor 1201 and the memory 1202 is not limited. Figure 12 Taking the connection between processor 1201 and memory 1202 via bus 1203 as an example. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0248] The processor 1201 serves as the control center of the position centralization node. It connects to various parts of the position centralization node via various interfaces and lines, and performs data processing by running or executing instructions stored in the memory 1202 and accessing data stored in the memory 1202. Optionally, the processor 1201 may include one or more processing units. The processor 1201 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and applications, while the modem processor primarily handles issuing instructions. It is understood that the modem processor may not be integrated into the processor 1201. In some embodiments, the processor 1201 and the memory 1202 may be implemented on the same chip; in other embodiments, they may be implemented on separate chips.

[0249] Processor 1201 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the position management method embodiments can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0250] Memory 1202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1202 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 1202 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 1202 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0251] In this embodiment, the memory 1202 stores a computer program, which, when executed by the processor 1201, causes the processor 1201 to perform the following:

[0252] In response to a position processing request sent by any position sub-node, allocate a position to the position sub-node or recall a position;

[0253] The position processing request is triggered by the position sub-node determining its target position amount for the current period based on the historical position consumption amount in the historical period, and based on the comparison result between the target position amount and the current position amount of the position sub-node.

[0254] In some optional implementations, processor 1201 specifically performs:

[0255] For any first position processing request in the cache queue, the corresponding position with the specified deviation is recalled to the position sub-node corresponding to the first position processing request; wherein, the first position processing request is triggered by the corresponding position sub-node when the deviation of the current position amount from the target position amount is greater than a preset deviation, and the current position amount is greater than the target position amount; the position processing requests in the cache queue are sequentially placed into the cache queue based on the time when the position processing request is received; the target position amount is determined by the corresponding position sub-node based on the historical position consumption amount in a historical period;

[0256] For any second position processing request in the cache queue, if the remaining position amount in the position set node is less than the deviation amount corresponding to the second position processing request, then the second position processing request is placed at the tail of the cache queue; wherein, the second position processing request is triggered when the deviation of the current position amount relative to the target position amount is greater than a preset deviation, and the current position amount is less than the target position amount;

[0257] For any second position processing request in the cache queue, if the remaining position amount in the position set node is not less than the deviation amount corresponding to the second position processing request, then the position with the corresponding deviation amount is allocated to the position sub-node corresponding to the second position processing request.

[0258] In some alternative implementations, processor 1201 also performs:

[0259] After placing the second position processing request at the tail of the cache queue, if there is no first position processing request in the cache queue and the remaining position amount in the position central node is less than the deviation amount corresponding to the second position processing request, a recall request is sent to each position sub-node so that each position sub-node responds to the recall request and triggers the first position request when it is determined that the deviation amount of the current position amount relative to the target position amount is greater than a preset deviation and the current position amount is greater than the target position amount.

[0260] In some alternative implementations, processor 1201 also performs:

[0261] In response to a service processing request sent by any position sub-node, determine the required position size for the service corresponding to the service processing request; wherein, the service processing request is triggered by the position sub-node when the current position size is less than the required position size for the service corresponding to the received service request;

[0262] If the remaining position amount in the position central node is less than the position amount required by the business, the required position amount will be recalled from at least one other position sub-node, and the required position amount will be allocated to the position sub-node.

[0263] Since the position concentration node is the same as the position concentration node in the method of this application embodiment, and the principle of the position concentration node in solving the problem is similar to that of this method, the implementation of the position concentration node can refer to the implementation of the method, and the repeated parts will not be described again.

[0264] Based on the same technical concept, embodiments of this application also provide a computer-readable storage medium storing a computer program executable by a computing device, which, when run on the computing device, causes the computing device to perform the steps of the above-described position management method.

[0265] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0266] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can 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, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0267] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0268] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0269] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0270] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A position management method, characterized in that, This method, applicable to any position sub-node, connects multiple position sub-nodes to a position central node, with different position nodes corresponding to different business types. The method includes: Based on the historical position consumption of the position sub-node in the historical period, the target position amount of the position sub-node in the current period is determined; Compare the target position size of the position sub-node with the current position size of the position sub-node; Based on the comparison results, a position processing request is sent to the position central node, so that the position central node can allocate positions to the position sub-nodes or recall positions based on the position processing request. Based on the comparison results, a position processing request is sent to the position centralization node, including: If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is greater than the target position size of the position sub-node, then a first position processing request containing the deviation size is sent to the position central node; wherein, the first position processing request represents recalling the position with the deviation size to the position sub-node. If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is less than the target position size of the position sub-node, then a second position processing request containing the deviation is sent to the position central node; wherein, the second position processing request represents the allocation of the deviation to the position sub-node.

2. The method as described in claim 1, characterized in that, Based on the historical position consumption of the position sub-node in a historical period, the target position amount of the position sub-node in the current period is determined, including: Based on the first historical position consumption of the position sub-node in the historical period of this cycle, and / or the second historical position consumption of the position sub-node in the historical period of this cycle, the estimated position consumption of the position sub-node in this period is determined. The target position size is determined by the ratio between the estimated position consumption of the position sub-node and the first coefficient; wherein the first coefficient is determined based on the ratio between the historical position consumption and the historical target position size of the position sub-node over multiple historical periods.

3. The method as described in claim 2, characterized in that, Before determining the ratio between the estimated position consumption of the position sub-node and the first coefficient as the target position amount, the method further includes: The ratio between the estimated position consumption of the position sub-node and the first coefficient is determined to be greater than the current minimum position of the position sub-node and less than the current maximum position of the position sub-node. The current minimum position size is determined by multiplying the current position consumption rate of the position sub-node with the duration of the current period; the current maximum position size is a preset multiple of the current minimum position size.

4. The method as described in claim 3, characterized in that, The method further includes: If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not greater than the current minimum position of the position sub-node, then the current minimum position is determined as the target position; or If the ratio between the estimated position consumption of the position sub-node and the first coefficient is not less than the current maximum position of the position sub-node, then the current maximum position is determined as the target position.

5. The method as described in claim 1, characterized in that, The method further includes: Upon receiving a business request of the corresponding type, if the current position of the position sub-node is less than the position required for the business corresponding to the business request, a business processing request containing the position required for the business is sent to the position central node, so that the position central node allocates the position required for the business to the position sub-node based on the business processing request.

6. A position management method, characterized in that, Applied to a position centralization node, which is connected to multiple position sub-nodes, with different position sub-nodes corresponding to different business types, the method includes: For any first position processing request in the cache queue, the corresponding position with the specified deviation is recalled to the position sub-node corresponding to the first position processing request. The first position processing request is triggered when the corresponding position sub-node's deviation between the current position size and the target position size is greater than a preset deviation, and the current position size is greater than the target position size. The position processing requests in the cache queue are sequentially placed into the cache queue based on the time the request is received. The target position size is determined by the corresponding position sub-node based on historical position consumption over a historical period. For any second position processing request in the cache queue, if the remaining position amount in the position set node is less than the deviation amount corresponding to the second position processing request, then the second position processing request is placed at the tail of the cache queue; wherein, the second position processing request is triggered when the deviation of the current position amount relative to the target position amount is greater than a preset deviation, and the current position amount is less than the target position amount; For any second position processing request in the cache queue, if the remaining position amount in the position set node is not less than the deviation amount corresponding to the second position processing request, then the position with the corresponding deviation amount is allocated to the position sub-node corresponding to the second position processing request.

7. The method as described in claim 6, characterized in that, After placing the second position processing request at the tail of the cache queue, the method further includes: If there is no first position processing request in the cache queue, and the remaining position amount in the position central node is less than the deviation amount corresponding to the second position processing request, then a recall request is sent to each position sub-node so that each position sub-node responds to the recall request and triggers the first position request when it is determined that the deviation amount of the current position amount relative to the target position amount is greater than a preset deviation and the current position amount is greater than the target position amount.

8. The method as described in claim 6, characterized in that, The method further includes: In response to a service processing request sent by any position sub-node, determine the required position size for the service corresponding to the service processing request; wherein, the service processing request is triggered by the position sub-node when the current position size is less than the required position size for the service corresponding to the received service request; If the remaining position amount in the position central node is less than the position amount required by the business, the required position amount will be recalled from at least one other position sub-node, and the required position amount will be allocated to the position sub-node.

9. A position management device, characterized in that, Applied to any position sub-node, multiple position sub-nodes are connected to a position central node, and different position nodes correspond to different service types. This device includes: The position determination module is used to determine the target position amount of the position sub-node in the current period based on the historical position consumption of the position sub-node in the historical period. The position comparison module is used to compare the target position amount of the position sub-node with the current position amount of the position sub-node. The sending module is used to send a position processing request to the position central node based on the comparison result, so that the position central node can allocate positions to the position sub-nodes or recall positions based on the position processing request. The sending module is specifically used for: If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is greater than the target position size of the position sub-node, then a first position processing request containing the deviation size is sent to the position central node; wherein, the first position processing request represents recalling the position with the deviation size to the position sub-node. If the deviation of the current position size of the position sub-node from the target position size of the position sub-node is greater than a preset deviation, and the current position size of the position sub-node is less than the target position size of the position sub-node, then a second position processing request containing the deviation is sent to the position central node; wherein, the second position processing request represents the allocation of the deviation to the position sub-node.