RPA dynamic scheduling method and system based on Fibonacci sequence optimization key value mutual exclusion

By optimizing the RPA dynamic scheduling method with key-value mutual exclusion through the Fibonacci sequence, the conflict location and resource scheduling problems of RPA technology in high-concurrency and multi-version rapid iteration scenarios are solved, achieving second-level rollback, security compliance and efficient resource utilization.

CN120803638APending Publication Date: 2025-10-17DAREWAY SOFTWARE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510880140.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-17

Smart Images

  • Figure CN120803638A_ABST
    Figure CN120803638A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of software robots or artificial intelligence, and provides an RPA dynamic scheduling method and system based on key value mutual exclusion optimization of a Fibonacci sequence. Constructing a Fibonacci Hash index according to the scheduling graph capable of being dynamically updated; calling slot information based on a Fibonacci Hash index, constructing a multi-target gain function including throughput, cost and risk dimensions, introducing a forehand script enqueue agent and a backhand resource arrangement agent, and performing iterative training on the strategy network of the two agents in combination with the multi-target gain function to obtain a trained strategy network of the two agents; and on the basis of the trained two-agent strategy network, predicting a future window concurrency curve and deducing the required CPU core number and memory amount, generating a capacity expansion and contraction result, verifying the capacity expansion and contraction result, writing a compliance mark back to the Fibonacci Hash index, and rapidly positioning conflict nodes and seamlessly switching an old version and a new version in a hot update / rollback scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of software robots or artificial intelligence technology, and in particular to an RPA dynamic scheduling method and system based on Fibonacci sequence optimization of key-value mutual exclusion. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Currently, RPA is widely used in the human resources and social security fields. RPA (Robotic Process Automation) uses robots as virtual labor to interact with existing user systems according to pre-set programs, automatically executing user task workflows and completing expected tasks. However, traditional RPA technology is only suitable for high-volume, highly repetitive, and logically defined tasks.

[0004] Existing scheduling methods focus on node resource matching and container orchestration, lacking a real-time, fine-grained indexing mechanism for script-level multi-version consistency checks and conflict location. Existing scheduling methods suffer from increased access latency due to index collisions and lengthy chains in high-concurrency hot update / rollback scenarios. For example, traditional solutions such as ConsistentHash and Redis skip tables generate long chains or frequent rehashing when versions switch frequently, significantly reducing read and write performance. Existing workflow orchestrators generally maintain DAG topology at the workflow level and lack comprehensive weight modeling for image hash consistency, security policy scoring, and cold start characteristics between scripts, resulting in inaccurate priority adjustments. In addition, reinforcement learning-based resource scheduling mostly makes coarse decisions at the service or node granularity, making it difficult to simultaneously account for the combined impact of script conflicts, image risks, and business peaks, resulting in inaccurate priority adjustments. Summary of the Invention

[0005] In order to solve at least one technical problem existing in the above-mentioned background technology, the present invention provides an RPA dynamic scheduling method and system based on the Fibonacci sequence to optimize key-value mutual exclusion, so as to solve the technical problems of insufficient coupling between real-time conflict location, image consistency risk identification and elastic computing power scheduling when multiple script versions are rapidly iterated and executed with high concurrency in cloud-based RPA scenarios. The specific goal is to achieve second-level rollback, security compliance traceability and cost-sensitive resource scaling while maintaining peak business throughput.

[0006] In order to achieve the above object, the present invention adopts the following technical solutions: A first aspect of the present invention provides an RPA dynamic scheduling method based on Fibonacci sequence optimization of key-value mutual exclusion, comprising the following steps: Build a dynamically updateable scheduling graph based on the obtained RPA script description file; According to the dynamically updatable scheduling graph, a Fibonacci hash index is constructed; whether a slot is occupied is judged, when it is calculated that the slot has been occupied, if the conflict record is a new version, the slot is retained and no longer moved, if the conflict record is an old version, the slot is sequentially probed according to the double-step increment of the Fibonacci sequence; Based on the Fibonacci hash index, slot information is called, combined with the collected script, node and container information, a multi-objective gain function containing throughput, cost and risk dimensions is constructed, a first-move script queuing agent and a second-move resource arrangement agent are introduced, and the multi-objective gain function is combined to iteratively train the strategy networks of the two agents to obtain the trained strategy networks of the two agents; Based on the trained strategy networks of the two agents, the future window concurrency curve is predicted and the required CPU core number and memory amount are deduced, the expansion and contraction results are sorted by priority, and the compliance flag is written back to the Fibonacci hash index after the expansion and contraction results are verified.

[0007] Further, the dynamically updatable scheduling graph is constructed based on the obtained RPA script description file, including: The obtained RPA script description file is synchronized to supplement the corresponding container image tag, Serverless runtime version and key fingerprint, and after verification, it is written into the script-resource metadata table; The script-resource metadata table is traversed, a unique virtual node is generated for each record, the node is mapped to an entity, and the performance indicators of the entity are queried after mapping, and the performance indicators of the entity and the node identifier are combined to form a node resource list; The node resource list is read, directed edges are generated according to script calls, data transmission and version references, and attributes are written on each edge; Attributes are written on each edge, the comprehensive score of each edge is calculated based on the written attributes, and a weighted scheduling graph is obtained by combining the weighted vectors of each attribute; An event listener is deployed on the weighted scheduling graph, when a running event stream is detected, a local incremental update is performed on the affected edge set to obtain a dynamically updatable scheduling graph.

[0008] Further, the Fibonacci hash index is constructed based on the dynamically updatable scheduling graph, including: According to the dynamically updatable scheduling graph, a key-value pair is generated; According to the script amplitude, the initial slot capacity is calculated and pre-segmented; Combined with the key-value pair and the pre-segmented result of the initial slot capacity, a Fibonacci hash index is constructed based on the Fibonacci hash function.

[0009] Further, the Fibonacci hash index is represented as: , in, Indicates the current slot capacity of the dynamic hash table, is the target slot index, The inverse of the golden ratio. Represents a unique key in a key-value stream.

[0010] Furthermore, the multi-objective gain function is: , in, is the gain function at time t, 、 and are the weight coefficients of the three-dimensional objectives of throughput benefit, resource cost, and delay penalty, for, is the resource cost index at time t, is the delay index at time t, is the consistency risk red line threshold, is the risk magnification factor, which is used to Perform exponential punishment, is the consistency risk coefficient at time t.

[0011] Furthermore, the introduction of the first-hand script enqueue agent and the second-hand resource orchestration agent, combined with the multi-objective gain function, iteratively trains the two-agent strategy network to obtain the trained two-agent strategy network, including: Define the first script to join the team agent and the subsequent resource orchestration agent , build the corresponding agent's strategy network and ; Combined with the gain function, the proximal policy optimization algorithm is used to iteratively train the two-agent policy network, specifically including: Each round of the game starts with the script queue triggering a preemption event, which will be obtained Push game log ,in, is a high-dimensional state vector: , Fibonacci hash index in Always retrieve script keys , is the length of each sub-queue, is the node CPU utilization, is the node memory utilization, For container Bandwidth usage, For intelligent agents action, For intelligent agents action, For gain; Each completed Step game, from the log Extraction batch Computing General Advantage And perform proximal policy gradient update to obtain the updated agent strategy; The updated agent strategy is scheduled online to obtain feedback samples. Based on the feedback samples and the service level agreement constraints of the dual agents A and B, the weight of the final strategy network is obtained. and cumulative gain.

[0012] Furthermore, the method further includes serializing the node-script mapping relationship into a unified orchestration list that complies with set specifications, and synchronously generating a minimum checksum for use in the next cycle.

[0013] A second aspect of the present invention provides an RPA dynamic scheduling device for optimizing key-value mutual exclusion based on the Fibonacci sequence, comprising: A dynamically updateable scheduling graph construction module, which is used to construct a dynamically updateable scheduling graph based on the obtained RPA script description file; An index construction module is used to construct a Fibonacci hash index based on a dynamically updateable scheduling graph. It determines whether a slot is occupied. If the slot is occupied, if the conflicting record is a new version, the slot is retained and not moved. If the conflicting record is an old version, the slot is explored in sequence using the double-step increment of the Fibonacci sequence. The agent policy network training module is used to call slot information based on the Fibonacci hash index. It combines the collected script, node, and container information to construct a multi-objective gain function that includes throughput, cost, and risk dimensions. It introduces a preemptive script enqueue agent and a postemptive resource orchestration agent. Combined with the multi-objective gain function, the two-agent policy network is iteratively trained to obtain the trained two-agent policy network. A dynamic scheduling module is used to predict the future window concurrency curve and deduce the required number of CPU cores and memory based on the trained two-agent strategy network, generate scaling results sorted by priority, verify the scaling results, and write the compliance mark back to the Fibonacci hash index.

[0014] A third aspect of the present invention provides a computer-readable storage medium.

[0015] A computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the RPA dynamic scheduling method for optimizing key-value mutual exclusion based on the Fibonacci sequence as described above.

[0016] A fourth aspect of the present invention provides a computer device.

[0017] A computer device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps in the RPA dynamic scheduling method based on the Fibonacci sequence optimized key value mutual exclusion as described above when executing the program.

[0018] Compared with the prior art, the beneficial effects of the present application are: 1、The present application introduces a new version of the original slot, an old version of the double-step probe and a local linked list rearrangement mechanism based on traditional Fibonacci hashing, achieving constant complexity and second-level local rollback of conflict processing in high-concurrency writing. It can guarantee mutual exclusion access to ⟨script ID, version number, image Digest⟩, quickly locate the conflict node and seamlessly switch between old and new versions in the hot update / rollback scenario.

[0019] 2、The present application models the calling dependency between scripts, image consistency, security score and cold start features into a weighted directed graph, and deploys event listeners on the graph. For script version upgrade, image replacement, security policy change, etc., only local weight update is performed, and a dynamically evolving scheduling priority graph is generated in real time. The mechanism can achieve the most fine-grained priority dynamic adjustment at the script level, avoiding congestion and resource waste.

[0020] 3、The present application constructs a two-stage PPO strategy network of a first-hand script queuing agent and a second-hand resource arrangement agent, jointly optimizes three-dimensional gains ("throughput-cost-risk") based on a high-dimensional state vector (including hash slot, script queue length, node load, business peak and risk coefficient), and generates a priority-ordered expansion and contraction plan by combining the strategy network with the prediction of future concurrency curve, achieving elastic resource allocation that preserves throughput during peak periods, saves cost during low peak periods, and controls risk throughout the period.

[0021] The advantages of the additional aspects of the present application will be partially given in the following description, partially become obvious from the following description, or be known by the practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0022] The drawings accompanying the specification of the present application form a part thereof, serve to provide further understanding of the present application, and together with the description of the exemplary embodiments of the present application and their description serve to explain the present application, and do not constitute an improper limitation of the present application.

[0023] Figure 1 is the RPA dynamic scheduling method based on the Fibonacci sequence optimized key value mutual exclusion provided by the embodiment of the present application; Figure 2 is a detailed flowchart of the RPA dynamic scheduling method based on the Fibonacci sequence optimized key value mutual exclusion provided by the embodiment of the present application; Figure 3 is a double-agent game logic diagram provided by an embodiment of the present application. DETAILED DESCRIPTION

[0024] The present application is further described below in conjunction with the accompanying drawings and embodiments.

[0025] It should be noted that the following detailed description is exemplary in nature and is intended to provide further description of the application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0026] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments in accordance with the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, steps, operations, elements, components, and / or groups thereof, but do not preclude the presence or addition of one or more other features, steps, operations, elements, components, and / or groups thereof.

[0027] In the cloud RPA scenario, the industry generally adopts a centralized scheduling scheme based on a container orchestration platform. The script description file is usually stored in a relational database or object storage. The scheduling component first pulls the script metadata through the REST-API, and then calls the default scheduler of Kubernetes or OpenShift to select the node for the Pod where the script is located according to CPU, memory and affinity label. The correspondence between the script and the container image is recorded by the Tag or Digest field maintained by the image repository, and the upgrade process mainly depends on the rolling update strategy triggered after the image is retagged. In terms of metadata consistency, the common practice is to generate SBOM by calling the image scanning service through the external CI / CD pipeline, and then verify the signature by AdmissionController in the deployment stage, thereby completing the double verification of image security and version security.

[0028] To reduce the node cold start delay, some cloud vendors introduce image pre-pull and warm container pool mechanism in the Serverless scenario: the system maintains a certain number of Warm containers in the background according to the fixed time table or historical average load. When the business traffic surges, the automatic scaling controller reads the Prometheus metrics and increases the instance number according to the HPA or KEDA rules; when the traffic falls below the threshold, the instances will be recycled according to the idle duration or cost priority. To avoid excessive jitter, existing solutions mostly use sliding window average or exponential smoothing to preprocess the metrics, and at the same time, the number of active replicas of the Pod is compressed to a minimum in the trough stage.

[0029] For the calling order, data dependency and version adaptation between scripts in complex business flows, the existing technology usually drives the collaborative execution of multiple scripts by means of a DAG-form workflow orchestrator (such as ArgoWorkflows, Airflow). The orchestrator starts each task according to the YAML or Python task definition file, and the intermediate data is transmitted between tasks through a queue or shared storage. The weight of the node is usually determined by a static priority or a simplified execution time estimation, and the real scheduling priority is dynamically adjusted only at the workflow level but not at the script level. In addition, the task version conflict is usually realized by manually setting the latest label or configuring the rollback version.

[0030] To improve resource utilization, some public clouds have begun to introduce reinforcement learning into the scheduling layer: the system encodes the number of pods, node load and cost model as the state, the action is the number of empty / supplement nodes or the number of replicas, and the reward function is a combination of throughput, cost and SLA. Common implementations use DQN or policy gradient-based Actor-Critic. Due to the considerations of explainability and online risk, such algorithms usually only make coarse-grained decisions for the entire service, and still rely on traditional scheduling strategies at the script level.

[0031] In systems with high consistency requirements, the metadata index service usually uses ConsistentHash or a Redis-based skip list to establish a mapping from the script key to the storage node. The main conflict handling method is to lengthen the linked list or linear probe, and the version rollback is realized by writing a new label and using TTL to delay the elimination of old data. This approach simplifies the implementation, but it increases the mapping table expansion and query time in high-concurrency write and multi-version fast switching scenarios.

[0032] The present application aims to solve the technical problems of real-time conflict positioning, image consistency risk identification and insufficient coupling of computing power elastic scheduling in the context of cloud RPA scenarios with multiple versions of scripts and high concurrency execution. The specific goal is to maintain high peak throughput while achieving second-level rollback, safe and compliant traceability, and cost-sensitive resource scaling.

[0033] Embodiment one As shown in Figure 1 and Figure 2 The present embodiment provides an RPA dynamic scheduling method based on Fibonacci sequence optimization of key-value mutual exclusion, including the following steps: Step 1: Construct a dynamically updateable scheduling graph based on the obtained RPA script description file; Specifically, the following steps are included: Step 101, grab the description file of all RPA scripts, synchronize the obtained RPA script description file to supplement the corresponding container image label, Serverless runtime version and key fingerprint, and write it into the script-resource metadata table after verification. In this embodiment, the cloud workflow registration center captures all RPA script description files at one time, and synchronously supplements the corresponding container image tag, Serverless runtime version and key fingerprint. Then, the original records are executed according to the preset unified JSONSchema to perform field completion and format verification. The verification rules cover three aspects of key name validity, mandatory field integrity and character legality. The results of the verification are written into the script-resource metadata table. In this embodiment, the script-resource metadata table is as follows: The script ID is used as the unique primary key, and the script hash value, image tag, runtime version number and key fingerprint are stored at the same time.

[0034] Step 102, traverse the script-resource metadata table, generate a unique virtual node for each record, perform entity mapping on the node, query the performance indicators of the entity after the mapping, and combine the performance indicators of the entity and the node identifier to form a node resource list; In this embodiment, during the sequential traversal of the table , the system calls the underlying orchestration API to generate a unique virtual node for each record, and performs one-to-one mapping between the virtual node and the actual container pool or function runtime. After the mapping is completed, the three performance indicators of the number of schedulable CPU cores , available memory and container node cold start time are obtained. The three performance indicators and the node identifier are combined to form a node resource list . The list is stored in a high-speed key-value cache.

[0035] Step 103, read the node resource list, and generate directed edges according to script calling, data transmission and version reference relationship; In this embodiment, when reading the node resource list , the complete execution path is traced according to the calling order of the script entry function, and directed edges are created in real time for each script calling, data transmission or version reference relationship , wherein the source node is , and the target node is . Each newly created edge is written with three meta attributes: image hash comparison state , confidential data identifier and security policy score . Based on this, the logical dependencies between scripts are completely mapped to the vertices and edges of the graph structure, laying a data foundation for weight quantification.

[0036] Step 104, write attributes on each edge, calculate the comprehensive score of each edge based on the written attributes, combine the weighted vector of each attribute to obtain a weighted scheduling graph; In this embodiment, based on the mirror consistency score , the security policy score and the node cold start feature , a weight vector is used to perform a comprehensive score on each edge (satisfying ): , The calculated is written into the corresponding edge attribute in real time, and finally a weighted scheduling graph is formed, which not only depicts the dependency direction, but also quantifies the execution priority and security compliance degree .

[0037] Step 105, deploy event listeners on the weighted scheduling graph, and when detecting running event streams, perform local incremental updates on the affected edge set to obtain a dynamically updateable scheduling graph; In this embodiment, event listeners are deployed on the weighted scheduling graph , and when detecting running event streams such as capturing script version upgrade, mirror replacement and security policy adjustment; when the listener detects a subset of events , the affected node set and its adjacent edge set are located, and then a local incremental update is performed on the weight matrix: , wherein is the edge selection matrix (the element takes the value of 1 or 0, indicating whether the corresponding edge needs to recalculate the weight), and is the Hadamard product.

[0038] After completing the local recalculation, a new dynamically updateable scheduling graph is generated , and the graph evolves in real time with the event stream and continuously provides the latest environmental data representation description to the downstream scheduling link.

[0039] Step 2: Construct a Fibonacci hash index based on the dynamically updateable scheduling graph; Specifically, the following steps are included: Step 201, generate a key-value pair according to the dynamically updateable scheduling graph; In this embodiment, the dynamically updateable scheduling graph is read , the script identification-version number-mirror Digest is extracted for each vertex and spliced in order to generate a unique key , and the container runtime ID-security level-cold start time consumption is aggregated as the value , forming a streaming key-value pair .

[0040] The script image key-value stream is written into both the memory queue and the Write-Ahead Log, ensuring that the subsequent Fibonacci mapping can be based on a single, accurate and traceable index field.

[0041] Step 202, calculate the initial slot capacity according to the script growth and pre-segment the initial slot capacity; In this embodiment, the number of current unique keys is counted before the key-value stream enters , and the initial slot capacity is calculated according to the script growth sequence of the past time period, for example, 90 days . ; , , Among them, is the initial slot capacity, represents the average daily growth in the past three months, is the total number of script unique keys on the dth day, that is, if keys are added on the dth day, the total number of keys of the previous day is taken as the base to calculate the growth ratio of the day; After obtaining the initial slot capacity , the initial slot capacity is divided in half according to the golden ratio inverse , and the segmented size is used to apply for continuous memory and create the underlying structure of the dynamic hash table at one time. In the high-frequency insertion stage, each time a segment of capacity is added, the corresponding partition is activated, so that the actual load factor of the table is always kept below the preset threshold (0.68 in the example), avoiding performance jitter caused by triggering full table rehashing or expansion in massive writing.

[0042] Step 203, combine the key-value pair and the initial slot capacity pre-segmentation result, and combine the Fibonacci hash function to obtain the Fibonacci hash index; Specifically, the following steps are included: Step 2031, sequentially read records from the key-value stream and call the improved Fibonacci hash function; , Among them, represents the slot capacity of the current dynamic hash table, that is, the real-time capacity, is the target slot index, is the golden ratio inverse; represents the unique key in the key-value stream, that is, the integer obtained after the script ID + version number + mirror Digest is subjected to consistent hash or numerical mapping; Step 2032, judge whether the slot is occupied, when the slot​ If the conflict record is already occupied, if it is a new version, the slot will be retained and no longer moved. If the conflict record is an old version, it will be explored in sequence according to the double-step increment of the Fibonacci sequence, which is expressed as: , Each exploration uses the current round Corresponding Use it as an offset to go to the next slot until an empty slot is found.

[0043] This ensures that the length of the probe chain is controlled in a high-concurrency environment and that the local linked list can be quickly reordered during a version rollback. Step 2033: Incrementally register the new version on the index, roll it back locally, recalculate the digest of the corresponding container image for all slots that have been written or relocated, perform consistency checks and risk flagging, and then publish it; The specific steps include: Step 20331: After triggering the script version upgrade event, reuse the hash function to quickly locate the target slot. If a different version is found in the same slot, use the Fibonacci double-step increment method to detect the empty slot at a constant level and complete the writing. After the writing is completed, an incremental index snapshot of the batch of newly added slots is immediately generated and pushed to the consistency check queue. This step completes the incremental registration of the new version in the index and is asynchronously decoupled from subsequent verification.

[0044] Step 20332: When a rollback instruction is received, the entire table is not rehashed. Instead, the script directly identifies the slot in question. The corresponding doubly linked list for that slot is sequentially scanned through all versions to find the target version node. This node is moved to the head of the linked list and marked as the latest, while the adjacent pointers are adjusted in the opposite direction. The entire rollback process only modifies the linked list for a single slot, ensuring completion within seconds without triggering table-level expansion or contraction.

[0045] Step 20333: For all slots written or relocated in steps 20332-20333, recalculate the digest of the corresponding container image and perform a one-way comparison between the newly calculated digest and the baseline digest recorded in the scheduling diagram: if there is a match, mark it with a green checksum; if there is a mismatch, mark it with a red risk mark. The checksum and slot ID are sent downstream for subsequent security or audit processes.

[0046] Step 20334: After all writing and verification are completed, all slot sets with green verification codes are exposed to the script distribution module through the API in the form of a read-only key-value retrieval service; at the same time, the latest version number of the current index is released to ensure that consumers read the new index that has been verified and can be safely scheduled.

[0047] Through this step, the data output of each step is the input guarantee of the next step, forming a logical closed loop of write-in snapshot rollback mark release, which not only guarantees the write-in efficiency and rollback performance under high concurrency, but also realizes real-time traceability consistency and safety compliance verification.

[0048] Based on this, a high-availability Fibonacci hash index structure supporting real-time incremental writing, rapid conflict positioning and second-level rollback is constructed, meeting the subsequent enhanced game learning state retrieval and consistency verification requirements.

[0049] Step 3: Based on the Fibonacci hash index calling slot information, combined with the collected script, node and container information, a high-dimensional state vector is constructed, a gain function containing throughput, cost and risk dimensions is constructed, a first-hand script queuing agent and a second-hand resource arrangement agent are introduced, and the gain function is combined to iteratively train the strategy network of the two agents to obtain the trained double-agent strategy network. As shown in Figure 3 , specifically includes: Step 301, based on the Fibonacci hash index calling slot information, combined with the collected script, node and container information, a high-dimensional state vector is constructed; Taking the social security agency cloud environment as an example, the script queue is divided into logical sub-queues according to business lines, such as endowment, work injury, medical insurance, etc.

[0050] First, call the Fibonacci hash index to retrieve the script key at time, get the corresponding slot ; then collect the length of each sub-queue, the node CPU utilization , the node memory utilization , the container bandwidth occupation and parallel supplement, and finally construct a high-dimensional state vector: , Align the hash slot and resource load at the same time to ensure the ability of the strategy to synchronize the visibility of conflict positioning and resource bottlenecks.

[0051] Step 302, add a business peak identifier to the high-dimensional state vector, map the vCPU pricing to the risk coefficient, and construct a gain function containing throughput, cost and risk dimensions. Since the human resources business has the characteristics of tight computing power during peak hours (7:00-9:00 and 17:00-19:00) and resource redundancy during off-peak hours, a business peak identifier is added to the state vector, where the state vector refers to the high-dimensional state vector and business-related features. Pull the vCPU pricing of the cloud vendor in real time as , and map the risk coefficient according to the image consistency check code .

[0052] It should be noted that the image consistency check code here is the check mark of step 20333; after normalization and aggregation, an instant risk measure is obtained as the risk coefficient; Integrate three types of targets: throughput , cost , and risk , define a segmented three-dimensional gain : , where, is the hyperbolic risk preference parameter, is the consistency red line threshold, is the risk amplification coefficient, . are the weight coefficients of the three-dimensional target of throughput income, resource cost, and delay penalty, respectively; Amplify the throughput income during peak hours , and automatically lower the power consumption during off-peak hours , while imposing an exponential penalty on image risk, ensuring that the scheduling strategy always focuses on speed during business peaks, and saves costs and scheduling resources during off-peak hours, but still prioritizes risk control as the core demand.

[0053] Step 303, define the first-hand script queuing agent and the second-hand resource arrangement agent, and construct the strategy network of the corresponding agent; In this embodiment, the first-hand agent is defined by the script queuing manager (action : select the type of script to be preempted), and the second-hand agent is defined by the resource arranger (action : split the memory by percentage ), and the strategy networks of the two are parameterized as and .

[0054] In this embodiment, to avoid irrelevant coupling between strategy networks in different hash slots, only the local state of the current conflict slot (hash index h(k t ) and queue length q t ) is selected when constructing the input, and the remaining resource dimensions are only provided in the form of global normalized statistics. In this way, the network decision can be strictly focused on the current slot, avoiding cross-slot 'ghost dependence'. ​​

[0055] The initial weights are randomized using the Xavier distribution to ensure that the gradient propagates stably in the early stages of the network. Step 304: Combined with the gain function, the proximal policy optimization algorithm is used to iteratively train the two-agent policy network and achieve convergence through grayscale pooling online feedback to obtain the trained two-agent policy network. The specific steps include: Step 3041: Each round of game starts with the script queue triggering a preemption event, and includes the following steps: (1) Intelligent Agent in accordance with Sampling actions from the set of available actions , immediately locate the slot using the hash index ; (2) If the slots are determined to be consistent after the mirror digest comparison, the agent According to the current resource pressure and strategy Select Action ;If inconsistent, jump to fault action and record additional risks; (3) Push game log For subsequent gradient estimation, while accumulating global gain .

[0056] Step 3042: Each completed Step game, from the log Extraction batch Computing General Advantage And perform proximal policy gradient update to obtain the updated agent policy; , , , in, is the updated strategy parameter of agent A, is the updated strategy parameter of agent B, is the strategy parameter of agent A before updating (or current), To update the policy parameters of the former agent B, is the learning rate (stepsize) of agent A, which controls the parameter update amplitude, is the learning rate of agent B, is the importance sampling ratio of agent A, is the importance sampling ratio of agent B, is the PPO clipping threshold, constraint exist To prevent the policy from updating too much within the range, is the time discount, , is the critic's estimate of the value of the state , with network parameters , is the immediate reward obtained from the environment at time , is the range representing the accumulation of future step rewards; The above formula performs synchronous, stable and convergent gradient descent on the double-agent strategy under the joint action of throughput, cost and risk multi-objective weighted gain.

[0057] Step 3043, the updated agent policy is directly hot-loaded into the online scheduling engine, and the entire social security business traffic is randomly extracted into the gray pool; every minute, the throughput rate , CPU unit price , and mirror consistency alarm three indicators are merged into online feedback samples, represented as: , to ensure that the subsequent playback phase can simultaneously perceive real business benefits and gain function consistency.

[0058] Step 3044, construct the service level agreement constraints of double-agent A and B; The feedback sample , like , is written into the ring-shaped experience buffer. The ring-shaped experience buffer is used to store the latest batch of self-game samples, with a fixed capacity that overwrites the oldest data when full. The self-game log is fused with the timestamp to form a mixed batch, which is iteratively solved until the monitoring window is: , where, is the average online throughput (e.g., the number of requests completed per unit time) within the monitoring window, is the lower threshold of the throughput service level agreement (SLA), is the average resource consumption or cost (such as CPU core hour fee, memory fee, etc.) within the monitoring window, is the upper limit of resource consumption (cost) SLA, is the average delay (such as script execution delay / cold start duration) within the monitoring window, is the upper limit of delay SLA.

[0059] The final strategy parameter vector of the double-agent A and B obtained after the iteration of the current round of training and meeting the SLA constraints is converged, the current round is ended, and the final weight is output and the cumulative gain statistics .

[0060] Step 305, obtaining decision log data based on the trained double-agent strategy network; Step 4: continuously collecting, training and deploying the double-agent strategy network after preliminary training; Specifically, the following steps are included: Step 401: constructing a performance vector based on the obtained running index data, combining the strategy decision log data and the performance vector to build a complete sample required for reinforcement learning; In step 3, the current double-agent strategy is used to make scheduling / rollback decisions for scripts, and to promote real running; at the same time, the state , action , hash key of conflict and preliminary log (such as timestamp, version number) at each decision time are written into a ring buffer. At this time, the next state and the accurate reward (throughput, cost, delay, risk penalty, etc.) are not completed, and the backend monitoring indicators are not fused.

[0061] In this embodiment, according to the action log collected in step 3, the monitoring line (script delay , queue length , container cold start duration , and risk coefficient mapped by consistency check ) is aligned by timestamp, and the next state and immediate reward (calculated by a predefined gain function) of each record are completed, finally forming a standard RL sample four-tuple: ; wherein is a performance vector, is the action of the double-agent under . These samples are written into a ring experience pool , together with other batches generated by self-game, and are used to calculate advantage estimation , perform gradient descent, and update in synchronization under the constraint of meeting SLA (throughput, cost, delay upper limit) in subsequent step 3042PPO update and step 3044 multi-objective constraint solving.

[0062] Step 402: calculating the incremental return based on the actual gain and the predicted gain of the performance vector; For each time step, a three-dimensional gain function Real-time performance vector calculation actual score , and read the prediction score from the policy network cache . The difference between the two is the policy bias. Considering the different dimensions of the delay, queue, and cold start indicators, a weight matrix is introduced Perform normalization mapping to get the incremental return: , where are the delay, queue, and start threshold values, respectively is the discount factor is the estimated vector of three-dimensional gains inside the policy network The resulting incremental return is written to the online playback buffer to provide the target signal for the gradient update of the next sub-step.

[0063] Step 403: Update the proximal policy gradient based on the incremental report to get the updated new policy weight version The online optimizer starts the proximal policy gradient update every time it receives pieces of incremental return: throughput-cost branch weight Perform fast convergence with as the main gradient source, and risk branch weight is kept frozen to ensure mirror consistency and stable penalty. After the update is complete, output the new policy weight version and write it to the weight repository for gray traffic verification.

[0064] Step 404: Calculate the sliding average of script version conflicts Combine the conflict counter exposed by the hash index in step 2 Monitor the sliding average of script version conflicts with a window width of minutes. The sliding average is calculated in real-time using the following formula: , where is the indicator function is the Fibonacci hash slot mapping. When is greater than the conflict threshold , the system immediately enters a high-risk state and outputs the affected script set .

[0065] Step 405: When the consistency risk threshold is triggered, perform mirror hot repair or version rollback according to script priority until the risk is resolved Specifically, in the high-risk state, the scheduling engine traverses the set , call the image hot repair sequence to re-sign and re-pull the illegal image; if the repair phase returns a failure flag, the script version will be rolled back immediately, and the index pointer will be adjusted in reverse order through the Fibonacci step size to ensure that the rollback only affects local slots. After the process is completed, the system will issue a risk relief event and Reset to zero.

[0066] The risk resolution event is synchronously written to the online replay buffer, and the version number of the corresponding script entry and the image digest are updated immediately. Step 401 is restarted, and the data collection loop is restarted to keep the model in the latest environment and continue to iterate until the three business SLAs for throughput, cost, and consistency meet the set thresholds at the same time, ending this round.

[0067] Step 5: Based on the converged policy network, the future window concurrency curve is predicted and the required number of CPU cores and memory amount are deduced. The scaling results are generated in order of priority. The scaling results are t-checked and the compliance mark is written back to the Fibonacci hash index. Step 501: Combine the latest policy weight version and the real-time performance vector flow to obtain a predicted concurrency curve and write it into a load summary object; Read the latest policy weight version output in step 4 and real-time performance vector streaming , the coefficient matrix given by the item-by-item extraction strategy network in the script-computing power mapping layer The script arrival rate vector for the past ten minutes The convolution of the two is superimposed to obtain the predicted concurrency curve: , in, is the number of script types, A single performance vector Dimension Represents each feature at time The contribution intensity on →Determines the coefficient matrix of the network mapping layer , →Construct the rate vector As Input, then the curve Container cold start time vector Do two-dimensional stitching and write the load summary object .

[0068] Step 502: Based on the load profile object, the resource branch in the policy network is called to deduce the required number of CPU cores and memory, and a list of capacity expansion or reduction is generated in order of priority. In this embodiment, the scheduler Call the resource branch in the strategy network on the basis, and deduce the required CPU core number in the future window with second-level resolution With the memory amount If there is Make Or Exceed the upper limit of the current cluster ), the system constructs an expansion plan; if both are lower than the lower limit , a contraction plan is constructed.

[0069] The priority ranking of the expansion or contraction list can be specifically represented as: , Wherein, is the strategy weight matrix, Indicates the Hadamard product, is the peak concurrent vector, is the start threshold.

[0070] The maximum column index of the matrix corresponds to the most urgent plan item, and then the expansion and contraction list is output according to the priority .

[0071] Step 503: Perform bidirectional Digest check on the expansion and contraction result and write compliance label back to the Fibonacci hash index; The system sequentially reads And issue expansion or contraction instructions to the container pool orchestration API; when expanding, prefer to select the node pool with the smallest cold start time, and when contracting, prefer to select the executor with the lowest average load, to ensure that task migration does not trigger business interruption.

[0072] After orchestration, generate scheduling feedback logs , record the successful node set And the failed node set .

[0073] For each node in , read the image Digest and security label from the runtime, and perform bidirectional comparison with the reference value saved in the Fibonacci hash index in step 2; when the matching result is true, write the compliance label, otherwise write the risk label. All labels are summarized into compliance check results , and written back to the index service for real-time consistency tracking.

[0074] When Contains any risk label, immediately reset the corresponding conflict slot in the hash index, and then send a risk event To the S4 training pipeline. The training pipeline dynamically increases the consistency penalty weight, recalculates the gradient and pushes the correction completion signal , to ensure that the next round of expansion and contraction refers to the corrected safety status.

[0075] After completing all scheduling and corrections, collect the current cluster CPU usage , memory usage and the proportion of compliant nodes , encapsulated as a resource snapshot , and synchronized to the monitoring bus.

[0076] Will and The experience replay buffer is also written to provide the starting state for the next round of data collection in S4, thus forming a complete elastic scaling closed loop covering prediction, decision-making, execution, verification and callback.

[0077] Step 6: Serialize the node-script mapping relationship into a unified orchestration list that complies with the CloudEvents 1.0 specification and push it to the cloud control plane. Simultaneously generate a minimum checksum for use in the next cycle. Step 601: Read the resource snapshot generated in step 5 , compliance inspection results and risk event flow , perform one-to-one merging according to node ID to obtain the scheduling-risk record .

[0078] Then append the script identifier to each record and its conflict resolution status , compiled into the original set of arrangements .

[0079] Step 602: The scheduling engine arranges the original set Traverse the script in increments according to the script number; if the node status field indicates compliance, it is directly in the mapping table Write If a risk is detected, the index rollback or image hot repair action is triggered first and the mapping is written after the successful receipt. Finally, the node-script mapping table is obtained. , where the same script is never repeatedly assigned to a set of nodes that have historical conflicts.

[0080] Step 603: According to Write container image tags, environment variable sets, and execution windows for each node, append failure fallback actions and timeout thresholds, and then serialize all node entries into a single YAML file to form a unified orchestration list. The fields within the list comply with the CloudEvents 1.0 specification, ensuring that the cloud orchestration interface can parse and execute all instructions at once.

[0081] Step 604: Call the cloud control plane API to Push to the orchestration system and wait for the execution receipt synchronously; if all nodes return the Success flag, the effective timestamp is recorded ; If any node returns the Fail flag, immediately capture the failed node list And rewrite the risk event flow , and at the same time Feedback is sent to the strategy training channel to ensure safe and stable online operation.

[0082] Step 605: Unify the list Each row in , Version, Digest) recalculate the Fibonacci hash key And write into the dynamic hash table constructed in step S2, and update the index version number at the same time and check code An overwrite strategy is adopted for historical slots with the same key, ensuring that the next round of scheduling only requires one key query to complete the image consistency verification.

[0083] Step 606: Reduce redundant verification and generate a minimum checksum based on the difference between the new and old indexes: , in The current index key set.

[0084] Then put Synchronize to the monitoring bus and write the experience replay buffer, while updating the global coverage metrics: , like It is determined that this round of orchestration has achieved the low redundancy goal, step 6 ends and the environment status is submitted to step 1 to enter the next cycle.

[0085] Example 2 This embodiment provides an RPA dynamic scheduling system based on the Fibonacci sequence to optimize key-value mutual exclusion, including: A dynamically updateable scheduling graph construction module, which is used to construct a dynamically updateable scheduling graph based on the obtained RPA script description file; An index construction module is used to construct a Fibonacci hash index based on a dynamically updateable scheduling graph. It determines whether a slot is occupied. If the slot is occupied, if the conflicting record is a new version, the slot is retained and not moved. If the conflicting record is an old version, the slot is explored in sequence using the double-step increment of the Fibonacci sequence. The agent policy network training module is configured to call slot information based on the Fibonacci hash index, combine collected script, node and container information, construct a multi-objective gain function including throughput, cost and risk dimensions, introduce a first-move script queuing agent and a second-move resource arrangement agent, and iteratively train the two agent policy networks based on the multi-objective gain function to obtain the trained two agent policy networks. The dynamic scheduling module is configured to predict a future window concurrency curve and deduce required CPU core numbers and memory amounts based on the trained two agent policy networks, generate expansion and contraction results sorted by priority, and write compliance labels back to the Fibonacci hash index after verifying the expansion and contraction results.

[0086] It should be noted that the specific implementation of the RPA dynamic scheduling system based on the Fibonacci sequence to optimize key value mutual exclusion in the embodiment of the application is similar to the specific implementation of the RPA dynamic scheduling method based on the Fibonacci sequence to optimize key value mutual exclusion in the embodiment of the application. For details, please refer to the description in the method part. To reduce redundancy, this part will not be repeated here.

[0087] Embodiment three The embodiment provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the steps in the RPA dynamic scheduling method based on the Fibonacci sequence to optimize key value mutual exclusion.

[0088] Embodiment four The embodiment provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the RPA dynamic scheduling method based on the Fibonacci sequence to optimize key value mutual exclusion are realized.

[0089] Embodiment five The embodiment provides a program product, which is a computer program product, including a computer program. When the computer program is executed by a processor, the steps in the RPA dynamic scheduling method based on the Fibonacci sequence to optimize key value mutual exclusion are realized.

[0090] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer usable program code.

[0091] The embodiments of methods, apparatuses (systems) and computer program products according to the present application can be described in the general context of method steps and processes, which can be implemented in one embodiment by a program of instructions on a computer-readable storage medium executed by a computer or other programmable apparatus. The apparatuses can be specially constructed for executing the embodiments of methods, apparatuses (systems) and computer program products according to the present application or can include a computer or other programmable apparatus. Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow or block. Figure 1 The apparatus that carries out the functions specified in each flow or block or multiple flows or blocks.

[0092] The computer program instructions can also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow or flows and / or blocks. Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow or block. Figure 1 The apparatus that carries out the functions specified in each flow or block or multiple flows or blocks.

[0093] The computer program instructions can also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow or flows and / or blocks. Figure 1 The flow and / or block diagram in which each flow and / or block includes the functions specified in that flow or block. Figure 1 The apparatus that carries out the functions specified in each flow or block or multiple flows or blocks.

[0094] A person of ordinary skill in the art can understand that all or part of the above-mentioned method embodiments can be implemented by computer program instructions to instruct related hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the flow of each method embodiment described above. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), etc.

[0095] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An RPA dynamic scheduling method based on Fibonacci sequence optimization for key-value mutual exclusion, characterized by: include: Build a dynamically updateable scheduling graph based on the obtained RPA script description file; A Fibonacci hash index is constructed based on a dynamically updateable scheduling graph to determine whether a slot is occupied. If the slot is occupied, if the conflicting record is a new version, the slot is retained and not moved. If the conflicting record is an old version, the slot is explored sequentially using the double-step increment of the Fibonacci sequence. Based on the Fibonacci hash index calling slot information and the collected script, node, and container information, a multi-objective gain function is constructed that includes throughput, cost, and risk dimensions. A preemptive script enqueue agent and a postemptive resource orchestration agent are introduced. Combined with the multi-objective gain function, the two-agent policy network is iteratively trained to obtain the trained two-agent policy network. Based on the trained two-agent policy network, the future window concurrency curve is predicted and the required number of CPU cores and memory amount are deduced, and the scaling results sorted by priority are generated. After verifying the scaling results, the compliance mark is written back to the Fibonacci hash index.

2. The RPA dynamic scheduling method based on Fibonacci sequence optimization key-value mutual exclusion as claimed in claim 1 is characterized in that: The dynamically updateable scheduling graph is constructed based on the obtained RPA script description file, including: Synchronously add the corresponding container image tag, Serverless runtime version, and key fingerprint to the obtained RPA script description file. After verification, write it into the script-resource metadata table. Traverse the script-resource metadata table, generate a unique virtual node for each record, map the node to an entity, query the entity's performance indicators after mapping, and combine the entity's performance indicators and node identifiers to form a node resource list; Read the node resource list, generate directed edges based on script calls, data transmission, and version reference relationships, and write attributes to each edge; Write attributes on each edge, calculate the comprehensive score of each edge based on the written attributes, and combine the weight vector of each attribute to obtain a weighted scheduling graph; Event listeners are deployed on the weighted scheduling graph. When a running event flow is detected, local incremental updates are performed on the affected edge sets to obtain a dynamically updateable scheduling graph.

3. The RPA dynamic scheduling method based on Fibonacci sequence optimization key-value mutual exclusion as claimed in claim 1 is characterized in that: The constructing of a Fibonacci hash index based on a dynamically updateable scheduling graph includes: Generate key-value pairs based on a dynamically updateable scheduling graph; Calculate the initial slot capacity based on the script increase and pre-segment the initial slot capacity; The Fibonacci hash index is constructed by combining the key-value pairs and the initial slot capacity pre-segmentation results with the Fibonacci hash function.

4. The RPA dynamic scheduling method based on Fibonacci sequence optimization key-value mutual exclusion as claimed in claim 1 is characterized in that: The Fibonacci hash index is represented as: , in, Indicates the current slot capacity of the dynamic hash table, is the target slot index, The inverse of the golden ratio. Represents a unique key in a key-value stream.

5. The RPA dynamic scheduling method based on Fibonacci sequence optimization key-value mutual exclusion as claimed in claim 1 is characterized in that: The multi-objective gain function is: , in, is the gain function at time t, 、 and are the weight coefficients of the three-dimensional objectives of throughput benefit, resource cost, and delay penalty, for, is the resource cost index at time t, is the delay index at time t, is the consistency risk red line threshold, is the risk magnification factor, which is used to Perform exponential punishment, is the consistency risk coefficient at time t.

6. The RPA dynamic scheduling method based on Fibonacci sequence optimization key-value mutual exclusion as claimed in claim 1 is characterized in that: The method introduces the first-hand script enqueue agent and the second-hand resource orchestration agent, combines the multi-objective gain function, and iteratively trains the two-agent strategy network to obtain the trained two-agent strategy network, including: Define the first script to join the team agent and the subsequent resource orchestration agent , build the corresponding agent's strategy network and ; Combined with the gain function, the proximal policy optimization algorithm is used to iteratively train the two-agent policy network, specifically including: Each round of the game starts with the script queue triggering a preemption event, which will be obtained Push game log ,in, is a high-dimensional state vector: , Fibonacci hash index in Always retrieve script keys , is the length of each sub-queue, is the node CPU utilization, is the node memory utilization, For container Bandwidth usage, For intelligent agents action, For intelligent agents action, For gain; Each completed Step game, from the log Extraction batch Computing General Advantage And perform proximal policy gradient update to obtain the updated agent policy; The updated agent strategy is scheduled online to obtain feedback samples. Based on the feedback samples and the service level agreement constraints of the dual agents A and B, the weight of the final strategy network is obtained. and cumulative gain.

7. The RPA dynamic scheduling method based on Fibonacci sequence optimization key-value mutual exclusion as claimed in claim 1 is characterized in that: The method further includes serializing the node-script mapping relationship into a unified orchestration list that complies with a set specification, and synchronously generating a minimum checksum for use in the next cycle.

8. An RPA dynamic scheduling system based on Fibonacci sequence optimization key-value mutual exclusion is characterized by: include: A dynamically updateable scheduling graph construction module, which is used to construct a dynamically updateable scheduling graph based on the obtained RPA script description file; An index construction module is used to construct a Fibonacci hash index based on a dynamically updateable scheduling graph. It determines whether a slot is occupied. If the slot is occupied, if the conflicting record is a new version, the slot is retained and not moved. If the conflicting record is an old version, the slot is explored in sequence using the double-step increment of the Fibonacci sequence. The agent policy network training module is used to call slot information based on the Fibonacci hash index. It combines the collected script, node, and container information to construct a multi-objective gain function that includes throughput, cost, and risk dimensions. It introduces a preemptive script enqueue agent and a postemptive resource orchestration agent. Combined with the multi-objective gain function, the two-agent policy network is iteratively trained to obtain the trained two-agent policy network. A dynamic scheduling module is used to predict the future window concurrency curve and deduce the required number of CPU cores and memory based on the trained two-agent strategy network, generate scaling results sorted by priority, verify the scaling results, and write the compliance mark back to the Fibonacci hash index.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the RPA dynamic scheduling method based on optimizing key-value mutual exclusion based on the Fibonacci sequence are implemented as described in any one of claims 1 to 7.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the RPA dynamic scheduling method based on optimizing key-value mutual exclusion based on the Fibonacci sequence are implemented as described in any one of claims 1 to 7.