A scheduling policy switching method and device, a storage medium and an electronic device
Patent Information
- Application Number
- CN202611103983.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-16
AI Technical Summary
[0003]然而,离线仿真无法真实复现BGP(Border Gateway Protocol,边界网关协议)抖动、流量潮汐等复杂工况,验证结果与线上环境偏差较大
[0022]By employing the above technical solutions, this invention provides a scheduling strategy switching method, apparatus, storage medium, and electronic device. Through the construction of a digital twin sandbox isolated from the main scheduling engine's memory, the target scheduling strategy is based solely on pure logical deduction using shadow descriptors, without executing any real network operations. Therefore, defects in the new strategy are strictly isolated from real business operations, achieving zero-risk full-scale verification of the scheduling strategy. By extracting real user request metadata to generate lightweight shadow descriptors, replacing complete packet copying, data transfer overhead is significantly reduced. When the confidence score meets the preset hot-swap trigger condition, the scheduling strategy switching operation is executed without restarting the process and without interrupting existing long-term connections, achieving seamless hot-swap for business operations. Simultaneously, the confidence score quantified based on the actual scheduling results and predicted scheduling results forms an automated evaluation and switching closed loop, significantly shortening the strategy iteration cycle and reducing operational costs.
Smart Images

Figure CN122933557A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital information transmission technology, and in particular to a scheduling strategy switching method, apparatus, storage medium, and electronic device. Background Technology
[0002] The verification and iteration of existing CDN (Content Delivery Network) scheduling strategies mainly adopt offline simulation or small-volume A / B (A / B Testing) canary releases.
[0003] However, offline simulations cannot realistically reproduce complex operating conditions such as BGP (Border Gateway Protocol) jitter and traffic fluctuations, resulting in significant discrepancies between verification results and the online environment. Canary releases require segmenting real user traffic, and flaws in new policies can directly lead to increased latency, playback stuttering, and uncontrollable business risks. Policy updates often involve process restarts or configuration reloads, which can easily cause massive long-term connection interruptions at edge nodes, severely impacting highly continuous services such as live streaming. Furthermore, the industry generally lacks standardized quantitative evaluation models; policy effectiveness relies on human experience, lacking automated evaluation, decision-making, and rollback loops, resulting in long iteration cycles and high operational costs.
[0004] How to achieve full verification and seamless hot switching of CDN scheduling strategies has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of the above problems, the present invention provides a scheduling strategy switching method, apparatus, storage medium, and electronic device to overcome the above problems or at least partially solve the above problems. The technical solution is as follows:
[0006] A method for switching scheduling strategies, comprising:
[0007] In the edge nodes of the content delivery network, a digital twin sandbox is constructed that is isolated from the memory of the main scheduling engine, and the target scheduling strategy to be verified is loaded into the digital twin sandbox.
[0008] Extract the metadata of the real user requests processed by the main scheduling engine, generate shadow descriptors, and input the shadow descriptors into the digital twin sandbox;
[0009] The main scheduling engine is used to output the actual scheduling results based on historical scheduling strategies.
[0010] The digital twin sandbox is used to output a predicted scheduling result based on the target scheduling strategy and the shadow descriptor;
[0011] By using the actual scheduling results and the predicted scheduling results, the confidence score of the target scheduling strategy within a preset time window is obtained;
[0012] Based on the confidence score, if the preset hot-swap triggering conditions are met, a scheduling strategy switching operation is performed to switch subsequent user requests to the target scheduling strategy for processing.
[0013] A scheduling strategy switching device includes: a sandbox construction unit, a shadow descriptor generation unit, an actual scheduling result output unit, a predicted scheduling result output unit, a confidence score acquisition unit, and a switching execution unit;
[0014] The sandbox construction unit is used to construct a digital twin sandbox isolated from the main scheduling engine memory in the edge node of the content delivery network, and to load the target scheduling strategy to be verified in the digital twin sandbox.
[0015] The shadow descriptor generation unit is used to extract metadata of the real user requests processed by the main scheduling engine, generate shadow descriptors, and input the shadow descriptors into the digital twin sandbox.
[0016] The actual scheduling result output unit is used to output the actual scheduling result based on the historical scheduling strategy using the main scheduling engine;
[0017] The predictive scheduling result output unit is used to output the predictive scheduling result based on the target scheduling strategy and the shadow descriptor using the digital twin sandbox;
[0018] The confidence score acquisition unit is used to obtain the confidence score of the target scheduling strategy within a preset time window by using the actual scheduling result and the predicted scheduling result.
[0019] The switching execution unit is used to perform a scheduling strategy switching operation based on the confidence score and when the preset hot switching triggering conditions are met, so as to switch subsequent user requests to the target scheduling strategy for processing.
[0020] A computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the scheduling policy switching method.
[0021] An electronic device includes at least one processor, at least one memory connected to the processor, and a bus; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the scheduling strategy switching method.
[0022] By employing the above technical solutions, this invention provides a scheduling strategy switching method, apparatus, storage medium, and electronic device. Through the construction of a digital twin sandbox isolated from the main scheduling engine's memory, the target scheduling strategy is based solely on pure logical deduction using shadow descriptors, without executing any real network operations. Therefore, defects in the new strategy are strictly isolated from real business operations, achieving zero-risk full-scale verification of the scheduling strategy. By extracting real user request metadata to generate lightweight shadow descriptors, replacing complete packet copying, data transfer overhead is significantly reduced. When the confidence score meets the preset hot-swap trigger condition, the scheduling strategy switching operation is executed without restarting the process and without interrupting existing long-term connections, achieving seamless hot-swap for business operations. Simultaneously, the confidence score quantified based on the actual scheduling results and predicted scheduling results forms an automated evaluation and switching closed loop, significantly shortening the strategy iteration cycle and reducing operational costs.
[0023] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0024] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0025] Figure 1 A flowchart illustrating one embodiment of the scheduling strategy switching method provided by this invention is shown.
[0026] Figure 2 This figure shows a logic block diagram of a scheduling strategy switching system provided by an embodiment of the present invention;
[0027] Figure 3 A timing diagram of shadow descriptor generation and transmission provided in an embodiment of the present invention is shown;
[0028] Figure 4 The diagram illustrates the logic block diagram for scheduling strategy switching determination provided in an embodiment of the present invention. Detailed Implementation
[0029] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0030] like Figure 1 The diagram shows a flowchart of one embodiment of the scheduling strategy switching method provided by this invention. The method may include:
[0031] S100. In the edge nodes of the content delivery network, construct a digital twin sandbox that is isolated from the main scheduling engine's memory, and load the target scheduling strategy to be verified within the digital twin sandbox.
[0032] Content delivery network (CDN) refers to a distributed network system consisting of multiple nodes deployed at the edge of the Internet, used to schedule user requests to the optimal node in order to reduce access latency and improve content distribution efficiency.
[0033] Edge nodes refer to server or virtual machine instances in a content delivery network that are close to users, and are used to process end-user requests, cache content, and make scheduling decisions.
[0034] The main scheduling engine refers to the core processing component in the edge nodes that actually handles real user requests, executes scheduling decisions, and establishes network connections, running the currently effective historical scheduling policies.
[0035] The digital twin sandbox refers to a runtime environment within an edge node that is isolated from the main scheduling engine in memory. It is used to load and test target scheduling strategies to be verified and has the capabilities of fault isolation, resource limitation, and permission isolation.
[0036] The target scheduling strategy refers to the new version of the scheduling logic to be verified, which includes rules such as node selection and path calculation. It is preloaded into the digital twin sandbox for simulation and verification. Once the verification is successful, the historical scheduling strategy will be replaced.
[0037] Specifically, this embodiment of the invention can construct a runtime environment that is system-isolated from the main scheduling engine by allocating independent memory space and central processing unit (CPU) computing resources within a lightweight virtual machine (Linux Container, LXC) within the edge node of the content delivery network. Deploying the WebAssembly runtime within this LXC instance utilizes the linear memory boundaries of the WebAssembly to achieve instruction-level isolation, forming a dual-isolated digital twin sandbox. The sandbox achieves fault isolation and resource limitation through a three-layer fault containment mechanism: a linear memory hard cap, CPU time circuit breaking, and instance pool rotation. The target scheduling policy to be verified is preloaded into the WebAssembly runtime after baseline verification, compilation, and security testing using the Secure Hash Algorithm 256 (SHA-256). In the initial state of the sandbox, the entry pointer of this policy is null and it does not participate in actual business processing.
[0038] Optionally, in the above Figure 1Based on one or more corresponding embodiments, in another optional embodiment provided by this invention, this invention can be deployed in a scheduling gateway (ESG) within a CDN edge caching node. This scheduling gateway adopts a three-level decoupled architecture: data plane, control plane, and sandbox plane. The data plane is implemented by the main scheduling engine, building a network input / output subsystem based on the Data Plane Development Kit (DPDK), written in C++, and capable of processing no less than 500,000 HTTP header parsings per second on a single core, handling all real client requests. The control plane is responsible for the lifecycle management of scheduling policies, including SHA-256 baseline verification of web assembly bytecode, resource quota allocation, and hot-switching decisions, employing a distributed architecture to achieve multi-node collaborative management. The sandbox plane is implemented based on the web assembly runtime, using a subset of the WebAssemblySystem Interface (WASI) and disabling all file and network permissions, exposing only a whitelisted application programming interface (API) encapsulated on the host side. The digital twin sandbox instances in the sandbox plane are managed using an object pool, maintaining N+2 pre-warmed instances, where N is the current number of running sandbox instances, ranging from 1 to 8, dynamically adjusted based on the edge node's computing power to ensure that the switching response time in the event of a sandbox failure does not exceed 1 millisecond. The sandbox achieves isolation through the following three-layer fault containment mechanism: each instance is pre-allocated 32 megabytes of linear memory, with the host intercepting memory growth operations; exceeding this limit triggers a memory error; the timeout threshold for a single shadow computation is set to 50 milliseconds, and the main thread forcibly terminates timeout instances via a runtime interrupt API; faulty instances are placed in a frozen queue for asynchronous destruction, while a new instance is retrieved from the pre-warmed pool to replace them, preventing the fault from spreading to the main business plane. When the scheduling gateway process starts, it loads historical scheduling policies as a baseline and pre-compiles the web page assembly of the target scheduling policy, but the target policy entry pointer is initialized to null. The system initially operates in "shadow mode," ensuring that the target policy does not participate in real scheduling until it has been verified as valid.
[0039] S110. Extract the metadata of the real user requests processed by the main scheduling engine, generate shadow descriptors, and input the shadow descriptors into the digital twin sandbox.
[0040] Among them, real user requests refer to actual access requests initiated by end users to the content delivery network, which may include metadata such as client IP and target resource identifier, and are used to drive the shadow simulation of new strategies in the sandbox.
[0041] Metadata refers to key information fields extracted from real user requests, which may include client IP hash value, target resource identifier, network layer protocol type, and current node load status, etc.
[0042] The shadow descriptor refers to a lightweight data structure encapsulated from the extracted metadata. It is typically no larger than 256 bytes and is used to asynchronously pass the data to the digital twin sandbox as input for new strategies, which is different from a complete message copy.
[0043] Specifically, in this embodiment of the invention, when the main scheduling engine processes real user requests, it can map the kernel socket buffer to the user-space address space in a read-only, private mapping manner via the memory mapping (mmap) system call. A finite state machine (FSM) resolver is used to extract metadata such as the client's Internet Protocol (IP) hash value, target resource identifier, network layer protocol type, and current node load status from the mapped buffer. The extracted metadata is encapsulated into a shadow descriptor with a total size not exceeding 256 bytes. Using a lock-free circular buffer based on atomic type head and tail pointers (Single Producer Single Consumer, SPSC), and employing sequential memory release to acquire semantics, the shadow descriptor is asynchronously passed to the digital twin sandbox. If the sandbox crashes or times out, the main scheduling engine discards the current shadow task and triggers a preheating instance switch, retrieving a new instance from the instance pool to replace the failed instance.
[0044] S120. Utilize the main scheduling engine to output the actual scheduling results based on historical scheduling strategies.
[0045] Among them, the historical scheduling strategy refers to the old scheduling strategy that is currently running in the production environment. It is executed by the main scheduling engine to process real user requests and output the actual scheduling results.
[0046] The actual scheduling result refers to the real scheduling decision output by the main scheduling engine based on historical scheduling strategies. It includes information such as target node identifier and predicted round-trip time, and is used to establish real network connections.
[0047] Specifically, in this embodiment of the invention, after receiving a real user request, the main scheduling engine executes scheduling logic such as node selection and path calculation based on the historical scheduling strategy currently running in the production environment, and outputs an actual scheduling result including the target node identifier, protocol type, and predicted round-trip time (RTT). Simultaneously, based on this actual scheduling result, the main scheduling engine directly establishes a real transmission control protocol or transport layer security protocol connection, forwarding the user request to the selected target node, ensuring the normal operation of real services.
[0048] S130. Utilize the digital twin sandbox to output the predicted scheduling results based on the target scheduling strategy and shadow descriptor.
[0049] Among them, the predicted scheduling result refers to the inference result output by the digital twin sandbox based on the target scheduling strategy and shadow descriptor, which includes the predicted target node identifier and the predicted round-trip time.
[0050] Specifically, embodiments of the present invention can utilize a digital twin sandbox to consume shadow descriptors from a lock-free circular buffer. Based on an internally pre-loaded target scheduling strategy, it performs pure logical deduction on the request metadata in the shadow descriptors, outputting a predictive scheduling result containing the predicted target node identifier and the predicted round-trip time. All network input / output operations are strictly disabled within the sandbox; only a whitelisted application programming interface (API) encapsulated on the host side can be used to query the node's round-trip time, load, and cache status, ensuring that the deduction process does not interfere with real business operations.
[0051] S140. Using the actual scheduling results and the predicted scheduling results, obtain the confidence score of the target scheduling strategy within the preset time window.
[0052] The actual scheduling results and the predicted scheduling results record the historical scheduling strategy decision information and the target scheduling strategy deduction information corresponding to the same real user request, respectively. These include the request identifier, the node ID for selecting the new and old strategies, the predicted round-trip time, and the decision flag (e.g., consistency / conflict / sandbox timeout / failure).
[0053] Specifically, in this embodiment of the invention, the actual scheduling result and the predicted scheduling result corresponding to the same real user request can be written into the comparison buffer for alignment. The request identifier, the node identifier of the historical strategy selection, the node identifier of the target strategy selection, the predicted round-trip time, and the decision flag are recorded. The decision flag is used to identify whether the results of the old and new strategies are consistent, whether the sandbox has timed out, or whether a failure has occurred, forming a structured record for subsequent evaluation.
[0054] The preset time window refers to a fixed time interval used for statistical analysis and evaluation of confidence scores. Within this window, multiple sets of actual scheduling results and predicted scheduling results are accumulated and comprehensively calculated.
[0055] The confidence score refers to the quantitative score calculated based on multiple sets of actual scheduling results and predicted scheduling results within a preset time window, which comprehensively reflects the performance of the target scheduling strategy in terms of latency, cache hit rate, bandwidth cost and scheduling stability.
[0056] Specifically, embodiments of the present invention can accumulate multiple sets of actual scheduling results and predicted scheduling results within a preset time window, and calculate the latency reduction value, cache hit rate prediction increment, and bandwidth cost saving factor for each set of results. The percentage of times the same request is scheduled to different nodes by the target strategy within this time window is statistically analyzed, and an oscillation penalty coefficient is obtained. The latency reduction value, cache hit rate prediction increment, and bandwidth cost saving factor are multiplied by their respective business weights, summed, and then the product of the oscillation penalty coefficient and the scheduling jump frequency is subtracted to obtain the confidence score of the target scheduling strategy within the preset time window. The score is mapped to the range of 0 to 100.
[0057] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, the present invention can maintain a round-trip latency benchmark library in memory. The data sources include active TCP SYN probes every 5 seconds and the TCP_INFO RTT field passively collected from real back-to-origin connections in the main plane. Exponentially weighted moving average (EWMA) smoothing is used, with a smoothing coefficient α of 0.3. Simultaneously, the bandwidth cost matrix of each upstream node is maintained, recording the unit traffic transmission cost between different nodes. Cost factors include cross-network settlement cost (BGP settlement fees generated by cross-carrier back-to-origin connections), long-distance link cost (the difference in bandwidth unit price between cross-provincial or cross-border central nodes and edge nodes within the same province), and peak penalty coefficient (some upstream nodes are charged at the 95th percentile during evening peak hours; a time-weighted factor is introduced into the cost model). The confidence score is specifically calculated using a sliding window comprehensive score. The statistical sample consists of the most recent 1 million conflicting requests. Invalid requests that have timed out or failed in the sandbox are removed. The instantaneous scores of the valid requests are weighted and averaged. The weight of recent requests is 0.7 and the weight of long-term requests is 0.3, so as to achieve a comprehensive assessment of instantaneous performance and long-term stability.
[0058] S150. Based on the confidence score, if the preset hot-swap triggering conditions are met, execute the scheduling strategy switching operation to switch subsequent user requests to the target scheduling strategy for processing.
[0059] Among them, the preset hot switching trigger conditions refer to a set of conditions that must be met simultaneously to trigger the switching of the main scheduling engine from the historical scheduling policy to the target scheduling policy. These conditions may include a confidence score that meets the standard, sufficient sandbox runtime, sufficient processing request volume, scheduling jump frequency that is lower than the threshold, and no sandbox failure.
[0060] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, performing a scheduling strategy switching operation may specifically include:
[0061] The global scheduling function pointer of the main scheduling engine is modified from pointing to the function address of the historical scheduling policy to pointing to the function address of the target scheduling policy through atomic operations, and the connection tracking table maintained by the historical scheduling policy in the main scheduling engine is inherited.
[0062] The global scheduling function pointer refers to the function pointer in the main scheduling engine that points to the execution entry point of the currently effective scheduling policy. By modifying its pointer address through atomic operations, a seamless hot switching of policies can be achieved.
[0063] Here, the function address refers to the starting location in memory of the executable code corresponding to the scheduling policy. The global scheduling function pointer determines which scheduling logic the main scheduling engine executes by pointing to different function addresses.
[0064] The connection tracking table refers to the data structure maintained by the main scheduling engine to record the state of all established TCP (Transmission Control Protocol) or UDP (User Datagram Protocol) long connections. It includes information such as socket quadruples, TCP state machines, TLS (Transport Layer Security) session context, and HTTP / 2 (Hypertext Transfer Protocol / 2) stream identifier mappings. During hot switching, it is inherited by the new strategy to ensure that the connection is not interrupted.
[0065] Specifically, in this embodiment of the invention, a hot-swap trigger condition is determined to be met when the confidence score is not lower than a preset security threshold for multiple consecutive statistical periods, the sandbox runs for a preset duration, the total number of shadow descriptors processed reaches a preset sample size, the scheduling jump frequency is lower than a preset threshold, and the sandbox is fault-free. At this point, the global scheduling function pointer of the main scheduling engine is declared as an atomic type, and the pointer is modified from pointing to the function address of the historical scheduling policy to pointing to the function address of the target scheduling policy within a single CPU instruction cycle using an atomic storage instruction. Simultaneously, the TCP connection tracking table maintained by the historical scheduling policy is provided to the target scheduling policy as a read-only structure. This connection tracking table includes socket quadruples, TCP state machines, TLS session contexts, and HTTP / 2 stream identifier mappings. Subsequent user requests are processed by the target scheduling policy, and existing long connections are either directly reused or gracefully closed and rebuilt based on the decision result of the new policy.
[0066] Optionally, in the above Figure 1Based on one or more corresponding embodiments, in another optional embodiment provided by this invention, the preset hot-switch triggering condition further includes a forced threshold mechanism. Specifically, the observation threshold is set to 80 points, the safety threshold to 95 points, and the forced threshold to 99 points. When the confidence score reaches the observation threshold but is lower than the safety threshold, the evaluation frequency is increased to once per second, the control plane pre-allocates the memory required for the switch, and enters the switch preparation state; if the observation threshold is not reached for 20 minutes, or the confidence score continues to drop below 60 points, the current shadow verification process is immediately terminated, and the target scheduling policy is marked as "verification failed". When the confidence score is not lower than the safety threshold for three consecutive cycles, and the sandbox has been running continuously for 1 hour, the total number of shadow descriptors processed has reached 20 million, the scheduling jump frequency is less than 0.01%, and the sandbox is fault-free, a pre-switch can be triggered. For specific high-value scenarios (such as live streaming of major events), reaching a mandatory threshold can bypass the observation period, but requires manual token issuance (e.g., submitting a token application through the operations and maintenance management platform, which automatically takes effect after approval by two operations and maintenance managers), or entering a 30-second mandatory observation mode. If no anomalies are found during the observation period, a hot switch is performed; if an anomaly is found, the switch is immediately terminated and rolled back to the historical scheduling strategy. Before performing an atomic hot switch, the control plane marks the target scheduling strategy as frozen, locking its web page assembly bytecode to prevent the strategy from being modified during the switch. During atomic pointer replacement, the entry function pointer of the main scheduling engine is declared as atomic, and the replacement is completed within a single instruction cycle through atomic storage instructions, with a switch time of no more than 1 microsecond. After the switch is completed, the main engine tracks the residual requests of the old strategy through an atomic reference counter. After the counter reaches zero, the control plane unloads the old strategy instance, releases its just-in-time compilation cache and linear memory, and records the switch event log (including version number, final confidence score, and number of active connections during the switch).
[0067] This invention provides a scheduling strategy switching method that constructs a digital twin sandbox isolated from the main scheduling engine's memory. The target scheduling strategy is based solely on shadow descriptors for pure logical deduction, without performing any real network operations. Therefore, the defects of the new strategy are strictly isolated from real business operations, achieving zero-risk full-scale verification of the scheduling strategy. By extracting real user request metadata to generate lightweight shadow descriptors, replacing complete packet copying, data transfer overhead is significantly reduced. When the confidence score meets the preset hot-swap trigger condition, the scheduling strategy switching operation is executed without restarting the process and without interrupting existing long-term connections, achieving seamless hot-swap for business operations. Simultaneously, the confidence score quantified based on the actual scheduling results and predicted scheduling results forms an automated evaluation and switching closed loop, significantly shortening the strategy iteration cycle and reducing operational costs.
[0068] Optionally, in the above Figure 1Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, step S100 may specifically include:
[0069] Lightweight virtual machine instances are created within the edge nodes of the content delivery network to isolate the system resources of the digital twin sandbox and the main scheduling engine.
[0070] Lightweight virtual machine instances refer to virtualized runtime environments created based on containerization technologies (such as LXC). Compared to traditional virtual machines, they have lower resource overhead and faster startup speeds, and are used to achieve system-level resource isolation between the sandbox and the main scheduling engine within edge nodes.
[0071] System resources refer to the computing resources in edge nodes, including central processing unit (CPU) computing power, memory space, network ports and file system access permissions, etc. Isolating these resources can prevent interference between different operating environments.
[0072] Specifically, in this embodiment of the invention, a lightweight virtual machine instance can be created within the edge node of the content delivery network using LXC. This instance is then allocated a separate memory space and central processing unit computing resources, allowing it to run in a different system resource domain from the main scheduling engine. This achieves system-level resource isolation between the digital twin sandbox and the main scheduling engine.
[0073] Deploy a web page assembly runtime environment within a lightweight virtual machine instance, leveraging the linear memory boundaries of web page assembly to isolate instruction execution for the target scheduling strategy.
[0074] The WebAssembly runtime environment refers to the execution container for WebAssembly code, which is used to load, compile and execute WebAssembly bytecode, and provides runtime support such as memory management, instruction scheduling and external function calls.
[0075] Web page assembly refers to a type of assembly language that uses binary format encoding, can be executed efficiently in a sandbox environment, and achieves instruction-level security isolation through linear memory and a type system.
[0076] The linear memory boundary refers to the contiguous virtual address space allocated to each instance during web page assembly runtime. This memory space is linear (i.e., continuously addressed starting from address 0). All memory access within the instance is limited to this boundary range and cannot access the memory of the host or other instances outside the boundary.
[0077] Specifically, in this embodiment of the invention, a web page assembly runtime environment can be deployed inside an already created LXC lightweight virtual machine instance. The target scheduling policy to be verified is compiled into web page assembly bytecode and loaded into the runtime. By utilizing the linear memory boundary mechanism provided by the web page assembly runtime, the execution of the target scheduling policy's instructions is restricted to an independent linear memory space, prohibiting it from accessing the memory of the host or other instances, thereby achieving instruction-level isolation from the instruction execution environment of the main scheduling engine.
[0078] By allocating linear memory to the target scheduling strategy through a web page assembly runtime environment, setting a hard upper limit for linear memory, and configuring the CPU time circuit breaker threshold for a single shadow computation, a digital twin sandbox isolated from the main scheduling engine's memory is obtained.
[0079] Linear memory refers to a contiguous readable and writable memory region exclusively owned by a web page assembly instance. It is used to store data during program execution (such as global variables, stack, and dynamically allocated objects). Its size can be dynamically increased by instructions but is subject to a hard upper limit.
[0080] The hard cap refers to the maximum number of bytes that linear memory can grow. It is set by the host when the instance is created and will forcibly block memory growth requests that exceed the limit. Memory allocation operations that exceed this limit will be rejected and trigger an exception.
[0081] Shadow computing refers to the logical deduction process of executing target scheduling strategies based on shadow descriptors (metadata extracted from real requests) within a digital twin sandbox. This process only outputs prediction results and does not generate any real network input / output operations.
[0082] The CPU time circuit breaker threshold refers to the upper limit of CPU execution time set for a single shadow computation. When the running time of a shadow computation exceeds this threshold, the runtime environment will forcibly terminate the computation to prevent abnormal or malicious strategies from consuming too much processor resources.
[0083] Specifically, in this embodiment of the invention, a block of linear memory can be allocated to the target scheduling policy through the web page assembly runtime, and a hard upper limit (e.g., 32 megabytes) can be set for this linear memory. The runtime can intercept memory growth instructions to prevent out-of-bounds allocation. At the same time, a central processing unit time circuit breaker threshold (e.g., 50 milliseconds) is configured for a single shadow computation. When the execution time of the shadow computation exceeds this threshold, the runtime will forcibly terminate the computation, thereby obtaining a digital twin sandbox that is memory isolated from the main scheduling engine and has fault containment capabilities.
[0084] This invention isolates system resources and web page assembly runtime instructions by using lightweight virtual machine instances, and sets a linear memory hard limit and a central processing unit time circuit breaker threshold to construct a digital twin sandbox that is isolated from the main scheduling engine. This strictly restricts the execution of the target scheduling policy to the isolated environment, ensuring that policy anomalies will not interfere with real business, and provides a secure isolation foundation for subsequent zero-risk verification and seamless hot switching.
[0085] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, step S110 may specifically include:
[0086] By using a zero-copy memory approach, the kernel socket buffer where the real user requests processed by the main scheduling engine reside is mapped to the user-space address space.
[0087] Zero-copy memory refers to a data transfer technique that avoids unnecessary copying of data in memory. In this embodiment of the invention, the kernel socket buffer is directly mapped to the user-space address space via the mmap system call, allowing the main scheduling engine to read request metadata without copying data from kernel space to user space, thereby reducing the number of data transfers and CPU overhead.
[0088] The kernel socket buffer refers to a temporary memory area allocated by the operating system kernel for each network socket, used to temporarily store data packets received from the network interface or data to be sent. In this embodiment of the invention, the original message data of a real user request is first stored in this buffer before entering the main scheduling engine for processing.
[0089] In this context, the user-mode address space refers to the range of virtual memory addresses accessible to applications (such as the main scheduling engine process), and it is isolated from the kernel-mode address space. Ordinary programs can only access the user-mode address space and cannot directly manipulate kernel memory. This embodiment of the invention maps kernel socket buffers to the user-mode address space through memory mapping, enabling the main scheduling engine to safely read requested data in user mode.
[0090] Specifically, in this embodiment of the invention, when the main scheduling engine is processing real user requests, it can use the mmap system call to map the kernel socket buffer to the user space in a read-only, private mapping manner, so that the main scheduling engine can directly access the request packet without copying the data, thereby achieving zero-copy data extraction from memory.
[0091] Extract metadata from the mapped kernel socket buffer.
[0092] Specifically, in the embodiments of the present invention, the message content can be read sequentially according to predefined state transition rules in the mapped user-space address space, and metadata fields such as client IP hash value, target resource identifier, network layer protocol type and current node load status can be extracted in turn.
[0093] As examples, embodiments of the present invention can run on the mapped kernel socket buffer using a finite state machine parser to sequentially extract metadata such as the client IP hash value, target resource identifier, network layer protocol type, and current node load status feature vectors according to predefined parsing states (such as waiting for client IP, waiting for target resource identifier, etc.). The finite state machine parser refers to a protocol parsing component based on a finite state machine model, used to extract metadata from network packets or data streams field by field according to state transition rules.
[0094] Encapsulate metadata as shadow descriptors.
[0095] Specifically, in this embodiment of the invention, the main scheduling engine can be used to encapsulate the extracted metadata fields into a lightweight shadow descriptor with a total size of no more than 256 bytes. This descriptor contains key feature vectors required for subsequent scheduling deduction, which is different from the complete message copy to reduce data transfer overhead.
[0096] Push the shadow descriptor into the lock-free circular buffer so that the digital twin sandbox consumes the shadow descriptor from the lock-free circular buffer.
[0097] The lock-free circular buffer refers to a concurrent data structure for transferring data between multiple threads. It uses a circular queue to organize storage slots and maintains the movement of the head and tail pointers through atomic operations (rather than mutex locks), achieving non-blocking data enqueueing and dequeueing. In this embodiment of the invention, the Single Producer SingleConsumer (SPSC) lock-free circular buffer uses the main scheduling engine as the producer to push shadow descriptors into the buffer, and the digital twin sandbox as the consumer to retrieve shadow descriptors from the buffer for deduction, thereby avoiding the performance loss caused by lock contention.
[0098] Specifically, in this embodiment of the invention, the main scheduling engine can push the encapsulated shadow descriptor into a lock-free circular buffer based on atomic type head and tail pointers. The digital twin sandbox, as a consumer, independently retrieves the shadow descriptor from the lock-free circular buffer for consumption, thereby achieving efficient and non-blocking data transfer between the main scheduling engine and the sandbox.
[0099] This invention avoids data copying through zero-copy memory mapping, extracts metadata and encapsulates it into a lightweight shadow descriptor, and transmits it asynchronously via a lock-free circular buffer. This provides low-overhead, high-throughput driver data input for the digital twin sandbox without interfering with the main scheduling engine's processing of real business.
[0100] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, step S150 may specifically include:
[0101] Obtain multiple actual scheduling results and corresponding predicted scheduling results within a preset time window.
[0102] Specifically, embodiments of the present invention can collect multiple sets of actual scheduling results and corresponding predicted scheduling results within a preset time window. Each set includes the node identifier and predicted round-trip time of the historical strategy selection corresponding to the same request, as well as the node identifier and predicted round-trip time of the target strategy selection, forming a sample set for confidence calculation. Each set may also include a decision flag to indicate whether the results of the old and new strategies are consistent, whether the sandbox has timed out, or whether a failure has occurred.
[0103] For each actual scheduling result and its corresponding predicted scheduling result, obtain the latency reduction value of the predicted scheduling result relative to the actual scheduling result, the cache hit rate prediction increment, and the bandwidth cost saving factor.
[0104] The latency reduction value refers to the difference between the actual round-trip latency of the historical scheduling strategy and the predicted round-trip latency of the target scheduling strategy under the same real user request. It is used to quantify the performance improvement of the new strategy in terms of transmission latency.
[0105] Among them, the cache hit rate prediction increment refers to the difference between the cache hit rate predicted by the target scheduling policy and the cache hit rate actually achieved by the historical scheduling policy. It is used to measure the optimization effect of the new policy in utilizing edge node cache resources.
[0106] Among them, the bandwidth cost saving factor refers to the saving ratio calculated based on the unit bandwidth cost of the path selected by the new and old scheduling strategies. Specifically, it is the unit bandwidth cost of the historical scheduling strategy path minus the unit bandwidth cost of the target scheduling strategy path, divided by the unit bandwidth cost of the historical scheduling strategy path. The value is limited to between 0 and 1 and is used to evaluate the economic benefits of the new strategy in reducing cross-network and cross-domain origin bandwidth overhead.
[0107] Specifically, in this embodiment of the invention, for each set of actual scheduling results and corresponding predicted scheduling results, the difference between the actual round-trip latency of the historical scheduling strategy and the predicted round-trip latency of the target scheduling strategy can be calculated to obtain the latency reduction value; the difference between the cache hit rate predicted by the target scheduling strategy and the actual cache hit rate of the historical scheduling strategy can be calculated to obtain the cache hit rate prediction increment; the unit bandwidth cost of the path of the historical strategy and the unit bandwidth cost of the path of the target strategy can be obtained, and the difference between the two can be divided by the historical cost to obtain the bandwidth cost saving factor.
[0108] Statistically calculate the frequency of scheduling jumps caused by the target scheduling strategy within a preset time window.
[0109] The scheduling jump frequency refers to the proportion of times the same user request is repeatedly scheduled by the target scheduling strategy across different nodes within a preset time window. In other words, it is the proportion of requests whose scheduling results change per unit of time, and is used to reflect the severity of traffic fluctuations caused by the new strategy.
[0110] Specifically, embodiments of the present invention can count the number of times the scheduling result corresponding to the same request identifier changes within a preset time window, that is, the proportion of the number of requests where the target scheduling strategy jumps between different nodes to the total number of requests processed within the time window, and generate the scheduling jump frequency.
[0111] The confidence score is obtained by using latency reduction, cache hit rate to predict increments, bandwidth cost saving factor, scheduling jump frequency and preset oscillation penalty coefficient.
[0112] The oscillation penalty coefficient refers to the pre-configured weight parameters used to suppress network jitter and resource waste caused by frequent changes in scheduling nodes in the new strategy, thereby ensuring the stability of the scheduling results.
[0113] Specifically, in this embodiment of the invention, the ratio of the latency reduction value of each group of actual scheduling results and corresponding predicted scheduling results to the preset maximum acceptable latency, the cache hit rate prediction increment, and the bandwidth cost saving factor are multiplied by the corresponding business weights and summed. Then, the product of the preset oscillation penalty coefficient and the scheduling jump frequency is subtracted, and the weighted average of all comparison results within the preset time window is taken to obtain the confidence score mapped to the interval of 0 to 100.
[0114] As examples, the confidence score calculation formula provided in the embodiments of the present invention can be: ;in, The confidence score is mapped to the range [0, 100] and reflects the overall adaptability of the target scheduling strategy within the preset time window. The higher the score, the better the target scheduling strategy. This represents the total number of requests within a preset time window. For the first time within the preset time window The index requested this time; For the first In this request, the actual round-trip time of the historical scheduling strategy (old strategy); For the first In this request, the predicted round-trip time of the target scheduling policy (new policy); The maximum acceptable latency is preset and used to normalize the latency reduction value so that the latency index falls within a reasonable range for scoring. The business weight corresponding to the latency ranges from 0 to 100 and can be dynamically adjusted according to the business scenario. The difference between the cache hit rate predicted by the new strategy and the actual cache hit rate of the old strategy, with a value range of [0, 1]. The business weight corresponding to the cache hit rate, with a value ranging from 0 to 100, and... , The sum is 100; The bandwidth cost saving factor of the new strategy relative to the old strategy is calculated as "(Old strategy path unit bandwidth cost - New strategy path unit bandwidth cost) / Old strategy path unit bandwidth cost", with a value range of [0, 1]. If the bandwidth cost of the new strategy is higher than that of the old strategy, then... Set to 0; The service weight corresponding to bandwidth cost, with a value ranging from 0 to 100; A preset oscillation penalty weight (default 10.0, configurable) is used to amplify the negative impact of scheduling jump frequency on the score; The scheduling jump oscillation frequency is the percentage of times the same request is scheduled to different nodes by the new strategy within a preset time window (default threshold 0.01%).
[0115] This invention integrates latency reduction, cache hit rate prediction increment, bandwidth cost saving factor, and scheduling jump frequency into a confidence score, thereby achieving an automated, standardized, and quantitative evaluation of the performance of the old and new scheduling strategies, providing an objective basis for subsequent hot-switching decisions.
[0116] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, the preset hot switching trigger condition may be that the confidence score is not lower than a preset safety threshold in multiple consecutive statistical periods, and / or the continuous running time of the digital twin sandbox reaches a preset stable running time, and / or the total number of shadow descriptors processed by the digital twin sandbox reaches a preset sample number threshold, and / or the scheduling jump frequency caused by the target scheduling strategy is lower than a preset stability threshold, and / or the digital twin sandbox has not experienced a failure.
[0117] The preset safety threshold refers to a pre-set lower limit of the confidence score (e.g., 95 points). This preset safety threshold is used to determine that the overall performance of the target scheduling strategy meets the basic conditions for switching to the production environment when the confidence score is not lower than the threshold for multiple consecutive statistical periods.
[0118] The preset stable runtime refers to the minimum time (e.g., 1 hour) for the digital twin sandbox to run continuously without failure. This preset stable runtime is used to confirm that the sandbox environment has entered a stable state when the sandbox runtime reaches this value, which can avoid evaluation deviations caused by the sandbox just starting up or running for a short time.
[0119] The preset sample size threshold refers to the minimum number of shadow descriptors processed by the digital twin sandbox (e.g., 20 million). This preset sample size threshold is used to confirm that the number of verification samples is sufficient and the confidence score is statistically significant only when the number of processed requests reaches this threshold, thus avoiding misjudgments due to insufficient samples.
[0120] The preset stability threshold refers to a pre-set upper limit for the scheduling jump frequency (e.g., 0.01%). This preset stability threshold is used to confirm that the new strategy will not cause traffic oscillations when the scheduling jump frequency caused by the target scheduling strategy is lower than the threshold, thereby ensuring the stability of the scheduling results.
[0121] Specifically, embodiments of the present invention can combine multiple or all of the above conditions as preset hot-swap triggering conditions. For example, embodiments of the present invention can trigger hot switching when the confidence score is not lower than a preset safety threshold for multiple consecutive statistical periods, the continuous running time of the digital twin sandbox reaches a preset stable running time, the total number of shadow descriptors processed by the digital twin sandbox reaches a preset sample number threshold, the scheduling jump frequency caused by the target scheduling strategy is lower than a preset stability threshold, and the digital twin sandbox has not experienced a failure.
[0122] This invention, through a combination of multi-dimensional conditions, enables flexible configuration of switching thresholds in different scenarios, ensuring that only fully validated and stable target scheduling strategies can be switched to the production environment. This minimizes the risks of strategy deployment and guarantees business continuity and scheduling stability.
[0123] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, after performing the scheduling policy switching operation, the method may further include:
[0124] Within the preset anomaly monitoring window, continuously monitor the median round-trip latency, server error rate, CPU utilization, and bandwidth cost of the target scheduling strategy.
[0125] The preset anomaly monitoring window refers to a pre-set time length (e.g., 30 seconds) that is activated after the atomization hot switch is completed. It is used to continuously monitor various performance indicators during the operation of the target scheduling strategy in order to detect anomalies in a timely manner and trigger a rollback.
[0126] The median average round-trip time refers to the middle value after sorting the actual round-trip times of all user requests within a preset anomaly monitoring window. It is used to measure the network latency level under the new policy scheduling and can effectively avoid the interference of extreme values on the evaluation results.
[0127] Among them, the server error rate refers to the proportion of the number of HTTP status codes (such as 500, 502, 503, etc.) returned by the main scheduling engine to the total number of requests within the preset anomaly monitoring window. It is used to reflect internal errors or service unavailability caused by the new strategy.
[0128] Among them, the CPU utilization rate refers to the percentage of CPU resources used by the main scheduling engine process or the edge node within the preset anomaly monitoring window, which is used to measure the change in computing load brought about by the implementation of the new strategy.
[0129] Among them, bandwidth cost refers to the total unit traffic cost incurred by the main scheduling engine due to back-to-source or cross-node transmission within the preset anomaly monitoring window. It is usually calculated based on the bandwidth cost matrix of each upstream node and the actual traffic consumed.
[0130] If the increase in median average round-trip latency relative to the timeout exceeds a preset latency threshold, or the increase in server error rate exceeds a preset error rate threshold, or the CPU utilization exceeds a preset utilization threshold, or the increase in bandwidth cost exceeds a preset cost threshold, subsequent user requests will be restored to the historical scheduling strategy.
[0131] The preset latency threshold refers to the maximum allowable increase in the median average round-trip latency (e.g., 5%). When the increase in the median latency after the switch exceeds this threshold, a rollback is triggered.
[0132] The preset error rate threshold refers to the maximum absolute or relative increase in the server error rate that is allowed in advance (such as 0.1%). When the increase in the error rate after the switch exceeds this threshold, a rollback is triggered.
[0133] The preset utilization threshold refers to the maximum allowed utilization rate of the central processing unit (e.g., 80%). When the utilization rate after switching exceeds this threshold, a rollback is triggered.
[0134] The preset cost threshold refers to the maximum allowable increase in bandwidth cost (e.g., 3%). When the increase in bandwidth cost after the switch exceeds this threshold, a rollback is triggered.
[0135] This invention, through adding an anomaly monitoring window after hot switching and determining thresholds based on multi-dimensional indicators such as latency, error rate, CPU utilization, and bandwidth cost, enables automatic rollback of faults within seconds, thereby forming a complete closed loop of verification-switching-monitoring-rollback, ensuring zero risk and business continuity in policy deployment.
[0136] Optionally, in the above Figure 1 Based on one or more corresponding embodiments, in another optional embodiment provided by the present invention, the method may further include:
[0137] If the confidence score reaches the preset observation threshold but is below the preset safety threshold, increase the calculation frequency of the confidence score and pre-allocate the memory resources required for switching scheduling strategies.
[0138] The preset observation threshold refers to a pre-defined lower limit for the confidence score (e.g., 80 points). When the confidence score of the target scheduling strategy reaches this threshold but has not yet reached the preset safety threshold (e.g., 95 points), it enters the observation preparation state, increases the evaluation frequency, and pre-allocates the resources required for handover. The preset observation threshold is used to identify new strategies with performance close to the handover standard in advance, shortening the handover preparation time after the standard is met.
[0139] The calculation frequency refers to the number of times the built-in confidence score is calculated per unit of time. In this embodiment of the invention, under normal conditions, the comprehensive score is calculated once every preset time window (e.g., 10 seconds); when the confidence score reaches a preset observation threshold, the calculation frequency is increased to once per second, so as to monitor the changes in strategy performance more intensively and provide data support for rapid response to compliance or deterioration trends.
[0140] Memory resources refer to the random access memory space required in the main scheduling engine process or edge nodes to store data structures such as scheduling policy execution code, connection tracking tables, comparison buffers, and shadow descriptor queues. In this embodiment of the invention, when the confidence score reaches the observation threshold, the control plane needs to pre-allocate the memory resources required for the switch to ensure that atomic hot switching can be performed immediately when the safety threshold is triggered, thus avoiding the impact of memory allocation delay on switching efficiency.
[0141] Specifically, in this embodiment of the invention, when the confidence score of the target scheduling policy reaches a preset observation threshold but falls below a preset safety threshold, the control plane increases the calculation frequency of the confidence score from once per preset time window to once per second, so as to monitor the policy performance change trend more intensively. At the same time, the control plane pre-allocates the memory resources required for atomic hot switching (such as the JIT (Just-In-Time) compilation cache of the new policy, temporary data structures for the switching process, etc.), so that the system enters the switching preparation state, thereby enabling hot switching to be performed immediately when the confidence score subsequently reaches the safety threshold, reducing switching latency.
[0142] If the confidence score remains below the preset observation threshold, the current scheduling strategy switching process is terminated, and the target scheduling strategy is marked as a verification failure.
[0143] Specifically, in this embodiment of the invention, if the confidence score fails to reach the safety threshold for 20 consecutive minutes after the preset observation threshold is triggered, or if the confidence score drops continuously from above the observation threshold to below 60 points, the current scheduling strategy switching process is immediately terminated, the input of shadow descriptors to the digital twin sandbox is stopped, the target scheduling strategy is marked as "verification failed" and the reason for failure is recorded, and an alarm is triggered to notify the operation and maintenance personnel of the scheduling strategy parameters before re-initiating the verification process.
[0144] This invention improves strategy iteration efficiency and avoids invalid calculations and resource consumption by setting a hierarchical mechanism of observation threshold and safety threshold. When the strategy performance is close to qualified, resources are pre-allocated to accelerate subsequent hot switching. When the strategy continues to fail to meet the standards, the verification process is terminated in time.
[0145] like Figure 2The diagram shows a logical block diagram of a scheduling strategy switching system provided in this embodiment of the invention. This system is deployed in a scheduling gateway within a CDN edge node and mainly includes: a traffic splitting module, a lock-free ring buffer, a digital twin sandbox (twin plane), a main scheduling engine (production plane), a difference comparison and confidence assessment module, and an atomic hot-switching module. Each module works together to achieve online gray-scale verification and seamless hot-switching of the new scheduling strategy. The specific data flow is as follows: 1. Real business data flow (represented by solid lines in the diagram): After a client request reaches the edge node scheduling gateway, the main scheduling engine (production plane) executes a scheduling decision based on the current stable strategy (historical scheduling strategy), outputs the actual scheduling result (including target node, protocol, estimated RTT, etc.), and establishes a real TCP / TLS connection to forward the request to the backend cache server or origin server, while simultaneously sending the response back to the client. 2. Shadow descriptor data flow (represented by dashed lines in the diagram): The traffic splitting module non-intrusively extracts the key metadata of the real request through a zero-copy memory mechanism, encapsulates it into a lightweight shadow descriptor, and pushes it into a lock-free ring buffer. The digital twin sandbox (twin plane), acting as an independent consumer, asynchronously retrieves shadow descriptors from the circular buffer and performs pure logical deduction on the new strategy to be verified (based on a dual isolation environment of WebAssembly and LXC) running within the sandbox, outputting predictive scheduling results. Throughout this process, network I / O operations are strictly prohibited within the sandbox to avoid interfering with real business operations. The actual scheduling results and predictive scheduling results are fed into a difference comparison and confidence assessment module. This module calculates the dynamic confidence score of the new strategy within a preset time window based on latency gain, cache hit rate gain, bandwidth cost saving factor, and oscillation penalty coefficient. When the confidence score continuously meets a preset safety threshold (e.g., ≥95 points) and other triggering conditions are met, the atomic hot-switching module replaces the global function pointer of the main scheduling engine through a single-instruction-cycle atomic operation, switching subsequent new requests to the new strategy. Simultaneously, the new strategy inherits the TCP connection tracking table of the original strategy, ensuring that existing long-lived connections are not interrupted. After the switch, an anomaly monitoring window is activated; if performance degradation is detected, the system automatically rolls back to the old strategy. The scheduling strategy switching system provided in this embodiment of the invention achieves full online gray-scale verification and seamless hot switching of CDN scheduling strategies through a dual-plane parallel architecture of "production plane + twin sandbox plane" without splitting real traffic, restarting services, or interrupting user connections.
[0146] Optional, based on Figure 2 The system shown, such as Figure 3As shown, the timing diagram for shadow descriptor generation and transmission provided in this embodiment of the invention describes the interaction steps between the traffic splitting module, the main scheduling engine, the lockless circular buffer, and the digital twin sandbox after a client request arrives at the edge node. The specific timing is as follows: 1. Initiating an HTTP or HTTPS request: The client initiates an HTTP or HTTPS request to the edge node scheduling gateway. 2. Transmitting the complete request context: The main scheduling engine transmits the received request context (including socket file descriptors, etc.) to the traffic splitting module, triggering the splitting sampling process. 3. Executing the original scheduling algorithm calculation: The main scheduling engine executes the scheduling algorithm according to the historical scheduling policy (old policy), calculating the actual scheduling result, including the target node, protocol, and predicted round-trip latency. 4. Routing and transmitting actual business data back: The main scheduling engine establishes a real TCP / TLS connection based on the actual scheduling result, forwards the request to the backend server, and transmits the response data back to the client, ensuring the normal operation of the real business. 5. Zero-copy memory feature extraction: The traffic splitting module uses zero-copy memory technology (such as mmap) to map the kernel socket buffer to the user-space address space in a read-only, private mapping manner. It then uses a finite state machine resolver to extract key metadata of the request, including feature vectors such as client IP, target resource identifier (URI), user agent, network layer protocol type, and current node load status. 6. Assembling and pushing shadow descriptors: The traffic splitting module encapsulates the extracted metadata into lightweight shadow descriptors with a total size not exceeding 256 bytes and pushes them into a lock-free circular buffer (fixed capacity of 2^20 slots, approximately 256MB) based on atomic type head and tail pointers. The enqueue operation uses memory_order_release semantics to ensure efficient and secure data synchronization. 7. Asynchronous consumption and descriptor extraction: The digital twin sandbox, acting as an independent consumer, asynchronously retrieves shadow descriptors from the lock-free circular buffer, preparing for new strategy deduction. 8. Execute new scheduling strategy logical prediction: Based on the pre-loaded new scheduling strategy to be verified, the digital twin sandbox performs pure logical deduction on the request metadata in the shadow descriptor and outputs the predicted scheduling result (including the predicted target node and the predicted round-trip time). Network I / O operations are strictly prohibited within the sandbox; node status can only be queried through the host-side whitelist API to ensure no interference with real business. 9. Record the predicted path to the comparison cache: The digital twin sandbox records the predicted scheduling result to the comparison buffer, aligning it with the actual scheduling result, recording the request identifier, the node ID selected by the old and new strategies, the predicted round-trip time, and the decision flag (consistency / conflict / sandbox timeout / failure). After completing the old strategy scheduling, the main plane backfills the actual result for the confidence assessment module to read.Furthermore, if the digital twin sandbox crashes or times out, the main scheduling engine immediately discards the current shadow task and triggers a sandbox preheating instance switch (response time ≤ 1 millisecond). A new instance is retrieved from the preheating pool to replace the faulty instance, ensuring that the shadow verification process is uninterrupted and guaranteeing 100% service availability. Through the above timing sequence, this invention achieves zero-copy, non-intrusive sampling of metadata from real user requests and asynchronously drives the derivation of new strategies within the sandbox with extremely low overhead, providing an efficient and secure data input channel for subsequent biplane result comparison and confidence assessment.
[0147] Optional, based on Figure 2 The system shown, such as Figure 4 The diagram shown illustrates the logic block diagram for scheduling strategy switching determination provided in this embodiment of the invention. Figure 4This describes the complete decision-making and execution process from reading dual-plane comparison data to triggering seamless hot switching and subsequent anomaly rollback. The specific process is as follows: 1. Start Evaluation Cycle: The system starts a new evaluation cycle and enters the confidence calculation process. 2. Read Actual and Predicted Path Data: Read the actual scheduling results and predicted scheduling results within a preset time window (e.g., 10 seconds) from the comparison buffer, including target node ID, predicted round-trip time (RTT), cache hit rate, path bandwidth cost, etc. 3. Calculate Multi-Dimensional Indicators: Latency Gain Calculation: Calculate the latency reduction value of the new strategy relative to the old strategy and normalize it to a reasonable range. Cache Hit Rate Increment: Calculate the difference between the cache hit rate predicted by the new strategy and the actual cache hit rate of the old strategy. Bandwidth Cost Factor: Calculate the bandwidth cost saving factor based on the unit bandwidth cost of the new and old strategy paths. Scheduling Oscillation Penalty: Statistically calculate the frequency of the same request being scheduled to different nodes by the new strategy within a preset time window and generate an oscillation penalty coefficient. 4. Calculate the confidence score using the formula: Multiply the latency gain, cache hit rate increment, and bandwidth cost factor by their respective business weights, sum them, and then subtract the product of the oscillation penalty coefficient and the scheduling jump frequency to obtain the comprehensive confidence score (mapped to the 0-100 range). 5. Determine if the score is ≥ the safety threshold: If the confidence score is lower than the safety threshold (e.g., 95 points), proceed to the "Record anomaly, deduct weights" step. Record the anomalies in the indicators that caused the insufficient score in this evaluation, reduce the weight of the corresponding indicators, or mark them as anomalies, then return to "Start Evaluation Cycle" to continue the next round of monitoring. If the confidence score reaches or exceeds the safety threshold, proceed to the next step. 6. Determine if the high score duration is greater than the observation window: Check if the confidence score is not lower than the safety threshold for multiple consecutive statistical periods (e.g., 3 periods). Simultaneously check if the continuous running time of the digital twin sandbox, the total number of processed shadow descriptors, the scheduling jump frequency, and the sandbox fault status meet the preset hot-swap trigger conditions. If not, return to "Start Evaluation Cycle" to continue monitoring. If satisfied, proceed to the "Trigger Hot Switching Signal" step. 7. Trigger Hot Switching Signal: The control plane issues a hot switching instruction (e.g., SIG_SWITCH) to prepare for atomic switching. 8. Inherit the original TCP connection tracking table state: The new strategy inherits the TCP connection tracking table (including four-tuples, TCP state machine, TLS session context, and HTTP / 2 Stream ID mapping) maintained by the old strategy, ensuring that established long-lived connections (tens of millions) are not interrupted. 9. Modify the entry function pointer using CPU atomic instructions: Through a single CPU instruction cycle atomic operation (e.g., "__atomic_store_n"), the global scheduling function pointer of the main scheduling engine is modified from pointing to the function address of the historical scheduling strategy to pointing to the function address of the target scheduling strategy, with a switching time of no more than 1 microsecond. 10. Clean up old strategy memory and release the old sandbox: The old strategy instance is unloaded, releasing its JIT cache and linear memory, completing resource reclamation.11. Seamless handover complete, new strategy takes over: Subsequent new user requests are handled by the new strategy, and existing connections are either directly reused or gracefully closed and rebuilt according to the decision of the new strategy, achieving seamless handover.
[0148] In addition, a 30-second anomaly monitoring window is initiated after the switch to continuously monitor the median average round-trip latency, server error rate, CPU utilization, and bandwidth cost of the new policy. If any indicator exceeds the preset degradation threshold (e.g., latency increase exceeding 5%, error rate increase exceeding 0.1%, CPU utilization exceeding 80%, or bandwidth cost increase exceeding 3%), the system immediately switches the global function pointer back to the old policy through an atomic operation, marks the new policy rollback as failed, and triggers an alarm.
[0149] Through the above process, this embodiment of the invention realizes automated multi-dimensional quantitative evaluation of CDN scheduling strategies, secure hot switching, and abnormal rollback closed loop, ensuring zero risk in strategy deployment and uninterrupted service.
[0150] Although the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous.
[0151] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0152] Corresponding to the above method embodiments, the present invention also provides a scheduling strategy switching device, which may include: a sandbox construction unit, a shadow descriptor generation unit, an actual scheduling result output unit, a predicted scheduling result output unit, a confidence score acquisition unit, and a switching execution unit.
[0153] The sandbox building unit is used to build a digital twin sandbox that is isolated from the main scheduling engine in the edge nodes of the content delivery network, and to load the target scheduling strategy to be verified within the digital twin sandbox.
[0154] The shadow descriptor generation unit is used to extract metadata of real user requests processed by the main scheduling engine, generate shadow descriptors, and input the shadow descriptors into the digital twin sandbox.
[0155] The actual scheduling result output unit is used to output the actual scheduling result based on the historical scheduling strategy using the main scheduling engine.
[0156] The predictive scheduling result output unit is used to output the predictive scheduling result based on the target scheduling strategy and shadow descriptor using a digital twin sandbox.
[0157] The confidence score acquisition unit is used to obtain the confidence score of the target scheduling strategy within a preset time window by using the actual scheduling results and the predicted scheduling results.
[0158] The switching execution unit is used to perform a scheduling strategy switching operation based on the confidence score and when the preset hot switching trigger conditions are met, so as to switch subsequent user requests to the target scheduling strategy for processing.
[0159] Optionally, switching execution units can be used to modify the global scheduling function pointer of the main scheduling engine from pointing to the function address of the historical scheduling policy to pointing to the function address of the target scheduling policy through atomic operations, and inherit the connection tracking table maintained by the historical scheduling policy in the main scheduling engine.
[0160] Optionally, the sandbox building unit can be used to create lightweight virtual machine instances within the edge nodes of the content delivery network to isolate the system resources of the digital twin sandbox and the main scheduling engine; deploy a web page assembly runtime environment within the lightweight virtual machine instance, and use the linear memory boundary of web page assembly to isolate the instruction execution of the target scheduling policy; allocate linear memory for the target scheduling policy through the web page assembly runtime environment, set a hard upper limit for linear memory, and configure the CPU time circuit breaker threshold for a single shadow computation to obtain a digital twin sandbox isolated from the memory of the main scheduling engine.
[0161] Optionally, the shadow descriptor generation unit can be used to map the kernel socket buffer where the real user request processed by the main scheduling engine is located to the user space address space through a zero-copy memory method; extract metadata from the mapped kernel socket buffer; encapsulate the metadata into a shadow descriptor; and push the shadow descriptor into a lock-free circular buffer so that the digital twin sandbox consumes the shadow descriptor from the lock-free circular buffer.
[0162] Optionally, the confidence score acquisition unit can be used to obtain multiple actual scheduling results and corresponding predicted scheduling results within a preset time window; for each actual scheduling result and corresponding predicted scheduling result, obtain the latency reduction value, cache hit rate prediction increment, and bandwidth cost saving factor of the predicted scheduling result relative to the actual scheduling result; statistically analyze the scheduling jump frequency caused by the target scheduling strategy within the preset time window; and obtain the confidence score using the latency reduction value, cache hit rate prediction increment, bandwidth cost saving factor, scheduling jump frequency, and preset oscillation penalty coefficient.
[0163] Optionally, the preset hot-swap trigger conditions are: the confidence score is not lower than the preset safety threshold for multiple consecutive statistical periods, and / or the continuous running time of the digital twin sandbox reaches the preset stable running time, and / or the total number of shadow descriptors processed by the digital twin sandbox reaches the preset sample number threshold, and / or the scheduling jump frequency caused by the target scheduling strategy is lower than the preset stability threshold, and / or the digital twin sandbox has not experienced a failure.
[0164] Optionally, the scheduling strategy switching device may also include an anomaly monitoring unit and a strategy callback unit.
[0165] The anomaly monitoring unit is used to continuously monitor the median average round-trip latency, server error rate, CPU utilization, and bandwidth cost of the target scheduling strategy within a preset anomaly monitoring window after the switching execution unit performs the scheduling strategy switching operation.
[0166] The strategy callback unit is used to restore subsequent user requests to the historical scheduling strategy when the increase in the median average round-trip latency relative to the timeout exceeds a preset latency threshold, or the increase in the server error rate exceeds a preset error rate threshold, or the CPU utilization exceeds a preset utilization threshold, or the increase in bandwidth cost exceeds a preset cost threshold.
[0167] Optionally, the scheduling policy switching device may further include: a pre-allocated memory unit and a termination switching unit.
[0168] Pre-allocated memory units are used to increase the calculation frequency of confidence scores and pre-allocate memory resources required for switching scheduling strategies when the confidence score reaches a preset observation threshold but is lower than a preset safety threshold.
[0169] The termination switching unit is used to terminate the current scheduling strategy switching process and mark the target scheduling strategy as a verification failure when the confidence score continues to be lower than the preset observation threshold.
[0170] This invention provides a scheduling strategy switching device that constructs a digital twin sandbox isolated from the main scheduling engine's memory. The target scheduling strategy is based solely on pure logical deduction using shadow descriptors, without performing any real network operations. Therefore, defects in the new strategy are strictly isolated from real business operations, achieving zero-risk full-scale verification of the scheduling strategy. By extracting real user request metadata to generate lightweight shadow descriptors, replacing complete packet copying, data transfer overhead is significantly reduced. When the confidence score meets the preset hot-switch trigger condition, the scheduling strategy switching operation is executed without restarting the process and without interrupting existing long-term connections, achieving seamless hot-switch for business operations. Simultaneously, the confidence score quantified based on the actual scheduling results and predicted scheduling results forms an automated evaluation and switching closed loop, significantly shortening the strategy iteration cycle and reducing operational costs.
[0171] Regarding the apparatus in the above embodiments, the specific manner in which each unit performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0172] The scheduling strategy switching device includes a processor and a memory. The aforementioned sandbox construction unit, shadow descriptor generation unit, actual scheduling result output unit, predicted scheduling result output unit, comparison result acquisition unit, confidence score acquisition unit, and switching execution unit are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to implement the corresponding functions.
[0173] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, a digital twin sandbox isolated from the main engine is built at the edge nodes of the content delivery network, loading the target scheduling policy. Real request metadata is extracted to generate shadow descriptors that are input into the sandbox. The main engine outputs actual results based on historical scheduling policies, while the sandbox outputs predicted results based on the target scheduling policy. A confidence score is obtained using the actual and predicted results. When the hot-switching conditions are met, the scheduling policy switching operation is executed. This invention uses shadow descriptors to drive parallel derivation of new policies and triggers scheduling policy switching based on confidence scores, achieving seamless hot-switching of scheduling policies without interfering with business operations, restarting services, or interrupting connections.
[0174] This invention provides a computer-readable storage medium storing a program that, when executed by a processor, implements the scheduling strategy switching method.
[0175] This invention provides a processor for running a program, wherein the program executes the scheduling strategy switching method during runtime.
[0176] This invention provides an electronic device, which includes at least one processor, at least one memory connected to the processor, and a bus; wherein the processor and the memory communicate with each other via the bus; the processor is used to call program instructions in the memory to execute the aforementioned scheduling strategy switching method. The electronic device described herein may be a server, PC, PAD, mobile phone, etc.
[0177] The present invention also provides a computer program product that, when executed on an electronic device, is suitable for executing a program with initialization steps for a scheduling strategy switching method.
[0178] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, electronic devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0179] In a typical configuration, an electronic device includes one or more processors (CPUs), memory, and a bus. The electronic device may also include input / output interfaces, network interfaces, etc.
[0180] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM, and memory includes at least one memory chip. Memory is an example of computer-readable media.
[0181] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0182] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0183] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0184] In the description of this invention, it should be understood that if the terms "upper", "lower", "front", "rear", "left" and "right" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the position or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.
[0185] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0186] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0187] The above are merely embodiments of the present invention and are not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the present invention.
Claims
1. A method for switching scheduling strategies, characterized in that, include: In the edge nodes of the content delivery network, a digital twin sandbox is constructed that is isolated from the memory of the main scheduling engine, and the target scheduling strategy to be verified is loaded into the digital twin sandbox. Extract the metadata of the real user requests processed by the main scheduling engine, generate shadow descriptors, and input the shadow descriptors into the digital twin sandbox; The main scheduling engine is used to output the actual scheduling results based on historical scheduling strategies. The digital twin sandbox is used to output a predicted scheduling result based on the target scheduling strategy and the shadow descriptor; By using the actual scheduling results and the predicted scheduling results, the confidence score of the target scheduling strategy within a preset time window is obtained; Based on the confidence score, if the preset hot-swap triggering conditions are met, a scheduling strategy switching operation is performed to switch subsequent user requests to the target scheduling strategy for processing.
2. The method according to claim 1, characterized in that, The execution of the scheduling policy switching operation includes: The global scheduling function pointer of the main scheduling engine is modified from pointing to the function address of the historical scheduling policy to pointing to the function address of the target scheduling policy through atomic operations, and the connection tracking table maintained by the historical scheduling policy in the main scheduling engine is inherited.
3. The method according to claim 1, characterized in that, The construction of a digital twin sandbox isolated from the main scheduling engine's memory in the edge nodes of the content delivery network includes: Lightweight virtual machine instances are created within the edge nodes of the content delivery network to isolate the system resources of the digital twin sandbox and the main scheduling engine; A web page assembly runtime environment is deployed within the lightweight virtual machine instance, utilizing the linear memory boundary isolation of web page assembly to isolate the instruction execution of the target scheduling strategy; The target scheduling strategy is allocated linear memory through a web page assembly runtime environment, a hard upper limit for the linear memory is set, and a CPU time circuit breaker threshold for a single shadow computation is configured to obtain a digital twin sandbox isolated from the main scheduling engine memory.
4. The method according to claim 1, characterized in that, The step of extracting metadata from the real user requests processed by the main scheduling engine, generating shadow descriptors, and inputting the shadow descriptors into the digital twin sandbox includes: By using a zero-copy memory method, the kernel socket buffer where the real user requests processed by the main scheduling engine reside is mapped to the user-mode address space; Extract metadata from the mapped kernel socket buffer; The metadata is encapsulated into a shadow descriptor; The shadow descriptor is pushed into an unlocked circular buffer so that the digital twin sandbox consumes the shadow descriptor from the unlocked circular buffer.
5. The method according to claim 1, characterized in that, The step of obtaining the confidence score of the target scheduling strategy within a preset time window using the actual scheduling result and the predicted scheduling result includes: Obtain multiple actual scheduling results and corresponding predicted scheduling results within a preset time window; For each actual scheduling result and the corresponding predicted scheduling result, obtain the latency reduction value, cache hit rate prediction increment, and bandwidth cost saving factor of the predicted scheduling result relative to the actual scheduling result; Statistically analyze the frequency of scheduling jumps caused by the target scheduling strategy within the preset time window; The confidence score is obtained by using the latency reduction value, the cache hit rate prediction increment, the bandwidth cost saving factor, the scheduling jump frequency, and the preset oscillation penalty coefficient.
6. The method according to claim 1, characterized in that, The preset hot-switch triggering conditions are: the confidence score is not lower than the preset safety threshold for multiple consecutive statistical periods, and / or the continuous running time of the digital twin sandbox reaches the preset stable running time, and / or the total number of shadow descriptors processed by the digital twin sandbox reaches the preset sample number threshold, and / or the scheduling jump frequency caused by the target scheduling strategy is lower than the preset stability threshold, and / or the digital twin sandbox has not experienced a failure.
7. The method according to claim 1, characterized in that, After performing the scheduling policy switching operation, the method further includes: Within the preset anomaly monitoring window, continuously monitor the median round-trip time, server error rate, CPU utilization, and bandwidth cost of the target scheduling strategy; If the increase in the median average round-trip latency relative to the timeout exceeds a preset latency threshold, or the increase in the server error rate exceeds a preset error rate threshold, or the CPU utilization exceeds a preset utilization threshold, or the increase in bandwidth cost exceeds a preset cost threshold, subsequent user requests will be restored to the historical scheduling strategy.
8. The method according to any one of claims 1 to 7, characterized in that, Also includes: If the confidence score reaches a preset observation threshold but is lower than a preset safety threshold, the calculation frequency of the confidence score is increased, and the memory resources required for switching the scheduling strategy are pre-allocated. If the confidence score remains below the preset observation threshold, the current scheduling strategy switching process is terminated, and the target scheduling strategy is marked as a verification failure.
9. A scheduling strategy switching device, characterized in that, include: The system includes a sandbox construction unit, a shadow descriptor generation unit, an actual scheduling result output unit, a predicted scheduling result output unit, a confidence score acquisition unit, and a switching execution unit. The sandbox construction unit is used to construct a digital twin sandbox isolated from the main scheduling engine memory in the edge node of the content delivery network, and to load the target scheduling strategy to be verified in the digital twin sandbox. The shadow descriptor generation unit is used to extract metadata of the real user requests processed by the main scheduling engine, generate shadow descriptors, and input the shadow descriptors into the digital twin sandbox. The actual scheduling result output unit is used to output the actual scheduling result based on the historical scheduling strategy using the main scheduling engine; The predictive scheduling result output unit is used to output the predictive scheduling result based on the target scheduling strategy and the shadow descriptor using the digital twin sandbox; The confidence score acquisition unit is used to obtain the confidence score of the target scheduling strategy within a preset time window by using the actual scheduling result and the predicted scheduling result. The switching execution unit is used to perform a scheduling strategy switching operation based on the confidence score and when the preset hot switching triggering conditions are met, so as to switch subsequent user requests to the target scheduling strategy for processing.
10. A computer-readable storage medium having a program stored thereon, characterized in that, When the program is executed by the processor, it implements the scheduling policy switching method as described in any one of claims 1 to 8.
11. An electronic device, characterized in that, The electronic device includes at least one processor, at least one memory connected to the processor, and a bus; wherein the processor and the memory communicate with each other through the bus; the processor is used to call program instructions in the memory to execute the scheduling strategy switching method as described in any one of claims 1 to 8.