A resource processing method and device, a storage medium and an electronic device

CN122204920BActive Publication Date: 2026-09-25CHONGQING ANT CONSUMER FINANCE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610646735.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-12
Publication Date
2026-09-25
Estimated Expiration
2046-05-12

AI Technical Summary

Technical Problem

然而,这种管控规则与特定底层逻辑深度耦合的架构存在明显的缺陷

Benefits of technology

在本说明书一个或多个实施例中,采用所提供的技术方案解决了底层计算机系统在面对复杂多维的数据资源调度时,因前端请求特征与底层数据节点深度硬编码耦合导致的处理规则僵化、系统横向扩展极其困难的技术局限;以及,高并发场景下传统单层级限额方式无法兼顾全局与局部约束,且多级计算过程易引发系统I/O阻塞和计算效率低下的技术局限。通过引入资源调度规则矩阵,在底层架构上彻底解耦了前端动态业务特征与底层静态数据节点的直接绑定关系,实现了请求路由的自适应寻址与动态匹配,大幅降低了系统在横向扩展与规则变更时的算力开销与重构成本;同时依靠基于当前数据资源应用场景的状态数据提取与多级节点配额约束规则的聚合计算机制能够精准、快速地推演出符合全维度安全水位线的可用配额阈值,并在最终的比对控制环节实现了决断拦截与资源放行,从根源上杜绝了底层物理或逻辑资源由于脏读引发的超发超卖风险,更提升了计算机系统在复杂高并发调度场景下的资源流转灵活性、吞吐率以及整体运行稳定性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122204920B_ABST
    Figure CN122204920B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification disclose a resource processing method and device, a storage medium and an electronic device, wherein the method comprises: determining a target call quantity and a request feature identifier for a resource call request of a data resource processing service, performing routing node matching on the request feature identifier based on a preset resource scheduling rule matrix, and locking a target data processing node; extracting quota state data of the target data processing node in a current data resource application scenario, and combining a preset multi-level node quota constraint rule to aggregate and calculate a target available quota threshold of the target data processing node; and finally comparing the target call quantity with the target available quota threshold, and performing corresponding data resource call processing according to the comparison result. By adopting the embodiments of the present specification, the flexibility and accuracy of multi-level resource scheduling are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a resource processing method, apparatus, storage medium, and electronic device. Background Technology

[0002] In modern resource data scheduling and management scenarios, data resources can be any schedulable, quantifiable, cost-effective, and quota-constrained circulating data. Whether it is allocating power resource load, managing carbon resource data emission quotas, or processing financial resource data streams, resource data processing all face a common data transfer task (that is, transferring data from one node to another). A common scenario in data transfer tasks is that service platforms that provide data resource processing services (i.e., service platforms associated with "platform data accounts") need to continuously acquire and schedule resource data such as computing power data, power data, carbon power data, and financial data from multiple data source nodes (i.e., data source nodes associated with "node data accounts") to enable service platforms to better provide data services to users.

[0003] In various complex data processing services, the management and control of data resource quotas by the service platform is a crucial fundamental function. Resource quota management in related technologies is typically developed using highly customized hard-coded methods, often requiring the independent construction of multiple parallel processing systems for different application scenarios. However, this architecture, deeply coupled with specific underlying logic, has significant drawbacks. When the service platform system needs to horizontally scale to accommodate new resource management scenarios, the existing architecture struggles to adapt smoothly, often requiring substantial manpower for repetitive development and testing. This not only leads to high development and subsequent maintenance costs and poor overall system flexibility, but also results in a severe waste of computing power and storage resources on the underlying servers due to the redundant deployment of multiple parallel systems. Summary of the Invention

[0004] This specification provides a resource processing method, apparatus, storage medium, and electronic device, the technical solutions of which are as follows: Firstly, embodiments of this specification provide a resource processing method, the method comprising: Receive resource call requests for data resource processing services, and determine the target call volume and request feature identifier based on the resource call requests; Based on a preset resource scheduling rule matrix, the request feature identifier is matched with routing nodes to locate the target data processing node corresponding to the resource call request; Extract the quota status data of the target data processing node in the current data resource application scenario, and calculate the target available quota threshold of the target data processing node based on the preset multi-level node quota constraint rules and the quota status data. The target call volume is compared with the target available quota threshold, and the resource call request is processed as a data resource call based on the comparison result.

[0005] Secondly, embodiments of this specification provide a resource processing apparatus, the apparatus comprising: The request receiving module is used to receive resource call requests for data resource processing services, and determine the target call volume and request feature identifier based on the resource call requests; The quota processing module is used to perform routing node matching on the request feature identifier based on a preset resource scheduling rule matrix, so as to lock the target data processing node corresponding to the resource call request; The quota processing module is used to extract the quota status data of the target data processing node in the current data resource application scenario, and to aggregate and calculate the target available quota threshold of the target data processing node based on the preset multi-level node quota constraint rules and the quota status data. The quota processing module is used to compare the target call volume with the target available quota threshold, and process the resource call request for data resource call based on the comparison result.

[0006] Thirdly, embodiments of this specification provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.

[0007] Fourthly, this specification provides a computer program product storing at least one instruction adapted to be loaded by a processor and to execute the method steps of one or more embodiments of this specification.

[0008] Fifthly, this specification provides a computer program product storing at least one instruction adapted to be loaded by a processor and to execute the method steps of one or more embodiments of this specification.

[0009] Sixthly, embodiments of this specification provide an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.

[0010] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following: In one or more embodiments of this specification, the provided technical solutions address the limitations of underlying computer systems when facing complex and multidimensional data resource scheduling. These limitations include rigid processing rules caused by the deep hard-coded coupling between front-end request characteristics and underlying data nodes, making horizontal system expansion extremely difficult. Additionally, traditional single-level quota methods in high-concurrency scenarios cannot balance global and local constraints, and multi-level calculation processes are prone to causing system I / O blocking and low computational efficiency. By introducing a resource scheduling rule matrix, the direct binding relationship between front-end dynamic business characteristics and underlying static data nodes is completely decoupled at the underlying architecture. This enables adaptive addressing and dynamic matching of request routing, significantly reducing the computing power overhead and reconstruction costs when the system is horizontally expanded and rules are changed. At the same time, relying on the state data extraction based on the current data resource application scenario and the aggregation calculation mechanism of multi-level node quota constraint rules, the available quota threshold that meets the full-dimensional security water level can be accurately and quickly deduced. In the final comparison and control stage, decision-making interception and resource release are realized, eliminating the risk of over-issuance and over-selling of underlying physical or logical resources due to dirty reads from the root. This further improves the resource flow flexibility, throughput and overall operational stability of the computer system in complex high-concurrency scheduling scenarios. Attached Figure Description

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

[0012] Figure 1 This is a flowchart illustrating a resource processing method provided in an embodiment of this specification; Figure 2 This is a schematic diagram of a routing node matching process provided in an embodiment of this specification; Figure 3 This is a schematic diagram of the structure of a resource processing device provided in the embodiments of this specification; Figure 4 This is a schematic diagram of the structure of an electronic device provided in the embodiments of this specification. Detailed Implementation

[0013] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0014] In the description of this specification, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this specification based on the specific circumstances. Furthermore, in the description of this specification, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.

[0015] The present specification will now be described in detail with reference to specific embodiments.

[0016] First, we will illustrate the resource processing scenarios to which the method in this application is applicable.

[0017] The data resource processing services and resource quotas involved in the embodiments of this application are widely present in various underlying computer system architectures that require fine-grained resource scheduling and multi-level concurrency control. Specific resource processing scenarios include, but are not limited to, the following typical architectures: Scenario 1: Cloud Computing and Data Center Computing Resource Allocation: In a distributed cloud computing platform, the computing power (such as the number of CPU cores, GPU threads, and memory capacity) of the underlying physical servers is a limited resource quota. The cloud computing scheduling center needs to manage massive concurrent creation requests. In this scenario, the global domain corresponds to the computing power limit of the entire cloud server cluster; the associated node cluster corresponds to the computing power quota of a specific enterprise tenant or virtual machine subnet; and a single data processing node corresponds to a specific virtual machine (VM) or container instance. The resource handling methods described in this specification can be used to solve the technical problems of overselling virtual machine computing power and dynamic elastic scaling under high concurrency.

[0018] Scenario 2: API Call Traffic Control and Dynamic Rate Limiting in Microservice Architecture: In the microservice gateway of large-scale internet applications, to protect the core backend services from being overwhelmed by high traffic, strict quota management is required for the API call frequency (e.g., queries per second, QPS) of each access party. In this scenario, resource call requests are external network access packets; the target available quota threshold is the maximum number of network connections or calls allowed at the current moment. The resource handling methods described in this specification can be used to build multi-dimensional hierarchical rate limiting strategies (e.g., global system maximum rate limiting, joint rate limiting for specific business lines, and independent rate limiting for a single interface) to ensure the high availability of underlying network services.

[0019] Scenario 3: Capacity Quota Management in Distributed Storage Systems: For distributed file systems or object storage clusters, the system needs to control the amount of data (number of bytes or file blocks) written by different business modules. In this scenario, resource request requests correspond to data write or disk space occupancy instructions. The resource processing method described in this specification can, based on multi-level node quota constraint rules, quickly verify and decide whether to allow the physical write operation of the current data block without relying on global database pessimistic locking, thereby optimizing the I / O scheduling efficiency of storage nodes.

[0020] In summary, the resource quota processing method provided in the embodiments of this specification is not an abstract logical rule, but a computer execution process deeply embedded in the underlying computer architecture, network devices, or storage media control components. It aims to solve the underlying technical limitations of multi-level resource conflicts and scheduling bottlenecks in distributed systems.

[0021] The above are merely illustrative examples of resource processing scenarios and do not limit the scenarios in which the resource processing methods in this specification are applied. The resource quota processing method of this application embodiment will be described in detail below with specific process steps.

[0022] In one embodiment, such as Figure 1 As shown, a resource processing method is proposed, which can be implemented using a computer program and run on a resource processing device based on the von Neumann architecture. This computer program can be integrated into an application or run as a standalone utility application. The resource processing device can be a service platform, including but not limited to: personal computers, tablets, handheld devices, in-vehicle devices, wearable devices, computing devices, or other processing devices connected to a wireless modem. In different networks, terminal devices can be called by different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user equipment, cellular phone, cordless phone, terminal device in 5G networks or future evolved networks, etc.

[0023] Specifically, the resource processing method includes: S102: Receive a resource call request for data resource processing service, and determine the target call volume and request feature identifier based on the resource call request; Data resource processing services refer to the core data processing hub or business gateway that relies on underlying computer networks, IoT sensing devices, or core data transfer and processing systems to quantitatively track, uniformly allocate, and schedule the flow of physical or virtual resource elements (such as power grid load resources, carbon emission quota data, and financial resource data streams) in specific scenarios.

[0024] Resource request refers to an electronic instruction or network message reported by a lower-level smart terminal (such as a smart meter or carbon emission monitoring probe) or initiated by an upstream business system, requesting the system to allocate or record a specific amount of resource consumption.

[0025] The target call volume refers to the quantified indicators of specific resource data that are expected to be allocated or reduced, obtained from the resource call request. For example, the requested power load in kilowatts, the requested carbon emission equivalent in tons, or the requested amount of funds data packets.

[0026] Request feature identifiers refer to the characteristics extracted from resource request requests, used to characterize request elements such as the device to which the request belongs, service affiliation, regional scope, and node account attributes. They are typically represented in structured key-value pair format and serve as credentials for subsequent multi-level control and routing.

[0027] For example, the service platform receives resource request requests (such as requests for surged electricity load or data settlement requests) reported by initiators such as clients or upstream business nodes. The service platform can continuously consume these message events through a streaming computing engine, performing data cleaning and deserialization. The target request volume is extracted from the resource request data packets; simultaneously, request feature identifiers (such as service business elements) are extracted from the message headers.

[0028] S104: Based on a preset resource scheduling rule matrix, perform routing node matching on the request feature identifier to lock the target data processing node corresponding to the resource call request; The resource scheduling rule matrix refers to a multi-dimensional data mapping structure that is pre-configured and loaded into memory. This matrix consists of multiple sets of rule entries that define resource scheduling. Each set of rule entries defines a deterministic relationship between a specific combination of request feature dimensions (such as device attributes, region affiliation, business channel, etc.) and a specific underlying data processing node.

[0029] Routing node matching refers to a computer data retrieval process that uses the request feature identifier obtained in real time as input parameters to perform addressing, comparison and mapping in the resource scheduling rule matrix, with the aim of finding a unique target data processing node that meets business constraints.

[0030] The target data processing node refers to the basic data structure entity in the underlying system topology that actually carries, records and calculates the resource quota status of a specific entity (such as the actual load limit of a substation, the carbon emission account balance of a blast furnace, and the available data quota of a subsidiary).

[0031] As an illustration, a resource scheduling rule matrix is ​​loaded into memory. This matrix is ​​represented in the underlying data structure as a mapping dictionary containing multiple preset rule entries. After determining the request characteristic identifier, a traversal and comparison mechanism is initiated.

[0032] First, the routing engine extracts all keys and their corresponding values ​​from the request feature identifier. The extracted key-value pairs are then compared one by one with the preset configuration items in the resource scheduling rule matrix using Boolean logic. During the verification process, it is prioritized to determine whether the request feature identifier fully contains the required key name dimensions of the rule configuration item. Provided the dimensions are aligned, the dynamic value of the request feature identifier is further rigorously verified to ensure it is completely consistent with the valid value range or enumerated value in the preset configuration item.

[0033] A rule is considered triggered if and only if all the key names and values ​​across multiple dimensions meet the exact match condition. At this point, the underlying node ID or physical memory pointer address bound to the matched rule is extracted from its configuration, and the corresponding target data processing node is located based on the underlying node ID or physical memory pointer address.

[0034] S106: Extract the quota status data of the target data processing node in the current data resource application scenario, and calculate the target available quota threshold of the target data processing node based on the preset multi-level node quota constraint rules and the quota status data. The current data resource application scenario refers to the specific physical environment, business cycle, or logical isolation domain in which a specific batch of data resource allocation tasks are performed (e.g., the carbon emission accounting cycle of a specific quarter, or the concurrent traffic control domain during a specific promotional period).

[0035] Quota status data refers to an objective snapshot of resource usage of the target data processing node and its associated topology levels within the current machine clock cycle. Quota status data typically includes: the node's own used quota value, the total used quota of the associated node cluster, and the total global used quota of the current data resource application scenario.

[0036] Multi-level node quota constraint rules refer to the threshold control algorithm logic set by the system with hierarchical wrapping relationships. Optionally, they may include: quota constraint rules that restrict the quota of independent level nodes at a single bottom level, quota constraint rules that restrict the quota of associated level nodes in intermediate topology groups, and global domain node quota constraint rules that restrict the overall upper limit of the system.

[0037] The target available quota threshold can be understood as a critical value or threshold for the current number of requests.

[0038] To illustrate, the process involves reading quota status data and executing hard calculation logic: First, extract the independent-level constraint configuration of the target data processing node, calculate the difference between its initial allocated quota and the node's own already called quota, and output the independent-level available quota. Second, locate the set of associated node clusters containing the target data processing node, calculate the sum of the called quotas of all nodes in the cluster, and subtract this sum from the associated allocated quota of the cluster to output the associated-level available quota (if a node belongs to multiple clusters, calculate multiple differences and extract the local minimum). Third, obtain the global allocated quota of the current data resource application scenario, subtract the sum of the global called quota, and output the global domain available quota. Finally, input the calculated independent-level available quota, associated-level available quota, and global domain available quota into a comparator, perform a minimum value extraction operation, and use the extracted global minimum value as the final target available quota threshold.

[0039] S108: Compare the target call volume with the target available quota threshold, and process the resource call request for data resource call based on the comparison result.

[0040] Data resource access processing refers to the final computer instructions executed on a resource access request based on the comparison results. It typically includes resource status change operations (allowing access and deducting the access amount) and resource access interception operations (rejecting access and triggering a circuit breaker).

[0041] In one feasible implementation, specifically, the data resource retrieval processing of the resource retrieval request based on the comparison result can be performed as follows: 1) If the comparison result is that the target call volume is less than or equal to the target available quota threshold, then the resource call request is determined to meet the system security constraints and the resource call request is allowed. The target call volume is deducted from the dynamic available threshold record of the target data processing node, and a corresponding status change record is generated and stored in the database. 2) If the comparison result shows that the target call volume is greater than the target available quota threshold, the system circuit breaker mechanism is triggered to reject the resource call request.

[0042] In the embodiments of this specification, the technical limitations of the underlying computer system when facing complex and multi-dimensional data resource scheduling are solved, such as rigid processing rules caused by the deep hard-coded coupling between the front-end request characteristics and the underlying data nodes, making horizontal scaling of the system extremely difficult; and the technical limitations of the traditional single-level quota method in high-concurrency scenarios, which cannot take into account both global and local constraints, and the fact that multi-level calculation processes are prone to causing system I / O blocking and low computing efficiency. By introducing a resource scheduling rule matrix, the direct binding relationship between front-end dynamic business characteristics and underlying static data nodes is completely decoupled at the underlying architecture. This enables adaptive addressing and dynamic matching of request routing, significantly reducing the computing power overhead and reconstruction costs when the system is horizontally expanded and rules are changed. At the same time, relying on the state data extraction based on the current data resource application scenario and the aggregation calculation mechanism of multi-level node quota constraint rules, the available quota threshold that meets the full-dimensional security water level can be accurately and quickly deduced. In the final comparison and control stage, decision-making interception and resource release are realized, eliminating the risk of over-issuance and over-selling of underlying physical or logical resources due to dirty reads from the root. This further improves the resource flow flexibility, throughput and overall operational stability of the computer system in complex high-concurrency scheduling scenarios.

[0043] Optional, such as Figure 2 As shown, Figure 2 This is a flowchart illustrating a route node matching process. Specifically, the process involves matching the request feature identifier based on a preset resource scheduling rule matrix to locate the target data processing node corresponding to the resource call request. The following method can be used as a reference: S202: Load preset node configuration rules from the resource scheduling rule matrix, wherein the node configuration rules include multiple preset feature identifier key-value pair sets; Node configuration rules refer to the set of underlying logical judgment instructions that are parsed and extracted from the resource scheduling rule matrix and act independently on a single or clustered data processing node.

[0044] The feature identifier key-value pair set refers to the structured data dimension requirements predefined in the node configuration rules. It is usually composed of a key name (representing the feature dimension, such as equipment type or business unit) and a value (representing the specific attribute, such as transformer or subsidiary A).

[0045] S204: Traverse the node configuration rules and compare and verify the request feature identifier carried in the resource call request with the preset feature identifier key-value pair set one by one; Traversal and one-by-one comparison verification refers to the low-level instruction cycle action of a computer's central processing unit (CPU) based on a preset specific addressing algorithm, sequentially reading node configuration rules from memory or cache queue, and using arithmetic logic units to perform Boolean logic equivalence judgments.

[0046] S206: Determine that the request feature identifier meets the verification matching condition, and lock the underlying node mapped by the set of feature identifier key-value pairs that meet the verification matching condition as the target data processing node corresponding to the resource call request.

[0047] Verification matching conditions: refers to the system's preset threshold or logical closed-loop requirements. It can be understood as the features carried in the request must completely cover the mandatory dimensions required by the rules, and the specific values ​​of each dimension must be completely consistent.

[0048] Specifically, in step S202, during initialization or rule hot updates, the system routing control component of the service platform extracts and loads preset node configuration rules from the underlying resource scheduling rule matrix into a linked list or array structure in the core memory. Each node configuration rule encapsulates multiple preset feature identifier key-value pair sets and their bound underlying node physical or logical addresses. In step S204, upon receiving the request feature identifier parsed by the front end, the system engine initiates a linear traversal workflow. The pointer sequentially scans the node configuration rules in memory, extracts the request feature identifier carried in the resource call request, performs a precise "key-value" full match with the preset feature identifier key-value pair set within the current rule, and compares the dimensional attributes and specific values ​​of the two in the register level by level, generating an intermediate Boolean verification state. In step S206, the aggregated value of the comparison results determines whether the request feature identifier meets the verification matching conditions. Once it is confirmed that the multi-dimensional key-value pairs are strictly aligned and without omissions, the system immediately determines that the verification match is successful, then interrupts the traversal loop, and exclusively locks the underlying node statically mapped by the feature identifier key-value pair set that meets the verification match conditions as the target data processing node corresponding to the resource call request in the current resource application scenario.

[0049] In this specification, node configuration rules containing a set of multi-dimensional key-value pairs are loaded from the resource scheduling rule matrix. The feature identifiers dynamically carried in the resource call request are traversed and compared with the preset rules in a fine-grained manner. Then, when the verification matching conditions are met, the underlying target data processing node is accurately located. This technical means based on the accurate matching of multi-dimensional feature key-value pairs solves the technical problems of rigid rules and high expansion costs caused by hard-coded associations in traditional resource routing mechanisms. It not only achieves complete decoupling between upstream dynamic business features and underlying static physical / logical processing nodes, enhancing the flexibility and full-scenario configurability of system resource scheduling, but also ensures extremely high accuracy and high reliability of underlying data node addressing in complex multi-dimensional management and control environments (such as power, carbon emission, and financial data flow scheduling).

[0050] Optionally, the specific execution of determining that the request feature identifier meets the verification matching conditions can refer to the following methods: S302: Extract the key name and corresponding value of the request feature identifier in the resource call request; To illustrate, after receiving a resource request in S302, the system uses a deserialization component (such as a JSON / XML parser) to strip the request payload, converts it into a hash map object in memory, and extracts the set of dynamic keys and the corresponding set of values ​​identified by the request characteristics from the object.

[0051] S304: Determine whether the key name of the request feature identifier matches the standard key name of the preset feature identifier key-value pair set; Standard key names refer to the set of basic dimensions that a node configuration rule in the preset resource scheduling rule matrix is ​​required to possess. They constitute the mandatory field constraints for the open access of underlying resource nodes.

[0052] Standard values ​​refer to the whitelist or threshold enumeration set of specific parameters that correspond to the standard key name and that the system allows to pass or generate a valid route mapping.

[0053] As an illustration, a dimension alignment check is performed. By traversing the standard key names in the preset feature identifier key-value pair set, it is determined whether the previously extracted dynamic key name set completely contains all the standard key names. If any standard key name is found to be missing, the matching process of the current rule is directly interrupted; if it is contained, the process proceeds to the next step S306.

[0054] S306: If the key name matches, then verify whether the value of the request feature identifier is completely consistent with the standard value in the preset feature identifier key-value pair set; As an illustration, assuming the dimension key name matches successfully, the data equivalence comparison will perform a byte-by-byte string or numerical comparison between the dynamically obtained request feature identifier and the standard value under the corresponding dimension to verify whether the two are completely consistent.

[0055] S308: When they are completely identical, the request feature identifier is determined to meet the verification matching condition.

[0056] For illustrative purposes, a request feature identifier is deemed to satisfy the validation matching condition if and only if all the key names required by the rule are matched and all the corresponding values ​​pass the equality check (are completely identical). Otherwise, the request feature identifier is deemed not to satisfy the validation matching condition.

[0057] This specification describes a hierarchical hardware-level verification mechanism that extracts the key names and corresponding values ​​of dynamic feature identifiers from resource call requests. It first determines whether the dynamic key names cover a preset set of standard key names, and then rigorously verifies whether the dynamic values ​​are completely consistent with the standard values, provided that the dimensions are aligned. This two-stage key-value separation and comparison technique solves the problems of low addressing efficiency, wasted computing power, and the underlying technical limitations caused by traditional full-scale hard matching or fuzzy comparison of single strings, as well as the misinterpretation of legitimate requests due to redundant front-end business parameters. This mechanism not only significantly filters out invalid comparison overhead in the first stage (key name comparison) of massive concurrent routing, but also enhances the system's fault tolerance and robustness when dealing with complex and multidimensional upstream business messages (such as structurally variable power sensor network messages and multidimensional data flow instructions) by balancing strong consistency security verification of core feature fields with adaptive transparent transmission of non-core redundant parameters. This ensures the absolute accuracy, efficiency, and high availability of the underlying data resource management and addressing link.

[0058] Optionally, the preset multi-level node quota constraint rules include independent-level node quota constraint rules, associated-level node quota constraint rules, and global-domain node quota constraint rules; the quota status data includes the quota already called by the target data processing node itself, the total quota already called by the node cluster associated with the target data processing node, and the total global quota already called by the current data resource application scenario; Furthermore, the specific execution of the target available quota threshold for the target data processing node based on the preset multi-level node quota constraint rules and the aggregated quota status data can be carried out in the following manner: S402: Based on the independent-level node quota constraint rules and the node's own used quota, calculate the independent-level available quota of the target data processing node; Independent-level node quota constraint rules refer to the maximum data resource threshold that a single atomic physical device or a single logical data account node is allowed to consume in an absolutely isolated state (without considering any superior nesting or sharing relationships).

[0059] The node's own called quota refers to the total amount of actual resources consumed, occupied, or frozen independently by the target data processing node, which is obtained through collection or transaction log aggregation within the current clock cycle.

[0060] Independent-level available quota: refers to the dynamic quantitative indicator representing the remaining safe capacity of a single node, obtained by performing an arithmetic difference instruction between the theoretical upper limit set by the constraint rules and the actual consumption of the node itself.

[0061] In one feasible implementation, specifically executing the step of calculating the independent-level available quota of the target data processing node based on the independent-level node quota constraint rules and the node's own called quota can be: locating the independent-level constraint configuration corresponding to the target data processing node in the resource scheduling rule matrix, obtaining the initial allocation quota set in the independent-level constraint configuration, and using the difference between the initial allocation quota and the node's own called quota as the independent-level available quota; Among them, the independent-level constraint configuration refers to a specific data structure fragment in the resource scheduling rule matrix, which is used to store the rigid boundary parameters of a single target data processing node without any topological nesting relationship.

[0062] Wherein: the initial allocation quota refers to the absolute physical / logical resource ownership of the node in the current life cycle or early stage of the business cycle, which is statically and persistently stored in the independent-level constraint configuration (i.e., the quota benchmark high water level).

[0063] In a schematic manner, the unique identifier of the target data processing node is first used as the addressing index to perform precise matching in the resource scheduling rule matrix pre-loaded into memory or persistent storage, thereby locking and extracting the independent-level constraint configuration data block exclusive to that node; then, the system's preset static physical or logical resource limit (i.e., the initial allocation quota) is parsed from the configuration data block, and a real-time snapshot of the node's dynamic resource consumption in the current machine clock cycle (i.e., the node's own called quota) is obtained simultaneously; finally, the obtained initial allocation quota is used as the minuend and the called quota is used as the subtrahend to perform difference calculation, and the output absolute remaining value is used as the independent-level available quota representing the current absolute safe resource capacity of the single node.

[0064] S404: Based on the associated node quota constraint rules and the total used quota of the node cluster, calculate the associated available quota of the associated node cluster set containing the target data processing node; The associated node quota constraint rule refers to the upper limit boundary of the total shared resource capacity issued to the node cluster in the resource scheduling rule matrix.

[0065] A cluster of associated nodes refers to the set of sibling nodes that share the same direct parent node or belong to the same virtual resource pool as the target data processing node in the topology graph of the underlying data architecture, as well as the cluster itself.

[0066] The total invoked quota of a node cluster refers to the aggregated load value obtained by traversing or mapping the above-mentioned associated node cluster set and summing the real-time consumption snapshot data of all atomic nodes in the set during the current period.

[0067] The associated level available quota refers to the dynamic quantitative index that represents the overall remaining safe carrying capacity of the group after performing an arithmetic difference instruction on the upper limit of shared resources at the group level and the aggregated load of the group.

[0068] In one feasible implementation, the step of calculating the associated-level available quota of the associated node cluster set containing the target data processing node based on the associated-level node quota constraint rules and the total called quota of the node cluster includes: locating the associated node cluster set containing the target data processing node in the resource scheduling rule matrix, obtaining the associated allocation quota of the associated node cluster set, and using the difference between the associated allocation quota and the total called quota of the node cluster as the associated-level available quota of the associated node cluster set; Indicatively, upward tracing and precise mapping are performed in the resource scheduling rule matrix to lock the constraint configuration data block exclusive to the set of associated node clusters containing the target node; the associated allocation quota representing the overall physical or logical resource sharing limit of the node group is parsed from the configuration data block, and the dynamic concurrent consumption accumulation reading of all associated child nodes in the set in the current clock cycle (i.e., the sum of the called quota of the node cluster) is obtained from the snapshot of the intermediate node of the underlying state tree or the database aggregation result; the extracted static associated allocation quota of the group is used as the minuend and the sum of the dynamically called quota is used as the subtrahend for difference calculation, and the absolute remaining capacity value output by the calculation is used as the associated level available quota representing the current overall anti-breakdown safety redundancy of the node group.

[0069] S406: Based on the global domain node quota constraint rules and the total global quota already invoked, calculate the global domain available quota for the current data resource application scenario; Global domain node quota constraint rules refer to the upper limit data in the resource scheduling rule matrix used to define the current data resource application scenario (such as the total limit of the entire physical data center, the total limit of the entire business quarter, and the total bandwidth of the entire backbone network).

[0070] The total global quota usage refers to the snapshot data of the total disk load obtained by aggregating the concurrent consumption of all underlying data processing nodes in the current resource application scenario within the current machine clock cycle.

[0071] The available quota for the global domain refers to the macroscopic quantitative indicator representing the security redundancy of the entire system, which is output after performing arithmetic subtraction on the quota constraint rules of the global domain nodes and the sum of the global invoked quotas.

[0072] In one feasible implementation, specifically executing the calculation of the global domain available quota for the current data resource application scenario based on the global domain node quota constraint rules and the total global invoked quota can be: Obtain the global allocation quota for the current data resource application scenario, and use the difference between the global allocation quota and the sum of the global quotas already invoked as the global domain available quota for the current data resource application scenario.

[0073] S408: Perform a minimum value extraction operation on the independent-level available quota, the associated-level available quota, and the global-domain available quota, and use the extracted minimum value as the target available quota threshold for the target data processing node.

[0074] This specification describes a method for accurately locating the independent, associated, and global constraint configurations of target data processing nodes within a resource scheduling rule matrix. By combining real-time snapshots of dynamically called quotas at each level, it deduces, in parallel or serially, a multi-level available quota sequence representing single-node surplus, group-shared surplus, and system redundancy. The minimum value is then taken as the target available quota threshold. This method addresses the risks of global cascading overload and resource over-exploitation caused by traditional resource scheduling schemes that only focus on local water levels. It achieves precise quantification of resource consumption in complex topology environments and, by using the minimum value, ensures that the overall safety baseline is maintained even when facing localized sudden floods. This enhances the robustness and system-level defense capabilities of large-scale distributed systems (such as power grid dispatching, carbon emission control, and financial data settlement) under extreme concurrency scenarios.

[0075] In one feasible implementation, before specifically executing the calculation of the target available quota threshold for the target data processing node based on the preset multi-level node quota constraint rules and the quota status data aggregation, the following approach can also be referenced: S502: Construct a homogeneous hash state tree in memory corresponding to the topology of the multi-level node quota constraint rules, wherein the leaf nodes of the homogeneous hash state tree map to the state data corresponding to the independent-level node quota constraint rules, the intermediate nodes map to the state data corresponding to the associated-level node quota constraint rules, and the root node maps to the state data corresponding to the global domain node quota constraint rules. Homogeneous hash state tree: refers to a contiguous or logically related storage area allocated in the system kernel memory (RAM), whose branch structure, depth, and number of nodes are completely consistent with the logical topology of the preset "multi-level node quota constraint rules". Each node not only stores the quota value, but also stores the hash digest of that value and the state of its child nodes.

[0076] State data mapping refers to establishing a two-way binding relationship between memory addresses and physical / logical entity quotas.

[0077] Leaf nodes correspond to the lowest-level atomic execution units and map independent-level state data.

[0078] Intermediate nodes correspond to logical resource pools or administrative regions, mapping to associated status data.

[0079] The root node corresponds to the highest control plane of the system and maps global domain state data.

[0080] In a schematic manner, the logical topology presented by the preset multi-level node quota constraint rules is parsed, and a structure memory block matching its size is allocated in the core memory. The independent quota status data of each atomic data processing node at the bottom layer is accurately mounted to the leaf node data field of the memory data structure. The associated quota status data with physical sharing or business coupling relationship is mapped and aggregated to the corresponding intermediate node. The global domain quota status data covering the absolute boundary of the entire data resource application scenario is mapped to the highest root node. After completing the bidirectional binding between multi-level data entities and physical memory addresses, a fixed-length initial state hash fingerprint is calculated and written for each node based on the initial quota status data mapped. The leaf nodes, intermediate nodes and root nodes are cascaded and spliced ​​along the original topology path using pointer references. Thus, a hash state tree that is isomorphic to the business rule topology and supports subsequent concurrent state fast anti-tampering verification is successfully instantiated in the core memory.

[0081] S504: When the quota of the state data mapped to any target node in the homogeneous hash state tree changes, a local state hash fingerprint of the target node is generated based on the state data after the quota change and the current timestamp, and the local state hash fingerprint is passed up and down the homogeneous hash state tree from bottom to top to update the hash fingerprint of the root node; any target node includes at least one of the leaf node, the intermediate node and the root node.

[0082] A target node refers to a data processing node in a homogeneous hash state tree whose actual mapped physical or logical resource quota has undergone an objective numerical increase or decrease within the current time period. Depending on the level at which the business change occurs, this node can be a leaf node representing the underlying atom, an intermediate node representing a group, or a root node representing the overall system.

[0083] Local state hash fingerprint: refers to the binary digest string with a fixed length that is irreversible, which is output after calling a one-way hash algorithm (such as SHA-256, SM3 and other hardware-accelerated operators) to perform mixed operations on parameters such as the quota status plaintext of the node and the timestamp.

[0084] Bottom-up progressive update: This refers to an operation mechanism that relies on the memory pointer relationship between child nodes and parent nodes in a tree-like topology to perform hash recalculation only on nodes that have changed and their upward tracing paths. This mechanism can effectively avoid global traversal of the entire state tree and reduce system computing power overhead.

[0085] To illustrate, when the underlying resource gateway or transaction monitoring module detects a quota change (such as quota deduction or release) in the state data mapped to any target node in the homogeneous hash state tree, it triggers a state synchronization instruction stream in the underlying memory space. First, it extracts the latest state data (i.e., the latest quota value) of the target node after the change and calls the system interface to obtain the current timestamp. Then, it concatenates the latest state data and the current timestamp byte-by-byte in a cache register and uses this as input to a cryptographic hash function. The resulting hash function generates the latest local state hash fingerprint of the target node, overwriting the old hash data in its memory structure.

[0086] Furthermore, a bottom-up propagation mechanism is initiated to read the reserved parent node physical memory pointer in the target node's structure, precisely locating its direct parent node. The current hash fingerprints of all child nodes under this parent node (including the updated target node and other unchanged sibling nodes) are extracted, re-concatenated, and hash operations are performed again to update the local state hash fingerprint of the parent node. This cascading recalculation continues upward along the original memory topology path, triggering hash update events of parent nodes at each level, until the computation instruction stream arrives and finally updates the global hash fingerprint in the root node's memory space. Through this mechanism, local changes in micro-nodes are instantaneously projected into macro-level state anomalies at the system's top layer with extremely low computational cost.

[0087] In this specification, a homogeneous hash state tree that is absolutely mapped to the topology of multi-level node quota constraint rules is pre-built in the core memory. When the quota state mapped to any node changes, the current timestamp is fused to quickly generate a local state hash fingerprint and a bottom-up cascading bubble update is performed along the physical memory pointer. This technique based on memory cryptography and asynchronous anti-replay hash verification effectively solves the underlying technical problems of traditional distributed resource scheduling systems in extremely high-concurrency environments, such as huge computational overhead, slow I / O response, and easy induction of dirty reads and state inconsistencies caused by strong reliance on global database traversal and pessimistic locking mechanisms. This mechanism not only uses the irreversible characteristics of timestamps and hashes to give the quota change link extremely high hardware-level anti-tampering security attributes, but also avoids global data recalculation and lock contention with the extremely fast update flow of local path penetration. This allows the computer system to maintain a globally strong consistency view of multi-level quota data in real time with extremely low computing power consumption, thereby ensuring subsequent resource threshold aggregation and concurrent scheduling.

[0088] Furthermore, referring to S502-S504, specifically performing the minimum value extraction operation on the independent-level available quota, the associated-level available quota, and the global-domain available quota, and using the extracted minimum value as the target available quota threshold for the target data processing node, can be done in the following manner: Step A2: Determine the associated path between the target data processing node and the root node in the isomorphic hash state tree, and extract the reference local state hash fingerprint of each associated path node to construct the hash path proof; An associated path refers to an absolutely unique and continuous physical addressing link formed in the homogeneous hash state tree instantiated in the core memory, starting from a specific target data processing node and tracing upwards along the parent pointer preset by the structure until the highest-level root node is reached.

[0089] The associated path nodes refer to the set of all tree-like topology nodes that are strictly located on the aforementioned associated path. They typically include the underlying leaf nodes where the call occurs, the intermediate nodes that manage the relay, and the root node that oversees the entire process.

[0090] The reference local state hash fingerprint refers to the raw hash digest data that is momentarily captured from the data domain of each associated path node just before the final threshold decision is executed. This fingerprint serves as a "baseline snapshot" of the system at the current state and is used for tamper-proof comparison with the hash values ​​subsequently calculated in real time.

[0091] Hash path proof refers to the process of serializing and encapsulating a series of extracted reference local state hash fingerprints in hierarchical order to construct an encrypted data structure (such as a one-dimensional array or a thread-private stack) with anti-counterfeiting properties. Its function is equivalent to the timestamp version number set in lock-free concurrency control.

[0092] To illustrate, when the computing engine is preparing to aggregate multi-level thresholds, it first precisely locates the physical memory starting address of the target data processing node that triggered the resource call request in the homogeneous hash state tree of the cache. Then, it uses the topology pointer maintained inside the node structure to start the upward traversal workflow at the memory level. The pointer jumps upward along the hierarchical relationship to sequentially define the corresponding intermediate nodes and the final root node, thereby determining the associated path in memory.

[0093] Atomic read instructions are issued along the associated path to sequentially read the reference local state hash fingerprints stored in the memory blocks of each associated path node. These extracted independent hash fingerprints are then pushed into the private register stack or isolated memory area of ​​the current computing thread in a topological order from bottom to top (or from top to bottom), thereby successfully constructing a hash path proof belonging to this computing task in memory, thus providing a static benchmark for the subsequent step A4.

[0094] Step A4: Determine the plaintext quota status data corresponding to the associated path in the current memory state snapshot, and perform a hash consistency check based on the reference state hash fingerprint in the hash path proof and the plaintext quota status data; A state snapshot refers to a momentary, complete image of the quota values ​​of each level of nodes that is stored in memory.

[0095] Plaintext quota status data refers to the actual resource quota value stored directly in the memory structure data field in a basic machine data type (such as integer value or floating-point value) without being encrypted or obfuscated by any one-way hash algorithm.

[0096] Hash consistency verification refers to the underlying investigation mechanism that uses the same hash operator to rehash the plaintext data captured in the current instant, and compares the new hash digest with the reference state hash fingerprint extracted in step A2 at the underlying binary bit level (such as bitwise XOR instruction) to rigorously verify whether the memory data has been concurrently modified during the reading interval.

[0097] To illustrate, once the hash path proof is constructed, the plaintext quota status data currently mounted on each associated path node is synchronously captured along the physical addressing link of the associated path in the current core memory state snapshot. The hash operator is invoked using the exact same hash algorithm as during system updates to perform real-time one-way hash operations on the newly captured plaintext quota status data of each node, generating an instant hash fingerprint.

[0098] Then, the generated instantaneous hash fingerprints of each node are compared with the reference state hash fingerprints of the corresponding nodes temporarily stored in the hash path proof using the bitwise XOR operation instruction of the arithmetic logic unit. If the comparison results for all nodes on the associated path are completely consistent (i.e., the XOR operation result of each pair of fingerprints is zero), the hash consistency check is determined to be successful; otherwise, if a slight bit difference is detected on any topology node, it is determined that the memory snapshot data has been contaminated by concurrent threads, and an interception signal indicating that the check has failed is immediately output.

[0099] Step A6: If the hash consistency check passes, extract the independent-level available quota, the associated-level available quota, and the global-domain available quota based on the current state snapshot in memory, and perform the minimum value extraction operation; Step A8: If the hash consistency check fails, it is determined that there is a concurrent state conflict. The target conflict node in the associated path that caused the check to fail is located. The state snapshot in the current memory is updated based on the latest quota status data of the target conflict node in the database. The steps of extracting the independent-level available quota, the associated-level available quota, and the global domain available quota based on the current state snapshot in memory, and performing the minimum value extraction operation are executed.

[0100] Concurrent state conflict refers to a race condition where multiple software and hardware execution threads initiate unexpected interleaved write operations on resource state data at the same core memory address within a very short machine clock cycle, causing the memory snapshot data currently read by the system to lag behind the real physical world or the underlying database records.

[0101] The target conflict node refers to the specific topological entity mapping node that triggers the output of a non-zero result (i.e., hash comparison mismatch) of the underlying XOR logic circuit in the layer-by-layer hash comparison link of the associated path. It actually represents the precise topological location where concurrent data mutation occurs.

[0102] Latest quota status data: refers to the absolute and true remaining resource value stored in the underlying persistent storage medium (such as a relational physical database), confirmed by strong consistency transactions, and written to disk.

[0103] State snapshot update refers to the underlying synchronization operation that forcibly overwrites and overwrites the absolute true value captured from the underlying persistent storage medium into the corresponding structure data field in the core memory, aiming to eliminate the data version difference between the memory cache and persistent storage.

[0104] In this specification, before determining the final threshold for multi-level available quotas, a hash path proof is constructed by pre-extracting reference hash fingerprints of each associated path node along the memory topology. This proof is then compared with the binary consistency of the underlying hash execution, which is performed by instantly recalculating the plaintext snapshot. This results in a high-speed optimistic concurrency control architecture at the system's underlying level. This technique, based on "hash path proof verification and precise replay of conflicting nodes," effectively solves the problem of computing power blocking and I / O caused by the strong reliance on global pessimistic locks in traditional distributed scheduling systems when dealing with concurrency surges. The technical problem of / O performance avalanche; this mechanism not only achieves extremely efficient microsecond-level lock-free threshold extraction when the verification passes, releasing the potential for concurrent throughput, but also completely eliminates inefficient full-link transaction rollback when concurrent tampering is detected at the hardware level. It only performs penetrating database strong consistency read and memory precise rewrite correction for the contaminated target conflict node. Thus, in a high-concurrency scheduling environment, it perfectly covers the absolute security red line of breakdown prevention with minimal local I / O overhead, ensuring the accuracy of the final resource availability quota decision and the high availability of the system.

[0105] The following will combine Figure 3 This specification provides a detailed description of the resource processing apparatus provided in the embodiments. It should be noted that... Figure 3 The resource processing device shown is used to execute this specification. Figures 1-2 The methods shown in the embodiments are illustrated for ease of explanation, showing only the parts related to the embodiments of this specification. For specific technical details not disclosed, please refer to this specification. Figures 1-2 The example shown.

[0106] Please see Figure 3 This diagram illustrates the structure of a resource processing apparatus according to an embodiment of this specification. The resource processing apparatus 1 can be implemented as all or part of a device through software, hardware, or a combination of both. According to some embodiments, the resource processing apparatus 1 includes a request receiving module 11 and a quota processing module 12, specifically used for: Request receiving module 11 is used to receive resource call requests for data resource processing services, and determine the target call volume and request feature identifier based on the resource call requests; The quota processing module 12 is used to perform routing node matching on the request feature identifier based on a preset resource scheduling rule matrix, so as to lock the target data processing node corresponding to the resource call request; The quota processing module 12 is used to extract the quota status data of the target data processing node in the current data resource application scenario, and to calculate the target available quota threshold of the target data processing node based on the preset multi-level node quota constraint rules and the quota status data. The quota processing module 12 is used to compare the target call volume with the target available quota threshold, and perform data resource call processing on the resource call request based on the comparison result.

[0107] It should be noted that the resource processing device provided in the above embodiments is only illustrated by the division of the above functional modules when executing the resource processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the resource processing device and the resource processing method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.

[0108] The example numbers in this specification are for descriptive purposes only and do not represent the superiority or inferiority of the examples.

[0109] This specification also provides a computer storage medium that can store multiple instructions adapted to be loaded and executed by a processor as described above. Figures 1-2 The resource processing method described in the illustrated embodiment can be found in the following document for a detailed execution process: Figures 1-2 The specific details of the illustrated embodiments will not be elaborated here.

[0110] This specification also provides a computer program product that stores at least one instruction, said at least one instruction being loaded and executed by the processor as described above. Figures 1-2 The resource processing method described in the illustrated embodiment can be found in the following document for a detailed execution process: Figures 1-2 The specific details of the illustrated embodiments will not be elaborated here.

[0111] Please refer to Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 1010, a memory 1020, an input device 1030, an output device 1040, and a bus 1050. The processor 1010, memory 1020, input device 1030, and output device 1040 may be connected to each other via the bus 1050.

[0112] Processor 1010 may include one or more processing cores. Processor 1010 connects to various parts of the electronic device using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 1020, and by calling data stored in memory 1020. Optionally, processor 1010 may be implemented using at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), or programmable logic array (PLA). Processor 1010 may integrate one or more of a central processing unit (CPU), graphics processing unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 1010 and may be implemented separately through a communication chip.

[0113] The memory 1020 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 1020 may include non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, code, code sets, or instruction sets.

[0114] The input device 1030 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 1040 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In this embodiment, the input device 1030 can be a temperature sensor for acquiring the operating temperature of the electronic device. The output device 1040 can be a speaker for outputting audio signals.

[0115] In addition, those skilled in the art will understand that the structure of the electronic device shown in the above figures does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the electronic device may also include radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WIFI) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.

[0116] In the embodiments of this specification, the executing entity for each step can be the electronic device described above. Optionally, the executing entity for each step can be the operating system of the electronic device. The operating system can be Android, iOS, or other operating systems; this specification does not limit this.

[0117] exist Figure 4 In an electronic device, processor 1010 can be used to call a program stored in memory 1020 and execute it to implement the resource processing method as described in the various method embodiments of this specification.

[0118] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.

[0119] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the features, data, and information involved in this specification were all obtained under full authorization.

[0120] The above-disclosed embodiments are merely preferred embodiments of this specification and should not be construed as limiting the scope of this specification. Therefore, any equivalent variations made in accordance with the claims of this specification shall still fall within the scope of this specification.

Claims

1. A resource processing method, characterized in that, The method includes: Receive resource call requests for data resource processing services, and determine the target call volume and request feature identifier based on the resource call requests; Load preset node configuration rules from the resource scheduling rule matrix. The node configuration rules include multiple preset feature identifier key-value pair sets. Traverse the node configuration rules and compare and verify the request feature identifier carried in the resource call request with the preset feature identifier key-value pair sets one by one. Determine that the request feature identifier meets the verification matching condition, and lock the underlying node mapped by the feature identifier key-value pair set that meets the verification matching condition as the target data processing node corresponding to the resource call request. Extract the quota status data of the target data processing node in the current data resource application scenario, and calculate the target available quota threshold of the target data processing node based on the preset multi-level node quota constraint rules and the quota status data. The target call volume is compared with the target available quota threshold, and the resource call request is processed as a data resource call based on the comparison result; The preset multi-level node quota constraint rules include independent-level node quota constraint rules, associated-level node quota constraint rules, and global-domain node quota constraint rules; the quota status data includes the target data processing node's own called quota, the sum of called quotas of the node cluster associated with the target data processing node, and the sum of global called quotas of the current data resource application scenario; the calculation of the target available quota threshold for the target data processing node based on the preset multi-level node quota constraint rules and the quota status data includes: Based on the independent-level node quota constraint rules and the node's own invoked quota, the independent-level available quota of the target data processing node is calculated. Based on the associated-level node quota constraint rules and the sum of the invoked quotas of the node cluster, the associated-level available quota of the associated node cluster set containing the target data processing node is calculated. Based on the global-domain node quota constraint rules and the sum of the global invoked quotas, the global-domain available quota of the current data resource application scenario is calculated. The independent-level available quota, the associated-level available quota, and the global-domain available quota are subjected to a minimum value extraction operation, and the extracted minimum value is used as the target available quota threshold of the target data processing node.

2. The method according to claim 1, characterized in that, Determining that the request feature identifier meets the verification matching conditions includes: Extract the key name and corresponding value of the request feature identifier in the resource call request; Determine whether the key name of the request feature identifier matches the standard key name of the preset feature identifier key-value pair set; If the key name matches, then verify whether the value of the request feature identifier is completely consistent with the standard value in the preset feature identifier key-value pair set; When they are completely identical, the request feature identifier is determined to meet the verification matching condition.

3. The method according to claim 1, characterized in that, The step of calculating the independent-level available quota of the target data processing node based on the independent-level node quota constraint rules and the node's own called quota includes: locating the independent-level constraint configuration corresponding to the target data processing node in the resource scheduling rule matrix, obtaining the initial allocation quota set in the independent-level constraint configuration, and using the difference between the initial allocation quota and the node's own called quota as the independent-level available quota; and / or, The step of calculating the associated-level available quota of the associated node cluster set containing the target data processing node based on the associated-level node quota constraint rules and the sum of the called quotas of the node cluster includes: locating the associated node cluster set containing the target data processing node in the resource scheduling rule matrix, obtaining the associated allocation quota of the associated node cluster set, and using the difference between the associated allocation quota and the sum of the called quotas of the node cluster as the associated-level available quota of the associated node cluster set; and / or, The step of calculating the global domain available quota for the current data resource application scenario based on the global domain node quota constraint rules and the total global quota already invoked includes: obtaining the global allocation quota for the current data resource application scenario, and using the difference between the global allocation quota and the total global quota already invoked as the global domain available quota for the current data resource application scenario.

4. The method according to claim 1, characterized in that, The step of processing the resource request for data resource retrieval based on the comparison result includes: If the comparison result is that the target call volume is less than or equal to the target available quota threshold, then the resource call request is determined to meet the system security constraints and can be passed. The target call volume is deducted from the dynamic available threshold record of the target data processing node, and a corresponding status change record is generated and stored in the database. If the comparison result indicates that the target call volume is greater than the target available quota threshold, the system circuit breaker mechanism is triggered to reject the resource call request.

5. The method according to claim 1, characterized in that, Before calculating the target available quota threshold for the target data processing node based on preset multi-level node quota constraint rules and the aggregated quota status data, the method further includes: A homogeneous hash state tree corresponding to the topology of the multi-level node quota constraint rules is constructed in memory, wherein the leaf nodes of the homogeneous hash state tree map the state data corresponding to the independent-level node quota constraint rules, the intermediate nodes map the state data corresponding to the associated-level node quota constraint rules, and the root node maps the state data corresponding to the global domain node quota constraint rules. When the quota of the state data mapped to any target node in the homogeneous hash state tree changes, a local state hash fingerprint of the target node is generated based on the state data after the quota change and the current timestamp, and the local state hash fingerprint is passed up and down the homogeneous hash state tree from bottom to top to update the hash fingerprint of the root node; any target node includes at least one of the leaf node, the intermediate node and the root node.

6. The method according to claim 5, characterized in that, The step of performing a minimum value extraction operation on the independent-level available quota, the associated-level available quota, and the global-domain available quota, and using the extracted minimum value as the target available quota threshold for the target data processing node, includes: In the isomorphic hash state tree, the associated path between the target data processing node and the root node is determined, and the reference local state hash fingerprint of each associated path node on the associated path is extracted to construct the hash path proof. Determine the plaintext quota status data corresponding to the associated path in the current memory state snapshot, and perform a hash consistency check based on the reference state hash fingerprint in the hash path proof and the plaintext quota status data; If the hash consistency check passes, the independent-level available quota, the associated-level available quota, and the global-domain available quota are extracted based on the current state snapshot in memory, and the minimum value extraction operation is performed. If the hash consistency check fails, it is determined that there is a concurrent state conflict. The target conflict node in the associated path that caused the check to fail is located. The state snapshot in the current memory is updated based on the latest quota state data of the target conflict node in the database. The steps of extracting the independent-level available quota, the associated-level available quota, and the global domain available quota based on the current state snapshot in memory, and performing the minimum value extraction operation are then performed.

7. A resource quota processing device, characterized in that, The device includes: The request receiving module is used to receive resource call requests for data resource processing services, and determine the target call volume and request feature identifier based on the resource call requests; The quota processing module is used to load preset node configuration rules from the resource scheduling rule matrix. The node configuration rules include multiple preset feature identifier key-value pair sets. The module traverses the node configuration rules and compares and verifies the request feature identifier carried in the resource call request with the preset feature identifier key-value pair sets one by one. It determines that the request feature identifier meets the verification matching condition and locks the underlying node mapped by the feature identifier key-value pair set that meets the verification matching condition as the target data processing node corresponding to the resource call request. The quota processing module is used to extract the quota status data of the target data processing node in the current data resource application scenario, and to aggregate and calculate the target available quota threshold of the target data processing node based on the preset multi-level node quota constraint rules and the quota status data. The quota processing module is used to compare the target call volume with the target available quota threshold, and process the resource call request for data resource call based on the comparison result; The preset multi-level node quota constraint rules include independent-level node quota constraint rules, associated-level node quota constraint rules, and global-domain node quota constraint rules; the quota status data includes the target data processing node's own called quota, the sum of called quotas of the node cluster associated with the target data processing node, and the sum of global called quotas of the current data resource application scenario; the calculation of the target available quota threshold for the target data processing node based on the preset multi-level node quota constraint rules and the quota status data includes: Based on the independent-level node quota constraint rules and the node's own invoked quota, the independent-level available quota of the target data processing node is calculated. Based on the associated-level node quota constraint rules and the sum of the invoked quotas of the node cluster, the associated-level available quota of the associated node cluster set containing the target data processing node is calculated. Based on the global-domain node quota constraint rules and the sum of the global invoked quotas, the global-domain available quota of the current data resource application scenario is calculated. The independent-level available quota, the associated-level available quota, and the global-domain available quota are subjected to a minimum value extraction operation, and the extracted minimum value is used as the target available quota threshold of the target data processing node.

8. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as described in any one of claims 1 to 6.

9. A computer program product, characterized in that, The computer program product stores at least one instruction, which is loaded by a processor and executed as described in any one of claims 1 to 6.

10. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • A method and device for allocating resources

    CN110032447A

  • Resource quota prediction method and device, equipment and storage medium

    CN121146393A