A Concurrent Scheduling and Settlement Method for Agent Tasks Based on Margin Deposits

By introducing margin binding concurrency multiple N, task commodity state machine and circuit breaker management into the intelligent agent task trading platform, the problems of task backlog, timeout and disputes are solved, and the automation and controllability of task scheduling and settlement are realized.

CN123117629APending Publication Date: 2026-11-17SHANGHAI VOLUME CANT MOVE YOU TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611271847.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-20
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing intelligent agent task trading platforms lack a margin-bound concurrent scheduling mechanism, have rudimentary product status management, rely on manual confirmation for settlement, and lack automation in default handling, resulting in frequent task backlogs, timeouts, failures, and disputes.

Method used

By binding the concurrency multiplier N to the task provider's deposit amount through the deposit management module, and combining the task product state machine and circuit breaker management module, automated concurrent scheduling, settlement, and default handling are achieved, including appeal period timing, automatic settlement, and computing power circuit breaker determination.

Benefits of technology

It achieves matching of concurrent declarations and performance capabilities of task providers, fine-grained control of state transitions, automation of the settlement process, and real-time handling of default consequences, thereby reducing the risk of task backlog and disputes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123117629A_ABST
    Figure CN123117629A_ABST
Patent Text Reader

Abstract

This invention provides a method for concurrent scheduling and settlement of intelligent agent tasks based on a security deposit. The system includes: a security deposit management module, which calculates the security deposit amount based on the highest task price of the task products currently on sale under the task provider's name and the concurrency multiple N, wherein the security deposit amount is the greater of the product of the highest task price and N and a preset minimum security deposit limit; a concurrent scheduling module, which maintains a state machine for task products in four mutually exclusive states: active, queued, inactive, and delisted, and controls task acceptance and orderly queuing based on the relationship between the global concurrent order acceptance number and the concurrency multiple N; a settlement module, which starts an appeal period timer after the task is accepted, automatically completes the settlement and triggers withdrawal if there is no valid appeal, and triggers arbitration if there is a valid appeal; and a circuit breaker management module, which deducts one task price and deducts credit points from the security deposit when computing power is broken, and automatically removes the task when consecutive failures reach a threshold or the security deposit falls below the limit. This invention achieves the integration of concurrent scheduling and automatic settlement of intelligent agent tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence and multi-agent task scheduling technology, specifically involving a method and system for concurrent scheduling and settlement of agent tasks based on a security deposit. It is applicable to platform-based scheduling and automatic settlement scenarios for the entire process of agent task release, acceptance, execution, acceptance, and settlement. Background Technology

[0002] With the rapid development of large language models and intelligent agent technology, intelligent agents capable of autonomously calling tools and executing multi-step processes are widely used in scenarios such as automated office work, content production, data analysis, and code generation. Different intelligent agents form matching transactions through task publishing and acceptance, leading to the emergence of task trading platforms for intelligent agents. These platforms need to solve a series of scheduling and settlement problems, including task publishing, concurrent order acceptance, execution monitoring, acceptance and settlement, and default handling.

[0003] However, existing task trading platforms have the following shortcomings: (1) Lack of concurrent scheduling mechanism tied to margin: The number of concurrent orders accepted by existing platforms is usually set uniformly by the platform or declared arbitrarily by the task provider, and is not related to any risk reserve. When the task provider accepts too many tasks at the same time and its own computing power or service quality is insufficient, it will cause task backlog, timeout or failure, but there is a lack of quantifiable economic constraints; the concurrent capacity declared by the task provider is disconnected from the actual performance capacity.

[0004] (2) Crude product status management: Existing platforms usually only distinguish between two states of task products: "listed / unlisted". They lack detailed description of intermediate states such as full concurrent quota, insufficient deposit, and queuing. This results in task acceptance requests being directly rejected or waiting indefinitely when the concurrent quota is full, and there is a lack of orderly queuing and status flow control.

[0005] (3) Settlement relies on manual confirmation: The task completion confirmation, appeal handling and fund settlement of the existing platform usually rely on manual operation or unilateral decision by the platform. There is a lack of automated appeal period timing, automatic judgment and appeal arbitration triggering mechanism, and the settlement cycle is uncontrollable, which can easily lead to disputes.

[0006] (4) Lack of automatic circuit breaker in handling breach of contract: When the task provider fails to execute due to insufficient computing power or other reasons, the existing platform lacks automated circuit breaker, deduction and delisting judgment logic. The consequences of breach of contract are unclear and not timely, making it difficult to effectively constrain the performance behavior of the task provider.

[0007] Therefore, the technical problem to be solved by this invention is: how to realize the binding calculation of margin and concurrent quota, the state machine flow control of task goods, the automatic settlement and appeal arbitration triggering after the task is completed, and the automatic judgment of computing power circuit breaker and automatic delisting in the intelligent agent task trading platform, so as to form a set of intelligent agent task concurrent scheduling and settlement method that can be quantified, automatically flowed, and automatically settled. Summary of the Invention

[0008] Technical problems to be solved The technical problems to be solved by this invention include: (1) How to bind the amount of the task provider's security deposit to its declared maximum concurrent order number so that the concurrent amount is associated with the actual economic guarantee, thereby constraining the task provider's concurrent declaration to match its performance capability; (2) How to use the task product state machine to finely depict various states such as active, queued, inactive, and delisted, as well as their flow conditions, to achieve orderly queuing when the concurrent quota is full and automatic pickup after the quota is released; (3) How to implement a settlement process that automatically counts the appeal period after the task is completed, automatically completes the task without appeal, and automatically triggers arbitration when there is an appeal, so as to automate and audit the settlement process; (4) How to implement the circuit breaker judgment logic for automatic deduction of margin, credit score, automatic removal of listing due to continuous failure and insufficient margin when computing power is interrupted. Technical solution

[0009] To address the aforementioned technical problems, this invention provides a method for concurrent scheduling and settlement of intelligent agent tasks based on margin deposits. The system upon which this method relies includes a margin deposit management module, a concurrent scheduling module, a settlement module, and a circuit breaker management module (see Figure 1 for the overall architecture).

[0010] The deposit management module is used to determine and maintain the deposit amount paid by the task provider. The deposit amount is calculated based on the highest task price among the task products for sale under the task provider's name and a concurrency multiple N: the concurrency multiple N is the maximum number of orders the task provider declares simultaneously; the deposit amount is the greater of the product of the highest task price and the concurrency multiple N, and a preset minimum deposit limit. The concurrency multiple N is a positive integer selected by the task provider, and its value also determines the upper limit of the number of tasks the task provider can simultaneously undertake, i.e., the provider-level global concurrency limit.

[0011] The concurrent scheduling module is used to maintain the state machine of the task products. The state machine includes an active state, a queued state, an inactive state, and a delisted state. The four states are mutually exclusive and are determined according to the following priority: delisted takes precedence over inactive, inactive takes precedence over queued, and queued takes precedence over active. Specifically: when the total number of concurrent orders for all tasks under the task provider's name is less than the concurrency multiple N and the deposit balance is not lower than the preset minimum deposit limit, the task is active and new task acceptance requests are allowed; when the total number of concurrent orders is equal to the concurrency multiple N and the deposit balance is not lower than the preset minimum deposit limit, the task is queued, and newly arriving task acceptance requests are added to the waiting queue and automatically accepted in the queue order after the concurrency limit is released; when the deposit balance is lower than the preset minimum deposit limit, the task is inactive, order acceptance is suspended, and a prompt to replenish the deposit is displayed; when the task provider initiates a delisting operation, fails continuously to reach a preset failure threshold, or the deposit balance remains lower than the preset minimum deposit limit for a preset time threshold, the task is delisted and no longer displayed.

[0012] The settlement module initiates an appeal period after the task execution result is submitted and accepted, and performs automatic settlement judgment during the appeal period: if no valid appeal is received within the appeal period, the task is deemed automatically completed and withdrawal settlement is triggered, settling the task price (after deducting platform commission) to the task provider; if a valid appeal is received within the appeal period, arbitration judgment is triggered, and settlement is executed according to the arbitration result. The settlement module implements a settlement delay during withdrawal settlement, and settlement records are written to a trusted evidence storage service for auditing purposes.

[0013] The circuit breaker management module is used to perform circuit breaker handling when computing power is interrupted during task execution: deducting one task price from the task provider's deposit and reducing the task provider's credit score; recording the number of consecutive failures for the task provider, and automatically switching the corresponding task product to the "delisted" state when the number of consecutive failures reaches a preset failure threshold; automatically switching the corresponding task product to the "delisted" state when the deposit balance is lower than the preset minimum deposit limit; and fully refunding the task provider's deposit when the task provider initiates the delisting operation and there are no outstanding liabilities.

[0014] The concurrent scheduling module and the circuit breaker management module read the global concurrent order count, concurrency multiple N, margin balance and consecutive failure count in real time, and use atomic operations to drive state transitions to ensure consistency between state switching and quota usage.

[0015] The core technology chain of this invention is as follows: from deposit binding calculation (deposit = max(maximum task price × N, minimum limit)) to concurrent state machine scheduling (active / queued / inactive / delisted, priority determination) to automatic settlement (the appeal period ends automatically with a settlement delay if there is no valid appeal, or arbitration if there is a valid appeal) to circuit breaker delisting (computing power circuit breaker deduction plus delisting due to consecutive failures plus delisting due to insufficient deposit). The above links form a closed-loop scheduling and settlement system through real-time linkage between the task product's state machine and the deposit balance, global concurrent limit, and number of consecutive failures.

[0016] Furthermore, the system also includes a bundled sales module: when a task provider sells tasks in a bundled form, the prepayment corresponding to the bundled sales is transferred to a guarantee account for revenue sharing. The bundled sales are not included in the task provider's transaction concurrency limit and do not occupy the concurrency quota corresponding to the concurrency multiple N. Each actual call of the bundled sales is included in the execution resource quota and is subject to the same timeout, rate limiting, and circuit breaker control as a single task.

[0017] During the calculation of the deposit amount, the maximum task price is maintained in real time by the deposit management module for all task products on sale under the name of the task provider. When the task provider adds, modifies, or removes task products, resulting in a change in the maximum task price, the deposit amount is recalculated and the deposit freeze amount is updated. If the recalculated deposit amount is higher than the current freeze amount, the task provider is required to pay the difference before listing the product. If the recalculated deposit amount is lower than the current freeze amount, the difference is released only if there are no outstanding tasks, appeals, arbitrations, or pending penalties.

[0018] When the task item is in a queue, the concurrent scheduling module is also used to provide feedback to the requester who initiated the task acceptance request on the number of people in the queue and the estimated waiting time; the estimated waiting time is estimated based on the number of tasks in the waiting queue that are ahead of the requester and the average execution time of each task.

[0019] In the settlement module, the appeal period is a preset duration; the settlement delay for withdrawal settlement is a period of time starting from the automatic completion judgment time; the platform commission is a preset percentage of the task price; the arbitration judgment is executed by the arbitration judgment unit, which outputs the arbitration result based on the evidence materials submitted by both parties to the task.

[0020] In the circuit breaker management module, the computing power circuit breaker refers to a circuit breaker event caused by the task provider during task execution; the triggering conditions of the circuit breaker event include the task execution time exceeding a preset timeout threshold, the task provider service returning a preset error code, the number of consecutive heartbeat failures exceeding a preset number, or the resource utilization rate exceeding a preset threshold and lasting for a preset time; the preset failure threshold and the deduction value of the credit score are both preset parameters. Beneficial effects

[0021] Compared with the prior art, the present invention has the following beneficial effects: (1) Linkage between concurrency and guarantee: The amount of the guarantee deposit is calculated in conjunction with the concurrency multiple N, so that the maximum number of concurrent orders declared by the task provider has actual economic guarantee, and the concurrency declaration of the task provider is matched with the performance capability from an economic perspective, reducing the risk of backlog and failure caused by over-acceptance; (2) Refined state transition: The life cycle of the task product is characterized by a mutually exclusive four-state machine, and the uniqueness of the state is guaranteed by priority judgment. This enables orderly queuing when the concurrent quota is full, automatic acceptance after the quota is released, suspension of order acceptance when the margin is insufficient, and automatic removal of the product from the shelves due to default and active operation. The scheduling behavior is predictable and controllable. (3) Settlement automation: Through the mechanism of automatic timekeeping of the appeal period, automatic completion without valid appeals, and automatic triggering of arbitration with valid appeals, the settlement of tasks is automated and auditable, shortening the settlement cycle and reducing manual intervention and disputes; (4) Real-time handling of breach of contract: Through automatic deduction of margin, credit score deduction, automatic removal of listings due to continuous failures and insufficient margin, the consequences of breach of contract are realized in a real-time and quantifiable manner, effectively constraining the performance behavior of task providers. (5) Compliance and implementation: The deposit is collected in a voluntary insurance model and held in a special bank account to avoid the formation of a deposit pool, which meets the fund compliance requirements. Attached Figure Description

[0022] Figure 1 is a schematic diagram of the overall architecture of the intelligent agent task concurrent scheduling and settlement system based on margin provided in an embodiment of the present invention; Figure 2 is a schematic diagram of the task product state machine flow provided in an embodiment of the present invention; Figure 3 is a schematic diagram of the task settlement and appeal arbitration process provided in an embodiment of the present invention; Figure 4 is a schematic diagram of the circuit breaker and delisting determination logic provided in an embodiment of the present invention. Detailed Implementation

[0023] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The following embodiments are only used to illustrate the present invention and are not intended to limit the scope of protection of the present invention.

[0024] Terminology Definition In this specification, the following terms have the following meanings: Task Provider: An intelligent agent or intelligent agent operator that publishes task products on the platform for other intelligent agents to accept.

[0025] Task Products: Commercialized units of tasks that can be accepted, published by task providers, with attributes such as task price, concurrency multiplier N, and security deposit.

[0026] Concurrency multiplier N: The maximum number of orders that the task provider can accept at the same time, which is the global concurrency limit at the provider level. It is a positive integer selected by the task provider.

[0027] Highest task price: The highest single task price among the currently valid and available task products under the task provider's name.

[0028] Minimum margin limit: The lower limit of margin set by the platform, denoted as L.

[0029] Deposit due: The deposit due, calculated based on the maximum task price and the concurrency multiple N, is denoted as R, where R = max(maximum task price × N, minimum deposit limit L).

[0030] Margin balance: The current balance in the task provider's margin account after deductions.

[0031] Global concurrent order count: The total number of tasks in the execution state among all task products under the task provider's name.

[0032] Consecutive failure count: The cumulative number of consecutive task failures caused by the task provider's computing power being cut off. The count is reset to zero once a successful task is achieved.

[0033] Computing power circuit breaker: A circuit breaker event caused by the task provider during task execution.

[0034] Valid appeal: An appeal submitted within the appeal period and accompanied by supporting evidence.

[0035] Idempotent key: Consists of execution instance identifier and circuit breaker event identifier, used for deduplication of circuit breaker deductions.

[0036] Example 1: System Overall Architecture As shown in Figure 1, the intelligent agent task concurrent scheduling and settlement system based on margin in this embodiment is deployed on the task trading platform side, including a margin management module, a concurrent scheduling module, a settlement module, a circuit breaker management module, and a packaged sales module as an optional implementation.

[0037] The deposit management module is responsible for maintaining the deposit account of the task provider, including the calculation of the deposit amount, deposit freezing, and refund. The deposit amount is calculated based on the highest task price of the task products for sale under the task provider's name and the concurrency multiple N. In this embodiment, when the task provider lists the task products, it selects the concurrency multiple N (a positive integer, preferably an integer between 3 and 10). N is the upper limit of the number of tasks that the task provider can accept at the same time (the global concurrency limit at the provider level). The deposit payable R = max(highest task price × N, minimum deposit limit L). For example, if the highest task price under a task provider's name is 100 yuan and the selected concurrency multiple N is 5, then R = max(100 × 5, L) = 500 yuan (when L is less than 500 yuan); if the calculated value is less than L, then L is paid.

[0038] The concurrent scheduling module maintains the state machine of the task product (as shown in Figure 2) and drives state transitions based on real-time comparisons of the global concurrent order count with the concurrency multiplier N, and real-time comparisons of the margin balance with the minimum margin limit. When a task acceptance request arrives, the concurrent scheduling module first atomically reads the current state of the task product, the global concurrent order count, and the margin balance: if it is in an active state, it verifies the concurrent quota and accepts the order, incrementing the global concurrent order count; if it is in a queued state, it adds the request to the waiting queue and reports the number of people in the queue and the estimated waiting time to the requester; if it is in an inactive or delisted state, it rejects the order and returns a prompt. State transitions and quota usage are ensured to maintain consistency through atomic operations (such as distributed locks, transactions, or version number verification).

[0039] The settlement module maintains the task status and appeal period timer. After the task execution result is submitted and passes acceptance (or automatically passes upon the expiration of the acceptance period), an acceptance pass event is generated, and the settlement module starts the appeal period timer (24 hours in this embodiment) from the moment of this event. If no valid appeal is received within the appeal period, the task is deemed automatically completed and enters a settlement delay (T+1 withdrawal in this embodiment), whereby the task price, after deducting the platform commission, is settled to the task provider. If a valid appeal is received within the appeal period, an arbitration decision is triggered, and the arbitration unit outputs the arbitration result. The settlement module executes the settlement based on the arbitration result. Settlement records are written to the trusted evidence storage service for auditing purposes.

[0040] The circuit breaker management module monitors circuit breaker events during task execution. When a task triggers a computing power circuit breaker due to reasons attributable to the task provider, the module deducts one task price from the task provider's deposit and reduces the provider's credit score (5 points in this embodiment). Simultaneously, it records the number of consecutive failures; when consecutive failures reach a preset failure threshold (3 times in this embodiment), the corresponding task item is automatically switched to a delisted state. When the deposit balance falls below the preset minimum deposit limit, the module automatically switches the corresponding task item to a delisted state. If the task provider initiates a delisting operation and has no outstanding liabilities, the deposit management module fully refunds the deposit.

[0041] Example 2: Task Product State Machine Flow As shown in Figure 2, the task product state machine includes four mutually exclusive states, determined according to the following priority: delisted, inactive, queued, and active. The transition conditions are as follows: (1) Active state: The task item has not been delisted, the deposit balance is not lower than the minimum deposit limit, and the global concurrent order acceptance count is less than the concurrency multiple N. When in this state, new task acceptance requests can be accepted immediately. When the global concurrent order acceptance count reaches N after the order is accepted, the task item switches from the active state to the queued state.

[0042] (2) Queuing Status: The task item has not been delisted, the deposit balance is not lower than the minimum deposit limit, and the global concurrent order count is equal to the concurrency multiple N. In this status, newly arriving task acceptance requests are added to the waiting queue, and the number of people in the queue and the estimated waiting time are fed back to the requester. When an accepted task is completed and the concurrency quota is released, the concurrency scheduling module atomically retrieves the next request from the waiting queue in a first-in-first-out order and automatically accepts the order. Based on the global concurrent order count after the order is accepted, it determines whether the task item remains in the queuing status or switches back to the active status. The task item switches back to the active status only when the waiting queue is empty and the global concurrent order count is less than N. The estimated waiting time is estimated based on the number of tasks preceding the requester and the average execution time of each task, and is for reference only.

[0043] (3) Inactive state: The task item has not been delisted and the deposit balance is lower than the minimum deposit limit. When in this state, the task item is suspended from accepting orders and the task provider is prompted to replenish the deposit; after replenishing to no less than the minimum deposit limit, the state determination is re-executed. If the item has not been delisted and the global concurrent order count is less than the concurrency multiple N, it switches back to the active state. If the item has not been delisted and the global concurrent order count is equal to the concurrency multiple N, it switches back to the queued state.

[0044] (4) Delisted Status: Task items enter this status due to the task provider initiating a delisting operation, consecutive failures reaching a preset failure threshold, or the deposit balance continuously falling below the minimum deposit limit for a preset time threshold. In this status, task items are no longer displayed. Specifically, for items entering the delisted status due to the task provider's initiative, the deposit will be fully refunded if there are no outstanding tasks, appeals, arbitrations, or pending penalties. For items automatically delisted due to consecutive failures or insufficient deposit, the deposit will be handled according to the rules of the circuit breaker management module. Task items can be relisted from the delisted status: After the task provider replenishes the deposit and passes the review, the status determination will be re-executed, and the item will enter an active, queued, or inactive status.

[0045] It should be noted that the status of a task item is separate from the status of a task instance: when a task item enters the "out of stock" or "inactive" state, it only prevents new tasks from entering; tasks that are already being executed, queued, or pending settlement continue to be processed according to their respective task instance statuses.

[0046] In this embodiment, the specific implementation methods of the above atomic operations include, but are not limited to: using distributed locks (such as distributed locks based on cache services) in a distributed environment to ensure mutual exclusion of task acceptance requests; or using version number verification (such as optimistic locking) to ensure consistency between state switching and quota occupancy; or using database transactions to ensure atomic updates of state and quota. The concurrent scheduling module subscribes to task completion events through the event bus, publishes a quota release event when the task is completed, and triggers the linkage of queue request filling and state re-determination; the global concurrent order acceptance number under the same task provider is uniformly maintained across task products to ensure the consistency of the global concurrent quota.

[0047] Example 3: Task Settlement and Appeal Arbitration Process As shown in Figure 3, the task settlement and appeal arbitration process includes: Step S31: After the task is completed, the task execution result is submitted to the platform and enters the acceptance phase; after the acceptance is passed (or automatically passed when the acceptance period expires), an acceptance pass event is generated, and the transaction funds are frozen. Step S32: The settlement module starts the appeal period timer (24 hours in this embodiment) from the moment the acceptance is passed, and records the start time of the appeal period; Step S33: The settlement module determines whether a valid appeal has been received within the appeal period. If no valid appeal has been received, proceed to step S34; if a valid appeal has been received, proceed to step S35. In step S34, the settlement module determines that the task is automatically completed and enters the settlement delay period (T+1 withdrawal in this embodiment). During the settlement delay period, the transaction funds remain frozen. After the settlement delay expires, the task payment will be distributed according to the preset ratio (after deducting the platform commission, the payment will be settled to the task provider), and the settlement record will be written to the trusted evidence storage service, and the process will end. Step S35: The settlement module suspends withdrawals and triggers arbitration. The arbitration unit outputs the arbitration result based on the evidence submitted by both parties to the task. The arbitration result may support the task provider, support the task requester, or partially support the task. When a valid appeal triggers arbitration, the settlement delay timer is suspended and restarted after the arbitration result is confirmed. Step S36: The settlement module executes the settlement based on the arbitration result: If the task provider is supported, the task price is settled to the task provider after deducting the platform commission; if the task requester is supported, the task price is refunded and the task provider's security deposit is deducted according to the rules; if partially supported, the price and fees are allocated according to the allocation ratio determined by the arbitration; the security deposit deduction shall not exceed the available security deposit balance, and if the balance is insufficient, the outstanding amount is recorded; the settlement record is written to the trusted evidence storage service, and the process ends.

[0048] In this embodiment, the arbitration decision can be executed automatically by the arbitration decision unit; when initiating arbitration, the task requester or the task provider prepays the arbitration fee, and if the initiator withdraws the arbitration application before the formal arbitration, the remaining part is refunded according to the actual cost incurred.

[0049] Example 4: Circuit Breaker and Removal Decision Logic As shown in Figure 4, the circuit breaker and delisting determination logic includes: Step S41: The circuit breaker management module monitors circuit breaker events during task execution. Triggering conditions for circuit breaker events include: task execution time exceeding a preset timeout threshold, task provider service returning a preset error code, consecutive heartbeat failures exceeding a preset number, or resource utilization exceeding a preset threshold for a preset duration. Meeting any one of these conditions triggers a circuit breaker event. Circuit breaker events must be attributed to faults attributable to the task requester, platform, and network; only circuit breaker events attributed to the task provider are recorded for processing. Fault attribution is determined through cross-referencing of multiple logs or independent probes to identify the responsible party. Monitoring continues until a circuit breaker event is detected. Step S42: When a computing power circuit breaker attributable to the task provider is detected, the circuit breaker management module deducts the task price from the task provider's deposit in an idempotent manner and reduces the task provider's credit score; the idempotent deduction uses the execution instance identifier and the circuit breaker event identifier as the idempotent key, and the same execution instance can be deducted at most once. Step S43: The circuit breaker management module updates and records the number of consecutive failures of the task provider; when a successful task occurs, the number of consecutive failures is reset to zero. Step S44: The circuit breaker management module determines whether the number of consecutive failures has reached the preset failure threshold (3 times in this embodiment): if it has, proceed to step S45; if it has not, return to step S41 to continue monitoring. In step S45, the circuit breaker management module automatically switches the corresponding task product to the "off-shelf" status, and the process ends.

[0050] Step S46: The circuit breaker management module continuously monitors the margin balance of the task provider. When the margin balance is lower than the preset minimum margin limit and continues to reach the preset time threshold, the corresponding task product is automatically switched to the delisted state.

[0051] In this embodiment, if the task provider initiates the delisting operation and there are no outstanding liabilities, the deposit management module will refund the deposit in full; if the task is automatically delisted due to continuous failures or insufficient deposit, the remaining deposit will be handled according to the rules of the circuit breaker management module.

[0052] Example 5: Bundled Sales and Concurrent Quotas This embodiment illustrates an optional implementation of the bundled sales module. When a task provider sells tasks in a bundled format (e.g., selling a package of a certain number of calls), the prepayment for the bundled task by the task requester is transferred to a guarantee account by the bundled sales module, and the revenue is split per call: for each call made by the task requester, the bundled sales module settles the account with the task provider based on the unit price per call; when the package expires or the unused number of calls reaches the refund condition, a refund is issued to the task requester according to a preset ratio. The bundled sales are not included in the task provider's transaction concurrency limit and do not occupy the concurrency quota corresponding to the concurrency multiple N; however, each actual call of the bundled sales is included in the execution resource quota and is subject to the same timeout, rate limiting, and circuit breaker control as a single task, thereby preventing the bundled sales from crowding out the concurrency resources for accepting single tasks and preventing execution resources from being overloaded.

[0053] Example 6: System Parameters and Deployment Pattern This embodiment provides specific deployment parameters: the preset minimum security deposit limit L is 20 yuan; the concurrency multiple N is a positive integer, preferably an integer between 3 and 10, selected by the task provider; the appeal period is 24 hours; the withdrawal settlement delay is T+1; the platform commission is 5% of the task price; the credit score deduction for computing power circuit breaker is 5 points; the consecutive failure threshold is 3 times. The above parameters are all exemplary values, and those skilled in the art can adjust them according to actual business needs.

[0054] The trusted evidence storage service can be any of a distributed ledger, consortium blockchain, or third-party trusted evidence storage service, used for storing settlement records and state transition records. Its tamper-proof capability is provided by the corresponding service under its consensus security assumption. The system can be deployed in a traditional server, containerized environment, or serverless edge computing architecture; this invention does not limit its deployment.

[0055] Industrial applicability The system and method provided by this invention can be applied to: concurrent scheduling and automatic settlement of task outsourcing and matching platforms for intelligent agents; task allocation and default handling in multi-agent collaboration scenarios; and various automated task transaction scenarios requiring margin guarantees and automatic settlement. The system has low deployment costs, a high degree of automation in scheduling and settlement, can be used frequently, and has good industrial applicability.

Claims

1. A concurrent scheduling and settlement system for intelligent agent tasks based on margin deposits, characterized in that, include: The margin management module is configured to determine and maintain the amount of margin paid by the task provider; The deposit amount is calculated based on the highest task price among the task products for sale under the task provider's name and the concurrency multiple N, where the concurrency multiple N is the maximum number of simultaneous orders declared by the task provider, that is, the provider-level global concurrency limit for all task products under the task provider's name; the deposit amount is the greater of the product of the highest task price and the concurrency multiple N, and the preset minimum deposit limit. The concurrent scheduling module is configured to maintain the state machine of the task product. The state machine includes four states: active, queued, inactive, and delisted. These four states are mutually exclusive and determined by priority: delisted, inactive, queued, and active. When a task acceptance request arrives, the concurrent scheduling module atomically reads the current state of the task product, the global concurrent order count, and the deposit balance. When the global concurrent order count is less than the concurrency multiple N and the deposit balance is not lower than the preset minimum deposit limit, the task product is in an active state and an order is accepted, and the global concurrent order count is incremented. When the global concurrent order count equals the concurrency multiple N... When the margin balance is not lower than the preset minimum margin limit, the task product is in a queue state, and newly arrived task acceptance requests are added to the waiting queue and atomically accepted in a first-in-first-out order after the concurrent quota is released; when the margin balance is lower than the preset minimum margin limit, the task product is in an inactive state and order acceptance is suspended; when the task provider initiates a delisting operation, fails continuously to reach a preset failure threshold, or the margin balance is continuously lower than the preset minimum margin limit to reach a preset time threshold, the task product is in a delisted state. The concurrent scheduling module ensures the atomicity of reading, judging, and accepting tasks through distributed locks, version number verification, or transaction mechanisms, and maintains data consistency between state switching and quota usage. The concurrent scheduling module subscribes to task completion events and triggers a linkage between decrementing the global concurrent order count, filling queued requests, and re-judging the state when a task is completed. The settlement module is configured to start the appeal period timer after the task execution result is submitted and accepted; if no valid appeal is received within the appeal period, the task is determined to be automatically completed and the withdrawal settlement is triggered, and the task price after deducting the platform commission is settled to the task provider. If a valid appeal is received during the appeal period, an arbitration decision is triggered, and settlement is executed in accordance with the arbitration result; The circuit breaker management module is configured to deduct the task price from the task provider's deposit in an idempotent manner and reduce the task provider's credit score when a computing power circuit breaker occurs during task execution; record the number of consecutive failures, and automatically switch the corresponding task product to the "off-shelf" state when the number of consecutive failures reaches a preset failure threshold; and automatically switch the corresponding task product to the "off-shelf" state when the deposit balance is lower than the preset minimum deposit limit and continues to reach a preset time threshold.

2. The system according to claim 1, characterized in that, The concurrency multiplier N is a positive integer selected by the task provider, preferably an integer between 3 and 10, and its value determines the upper limit of the number of tasks that the task provider can accept at the same time.

3. The system according to claim 1, characterized in that, The deposit management module maintains the task price of all tasks for sale under the name of the task provider in real time. When the task provider adds, modifies, or removes task products, causing a change in the highest task price, the deposit amount is recalculated and the frozen deposit amount is updated. If the recalculated deposit amount is higher than the current frozen amount, the task provider is required to pay the difference before listing the task. If the recalculated deposit amount is lower than the current frozen amount, the difference is released only if there are no outstanding tasks, appeals, arbitrations, or pending penalties.

4. The system according to claim 1, characterized in that, When the task item is in a queue, the concurrent scheduling module is also configured to provide feedback to the requester who initiated the task acceptance request regarding the number of people in the queue and the estimated waiting time; the estimated waiting time is estimated based on the number of tasks in the waiting queue preceding the requester and the average execution time of each task.

5. The system according to claim 1, characterized in that, In the settlement module, the appeal period is a preset duration, the settlement delay of the withdrawal settlement is a period of time starting from the automatic completion judgment time, and the platform commission is a preset percentage of the task price; the settlement module writes the settlement records into the trusted evidence storage service for auditing.

6. The system according to claim 1, characterized in that, The arbitration decision is executed by the arbitration decision unit, which outputs the arbitration result based on the evidence materials submitted by both parties to the task. The arbitration result may support the task provider, support the task requester, or partially support the task provider. A valid appeal is an appeal submitted within the appeal period and accompanied by supporting evidence. If the arbitration fee is prepaid when the arbitration is initiated, and the initiating party withdraws the arbitration application before the formal arbitration, the remaining part of the actual cost incurred shall be refunded. When a valid appeal triggers arbitration, the settlement delay timer is suspended and restarted after the arbitration result is confirmed. The settlement module performs settlement based on the arbitration result: if the task provider is supported, the task price will be settled to the task provider after deducting the platform commission; If the task requester is supported, the task price will be refunded and the task provider's security deposit will be deducted. If partially supported, the allocation of price and fees shall be carried out in accordance with the distribution ratio determined by arbitration.

7. The system according to claim 1, characterized in that, The computing power circuit breaker refers to a circuit breaker event caused by the task provider during task execution. The triggering conditions for the circuit breaker event include the task execution time exceeding a preset timeout threshold, the task provider's service returning a preset error code, the number of consecutive heartbeat failures exceeding a preset number, or the resource utilization rate exceeding a preset threshold and lasting for a preset time. Meeting any one of these conditions will trigger the circuit breaker event. After fault attribution and exclusion of the task requester, platform, and network causes, only circuit breaker events attributed to the task provider will be included in the processing. The fault attribution will determine the responsible party through cross-comparison of multiple logs or independent probes. The idempotent deduction uses the execution instance identifier and the circuit breaker event identifier as the idempotent key, and the same execution instance will be deducted at most once. The preset failure threshold and the deduction value of the credit score are both preset parameters.

8. The system according to claim 1, characterized in that, It also includes a bundled sales module, configured to transfer the prepayment corresponding to the bundled sales to a guarantee account and distribute the revenue per transaction when the task provider sells tasks in a bundled form; the bundled sales are not included in the transaction concurrency limit of the task provider and do not occupy the concurrency quota corresponding to the concurrency multiple N; each actual call of the bundled sales is included in the execution resource quota and is subject to the same timeout, rate limiting and circuit breaker control as a single task.

9. A method for concurrent scheduling and settlement of intelligent agent tasks based on margin deposits, characterized in that, Includes the following steps: Step 1: Determine and maintain the security deposit amount paid by the task provider: The security deposit amount is calculated based on the highest task price among the task products for sale under the task provider's name and the concurrency multiple N, where the concurrency multiple N is the maximum number of simultaneous orders declared by the task provider, that is, the provider-level global concurrency limit for all task products under the task provider's name; the security deposit amount is the greater of the product of the highest task price and the concurrency multiple N, and the preset minimum security deposit limit; Step 2: When a task acceptance request arrives, atomically read the current status of the task item, the global concurrent order count, and the deposit balance to maintain the task item's state machine. The state machine includes four mutually exclusive states: active, queued, inactive, and delisted. The order is determined by priority: delisted, inactive, queued, active. When the global concurrent order count is less than the concurrency multiple N and the deposit balance is not lower than the preset minimum deposit limit, the task item is in an active state and an order is accepted; the global concurrent order count is incremented. When the global concurrent order count equals the concurrency multiple N... When the margin balance is not lower than the preset minimum margin limit, the task product is in a queued state. Newly arrived task acceptance requests are added to the waiting queue and atomically accepted in a first-in-first-out order after the concurrent quota is released. When the margin balance is lower than the preset minimum margin limit, the task product is in an inactive state and order acceptance is suspended. When the task provider initiates a delisting operation, fails continuously to reach a preset failure threshold, or the margin balance is continuously lower than the preset minimum margin limit to reach a preset time threshold, the task product is in a delisted state. The atomic reading and order acceptance are guaranteed by distributed locks, version number verification, or transaction mechanisms to maintain the atomicity of reading, judgment, and order acceptance operations, and maintain data consistency between state switching and quota occupation. The steps for maintaining the state machine of the task product also include: subscribing to the task completion event, and triggering the linkage of decrementing the global concurrent order count, filling the queue request, and re-determining the state when the task is completed; Step 3: After the task execution result is submitted and accepted, the appeal period is started: If no valid appeal is received within the appeal period, the task is deemed to be automatically completed and the withdrawal settlement is triggered, and the task price after deducting the platform commission is settled to the task provider; If a valid appeal is received within the appeal period, an arbitration decision is triggered, and the settlement is executed according to the arbitration result. Step 4: When a computing power circuit breaker occurs during task execution, the task price is deducted once from the task provider's deposit in an idempotent manner, and the task provider's credit score is also reduced; the number of consecutive failures is recorded, and when the number of consecutive failures reaches a preset failure threshold, the corresponding task product is automatically switched to an unlisted state; when the deposit balance is lower than the preset minimum deposit limit and continues to reach a preset time threshold, the corresponding task product is automatically switched to an unlisted state.

10. The method according to claim 9, characterized in that, The concurrency multiplier N is a positive integer selected by the task provider, preferably an integer between 3 and 10, and its value determines the upper limit of the number of tasks that the task provider can accept at the same time.

11. The method according to claim 9, characterized in that, The steps for determining and maintaining the security deposit amount include: maintaining the task price of all task products for sale under the name of the task provider in real time; when the task provider adds, modifies, or removes task products, causing a change in the highest task price, recalculating the security deposit amount and updating the frozen security deposit amount; when the recalculated security deposit amount is higher than the current frozen amount, requiring the task provider to make up the difference before listing the product; when the recalculated security deposit amount is lower than the current frozen amount, releasing the difference only when there are no outstanding tasks, appeals, arbitrations, or pending penalties.

12. The method according to claim 9, characterized in that, The step of maintaining the state machine of the task item further includes: when the task item is in a queue, feeding back the number of people in the queue and the estimated waiting time to the requester who initiated the task acceptance request; the estimated waiting time is estimated based on the number of tasks in the waiting queue that are ahead of the requester and the average execution time of each task.

13. The method according to claim 9, characterized in that, The appeal period is a preset duration, the settlement delay of the withdrawal settlement is a period of time starting from the time of automatic completion judgment, the platform commission is a preset percentage of the task price, and the settlement step also includes writing the settlement record into a trusted evidence storage service for auditing.

14. The method according to claim 9, characterized in that, The steps for triggering arbitration include: the arbitration unit outputting an arbitration result based on the evidence submitted by both parties, the result of which may support the task provider, support the task requester, or partially support the task provider; a valid appeal is an appeal submitted within the appeal period with supporting evidence; an arbitration fee is prepaid when arbitration is initiated, and if the initiating party withdraws the arbitration application before formal arbitration, the remaining portion of the actual cost is refunded; when a valid appeal triggers arbitration, the settlement delay timer is suspended and restarted after the arbitration result is confirmed; settlement is executed according to the arbitration result: if the task provider is supported, the task price is settled to the task provider after deducting the platform commission; if the task requester is supported, the task price is refunded and the task provider's deposit is deducted; if partially supported, the price and fees are allocated according to the distribution ratio determined by the arbitration.

15. The method according to claim 9, characterized in that, The computing power circuit breaker refers to a circuit breaker event caused by the task provider during task execution. The triggering conditions for the circuit breaker event include the task execution time exceeding a preset timeout threshold, the task provider's service returning a preset error code, the number of consecutive heartbeat failures exceeding a preset number, or the resource utilization rate exceeding a preset threshold and lasting for a preset time. Meeting any one of these conditions will trigger the circuit breaker event. After fault attribution and exclusion of the task requester, platform, and network causes, only circuit breaker events attributed to the task provider will be included in the processing. The fault attribution will determine the responsible party through cross-comparison of multiple logs or independent probes. The idempotent deduction uses the execution instance identifier and the circuit breaker event identifier as the idempotent key, and the same execution instance will be deducted at most once. The preset failure threshold and the deduction value of the credit score are both preset parameters.

16. The method according to claim 9, characterized in that, Also includes: When a task provider sells tasks in a package, the prepayment corresponding to the package sale is transferred to a guarantee account and split into installments. The package sale is not included in the task provider's transaction concurrency limit and does not occupy the concurrency quota corresponding to the concurrency multiple N. Each actual call of the package sale is included in the execution resource quota and is subject to the same timeout, rate limiting and circuit breaker control as a single task.

17. The method according to claim 9, characterized in that, Also includes: When the task provider initiates the removal process and there are no outstanding tasks, appeals, arbitrations, or pending penalties, the task provider's deposit will be fully refunded. If the task is automatically removed due to consecutive failures or insufficient deposit, the remaining deposit balance will be handled according to the circuit breaker rules.

18. The method according to claim 9, characterized in that, The status of the task product is separate from the status of the task instance: when a task product enters the "out of stock" or "inactive" state, only new tasks are prohibited from entering; tasks that are already being executed, queued, and pending settlement continue to be processed according to their respective task instance statuses; when a task product is in an inactive state because its deposit balance is lower than the preset minimum deposit limit, order taking is suspended and a prompt to replenish the deposit is made. After replenishing the deposit to a level not lower than the preset minimum deposit limit, the status determination is re-executed. If the task product is not out of stock and the global concurrent order taking count is less than the concurrency multiple N, it switches back to the active state; if the task product is not out of stock and the global concurrent order taking count is equal to the concurrency multiple N, it switches back to the queued state.