A distributed cross-cluster network element connection control and scheduling method and related equipment
Patent Information
- Application Number
- CN202611055093.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-10-23
AI Technical Summary
当并发连接数超过网元可承载阈值时,容易造成超时、失败或阻塞,影响业务执行效率和用户体验
本申请提供一种分布式跨集群的网元连接控制与调度方法及相关设备,本申请方案通过确定目标指令对应的目标网元及目标网元的唯一标识;根据唯一标识确定目标网元当前连接集群的数量作为连接数量;若连接数量达到预设连接阈值,则将目标指令的下发任务加入到重试队列;根据任务优先级和预设的调度策略将重试队列中的目标指令下发到目标网元。本申请通过确定目标网元当前连接集群的连接数量并根据该连接数量按需下发指令,可实现跨集群环境下对单个网元的并发调度控制,避免多集群下对同一网元的竞争和冲突,提高了网元指令调度的一致性和效率。
Smart Images

Figure CN122970081A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a distributed cross-cluster network element connection control and scheduling method and related equipment. Background Technology
[0002] During the instruction issuance process of the operator's acquisition and control platform, different service requests need to access the same network element simultaneously. When the number of concurrent connections exceeds the capacity threshold of the network element, it can easily cause timeouts, failures, or blockages, affecting service execution efficiency and user experience.
[0003] Existing network element instruction scheduling schemes suffer from inconsistencies and low efficiency. Summary of the Invention
[0004] The main objective of this application is to propose a distributed cross-cluster network element connection control and scheduling method and related equipment to improve the consistency and efficiency of network element instruction scheduling.
[0005] To achieve the above objectives, one aspect of this application proposes a distributed cross-cluster network element connection control and scheduling method, the method comprising the following steps: Determine the target network element corresponding to the target instruction and the unique identifier of the target network element; The number of clusters currently connected to the target network element is determined based on the unique identifier and used as the connection count. If the number of connections reaches a preset connection threshold, the task of issuing the target instruction will be added to the retry queue. The target instruction in the retry queue is sent to the target network element according to the task priority and the preset scheduling strategy.
[0006] In some embodiments, before determining the target network element corresponding to the target instruction and the unique identifier of the target network element, the method further includes the following steps: Obtain the business request; The target instruction is generated based on the business scenario of the business request.
[0007] In some embodiments, determining the number of clusters currently connected to the target network element as the number of connections includes the following steps: The number of current connected clusters of the target network element is determined by using a connection counter based on the unique identifier, and this number is taken as the connection count.
[0008] In some embodiments, the step of sending the target instruction in the retry queue to the target network element according to the task priority and a preset scheduling policy includes the following steps: The target instructions in the retry queue are classified according to the priority of the business scenario; The target instructions with high priority are sent to the target network element first, while the target instructions with low priority are sent to the target network element in the retry queue with a delay according to the backoff strategy.
[0009] In some embodiments, the method further includes the following steps: The preset connection threshold is dynamically updated based on the dynamic performance indicators of the target network element and the number of target instructions piling up in the retry queue.
[0010] In some embodiments, the method further includes the following steps: When an abnormal number of connections is detected or the cluster is unavailable, the target instruction is rolled back to the local queue to wait for scheduling. Once the number of connections recovers or the cluster becomes available, the task of issuing the target instruction is added to the retry queue. If the number of connections reaches a preset connection threshold, the task of issuing the target instruction is added to the retry queue.
[0011] In some embodiments, the method further includes the following steps: If the number of connections does not reach the preset connection threshold, the target instruction is sent to the target network element.
[0012] To achieve the above objectives, another aspect of this application proposes a distributed cross-cluster network element connection control and scheduling device, the device comprising: The network element determination unit is used to determine the target network element corresponding to the target instruction and the unique identifier of the target network element; A connection quantity determination unit is used to determine the number of current connected clusters of the target network element as the connection quantity based on the unique identifier; The instruction processing unit is used to add the task of issuing the target instruction to the retry queue if the number of connections reaches a preset connection threshold. The instruction issuing unit is used to issue the target instruction in the retry queue to the target network element according to the task priority and the preset scheduling strategy.
[0013] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method.
[0014] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0015] To achieve the above objectives, another aspect of this application provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0016] The embodiments of this application include at least the following beneficial effects: This application provides a distributed cross-cluster network element connection control and scheduling method and related equipment. The solution determines the target network element corresponding to the target instruction and its unique identifier; it determines the number of clusters currently connected to the target network element based on the unique identifier, using this as the connection count; if the connection count reaches a preset connection threshold, the task of issuing the target instruction is added to a retry queue; and the target instruction in the retry queue is issued to the target network element according to task priority and a preset scheduling strategy. By determining the number of clusters currently connected to the target network element and issuing instructions on demand based on this number, this application enables concurrent scheduling control of a single network element in a cross-cluster environment, avoiding competition and conflicts for the same network element in multiple clusters, and improving the consistency and efficiency of network element instruction scheduling. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating a distributed cross-cluster network element connection control and scheduling method provided in an embodiment of this application; Figure 2 A flowchart illustrating another distributed cross-cluster network element connection control and scheduling method provided in this application embodiment; Figure 3 An example flowchart of a distributed cross-cluster network element connection control and scheduling method provided in this application embodiment; Figure 4 A schematic diagram illustrating the communication connections of network elements, clusters, and connection counters provided in the embodiments of this application; Figure 5 A schematic diagram of the structure of a distributed cross-cluster network element connection control and scheduling device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit the scope of this application.
[0021] Before providing a detailed description of the embodiments of this application, some related technologies involved in the embodiments of this application will be described first, as follows: Services from different businesses or systems are often deployed on different clusters. Existing solutions are mostly single-node or fixed-threshold rate limiting, which makes it difficult to guarantee global consistency in distributed and cross-cluster deployments, and also lacks effective control over task priorities and retry strategies.
[0022] Related technologies provide queue throttling methods based on single-node counters, suitable for tunnel detection rhythm control within a single controller. This application, however, proposes several substantial technical improvements: cross-cluster consistent counting (sub-counter + lease / aggregation) at the single-network-element granularity; priority-aware lock / queue scheduling; automatic lease reclamation at the node level; diverse and adaptive backoff strategies; instruction deduplication / batch delivery mechanisms; and closed-loop dynamic threshold adjustment based on real-time indicators. These improvements not only solve cross-cluster race conditions, abnormal node reclamation, and retry storms not covered by related technologies, but also significantly reduce network element overload and instruction failure rates while ensuring the timeliness of critical services, resulting in clear technical effects and constituting a creative contribution.
[0023] This application proposes a distributed cross-cluster network element connection concurrency control method. A globally consistent distributed lock and counter mechanism is used to uniformly manage the connection count of each network element. When the number of connections exceeds a threshold, the instruction automatically enters a retry queue with service priority, and an exponential backoff strategy is adopted to avoid retry storms. Simultaneously, the system dynamically adjusts the connection threshold based on the real-time load of the network elements and forms a closed-loop optimization by combining monitoring feedback. This method ensures the priority execution of critical services while improving the utilization efficiency of network element resources and system stability in a cross-cluster environment, effectively achieving a balance between network element load and utilization.
[0024] This application provides a distributed cross-cluster network element connection control and scheduling method and related equipment, relating to the field of communication technology. The distributed cross-cluster network element connection control and scheduling method and related equipment provided in this application can be applied to terminals, servers, or software running on terminals or servers. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited to these; the server can be configured as an independent physical server, a server cluster composed of multiple physical servers, or a distributed system; it can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the server can also be a node server in a blockchain network; the software can be an application implementing a distributed cross-cluster network element connection control and scheduling method, but is not limited to the above forms.
[0025] This application can be applied to numerous general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0026] Reference Figure 1 This application provides a distributed cross-cluster network element connection control and scheduling method, which may include, but is not limited to, steps S100 to S130, as follows: S100: Determine the target network element corresponding to the target instruction and the unique identifier of the target network element; S110: Determine the number of clusters currently connected to the target network element as the connection quantity based on the unique identifier; S120: If the number of connections reaches a preset connection threshold, the task of sending the target instruction is added to the retry queue. S130: The target instruction in the retry queue is sent to the target network element according to the task priority and the preset scheduling strategy.
[0027] Specifically, the implementation scheme of this application embodiment may include: The target instruction is parsed to extract the target network element to be accessed from the information carried in the instruction, and to obtain the unique identifier of the target network element. A target network element refers to a physical device or logical entity in the network capable of independently performing a specific communication function, such as a base station, core network element, or managed device in a network management system. The unique identifier is a non-repeatable mark used to distinguish different network elements in the network management system, typically in the form of a network element ID, device serial number, or IP address.
[0028] After obtaining the unique identifier of the target network element, the total number of connections from different clusters carried on the target network element is queried based on this unique identifier. This total number of connections is the connection count. A connection refers to a communication link or session channel established between a service cluster and the target network element, and a cluster is a distributed set of service nodes composed of multiple servers. Querying the connection count can be achieved by reading the connection count field corresponding to the unique identifier in the distributed shared storage. Distributed shared storage can ensure data consistency in cross-cluster deployment environments.
[0029] After obtaining the number of connections, it is compared with a pre-set connection threshold. The pre-set connection threshold is a maximum concurrent connection limit configured based on the target network element's performance capacity, representing the maximum number of concurrent connections the target network element can stably handle. If the comparison result shows that the number of connections has reached or exceeded the pre-set connection threshold, it indicates that the current connection load of the target network element is saturated. In this case, the target instruction is not directly issued; instead, the task corresponding to the target instruction is encapsulated into a task object and added to a retry queue for temporary storage. The retry queue is a message queue structure that supports delayed processing and task persistence, ensuring that tasks are not lost after network fluctuations or system restarts.
[0030] Tasks in the retry queue are not consumed in a simple first-in, first-out (FIFO) order. Instead, the timing of sending the target instruction to the target network element is determined by combining task priority and a pre-defined scheduling strategy. Task priority is a pre-assigned processing priority attribute for different instructions based on the importance of the business scenario. The pre-defined scheduling strategy is a set of scheduling algorithm configurations that define priority comparison rules, retry intervals, and resource allocation logic. The scheduling component continuously scans the retry queue, sorts and filters tasks according to their priority, retrieves tasks that meet the pre-defined scheduling strategy, executes the send-off operation to send the target instruction to the target network element, and thus completes the entire scheduling process.
[0031] Optionally, before determining the target network element corresponding to the target instruction and the unique identifier of the target network element, the method further includes the following steps: Obtain the business request; The target instruction is generated based on the business scenario of the business request.
[0032] Specifically, before determining the target network element corresponding to the target instruction and its unique identifier, this embodiment of the application may first receive a service request from an external business system or upper-layer application. A service request is the original request that triggers a network operation, containing business-level information such as service type, operation object, and operation parameters. Examples include activating a user's network service, querying the configuration data of a network element, or batch modifying the parameters of a group of network elements.
[0033] Upon receiving a business request, it needs to be parsed and transformed to generate a corresponding target instruction based on the business scenario. The business scenario refers to the operational management scenario category to which the business request belongs, such as service activation, fault diagnosis, routine maintenance, or real-time monitoring. The process of generating the target instruction includes determining the operation type and issuing protocol based on the business scenario, mapping the business parameters in the business request to instruction parameters that the network element can recognize, and encapsulating them into a standardized instruction format conforming to the network element interface specification. The generated target instruction carries all the information required to operate the target network element, providing input for subsequent connection control and scheduling steps.
[0034] Optionally, determining the number of clusters currently connected to the target network element as the number of connections includes the following steps: The number of current connected clusters of the target network element is determined by using a connection counter based on the unique identifier, and this number is taken as the connection count.
[0035] Specifically, in determining the number of clusters currently connected to the target network element as the connection count, this application embodiment uses a connection counter to implement the counting function. A connection counter is a technical component for maintaining network element connection counts in a distributed environment; its core function is to maintain a globally consistent count value based on the unique identifier of the network element.
[0036] When the connection counter is invoked to query the number of connections, it uses a unique identifier as the query key to retrieve the current count value corresponding to that key from a distributed cache or shared database. This count value represents the total number of active connections to the target network element across all clusters. Connection counters typically employ atomic operations to ensure accuracy. For example, in Redis, the INCR and DECR instructions are used to increment and decrement the connection count, or row-level locking and transactions are used at the database level to ensure the count value is not incorrectly modified in concurrent scenarios. When a service instance in any cluster establishes a new connection with the target network element, the connection counter increments the count value corresponding to the unique identifier; when a connection is released or closes after a timeout, the connection counter decrements the count. In this way, the connection counter can reflect the current number of clusters connected to the target network element in real time.
[0037] Optionally, the step of sending the target instruction in the retry queue to the target network element according to the task priority and a preset scheduling policy includes the following steps: The target instructions in the retry queue are classified according to the priority of the business scenario; The target instructions with high priority are sent to the target network element first, while the target instructions with low priority are sent to the target network element in the retry queue with a delay according to the backoff strategy.
[0038] Specifically, in the process of sending target instructions in the retry queue to target network elements according to task priority and preset scheduling strategy, this embodiment of the application can classify the target instructions in the retry queue based on business scenario priority. Business scenario priority is a predefined priority mapping relationship based on the importance of the business scenario. For example, instructions involving network fault repair have high priority, routine data synchronization instructions have low priority, online business instructions with high real-time requirements have relatively high priority, while batch statistical analysis instructions have relatively low priority. When adding a target instruction to the retry queue, the business scenario priority attribute corresponding to the target instruction is also written into the message body.
[0039] When the scheduling component retrieves tasks from the retry queue, it differentiates and processes tasks based on the priority of the business scenario. For target instructions classified as high priority, the scheduling component prioritizes their removal from the retry queue and sends them to the target network element. This means high-priority instructions are consumed and sent immediately when the target network element's connection resources become available, without waiting for a delay. For target instructions classified as low priority, the scheduling component delays their processing in the retry queue according to a backoff strategy. A backoff strategy is a scheduling algorithm that gradually increases the retry interval to prevent low-priority tasks from frequently preempting resources and to reduce the instantaneous load on the system. Common backoff strategies include fixed-interval backoff and exponential backoff. After the delay period ends, the scheduling component then sends the low-priority target instructions to the target network element.
[0040] Optionally, refer to Figure 2 The method further includes the following steps: The preset connection threshold is dynamically updated based on the dynamic performance indicators of the target network element and the number of target instructions piling up in the retry queue.
[0041] Specifically, in the operation of the distributed cross-cluster network element connection control and scheduling method, the preset connection threshold is not a fixed constant, but can be dynamically adjusted according to the actual operating status, thereby realizing the dynamic updating of the preset connection threshold.
[0042] Dynamically updating the preset connection threshold requires consideration of two aspects. First, the dynamic performance metrics of the target network element. These metrics are real-time or near-real-time data reflecting the current processing capacity of the target network element, including CPU utilization, memory usage, number of currently active sessions, average response latency, and request processing success rate. These metrics can be obtained periodically through the network element's management interface or network telemetry protocols. Second, the backlog of target instructions in the retry queue. The backlog refers to the total number of unconsumed tasks waiting to be dispatched in the retry queue, reflecting the current scheduling pressure.
[0043] The dynamic update mechanism uses dynamic performance metrics and the number of backlogged instructions as input parameters, which are then fed into the threshold adjustment logic for comprehensive judgment. When the CPU utilization and memory usage of the target network element are at a low level and the response latency is normal, the preset connection threshold can be appropriately increased to improve concurrent processing capabilities. When dynamic performance metrics show that the network element load is high or processing latency is increasing, the preset connection threshold is decreased to protect the stability of the network element. Simultaneously, when the number of backlogged instructions in the retry queue continues to grow, if the network element performance allows, the preset connection threshold can be appropriately relaxed to accelerate task digestion. Conversely, if the number of backlogged instructions decreases after the threshold is lowered, the adjusted threshold is maintained until the system reaches a new equilibrium.
[0044] Optionally, the method further includes the following steps: When an abnormal number of connections is detected or the cluster is unavailable, the target instruction is rolled back to the local queue to wait for scheduling. Once the number of connections recovers or the cluster becomes available, the task of issuing the target instruction is added to the retry queue. If the number of connections reaches a preset connection threshold, the task of issuing the target instruction is added to the retry queue.
[0045] Specifically, during operation in a distributed cross-cluster environment, faults such as abnormal connection counts or cluster unavailability may occur. Abnormal connection counts refer to a significant discrepancy between the connection counter and the actual connection status. This could be due to factors such as corrupted counter data, network partitioning causing the count to not decay in time, or abnormally high or low counts. Cluster unavailability refers to a complete interruption of external services for a specific business cluster. This could be caused by factors such as the cluster's load balancing entry point being unreachable, all service nodes within the cluster being down, or a network outage in the data center where the cluster resides.
[0046] When the aforementioned fault phenomena are detected through heartbeat detection or health check mechanisms, i.e., when an abnormal number of connections or cluster unavailability is detected, target instructions that have not yet been successfully issued are protectively processed and rolled back to the local queue to await scheduling. The local queue is a task cache queue deployed in the host machine's memory or persistent disk where the service instance resides. It does not rely on shared storage across the cluster and can provide local buffering capabilities in the event of external dependency failures. After the target instructions are rolled back to the local queue, the local queue temporarily stores these instructions in a first-in, first-out order to avoid instruction loss.
[0047] After the fault is recovered, i.e., when the number of connections is detected to have returned to the normal range or the cluster is restored to an available state, the target instruction temporarily stored in the local queue is reloaded into the main scheduling process. At this time, the judgment logic in claim 1 continues to be executed, i.e., if the number of connections reaches the preset connection threshold, the task of sending the target instruction is added to the retry queue, and the retry queue mechanism performs subsequent priority scheduling and sending processing.
[0048] Optionally, the method further includes the following steps: If the number of connections does not reach the preset connection threshold, the target instruction is sent to the target network element.
[0049] Specifically, after determining the number of connections based on the unique identifier of the target network element, this embodiment can compare the number of connections with a preset connection threshold. If the comparison result shows that the number of connections has not reached the preset connection threshold, that is, the total number of concurrent connections carried on the target network element is still within its capacity margin, it indicates that the target network element still has available connection resources to receive and process new instructions. In this case, this embodiment can directly send the target instruction to the target network element through the network management protocol or remote call interface instead of placing the target instruction in the retry queue. While the sending action is being executed, the connection counter is incremented synchronously according to the count value corresponding to the unique identifier to accurately reflect the change in the number of connections brought about by the new connection. After the instruction is sent, the business system waits for the target network element to return the execution result and releases the connection after it is used up. The connection counter is decremented accordingly, completing the connection management closed loop for the entire instruction lifecycle.
[0050] The following sections will provide a detailed description and explanation of some optional embodiments of this application, using specific application examples.
[0051] To address the issues of high instantaneous concurrency and varying real-time requirements across different business scenarios in cross-cluster environments when multiple service systems issue commands to the same network element, potentially leading to network element interface blocking, command execution failures, and decreased resource utilization efficiency, this application proposes a distributed cross-cluster network element connection concurrency scheduling method. This method maintains a real-time connection counter for each network element at the granularity of its unique identifier and implements cross-cluster consistency control through distributed locks. When the number of connections for a network element reaches a threshold, new commands enter a retry queue with service priority, and a backoff strategy controls the retry interval to avoid retry storms. Simultaneously, the system dynamically adjusts the connection threshold based on the real-time load of the network element and combines this with a closed-loop optimization strategy to achieve adaptive connection management at the single network element level. This solution ensures timely execution of high-priority services while preventing overload of individual network elements, improving system stability and network element resource utilization efficiency in cross-cluster environments.
[0052] Reference Figure 3 The technical solutions of this application embodiment may include: 1. Cross-cluster single-network element granularity connection control and distributed consistency: After receiving a business request, the distributed command delivery system generates a command based on the requested business scenario and associates it with the unique identifier of the target network element.
[0053] The system maintains a real-time connection counter for each network element and uses a distributed lock mechanism to ensure the atomicity and consistency of counter updates in a cross-cluster environment.
[0054] For example, Figure 4This is a schematic diagram of the communication connections between network elements, clusters, and connection counters.
[0055] When the connection counter value has not reached the dynamic connection threshold of the network element, the instruction can be issued immediately; if the threshold is reached, the instruction enters the retry queue and waits for the next round of scheduling.
[0056] 2. Service priority scheduling and intelligent retries: The system categorizes instructions based on the priority of business scenarios. High-priority instructions are given priority to obtain issuance permission, while low-priority instructions are placed in the retry queue and issued with a delay according to the backoff strategy.
[0057] Avoidance strategies, such as exponential avoidance, jitter, and multi-stage avoidance, can prevent instantaneous shocks from causing interface congestion and allow for retrying of storms.
[0058] 3. Dynamic threshold and closed-loop optimization: Real-time network element load includes: current connection response characteristics such as response latency, failure rate, and timeout rate; actively collected network element performance indicators; and historical queue backlog data. When the network element load is high, the connection threshold is lowered to reduce new connections; when the load is low, the threshold is raised to increase utilization.
[0059] When the lock service is abnormal or a cluster node is unavailable, the system can fall back to local queue scheduling and synchronize the global state after the lock is restored, ensuring continuous and reliable single network element connection management.
[0060] In light of actual business scenarios, one specific implementation of this application embodiment can be a shutdown and restart business scenario, as detailed below: 1. When a user enters the service suspension process due to unpaid fees, the data acquisition and control platform generates a "suspension" command. Because the customer has low sensitivity to the suspension scenario, this command is identified as low priority. If the distributed counter shows that the current number of concurrent connections to the network element has reached the threshold, the "suspension" command enters the retry queue, awaiting intelligent system scheduling.
[0061] 2. After the user pays the fee, the platform generates a "reactivation" command. Reactivation scenarios are highly sensitive for customers, and this command is identified as a high-priority command. The system calls a distributed counter; if the threshold is not exceeded, it immediately acquires connection resources and sends the command to the target network element, ensuring the user's service is restored in real time.
[0062] 3. If there is an unissued "shutdown" command in the cache queue, the system will automatically remove the shutdown command since its effect has been overridden by the "restart" command, thus avoiding duplicate issuance and reducing the pressure on network elements.
[0063] 4. During operation, the background scheduler continuously collects the execution results of the restart instructions and combines them with network element performance data. When the system detects that the response latency, failure rate, and timeout rate of a target network element increase under high concurrency, it automatically lowers the threshold of that network element and triggers more low-priority instructions to enter the backoff queue. When the network element recovers stability, the threshold is gradually raised to achieve closed-loop optimization.
[0064] In summary, the embodiments of this application include at least the following beneficial effects: 1. Cross-cluster single network element concurrency control: Through distributed sub-counters and aggregation strategies, concurrent scheduling control of a single network element is achieved in a cross-cluster environment, avoiding competition and conflict for the same network element in multiple clusters.
[0065] 2. Priority queue and backoff mechanism: By using a priority queue based on business sensitivity, high-sensitivity services are ensured to be delivered first. At the same time, the backoff strategy effectively smooths out peaks and valleys, avoiding a surge in system and network element pressure caused by retry storms.
[0066] 3. Real-time load awareness and adaptive scheduling: Combining the real-time connection counter of network elements and the dynamic threshold adjustment mechanism, the number of concurrent connections is adaptively adjusted according to the current load of the network element to achieve a balance between resource utilization and service efficiency.
[0067] 4. Achieving a balance between network element load and efficiency: This method forms a complete cross-cluster concurrent scheduling mechanism that can flexibly adapt to various business scenarios and has strong universality and scalability.
[0068] Reference Figure 5 This application also provides a distributed cross-cluster network element connection control and scheduling device, which can implement the above-mentioned distributed cross-cluster network element connection control and scheduling method. The device includes: The network element determination unit is used to determine the target network element corresponding to the target instruction and the unique identifier of the target network element; A connection quantity determination unit is used to determine the number of current connected clusters of the target network element as the connection quantity based on the unique identifier; The instruction processing unit is used to add the task of issuing the target instruction to the retry queue if the number of connections reaches a preset connection threshold. The instruction issuing unit is used to issue the target instruction in the retry queue to the target network element according to the task priority and the preset scheduling strategy.
[0069] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0070] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method of this application. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0071] It is understood that the content of the above method embodiments is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the methods of this application, and the beneficial effects achieved are the same as those achieved by the methods of this application.
[0072] Figure 6 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 101 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 102 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 102 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 102 and is called and executed by the processor 101. Input / output interface 103 is used to implement information input and output; The communication interface 104 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 105 transmits information between various components of the device (e.g., processor 101, memory 102, input / output interface 103, and communication interface 104); The processor 101, memory 102, input / output interface 103 and communication interface 104 are connected to each other within the device via bus 105.
[0073] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of this application.
[0074] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0075] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0076] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0077] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0078] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0079] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0080] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0081] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0082] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0083] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0084] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0085] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0086] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0087] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A distributed cross-cluster network element connection control and scheduling method, characterized in that, The method includes the following steps: Determine the target network element corresponding to the target instruction and the unique identifier of the target network element; The number of clusters currently connected to the target network element is determined based on the unique identifier and used as the connection count. If the number of connections reaches a preset connection threshold, the task of issuing the target instruction will be added to the retry queue. The target instruction in the retry queue is sent to the target network element according to the task priority and the preset scheduling strategy.
2. The distributed cross-cluster network element connection control and scheduling method according to claim 1, characterized in that, Before determining the target network element corresponding to the target instruction and the unique identifier of the target network element, the method further includes the following steps: Obtain the business request; The target instruction is generated based on the business scenario of the business request.
3. The distributed cross-cluster network element connection control and scheduling method according to claim 1, characterized in that, Determining the number of clusters currently connected to the target network element as the connection count includes the following steps: The number of current connected clusters of the target network element is determined by using a connection counter based on the unique identifier, and this number is taken as the connection count.
4. The distributed cross-cluster network element connection control and scheduling method according to claim 1, characterized in that, The step of sending the target instruction in the retry queue to the target network element according to the task priority and the preset scheduling policy includes the following steps: The target instructions in the retry queue are classified according to the priority of the business scenario; The target instructions with high priority are sent to the target network element first, while the target instructions with low priority are sent to the target network element in the retry queue with a delay according to the backoff strategy.
5. The distributed cross-cluster network element connection control and scheduling method according to claim 1, characterized in that, The method further includes the following steps: The preset connection threshold is dynamically updated based on the dynamic performance indicators of the target network element and the number of target instructions piling up in the retry queue.
6. The distributed cross-cluster network element connection control and scheduling method according to claim 1, characterized in that, The method further includes the following steps: When an abnormal number of connections is detected or the cluster is unavailable, the target instruction is rolled back to the local queue to wait for scheduling. Once the number of connections recovers or the cluster becomes available, the task of issuing the target instruction is added to the retry queue. If the number of connections reaches a preset connection threshold, the task of issuing the target instruction is added to the retry queue.
7. A distributed cross-cluster network element connection control and scheduling method according to any one of claims 1 to 6, characterized in that, The method further includes the following steps: If the number of connections does not reach the preset connection threshold, the target instruction is sent to the target network element.
8. A distributed cross-cluster network element connection control and scheduling device, characterized in that, The device includes: The network element determination unit is used to determine the target network element corresponding to the target instruction and the unique identifier of the target network element; A connection quantity determination unit is used to determine the number of current connected clusters of the target network element as the connection quantity based on the unique identifier; The instruction processing unit is used to add the task of issuing the target instruction to the retry queue if the number of connections reaches a preset connection threshold. The instruction issuing unit is used to issue the target instruction in the retry queue to the target network element according to the task priority and the preset scheduling strategy.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.
